Improved group algorithm-based pre-frailty risk prediction system for elderly cancer patients

CN122967976APending Publication Date: 2026-10-23NEIJIANG FIRST PEOPLES HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611214056.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

上述缺陷共同制约了老年肿瘤患者衰弱前期风险预测系统在临床实际中的部署效果和推广应用价值

Benefits of technology

1.本发明通过将可解释分析机制内置于离散帝王蝶优化算法的迭代过程中,使特征筛选过程本身具备透明性和可追溯性,解决了现有预测系统因缺乏临床可解释性而难以被采纳的技术瓶颈。 具体而言,特征贡献度计算单元在每一轮迭代中动态记录各候选特征被选入特征子集的频率及其对适应度函数的边际贡献,实现特征重要性评估从事后静态分析向迭代动态追踪的转变;状态转移解释单元通过计算各特征对健康状态向衰弱前期状态转移概率的条件概率差异,突破传统可解释方法仅输出特征重要性排序的局限,揭示各特征对状态转移的驱动方向及效应强度。在此基础上,特征筛选模块将其种群个体的适应度方差和特征选择频率离散度实时传输至可解释分析模块,后者据此动态修正特征贡献度的计算权重,使贡献度评估在算法陷入局部最优时自动弱化对特定特征的过度信任,从而抑制过拟合风险;同时,可解释分析模块将状态转移驱动效应值作为自适应惩罚系数嵌入适应度函数,使离散帝王蝶优化算法的优化目标从单纯追求统计预测精度拓展为同时追求因果驱动能力,保证筛选出的特征子集兼具预测准确性与临床干预指向性。上述机制共同实现了预测模型从黑箱到白箱的转化,在特征筛选逻辑层面完成了从“筛选后解释”到“筛选即解释”的本质改进,使系统输出的每一级风险预警均具备明确的风险因素追溯路径;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122967976A_ABST
    Figure CN122967976A_ABST
Patent Text Reader

Abstract

The present application relates to a pre-frailty risk prediction system for elderly tumor patients based on improved group algorithm, belonging to the cross technical field of geriatric medicine and artificial intelligence. The system includes data collection, feature screening, multi-scale Markov chain modeling, dynamic risk prediction and interpretable analysis modules; the feature screening module uses discrete monarch butterfly optimization algorithm to screen key features, the interpretable analysis module dynamically tracks feature contribution and state transition driving effect in algorithm iteration and bidirectional feedback to regulate search direction, the multi-scale Markov chain modeling module constructs the transition probability matrix between health, pre-frailty and frailty states, and the model updating module triggers system retraining with incremental learning. The present application realizes the dynamic prediction of pre-frailty risk, factor tracing and model adaptive evolution, and provides transparent and traceable quantitative basis for clinical intervention.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the interdisciplinary field of geriatric medicine and artificial intelligence, specifically to a pre-frailty risk prediction system for elderly cancer patients based on an improved population algorithm. Background Technology

[0002] Frailty refers to a clinical state in older adults characterized by reduced stress resistance due to decreased physiological reserves across multiple systems. Its core features include involuntary weight loss, decreased grip strength, self-reported fatigue, slowed gait, and reduced physical activity. Pre-frailty is an intermediate state between health and frailty; meeting one or two criteria in the Fried Frailty Phenotypic Assessment Criteria is sufficient for pre-frailty assessment. Studies have shown that pre-frailty is manageable; early identification and targeted intervention can effectively delay or reverse the progression to frailty. Elderly cancer patients have a significantly higher incidence of frailty than the general elderly population due to the effects of the cancer itself and its treatments (surgery, chemotherapy, radiotherapy, targeted therapy, etc.). Currently, various comprehensive geriatric assessment tools exist to predict treatment tolerance and adverse prognosis in elderly cancer patients, but frailty assessment tools specifically designed for treatment scenarios such as radiotherapy remain lacking. Existing frailty risk prediction studies mostly use logistic regression analysis to screen independent risk factors and construct nomogram prediction models based on these risk factors. In recent years, some studies have begun to explore the application of machine learning methods in the field of decay prediction, using algorithms such as XGBoost and support vector machines to build predictive models. Swarm intelligence algorithms have already been applied in biomedical engineering, including particle swarm optimization and ant colony optimization for feature selection and classification optimization; the monarch butterfly optimization algorithm, as a relatively new swarm intelligence method, has been improved by researchers for feature selection problems.

[0003] However, existing frailty risk prediction technologies for elderly cancer patients still have the following shortcomings. First, most existing prediction models are static predictions based on a single time segment, meaning they only utilize clinical data from a single point in time for patient admission. However, the frailty state of elderly cancer patients exhibits dynamic evolution during treatment, with significant differences in frailty status at different treatment stages (pre-operative, during chemotherapy, post-operative recovery, etc.). Static segment prediction methods cannot capture the temporal changes in frailty status and struggle to identify "frailty inflection points" to determine the optimal intervention time. Previous studies have used multi-state Markov models to analyze the transitions in frailty status among elderly cancer survivors, confirming a clear probability of metastasis between non-frailty, pre-frailty, frailty, and death. However, these multi-state models are mostly limited to epidemiological descriptions and have not yet been integrated with personalized risk prediction systems. Second, existing prediction models generally lack interpretability mechanisms. When deploying clinical decision support systems in medical settings, doctors need not only to know "how high the risk is," but also to understand "which factors drive the increased risk" and "how to implement targeted interventions." Although some studies have attempted to use methods such as SHAP for post-training interpretation, such post-training interpretation is separated from the model training process, lacks inherent consistency between the interpretation results and the prediction results, and cannot dynamically adjust the model behavior during the prediction process. Third, the feature selection process of existing prediction models mostly relies on clinical experience or statistical tests (such as univariate analysis followed by multivariate regression), which has limitations such as strong subjectivity and difficulty in handling nonlinear interactions between features in high-dimensional data. Swarm intelligence algorithms have shown potential to outperform traditional methods in feature selection in the medical field, but current applications mostly focus on comparing the performance of the algorithms themselves, failing to organically integrate the feature selection process with the needs of clinical interpretability and dynamic modeling of state transitions. This results in the selected feature subset having high predictive accuracy at the statistical level but lacking clear clinical intervention guidance. Fourth, existing systems fail to fully utilize multi-source heterogeneous data (including structured test records and unstructured medical history texts) for comprehensive evaluation, nor have they established a dynamic update mechanism to adapt to the continuous accumulation of clinical data and the continuous optimization of model performance. The aforementioned shortcomings collectively limit the effectiveness of deploying and promoting the pre-frailty risk prediction system for elderly cancer patients in clinical practice. Summary of the Invention

[0004] To address the problems of existing technologies, this invention provides a pre-frailty risk prediction system for elderly cancer patients based on an improved population algorithm.

