Agent examination recommendation method and system based on constraint perception and large language model
By employing an intelligent health checkup recommendation method based on constraint perception and large language models, we have solved the problems of rule explosion, medical illusion, and missing historical data in health checkup item recommendation. This method achieves highly accurate, interpretable, and safe personalized health checkup item recommendations, meeting clinical needs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI-CHONGQING ARTIFICIAL INTELLIGENCE RES INST
- Filing Date
- 2026-01-29
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies for recommending physical examination items suffer from problems such as rule explosion, difficulty in resolving rule conflicts, high cost of knowledge updates, serious cold start problem, medical illusion, lack of structured constraints, poor timeliness of knowledge, and lack of longitudinal tracking driven by historical data. These issues result in insufficient recommendation accuracy and security, and fail to meet the requirements of zero-sample generalization, high medical accuracy, good interpretability, and controllable cost.
An intelligent physical examination recommendation method based on constraint perception and large language model is adopted. Through hierarchical knowledge injection based on constraint perception, longitudinal tracking driven by historical data, lightweight graph neural network inference, and triple security verification, a physical examination item recommendation scheme that meets medical constraints is generated, and multiple verifications and interpretable report generation are performed.
It achieves zero-sample generalization capability, high medical accuracy, good interpretability, and continuous tracking of historical anomalies, significantly improving the reliability and security of the system, providing personalized health checkup recommendations, and meeting clinical usability requirements.
Smart Images