[0005] To solve the above-mentioned technical problems, the present invention is achieved through the following technical solution: Firstly, a pre-frailty risk prediction system for elderly cancer patients based on an improved population algorithm, the system comprising: The data acquisition module is used to collect multi-source clinical data from elderly cancer patients and construct a dataset of elderly cancer patients. The data preprocessing module is used to perform data cleaning, missing value imputation, standardization, and feature fusion on the dataset to generate a feature matrix of elderly cancer patients; the missing value imputation adopts multiple imputation method, and the standardization adopts Z-score standardization method. The feature processing module is used to encode and initially filter the feature matrix to form an initial feature set; The feature selection module is used to input the initial feature set into the discrete monarch butterfly optimization algorithm for iterative optimization, using the classification performance of the prediction model as the fitness function, and to select the key feature subset that contributes the most to the prediction of early-stage decay risk. The discrete monarch butterfly optimization algorithm is executed according to the following steps: Step S1, Population Initialization: Set the population size to NP, the maximum number of iterations to MaxGen, the feature dimension to D, the maximum walk step size to S_max, the adjustment rate to BAR, the migration period to peri, and the migration rate to R. Randomly divide the population into a first subpopulation Subpopulation1 and a second subpopulation Subpopulation2, where the number of individuals in the first subpopulation is NP1 and the number of individuals in the second subpopulation is NP2, NP1=ceil(R×NP), NP2=NP-NP1, and the position vector of each individual is a D-dimensional binary vector representing a feature subset; Step S2, Fitness Evaluation: Calculate the fitness function value for each individual based on its current position and record the current optimal solution; Step S3, migration operator operation: For each individual i in the first subpopulation, i=1,2,…,NP1, for each dimension k, k=1,2,…,D, generate a random number r1=rand×peri. If r1≤R, then randomly select individual r2 from the first subpopulation and update the k-th dimension component according to the formula x_{i,k}^{t+1}=x_{r2,k}^{t}; if r1>R, then randomly select individual r3 from the second subpopulation and update the k-th dimension component according to the formula x_{i,k}^{t+1}=x_{r3,k}^{t}. Step S4, Butterfly Adjustment Operator Operation: For each individual j in the second subpopulation, j=1,2,…,NP2, if the random number rand≤BAR, then update the k-th dimension component according to the formula x_{j,k}^{t+1}=x_{best,k}^{t}; otherwise, update the k-th dimension component according to the formula x_{j,k}^{t+1}=x_{r4,k}^{t}+α×(dx_k-0.5), where x_{best,k}^{t} is the k-th dimension component of the current best individual, x_{r4,k}^{t} is the k-th dimension component of the individual r4 randomly selected from the second subpopulation, α is the weight coefficient, and dx_k is the step size of the k-th dimension. Step S5, Merging and Iteration: Merge the first subpopulation and the second subpopulation, update the current optimal solution, and if the maximum number of iterations MaxGen has not been reached, return to step S2 to continue iterating; The multi-scale Markov chain modeling module is used to construct a multi-scale Markov chain model based on the key feature subset, and to divide the health status of elderly cancer patients into healthy status, pre-frailty status and frailty status, and to form a risk status sequence through multi-scale time window analysis. The dynamic risk prediction module is used to determine whether the pre-frailty risk of elderly cancer patients reaches the warning standard based on the risk state sequence, and to generate corresponding risk warning information. The warning standard is as follows: when the retention probability of the pre-frailty state in the risk state sequence exceeds 0.65, a yellow warning is triggered; when the transfer probability of the frailty state exceeds 0.50, a red warning is triggered. An interpretable analysis module, comprising: The feature contribution calculation unit is used to record the frequency of each candidate feature being selected into the key feature subset and the marginal contribution of the corresponding fitness function in each iteration of the discrete monarch butterfly optimization algorithm, and generate a global contribution score for each feature. The state transition interpretation unit is used to calculate the driving effect of each key feature on the transition probability between different health states based on the state transition probability matrix of the multi-scale Markov chain model, and to identify the key risk factors and their contribution weights that drive elderly cancer patients to transition from a healthy state to a pre-frail state. The personalized interpretable report generation unit is used to generate a personalized interpretable report for each elderly cancer patient, which includes the patient's current risk score, the ranking of the contribution of each risk factor, the current risk status, and the analysis of the driving factors for the transition to the next risk status. The system also includes a model update module, which, after the interpretable analysis module generates an individualized interpretable report, uses the newly generated individualized data and its corresponding risk prediction results as incremental training samples. After every 50 newly added sample data, the discrete monarch butterfly optimization algorithm is re-optimized and the parameters of the multi-scale Markov chain model are re-estimated.

[0006] In one specific implementation of the first aspect, the fitness function of the discrete monarch butterfly optimization algorithm is constructed as follows: Fitness=α×Accuracy+β×Sensitivity+γ×Specificity+δ×AUC Where Accuracy is the accuracy of the prediction model, Sensitivity is the sensitivity, Specificity is the specificity, AUC is the area under the receiver operating characteristic curve; α, β, γ, δ are preset weight coefficients, α∈(0,1), β∈(0,1), γ∈(0,1), δ∈(0,1), and α+β+γ+δ=1. The state transition interpretation unit transmits the driving effect values ​​of each feature it outputs for the transition from a healthy state to a pre-decaying state to the feature selection module in real time. The discrete monarch butterfly optimization algorithm embeds these driving effect values ​​as adaptive penalty coefficients into the fitness function, and the updated fitness function is: Fitness_new=α×Accuracy+β×Sensitivity+γ×Specificity+δ×AUC+ε×Drive_Effectiveness Where Drive_Effectiveness represents the average driving effect value of the features contained in the current feature subset, and ε is a dynamic adjustment factor, which is calculated according to the following formula: ε=ε0×(1+η×Σ_{i=1}^{m}Score_i / m) Where ε0 is the preset baseline value, ε0∈(0.01,0.1), η is the preset scaling factor, η∈(0.1,0.5), m is the number of features in the current feature subset, and Score_i is the global contribution score of the i-th feature.

[0007] In one specific implementation of the first aspect, the feature contribution calculation unit calculates the global contribution score of each feature in the following manner: For each individual in the discrete monarch butterfly optimization algorithm population, the feature subset S corresponding to the feature subset is recorded. The fitness function value F(S) of the feature subset is recorded. For each feature f_i in the feature subset S, its marginal contribution Δ_i = F(S) - F(S{f_i}) is calculated. The product of the frequency p_i in which feature f_i is selected into the feature subset in all iterations and the average marginal contribution is used as the global contribution score of the feature. Score_i=p_i×(1 / T)×Σ_{t=1}^{T}Δ_i^{(t)} Where T is the total number of iterations, and Δ_i^{(t)} is the marginal contribution of feature f_i in the t-th iteration; The feature contribution calculation unit sorts all features in descending order according to their global contribution scores and transmits the sorting results to the feature filtering module. The discrete monarch butterfly optimization algorithm dynamically reduces the search space based on the global contribution scores of each feature, and removes features with global contribution scores lower than a preset threshold θ from the candidate feature set. The preset threshold θ = 0.01 × Σ_{i=1}^{n}Score_i / n, where n is the total number of candidate features.

[0008] In one specific implementation of the first aspect, the state space constructed by the multi-scale Markov chain modeling module is {healthy state H, pre-decay state P, decay state F}, and the state transition probability matrix is ​​M=[m_ij], where m_ij represents the probability of transitioning from state i to state j, i,j∈{H,P,F}, and the state transition probability matrix satisfies Σ_{j∈{H,P,F}}m_ij=1, i∈{H,P,F}; The multi-scale Markov chain modeling module calculates the state transition entropy H(M) of the current state transition matrix after each construction of the state transition probability matrix: H(M)=-Σ_{i∈{H,P,F}}Σ_{j∈{H,P,F}}m_ij×log2(m_ij) H(M) represents the clarity of the current feature subset in distinguishing the three health states. The value of H(M) ranges from [0, log23]. The lower the value of H(M), the clearer the state boundary. The multi-scale Markov chain modeling module transmits the state transition entropy H(M) to the feature selection module in real time. The discrete monarch butterfly optimization algorithm uses H(M) as an adaptive regulation factor for population diversity: when H(M) > 1.0, the algorithm increases the migration step size of individuals in the population by 20% and increases the mutation probability by 15%; when H(M) ≤ 0.5, the algorithm shrinks the search range to the neighborhood of the current optimal solution.

[0009] In one specific implementation of the first aspect, the discrete monarch butterfly optimization algorithm records the fitness variance σ of all individuals in the current population after each iteration. 2 and the dispersion D of the feature selection frequency, and σ 2 The feature contribution calculation unit of the interpretable analysis module is transmitted in real time to D; The feature contribution calculation unit calculates the feature contribution based on the received σ. 2 The weights for calculating feature contributions are dynamically adjusted for D as follows: Weight_corrected=Weight_base×(1-λ×σ 2 / σ 2 _max-μ×D / D_max) Where Weight_base is the base contribution weight of the feature, σ 2 _max is the preset upper limit threshold for fitness variance, σ 2 _max=0.01×(Fitness_max-Fitness_min) 2 Fitness_max and Fitness_min are the maximum and minimum fitness values ​​in the current population, respectively. D_max is the preset upper limit threshold for feature selection frequency dispersion, D_max=0.5. λ and μ are preset suppression coefficients, λ∈(0.1,0.3) and μ∈(0.1,0.3). The corrected contribution score is transmitted to the feature selection module as the basis for assigning the dynamic adjustment factor ε in the next iteration. ε increases as the corrected contribution score increases.

[0010] In one specific implementation of the first aspect, the state transition interpretation unit calculates the driving effect of each key feature on the state transition in the following manner: For each key feature f_k, calculate the difference in probability of transitioning from a healthy state to a pre-decaying state under the conditions of including and not including the feature: Drive_{H→P}(f_k)=P(H→P|f_k∈S)-P(H→P|f_k∉S) And the difference in probability of transitioning from the pre-decay state to the decay state: Drive_{P→F}(f_k)=P(P→F|f_k∈S)-P(P→F|f_k∉S) Wherein, P(H→P|f_k∈S) represents the probability of transitioning from a healthy state to a pre-decaying state when the feature subset S contains feature f_k, and P(H→P|f_k∉S) represents the probability of transitioning from a healthy state to a pre-decaying state when the feature subset S does not contain feature f_k; P(P→F|f_k∈S) represents the probability of transitioning from a pre-decaying state to a weakened state when the feature subset S contains feature f_k, and P(P→F|f_k∉S) represents the probability of transitioning from a pre-decaying state to a weakened state when the feature subset S does not contain feature f_k; The state transition interpretation unit uses the probability difference as the driving effect value of the feature on the corresponding state transition, and generates a ranking list of the driving effects of each key feature on the transition from health to pre-deterioration and from pre-deterioration to deterioration. The driving effect value ranges from [-1, 1], with positive values ​​indicating that the feature promotes state transition and negative values ​​indicating that the feature inhibits state transition.

[0011] In one specific implementation of the first aspect, the individualized interpretable report generated by the individualized interpretable report generation unit includes the following: (a) The patient’s pre-fatal risk comprehensive score and risk level, which are divided into low risk (comprehensive score <0.3), medium risk (0.3≤comprehensive score <0.6) and high risk (comprehensive score ≥0.6). (b) A bar chart showing the individual contribution of each risk factor to the overall risk score for the patient, arranged from highest to lowest contribution; (c) The patient’s current risk status and the probability confidence interval for that status, with the confidence interval at a 95% confidence level; (d) The predicted probability that the patient will transition from the current state to the next risk state within three preset time windows of 30 days, 90 days and 180 days; (e) The top 5 key risk factors driving the patient toward the next risk state and their contribution weights; (f) A list of intervention recommendations based on the aforementioned driving factors.

[0012] 8. The system according to claim 1, wherein the multi-scale time window of the multi-scale Markov chain modeling module includes: A short-term time window is used to analyze the fluctuations in the health status of elderly cancer patients within a preset first time period and to identify short-term risk signals. The first time period is 7 days. The intermediate time window is used to analyze the trend of health status changes in elderly cancer patients within a preset second time period and to identify the intermediate change trajectory. The second time period is 90 days. A long-term time window is used to analyze the evolution of the health status of elderly cancer patients within a preset third time period and to identify long-term risk evolution patterns. The third time period is 365 days. The multi-scale Markov chain modeling module also constructs a weighted state transition graph based on the driving effect of each key feature output by the state transition interpretation unit on the state transition. In this graph, nodes represent healthy state, pre-decay state, and decay state, the weight of the edge represents the probability of the corresponding state transition, and the color or thickness of the edge represents the contribution weight distribution of the key feature driving the transition.

[0013] In one specific implementation of the first aspect, the multi-source clinical data acquired by the data acquisition module includes the following categories: (a) Demographic data, including age, sex, and education level; (b) Tumor-related data, including tumor type, tumor stage, pathological classification, treatment type, drug regimen and duration of medication; (c) Comorbidity and medication data, including the types and number of comorbidities, and the types and quantities of medications used; (d) Laboratory test data, including complete blood count, liver and kidney function, inflammatory markers, and nutritional indicators; (e) Functional status assessment data, including scores for activities of daily living and instrumental activities of daily living; (f) Psychosocial assessment data, including depression score, anxiety score, and social support score; (g) Physical examination data, including grip strength, walking speed, and body mass index; The criteria for determining the pre-frailty state are based on at least one of the Fried Frailty Phenotypic Assessment Criteria or the FRAIL scale, combined with tumor-specific indicators of elderly cancer patients for comprehensive assessment. The Fried Frailty Phenotypic Assessment Criteria includes 5 indicators: involuntary weight loss, decreased grip strength, self-reported fatigue, slowed walking speed, and reduced physical activity. Those who meet 1-2 of these criteria are considered to be in the pre-frailty state. The FRAIL scale includes 5 indicators: fatigue, resistance, walking ability, illness, and weight loss. Those who meet 1-2 of these criteria are considered to be in the pre-frailty state.

[0014] In one specific implementation of the first aspect, the discrete monarch butterfly optimization algorithm employs at least one of the following improvement strategies: (a) A population initialization strategy based on feature contribution scores, which makes the individuals in the initial population biased to include features with high contribution scores. Specifically, features are sorted from high to low according to feature contribution scores. When generating individuals in the initial population, the probability of the top 30% of features being selected is 0.8, and the probability of the remaining features being selected is 0.2. (b) Adaptive migration operator, which dynamically adjusts the migration step size according to the iteration process, specifically: migration step size S = S_max × (1-t / MaxGen), where t is the current iteration number and MaxGen is the maximum iteration number; (c) A local search strategy based on feature relevance, in which features with a relevance lower than a preset threshold ρ are preferentially selected for replacement in the local search, wherein the preset threshold ρ = 0.7 and the feature relevance is measured by the Pearson correlation coefficient; The individualized interpretable report generation unit is also used to generate a population-level interpretable analysis report, which includes: in a preset elderly cancer patient population, the global contribution ranking of each risk factor, the population driving effect ranking of each risk factor on the transition from a healthy state to a pre-frail state, the comparison of the differences in the contribution of risk factors among different tumor type subgroups, and the comparison of the differences in the contribution of risk factors among different treatment stage subgroups.

[0015] The beneficial effects of this invention are as follows: 1. This invention integrates an interpretable analysis mechanism into the iterative process of the Discrete Monarch Butterfly optimization algorithm, making the feature selection process transparent and traceable, thus overcoming the technical bottleneck of existing prediction systems being difficult to adopt due to a lack of clinical interpretability. Specifically, the feature contribution calculation unit dynamically records the frequency of each candidate feature being selected into the feature subset and its marginal contribution to the fitness function in each iteration, realizing the transformation of feature importance assessment from post-hoc static analysis to iterative dynamic tracking; the state transition interpretation unit, by calculating the conditional probability difference of each feature on the probability of transitioning from a healthy state to a pre-frail state, breaks through the limitation of traditional interpretable methods that only output feature importance ranking, revealing the driving direction and effect strength of each feature on state transition. Building upon this foundation, the feature selection module transmits the fitness variance and feature selection frequency dispersion of its individual populations to the interpretable analysis module in real time. The latter dynamically adjusts the weighting of feature contribution calculations based on this data, automatically reducing over-reliance on specific features when the algorithm gets stuck in local optima, thus suppressing overfitting risks. Simultaneously, the interpretable analysis module embeds the state transition driving effect value as an adaptive penalty coefficient into the fitness function, expanding the optimization objective of the discrete monarch butterfly optimization algorithm from simply pursuing statistical prediction accuracy to simultaneously pursuing causal driving capabilities. This ensures that the selected feature subset possesses both predictive accuracy and clinical intervention relevance. These mechanisms collectively transform the prediction model from a black box to a white box, achieving a fundamental improvement from "interpretation after selection" to "selection as interpretation" at the feature selection logic level. This ensures that each level of risk warning output by the system has a clear risk factor tracing path. 2. This invention achieves multi-level characterization and adaptive optimization of predictive performance for the dynamic evolution of frailty in elderly cancer patients through bidirectional information interaction between a multi-scale Markov chain modeling module and an interpretable analysis module. The multi-scale Markov chain modeling module constructs state transition probability matrices at three time scales: short-term, medium-term, and long-term. The short-term window is sensitive to stress-induced health fluctuations, the medium-term window reflects trend-based changes, and the long-term window reveals systemic evolutionary patterns. The risk state sequence formed by these three matrices enables the dynamic risk prediction module to assess risk based on the differentiated characteristics of the patient's time scale, overcoming the technical deficiency of traditional static cross-sectional prediction methods that cannot reflect the temporal dynamics of frailty. Building upon this foundation, the multi-scale Markov chain modeling module feeds back its state transition entropy to the feature selection module in real time. The Discrete Monarch Butterfly Optimization Algorithm uses this entropy value as a regulatory factor for population diversity. When the state boundary is ambiguous, it automatically expands the search step size to explore a wider feature combination space; when the state boundary is clear, it automatically shrinks the search range to accelerate local convergence. This achieves an adaptive balance between the algorithm's exploration and development capabilities, avoiding the unstable prediction performance caused by blind searching or premature convergence in traditional swarm algorithms. Simultaneously, the model update module periodically triggers the re-optimization of the Discrete Monarch Butterfly Optimization Algorithm and the parameter re-estimation of the Markov chain model using incremental learning. This allows the system to dynamically evolve with the continuous accumulation of clinical data, effectively controlling the consumption of computational resources while ensuring the timeliness of the prediction model. The aforementioned technical means together constitute a four-in-one closed-loop optimization system of "feature screening, state modeling, interpretable analysis, and model update". Each module constrains and enhances each other in collaborative operation. As the system runs for a longer period of time, the continuous injection of incremental samples gradually improves the statistical estimation accuracy of feature contribution scores and state transition driving effect values. The output reliability of the interpretable analysis module is enhanced accordingly, which in turn continuously improves the regulation accuracy of the feature screening module and the dynamic risk prediction module, ensuring the continuous stability and evolution of the system's predictive performance in long-term clinical deployment. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the internal structure of the interpretable analysis module of the present invention.

[0017] Figure 2 This is a schematic diagram of the internal structure of the interpretable analysis module of the present invention. Detailed Implementation

[0018] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0019] like Figures 1 to 2 The system shown is a pre-frailty risk prediction system for elderly cancer patients based on an improved population algorithm.