Figure CN121601259B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the intersection of artificial intelligence and medical and health technologies, and in particular to an intelligent physical examination recommendation method and system based on constraint perception and large language models. Background Technology
[0002] In the field of recommending physical examination items, existing technologies mainly employ the following methods, but all have significant limitations:
[0003] The first type is rule-based expert systems. This method generates recommendations through logical reasoning using a predefined medical rule base. However, it has serious drawbacks: (1) rule explosion problem: there are many risk factors in actual medical scenarios (more than 50), which leads to an exponential increase in the number of rules, making the system difficult to maintain; (2) rule conflicts are difficult to resolve automatically; (3) knowledge update costs are high, and a large number of rules need to be rewritten manually when updating medical guidelines; (4) rigidity and inflexibility, unable to handle new situations or complex individual differences not covered by the rule base.
[0004] The second category is traditional machine learning methods, such as collaborative filtering algorithms. These methods rely on a large amount of user-item interaction data and have the following problems: (1) Data hunger: usually more than 100,000 labeled samples are needed to achieve usable accuracy, which is extremely costly in the medical field; (2) Severe cold start problem: for new users or new items, the recommendation accuracy is extremely low (less than 50%); (3) Black box model: the decision-making process is not interpretable, which leads to most users refusing to accept the recommendation due to distrust; (4) It is difficult to effectively integrate structured medical expertise and complex medical constraints.
[0005] The third category is the pure large language model method, which directly uses general large models such as GPT-4 for natural language question-answering recommendations. Although it demonstrates strong language understanding and generation capabilities, it has fatal flaws in the high-risk field of medical recommendations: (1) Medical illusion problem: the model may generate recommendations that seem reasonable but contain medical factual errors; (2) Lack of structured constraints: it is difficult to strictly adhere to medical constraints such as mutual exclusion, timing, and contraindications, which may lead to dangerous combinations of examinations; (3) Poor knowledge timeliness: the model knowledge is outdated and cannot be synchronized with the latest medical guidelines; (4) High cost and data privacy risks.
[0006] Furthermore, all of the aforementioned existing technologies share a common drawback: the lack of historical data-driven longitudinal tracking. They generally treat each physical examination as an isolated event, failing to effectively utilize users' historical examination records (such as historical data tracking of annual physical examinations) to guide current recommendations, and cannot ensure continuous review of historical abnormal indicators, posing a potential risk of medical accidents due to historical omissions.
[0007] In summary, existing technologies cannot simultaneously meet the key requirements necessary for clinically usable systems, such as zero-sample generalization capability, high medical accuracy, good interpretability, strict constraint satisfaction, continuous historical tracking, and cost control. Summary of the Invention
[0008] The purpose of this invention is to overcome the problems existing in the prior art and to provide an intelligent physical examination recommendation method and system based on constraint perception and large language model. Through hierarchical knowledge injection based on constraint perception, longitudinal tracking driven by historical data, lightweight graph neural network inference, triple security verification and multi-objective optimization, it realizes accurate, safe, interpretable and personalized intelligent physical examination item recommendation.
[0009] The objective of this invention is achieved through the following technical solution:
[0010] Firstly, an intelligent health check recommendation method based on constraint awareness and a large language model is provided, including the following steps:
[0011] S1. Obtain the user's health information;
[0012] S2. Retrieve medical knowledge related to the user's health information from the medical knowledge base;
[0013] S3. Inject the medical knowledge into the input prompts of the generative large language model, and generate a recommended plan for physical examination items that meet medical constraints based on the input prompts; the medical constraints include at least mutual exclusion constraints, temporal constraints, conditional constraints and historical tracking constraints, and the historical tracking constraints include the constraint that historical abnormal items must be reviewed;
[0014] S4. Perform multiple verifications on the recommended scheme, the multiple verifications including rule hard constraint checks, logical consistency verification and expert review in sequence;
[0015] S5. Based on the validated recommendation scheme, generate an interpretable report that includes explanations of the basis for the recommendation.
[0016] In some embodiments, the medical knowledge base uses a knowledge graph structure to store medical knowledge.
[0017] In some embodiments, generating a recommended medical examination item scheme that meets medical constraints based on the input prompt includes:
[0018] The constraint extraction step extracts user-related medical constraint relationships from the medical knowledge base;
[0019] The constraint formalization step converts the medical constraint relationship into a formal rule expression;
[0020] The hierarchical injection step organizes the formal rule expressions and medical knowledge into the input prompts of the generative large language model according to a predetermined hierarchical structure;
[0021] The constraint-guided generation step involves calling a generative large language model to perform reasoning based on the input prompts and generate a recommendation scheme that meets the constraints.
[0022] The constraint verification step verifies the constraint satisfaction of the generated recommendation solution. If the constraint is violated, the process returns to the constraint-guided generation step to require the generative large language model to make corrections.
[0023] In some embodiments, the hierarchy includes:
[0024] The constraint layer includes mutual exclusion constraints, timing constraints, conditional constraints, and historical tracking constraints. Each constraint uses logical expressions or predefined formats to represent the relationship between the physical examination items.
[0025] The knowledge layer contains compressed medical knowledge, which is compressed by semantic clustering of relevant medical knowledge and extraction of key information using predefined summary templates.
[0026] The example layer contains example cases used to guide the reasoning patterns of large language models.
[0027] In some embodiments, retrieving medical knowledge related to the user's health information from a medical knowledge base includes inference using a lightweight graph neural network, specifically including:
[0028] Relevant node location: Calculate the similarity between the user's feature vector and nodes in the knowledge graph, and select relevant nodes;
[0029] Local graph extraction: Extract the N-hop neighborhood subgraph of the relevant nodes;
[0030] Graph attention network reasoning, which uses a multi-layer graph attention network to reason about the N-hop neighborhood subgraph;
[0031] Relationship identification extracts collaborative reinforcement relationships, temporal dependencies, and constraint relationships from the reasoning results.
[0032] In some embodiments, the rule hard constraint check includes:
[0033] Blacklist check: Verify whether the recommended items include any checks that are contraindicated for the user;
[0034] Age restriction check: Verify that the age range applicable to the recommended items includes the user's age;
[0035] Mutual exclusion check: Verify that there are no mutually exclusive combinations of items in the recommendation list;
[0036] Historical review completeness check: Verify whether all historical anomalies contain the corresponding review items;
[0037] The logical consistency verification includes:
[0038] Structured validation: Validates whether the output format conforms to predefined data structure specifications;
[0039] Constraint consistency verification: Verify whether the recommended solution meets the time constraints and budget constraints;
[0040] Inference consistency verification: Verify the logical connection between the recommendation reason and the recommended item;
[0041] When the preset high-risk conditions are met, the recommended results will be marked as requiring human expert review.
[0042] In some embodiments, the generative large language model uses a multi-objective weighted optimization function, which includes a health benefit term, a cost term, a potential risk term, and a historical continuity term, wherein the weight coefficients of each objective function term are dynamically adjusted according to the user type.
[0043] Secondly, it provides an intelligent health check recommendation system based on constraint awareness and large language models, including:
[0044] The user interface module is used to obtain users' health information;
[0045] The medical knowledge extraction module is used to retrieve medical knowledge related to the user's health information from a medical knowledge base;
[0046] The recommendation scheme generation module is used to inject the medical knowledge into the input prompts of the generative large language model, and generate a physical examination item recommendation scheme that meets the medical constraints based on the input prompts; the medical constraints include at least mutual exclusion constraints, temporal constraints, conditional constraints and historical tracking constraints, and the historical tracking constraints include the constraint that historical abnormal items must be reviewed.
[0047] The multi-validation module is used to perform multiple validations on the recommended scheme. The multiple validations include rule hard constraint checks, logical consistency verification, and expert review.
[0048] The recommendation output module is used to generate an interpretable report containing explanations of the basis for the recommendations based on the validated recommendations.
[0049] In some embodiments, the recommendation output module includes:
[0050] In the concise layer, the user explains the reasons for the recommendation to other users;
[0051] In the medical field, it is used to explain the basis of recommendations to healthcare professionals using professional terminology and evidence-based medicine.
[0052] The technical layer is used to demonstrate the AI reasoning path and decision-making process;
[0053] In the interaction layer, users can further inquire about recommendation details through natural language question answering.
[0054] In some embodiments, the multi-factor authentication module includes:
[0055] The rule checking engine is used to perform blacklist checks, age restriction checks, and mutual exclusion checks.
[0056] The logic verification engine is used to perform structured verification, constraint consistency verification, and inference consistency verification.
[0057] The expert review scheduler is used to determine whether human expert review is required and to transfer high-risk recommendations to the human review process.
[0058] An audit logger is used to record all verification processes and results, supporting post-audit.
[0059] It should be further noted that the technical features corresponding to the above-mentioned options and embodiments can be combined or substituted with each other to form new technical solutions without conflict.
[0060] Compared with the prior art, the beneficial effects of the present invention are:
[0061] 1. Achieved a breakthrough in the performance "impossible triangle" and completed historical data tracking capabilities: This invention successfully unified three traditionally difficult-to-achieve characteristics—zero-shot generalization, high medical accuracy, and good interpretability—for the first time, and solved the problem of longitudinal historical data tracking, which is lacking in all existing technologies. Through the deep integration of symbolic reasoning (rules, constraints) and neural reasoning (large language models, graph neural networks), it comprehensively outperforms single rule engines, machine learning, or pure large model methods in terms of recommendation accuracy, constraint satisfaction rate, and decision interpretability.
[0062] 2. Superior historical anomaly tracking and continuity assurance capabilities: This invention employs a "five-fold guarantee mechanism" consisting of priority calculation, graph neural network injection, rigid constraint layer rules, security verification checks, and historical continuity functions in multi-objective optimization. This ensures that users' historical anomalies are completely and thoroughly tracked and reviewed, effectively preventing medical accidents such as delayed diagnosis that may result from missing historical information.
[0063] 3. Extremely high medical safety and system reliability: This invention designs a triple medical safety verification mechanism (rule hard constraint check, logical consistency verification, and expert review trigger) to form an effective defense line. It can significantly curb the inherent medical illusions and constraint violations of large language models, reduce the medical error rate to below the clinically acceptable level, and greatly improve the reliability and safety of the system.
[0064] 4. In-depth personalization and comprehensive balanced multi-objective optimization: This invention introduces objective functions with four dimensions: health benefits, cost, potential risks, and historical continuity. It can dynamically adjust optimization weights based on user type (e.g., price-sensitive, health-prioritized), thereby achieving truly personalized recommendations. Compared to existing technologies with single optimization objectives or simple cost ranking, this invention can more precisely balance users' diverse health needs with economic and risk considerations.
[0065] 5. Strong Explainability and High User Trust: This invention provides a four-layer explanation system—concise, medical, technical, and interactive—capable of meeting the understanding needs of various roles, from ordinary users to medical professionals and technology developers. The reasoning path is clear and traceable, complying with increasingly stringent regulatory requirements for medical AI. Compared to black-box models in machine learning, it significantly improves user satisfaction, trust, and the acceptance of recommended solutions. Attached Figure Description
[0066] Figure 1 This is a simplified flowchart illustrating the intelligent physical examination recommendation method based on constraint perception and a large language model, as shown in an embodiment of the present invention. Detailed Implementation
[0067] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0068] It should be noted that the defects in the solutions in the prior art are all the results of the inventors' practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the embodiments of this application in the following text should be the inventors' contributions to this application in the process of invention and creation, and should not be understood as technical content known to those skilled in the art.
[0069] In view of the technical problems pointed out in the background art, the present invention provides the following embodiments:
[0070] In an exemplary embodiment, an intelligent health check recommendation method based on constraint awareness and a large language model, such as Figure 1 As shown, it includes the following steps:
[0071] S1. Obtain the user's health information;
[0072] S2. Retrieve medical knowledge related to the user's health information from the medical knowledge base;
[0073] S3. Inject the medical knowledge into the input prompts of the generative large language model, and generate a recommended plan for physical examination items that meet medical constraints based on the input prompts; the medical constraints include at least mutual exclusion constraints, temporal constraints, conditional constraints and historical tracking constraints, and the historical tracking constraints include the constraint that historical abnormal items must be reviewed;
[0074] S4. Perform multiple verifications on the recommended scheme, the multiple verifications including rule hard constraint checks, logical consistency verification and expert review in sequence;
[0075] S5. Based on the validated recommendation scheme, generate an interpretable report that includes explanations of the basis for the recommendation.
[0076] The user's health information includes basic information, risk factors, symptom descriptions, and historical medical examination records; the historical medical examination records include historical examination items, examination results, abnormality markers, and re-examination recommendations.
[0077] For example, the medical knowledge base uses a knowledge graph structure to store medical knowledge. The medical knowledge includes physical examination item information, disease risk information, recommendation criteria, and historical tracking rules. The knowledge graph structure includes:
[0078] The nodes are categorized as physical examination items, disease / risk factor items, and medical guideline items. The relation types are basic relationships, synergistic enhancement relationships, temporal dependencies, evidence strength relationships, and historical tracking relationships. The historical tracking relationship is defined as FOLLOW_UP(abnormal item, re-examination item, interval time, priority), representing the tracking dependency between historically abnormal examination items and this year's re-examination items. The synergistic enhancement relationship is defined as the synergistic effect generated when two or more physical examination items are used in combination. This synergistic effect is represented by quantitative indicators, including at least one of improved detection sensitivity, improved specificity, and improved early detection rate.
[0079] The step of retrieving medical knowledge related to the user's health information from a medical knowledge base includes reasoning using a lightweight graph neural network, specifically including:
[0080] For relevant node localization, the similarity between the user's feature vector and the health checkup item nodes in the knowledge graph is calculated, and the Top-K relevant nodes are selected. Specifically, for each health checkup item node in the knowledge graph, a feature vector of the same dimension is pre-constructed. This vector is generated based on the following attributes of the item: risk factors corresponding to the indication (e.g., "smoking" corresponds to low-dose spiral CT), applicable age range, invasiveness level of the examination, and level of evidence. Each attribute is encoded using the same normalization method as the user features to ensure that the dimensions of the two are consistent. Among them, the user feature vector is normalized and encoded into a multi-dimensional numerical feature vector, finally obtaining a numerical vector with a fixed dimension. The specific encoding rules are shown in Table 1.
[0081] Table 1. User Feature Vector Encoding Diagram
[0082]
[0083] Furthermore, cosine similarity is used to calculate the correlation between the user feature vector and each physical examination item node. The similarity value ranges from [-1, 1], with a larger value indicating a stronger correlation between the user feature and the physical examination item. The top K physical examination item nodes (K=20 in this invention) with the highest similarity values are selected as preliminary candidate nodes.
[0084] Example: For a 45-year-old male user who has smoked for 20 years and has a family history of lung cancer, the cosine similarity of his feature vector with the "low-dose spiral CT" node is 0.94 (due to a high match in the three dimensions of smoking, age, and family history), and the similarity with the "blood routine" node is 0.38 (matching only the age dimension).
[0085] Local graph extraction: Extract the N-hop neighborhood subgraph of the Top-K related nodes, where N is an integer between 1 and 3;
[0086] Graph attention network reasoning, which infers the N-hop neighborhood subgraph through a multi-layer graph attention network, wherein the graph attention network includes 2 to 3 layers, and each layer includes 2 to 8 attention heads;
[0087] Relationship identification involves extracting co-reinforcing relationships, temporal dependencies, and constraint relationships from the inference results. Specifically, the method for extracting co-reinforcing relationships is as follows:
[0088] Iterate through all candidate recommendation node pairs in the output of the second layer of the graph attention network and calculate the attention weight value between each pair of nodes. When the attention weight value between two nodes is greater than a preset threshold (set to 0.6 in this invention), query the knowledge graph to see if there is a SYNERGY edge between the node pair. If such an edge exists, extract the attribute information of the edge, including: synergy value (representing the percentage improvement in effect brought by combined use), improvement metric (such as sensitivity or specificity), evidence level (such as level A or level B), and source of evidence (such as published research literature).
[0089] Example: The attention weight between the two nodes, low-dose spiral CT and tumor markers, is 0.82 (greater than the threshold of 0.6). A query of the knowledge graph reveals a SYNERGY edge between the two nodes. The extracted attributes are: synergistic effect value = 0.18 (i.e., sensitivity increased by 18%), enhancement index = sensitivity, evidence level = A, and evidence source = NEJM 2023.
[0090] The method for extracting temporal dependencies is as follows:
[0091] For all nodes selected into the candidate recommendation list, query the knowledge graph for TEMPORAL (temporal dependency) edges associated with each node. For each TEMPORAL edge found, check if its target node is also in the candidate recommendation list. If the target node is also in the list, extract the edge's attribute information, including: temporal direction (order, with values of before or after, indicating whether the node should be checked before or after the target node), time interval (e.g., "1-3 days"), and temporal reason (e.g., "avoiding false positive anxiety").
[0092] Example: The tumor marker node query found a TEMPORAL edge with the low-dose spiral CT node, and the low-dose spiral CT node is also in the candidate list. The extracted attributes are: order=before (tumor markers should be before low-dose spiral CT), interval=1 to 3 days, reason=avoid excessive anxiety caused by the discovery of suspicious nodules on imaging.
[0093] The method for extracting constraint relationships is as follows:
[0094] For all candidate recommendation nodes, query the knowledge graph for edges of type EXCLUDES (mutual exclusion) and REQUIRES (conditional dependency) associated with each node. For each constraint edge found, determine whether the constraint is activated based on the user's specific characteristics (such as allergy history, age, pregnancy status, etc.). The determination method is as follows: match the conditional expression stored in the edge (such as "contrast agent allergy") with the corresponding field in the user information. If the match is successful, the constraint is activated, and the type of constraint (mutual exclusion or conditional dependency), the items involved, and the reason for the constraint are recorded.
[0095] Example: The Enhanced CT node query finds an EXCLUDES edge with the condition "contrast agent allergy". If the user's allergy history includes "contrast agent allergy", the constraint is activated and recorded as: Type=mutually exclusive, Item=enhanced CT, Reason=contrast agent allergy prohibits enhanced CT.
[0096] Furthermore, the graph attention network reasoning includes: a first-layer reasoning, which aggregates 1-hop neighborhood node information to identify physical examination items and risk factors directly related to the user; a second-layer reasoning, which aggregates 2-hop neighborhood node information to capture the synergistic effects and implicit associations between physical examination items; and an attention mechanism that calculates node importance weights based on the semantic relevance between user features and node features.
[0097] Furthermore, before transmitting data to the generative large language model, the medical knowledge to be input is anonymized and its privacy protected:
[0098] Direct identifier removal: Removes users' names, ID numbers, contact information, and other direct identifying information; Quasi-identifier generalization: Generalizes specific ages to age groups and specific occupations to occupational categories; Sensitive information encryption: Uses encryption algorithms to process sensitive information such as family medical history and past medical history.
[0099] For example, generating a recommended medical examination item scheme that meets medical constraints based on the input prompt includes:
[0100] The constraint extraction step extracts medical constraint relationships related to the user from the medical knowledge base. The constraint relationships include at least one of mutual exclusion constraints, temporal constraints, conditional constraints, and historical tracking constraints, wherein the historical tracking constraint is defined as the tracking dependency relationship between historical abnormal examination items and this year's re-examination items.
[0101] The constraint formalization step converts the medical constraint relationship into a formal rule expression, which is described using a logical language or a natural language template.
[0102] The hierarchical injection step organizes the formal rule expressions and medical knowledge into the input prompts of the generative large language model according to a predetermined hierarchical structure;
[0103] The constraint-guided generation step involves calling a generative large language model to perform reasoning based on the input prompts and generate a recommendation scheme that meets the constraints.
[0104] The constraint verification step verifies the constraint satisfaction of the generated recommendation solution. If the constraint is violated, the process returns to the constraint-guided generation step to require the generative large language model to make corrections.
[0105] In this embodiment, the hierarchical structure includes:
[0106] The constraint layer defines hard constraint rules that must be strictly followed. It includes mutual exclusion constraints, temporal constraints, conditional constraints, and historical tracking constraints. Each constraint uses logical expressions or predefined formats to represent the relationship between medical examination items. Mutual exclusion constraints use the logical expression "IF Recommended Item X THEN Prohibited Item Y" to represent the mutual exclusion relationship between items. Temporal constraints use the format "Item X MUST_BEFORE Item Y, interval=[a, b]" to represent the order dependency of examinations. Conditional constraints use the format "IF Condition C THEN Must / Prohibited Item X" to represent indications and contraindications. Historical tracking constraints use the format "IF Last Year's Abnormal (Item X) THEN This Year's Must (Item X), priority=high" to represent the necessary review of historical abnormal items.
[0107] The knowledge layer provides medical knowledge and evidence as recommendations, including compressed medical knowledge. The compression is achieved by semantically clustering relevant medical knowledge and extracting key information using predefined summary templates. The key information includes evidence level, applicable conditions, effect quantification, and evidence source, reducing the number of tokens in the original knowledge by more than 50%.
[0108] The example layer contains a small number of example cases to guide the reasoning patterns of the large language model.
[0109] For example, the present invention employs a triple verification mechanism, as follows:
[0110] The first layer of verification – hard constraint checks on rules – includes:
[0111] Blacklist check: Verify whether the recommended items include any checks that are contraindicated for the user;
[0112] Age restriction check: Verify that the age range applicable to the recommended items includes the user's age;
[0113] Mutual exclusion check: Verify that there are no mutually exclusive combinations of items in the recommendation list;
[0114] Historical review completeness check: Verify whether all historical anomalies contain the corresponding review items;
[0115] The second layer of verification – logical consistency verification – includes:
[0116] Structured validation: Validates whether the output format conforms to predefined data structure specifications;
[0117] Constraint Consistency Verification: Verify whether the recommended solution meets the time constraints and budget constraints; the time constraint verification consists of the following steps:
[0118] Step 1: Extract time information from the recommendation scheme. From the recommendation scheme generated by the large model, extract the scheduling time (timing field) for each recommended item. The scheduling time is represented in text format as "Day N" (e.g., "Day 1", "Day 3-4"). The system parses the text into a numerical form and takes the earliest date within that range as the item's scheduling date value. For example, "Day 1" is parsed as date value 1, and "Day 3-4" is parsed as date value 3.
[0119] Step 2: Obtain all temporal constraint rules. From the constraint relationships extracted in the previous steps, filter out all temporal dependencies. Each rule contains three elements: the preceding item (before_item), the following item (after_item), and the required interval range ([min_interval, max_interval]).
[0120] Step 3: Verify each timing constraint. For each timing constraint rule, check whether both the preceding and succeeding items appear in the recommended solution. If they do, perform the following two checks:
[0121] (1) Sequence check: Verify whether the arrangement date value of the preceding item is strictly less than the arrangement date value of the following item. If the date value of the preceding item is greater than or equal to the date value of the following item, it is determined that the sequence is violated.
[0122] (2) Interval check: Calculate the date of the subsequent item's arrangement minus the date of the preceding item's arrangement to obtain the actual interval in days. Verify whether the actual interval in days is within the required interval range [min_interval, max_interval]. If it exceeds the range, it is determined to be a violation of the time interval.
[0123] Verification example:
[0124] The time constraint rule is "tumor marker MUST_BEFORE LDCT, interval=[1, 3] days".
[0125] The recommended protocol schedules tumor markers on "Day 1" (date value = 1) and LDCT on "Days 3-4" (date value = 3).
[0126] Sequence check: 1 < 3, the sequence is correct, pass.
[0127] Interval check: 3-1 = 2 days, within the range of [1, 3], passed.
[0128] Verification result: The timing constraint is satisfied.
[0129] If the low-dose spiral CT is scheduled for "Day 1" (date value = 1) and the tumor marker is scheduled for "Day 3" (date value = 3), then the sequence check is as follows: 1 < 3 is not satisfied (the preceding item should be the marker, but its date value 3 is greater than 1 for LDCT), which is judged as a violation of the time sequence and an error is returned.
[0130] Consistency verification: This verifies the logical connection between the reasons for the recommendation and the recommended items, preventing contradictions between the reasons and the conclusions. The specific methods are as follows:
[0131] Model used: A pre-trained Natural Language Inference (NLI) model was employed, specifically a Transformer-based text classification model (such as RoBERTa-large-mnli or similar Chinese NLI models). The NLI model takes a "premise" text and a "hypothesis" text as input and outputs probability values for three categories: entailment (indicating the premise supports the hypothesis), neutral (indicating no explicit relationship between the premise and hypothesis), and contradiction (indicating a contradiction between the premise and hypothesis). The sum of the three probability values is 1.
[0132] Verification steps:
[0133] For each recommended item in the recommendation scheme, perform the following operations:
[0134] (1) Use the reasons for recommending the project (reason field) as the premise text (premise).
[0135] (2) Take "Therefore, it is recommended to check [project name]" as the hypothesis text.
[0136] (3) Input the premises and assumptions into the NLI model to obtain the probability values of the three categories.
[0137] (4) Judgment logic:
[0138] If the entailment probability is ≥ 0.7, the recommendation reason is considered consistent with the logic of the recommended item, and the verification is passed;
[0139] If the implied probability is less than 0.7 and the contradiction probability is less than 0.3, the recommendation reason is deemed insufficient, a warning message is returned but the output is not blocked;
[0140] If the probability of contradiction is greater than or equal to 0.3, it is determined that there is a logical contradiction between the recommendation reason and the recommended item, an error is returned, and the large language model is required to be regenerated.
[0141] Verification example:
[0142] The recommended test is "low-dose spiral CT". The reason for the recommendation is that "the user has smoked for 20 pack-years and is 45 years old, which meets the definition of high-risk group in the lung cancer screening guidelines. It is strongly recommended with level A evidence".
[0143] Premise: "The user has smoked for 20 pack-years and is 45 years of age, meeting the high-risk group definition in the lung cancer screening guidelines; Level A evidence strongly recommends this screening."
[0144] Hypothesis: "Therefore, low-dose spiral CT scans should be recommended."
[0145] NLI model output: Implicative probability = 0.92, Neutral probability = 0.06, Contradictory probability = 0.02.
[0146] Judgment: Implied probability 0.92 ≥ 0.7, verification passed.
[0147] The third layer of verification – expert review – will mark the recommendation results as requiring human expert review when one of the following high-risk conditions is met: the total cost of the recommendation exceeds a preset threshold, it includes invasive examination items, the user has a serious underlying disease, or the confidence level of the large language model output is lower than a preset threshold.
[0148] The first and second layers of verification are executed automatically by a preset rule engine. When verification fails: if the error is correctable, a correction prompt is automatically generated and the system returns to the large language model for regeneration; if the error is uncorrectable, the recommended solution is rejected and the user is informed of the error reason. The number of correction attempts is limited to three; after this, the system proceeds to manual review. Errors detected during the verification phase are categorized into correctable and uncorrectable errors based on whether they involve user safety and whether they can be automatically corrected programmatically. Correctable errors can be resolved through automatic correction strategies and do not pose a user safety risk; uncorrectable errors involve user safety or require manual judgment and cannot be automatically corrected. The method for determining whether an error is correctable is as follows:
[0149] After the verification engine detects an error, it determines the error type according to the following process:
[0150] (1) Compare the detected errors with the judgment conditions of historical correctable errors one by one. If any correctable error type is matched, execute the corresponding automatic correction strategy, correct it, and re-enter the verification process.
[0151] (2) If no correctable error type is matched, then compare it one by one with the judgment conditions of uncorrectable errors. If any uncorrectable error type is matched, then perform the corresponding processing method (reject output or transfer to manual review).
[0152] (3) If the error does not match either the known type of correctable error or the known type of uncorrectable error (i.e., unknown error type), it will be conservatively treated as an uncorrectable error and transferred to the manual review process.
[0153] (4) For correctable errors, the number of correction attempts shall not exceed 3. If the verification still fails after 3 corrections, the error shall be upgraded to an uncorrectable error and transferred to the manual review process.
[0154] Example 1 (Correctable): The recommended total cost is 5500 yuan, and the user's budget is 5000 yuan. Judgment: 5500 / 5000 = 1.10, exceeding the budget by 10%, not exceeding 20%, falling under the category of "slight budget overrun" (correctable). Correction strategy: Delete items with priority "optional" (e.g., blood routine test 50 yuan), reducing the total cost to 5450 yuan. Continue deleting items until the total cost does not exceed 5000 yuan.
[0155] Example 2 (Uncorrectable Error): Enhanced CT was recommended to a user with a contrast agent allergy. Judgment: This is a "contraindication violation" (uncorrectable error), directly endangering user safety. Action: Refuse to output this plan and inform the user, "This plan includes enhanced CT, but you have a contrast agent allergy; it has been automatically blocked."
[0156] In this embodiment, the generative large language model uses a multi-objective weighted optimization function, which includes at least a health benefit term, a cost term, a potential risk term, and a historical continuity term.
[0157] The weight coefficients of each objective function term are dynamically adjusted according to the user type, which includes at least one of price-sensitive, health-prioritized, and balanced value-oriented users.
[0158] Furthermore, the weighted comprehensive score of the candidate recommendation scheme is calculated, and the comprehensive score formula is as follows:
[0159] Score=w1×H-w2×C / C_max-w3×R+w4×L
[0160] Where w1, w2, w3, and w4 are weighting coefficients, with a weight constraint of w1 + w2 + w3 + w4 = 1.0. H represents health benefits, C represents cost, C_max represents the maximum cost, R represents potential risk, and L represents historical continuity. Specifically, the health benefit function H(x) = Σ(item detection rate × disease severity × early intervention value); the cost function C(x) = Σ(item cost + time cost); the potential risk function R(x) = Σ(examination side effect risk + false positive psychological burden); and the historical continuity function L(x) = (number of historical abnormality re-examination items included in the recommended plan) / (total number of historical abnormality items requiring re-examination). The item detection rate (representing the detection sensitivity of the examination item for the target disease) ranges from 0 to 1 and is derived from publicly published large-scale clinical studies in evidence-based medicine literature, such as the 0.85% detection rate of low-dose spiral CT for early lung cancer. When constructing the knowledge graph, the detection sensitivity data of various examinations for different diseases are stored in the attribute fields of the physical examination item nodes. Disease hazard represents the degree of harm to health caused by a disease when left untreated, ranging from 0 to 1, with higher values indicating more severe harm. Acquisition method: Based on the Disability-Adjusted Life Years (DALYs) index from the Global Burden of Disease (GBD) study published by the World Health Organization (WHO), combined with disease mortality data, and normalized. The normalization method is: using the highest DALYs among all diseases included in the knowledge graph as the baseline value of 1.0, and other diseases are proportionally converted. For example, the disease hazard of lung cancer is 0.95. Early intervention value represents the benefit of early disease detection and intervention in terms of prognostic improvement compared to late detection, ranging from 0 to 1, with higher values indicating higher value of early intervention. Acquisition method: Calculated based on prognostic data of the same disease at different stages (early vs. late stages), using the following formula:
[0161] All three parameters are pre-stored in the knowledge graph and are updated periodically (quarterly) based on the latest medical literature through the knowledge update interface.
[0162] The project costs in the expense cost section are derived from price lists provided by cooperating medical institutions or local medical insurance pricing standards, and are stored in the cost attributes of the physical examination project nodes in the knowledge graph. The time cost is calculated as follows:
[0163] The unit time cost coefficient is set at 100 yuan / hour. This value is determined based on the average hourly wage calculated from the per capita disposable income of urban residents in China, as published by the National Bureau of Statistics (approximately 30 to 50 yuan). Considering the additional travel and waiting time required for physical examinations, a coefficient of approximately 2 is used as the comprehensive time opportunity cost, rounded to 100 yuan / hour. This coefficient can be adjusted in the system configuration according to the actual situation of the target user group.
[0164] The risk of side effects indicates the degree of potential physical harm to the user from the examination itself, ranging from 0 to 1. Acquisition method: Based on the invasiveness and radiation dose level of the examination type, and referring to the incidence rates of various adverse events reported in medical literature, a fixed risk grading value is set and stored in the attributes of the physical examination item node in the knowledge graph. The psychological burden of false positives indicates the anxiety caused to the user when the examination result is false positive, and the burden of subsequent unnecessary examinations. Acquisition method and calculation formula:
[0165] The false positive rate data were obtained from clinical research literature, and the psychological burden coefficient was fixed at 0.2 (according to patient psychology research, the anxiety caused by false positive results is about 20% of the confirmed disease).
[0166] Furthermore, the methods for determining the weighting coefficients include:
[0167] Step 1: Set Basic Weights. Basic weights are determined based on the following principles: health benefits are the primary goal of health checkup recommendations, and are given the highest weight; cost is an important consideration for users, and is given the second highest weight; potential risks need to be considered but are relatively controllable in routine health checkup scenarios, and are given a lower weight; historical continuity is used to ensure the completeness of annual health checkup tracking. The basic weights are set as follows: w1=0.4 (health benefits), w2=0.3 (cost), w3=0.2 (potential risks), w4=0.1 (historical continuity).
[0168] Step 2: Adjust weights based on user type. The system automatically identifies the user type based on the user's input information and adjusts the weights accordingly, as shown in Table 2.
[0169] Table 2 User Type Identification Rules and Corresponding Weights
[0170]
[0171] Where C_max is the cost normalization baseline value, which is the highest cost value among all current candidate solutions, used to normalize the cost item to the range of 0 to 1.
[0172] Step 3 (Optional): Feedback Optimization. After the system has been running for a period of time, based on user feedback data (including solution acceptance rate, user satisfaction rating, etc.), adjust the weight parameters of each user type through statistical analysis to make the recommendation results more in line with user preferences.
[0173] The candidate solutions are ranked according to their comprehensive scores, and the solution with the highest score is selected as the recommended result.
[0174] For example, the explainable report includes: explaining the reasons for the recommendation to ordinary users using plain language; explaining the basis for the recommendation to medical professionals using professional terminology and evidence-based medicine; demonstrating the AI reasoning path and decision-making process; and supporting users to further inquire about the details of the recommendation through natural language question answering.
[0175] Furthermore, the interpretable report also includes a comprehensive scoring system:
[0176] The scoring system generates multi-dimensional scores for each recommended item, including medical necessity, risk of missed detection, reasonable cost, and credibility of inference. Dynamic weighting adjusts the weights of each scoring dimension based on user profiles. Visualization displays the multi-dimensional scoring results using radar charts or other visualization methods. Medical necessity measures the degree of necessity for recommending the examination from a medical perspective, and the formula is as follows:
[0177]
[0178] The base score is determined based on the level of evidence upon which the recommendation is based, with the following scoring rules: Level A evidence is 90 points, Level B evidence is 70 points, and Level C evidence is 50 points. Evidence level information is stored in the knowledge graph within the evidence strength relationship (EVIDENCE edge) between the medical examination items and the basis for the recommendation.
[0179] Risk matching score (0 to 10 points): Determined based on the number of matches between the user's risk factors and the indications for this project. Matching judgment is based on whether there are related edges between the user's risk factor nodes and the physical examination item nodes in the knowledge graph. 2 points are added for each matched risk factor, with a maximum of 10 points. For example, the indications for LDCT include "smoking," "age 40-75 years," and "family history of lung cancer." If the user matches "smoking" (+2), "age" (+2), and "family history" (+2), the risk matching score is 6 points.
[0180] Guideline Recommendation Strength (0 to 10 points): Determined based on the strength of recommendation for this examination according to medical guidelines. Strongly recommended is 10 points, recommended is 5 points, and optional is 0 points. This information is stored in the evidence strength relation attribute of the knowledge graph.
[0181] Example: LDCT medical necessity score for a 45-year-old smoker = min(90 + 6 + 10, 100) = min(106, 100) = 100 points.
[0182] The risk of missed diagnosis measures the degree of risk of missing a target disease if the test is not performed. A higher score indicates a greater risk of missed diagnosis if the test is not performed, meaning the test is more necessary. Specifically, it includes:
[0183] Step 1: Query the incidence rate of the target disease for this test within the user's population. Incidence rate data is retrieved from epidemiological literature based on the user's age, gender, and risk factors, and stored in the disease node attributes of the knowledge graph. For example, the annual incidence rate of lung cancer in a 45-year-old male smoker is approximately 0.08% (i.e., 0.0008).
[0184] Step 2: Calculate the probability of missed detection = Incidence rate of the target disease × (1 - Detection sensitivity of the test item).
[0185] Step 3: Calculate the consequences of missed detection = probability of missed detection × severity of disease.
[0186] Step 4: Map the consequences of missed detections to a score range of 0 to 100 using a logarithmic normalization function. The normalization formula is:
[0187]
[0188] The design of this logarithmic normalization function ensures that the score approaches below 50 points (low risk) when the consequences of missed detection are extremely small, and approaches 100 points (high risk) when the consequences of missed detection are large, thus avoiding the extreme value problem that may be caused by linear mapping.
[0189] Example: Calculation of the risk score for missed detection in LDCT for a 45-year-old smoker:
[0190] The probability of a missed detection is 0.0008 × (1 - 0.85) = 0.00012
[0191] Consequence of missed detection = 0.00012 × 0.95 = 0.000114
[0192] Score = min(100, max(0, 50 + 50 × log) 10 (0.000114 × 10000 + 1) / 4)) =min(100, max(0, 50 + 50 × log 10 (2.14) / 4)) = min(100, max(0, 50 + 50 × 0.330 / 4)) ≈ 54 points
[0193] Note: In this example, because the user is "double high risk" (smoking + family history), the actual incidence rate, after being adjusted for high-risk groups, is much higher than 0.08%, and the corresponding missed detection risk score can reach 95 points.
[0194] Cost reasonableness measures whether the cost of the examination items is reasonable in ratio to the expected health benefits. A higher score indicates better cost-effectiveness. Calculation method:
[0195] Step 1: Calculate the expected health benefit = detection rate × disease severity × early intervention value (the parameter source is the same as the health benefit H(x) in the comprehensive scoring formula).
[0196] Step 2: Calculate the cost per unit of revenue = Project cost ÷ (Expected health benefit + 0.01). Adding 0.01 to the denominator is to avoid the error of dividing by zero when the expected health benefit is 0.
[0197] Step 3: Map the cost to a score using an inverse proportional function:
[0198]
[0199] Where K is the cost per unit of revenue, and B is the benchmark value (set to 1000). This function ensures that: when the cost per unit of revenue is much less than the benchmark value (i.e., high cost-effectiveness), the score approaches 100 points; when the cost is much greater than the benchmark value (i.e., low cost-effectiveness), the score approaches 0 points.
[0200] Example: Calculation of the reasonableness score for LDCT (300 yuan):
[0201] Expected health benefits = 0.85 × 0.95 × 0.90 = 0.728
[0202] The revenue cost per unit is K = 300 ÷ 0.728 = 412 yuan.
[0203] Score = 100 × 1000 ÷ (412 + 1000) = 100 × 1000 / 1412 ≈ 71 points.
[0204] Reasoning credibility measures the reliability of the recommendation conclusion and is obtained by summing three sub-items:
[0205]
[0206] The strength of evidence (0 to 40 points) is scored based on the number and type of studies cited in the recommendation. The scoring rules are as follows: 5 points are added for each cited study, up to a maximum of 20 points; an additional 10 points are added if the cited studies include randomized controlled trials (RCTs); and an additional 10 points are added if a meta-analysis (systematic review) is included. Research citation information is extracted from the recommendation text.
[0207] Reasoning Completeness (0 to 30 points): Check whether the recommendation reason contains the following three elements, adding 10 points for each element included. The three elements are: (1) User risk factor analysis (e.g., "20 pack-years of smoking"); (2) Reference to medical guidelines (e.g., "2023 Guidelines for Lung Cancer Screening"); (3) Description of expected effects (e.g., "20% reduction in mortality"). The detection method is to determine the existence of each element by keyword matching in the recommendation reason text.
[0208] Model confidence score (0 to 30): Calculated by multiplying the confidence score of the large language model output by 30. The confidence score is obtained by averaging the log-probability (logprob) values output by the large language model using an exponential function, ranging from 0 to 1. If the model interface does not provide logprob information, the default confidence score of 0.8 is used.
[0209] Example: Calculation of the reasoning credibility score recommended by LDCT:
[0210] Strength of evidence: Citation of NLST study (+5) + Citation of NELSON study (+5) + Citation of NEJM 2023 (+5) + Including RCT (+10) = 25 points
[0211] Reasoning completeness: Mentioning "20 pack-years of smoking" (+10) + Citing "Lung Cancer Screening Guidelines 2023" (+10) + Explaining "20% reduction in mortality" (+10) = 30 points
[0212] Model confidence score: GPT-4 output confidence score 0.91 × 30 = 27.3 points
[0213] Total score = 25 + 30 + 27.3 = 82.3 points, rounded to 82 points.
[0214] After the scores across the four dimensions are calculated, a weighted sum is taken to obtain the overall score for the recommended item. The weights of each dimension are dynamically adjusted based on the user type, as shown in Table 3.
[0215] Table 3. Schematic diagram of the comprehensive score weights for each user type
[0216]
[0217] The rating results across the four dimensions are visualized using a radar chart, allowing users to intuitively understand the performance of each recommended item in each dimension.
[0218] In another exemplary embodiment, based on the same inventive concept as the method embodiment, an intelligent physical examination recommendation system based on constraint awareness and a large language model is provided, including:
[0219] The user interface module is used to obtain health information input by the user.
[0220] The medical knowledge extraction module is used to retrieve medical knowledge related to the user's health information from a medical knowledge base;
[0221] The recommendation scheme generation module is used to inject the medical knowledge into the input prompts of the generative large language model, and generate a physical examination item recommendation scheme that meets the medical constraints based on the input prompts; the medical constraints include at least mutual exclusion constraints, temporal constraints, conditional constraints and historical tracking constraints, and the historical tracking constraints include the constraint that historical abnormal items must be reviewed.
[0222] The multi-validation module is used to perform multiple validations on the recommended scheme. The multiple validations include rule hard constraint checks, logical consistency verification, and expert review.
[0223] The recommendation output module is used to generate an interpretable report containing explanations of the recommendation basis based on the validated recommendation scheme, and to display the recommendation results and the interpretive report to the user.
[0224] The medical knowledge extraction module includes:
[0225] The information parsing module is used to call a generative large language model to parse user input and extract structured health information;
[0226] The knowledge graph management module is used to store and manage medical knowledge such as physical examination items, disease risks, and medical guidelines. This medical knowledge is organized and stored in a graph structure.
[0227] The knowledge graph management module includes:
[0228] A graph database is used to store nodes for physical examination items, disease nodes, guideline nodes, and the relationships between them.
[0229] The relationship manager is used to maintain and update collaborative enhancement relationships, temporal dependencies, and evidence strength relationships between nodes.
[0230] The knowledge update interface is used to regularly synchronize the latest medical guidelines and research findings, and update the weights and evidence levels of the knowledge graph.
[0231] The recommendation scheme generation module includes:
[0232] The knowledge reasoning module is used to perform reasoning based on user information in the knowledge graph and extract relevant medical knowledge and constraints.
[0233] The Prompt building block is used to organize medical knowledge and constraints into input prompts for a generative large language model in a hierarchical structure.
[0234] The large model invocation module is used to invoke generative large language models for inference and generate recommendation schemes. It supports calling cloud API models, including at least one of the GPT series, Claude series, and Qwen series; it also supports calling locally deployed open source models, including at least one of the Llama series and Qwen open source versions; and it provides a unified calling interface to achieve seamless switching between different models.
[0235] The knowledge reasoning module includes:
[0236] Lightweight graph neural networks, including 2 to 3 layers of graph attention networks, are used for reasoning on local subgraphs of knowledge graphs;
[0237] Node locator is used to locate relevant nodes in a knowledge graph based on user characteristics;
[0238] A subgraph extractor is used to extract the N-hop neighborhood subgraph of related nodes;
[0239] A relation extractor is used to extract cooperative and constraint relationships from the inference results of a graph neural network.
[0240] The Prompt building module includes:
[0241] A constraint extractor is used to extract hard constraints from knowledge reasoning results and convert them into formal rule expressions;
[0242] A knowledge compressor for semantic clustering and summary compression of medical knowledge;
[0243] The template manager is used to manage and maintain the Prompt templates for the constraint layer, knowledge layer, and example layer.
[0244] A dynamic assembler is used to dynamically assemble a three-layer Prompt structure based on user needs.
[0245] In this embodiment, the multi-factor authentication module includes:
[0246] The rule checking engine is used to perform blacklist checks, age restriction checks, and mutual exclusion checks.
[0247] The logic verification engine is used to perform structured verification, constraint consistency verification, and inference consistency verification.
[0248] The expert review scheduler is used to determine whether human expert review is required and to transfer high-risk recommendations to the human review process.
[0249] An audit logger is used to record all verification processes and results, supporting post-audit.
[0250] For example, the recommendation output module includes:
[0251] The concise layer is used to explain the reasons for the recommendation to ordinary users in plain language;
[0252] In the medical field, it is used to explain the basis of recommendations to healthcare professionals using professional terminology and evidence-based medicine.
[0253] The technical layer is used to demonstrate the AI reasoning path and decision-making process;
[0254] In the interaction layer, users can further inquire about recommendation details through natural language question answering.
[0255] Based on the above methods and systems, two specific examples are given:
[0256] Example 1: Lung cancer screening recommendations for a 45-year-old male smoker, demonstrating the complete application of the method of the present invention in a high-risk population screening scenario.
[0257] Step 1: User input
[0258] The user inputs a natural language description through the system interface: "I am a 45-year-old male, and have been smoking for 20 years, averaging one pack a day. I've had a cough for the past two weeks, occasionally coughing up a little phlegm, and sometimes I feel a bit short of breath when climbing stairs. My father had lung cancer when he was 60, so I'm quite worried. My budget is around 5000 yuan."
[0259] Step 2: Intelligent Analysis of User Information
[0260] The system calls the large language model (GPT-4 in this embodiment) and inputs a parsing prompt. The parsing prompt includes: a role setting section "You are a professional medical information analysis assistant, skilled at extracting structured health information from natural language descriptions"; a task section requiring the extraction of key health information from user descriptions; and an output specification section requiring strict adherence to JSON format.
[0261] The model outputs structured JSON: Basic information includes age 45, gender male, budget 5000 yuan; risk factors include smoking, described in detail as an average of one pack a day for 20 years; symptoms include mild cough lasting for two weeks, mild intermittent sputum production, and mild shortness of breath occurring during activity; family history includes father's history of lung cancer; special request is concern about lung cancer and a desire for targeted examination.
[0262] Step 3: Knowledge Graph Query and Lightweight GNN Inference
[0263] 3.1 Relevant Node Location. The system calculates user feature vectors based on the parsing results: age 45, male (1), smoking pack-years (20 x 1 = 20), family history of lung cancer (1), and respiratory symptoms (1). Similarity is calculated in the knowledge graph to locate the Top-20 relevant items. Relevant nodes, sorted by similarity, include: low-dose spiral CT (0.94), tumor marker detection (0.82), pulmonary function test (0.76), chest X-ray (0.65), sputum cytology (0.58), bronchoscopy (0.45), complete blood count (0.38), and electrocardiogram (0.35).
[0264] 3.2 Local Graph Extraction. Two-hop neighborhoods of relevant nodes were extracted to construct a subgraph. The subgraph contains 8 nodes: LDCT, tumor markers, pulmonary function, X-ray, sputum examination, complete blood count, electrocardiogram, and bronchoscopy. Edge relationships include: a synergistic enhancement relationship between LDCT and tumor markers (labeled as an 18% increase in sensitivity); a temporal dependency relationship between tumor markers and LDCT (labeled as a before interval of 1 to 3 days); a mutually exclusive relationship between LDCT and pregnancy; Level A evidence supporting tumor markers for high-risk smoking populations; a complementary relationship between pulmonary function and LDCT; X-ray has 30% lower sensitivity than LDCT; and bronchoscopy is a high-risk invasive procedure requiring expert review.
[0265] 3.3 Two-layer GAT inference. The input of the first layer of GAT inference is user features plus initial node embedding. Attention weights are calculated for the LDCT node and user features: the score for user smoking characteristic and LDCT indication smoking is 0.95, the score for user age and LDCT age range is 0.88, and the score for user family history and LDCT family risk is 0.92. After weighted averaging, the LDCT activation value is 0.92. LDCT's neighbor nodes include tumor markers, lung function, and X-ray, with attention weights of 0.65, 0.28, and 0.07 respectively, based on synergistic effect strength. After aggregating neighbor information, the first layer output node activation values are: LDCT 0.92, tumor markers 0.78, lung function 0.65, X-ray 0.45, and blood routine 0.32.
[0266] The second-layer GAT inference captures a wider range of relational patterns. The two-hop neighborhood of the LDCT node includes tumor markers, pulmonary function, electrocardiogram, and complete blood count. Identifying synergistic relationships reveals a synergistic enhancement relationship between LDCT and tumor markers, increasing sensitivity by 18%. Identifying temporal constraints reveals that tumor markers should be administered 1 to 3 days prior to LDCT. The second-layer aggregation considers both constraints and synergistic effects.
[0267] 3.4 Structured reasoning results. The output JSON includes: a list of primary risks, including a high-risk lung cancer score of 0.92 (evidence: 20 pack-years of smoking, family history, age 45+, guideline: Lung Cancer Screening Guidelines 2023); a chronic obstructive pulmonary disease (COPD) risk score of 0.68 (evidence: long-term smoking, respiratory symptoms); a list of recommended items, including a low-dose spiral CT score of 0.92 (evidence level A, reason: 20 pack-years or more of smoking, age 40-75+, family history, meeting the strong recommendation guidelines, cost 300 RMB, source: Lung Cancer Screening Guidelines 2023 and NLST study); a tumor marker combination score of 0.78 (evidence level B, reason: combined LDCT can improve sensitivity by 18%, cost 200 RMB, source: NEJM 2023); a pulmonary function test score of 0.65 (evidence level B, reason: assessing COPD risk with respiratory symptoms, cost 150 RMB); and a complete blood count score of 0.32 (evidence level C, reason: basic examination to exclude infection, cost 50 RMB); and a list of synergistic relationships, including the synergistic effect of LDCT and tumor markers, showing an 18% increase in sensitivity for early lung cancer detection (evidence: NEJM). The 2023 sample size was 5000, with a level of evidence of A. The time constraint list included tumor markers 1 to 3 days before LDCT to avoid excessive anxiety when suspicious nodules are found on imaging. The exclusion list included bronchoscopy because it is an invasive examination and not the first choice for initial screening, and chest X-ray because its sensitivity is about 30% lower than LDCT and better options are available.
[0268] Step 4: Building the Knowledge-Enhancing Prompt
[0269] 4.1 Constraint Extraction and Formalization. Constraints are extracted from the inference results. The mutual exclusion constraint is that the user has no contraindications such as contrast agent allergy. The temporal constraint is that the tumor marker MUST_BEFORE LDCT interval is 1 to 3 days to avoid anxiety caused by false positive images. The conditional constraint is that there are no special contraindications. The budget constraint is that the sum of costs (SUM) is less than or equal to 5000 multiplied by 1.2, which equals 6000 yuan.
[0270] 4.2 Knowledge Compression. The original knowledge comes from a knowledge graph: "The 2023 Guidelines for Lung Cancer Screening (published by the Chinese Society of Oncology) strongly recommend (Level A evidence) annual low-dose spiral CT screening for high-risk individuals (defined as: age 40 to 75 years, smoking index greater than or equal to 20 pack-years, or a family history of lung cancer, or occupational exposure such as asbestos, radon, etc.). This recommendation is based on several large randomized controlled trials, including the NLST study (National Cancer Institute, sample size 53,454), which showed that compared to chest X-ray, LDCT screening can reduce lung cancer mortality by 20% (95% confidence interval: 6.8% to 26.7%, P value equal to 0.004). The NELSON study (European multicenter, sample size 15,792) also confirmed a similar effect (24% reduction in mortality). Recent studies (NEJM)..." (2023) indicates that LDCT combined with serum tumor markers (CEA, CYFRA21-1) can further improve the sensitivity of early detection by 18% (sample size 5000, P value <0.01).
[0271] Compression reduces tokens by 70%: "[Level A Evidence - Strong Recommendation] Annual LDCT screening is recommended for smokers with 20 pack-years or more, aged 40 to 75 years, and with a family history. Effect: Reduces lung cancer mortality by 20-24% (NLST and NELSON studies, sample size over 68,000). Synergistic enhancement: LDCT plus tumor markers increase sensitivity by 18% (NEJM 2023)."
[0272] 4.3 Three-layer Prompt Construction. A complete Prompt includes the following: Layer 1: Constraints (Hard Constraints): "You must strictly adhere to the following rules and must not violate them." Temporal Constraints: "If tumor markers and LDCT are recommended simultaneously, tumor markers must be prioritized with an interval of 1 to 3 days to avoid excessive anxiety caused by suspicious nodules found on CT." Budget Constraints: "The user's budget is 5000 yuan, but can exceed it by up to 20%, i.e., 6000 yuan." Contraindications: "In this case, the user has no specific contraindications. General rules include prohibiting LDCT for pregnant women and not recommending lung cancer screening for individuals under 40 years of age unless it is high-risk." Layer 2: Knowledge (Medical Knowledge). The reference section includes a Level A strong recommendation for lung cancer screening. The user fully meets the eligibility criteria: smoking ≥20 pack-years, age 40-75 years, and family history. The recommended annual LDCT screening effect is a 20-24% reduction in lung cancer mortality. Evidence comes from the NLST study (sample size 53,454) and the NELSON study (sample size 15,792). The guideline is the "Lung Cancer Screening Guidelines 2023" published by the Chinese Medical Association. The synergistic enhancement regimen, combining LDCT with serum tumor markers CEA and CYFRA21-1, shows a synergistic effect of increasing early detection sensitivity by 18%. Evidence comes from the NEJM. For the 2023 sample size of 5000, with a p-value less than 0.01, the recommended timeline is: biomarkers first, followed by LDCT, with an interval of 1 to 3 days. The recommended pulmonary function test (Level B evidence) is indicated for long-term smokers with respiratory symptoms such as shortness of breath and cough, and aims to assess COPD risk. The tests include FEV1, FVC, and the FEV1 / FVC ratio, costing approximately 150 RMB. Basic tests include a complete blood count (excluding infection and anemia), costing 50 RMB, and an electrocardiogram (ECG) for cardiovascular risk assessment in smokers, costing 30 RMB. Not recommended tests include chest X-ray (sensitivity is approximately 30% lower than LDCT, with better options available) and bronchoscopy (invasive procedure, not the first choice for initial screening). The third example layer, the Few-shot guided section, includes a case of a 50-year-old male with 25 years of smoking history and no family history. LDCT is recommended as Level A evidence (high risk of smoking), and pulmonary function tests are Level B evidence (long-term smoking). Tumor markers are not recommended due to the lack of a family history. The reason for the low cost-effectiveness is that the smoking history meets the strong recommendation, but the lack of family history reduces the necessity of combined screening. The characteristics of this case indicate that the user has both a family history and a smoking history, which are high-risk, making combined screening highly valuable. The task instruction section states that, based on the above knowledge and constraints, a physical examination plan should be recommended for the following user. The user information is in JSON format, and the reasoning steps must be reflected in the output: Step 1: Risk analysis to identify the user's main health risks; Step 2: Item matching to recommend items based on the knowledge layer; Step 3: Constraint check to verify whether the recommended plan violates the constraint layer rules; Step 4: Collaborative optimization to consider the synergistic effects and time constraints between items; Step 5: Cost assessment to evaluate the reasonableness of the cost and provide a tiered plan basis, standard, and comprehensiveness. The output format requires that the JSON include a risk analysis field, a recommended plan list field including plan name, item list, total cost, synergistic effect list, and time order, and a simple explanation field.
[0273] Step 5: Large Model Inference Generation
[0274] The GPT-4 temperature was set to 0.7, and the Top-p value was 0.95. The model output JSON included: Risk analysis: "You belong to a high-risk group for lung cancer. Major risk factors include: smoking for 20 pack-years, exceeding the guideline definition of high-risk; a father's history of lung cancer, increasing the risk by 2 to 3 times; age 45, placing you in the high-incidence age group for lung cancer; and mild respiratory symptoms such as cough and shortness of breath, which require attention. Overall risk score: High risk 92 out of 100. Targeted screening is strongly recommended according to the 'Lung Cancer Screening Guidelines 2023'."; Recommended screening options included standard screening protocols, with recommended items including serum tumor marker tests CEA and CYFRA21-1. Evidence level: B. The rationale is that combining LDCT with LDCT can improve sensitivity by 18% in the initial assessment of lung cancer risk. It is recommended to prioritize LDCT and perform a CT scan 1 to 3 days later to avoid over-excitation when suspicious nodules are detected on imaging. Considering the cost of 200 yuan, the priority recommendation time is Day 1. Low-dose spiral CT, evidence level A, is the gold standard for lung cancer screening. You fully meet the strong recommendation criteria. Level A evidence can reduce lung cancer mortality by 20% to 24%, making it the most effective early screening method currently available. Cost 300 yuan, priority required, time is Day 3 to 4. After the biomarker results are available, lung function tests FEV1 and FVC, evidence level B, are recommended because long-term smoking may lead to COPD. You have shortness of breath symptoms, so a lung function assessment is recommended. Cost 150 yuan, priority recommended time is Day 1. Simultaneously with biomarkers, a complete blood count, evidence level C, is recommended because it's a basic test to rule out infection or inflammation. Cost 50 yuan, priority optional time is Day 1; Total cost 700 yuan; Synergistic effect list includes tumor markers plus LDCT, sensitivity increased by 18%. Source: NEJM 2023 sample size 5000, comprehensive assessment of lung health including pulmonary function and LDCT, cancer screening plus functional assessment; time sequence: Day 1 biomarkers plus pulmonary function plus blood routine, then Days 3-4 LDCT and other biomarker results. Basic economical plan includes LDCT only, evidence level A, because LDCT alone is the gold standard for lung cancer screening; if budget is tight, only this item can be done, costing 300 yuan, priority required, total cost 300 yuan, synergistic effect is empty, time sequence can be done at any time. Comprehensive plan includes all items of the standard plan plus ECG, evidence level C, because smokers have increased cardiovascular risk, recommended basic assessment cost 30 yuan, priority. The optional total cost is 730 yuan. The synergistic effect and timing are the same as the standard plan. In simpler terms, "You are a high-risk individual due to long-term smoking and a family history of lung cancer. According to the national authoritative guidelines (Level A), a low-dose CT scan of the lungs is strongly recommended annually. This can detect tumors when they are still very small, with a cure rate of over 80%. Combining this with blood biomarker testing can further improve detection accuracy by 18%. It is recommended to do the biomarker test first; only 3 days after the blood draw, do the CT scan. If the biomarkers are normal, you will feel more at ease; if abnormal, the CT scan will be more targeted. The entire plan costs 700 yuan, which is very cost-effective within your budget."
[0275] Step 6: Multi-objective weighted optimization
[0276] Calculate the objective function value for each scheme.
[0277] Option 1, the standard screening protocol, has the following health benefits: H = LDCT detection rate 0.85 × Lung cancer hazard 0.95 × Early intervention value 0.90 + Biomarker detection rate 0.72 × Hazard 0.95 × Intervention value 0.75 + Lung function 0.68 × COPD hazard 0.70 × Intervention value 0.65 = 0.728 + 0.513 + 0.309 = 1.550. Cost C = 700 yuan project cost + 2 hours × 100 yuan / hour time cost = 900 yuan. Potential risk R = LDCT radiation risk 0.3 + Biomarker false positive 0.15 + Non-invasive lung function 0.05 = 0.50. The user type is health-priority, with weights w1 = 0.6, w2 = 0.2, and w3 = 0.2. Overall score = 0.6 × 1.550 - 0.2 × 900 / 1000 - 0.2 ×0.50 = 0.930 - 0.180 - 0.100 = 0.650.
[0278] Scheme 2 (basic scheme): H = 0.728, C = 300 + 0.5 hours × 100 = 350 yuan, R = 0.30, Score = 0.6 × 0.728 - 0.2 × 350 / 1000 - 0.2 × 0.30 = 0.437 - 0.070 - 0.060 = 0.307.
[0279] Option 3 (Comprehensive Plan): H = Standard Plan 1.550 + Cardiovascular Risk Assessment (ECG + Blood Lipids) 0.15 + Metabolic Risk Assessment (Liver and Kidney Function) 0.08 + Thyroid Function Assessment 0.05 + Abdominal Organ Screening (Ultrasound) 0.07 = 1.850, C = Standard Plan 900 + ECG 30 + Thyroid Function 180 + Blood Lipid Panel 60 + Liver and Kidney Function 80 + Abdominal Ultrasound 150 + Increased Time Cost 50 = 1350 yuan, R = Standard Plan 0.50 + Ultrasound Examination 0.05 = 0.55. Note that C_max should be adjusted to 1500 to accommodate a wider cost range. Score = 0.6 × 1.850 - 0.2 × 1350 / 1500 - 0.2 × 0.55 = 1.110 - 0.180 - 0.110 = 0.820. After correction, using C_max = 1000 for normalization, Score = 0.6 × 1.850 - 0.2 × 1.35 - 0.2 × 0.55 = 1.110 - 0.270 - 0.110 = 0.730.
[0280] Based on the overall scores of users prioritizing health, the scores are as follows: Comprehensive Plan Score = 0.730 (highest), Standard Plan Score = 0.650, and Basic Plan Score = 0.307. Although the Comprehensive Plan has the highest score of 0.730, it is only 0.08 points lower than the Standard Plan. From a cost-effectiveness perspective: upgrading from the Standard Plan to the Comprehensive Plan increases the cost by 400 yuan (a 57% increase), increases health benefits by 0.30 yuan (a 19% increase), and increases the overall score by 0.08 (a 12% increase). Each additional 100 yuan brings a health benefit of 0.30 ÷ 4 = 0.075, while the Standard Plan's health benefit per 100 yuan is 1.550 ÷ 7 = 0.221. The Standard Plan's cost-effectiveness of 0.221 is significantly better than the Comprehensive Plan's marginal benefit of 0.075. Therefore, the Standard Plan is ultimately recommended, balancing health benefits and cost for optimal cost-effectiveness.
[0281] Step 7: Explainability Scoring and Presentation
[0282] The comprehensive score for LDCT, a core component of the standard protocol, is calculated as follows: Medical necessity (base score A = 90) + risk matching (10) + guideline strength (10) = 110, normalized to 100. Risk of missed detection (0.0008) multiplied by hazard (0.95) multiplied by 1 minus LDCT sensitivity (0.85) equals 0.000114, normalized to 95. High-risk groups without LDCT have an extremely high risk of missed detection. Cost justification (100 - 300) divided by 0.728 multiplied by 1000 multiplied by 100 equals 100 - 41 equals 59. After adjustment, the score is 78, considering it's the gold standard test. Reasonableness of inference (40) + completeness of inference (28) + model confidence (27) equals 95. The four-dimensional radar chart data shows: Medical necessity 100, risk of missed detection 95, cost justification 78, and reasoning reliability 95.
[0283] A four-layer explanation is generated. Layer 1, a concise explanation for the user: "Recommendation reason: You have a 20-year smoking history and your father has had lung cancer, placing you in a high-risk group for lung cancer, with a risk level 5 to 10 times higher than the average person. According to authoritative national medical guidelines, it is strongly recommended that you have a low-dose CT scan of your lungs once a year. This examination is currently the most reliable early lung cancer screening method, capable of detecting tumors when they are still very small, at 1 to 2 centimeters. At this stage, the treatment effect is best, with a cure rate of over 80%. If you wait until there are obvious symptoms before getting checked, it is often already in the middle or late stages, making treatment much more difficult. Combining this with blood tumor marker testing can further improve the accuracy by 18%. It is recommended to have the blood test done first for the markers, with results available on the same day, followed by the CT scan 3 days later. This arrangement is more scientific and reduces anxiety. The entire program costs 700 yuan, the examination process is safe and painless, and the radiation dose is very low, equivalent to taking 10 airplane flights, making it very worthwhile."
[0284] Level 2 Medical Perspective for Healthcare Professionals: "Clinical Basis: The patient's smoking index is 400 pack-years (20 years x 20 cigarettes per day), age 45, and a family history of lung cancer in a first-degree relative. This meets the definition of high-risk individuals in the 'Lung Cancer Screening Guidelines 2023' issued by the Chinese Medical Association Oncology Branch: a smoking index greater than or equal to 20 pack-years, age 40 to 75 years, and a family history of lung cancer in a first-degree relative. Recommendation Strength: Grade A, Strong Recommendation. Evidence-Based Medicine: The NLST study (sample size 53,454, NEJM 2011) showed a 20% reduction in lung cancer mortality with LDCT compared to chest X-ray, with a relative risk of 0.80, a confidence interval of 0.73 to 0.93, and a p-value of 0.004. The NELSON study (sample size 15,792, NEJM 2010) showed a 24% reduction in mortality at 2010 follow-up, with 33% of men and women..." In 2023, the sensitivity of LDCT combined with serum biomarkers CEA and CYFRA21-1 for early detection increased by 18% with a sample size of 5000 and a p-value of less than 0.01. Recommended supplementary tests: Lung function tests (FEV1 and FVC) are necessary for patients with shortness of breath after activity, long-term smoking, and COPD risk assessment (Level B recommendation). The recommended timeline is biomarker D1 followed by LDCT D3-4 to avoid imaging anxiety and improve patient compliance by 30% (data from a tertiary hospital). Follow-up recommendations: If LDCT is negative, repeat annually. If nodules are found, the follow-up interval is determined according to the Lung-RADS classification, ranging from 3 to 12 months. Smoking cessation is strongly recommended, reducing the risk of lung cancer by 50%.
[0285] Level 3 Technical Layer Reasoning Process: "AI Reasoning Path Tracing: Step 1 User Feature Extraction Input Natural Language Description Large Model Parsing Converted to JSON Structured Key Features age equals 45 smoking_pack_years equals 20 family_history equals True; Step 2 Knowledge Graph Query Feature Vector Encoding 11-Dimensional Similarity Calculation Cosine Distance Top-K Nodes LDCT is 0.94, Marker is 0.82, Lung Function is 0.76; Step 3 GNN Reasoning Layer 1 GAT Aggregation 1-hop Neighborhood LDCT Activation Value 0.92 Detected Synergistic Relationship LDCT Bidirectional Arrow Marker synergy equals 18% Increase Layer 2 GAT Aggregation 2-hop Neighborhood Discovery Temporal Constraint Marker BEFORE LDCT 1 to 3 Days Discovered Exclusion Item X-ray Sensitivity is 30% lower than LDCT; Step 4 Constraint Extraction Temporal Constraint Marker Priority Budget Constraint 5000 Yuan Contraindications Examination None; Step 5 Prompt Construction Three-Layer Structure Constraint Layer Plus Knowledge Layer Plus Example Layer Token Number 1850 Compressed Injection Knowledge 3 Level A Evidence 2 Level B Evidence; Step The model generates 6 models: GPT-4 temperature 0.7 inference steps, risk analysis, project matching, collaborative optimization, and solution generation. Outputs 3 hierarchical solutions; Step 7: Multi-objective optimization objective function H: health minus C, cost minus R, risk weights w1 equals 0.6, w2 equals 0.2, w3 equals 0.2, health-priority optimal solution, standard solution, score equals 0.650; Step 8: Safety verification: first rule check passed, second logic check passed, third expert review not triggered, cost less than 5000, non-invasive check; Step 9: Result output recommended solution, standard screening solution, total cost 700 yuan, expected health benefit H equals 1.550 (high).
[0286] The fourth layer of the interactive system supports Q&A. A user asks, "Why do we need to do tumor markers before a CT scan?" The system answers, "This is an optimized arrangement based on patient psychology. If a CT scan reveals suspicious nodules in the lungs first, about 10-20% of people will only find small nodules, and you will be very anxious while waiting for the marker results. Doing the markers first only requires blood tests and results are available on the same day: if the markers are normal, you will feel more at ease during the CT scan; if the markers are abnormal, you will be mentally prepared, and the doctor will examine specific areas more carefully. Studies show that this arrangement can reduce patient anxiety by 30% (source: a patient survey of 500 patients from a top-tier hospital). The medical effect is the same, but the experience is better." Another user asks, "Can I only do a CT scan without the markers? Will it affect the results?" The system answers, "Yes, a CT scan alone is already the gold standard for lung cancer screening (Level A evidence). Not doing markers will not result in missed diagnoses. The role of markers is to enhance the results, increasing sensitivity by 18%, but it is not necessary. If you are on a tight budget, you can do only a CT scan." The initial cost is 300 yuan. However, considering your family history, combined testing offers better value for money; spending an extra 200 yuan to improve accuracy by 18% is equivalent to paying 200 yuan for insurance. For ordinary people without a family history, a single CT scan is sufficient. The user asked, "Will the radiation from a CT scan be harmful to my health?" The system replied, "The radiation dose of a low-dose spiral CT scan is very low, about 1 to 2 millisieverts, equivalent to the radiation from 10 to 20 airplane flights, the background radiation from the natural environment for 3 to 6 months, and one-fifth to one-tenth of that from a regular CT scan. Research by the American College of Radiology shows that this dose does not increase the risk of cancer. The harm of lung cancer far outweighs this amount of radiation. Without screening, the incidence of lung cancer in high-risk groups within 10 years is about 2 to 4%, with a very high mortality rate. Weighing the pros and cons: the benefits of screening—early detection and improved cure rates—far outweigh the minimal risk of radiation. This is why global medical guidelines strongly recommend LDCT screening for high-risk groups."
[0287] Step 8: Security Verification
[0288] First-level hard constraint check. Checking the blacklist: If the user is pregnant and the recommendation includes LDCT or X-ray, an error is returned (violating contraindications; pregnant women are prohibited from radiation examinations). In this case, the user is not pregnant and passed. Checking age restrictions: If the user is under 40 years old and the recommendation includes LDCT lung cancer screening, a warning is returned (age under 40 is not recommended unless extremely high risk). In this case, the user is 45 years old and passed. Checking mutual exclusion: If the recommendation includes enhanced CT and the user is allergic to contrast agents, an error is returned (contrast agent allergy prohibits enhanced CT). In this case, there was no conflict and it passed. Result: First-level validation passed.
[0289] The second layer of logical consistency verification includes: Structured verification checks if the output format conforms to the predefined data structure specifications. Required fields include `risk_analysis`, `recommended_plans`, and `explanation`. If any field is missing, an error indicating a missing field is returned. In this example, the structure is complete and passes. Constraint consistency verification checks if the recommended plan meets time and budget constraints. If the recommendation includes both markers and LDCT, the marker timing is set to day 1, and the LDCT timing to days 3-4. If the time order is not met, an error indicating a violation of the time constraint is returned. In this example, the marker is before the LDCT, which passes. If the total cost of the plan exceeds the user's budget by 1.2, an error indicating budget overrun is returned. In this example, 700 yuan is less than 6000 yuan, which passes. Inference consistency verification uses an NLI model to check if the recommendation rationale matches the item in each item of the recommended plan. If the entailment score is less than 0.7, a warning indicating insufficient recommendation rationale is returned. In this example, all entailments are greater than 0.85, which passes. The result is that the second layer of verification passes.
[0290] The third layer of expert review triggers the following checks: **High Cost:** If the recommended total cost exceeds 5000, return true; in this example, 700 yuan is less than 5000, so it doesn't trigger. **Invasive Procedures:** If the recommendation includes gastroscopy, colonoscopy, bronchoscopy, or biopsy, return true; in this example, no invasive procedures are involved, so it doesn't trigger. **High-Risk User:** If the user is under 18 years old, or if the user's condition is marked as "is_pregnant" or "severe_disease," return true; in this example, no serious illness is present, so it doesn't trigger. **Low Confidence:** If the confidence level is less than 0.8, return true; in this example, the confidence level is 0.91, so it doesn't trigger. The result is that the expert review is not triggered, and the recommendation is approved directly. The final safety verification result shows that all three layers of verification passed, indicating the recommended plan is safe and reliable.
[0291] Step 9: Final Output
[0292] The system displays the following recommended report to the user: The title of the intelligent health checkup recommended report; your health risk assessment section includes a high-risk level (92 points out of 100), with primary risks of lung cancer and chronic obstructive pulmonary disease (COPD). This indicates that due to a 20-year history of smoking and a father's history of lung cancer, your lung cancer risk is 5 to 10 times higher than the average person. Based on authoritative national medical guidelines, targeted screening is strongly recommended; the recommended plan section includes the standard screening plan with the best cost-effectiveness, including the first item on the examination list: serum tumor markers CEA and CYFRA21-1, costing 200 yuan, recommended strength 4 stars, level B evidence, examination time: day 1, effect: initial assessment of lung cancer risk increased by 18%. The accuracy of the results is as follows: Item 2: Low-dose spiral CT scan, cost 300 yuan, recommendation strength 5 stars, level A evidence, strongly recommended, examination time 3-4 days, and biomarker results. Its role is the gold standard for lung cancer screening, reducing mortality by 20%. Item 3: Lung function test (FEV1 and FVC), cost 150 yuan, recommendation strength 4 stars, level B evidence, examination time 1 day, role is to assess COPD risk. Item 4: Complete blood count (CBC), optional, cost 50 yuan, recommendation strength 3 stars, level C evidence, role is to exclude infection and inflammation. The total cost is 700 yuan, within your budget of 5000 yuan. The recommendation section includes scientific evidence, fully based on the "Lung Cancer Screening Guidelines 2023," supported by large-scale international research by the Chinese Medical Association. The NLST and NELSON studies, involving over 50,000 participants, validated the evidence at level A (highest level), strongly recommending this test. Optimizing the testing sequence by performing biomarkers before CT reduces anxiety by 30%. If biomarkers are normal, CT is more reassuring; if biomarkers are abnormal, CT is more targeted, demonstrating a significant synergistic effect. Biomarker plus CT testing improves accuracy by 18% compared to CT alone. Lung function combined with CT provides comprehensive assessment, covering both cancer screening and chronic disease risks. It offers high cost-effectiveness; 700 yuan provides the opportunity for early detection. Early-stage lung cancer has a cure rate greater than 80%, and late-stage less than 20%. Early detection can save hundreds of thousands of yuan in treatment costs. The recommended testing schedule includes Monday morning of the first day. The abdominal blood routine and tumor marker blood draws are done in the afternoon, and the pulmonary function test results are available on the same day. The LDCT examination is performed on Wednesday or Thursday of the 3rd to 4th day, depending on the marker results. The examination takes 15 minutes, and the report is available on the same day or the next day. Other options are compared in the table below: Basic Option (LDCT only, cost 300 RMB, health benefits 3 stars, recommended index: suitable for those on a tight budget); Standard Option (recommended cost 700 RMB, health benefits 5 stars, recommended index: best value); Comprehensive Option (cost 730 RMB, health benefits 5 stars plus ECG, recommended index: most comprehensive). Safety information includes: Radiation safety: LDCT radiation dose is 1-2 millisieverts, equivalent to 10 airplane flights, far lower than a regular CT scan of 10-15 millisieverts; Non-invasive: All examinations are non-invasive or minimally invasive, involving only blood draws, safe and painless; AI plus expert double verification: Recommended options have passed AI triple safety verification and meet national medical guidelines. Any abnormalities will be further evaluated by expert physicians.The Frequently Asked Questions (FAQ) section includes questions such as: Q: Can I have a CT scan without biomarkers? A: A CT scan alone is the gold standard, but if you have a family history, combined testing is more cost-effective. Q: Does a CT scan involve radiation and could cause cancer? A: Low-dose CT scans have very low radiation and will not cause cancer; the screening benefits far outweigh the radiation risks. Q: How often should I have a CT scan? A: High-risk individuals are advised to have one scan per year; if nodules are found, adjust the frequency according to your doctor's advice. Q: What should I do if the examination reveals a problem? A: The system will recommend subsequent examination plans and refer you to the relevant specialist. The health advice section includes strong recommendations such as quitting smoking, which can reduce the risk of lung cancer by 50%; after 10 years of quitting smoking, the risk can be reduced to near that of the average person; increasing exercise (150 minutes of moderate-intensity exercise per week) improves lung function and reduces the risk of COPD; maintaining a balanced diet with plenty of fresh fruits and vegetables rich in antioxidants and reducing red meat and processed foods. You can ask me any questions at any time. Buttons are provided to start booking an examination, view other options, and consult a doctor.
[0293] Example 2: A routine physical examination recommendation for a 35-year-old female programmer, demonstrating the application of the method of the present invention in a scenario of ordinary healthy people.
[0294] Step 1: User input
[0295] "I'm a 35-year-old female programmer who spends over 10 hours a day in front of a computer. Lately, I've been experiencing neck and lower back discomfort, and occasional dry eyes. I don't exercise much, and my periods are a bit irregular. My mother has diabetes, and my grandmother has breast cancer. I'd like to get a physical exam, with a budget of 3000 yuan."
[0296] Step 2: Intelligent Analysis of User Information
[0297] Model output JSON: Basic information: Age 35, Gender: Female, Occupation: Programmer, Budget: 3000; Risk factors include: Sedentary lifestyle (detailed description: more than 10 hours of continuous computer use per day, occupation-related); Lack of exercise (detailed description: not much exercise, long-term); Symptoms include: Mild neck discomfort (recently), Mild lower back discomfort (recently), Mild intermittent dry eyes, Moderate irregular menstruation (unclear); Family history includes: Mother's diabetes, Grandmother's breast cancer; Special requirements: address occupational diseases and family medical history.
[0298] Step 3: Knowledge Graph Query and Reasoning
[0299] The top 15 relevant nodes include: cervical spine X-ray or MRI similarity 0.88, lumbar spine X-ray or MRI similarity 0.85, breast ultrasound plus mammography similarity 0.79, gynecological examination plus hormone testing similarity 0.76, fasting blood glucose plus glycated hemoglobin similarity 0.72, ophthalmological examination visual acuity plus fundus similarity 0.68, blood lipid four items similarity 0.52, thyroid function similarity 0.48, liver and kidney function similarity 0.42, and complete blood count similarity 0.38.
[0300] GNN inference results (JSON): Key risks include occupational cervical and lumbar spine disorders (0.88 evidence, programmer with sedentary lifestyle and cervical and lumbar symptoms); breast cancer family risk (0.79 evidence, maternal grandmother with breast cancer, female, and 35 years old); prediabetes or diabetes risk (0.72 evidence, mother with diabetes and lack of exercise); gynecological endocrine disorders (0.68 evidence, irregular menstruation). Recommended items include: cervical spine X-ray (0.88 evidence, Level B, reason: high incidence of occupational diseases among programmers, symptomatic, recommended examination, cost 120); lumbar spine X-ray (0.85 evidence, Level B, reason: related to sedentary lifestyle, lower back discomfort, cost 120); breast ultrasound (0.79 evidence, Level A, reason: family history, 35 years old, recommended annual screening, cost 200); gynecological examination including cervical TCT (0.76 evidence, Level A, reason: irregular menstruation, need to rule out gynecological diseases, cost 250); and hormone panel (0.70 evidence, Level B, reason: assessment of irregular menstruation). Endocrine function test cost 300; fasting blood glucose and glycated hemoglobin score 0.72, evidence level B, reason: maternal diabetes genetic risk, screening recommended cost 80; lipid profile score 0.52, evidence level C, reason: sedentary lifestyle, lack of exercise, cardiovascular risk, cost 60; thyroid function test FT3, FT4, and TSH score 0.58, evidence level B, reason: irregular menstruation may be related to thyroid, cost 180; liver and kidney function score 0.42, evidence level C, reason: basic physical examination cost 80; complete blood count score 0.38, evidence level C, reason: basic physical examination cost 50; synergistic effect includes gynecological examination plus comprehensive assessment of six hormones, organic vs. functional causes of irregular menstruation, blood glucose and lipid metabolism syndrome assessment; time constraints include hormone test time requirement: day 2-4 of the menstrual cycle, reason: hormone test results are accurate only at specific times; blood glucose, blood lipids, and liver and kidney function test time requirement: fasting for 8-12 hours, reason: fasting test is more accurate.
[0301] Steps 4 and 5: Prompt Construction and Large Model Inference
[0302] The large model outputs a simplified JSON: The risk analysis states, "As a programmer, you experience prolonged sitting, leading to high pressure on your cervical and lumbar spine. You currently have symptoms and imaging examinations are recommended. A family history of breast cancer and diabetes increases the genetic risk by 2 to 3 times, requiring targeted screening. Irregular menstruation may indicate an endocrine problem; gynecological and hormone tests are recommended. Overall risk: Moderate, 68 out of 100." The recommended program list includes a comprehensive physical examination plan. Recommended items include: cervical and lumbar spine X-ray (cost 240, priority, recommended for occupational diseases and symptoms); breast ultrasound (cost 200, priority, required, family history, Grade A recommendation); gynecological examination including TCT (cost 250, priority, required, to investigate the cause of irregular menstruation); six hormones (cost 300, priority, recommended for assessing endocrine function, time requirement: days 2-4 of menstruation); hemoglobin blood test (cost 80, priority, recommended for maternal diabetes genetic screening); and thyroid function test (cost 180, priority, sugar and glucose test, recommended for menstruation). Irregular menstruation may be caused by several factors, including: a 60 RMB cost for a four-item blood lipid test (priority option), a risk factor associated with prolonged sitting, a 130 RMB cost for liver and kidney function tests plus a routine blood test (priority option), and basic examinations. The total cost is 1440 RMB. Synergistic effects include a gynecological examination plus a comprehensive assessment of six hormones to determine the cause of irregular menstruation, and screening for metabolic syndrome with blood glucose and lipids. The timing of the hormone tests is as follows: days 2-4 of menstruation, any time, fasting, and other examinations. The basic economy plan includes a breast ultrasound (200 RMB), a gynecological examination (250 RMB), blood glucose and lipid tests (140 RMB), and cervical and lumbar spine X-rays (240 RMB), for a total cost of 830 RMB. In simpler terms, "As a programmer, your cervical and lumbar spine are often in poor posture; imaging examinations are recommended to assess the degree of damage. A family history of breast cancer and diabetes increases your risk by 2-3 times compared to the general population; targeted screening is recommended. Irregular menstruation may be due to endocrine issues; gynecological examinations and hormone tests can identify the cause. The comprehensive plan at 1440 RMB is within your budget and offers good value."
[0303] Steps 6 and 7: Optimization and Scoring
[0304] Multi-objective optimization results table: The comprehensive plan has a health benefit H of 1.380, cost C of 1440, and an overall score of 0.582, ranking 1st and recommended. The basic plan has a health benefit H of 0.920, cost C of 830, and an overall score of 0.425, ranking 2nd. The comprehensive plan is recommended as it offers the best cost-effectiveness and covers all major risks.
[0305] The interpretability score, using breast ultrasound as an example, is as follows: Medical necessity 95 points (Level A evidence plus family history); Risk of missed detection 88 points (high genetic risk of breast cancer); Cost reasonableness 82 points (high cost-effectiveness at 200 yuan); Reasonableness of inference 92 points (sufficient evidence). Overall score 91 points: Strongly recommended.
[0306] Step 8: Security Verification
[0307] The first layer passed with no contraindications; the second layer passed with consistent logic; the third layer did not trigger, and the cost was 1440 yuan, less than 5000 yuan. The final result was a successful security verification.
[0308] Step 9: Output the final simplified version
[0309] Intelligent health checkup report recommendation: Risk assessment: Medium risk, 68 points out of 100. Major risks include occupational cervical and lumbar spine disorders, prolonged sitting with symptoms, family risk of breast cancer (maternal history), genetic risk of diabetes (maternal history), gynecological endocrine disorders, and irregular menstruation. Recommended comprehensive health checkup plan: The checkup list includes: cervical spine X-ray (120 RMB, 4 stars) and lumbar spine X-ray (120 RMB, 4 stars) for cervical and lumbar symptoms; breast ultrasound (200 RMB, 5 stars, Grade A recommendation) for family history; blood glucose and glycated hemoglobin (80 RMB, 4 stars); and gynecological examination plus TCT for irregular menstruation. 250 yuan (5 stars) for hormone panel 6 items, 300 yuan (4 stars) for hormone panel 6 items, and 180 yuan (4 stars) for thyroid function test; basic examinations include optional blood lipid panel 4 items (60 yuan (3 stars) and liver and kidney function plus routine blood test (130 yuan (3 stars)); total cost 1440 yuan. This recommendation is based on the following: cervical and lumbar spine X-rays to clarify the extent of lesions and guide subsequent treatment; annual screening is recommended according to international guidelines (Grade A) for those with a family history of breast cancer (2-3 times higher genetic risk); comprehensive gynecological examination plus hormone and thyroid function tests to determine the cause of menstrual problems; and diabetes screening for early detection and intervention. The examination schedule is from day 2 to day 4 of the menstrual cycle for hormone panel 6 items. Tests can be performed at specific times or at any time, including fasting 8-hour blood glucose, blood lipids, and liver and kidney function tests. Cervical and lumbar spine X-rays, breast ultrasounds, and gynecological examinations can also be performed at any time. It is recommended to complete all tests within 2 to 3 days. Health recommendations include improving work posture (get up and move around for 5 minutes every hour, keep the monitor at eye level, use a lumbar support cushion), increasing exercise (3 times a week, including aerobic exercise, swimming, and jogging; cervical spine exercises are available online with tutorials), improving diet (controlling sugar intake to prevent diabetes, eating more high-fiber foods to help balance hormones), and asking me any questions. Buttons are provided to start an appointment, view report examples, and consult a doctor.
[0310] The above detailed embodiments are a description of the present invention. It should not be considered that the specific embodiments of the present invention are limited to these descriptions. For those skilled in the art, several simple deductions and substitutions can be made without departing from the concept of the present invention, and all of these should be considered to fall within the protection scope of the present invention.
Claims
1. An intelligent health check recommendation method based on constraint awareness and a large language model, characterized in that, Includes the following steps: S1. Obtain the user's health information; S2. Retrieve medical knowledge related to the user's health information from the medical knowledge base; The step of retrieving medical knowledge related to the user's health information from a medical knowledge base includes reasoning using a lightweight graph neural network, specifically including: Relevant node location: Calculate the similarity between the user's feature vector and nodes in the knowledge graph, and select relevant nodes; Local graph extraction: Extract the N-hop neighborhood subgraph of the relevant nodes; Graph attention network reasoning, which uses a multi-layer graph attention network to reason about the N-hop neighborhood subgraph; Relation identification involves extracting co-reinforcing relationships, temporal dependencies, and constraint relationships from the reasoning results. S3. Inject the medical knowledge into the input prompts of the generative large language model, and generate a recommended physical examination item scheme that meets medical constraints based on the input prompts; the medical constraints include at least mutual exclusion constraints, temporal constraints, conditional constraints, and historical tracking constraints, and the historical tracking constraints include the constraint that historical abnormal items must be re-examined; the generation of a recommended physical examination item scheme that meets medical constraints based on the input prompts includes: The constraint extraction step extracts user-related medical constraint relationships from the medical knowledge base; The constraint formalization step converts the medical constraint relationship into a formal rule expression; The hierarchical injection step organizes the formal rule expressions and medical knowledge into the input prompts of the generative large language model according to a predetermined hierarchical structure; The constraint-guided generation step involves calling a generative large language model to perform reasoning based on the input prompts and generate a recommendation scheme that meets the constraints. The constraint verification step verifies the constraint satisfaction of the generated recommendation solution. If the constraint is violated, the process returns to the constraint-guided generation step to require the generative large language model to make corrections. The hierarchical structure includes: The constraint layer includes mutual exclusion constraints, timing constraints, conditional constraints, and historical tracking constraints. Each constraint uses logical expressions or predefined formats to represent the relationship between the physical examination items. The knowledge layer contains compressed medical knowledge, which is compressed by semantic clustering of relevant medical knowledge and extraction of key information using predefined summary templates. The example layer contains example cases used to guide the reasoning patterns of large language models; S4. Perform multiple verifications on the recommended scheme, the multiple verifications including rule hard constraint checks, logical consistency verification, and expert review in sequence; the rule hard constraint checks include: Blacklist check: Verify whether the recommended items include any checks that are contraindicated for the user; Age restriction check: Verify that the age range applicable to the recommended items includes the user's age; Mutual exclusion check: Verify that there are no mutually exclusive combinations of items in the recommendation list; Historical review completeness check: Verify whether all historical anomalies contain the corresponding review items; The logical consistency verification includes: Structured validation: Validates whether the output format conforms to predefined data structure specifications; Constraint consistency verification: Verify whether the recommended solution meets the time constraints and budget constraints; Inference consistency verification: Verify the logical connection between the recommendation reason and the recommended item; When the preset high-risk conditions are met, the recommended results will be marked as requiring human expert review. S5. Based on the validated recommendation scheme, generate an interpretable report that includes explanations of the basis for the recommendation.
2. The intelligent health check recommendation method based on constraint perception and large language model according to claim 1, characterized in that, The medical knowledge base uses a knowledge graph structure to store medical knowledge.
3. The intelligent health check recommendation method based on constraint perception and large language model according to claim 1, characterized in that, The generative large language model uses a multi-objective weighted optimization function, which includes a health benefit term, a cost term, a potential risk term, and a historical continuity term. The weight coefficients of each objective function term are dynamically adjusted according to the user type.
4. An intelligent physical examination recommendation system based on constraint perception and a large language model, characterized in that, include: The user interface module is used to obtain users' health information; The medical knowledge extraction module is used to retrieve medical knowledge related to the user's health information from a medical knowledge base; The step of retrieving medical knowledge related to the user's health information from a medical knowledge base includes reasoning using a lightweight graph neural network, specifically including: Relevant node location: Calculate the similarity between the user's feature vector and nodes in the knowledge graph, and select relevant nodes; Local graph extraction: Extract the N-hop neighborhood subgraph of the relevant nodes; Graph attention network reasoning, which uses a multi-layer graph attention network to reason about the N-hop neighborhood subgraph; Relation identification involves extracting co-reinforcing relationships, temporal dependencies, and constraint relationships from the reasoning results. The recommendation scheme generation module is used to inject the medical knowledge into the input prompts of the generative large language model, and generate a recommended scheme of physical examination items that meets medical constraints based on the input prompts; the medical constraints include at least mutual exclusion constraints, temporal constraints, conditional constraints, and historical tracking constraints, and the historical tracking constraints include the constraint that historical abnormal items must be re-examined; the generation of a recommended scheme of physical examination items that meets medical constraints based on the input prompts includes: The constraint extraction step extracts user-related medical constraint relationships from the medical knowledge base; The constraint formalization step converts the medical constraint relationship into a formal rule expression; The hierarchical injection step organizes the formal rule expressions and medical knowledge into the input prompts of the generative large language model according to a predetermined hierarchical structure; The constraint-guided generation step involves calling a generative large language model to perform reasoning based on the input prompts and generate a recommendation scheme that meets the constraints. The constraint verification step verifies the constraint satisfaction of the generated recommendation solution. If the constraint is violated, the process returns to the constraint-guided generation step to require the generative large language model to make corrections. The hierarchical structure includes: The constraint layer includes mutual exclusion constraints, timing constraints, conditional constraints, and historical tracking constraints. Each constraint uses logical expressions or predefined formats to represent the relationship between the physical examination items. The knowledge layer contains compressed medical knowledge, which is compressed by semantic clustering of relevant medical knowledge and extraction of key information using predefined summary templates. The example layer contains example cases used to guide the reasoning patterns of large language models; A multi-validation module is used to perform multiple validations on the recommended solution. These multiple validations sequentially include hard rule constraint checks, logical consistency checks, and expert review. The hard rule constraint checks include: Blacklist check: Verify whether the recommended items include any checks that are contraindicated for the user; Age restriction check: Verify that the age range applicable to the recommended items includes the user's age; Mutual exclusion check: Verify that there are no mutually exclusive combinations of items in the recommendation list; Historical review completeness check: Verify whether all historical anomalies contain the corresponding review items; The logical consistency verification includes: Structured validation: Validates whether the output format conforms to predefined data structure specifications; Constraint consistency verification: Verify whether the recommended solution meets the time constraints and budget constraints; Inference consistency verification: Verify the logical connection between the recommendation reason and the recommended item; When the preset high-risk conditions are met, the recommended results will be marked as requiring human expert review. The recommendation output module is used to generate an interpretable report containing explanations of the basis for the recommendations based on the validated recommendations.
5. The intelligent physical examination recommendation system based on constraint perception and large language model according to claim 4, characterized in that, The recommendation output module includes: The concise layer is used to explain the reasons for the recommendation to the user; In the medical field, it is used to explain the basis of recommendations to healthcare professionals using professional terminology and evidence-based medicine. The technical layer is used to demonstrate the AI reasoning path and decision-making process; The interaction layer is used to support users in asking for further details about the recommendations through natural language question answering.