[0020] (I) System Overall Architecture The present invention provides a pre-frailty risk prediction system for elderly cancer patients based on an improved population algorithm, employing a modular architecture design. The system includes the following main modules: The data acquisition module is used to collect multi-source clinical data from elderly cancer patients and construct a dataset of elderly cancer patients. The data preprocessing module is used to perform data cleaning, missing value imputation, standardization, and feature fusion on the dataset to generate a feature matrix of elderly cancer patients. The feature processing module is used to encode and initially filter the feature matrix to form an initial feature set; The feature selection module is used to input the initial feature set into the discrete monarch butterfly optimization algorithm for iterative optimization, using the classification performance of the prediction model as the fitness function, and to select the key feature subset that contributes the most to the prediction of early-stage decay risk. The multi-scale Markov chain modeling module is used to construct a multi-scale Markov chain model based on the key feature subset, and to divide the health status of elderly cancer patients into healthy status, pre-frailty status and frailty status, and to form a risk status sequence through multi-scale time window analysis. The dynamic risk prediction module is used to determine whether the pre-frailty risk of elderly cancer patients reaches the warning standard based on the risk state sequence, and to generate corresponding risk warning information. The interpretable analysis module includes a feature contribution calculation unit, a state transition interpretation unit, and an individualized interpretable report generation unit, which are used to dynamically track the feature contribution and state transition driving effects during the algorithm iteration process and provide bidirectional feedback to regulate the search direction. The model update module is used to periodically trigger the re-optimization of the discrete monarch butterfly optimization algorithm and the parameter re-estimation of the multi-scale Markov chain model after the interpretable analysis module generates an individualized interpretable report.

[0021] The modules mentioned above interact with each other through data interfaces. A closed-loop, interconnected architecture is established between the feature selection module, the multi-scale Markov chain modeling module, and the interpretable analysis module, enabling bidirectional information exchange and collaborative parameter optimization among the modules. The data flow between modules is as follows: data acquisition module → data preprocessing module → feature processing module → feature selection module → multi-scale Markov chain modeling module → dynamic risk prediction module → output risk warning information. Simultaneously, the interpretable analysis module establishes bidirectional data interaction with both the feature selection module and the multi-scale Markov chain modeling module, and the model update module periodically triggers global model retraining.

[0022] The closed-loop linkage architecture specifically includes: First, the feature selection module transmits a subset of key features to the multi-scale Markov chain modeling module, which then feeds back the state transition entropy to the feature selection module. Second, the feature selection module transmits the fitness variance and feature selection frequency dispersion of its individuals to the interpretability analysis module in real time, which dynamically adjusts the calculated weights of feature contributions and feeds them back to the feature selection module. Third, the multi-scale Markov chain modeling module transmits the state transition probability matrix to the interpretability analysis module, which then feeds back the driving effect values ​​to the feature selection module. These three linkage mechanisms form a closed-loop iterative system of "optimization—interpretation—feedback—re-optimization".

[0023] (II) Specific Implementation Method of Data Acquisition Module The data acquisition module is used to collect multi-source clinical data from elderly cancer patients. Collection methods include: automatically acquiring electronic medical record data through the hospital information system interface, supplementing questionnaire survey data through manual data entry, and acquiring continuous monitoring data through wearable device interfaces.

[0024] The multi-source clinical data collected by the data acquisition module includes the following categories: (a) Demographic data, including age, sex, and education level; (b) Tumor-related data, including tumor type, tumor stage, pathological classification, treatment type, drug regimen and duration of medication; (c) Comorbidity and medication data, including the types and number of comorbidities, and the types and quantities of medications used; (d) Laboratory test data, including complete blood count, liver and kidney function, inflammatory markers, and nutritional indicators; (e) Functional status assessment data, including scores for activities of daily living and instrumental activities of daily living; (f) Psychosocial assessment data, including depression score, anxiety score, and social support score; (g) Physical examination data, including grip strength, walking speed, and body mass index.

[0025] The data acquisition module stores the collected raw data in a structured format. Each data record contains a unique patient identifier, a collection timestamp, and the values ​​of the above fields, and outputs it to the data preprocessing module.

[0026] The criteria for determining the pre-frailty state are based on at least one of the Fried Frailty Phenotypic Assessment Criteria or the FRAIL scale, combined with tumor-specific indicators in elderly cancer patients. The Fried Frailty Phenotypic Assessment Criteria includes five indicators: involuntary weight loss, decreased grip strength, self-reported fatigue, slowed gait, and reduced physical activity; meeting one or two of these indicators qualifies as pre-frailty. The FRAIL scale includes five indicators: fatigue, resistance to injury, walking ability, illness, and weight loss; meeting one or two of these indicators qualifies as pre-frailty. For patients using both assessment criteria, the Fried Frailty Phenotypic Assessment result is the primary basis for judgment, with the FRAIL scale result serving as a supplementary reference. When the two assessment results are inconsistent, the Fried Frailty Phenotypic Assessment result prevails.

[0027] (III) Specific Implementation Methods of the Data Preprocessing Module The data preprocessing module receives the raw dataset output by the data acquisition module and performs the following operations in sequence.

[0028] Data cleaning: Delete patient records with a missing rate of more than 30% for key fields; correct logically erroneous data and mark outliers as missing.

[0029] Missing value imputation: Multiple imputation is used for missing value imputation. Specific parameter settings are as follows: number of imputations m=5, maximum number of iterations maxit=50, and the default mean matching method is used for the prediction matrix. For continuous variables, a linear regression model is used for prediction imputation; for categorical variables, a logistic regression model is used for prediction imputation. After imputation, the average of the five imputation results is taken as the final imputed value.

[0030] Standardization: Continuous features are standardized using the Z-score standardization method. The calculation formula is as follows:

[0031] Where x is the original feature value, μ is the mean of the feature in the training set, and σ is the standard deviation of the feature in the training set. The standardized feature has a mean of 0 and a standard deviation of 1.

[0032] Feature fusion: The standardized continuous features are merged with the encoded categorical features to generate a feature matrix X for elderly cancer patients, and a corresponding label vector Y is generated at the same time.

[0033] (iv) Specific implementation of the feature processing module The feature processing module receives the feature matrix X and label vector Y output by the data preprocessing module and performs the following operations: Feature encoding: Numerical encoding is performed on categorical features. Binary classification features are encoded as {0,1}; multi-classification features are encoded using one-hot encoding, which expands the feature dimension after encoding.

[0034] Preliminary screening: A variance thresholding method is used for preliminary screening, removing features with variance close to 0, features with a missing rate exceeding 20%, and redundant features with correlation coefficients exceeding 0.95 with other features. This preliminary screening results in an initial feature set.

[0035] (v) Specific implementation of the feature filtering module The feature selection module is used to input the initial feature set into the discrete monarch butterfly optimization algorithm for iterative optimization, using the classification performance of the prediction model as the fitness function, to select the key feature subset that contributes the most to the prediction of early-stage decay risk.

[0036] 5.1 Algorithm Parameter Settings The core parameters of the discrete monarch butterfly optimization algorithm are set as follows: population size NP=50; maximum number of iterations MaxGen=200; feature dimension D is the initial feature dimension; maximum walk step size S_max=1.0; adjustment rate BAR=0.5; migration period peri=1.2; migration rate R=0.5; number of individuals in the first subpopulation NP1=ceil(R×NP)=25; number of individuals in the second subpopulation NP2=NP-NP1=25.

[0037] 5.2 Population initialization (step S1) The position vector of each individual is a D-dimensional binary vector x_i=(x_{i,1}, x_{i,2}, …, x_{i,D}), x_{i,k}∈{0,1}, where 1 indicates that the k-th feature is selected and 0 indicates that it is not selected.

[0038] Population initialization uses a random initialization method: for each dimension x_{i,k} of each individual x_i, it is assigned a value of 1 with probability p_init=0.3, and a value of 0 with probability 1-p_init. After initialization, the population is randomly divided into a first subpopulation Subpopulation1 and a second subpopulation Subpopulation2.

[0039] In addition, the algorithm can adopt a population initialization strategy based on feature contribution scores, so that the individuals in the initial population are biased towards having high contribution features. Specifically, the features are sorted from high to low according to their feature contribution scores. When generating individuals in the initial population, the probability of the top 30% of features being selected is 0.8, and the probability of the remaining features being selected is 0.2.

[0040] 5.3 Fitness assessment (step S2) For each individual in the population, construct a prediction model for the feature subset S and calculate its fitness function value.

[0041] The prediction model uses XGBoost as the base model. Five-fold cross-validation is used to evaluate the performance of the prediction model. The fitness function comprehensively considers the accuracy, sensitivity, specificity, and AUC of the prediction model, and is constructed using a weighted summation method.

[0042]

[0043] Wherein, the weight coefficients satisfy The values ​​of each coefficient are all in the range of (0,1).

[0044] Record the optimal solution x_best in the current population and its corresponding fitness function value Fitness_best.

[0045] 5.4 Migration Operator Operation (Step S3) For each individual i (i=1,2,…,NP1) in the first subpopulation Subpopulation1, for each dimension k (k=1,2,…,D), perform the following operations: Generate a random number r1 = rand × peri, where rand is a random number uniformly distributed in the interval [0,1].

[0046] If r1≤R, then randomly select individual r2 (r2≠i) from the first subpopulation and update the k-th dimension component according to the following formula:

[0047] If r1 > R, then randomly select individual r3 from the second subpopulation and update the k-th dimension component according to the following formula:

[0048] 5.5 Butterfly Adjustment Operator Operation (Step S4) For each individual j (j=1,2,…,NP2) in the second subpopulation Subpopulation2, perform the following operations: Generate random numbers rand∈[0,1].

[0049] If rand ≤ BAR, then update the k-th dimension component according to the following formula:

[0050] where x_{best,k}^{t} is the k-th dimensional component of the current optimal individual.

[0051] If rand > BAR, update the k-th dimensional component according to the following formula:

[0052] where x_{r4,k}^{t} is the k-th dimensional component of the individual r4 randomly selected from the second sub-population, α is the weight coefficient, and dx_k is the walking step size of the k-th dimension.

[0053] The updated x_{j,k}^{t+1} needs to be discretized through a Sigmoid function:

[0054] where .

[0055] where t is the current number of iterations, and MaxGen is the maximum number of iterations.

[0056] The algorithm may also adopt a local search strategy based on feature correlation, in which features with a correlation lower than the preset threshold ρ with the selected features are preferentially selected for replacement in the local search, where ρ=0.7, and the feature correlation is measured by the Pearson correlation coefficient.

[0057] 5.6 Merging and Iteration (Step S5) Merge the first sub-population and the second sub-population to form a new generation of population. Update the current optimal solution x_best: if there is an individual in the new generation of population whose fitness function value is higher than Fitness_best, update x_best and Fitness_best.

[0058] Determine the termination condition: if the current number of iterations t < MaxGen, return to step S2 to continue the iteration; otherwise, terminate the iteration, and output the feature subset corresponding to the optimal solution x_best as the key feature subset.

[0059] (6) Specific implementation of the multi-scale Markov chain modeling module The multi-scale Markov chain modeling module receives the key feature subset output by the feature screening module, and constructs a multi-scale Markov chain model.

[0060] 6.1 State space definition The state space is defined as {healthy state H, pre-frailty state P, frailty state F}. The definitions of each state are as follows: Healthy state is defined as meeting 0 of the 5 indicators of the Fried frailty phenotype and 0 of the 5 indicators of the FRAIL scale; Pre-frailty state is defined as meeting 1-2 of the 5 indicators of the Fried frailty phenotype, or meeting 1-2 of the 5 indicators of the FRAIL scale; Frailty state is defined as meeting 3 or more of the 5 indicators of the Fried frailty phenotype, or meeting 3 or more of the 5 indicators of the FRAIL scale.

[0061] 6.2 Construction of the State Transition Probability Matrix Based on a subset of key features, a state transition probability matrix M = [m_ij] is constructed, where m_ij represents the probability of transitioning from state i to state j, i,j∈{H,P,F}. The state transition probability matrix satisfies Σ_{j∈{H,P,F}}m_ij=1. The state transition probability is calculated as follows: for each transition from state i to state j, the percentage of transitions from state i to state j within a preset time window is counted.

[0062] 6.3 Multi-scale time window analysis The multi-scale Markov chain modeling module uses three time scales for analysis: The short-term time window is 7 days, which is used to analyze the fluctuations in the health status of elderly cancer patients within 7 days, identify short-term risk signals, calculate the short-term state transition probability matrix, and focus on the short-term transition probability from a healthy state to a pre-frail state.

[0063] The intermediate time window is 90 days, which is used to analyze the trend of health status changes in elderly cancer patients within 90 days, identify intermediate change trajectories, calculate the intermediate state transition probability matrix, and focus on the stability of the pre-frailty state and the trend of transition to the frailty state.

[0064] The long-term time window is 365 days, which is used to analyze the evolution of health status of elderly cancer patients over 365 days, identify long-term risk evolution patterns, calculate the long-term state transition probability matrix, and focus on the long-term evolution path of overall health status.

[0065] The state transition probability matrices of each time window are merged to form a complete risk state sequence.

[0066] 6.4 Calculation and Feedback of State Transition Entropy The multi-scale Markov chain modeling module calculates the state transition entropy H(M) of the current state transition matrix after each construction of the state transition probability matrix:

[0067] Here, it is stipulated that when m_ij=0, m_ij×log2(m_ij)=0. The value range of H(M) is [0,log23], and the lower the value of H(M), the clearer the state boundary.

[0068] The multi-scale Markov chain modeling module transmits the state transition entropy H(M) to the feature selection module in real time. The discrete monarch butterfly optimization algorithm uses H(M) as an adaptive regulation factor for population diversity: when H(M) > 1.0, the algorithm increases the migration step size of individuals in the population by 20% and increases the mutation probability by 15%; when H(M) ≤ 0.5, the algorithm shrinks the search range to the neighborhood of the current optimal solution.

[0069] 6.5 Construction of Weighted State Transition Diagram The multi-scale Markov chain modeling module also constructs a weighted state transition graph based on the driving effect of key features output by the state transition interpretation unit on state transitions. In the graph, nodes represent healthy state H, pre-decay state P, and decay state F. Directed edges between nodes represent the direction of state transition, the weight of the edge represents the probability value of the corresponding state transition, and the thickness of the edge represents the contribution weight distribution of the key features driving the transition.

[0070] (vii) Specific implementation of the interpretable analysis module The interpretable analysis module includes a feature contribution calculation unit, a state transition interpretation unit, an individualized interpretable report generation unit, and a visualization unit. During each iteration of the Discrete Monarch Butterfly optimization algorithm, this module records the frequency with which each candidate feature is selected into the key feature subset and the marginal contribution of the corresponding fitness function, generating a global contribution score for each feature.

[0071] 7.1 Characteristic Contribution Calculation Unit In each iteration of the Discrete Monarch Butterfly optimization algorithm, the feature contribution calculation unit records the frequency of each candidate feature being selected into the key feature subset and the marginal contribution of the corresponding fitness function, and generates a global contribution score for each feature.

[0072] The calculation steps are as follows: For each individual in the discrete monarch butterfly optimization algorithm population, record the fitness function value F(S) of the feature subset S; for each feature f_i in the feature subset S, calculate its marginal contribution Δ_i = F(S) - F(S{f_i}); after completing all T iterations, calculate the global contribution score of feature f_i.

[0073] Where p_i is the frequency at which feature f_i is selected into the feature subset in all iterations, and Δ_i^{(t)} is the marginal contribution of feature f_i in the t-th iteration.

[0074] All features are sorted in descending order of their global contribution score (Score_i) to generate a feature contribution ranking list. The Discrete Monarch Butterfly Optimization Algorithm dynamically reduces the search space based on the global contribution score of each feature, removing features with a global contribution score below a preset threshold θ from the candidate feature set. The preset threshold θ = 0.01 × Σ_{i=1}^{n}Score_i / n, where n is the total number of candidate features.

[0075] 7.2 State Transition Interpretation Unit The state transition interpretation unit calculates the driving effect of each key feature on the transition probability between different health states based on the state transition probability matrix of the multi-scale Markov chain model.

[0076] The method for calculating the driving effect is as follows: For each key feature f_k, calculate the difference in probability of transitioning from a healthy state to a pre-decaying state under the conditions of including and not including the feature:

[0077] And the difference in probability of transitioning from the pre-decay state to the decay state:

[0078] Wherein, P(H→P|f_k∈S) represents the probability of transitioning from a healthy state to a pre-decaying state when the feature subset S contains feature f_k, and P(H→P|f_k∉S) represents the probability of transitioning from a healthy state to a pre-decaying state when the feature subset S does not contain feature f_k.

[0079] The driving effect value, Drive, ranges from -1 to 1. A positive value indicates that the feature promotes state transition, while a negative value indicates that the feature inhibits state transition.

[0080] The state transition interpretation unit generates a ranking list of the driving effects of each key feature on the transition from "health to pre-deterior" and from "pre-deterior to deterioration".

[0081] 7.3 Personalized and Interpretable Report Generation Unit The personalized interpretable report generation unit generates a personalized interpretable report for each elderly cancer patient, based on the outputs of the comprehensive feature contribution calculation unit and the state transition interpretation unit. The report includes the following parts: (a) The patient’s pre-fatal risk comprehensive score and risk level, which are divided into low risk (comprehensive score <0.3), medium risk (0.3≤comprehensive score <0.6) and high risk (comprehensive score ≥0.6). (b) A bar chart showing the individual contribution of each risk factor to the overall risk score for the patient, arranged from highest to lowest contribution; (c) The patient’s current risk status and the probability confidence interval for that status, with the confidence interval at a 95% confidence level; (d) The predicted probability that the patient will transition from the current state to the next risk state within three preset time windows of 30 days, 90 days and 180 days; (e) The top 5 key risk factors driving the patient toward the next risk state and their contribution weights; (f) A list of intervention recommendations based on the aforementioned driving factors.

[0082] 7.4 Visualization Unit The visualization unit graphically displays a global contribution ranking bar chart of each feature, a comparison chart of the driving effects of each feature on the transition from health to pre-frailty and from pre-frailty to frailty, an individualized risk factor contribution map of a single patient, and a risk state transition trajectory map of an individual patient.

[0083] 7.5 Group-level Explainable Analysis Report The individualized interpretable report generation unit is also used to generate interpretable analysis reports at the population level, including: ranking of the global contribution of each risk factor in a pre-defined elderly cancer patient population, ranking of the population driving effect of each risk factor on the transition from a healthy state to a pre-frail state, comparison of the differences in the contribution of risk factors among different tumor type subgroups, and comparison of the differences in the contribution of risk factors among different treatment stages subgroups.

[0084] (viii) Specific implementation of the dynamic risk prediction module The dynamic risk prediction module, based on the risk state sequence output by the multi-scale Markov chain modeling module, determines whether the pre-frailty risk of elderly cancer patients reaches the warning standard and generates corresponding risk warning information.

[0085] The warning criteria are as follows: a yellow warning is triggered when the probability of the pre-frailty state in the risk state sequence exceeds 0.65, indicating that the patient is in a high-risk pre-frailty state and close monitoring and early intervention are recommended; a red warning is triggered when the probability of the frailty state transitions exceeds 0.50, indicating that the patient has a high risk of progressing from the pre-frailty state to the frailty state and immediate clinical intervention is recommended.

[0086] The dynamic risk prediction module receives the feature contribution distribution output by the feature contribution calculation unit of the interpretable analysis module and the state transition driving effect distribution output by the state transition interpretation unit, and dynamically adjusts the warning thresholds for different risk levels. When the number of high-contribution features and the driving effect value exceed the preset level, the warning threshold is lowered to improve warning sensitivity; when the number of high-contribution features and the driving effect value are lower than the preset level, the warning threshold is raised to avoid over-warning.

[0087] (ix) Specific implementation of the model update module The model update module enables the system to learn and evolve continuously online. After the interpretable analysis module generates a personalized interpretable report, the model update module stores the newly generated personalized data and its corresponding risk prediction results as incremental training samples in the incremental sample library.

[0088] When the cumulative number of newly added samples in the incremental sample library reaches 50, the model update process is automatically triggered: Step 1: Merge the incremental samples with the historical training samples to form an updated training dataset; Step 2, re-execute data preprocessing; Step 3: Re-execute the feature selection of the Discrete Monarch Butterfly Optimization Algorithm, based on the updated training dataset, and inherit the historical best solution as the guide for the initial population; Step 4: Re-estimate the parameters (state transition probability matrix) of the multi-scale Markov chain model. Step 5: Update the contribution score and driving effect value database of the interpretable analysis module; Step 6: Deploy the updated model parameters to each prediction module.

[0089] (x) Adaptive linkage mechanism based on interpretable feedback A closed-loop linkage architecture is constructed between the feature selection module, the multi-scale Markov chain modeling module, and the interpretable analysis module, specifically including the following three linkage mechanisms.

[0090] 10.1 First Layer of Linkage: State Transition Entropy Feedback Regulates Population Diversity The multi-scale Markov chain modeling module calculates the state transition entropy H(M) of the current state transition matrix after each state transition probability matrix is ​​constructed, and transmits H(M) to the feature selection module in real time. The discrete monarch butterfly optimization algorithm uses H(M) as an adaptive adjustment factor for population diversity: when H(M) > 1.0, the state boundary is ambiguous, and the algorithm increases the migration step size of individuals in the population by 20% and the mutation probability by 15% to explore a wider feature combination space; when H(M) ≤ 0.5, the state boundary is clear, and the algorithm narrows the search range to the neighborhood of the current optimal solution, accelerating local convergence.

[0091] 10.2 Secondary Linkage: Weighting of Fitness Variance and Selection Discreteness Feedback Correction The Discrete Monarch Butterfly Optimization Algorithm records the fitness variance σ of all individuals in the current population after each iteration. 2 and the dispersion D of the feature selection frequency, and σ 2 The feature contribution calculation unit of the interpretable analysis module is transmitted in real time to D.

[0092] The feature contribution calculation unit calculates the feature contribution based on the received σ. 2 The weights for calculating feature contributions are dynamically adjusted for D as follows:

[0093] Where Weight_base is the base contribution weight of the feature, σ 2 _max is the preset upper limit threshold for fitness variance, σ 2 _max=0.01×(Fitness_max-Fitness_min) 2 Fitness_max and Fitness_min are the maximum and minimum fitness values ​​in the current population, respectively, with D_max=0.5, λ∈(0.1,0.3), and μ∈(0.1,0.3).

[0094] The corrected contribution score is transmitted to the feature selection module as the basis for assigning the dynamic adjustment factor ε in the next iteration. ε increases as the corrected contribution score increases.

[0095] 10.3 Third-level linkage: Driving effect value embedded in fitness function The state transition interpretation unit transmits the driving effect values ​​of each feature it outputs for the transition from the healthy state to the pre-decaying state to the feature selection module in real time. The discrete monarch butterfly optimization algorithm embeds the driving effect values ​​as adaptive penalty coefficients into the fitness function, and the updated fitness function is:

[0096] Where Drive_Effectiveness represents the average driving effect value of the features contained in the current feature subset:

[0097] ε is a dynamic adjustment factor, calculated according to the following formula:

[0098] Where ε0∈(0.01,0.1), η∈(0.1,0.5), m is the number of features in the current feature subset, and Score_i is the global contribution score of the i-th feature.

[0099] Example Example 1: Prediction of pre-frailty risk in elderly lung cancer patients This study included elderly lung cancer patients admitted to the oncology department of a tertiary hospital between January 2023 and December 2025. Inclusion criteria were: age ≥ 60 years; pathologically confirmed primary lung cancer; complete clinical data; and informed consent. Exclusion criteria were: coexisting primary malignancies; severe cognitive impairment preventing cooperation with assessment; and expected survival < 6 months.

[0100] A total of 420 elderly lung cancer patients were included, of whom 268 were male (63.8%) and 152 were female (36.2%), with an age range of 60-89 years and a mean age of 71.3 ± 6.8 years. Tumor type distribution: lung adenocarcinoma 189 cases (45.0%), lung squamous cell carcinoma 156 cases (37.1%), and small cell lung cancer 75 cases (17.9%). TNM stage distribution: stage I 82 cases (19.5%), stage II 96 cases (22.9%), stage III 158 cases (37.6%), and stage IV 84 cases (20.0%).

[0101] The data acquisition module automatically obtains patients' electronic medical record data through the hospital information system interface, including demographic characteristics, tumor-related data, comorbidity and medication data, and laboratory test data; it obtains functional status assessment data and psychosocial assessment data through questionnaires; and it obtains physical examination data through electronic hand grip strength test and timed walking test.

[0102] The data preprocessing module cleaned the data from 420 patients, removing 12 patients with a missing key field rate exceeding 30%, leaving 408 valid samples. Missing values ​​were imputed using the MICE multiple imputation method, with m=5 imputation attempts and maxit=50 maximum iterations. Continuous features were standardized using the Z-score normalization method. After initial screening, the feature processing module generated an initial 72-dimensional feature set.

[0103] The feature selection module employs the Discrete Monarch Butterfly Optimization Algorithm (DME) for feature selection. The algorithm parameters are set as follows: population size NP = 50, maximum number of iterations MaxGen = 200, migration rate R = 0.5, adjustment rate BAR = 0.5, maximum walk step size S_max = 1.0, and migration period peri = 1.2. XGBoost is used as the base prediction model, and 5-fold cross-validation is employed to evaluate fitness. After 200 iterations, the algorithm selects 18 key features from 72 initial features to form a key feature subset.

[0104] According to the Fried frailty phenotype assessment criteria, the baseline status distribution of the 408 patients was as follows: 134 patients (32.8%) were healthy, 196 patients (48.0%) were in the pre-frailty state, and 78 patients (19.1%) were in the frailty state. The multi-scale Markov chain modeling module constructed a state transition probability matrix within a 90-day mid-term time window, with a probability of 0.25 for transitioning from a healthy state to the pre-frailty state and a probability of 0.24 for transitioning from the pre-frailty state to the frailty state.

[0105] The global contribution score ranking output by the interpretable analysis module shows that tumor stage (TNM) ranks first with a contribution score of 0.892, followed by age (0.856) and C-reactive protein (0.823). Analysis of state transition driving effects shows that advanced tumor stage, elevated C-reactive protein, increasing age, and depression are the main contributing factors to the transition from a healthy state to a pre-frail state; while grip strength, albumin, and walking speed are the main protective factors.

[0106] The prediction model was validated using leave-one-out cross-validation. The validation results were: average accuracy 86.3% ± 3.2%, average sensitivity 84.7% ± 4.1%, average specificity 87.5% ± 3.8%, and average AUC 0.912 ± 0.025. These validation results demonstrate that the system described in this invention has high accuracy and stability in predicting the pre-frailty risk in elderly lung cancer patients.

[0107] Example 2: Prediction of pre-frailty risk in elderly patients after colorectal cancer surgery This study included elderly colorectal cancer patients who underwent radical surgery at the gastrointestinal surgery department of a tertiary hospital between June 2022 and June 2025. Inclusion criteria were: age ≥ 60 years; pathologically confirmed colorectal cancer; radical surgical resection; complete perioperative clinical data; and informed consent. Exclusion criteria were: emergency surgery; other primary malignancies; and severe cognitive impairment preventing cooperation in assessment.

[0108] A total of 350 elderly patients who underwent colorectal cancer surgery were included, including 192 males (54.9%) and 158 females (45.1%), with an age range of 60-88 years and a mean age of 69.8 ± 7.2 years. Tumor location distribution: colon cancer in 203 cases (58.0%) and rectal cancer in 147 cases (42.0%). Surgical procedures: laparoscopic surgery in 268 cases (76.6%) and open surgery in 82 cases (23.4%).

[0109] Using the same algorithm parameter settings as in Example 1, the Discrete Monarch Butterfly Optimization Algorithm selected 16 key features from the initial 71-dimensional features. Compared with Example 1, the feature selection results of postoperative colorectal cancer patients showed the following characteristics: the contribution score of surgical method was significantly increased (0.812), ranking second; postoperative complications became an important predictor (contribution score 0.785).

[0110] Within a short time window of 30 days post-surgery, the probability of transitioning from a healthy state to a pre-frail state was 0.35, significantly higher than the 0.25 probability of transition within 90 days for non-surgical patients in Example 1. This suggests that surgical trauma is an important triggering factor driving the transition from a healthy state to a pre-frail state in the short term.

[0111] After a 12-month follow-up, the system demonstrated a sensitivity of 82.3%, a specificity of 85.6%, and an AUC of 0.896 for predicting pre-decompression within 30 days post-surgery. The system's average lead time for warnings was 12.6 days post-surgery, providing a valuable window for early clinical intervention.

[0112] The system described in this invention can be deployed within a hospital's clinical decision support system, interfacing with hospital information systems, laboratory information systems, and electronic medical record systems to achieve automated and intelligent assessment and early warning of pre-frailty risks in elderly cancer patients. The system's output of individualized and interpretable reports can be directly used by clinicians to assist in developing individualized intervention plans. This invention has significant clinical application value and broad prospects for improving the quality of life of elderly cancer patients and reducing the consumption of medical resources.

[0113] This invention can be widely applied to geriatrics, oncology, radiotherapy, and other related departments in medical institutions at all levels (tertiary hospitals, secondary hospitals, and community health service centers). The system adopts a modular design, has good scalability and portability, and can be flexibly configured and its parameters adjusted according to the actual needs of different medical institutions.

[0114] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A pre-frailty risk prediction system for elderly cancer patients based on an improved population algorithm, characterized in that, The system includes: The data acquisition module is used to collect multi-source clinical data from elderly cancer patients and construct a dataset of elderly cancer patients. The data preprocessing module is used to perform data cleaning, missing value imputation, standardization, and feature fusion on the dataset to generate a feature matrix of elderly cancer patients; the missing value imputation adopts multiple imputation method, and the standardization adopts Z-score standardization method. The feature processing module is used to encode and initially filter the feature matrix to form an initial feature set; The feature selection module is used to input the initial feature set into the discrete monarch butterfly optimization algorithm for iterative optimization, using the classification performance of the prediction model as the fitness function, and to select the key feature subset that contributes the most to the prediction of early-stage decay risk. The discrete monarch butterfly optimization algorithm is executed according to the following steps: Step S1, Population Initialization: Set the population size to NP, the maximum number of iterations to MaxGen, the feature dimension to D, the maximum walk step size to S_max, the adjustment rate to BAR, the migration period to peri, and the migration rate to R. Randomly divide the population into a first subpopulation Subpopulation1 and a second subpopulation Subpopulation2, where the number of individuals in the first subpopulation is NP1 and the number of individuals in the second subpopulation is NP2, NP1=ceil(R×NP), NP2=NP-NP1, and the position vector of each individual is a D-dimensional binary vector representing a feature subset; Step S2, Fitness Evaluation: Calculate the fitness function value for each individual based on its current position and record the current optimal solution; Step S3, migration operator operation: For each individual i in the first subpopulation, i=1,2,…,NP1, for each dimension k, k=1,2,…,D, generate a random number r1=rand×peri. If r1≤R, then randomly select individual r2 from the first subpopulation and update the k-th dimension component according to the formula x_{i,k}^{t+1}=x_{r2,k}^{t}; if r1>R, then randomly select individual r3 from the second subpopulation and update the k-th dimension component according to the formula x_{i,k}^{t+1}=x_{r3,k}^{t}. Step S4, Butterfly Adjustment Operator Operation: For each individual j in the second subpopulation, j=1,2,…,NP2, if the random number rand≤BAR, then update the k-th dimension component according to the formula x_{j,k}^{t+1}=x_{best,k}^{t}; otherwise, update the k-th dimension component according to the formula x_{j,k}^{t+1}=x_{r4,k}^{t}+α×(dx_k-0.5), where x_{best,k}^{t} is the k-th dimension component of the current best individual, x_{r4,k}^{t} is the k-th dimension component of the individual r4 randomly selected from the second subpopulation, α is the weight coefficient, and dx_k is the step size of the k-th dimension. Step S5, Merging and Iteration: Merge the first subpopulation and the second subpopulation, update the current optimal solution, and if the maximum number of iterations MaxGen has not been reached, return to step S2 to continue iterating; The multi-scale Markov chain modeling module is used to construct a multi-scale Markov chain model based on the key feature subset, and to divide the health status of elderly cancer patients into healthy status, pre-frailty status and frailty status, and to form a risk status sequence through multi-scale time window analysis. The dynamic risk prediction module is used to determine whether the pre-frailty risk of elderly cancer patients reaches the warning standard based on the risk state sequence, and to generate corresponding risk warning information. The warning standard is as follows: when the retention probability of the pre-frailty state in the risk state sequence exceeds 0.65, a yellow warning is triggered; when the transfer probability of the frailty state exceeds 0.50, a red warning is triggered. An interpretable analysis module, comprising: The feature contribution calculation unit is used to record the frequency of each candidate feature being selected into the key feature subset and the marginal contribution of the corresponding fitness function in each iteration of the discrete monarch butterfly optimization algorithm, and generate a global contribution score for each feature. The state transition interpretation unit is used to calculate the driving effect of each key feature on the transition probability between different health states based on the state transition probability matrix of the multi-scale Markov chain model, and to identify the key risk factors and their contribution weights that drive elderly cancer patients to transition from a healthy state to a pre-frail state. The personalized interpretable report generation unit is used to generate a personalized interpretable report for each elderly cancer patient, which includes the patient's current risk score, the ranking of the contribution of each risk factor, the current risk status, and the analysis of the driving factors for the transition to the next risk status. The system also includes a model update module, which, after the interpretable analysis module generates an individualized interpretable report, uses the newly generated individualized data and its corresponding risk prediction results as incremental training samples. After every 50 newly added sample data, the discrete monarch butterfly optimization algorithm is re-optimized and the parameters of the multi-scale Markov chain model are re-estimated.

2. The system according to claim 1, characterized in that, The fitness function of the discrete monarch butterfly optimization algorithm is constructed in the following way: Fitness = α × Accuracy + β × Sensitivity + γ × Specificity + δ × AUC, where Accuracy is the accuracy of the prediction model, Sensitivity is the sensitivity, Specificity is the specificity, and AUC is the area under the receiver operating characteristic curve; α, β, γ, and δ are preset weight coefficients, α∈(0,1), β∈(0,1), γ∈(0,1), δ∈(0,1), and α+β+γ+δ=1; The state transition interpretation unit transmits the driving effect values ​​of each feature it outputs for the transition from a healthy state to a pre-decaying state to the feature selection module in real time. The discrete monarch butterfly optimization algorithm embeds these driving effect values ​​as adaptive penalty coefficients into the fitness function, and the updated fitness function is: Fitness_new = α × Accuracy + β × Sensitivity + γ × Specificity + δ × AUC + ε × Drive_Effectiveness where Drive_Effectiveness represents the average driving effect value of the features contained in the current feature subset, and ε is a dynamic adjustment factor, calculated according to the following formula: ε = ε0 × (1 + η × Σ_{i=1}^{m}Score_i / m) where ε0 is the preset baseline value, ε0∈(0.01,0.1), η is the preset scaling factor, η∈(0.1,0.5), m is the number of features in the current feature subset, and Score_i is the global contribution score of the i-th feature.

3. The system according to claim 1, characterized in that, The feature contribution calculation unit calculates the global contribution score of each feature in the following manner: For each individual in the discrete monarch butterfly optimization algorithm population, the feature subset S corresponding to the feature subset is recorded. The fitness function value F(S) of the feature subset is recorded. For each feature f_i in the feature subset S, its marginal contribution Δ_i = F(S) - F(S{f_i}) is calculated. The product of the frequency p_i in which feature f_i is selected into the feature subset in all iterations and the average marginal contribution is used as the global contribution score of the feature. Score_i = p_i × (1 / T) × Σ_{t=1}^{T}Δ_i^{(t)} where T is the total number of iterations and Δ_i^{(t)} is the marginal contribution of feature f_i in the t-th iteration; The feature contribution calculation unit sorts all features in descending order according to their global contribution scores and transmits the sorting results to the feature filtering module. The discrete monarch butterfly optimization algorithm dynamically reduces the search space based on the global contribution scores of each feature, and removes features with global contribution scores lower than a preset threshold θ from the candidate feature set. The preset threshold θ = 0.01 × Σ_{i=1}^{n}Score_i / n, where n is the total number of candidate features.

4. The system according to claim 1, characterized in that, The state space constructed by the multi-scale Markov chain modeling module is {healthy state H, pre-decay state P, and decay state F}, and the state transition probability matrix is ​​M=[m_ij], where m_ij represents the probability of transitioning from state i to state j, i,j∈{H,P,F}, and the state transition probability matrix satisfies Σ_{j∈{H,P,F}}m_ij=1, i∈{H,P,F}; The multi-scale Markov chain modeling module calculates the state transition entropy H(M) of the current state transition matrix after each construction of the state transition probability matrix: H(M) = -Σ_{i∈{H,P,F}}Σ_{j∈{H,P,F}}m_ij×log2(m_ij) where H(M) represents the clarity of the current feature subset in distinguishing the three health states. The value of H(M) ranges from [0,log23]. The lower the value of H(M), the clearer the state boundary. The multi-scale Markov chain modeling module transmits the state transition entropy H(M) to the feature selection module in real time. The discrete monarch butterfly optimization algorithm uses H(M) as an adaptive regulation factor for population diversity: when H(M) > 1.0, the algorithm increases the migration step size of individuals in the population by 20% and increases the mutation probability by 15%; when H(M) ≤ 0.5, the algorithm shrinks the search range to the neighborhood of the current optimal solution.

5. The system according to claim 1, characterized in that, The discrete monarch butterfly optimization algorithm records the fitness variance σ of all individuals in the current population after each iteration. 2 and the dispersion D of the feature selection frequency, and σ 2 The feature contribution calculation unit of the interpretable analysis module is transmitted in real time to D; The feature contribution calculation unit calculates the feature contribution based on the received σ. 2 The weights for calculating feature contributions are dynamically adjusted for D as follows: Weight_corrected=Weight_base×(1-λ×σ 2 / σ 2 _max-μ×D / D_max) where Weight_base is the base contribution weight of the feature, σ 2 _max is the preset upper limit threshold for fitness variance, σ 2 _max=0.01×(Fitness_max-Fitness_min) 2 Fitness_max and Fitness_min are the maximum and minimum fitness values ​​in the current population, respectively. D_max is the preset upper limit threshold for feature selection frequency dispersion, D_max=0.

5. λ and μ are preset suppression coefficients, λ∈(0.1,0.3) and μ∈(0.1,0.3). The corrected contribution score is transmitted to the feature selection module as the basis for assigning the dynamic adjustment factor ε in the next iteration. ε increases as the corrected contribution score increases.

6. The system according to claim 1, characterized in that, The state transition interpretation unit calculates the driving effect of each key feature on the state transition in the following manner: For each key feature f_k, calculate the difference in probability of transitioning from a healthy state to a pre-decaying state under the conditions of including and not including the feature: Drive_{H→P}(f_k)=P(H→P|f_k∈S)-P(H→P|f_k∉S) And the difference in probability of transitioning from the pre-decay state to the decay state: Drive_{P→F}(f_k)=P(P→F|f_k∈S)-P(P→F|f_k∉S) where, P(H→P|f_k∈S) represents the probability of transitioning from a healthy state to an early-stage weakened state when the feature subset S contains feature f_k, and P(H→P|f_k∉S) represents the probability of transitioning from a healthy state to an early-stage weakened state when the feature subset S does not contain feature f_k; P(P→F|f_k∈S) represents the probability of transitioning from an early-stage weakened state to a weakened state when the feature subset S contains feature f_k, and P(P→F|f_k∉S) represents the probability of transitioning from an early-stage weakened state to a weakened state when the feature subset S does not contain feature f_k; The state transition interpretation unit uses the probability difference as the driving effect value of the feature on the corresponding state transition, and generates a ranking list of the driving effects of each key feature on the transition from health to pre-deterioration and from pre-deterioration to deterioration. The driving effect value ranges from [-1, 1], with positive values ​​indicating that the feature promotes state transition and negative values ​​indicating that the feature inhibits state transition.

7. The system according to claim 1, characterized in that, The personalized interpretable report generated by the personalized interpretable report generation unit includes the following: (a) The patient’s pre-fatal risk comprehensive score and risk level, which are divided into low risk (comprehensive score <0.3), medium risk (0.3≤comprehensive score <0.6) and high risk (comprehensive score ≥0.6). (b) A bar chart showing the individual contribution of each risk factor to the overall risk score for the patient, arranged from highest to lowest contribution; (c) The patient’s current risk status and the probability confidence interval for that status, with the confidence interval at a 95% confidence level; (d) The predicted probability that the patient will transition from the current state to the next risk state within three preset time windows of 30 days, 90 days and 180 days; (e) The top 5 key risk factors driving the patient toward the next risk state and their contribution weights; (f) A list of intervention recommendations based on the aforementioned driving factors.

8. The system according to claim 1, characterized in that, The multi-scale time window of the multi-scale Markov chain modeling module includes: A short-term time window is used to analyze the fluctuations in the health status of elderly cancer patients within a preset first time period and to identify short-term risk signals. The first time period is 7 days. The intermediate time window is used to analyze the trend of health status changes in elderly cancer patients within a preset second time period and to identify the intermediate change trajectory. The second time period is 90 days. A long-term time window is used to analyze the evolution of the health status of elderly cancer patients within a preset third time period and to identify long-term risk evolution patterns. The third time period is 365 days. The multi-scale Markov chain modeling module also constructs a weighted state transition graph based on the driving effect of each key feature output by the state transition interpretation unit on the state transition. In this graph, nodes represent healthy state, pre-decay state, and decay state, the weight of the edge represents the probability of the corresponding state transition, and the color or thickness of the edge represents the contribution weight distribution of the key feature driving the transition.

9. The system according to claim 1, characterized in that, The multi-source clinical data collected by the data acquisition module includes the following categories: (a) Demographic data, including age, sex, and education level; (b) Tumor-related data, including tumor type, tumor stage, pathological classification, treatment type, drug regimen and duration of medication; (c) Comorbidity and medication data, including the types and number of comorbidities, and the types and quantities of medications used; (d) Laboratory test data, including complete blood count, liver and kidney function, inflammatory markers, and nutritional indicators; (e) Functional status assessment data, including scores for activities of daily living and instrumental activities of daily living; (f) Psychosocial assessment data, including depression score, anxiety score, and social support score; (g) Physical examination data, including grip strength, walking speed, and body mass index; The criteria for determining the pre-frailty state are based on at least one of the Fried Frailty Phenotypic Assessment Criteria or the FRAIL scale, combined with tumor-specific indicators of elderly cancer patients for comprehensive assessment. The Fried Frailty Phenotypic Assessment Criteria includes 5 indicators: involuntary weight loss, decreased grip strength, self-reported fatigue, slowed walking speed, and reduced physical activity. Those who meet 1-2 of these criteria are considered to be in the pre-frailty state. The FRAIL scale includes 5 indicators: fatigue, resistance, walking ability, illness, and weight loss. Those who meet 1-2 of these criteria are considered to be in the pre-frailty state.

10. The system according to claim 1, characterized in that, The discrete monarch butterfly optimization algorithm employs at least one of the following improvement strategies: (a) A population initialization strategy based on feature contribution scores, which makes the individuals in the initial population biased to include features with high contribution scores. Specifically, features are sorted from high to low according to feature contribution scores. When generating individuals in the initial population, the probability of the top 30% of features being selected is 0.8, and the probability of the remaining features being selected is 0.

2. (b) Adaptive migration operator, which dynamically adjusts the migration step size according to the iteration process, specifically: migration step size S = S_max × (1-t / MaxGen), where t is the current iteration number and MaxGen is the maximum iteration number; (c) A local search strategy based on feature relevance, in which features with a relevance lower than a preset threshold ρ are preferentially selected for replacement in the local search, wherein the preset threshold ρ = 0.7 and the feature relevance is measured by the Pearson correlation coefficient; The individualized interpretable report generation unit is also used to generate a population-level interpretable analysis report, which includes: in a preset elderly cancer patient population, the global contribution ranking of each risk factor, the population driving effect ranking of each risk factor on the transition from a healthy state to a pre-frail state, the comparison of the differences in the contribution of risk factors among different tumor type subgroups, and the comparison of the differences in the contribution of risk factors among different treatment stage subgroups.