A tumor patient intelligent nutrition recommendation method based on metabolic rhythm synchronization
By integrating multi-source physiological data and clinical information, and utilizing bidirectional long short-term memory networks and conditional generative adversarial networks to generate personalized nutritional intervention strategies, the problem of metabolic rhythm differences in nutritional support for cancer patients has been solved, achieving precise nutritional intervention and efficient recipe generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- KANGAI MEDICAL TECHNOLOGY (JIANGSU) CO LTD
- Filing Date
- 2026-03-17
- Publication Date
- 2026-06-19
Smart Images

Figure CN122245627A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of nutritional recommendation methods, and in particular to an intelligent nutritional recommendation method for cancer patients based on metabolic rhythm synchronization. Background Technology
[0002] Currently, nutritional support for cancer patients mainly relies on two types of methods: one is to calculate daily requirements based on static anthropometric parameters (such as weight and height) and provide standardized enteral or parenteral nutrition formulas; the other is to provide routine dietary recommendations based on general dietary guidelines.
[0003] These traditional methods suffer from several drawbacks in practice, including neglecting the temporal heterogeneity of metabolism, lacking targeted differentiation, poor adaptability to accompanying symptoms, and delayed adjustments without a closed-loop mechanism. Adopting a homogenized, continuous nutrient supply model can easily lead to supplementation during periods of high tumor metabolism, while insufficient nutrient supply occurs during the host's synthetic repair phase, thus affecting nutrient utilization efficiency. Furthermore, existing methods assume indiscriminate nutrient intake by both the host and tumor; however, the differences between the tumor microenvironment and the host environment result in different nutrient absorption rhythms. In addition, when generating specific diet plans, a systematic approach incorporates subjective symptom parameters such as the patient's current taste disturbances and appetite levels. By dynamically adjusting the flavor, texture, and presentation of food through optimization algorithms, personalized diet plans that are more acceptable to the patient and meet nutritional goals are generated, effectively improving dietary adherence.
[0004] This demonstrates that current approaches, which often focus on regulating single-host metabolic indicators, generally overlook the competitive and rhythmic metabolic differences between tumors and hosts. This makes it difficult to quantify and utilize these temporal differences to strategically avoid potential tumor promotion while meeting host needs. The translation chain from in-depth metabolic analysis to executable personalized recipes remains fragmented, with decision-making processes relying on experience and lacking a systematic solution that seamlessly integrates rhythmic analysis, temporal constraint optimization, and multi-objective recipe generation. Summary of the Invention
[0005] To address the problems existing in the prior art, the main objective of this invention is to provide an intelligent nutrition recommendation method for cancer patients based on metabolic rhythm synchronization. By integrating dynamic multi-source physiological data and clinical information, the method analyzes and quantifies the differences in metabolic rhythms between the host and the tumor, and imposes constraints on nutritional intervention in the time dimension, thereby obtaining a daily diet that takes into account nutritional accuracy, patient acceptance, and practical feasibility, providing cancer patients with intelligent decision-making tailored to the times.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: A smart nutrition recommendation method for cancer patients based on metabolic rhythm synchronization includes the following steps: Step S1: Obtain raw time-series physiological data from continuous glucose monitoring devices and smart wearable devices through the patient terminal, and obtain clinical information including the patient's tumor type and current treatment stage. Align the multi-source physiological data to a unified time grid through interpolation and resampling to form standardized multimodal time-series data. Step S2: Calculate the statistical features within a preset time window from the standardized multimodal time series data, and extract rhythmic features through frequency domain transformation to generate a feature vector for modeling. Step S3: Input the feature vector into the trained bidirectional long short-term memory network to predict the host metabolic activity curve; Step S4: Construct a conditional generative adversarial network based on a knowledge graph of prior knowledge of tumor metabolism. Using the host metabolic activity curve, tumor type and current treatment stage as conditions, the tumor metabolic activity curve is inferred and generated through the conditional generative adversarial network. Step S5: Calculate the phase difference and time overlap between the host metabolic activity curve and the tumor metabolic activity curve to generate a time separation potential heatmap; Step S6: Using the features including the time separation potential heatmap, tumor type and current treatment stage as state input, a proximal policy optimization algorithm integrating Lagrange multiplier constraints is used to make a decision, and outputs a sequence of nutrient delivery actions divided into time periods at fixed intervals within the future basal metabolic cycle, wherein each action includes the delivery amount of protein, carbohydrates and fat, and the decision-making process satisfies the temporal nutrient constraints set based on the time separation potential heatmap, tumor type and current treatment stage; Step S7: Using the nutrient delivery action sequence as the target, and based on the current treatment stage, an optimization algorithm is used to search and optimize the recipe database to generate a daily recipe plan that balances multiple objectives such as nutritional fit, taste preference, preparation complexity, and cost.
[0007] As a preferred embodiment, in step S3, the bidirectional long short-term memory network has a two-layer structure, with its input being a sequence of feature vectors for 7 consecutive days and its output being a sequence of predicted blood glucose values for the next 24 hours at 5-minute intervals. Step S3 further includes a post-processing step, which performs a moving average smoothing process on the initial predicted value output by the network and limits its value to a preset physiological range.
[0008] As a preferred embodiment, in step S4, the knowledge graph is constructed by extracting entities and relationships related to detoxification tumor metabolism from medical literature and databases; The input condition vector of the conditional generative adversarial network is formed by splicing and fusing the high-level representation of the host metabolic activity curve, the tumor type encoding, the current treatment stage encoding, and the prior knowledge vector from the knowledge graph. Step S4 also includes physiologically reasonable constraints and smoothing of the generated tumor metabolic activity curve.
[0009] As a preferred embodiment, in step S5, calculating the phase difference includes detecting the peak time points of the two metabolic activity curves within 24 hours and calculating the absolute value of their time difference. Calculating the overlap of the time periods includes dividing 24 hours into multiple overlapping time periods, calculating the area under the curves of the two curves in each time period, and calculating the overlap ratio based on the area of the common active part. Generating the time separation potential heatmap includes calculating the separation potential index for each time point based on the phase difference and the overlap of each time period, and mapping it onto a continuous color scale.
[0010] As a preferred embodiment, step S1 specifically includes: the original time-series physiological data being transmitted to a local server or cloud platform via a Bluetooth gateway; the clinical information being extracted from electronic medical records and laboratory information systems via an interface; and the alignment to a unified time grid including timestamp synchronization correction based on the clock of the continuous glucose monitoring device, and resampling via linear interpolation using fixed time intervals as grid points. Step S1 also includes identifying and removing outliers caused by motion artifacts, and interpolating to complete short-term signal loss.
[0011] As a preferred embodiment, in step S2, the preset time window is 72 hours and the sliding step is 24 hours; The statistical features include mean, variance, linear fit slope, area under the curve, skewness, and kurtosis. The frequency domain transformation is a fast Fourier transform, and the extracted rhythm features include the dominant frequency, corresponding amplitude, and phase. Step S2 further includes using principal component analysis to reduce the dimensionality of the spliced time-domain and frequency-domain features in order to generate the feature vector.
[0012] As a preferred embodiment, in step S6, the temporal nutritional constraint includes: during periods of high tumor activity indicated by the time separation potential heatmap, the amount of carbohydrates delivered must not exceed a preset threshold. The proximal policy optimization algorithm that integrates Lagrange multiplier constraints transforms nutrient constraints into penalty terms and incorporates them into the objective function for optimization through the Lagrange relaxation method.
[0013] As a preferred embodiment, in step S7, the optimization algorithm is a genetic algorithm, in which chromosomes use hybrid encoding, discrete genes represent dishes selected from the recipe database, and continuous genes represent dish portion scaling factors. Step S7 also includes an fitness assessment step, which comprehensively calculates the weighted scores of four sub-objectives: nutritional fit, taste preference, preparation complexity, and cost. When generating the daily menu plan, the weights are dynamically adjusted and optimized based on the current treatment stage, and specific types of dishes are avoided for patients in the disease treatment period.
[0014] As a preferred embodiment, the method further includes: Step S8: Parse and map the daily recipe plan generated in step S7 into a combination of purchasable product inventory units, connect to the e-commerce platform through an interface to perform dynamic price comparison and inventory check, and generate a pre-filled shopping cart link.
[0015] As a preferred embodiment, the method further includes: Step S9: Based on the nutrient delivery action sequence output in step S6 and the current treatment stage, match and combine clinical nutritional foods, symptom relief products, home medical devices and digital services from the predefined product service library to generate a personalized subscription product service package plan.
[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) In this invention, by integrating the original time-series physiological data from continuous glucose monitoring devices and smart wearable devices, and fusing clinical information such as the patient's tumor type and current treatment stage, the multi-source heterogeneous data is aligned to a unified time grid through interpolation and resampling, forming standardized multimodal time-series data, which lays a high-quality data foundation for subsequent accurate modeling. On this basis, feature vectors are constructed by extracting statistical features and frequency domain rhythm features in a rolling manner, and modeling is performed using a bidirectional long short-term memory network, achieving high-precision prediction of the host metabolic activity curve. Furthermore, a conditional generative adversarial network is constructed based on the knowledge graph of prior knowledge of tumor metabolism, and the tumor metabolic activity curve is inferred and generated using the host metabolic activity curve, tumor type, and treatment stage as conditions. By calculating the phase difference and time overlap between the two, a time separation potential heatmap is generated, thereby intuitively revealing the metabolic time-series features that can be used for differentiated intervention. Subsequently, using the heatmap, tumor type, and treatment stage as state inputs, a proximal strategy optimization algorithm integrating Lagrange multiplier constraints is employed for decision-making. This automatically outputs a time-segmented nutrient delivery sequence within the future basal metabolic cycle, satisfying complex temporal nutritional constraints. This achieves precise and automated planning of nutritional intervention strategies in the temporal dimension. Finally, the generated nutrient delivery sequence is used as the objective, combined with the current treatment stage, to perform multi-objective search and optimization on the recipe database using an optimization algorithm. This generates a daily diet plan that balances nutritional relevance, taste preference, preparation complexity, and cost. This complete technological closed loop realizes the entire process from dynamic perception of multi-source physiological data, quantitative analysis of metabolic rhythms, automatic generation of temporal nutritional strategies, to the implementation of executable recipes, significantly improving the individualized accuracy, temporal adaptability, and clinical feasibility of nutritional interventions.
[0017] (2) Further, this invention employs a two-layer bidirectional long short-term memory network that takes a continuous 7-day feature vector sequence as input and outputs a 24-hour blood glucose prediction sequence at 5-minute intervals. This network, supplemented by post-processing moving average smoothing and physiological range constraints, achieves high-frequency, high-precision dynamic prediction of the host metabolic activity curve, effectively overcoming the limitations of traditional static or segmented models in capturing subtle metabolic fluctuations and delayed responses. Furthermore, by constructing a knowledge graph integrating prior knowledge of gastrointestinal tumor metabolism and designing a conditional vector composed of high-level host metabolic curve representations, tumor type encoding, treatment stage encoding, and prior knowledge vectors, a conditional generative adversarial network is driven to infer tumor metabolic activity curves that conform to tumor metabolic patterns and are associated with the individual host state. This technical approach transforms the difficult-to-observe tumor metabolic rhythm into a quantifiable and analyzable curve, which, together with the host metabolic prediction curve, supports the accurate generation of subsequent time-separated potential heatmaps. This provides a reliable and interpretable basis for synchronous analysis of metabolic rhythms in implementing precise and personalized nutritional interventions over time.
[0018] (3) Further, this invention automatically parses and maps the generated daily diet plan into a combination of purchasable commodity inventory units, and based on this, connects to e-commerce platforms via an interface to perform dynamic price comparison and inventory checks, ultimately generating a pre-filled shopping cart link, thereby directly connecting the scientific nutritional recommendation plan with convenient commodity procurement services. This step effectively solves the problem of plan-execution disconnect caused by inconvenient ingredient procurement, uncontrollable costs, or lack of inventory information in the actual implementation of traditional nutritional intervention plans. Through technical means, it achieves a seamless transformation from theoretical diet plans to an accessible, affordable, and one-click purchase list of commodities. This not only significantly reduces the patient's execution cost and cognitive burden, and improves the compliance and operability of the nutritional intervention plan, but also constructs a complete implementation closed loop integrating scientific analysis, personalized recommendations, and commercial services, enhancing the system's practicality and user stickiness.
[0019] (4) Further, this invention intelligently matches and combines clinical nutritional foods, symptom relief products, home medical devices, and digital services from a predefined product and service library based on the nutrient delivery sequence and the current treatment stage to generate personalized subscription-based product and service packages. This expands precision nutrition intervention from a single recipe recommendation to a comprehensive and continuous health management solution encompassing products, devices, and services. This method uses the output time-series nutrition strategy as a key input to drive personalized product and service matching, achieving automatic mapping and packaging from nutritional time-series recommendations to integrated care resources. This effectively solves the pain points of the traditional model where nutritional advice, symptom management, home monitoring, and professional services are fragmented and require patients to coordinate multiple aspects themselves. It not only significantly improves the synergy and convenience of care and reduces the management burden on patients and their families, but also provides an operable business and technical framework for continuous and dynamic health management through a subscription service model, enhancing the long-term stickiness and overall effectiveness of the intervention plan. Attached Figure Description
[0020] Figure 1 This is a flowchart illustrating a method according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating step S1 in a method according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating step S2 in the method according to an embodiment of the present invention; Figure 4 This is a flowchart illustrating step S3 in the method according to an embodiment of the present invention; Figure 5 This is a flowchart illustrating step S4 in the method according to an embodiment of the present invention; Figure 6 This is a flowchart illustrating step S5 in a method according to an embodiment of the present invention; Figure 7 This is a flowchart illustrating step S6 in the method according to an embodiment of the present invention; Figure 8 This is a flowchart illustrating step S7 in the method according to an embodiment of the present invention; Figure 9 This is a flowchart illustrating step S8 in a method according to an embodiment of the present invention; Figure 10 This is a flowchart illustrating step S9 in the method according to an embodiment of the present invention. Detailed Implementation
[0021] To better illustrate the objectives, technical solutions, and advantages of the present invention, the specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
[0022] See attached document Figures 1 to 8 This invention provides a method for intelligent nutrition recommendation for cancer patients based on metabolic rhythm synchronization. The method includes the following steps: Step S1: Obtain raw time-series physiological data from continuous glucose monitoring devices and smart wearable devices through the patient terminal, and obtain clinical information including the patient's tumor type and current treatment stage. Align the multi-source physiological data to a unified time grid through interpolation and resampling to form standardized multimodal time-series data. Step S2: Calculate the statistical features within a preset time window from the standardized multimodal time series data, and extract rhythmic features through frequency domain transformation to generate a feature vector for modeling. Step S3: Input the feature vector into the trained bidirectional long short-term memory network to predict the host metabolic activity curve; Step S4: Construct a conditional generative adversarial network based on a knowledge graph of prior knowledge of tumor metabolism. Using the host metabolic activity curve, tumor type and current treatment stage as conditions, the tumor metabolic activity curve is inferred and generated through the conditional generative adversarial network. Step S5: Calculate the phase difference and time overlap between the host metabolic activity curve and the tumor metabolic activity curve to generate a time separation potential heatmap; Step S6: Using the features including the time separation potential heatmap, tumor type and current treatment stage as state input, a proximal policy optimization algorithm integrating Lagrange multiplier constraints is used to make a decision, and outputs a sequence of nutrient delivery actions divided into time periods at fixed intervals within the future basal metabolic cycle, wherein each action includes the delivery amount of protein, carbohydrates and fat, and the decision-making process satisfies the temporal nutrient constraints set based on the time separation potential heatmap, tumor type and current treatment stage; Step S7: Using the nutrient delivery action sequence as the target, and based on the current treatment stage, an optimization algorithm is used to search and optimize the recipe database to generate a daily recipe plan that balances multiple objectives such as nutritional fit, taste preference, preparation complexity, and cost.
[0023] During the operation of this method, raw time-series physiological data from continuous glucose monitoring devices and smart wearable devices are simultaneously acquired through the patient's terminal. Clinical information, including the patient's tumor type and current treatment stage, is also extracted from the hospital information system. This multi-source heterogeneous data is then aligned to a unified time grid using interpolation and resampling techniques, forming standardized multimodal time-series data. This provides a precise and consistent temporal foundation for subsequent analysis. Next, statistical features within a preset time window are extracted from this standardized data, and their inherent rhythmic characteristics are analyzed through frequency domain transformation. This generates a low-dimensional feature vector that integrates time and frequency domain information, comprehensively characterizing the patient's short-term metabolic state and long-term circadian rhythms.
[0024] Subsequently, this feature vector is input into a pre-trained bidirectional long short-term memory network. The network learns the contextual dependencies of historical sequences to predict a host metabolic activity curve reflecting changes in normal host tissue metabolism. Simultaneously, a knowledge graph constructed based on prior knowledge of tumor metabolism is encoded as a vector and, together with the aforementioned host metabolic activity curve, tumor type, and treatment stage information, constitutes the conditional input, driving a conditional generative adversarial network to infer and generate a tumor metabolic activity curve that is difficult to observe directly. By calculating the phase difference and overlap between these two curves at different time periods, the system quantifies the metabolic competition between the host and tumor into a temporal separation potential heatmap. This heatmap visually identifies the differentiated time windows throughout the day suitable for nutritional support or requiring nutritional restriction.
[0025] Subsequently, this temporal separation potential heatmap, along with tumor type and treatment stage, is used as state input and fed into a proximal policy optimization algorithm integrating Lagrange multiplier constraints. The algorithm simulates a sequential decision-making process under temporal constraints, outputting a sequence of nutrient delivery actions divided at fixed intervals within a future basal metabolic cycle. Each action precisely includes the delivery amounts of protein, carbohydrates, and fats, and the entire sequence strictly adheres to the temporal nutrient constraints derived from the heatmap and clinical information, thus achieving targeted planning of nutrient supply in the temporal dimension.
[0026] Finally, using the aforementioned nutrient delivery sequence as the nutritional target, and based on the patient's current treatment stage, an optimization algorithm is employed to perform multi-target search and matching on the recipe database. This process simultaneously considers multiple practical factors such as nutritional fit, patient taste preferences, dish preparation complexity, and economic costs, ultimately generating an executable, acceptable, and balanced personalized daily diet plan. This completes the entire closed loop from quantitative analysis of metabolic rhythms to the implementation of daily dietary actions.
[0027] Therefore, according to an embodiment of the present invention, a method for intelligent nutrition recommendation for cancer patients based on metabolic rhythm synchronization analyzes and quantifies the differences in metabolic rhythms between the host and the tumor by integrating dynamic multi-source physiological data and clinical information, and constrains nutritional intervention in the time dimension to obtain a daily diet that takes into account nutritional accuracy, patient acceptance and practical feasibility, providing cancer patients with intelligent decision-making that is tailored to the times.
[0028] In this embodiment, step S1 can be broken down into the following sub-steps: Step S11: Multi-source data acquisition and transmission. Data acquisition is conducted synchronously on a patient-by-patient basis. Patients must wear two medical-grade monitoring devices simultaneously: a medical-grade continuous glucose monitor to collect interstitial fluid glucose concentration data once per minute; and a smart bracelet to synchronously collect physiological and activity parameters such as heart rate, body temperature, and triaxial acceleration once per second. The raw data streams collected by all devices are transmitted in real-time via Bluetooth Low Energy technology through a Bluetooth gateway deployed in the ward or home environment to a receiving server deployed locally in the hospital data center or a securely certified cloud platform for centralized storage.
[0029] Simultaneously, the system automatically retrieves the patient's clinical background information through standardized data exchange interfaces of the hospital information system, such as HL7 or FHIR. This process requires no manual intervention. The system extracts the patient's tumor pathology diagnosis, TNM stage, current treatment plan and cycle from the electronic medical record; extracts a series of biochemical test results, including albumin and prealbumin, from the laboratory information system; and extracts historical and current medication records from the medical order system. These clinical and real-time physiological data are linked through the patient's unique identifier.
[0030] Step S12: Timestamp Synchronization and Benchmark Unification. To achieve strict timing alignment of physiological data streams from different independent devices, this step implements a precise time synchronization mechanism. The system designates the internal high-precision clock of the continuous glucose monitor as the benchmark master clock for the entire data processing flow. For other devices such as smart bracelets, the original timestamps in their data packets may have inherent drift. The system borrows and implements the core algorithm of the open-source synchronization framework Syntalos to continuously monitor and statistically analyze the data streams from other devices. By calculating the relative time offset and dynamically establishing a drift model, the system compensates and corrects the timestamps of non-benchmark devices with millisecond-level precision. Finally, all data streams are uniformly mapped to an absolute timeline based on the benchmark master clock, resolving the data misalignment problem caused by asynchronous device clocks.
[0031] Step S13: Gridded Resampling and Data Integration. Based on a unified timeline, the system defines a fixed-period time grid. In this embodiment, a five-minute time window is used to divide the continuous time series into discrete, equally spaced time points. Different resampling strategies are adopted for data of different frequencies: For high-frequency data generated per second by the smart bracelet, the system calculates the arithmetic mean of all valid sampling points within each five-minute time window, using this as the representative value of the grid point for that time window; for data with a sampling frequency lower than the grid frequency or instantaneous missing values at grid points, the system uses a linear interpolation algorithm to estimate and fill in the missing values using the valid values of adjacent grid points. This process uniformly resamples all physiological signals to the same standard time series with five-minute intervals, forming a preliminarily aligned multidimensional time series.
[0032] Linear interpolation is used for resampling to a uniform grid. The original data point set is... The target unified time network is For each ,like Then the interpolation result is: ; in, This represents the timestamp and physiological signal value (such as blood glucose or heart rate) of the i-th raw data point. This represents the j-th time point of the uniform grid (e.g., one point every 5 minutes). Indicates in The interpolation result at the given point represents the aligned physiological signal value. Therefore, it is assumed that the change in physiological signal is linear between two known original data points. Thus, for a target grid point, the signal value is calculated linearly based on the time distance between its two nearest preceding and following original data points. This algorithm synchronizes asynchronous, multi-frequency physiological data collected from different devices to a unified time reference, forming a standardized multimodal time-series data table, providing consistent input for subsequent feature extraction.
[0033] Step S14: Automated Quality Control and Dataset Generation. This step automates the cleaning and quality improvement of the resampled data. The system has a pre-defined quality control logic based on statistical rules: for example, for heart rate data, it calculates the mean and standard deviation within a sliding time window in real time, and applies the three-standard-deviation principle for screening, automatically identifying and marking abnormal peaks that significantly deviate from the normal range due to artifacts such as strenuous exercise, and discarding them as invalid data. For brief signal loss segments that may occur in continuous glucose monitoring data and last for less than 15 minutes, the system uses time-series linear interpolation to reasonably complete the data to ensure data continuity.
[0034] After processing through all the above sub-steps, the system ultimately generates a structured, patient-granular, standardized multidimensional time-series dataset. This dataset is organized in tabular form, with each row representing a unique standardized five-minute time point, and each column representing a specific variable after synchronization, alignment, resampling, and quality control, including physiological parameters such as blood glucose, heart rate, and body temperature, and correlated with the patient's static clinical information variables. This dataset resolves the issues of temporal misalignment and quality inconsistencies in the integration of multi-source heterogeneous data, providing a directly usable, high-quality data foundation for subsequent time-series analysis, feature engineering, and machine learning modeling.
[0035] In this embodiment, step S2 specifically transforms the standardized, equally spaced time-series data into feature vectors that characterize its short-term dynamics, long-term trends, and potential circadian rhythm patterns, providing information-rich digital input for subsequent prediction models. The specific implementation process is as follows: Step S21: Sliding Window Division and Data Analysis Unit Generation. To achieve fragmented analysis of continuous physiological data, the system first defines a fixed analysis time window length, set to 72 hours in this embodiment, equivalent to 864 consecutive 5-minute time grid points. Simultaneously, the sliding step size of the window is set to 24 hours. During processing, starting from the beginning time point of a patient's standardized dataset, continuous data subsequences of 72 hours in length are sequentially extracted, sliding forward 24 hours each time to obtain the next analysis window. This operation generates a series of temporally overlapping data analysis units, each containing all aligned physiological parameter time series within that 72-hour period, thus ensuring that the analysis covers continuous physiological state changes and has sufficient temporal resolution.
[0036] Step S22: Calculation of Time-Domain Statistical Features. For each 72-hour analysis window generated in step S21, the system independently performs a set of batch statistical calculations on each column of physiological time-series data, quantifying the data characteristics within that time period from multiple dimensions. The generated basic time-domain feature set includes: mean and median reflecting the central tendency of the data; variance, standard deviation, and coefficient of variation characterizing the dispersion of the data; slope of the univariate linear regression trend line describing the overall direction of change; area under the curve representing the cumulative load of physiological signals within that time period; and skewness and kurtosis assessing the distribution shape of the data. Skewness measures the asymmetry of the distribution, while kurtosis reflects the sharpness or flatness of the distribution curve compared to a normal distribution. This series of calculations transforms the original waveform of each physiological parameter within the window into a set of statistically significant values. Taking blood glucose data as an example, for the window... The formulas for calculating its mean and the slope of the linear trend are: , ; in, This represents the blood glucose value at the i-th time point within the window; Indicates the corresponding point in time; This represents the average value at time points within the window. This indicates the average blood glucose level within the window; The slope represents the linear fit, reflecting the upward (positive) or downward (negative) trend of blood glucose during that period. The mean is the arithmetic average of all data within the window, used to characterize the central position of the signal. The slope is obtained through univariate linear fitting using the least squares method; its numerator is the covariance between time and the signal, and its denominator is the variance of time. This quantitatively reflects the strength of the linear trend of the signal changing over time, thereby capturing the short-term fluctuations and long-term evolution direction of metabolic state.
[0037] Step S23: Frequency Domain Rhythm Feature Extraction. To capture the potential periodic rhythm information in physiological signals, especially parameters such as body temperature and activity level that typically exhibit nearly 24-hour diurnal rhythms, this step applies a frequency domain transformation to the time-series data within each analysis window. The system uses a Fast Fourier Transform algorithm to convert the time-domain signal into a frequency-domain representation, thereby obtaining its spectrum. From this spectrum, the system extracts key rhythm features: first, the dominant frequency, i.e., the frequency component with the highest energy in the spectrum, which usually corresponds to the most significant biological rhythm cycle of an individual during that period; second, the amplitude corresponding to the dominant frequency, which reflects the intensity of the rhythmic oscillation; and finally, the phase, used to determine the starting point of the rhythmic wave, which can be quantified by calculating the phase difference with a fixed reference time. These features collectively quantify the inherent periodic pattern of the physiological signal. The specific calculation method is as follows: for the time-series data within the window... Its discrete Fourier transform is: ; The amplitude corresponding to the dominant frequency is Phase is ; in, This represents the complex amplitude of the k-th frequency component; It represents the amplitude, reflecting the intensity of the rhythm at that frequency; It indicates the phase, reflecting the starting moment of the rhythm; For the corresponding The maximum frequency. This transformation analyzes the periodic rhythms contained in physiological signals from the frequency domain perspective. The dominant frequency usually corresponds to the core biological rhythm, the amplitude reflects the significance of the rhythm, and the phase indicates the start time of the rhythm, thereby quantifying the characteristics of biological rhythms.
[0038] Step S24: Feature Integration and Dimensionality Reduction. After completing the time-domain and frequency-domain feature calculations, the system concatenates all feature values extracted from all physiological signals within a 72-hour analysis window in a predetermined order to form a high-dimensional feature vector representing the overall physiological state during that period. This vector may have hundreds of dimensions. To eliminate feature redundancy, reduce data complexity, and mitigate the impact of the curse of dimensionality on subsequent modeling, the system employs principal component analysis (PCA) for dimensionality reduction. Specifically, the system collects high-dimensional feature vectors generated from all windows over a continuous time period, forming a sample matrix. PCA is performed on this matrix, selecting the top N principal components that retain more than 90% of the total variance of the original data as the new feature basis. For example, N may be 20. Finally, each original 72-hour high-dimensional feature vector is projected onto this set of principal components, transforming it into a low-dimensional dense feature vector.
[0039] In step S2, the system systematically extracts comprehensive features encompassing time-domain statistical characteristics and frequency-domain rhythmic information from the raw physiological time-series data, and obtains compact feature representations through dimensionality reduction. This process transforms the raw physiological waveform data into low-dimensional numerical vectors containing rich state information. These vectors simultaneously capture the instantaneous fluctuations, medium-term trends, and inherent biological rhythms of physiological processes such as metabolism, providing structured, high-quality input features for subsequent deep learning-based risk prediction models.
[0040] In this embodiment, step S3 specifically constructs a model capable of dynamically predicting host metabolic activity. Its core task is to learn the complex nonlinear and temporal dependencies between historical multidimensional physiological characteristics and future blood glucose changes. The specific implementation process is completed through the following sub-steps: Step S31, Prediction Model Architecture Design. The system constructs a deep learning model based on a bidirectional long short-term memory network as the core prediction engine. This network adopts a two-layer stacked structure, and its core is the gating computation mechanism of LSTM units. At each time step t, the internal computation of a single LSTM unit follows the following formula sequence: Forgotten Gate: ; Input Gate: ; Candidate cell status: ; Cell status update: ; Output gate: ; Hidden state output: .
[0041] in, The input feature vector represents the current time step t; These represent the hidden state and the cell state passed down from the previous time step, respectively. These are the trainable weight matrix and bias vector for the corresponding gate; The sigmoid activation function compresses the output to the [0,1] interval to generate a gated signal; This is the hyperbolic tangent activation function, with an output range of [-1, 1]. This represents element-wise multiplication. These formulas collectively constitute the selective memory and update mechanism of LSTM: the forget gate (…). ) decide from long-term memory ( How much information is discarded in the input gate; ) and candidate cell states ( The cell state ( ) jointly determines how much new information to include; ) as updated long-term memory; output gate ( Then control outputs to the hidden state based on the current memory. This allows for the collection of information, thereby effectively capturing long-term dependencies.
[0042] The first layer of the network, Bi-LSTM, contains 128 neurons and is primarily responsible for learning and capturing short-term local dependencies of features from the input sequence. Its final hidden state is formed by concatenating the results of the forward and backward processing. ,in These are the hidden states of the forward and backward LSTMs, respectively, which allows the representation at each time step to incorporate global context information.
[0043] The second layer of the Bi-LSTM contains 64 neuron units and receives the output sequence from the first layer. This further abstracts and integrates deeper long-term temporal patterns across time steps. The process of stacking multiple layers can be described as: the output of the l-th layer... ,in To enhance the model's generalization ability and prevent overfitting, a Dropout layer with a neuron dropout rate of 20% is inserted after each Bi-LSTM layer. The model's output layer is a fully connected layer responsible for integrating and mapping the final hidden state sequence output by the second Bi-LSTM layer at all time steps to the predicted values. ,in This represents the total number of floors. It is a vector of length 288, corresponding to a sequence of 288 predicted blood glucose values at 5-minute intervals for the next 24 hours.
[0044] Step S32: Training Data Preparation and Preprocessing. The model training employs a supervised learning paradigm. The system constructs training sample pairs based on the historical normalized feature vector sequence generated in step S2. Specifically, the input part of each training sample is a feature vector sequence that traces back 7 consecutive days from time point T, i.e., a matrix composed of seven 20-dimensional vectors, representing a summary of the historical physiological state over a week. The corresponding label part of this sample is a 24-hour sequence of actual blood glucose measurements immediately following these 7 days. This sequence has been normalized according to historical data, transforming it into 288 normalized blood glucose values. By using a sliding time window, the system can generate a large number of such sample pairs from the entire dataset.
[0045] Step S33: Model Training and Optimization. During model training, the system uses mean squared error as the loss function to measure the difference between predicted and true values, and employs the Adam optimizer to update model parameters. The initial learning rate is set to 0.001. To accelerate training convergence and improve model performance, a teacher-forced technique is introduced: when the model decodes and predicts, the true blood glucose value from the previous time step, rather than the model's own prediction, is used as part of the input for the next time step. During training, the entire sample dataset is randomly divided into training and validation sets in an 8:2 ratio. The loss on the validation set is continuously monitored during training, and an early stopping strategy is adopted. When the validation set loss no longer decreases over several consecutive training cycles, training is terminated, and the model parameters with the lowest validation loss are saved, thus obtaining the optimal final model with strong generalization ability.
[0046] Step S34: Model Inference and Preliminary Prediction. In the practical application stage, during prediction, the system inputs the 20-dimensional feature vector sequence extracted from the current time T and the preceding 7 consecutive days into the already trained optimal Bi-LSTM model. Based on the learned temporal patterns, the model directly outputs an initial prediction sequence of length 288 representing the blood glucose change over the next 24 hours. .
[0047] Step S35: Post-processing and Output of Prediction Results. To ensure the physiological rationality and smoothness of the prediction results, necessary post-processing is performed on the initial prediction sequence output by the model. First, smoothing is performed: a moving average filter with a window size of 5 is applied to filter the entire initial prediction curve to eliminate non-physiological high-frequency jitter or noise that may be generated by the model. Then, range correction is performed: according to medical common sense, all smoothed prediction values are forcibly limited to a reasonable physiological blood glucose concentration range, for example, a lower limit of 3.9 mmol / L to an upper limit of 10.0 mmol / L. Values exceeding this range are truncated to equal the boundary values. After the above post-processing, a smooth, continuous, and physiologically consistent normalized blood glucose prediction curve is finally output. This curve is defined as the benchmark curve characterizing the dynamic changes in host metabolic activity over the next 24 hours.
[0048] The bidirectional long short-term memory network model constructed in step S3 can fully utilize the contextual information of the time-series data and effectively capture the complex dynamic evolution of the host's metabolic state through its gating mechanism. Combined with the model post-processing workflow, the prediction results are ultimately ensured to have both physiological rationality and temporal stability, thus providing a reliable and high-quality host intrinsic metabolic baseline curve for subsequent comparative analysis with tumor metabolic rhythms.
[0049] In this embodiment, step S4 specifically addresses the clinical challenge of directly and continuously monitoring tumor metabolic activity non-invasively. By integrating prior knowledge of the domain with the individual's real-time physiological state, a continuous time-series curve reflecting the metabolic activity of tumor tissue is indirectly inferred. The specific implementation process includes the following sub-steps:
[0050] Step S41: Construction and Encoding of the Prior Knowledge Graph of Tumor Metabolism. The system first constructs a structured knowledge graph specifically for the field of gastrointestinal tumor metabolism to formally store relevant medical knowledge. Knowledge sources include biomedical literature databases such as PubMed and public genomic databases such as TCGA. Using natural language processing technology, key entities and relationships are automatically extracted from these unstructured or semi-structured texts. Entities cover tumor types, metabolic pathways, key enzymes, metabolites, and treatment methods; relationships include upregulation, inhibition, promotion, and association. For example, a "significantly enhanced" relationship can be extracted between "gastric adenocarcinoma" and "glycolysis," or "chemotherapy drug 5-FU" may "inhibit" "mitochondrial oxidative phosphorylation." These triplets are integrated to construct a proprietary knowledge graph. When targeting a specific patient, the system extracts relevant subgraph structures from the knowledge graph based on the patient's tumor pathology type and current treatment stage. Subsequently, a graph neural network model, specifically the GraphSAGE algorithm, is used to learn the representation of this subgraph, encoding its complex graph structure information into a dense vector of fixed dimensions, such as 128 dimensions, called the prior knowledge vector K. This vector condenses the tumor metabolic domain knowledge most relevant to the current patient's condition.
[0051] Step S42: Fusion of multi-source individualized condition information. The system synchronously integrates various individualized information to form the generation conditions. First, the host metabolic activity curve predicted in step S3 is analyzed. Using a lightweight convolutional neural network containing one-dimensional convolutional layers and pooling layers, high-order temporal features are extracted to obtain the representation. Secondly, the patient's tumor type and current treatment stage are encoded using one-hot encoding, resulting in encoding vectors t and S. Finally, this information is concatenated and fused with prior knowledge vectors. (Conditional vector) The construction formula is: , in, Host curve The high-level representation is t, where t is the tumor type code, S is the treatment stage code, and k is the prior knowledge vector from the knowledge graph. This represents a vector concatenation operation. The concatenated vector is then non-linearly fused and its dimension transformed through a fully connected layer, ultimately generating a unified, high-dimensional conditional vector c, for example, with a dimension of 256. This conditional vector c comprehensively encodes the current patient's individual physiological state, disease background, and relevant domain knowledge, providing the generator with clear, individualized guidance signals. The principle lies in achieving the fusion of multi-source information through the concatenation operation and highly conditionalizing the generation process, thereby ensuring the relevance and rationality of the generated content.
[0052] Step S43: Architecture Design and Adversarial Loss of the Conditional Generative Adversarial Network. The system constructs a conditional generative adversarial network model to generate curves from conditions. This model consists of a generator G and a discriminator D. The input to generator G includes the conditional vector c generated in step S42 and a low-dimensional random noise vector z sampled from a standard normal distribution. The noise z is used to introduce uncertainty and diversity in the generation. Generator G is typically composed of stacked fully connected layers and deconvolutional layers, responsible for progressively upsampling the input conditions and noise, ultimately outputting a simulated tumor metabolic activity curve of length 288. The discriminator D is a binary classifier whose input is a pair of "curve-condition" combinations. Its task is to determine whether the curve is a genuine tumor metabolic curve or a spurious curve generated by the generator, and to evaluate whether the curve matches the provided condition vector c. The adversarial loss function of CGAN is defined as follows: , Where x represents a sample of a real tumor metabolic curve. For its actual data distribution, Let z be the prior distribution of the noise. This formula defines a mini-maximum game: the generator G attempts to generate realistic curves to minimize the discrimination probability of the discriminator D, while the discriminator D strives to maximize the discrimination probability of real samples and minimize the discrimination probability of generated samples, thereby driving the distribution of generated curves to approximate the distribution of real data.
[0053] Step S44: Adversarial Training and Cycle Consistency Optimization of the Model. The model is trained using an adversarial training strategy with cycle consistency constraints. In addition to the standard generative adversarial loss, the system introduces an encoder E, which re-encodes a metabolic curve into a conditional vector. During training, an adversarial cycle consistency loss is added: , in, This represents the encoder's encoding of the true curve x. This indicates that the encoded result will be regenerated. This indicates that the generated curve is encoded. The constraints are L1 and L2 norms. This constraint aims to minimize reconstruction error and ensure that the curves generated by the generator closely match the input conditional information; that is, the generated tumor metabolic curves must accurately reflect the individual-specific host state, tumor type, treatment stage, and prior knowledge. The principle lies in constructing "generation-encoding" and "encoding-generation" loops and enforcing loop consistency, thereby effectively preventing pattern collapse and conditional decoupling, and improving the controllability and consistency of the generated content. Training uses real tumor metabolic curve samples, which may come from sparse biopsy metabolomics data or calibrated animal model experimental data. By alternately optimizing the generator G, discriminator D, and encoder E, the model can eventually learn the mapping from complex conditional vectors to reasonable tumor metabolic curves.
[0054] Step S45: Inference Generation of Personalized Tumor Metabolic Curves. After model training is complete, the inference application phase begins. For a new patient, the system first executes steps S41 and S42 to generate a unique conditional vector c for that patient. Subsequently, a randomly sampled noise vector z is input along with the conditional vector c into the trained generator G. Based on the learned mapping relationship, generator G directly outputs an initial tumor metabolic activity inference curve of length 288. The curve represents the model's prediction of tumor metabolic activity over the next 24 hours.
[0055] Step S46: Biophysical Post-processing and Output of the Generated Curve. To ensure the biological rationality of the inference results, the initial generated curve is post-processed. First, the curve is validated using a simplified tumor physiological pharmacokinetic model based on ordinary differential equations. This model includes basic assumptions such as tumor proliferation and basal metabolic rate, used to constrain the overall shape of the generated curve, for example, requiring its overall activity level to generally be higher than the host's basal metabolic baseline. Next, a smoothing filter is applied to process high-frequency fluctuations in the curve, and the absolute numerical range of the curve is calibrated to a scale comparable to the host metabolic curve based on prior knowledge. Finally, the system outputs a smooth, continuous tumor metabolic activity curve that conforms to the basic laws of tumor biology.
[0056] Therefore, step S4 creatively achieves quantitative inference of tumor metabolic activity, which cannot be directly and continuously monitored, by constructing a knowledge graph to encode domain prior rules and utilizing conditional generative adversarial networks to learn and generate metabolic curves under individualized conditional constraints. This provides indispensable key input data for the next step of accurately comparing and analyzing the normal metabolic rhythms of the host with the abnormal metabolic rhythms of the tumor.
[0057] In this embodiment, specifically, step S5 involves a systematic quantitative comparison and visualization analysis of the host metabolic activity curve generated in step S3 and the tumor metabolic activity curve inferred in step S4, to accurately quantify the rhythmic differences between the two and generate intuitive time-series intervention guidelines. The specific implementation process includes the following sub-steps: Step S51: Metabolic curve standardization and preprocessing. To eliminate the influence of dimensions and make the two curves comparable, the host metabolic activity curve is first standardized and preprocessed. The tumor metabolic activity curve t was subjected to minimum-maximum normalization, linearly mapping all data points on each curve to a closed interval between 0 and 1. Subsequently, to suppress potential noise interference and highlight the main trends, the two normalized curves were smoothed using a Savitzky-Golay filter. This filter smooths the data by performing polynomial fitting within a local window, effectively preserving the original peak and phase characteristics of the curves.
[0058] Step S52: Calculation of Global Diurnal Phase Difference. To assess the degree of shift of the two metabolic curves in the overall diurnal rhythm, this step calculates their global phase difference. First, Fast Fourier Transform analysis is performed on the smoothed host curve and tumor curve to identify their dominant cyclical components, which under normal circumstances will exhibit a significant cycle of approximately 24 hours. Subsequently, the global maximum point of each curve is identified within a single diurnal cycle; the time position corresponding to this point is defined as the peak phase of the curve, denoted as […]. The final absolute phase difference The absolute value of the hour difference between the two peak phases is obtained by calculating the formula: , For example, if the host peak phase is at 10 AM and the tumor peak phase is at 2 AM, then the phase difference... The time frame is 8 hours. This indicator macroscopically reflects the degree of separation between the peak metabolic activity of the host and the tumor on the time axis. The principle is that the peak point of the metabolic curve represents the moment when the curve is most metabolically active within 24 hours. By calculating the absolute difference between the peak times of the two, the phase shift of the host and tumor metabolic rhythms can be directly quantified.
[0059] Step S53: Local Time Window Metabolic Overlap Analysis. To more precisely characterize the competitive relationship between the two curves at various times throughout the day, this step calculates the local overlap. The 24-hour time axis is traversed with a sliding step of 5 minutes. For each current time t, 30 minutes before and after it are taken to form a sliding analysis window of length 1 hour. Within each window i, the area under the curve covered by the host curve and the tumor curve is calculated, denoted as . and This is used to characterize the metabolic activity level of each curve within that time period. Next, the area of the common overlap between the two curves within that window is calculated. Its value is the area obtained by integrating the two curves after they take their minimum values at each time point, i.e. Based on this, the overlap of the window... Defined as the ratio of the overlapping area to the sum of the areas of the two curves minus the overlapping area, its calculation formula is: .
[0060] The ratio ranges from 0 to 1. A higher value indicates a greater overlap in intensity and time between the metabolic activities represented by the two curves during that period, suggesting potentially more intense resource competition. The principle behind this ratio is to measure the degree of simultaneous activity of the two curves by calculating the ratio of the overlapping area (common active area) to the total area of both curves minus the overlapping area. This quantifies the intensity of local competition between host and tumor metabolism.
[0061] Step S54: Calculation of the Time Separation Potential Index and Synthesis of the Heatmap. This step fuses global phase difference and local overlap information to generate a comprehensive temporal intervention potential index. For each 5-minute time point t, the corresponding time separation potential index is calculated. Calculated using the following formula: .
[0062] in, This represents the overlap of the sliding window at that point; This reflects the intervention potential arising from low local competition intensity; It is based on global phase difference The input is a monotonically increasing function used to transform the macroscopic phase separation degree into a weighting factor, which can be defined, for example, as: .
[0063] The significance of this formula lies in the fact that the final separation potential at a given time point depends not only on the degree of local metabolic activity shift at that moment but also on the positive regulation of the overall phase difference. After calculating the separation potential index for all 288 time points throughout the day, it is mapped onto a Viridis continuous color spectrum. Regions with high indices are mapped as bright yellow, and regions with low indices are mapped as dark purple, thus generating a color thermal bar chart covering 24 hours.
[0064] Step S55: Visualized Heatmap Output and Interpretation. The final generated heatmap is a quantitative analysis of metabolic rhythm differences and a guide to intervention timing. This heatmap clearly displays the distribution of "high separation potential" and "low separation potential" time periods throughout the day using intuitive color changes along the time axis. Typically, bright yellow, high-potential periods indicate low overlap and significant phase separation between host and tumor metabolic activities, suggesting that nutritional support during this time may be more targeted, facilitating host utilization and reducing tumor uptake. Dark purple, low-potential periods indicate high metabolic synchronization and intense competition between the two; nutritional intervention during this stage requires caution or should be limited. The system uses this heatmap as a key output, providing direct quantitative and visual decision-making basis for clinicians to develop time-specific nutritional intervention plans.
[0065] Step S5 transforms abstract metabolic rhythm differences into precise numerical descriptions by calculating two core quantitative indicators: global phase difference and local overlap. These are then further fused to generate an intuitive heatmap of temporal separation potential. This process transforms complex physiological time-series data analysis results into clear and actionable spatiotemporal intervention guidelines, providing crucial data visualization and decision support tools for implementing nutritional therapy based on metabolic rhythm modulation.
[0066] In this embodiment, step S6 specifically involves formalizing the nutritional intervention recommendation problem into a sequential decision problem subject to complex clinical and physiological constraints, and automatically solving for the optimal personalized nutritional infusion strategy that satisfies all constraints using reinforcement learning techniques. The specific implementation process includes the following sub-steps: Step S61: Modeling the Personalized Nutrition Decision-Making Problem. The system first constructs a Markov decision process framework to formalize the problem. The state space design integrates multi-dimensional information: including the temporal separation potential heatmap data generated in step S5, the patient's tumor type encoding, the current treatment stage encoding, and the latest host metabolic features obtained through the model in step S3. This raw information is concatenated into a high-dimensional vector, which is then subjected to dimensionality reduction and feature extraction through a specially designed encoding neural network, ultimately forming a comprehensive state vector of approximately 128 dimensions. This is used to comprehensively characterize the patient's physiological and pathological condition at time t. The action space is defined as the sequence of nutritional infusion recommendations for the next 24 hours. The system discretizes time into decision points at 15-minute intervals, totaling 96 time steps. The action at each time step... This is a three-dimensional continuous vector, representing the grams of protein, carbohydrates, and fats recommended to be delivered via enteral or parenteral nutrition within the 15-minute timeframe. The reward function R is designed as a composite indicator to quantify the long-term clinical benefits of the strategy. Its calculation formula integrates penalties for positive and negative changes in key clinical outcomes, specifically in the following form: , in, Indicates the amount of change. The weighting coefficients for each item are jointly set by clinical experts based on the priority of treatment goals. Simultaneously, the system defines a series of hard constraints that must be strictly adhered to, including: daily total energy intake must not exceed the target value calculated based on the patient's resting energy expenditure; within specific time windows marked as highly metabolically active in the time-separation potential heatmap, the carbohydrate infusion rate must be limited to extremely low levels; and the energy supply ratio of the three macronutrients must be maintained within a preset physiologically reasonable range.
[0067] Step S62: Constraint Handling Mechanism Based on Lagrange Relaxation. To handle the aforementioned hard constraints, this step employs a constrained reinforcement learning framework. Based on the standard Actor-Critic architecture, the system introduces the Lagrange relaxation method to transform the constrained optimization problem into an unconstrained problem. Specifically, a trainable Lagrange multiplier is defined for each hard constraint. For constraint violation functions (For example, during the tumor's highly active window,) The overall objective function is constructed as follows: , in, This is the standard PPO pruning objective function. This indicates that the average value is taken from a batch of empirical trajectories. This is the constraint violation tolerance threshold (usually set to 0). During training, the algorithm not only aims to maximize the cumulative reward but also needs to minimize the amount of constraint violations. A new optimization objective function is constructed by multiplying the violation amount of each constraint by its corresponding Lagrange multiplier as a penalty term and then subtracting this penalty term. The Lagrange multipliers themselves are dynamically adjusted via gradient descent based on the historical constraint violations, thus achieving a balance between maximizing rewards and satisfying constraints.
[0068] Step S63: Training and optimization of the agent for constrained proximal policy optimization. The core learning algorithm of the system adopts proximal policy optimization (PPO). The objective function of this algorithm, based on the pruning objective of standard PPO, integrates the Lagrange penalty term defined in step S62. The pruning objective function of standard PPO is: , Among them, the probability ratio For the estimation of the advantage function, This is the clipping hyperparameter (usually set to 0.2). The operation restricts the probability ratio to an interval. This constrains the step size of each policy update to stabilize training. Combined with Lagrange relaxation, the final optimization objective is: .
[0069] The adaptive update formula for the Lagrange multipliers is: , in, It is the learning rate of the Lagrange multiplier. When the constraint violation is large, it increases. To strengthen punishment; when constraints are well met, reduce... The agent is pre-trained in a virtual patient simulator built on a high-fidelity physiological model. This simulator can simulate patients' metabolic responses, weight changes, and tumor marker dynamics under different nutritional strategies, providing the agent with a safe and efficient trial-and-error environment. Through millions of interactive trials in this environment, the agent learns how to adjust its actions according to the state to maximize long-term compound rewards while automatically satisfying all constraints. Based on the pre-trained model, the system further utilizes accumulated historical real-world clinical data for offline reinforcement learning fine-tuning to narrow the gap between simulation and reality, and improve the clinical applicability and individualization of the strategies.
[0070] Step S64: Online Inference and Optimal Nutritional Strategy Sequence Generation. Once the model training is complete, it can be used for online strategy generation for new patients. The system will generate the patient's current integrated state vector. The input is fed into a trained Actor network. Based on the learned strategy, the network directly outputs action suggestions for the next 96 time steps, i.e., a 96x3 nutrient infusion matrix. To ensure the physical feasibility and clinical acceptability of the strategy, the original actions output by the network are post-processed: first, all negative values are truncated to zero, and all values are limited to the maximum safe flow rate range of the infusion device; second, a time-smoothing filter is applied to fine-tune the actions of adjacent time steps to avoid drastic jumps in nutrient infusion rates, thus conforming to the physiological adaptation process.
[0071] Step S65: Final Strategy Output and Formatting. The post-processed action sequence is output by the system as a structured 24-hour time-series nutrition infusion plan with 15-minute intervals. This plan clearly specifies the exact amounts of protein, carbohydrates, and fats to be delivered within each time interval, forming a digital medical order that can directly guide the execution of clinical nutrition pumps or be reviewed and adjusted by clinicians.
[0072] This step models clinical nutrition decision-making as a constrained reinforcement learning problem and trains it using a simulation environment and offline data. This enables the system to automatically generate personalized nutrition strategies that not only aim to optimize long-term nutritional efficacy but also strictly adhere to key temporal constraints and general clinical guidelines derived from metabolic rhythm analysis. This achieves automated, precise, and safe planning of nutritional intervention programs across both the temporal and compositional dimensions.
[0073] In this embodiment, step S7 specifically transforms the nutrient infusion strategy generated in step S6, characterized by precise timing and composition, into a concrete, executable daily meal plan that aligns with the patient's individual dietary habits and preferences, thus realizing the practical application of the digital strategy. This process is formalized as a multi-objective combinatorial optimization problem and solved using an evolutionary algorithm. The specific implementation process includes the following sub-steps: Step S71: Recipe Optimization Problem Modeling and Decision Variable Definition. The system models the daily recipe generation problem as a multi-objective optimization problem. Each candidate recipe is encoded as a chromosome using a hybrid encoding method. One part of the chromosome consists of discrete genes, representing unique identifiers for specific dishes selected from a pre-defined standardized recipe database; the other part consists of continuous genes, representing the portion scaling factor for each selected dish, for example, 0.7 represents 70% of the standard portion size of the dish. The system dynamically adjusts the optimization problem's preference settings based on the "current treatment stage" in the patient's file. For example, for patients undergoing chemotherapy, the system automatically increases the priority of nutritional precision and adds weight to the complexity of dish preparation, while automatically excluding unsuitable dish categories such as fried and spicy dishes based on clinical dietary restrictions.
[0074] Step S72: Initial Population Generation and Diversity Guarantee. The optimization search begins with initializing a population containing multiple candidate solutions, such as generating 200 different daily meal plans. To ensure population diversity and improve search efficiency, the initial population is not generated completely randomly, but based on a series of heuristic rules: for example, ensuring that each meal includes a main dish, vegetables, and staple food; selecting highly rated dish types based on patients' historical preference data; and ensuring that total energy intake roughly matches the target range. This provides a high-quality and broad-coverage starting point for subsequent evolutionary searches.
[0075] Step S73: Calculation and evaluation of the multi-dimensional fitness function. For each candidate diet scheme (chromosome) in the population, the system calculates a comprehensive fitness score. This score is a weighted sum of the scores of multiple sub-objectives, and the formula is: .
[0076] in, The weighting coefficients for each item are configured by the system administrator based on the patient's specific circumstances (such as treatment stage, economic conditions, and level of nursing support). The calculation methods for each sub-objective are as follows: 1) Nutritional fit score The nutrient content (protein, carbohydrates, fat) of all dishes in the candidate recipes is summarized to obtain the actual nutrient supply curve for the whole day. This curve is compared with the target nutrient delivery sequence output in step S6 at 15-minute intervals, and the sum of the absolute differences between the two in each time interval and the total daily amount is calculated. The nutrient fit score is a monotonically decreasing function of this sum of differences, and its calculation formula is as follows: , in, This represents the total amount of the i-th nutrient in the diet. This represents the total target delivery amount of the i-th nutrient output from step S6. In this formula, the smaller the difference, the smaller the denominator, and the higher the score, reflecting a quantitative assessment of the degree of alignment with the nutritional target.
[0077] 2) Taste preference score The system maintains an individualized taste disorder and preference profile for each patient. Based on the aversion to tastes (such as bitterness or sweetness) and preferred ingredients recorded in the profile, the system matches the taste labels of each dish in the recipe with the ingredient composition. Rewards are given for tastes that match preferences, and penalties are imposed for tastes that trigger aversions, thereby calculating a score that reflects the patient's expected acceptance level.
[0078] 3) Preparation complexity score Based on the standardized operation data of each dish in the database, the estimated total preparation time, the types and quantities of kitchen utensils required, and the complexity of the cooking steps for each recipe are summarized to calculate a convenience index. The simpler the recipe, the higher the score.
[0079] 4) Economic cost score Calculate the average total cost of the day's menu based on the market price of ingredients; the lower the cost, the higher the score.
[0080] Step S74: Evolutionary Search and Optimization Based on Genetic Algorithm. The system employs an improved genetic algorithm for iterative optimization. In each generation, the algorithm performs the following operations: First, it uses tournament selection to select superior individuals from the current population as parents. Next, it applies simulated binary crossover and polynomial mutation operators to the selected parents to generate new offspring individuals. This process is performed separately on the discrete dish selection gene and the continuous portion size gene.
[0081] The simulated binary crossover operator generates offspring individuals using the following formula: given the parent individual Produce offspring The i-th gene: , in, , The crossover index controls the similarity between offspring and parents. This operator achieves information exchange and exploration within the population by exchanging some genes of parent individuals and generating new solutions that combine characteristics of both.
[0082] The polynomial mutation operator applies a random perturbation to an individual's genes using the following formula: For an individual mutated genes ,in: .
[0083] here , , , The mutation distribution index controls the mutation magnitude. This operator increases population diversity by introducing random perturbations, preventing the algorithm from getting trapped in local optima too early and improving global search capabilities.
[0084] To balance the algorithm's global exploration and local development capabilities, the system introduces an elite retention strategy, directly preserving the best solutions from each generation to the next. Simultaneously, combining the ideas of simulated annealing, a fine-grained local search is performed on outstanding individuals in the later stages of optimization. The optimization process continues until a preset maximum number of generations (e.g., 500 generations) is reached, or the fitness score of the best individual in the population no longer significantly improves over multiple generations.
[0085] Step S75: Decoding the Optimal Solution and Generating a Structured Recipe. After the evolutionary optimization process is complete, the system selects the individual (chromosome) with the highest overall fitness score from the final generation population as the final optimal recipe. This chromosome is then decoded: the specific dish names are mapped from the recipe database based on discrete genes, and the specific portion sizes for each dish are determined based on continuous genes. The system then automatically generates a structured, printable daily recipe document. This document details the daily meal schedule, the dishes included in each meal, a list of ingredients for each dish accurate to the gram, brief step-by-step cooking instructions, and includes a nutritional information comparison table clearly showing the match between the nutrients provided by the recipe and the target sequence from Step S6.
[0086] This step involves constructing a multi-objective optimization model and using an evolutionary algorithm for efficient searching. From a vast array of food combinations and portion sizes, it can automatically find daily meal plans that simultaneously and optimally or near-optimally balance nutritional goals, patient preferences, preparation feasibility, and cost-effectiveness. This effectively solves the crucial final step in transforming abstract nutritional strategies into concrete, personalized, and implementable dietary plans.
[0087] refer to Figure 9 According to an embodiment of the present invention, a method for intelligent nutrition recommendation for cancer patients based on metabolic rhythm synchronization further includes the following steps: Step S8: Parse and map the daily recipe plan generated in step S7 into a combination of purchasable product inventory units, connect to the e-commerce platform through an interface to perform dynamic price comparison and inventory check, and generate a pre-filled shopping cart link.
[0088] S81, Solution Parsing and Standardized Product Mapping. The system receives the structured daily recipe solution output from step S7 as input. This solution explicitly lists dishes such as "High-protein nutritional shake: requires 30g whey protein powder and 20g oatmeal" and their precise ingredient requirements. First, a solution parser based on natural language processing technology identifies and extracts entities such as "whey protein powder," "oatmeal," "sea bass," "broccoli," and "complete nutritional formula powder." Then, the system queries a pre-built standardized product name mapping library. This library, constructed by analyzing product titles and category information from mainstream e-commerce platforms, standardizes generic ingredient names such as "sea bass" into standard product names common to e-commerce platforms, such as "frozen sea bass fillets, gutted." For nutritional supplements, it directly matches their registered product names. The output of this process is a standardized list of ingredient and product requirements.
[0089] S82, Intelligent Product Matching and Sourcing Based on Knowledge Graph. The system takes the standardized requirement list mentioned above as input and queries a specially constructed nutritional product knowledge graph. This knowledge graph is stored in a graph database. Nodes represent product entities and their attributes, such as brand, specifications, nutritional components, and target audience; edges represent logical relationships between products, such as "belongs to the same category," "can be substituted," and "contains ingredients." For example, for the requirement of "30g whey protein powder," the graph not only matches specific products based on protein content but also considers the patient's "post-gastric cancer surgery" label, prioritizing product SKUs labeled with attributes such as "easily absorbed" and "low allergenicity." For the requirement of "100g steamed sea bass," the graph calculates the required purchase of one bag based on common retail packaging specifications, such as 250g per bag, and associates it with the corresponding SKU. The output of this step is a purchase list that includes recommended specific product SKUs, purchase quantities, and matching reasons.
[0090] S83, Real-time Price Comparison and Optimal Procurement Decision Across Multiple Platforms. After obtaining the list of items to be purchased, the system concurrently sends product query requests to each platform via pre-connected application programming interfaces (APIs). Query parameters include SKU codes, delivery address postal codes, etc., to obtain real-time prices, immediate inventory status, estimated delivery times, and current promotional information for each product across different channels. Subsequently, a multi-objective decision-making algorithm is activated, calculating a comprehensive score for each candidate purchase option. The core variables of the scoring model include the unit price of the product, platform service fees, total delivery time, and consider packaging optimization strategies such as combining multiple products into the same platform to reduce shipping costs, as well as the trust preference weights shown by patients in their historical orders for specific platforms. The algorithm ultimately selects a comprehensively optimal purchase channel and specific SKU for each demand item. The output of this step is a final procurement instruction list, precisely specifying which platform, at what price, and in what quantity each product should be purchased.
[0091] S84, an integrated system for automated shopping cart assembly and delivery. Based on the final purchase order list, the system calls the shopping cart management interfaces provided by various e-commerce platforms. The server simulates user operations, adding specified SKUs and quantities sequentially to the corresponding virtual shopping carts on each platform. After successfully processing the cart addition request, the e-commerce platform interface returns a unique deep link. This link points to a specific intermediate page. When the user clicks this link in the mobile application, they are directly redirected to the official application of the corresponding e-commerce platform, displaying a pre-filled shopping cart with all recommended products before checkout. In the recipe display interface of the patient's application, the system dynamically generates a one-click purchase button, which is linked to this deep link in the backend. After the user clicks and completes the purchase, with explicit user authorization and only an anonymous order overview transmitted, the system can obtain the purchase completion status through a secure callback interface. This is recorded as positive behavioral data on patient compliance and added to the patient's profile for subsequent analysis and optimization. The final output of this step is a seamless purchase entry integrated into the application, along with optional, anonymized compliance feedback signals.
[0092] refer to Figure 10 According to an embodiment of the present invention, a method for intelligent nutrition recommendation for cancer patients based on metabolic rhythm synchronization further includes the following steps: Step S9: Based on the nutrient delivery action sequence output in step S6 and the current treatment stage, match and combine clinical nutritional foods, symptom relief products, home medical devices and digital services from the predefined product service library to generate a personalized subscription product service package plan.
[0093] The implementation process of step S9 aims to intelligently combine and deliver a subscription-based comprehensive intervention plan from predefined product and service resources, based on the personalized nutrition strategy and patient clinical status generated in step S6. Its specific implementation process is as follows: S91, Constructing a Modular Product Service Knowledge Base. The system first needs to establish a structured resource library as the matching foundation. To this end, four categories of resources are standardized and digitally modeled: The first category is clinical nutritional foods, including specific complete nutritional formula powders and protein supplements. Their data models need to define key attributes such as energy density, protein source and content, applicable disease stage, drug regulatory classification and approval number, flavor, and packaging specifications. The second category is symptom relief products, such as medical-grade oral care gels and anti-nausea lozenges. The model needs to define the symptoms they target, main ingredients, and frequency of use. The third category is home medical devices, such as smart nutrition scales and enteral nutrition pumps. The model needs to define their models, technical parameters, and information on compatible consumables. The fourth category is digital services, such as nutritionist follow-ups and doctor reviews. The model needs to clearly define the service content, duration, delivery method, and scheduling rules. All these resource entities and their attributes, as well as the relationships between them, are stored in a product service knowledge graph. This graph uses a graph database for storage. By defining relational edges such as "applicable to", "relief", "complementary use", and "includes services", it closely links resources with specific treatment stages, nutritional goals, and adverse reaction symptoms. For example, the "chemotherapy period" node and the "high protein requirement" node are jointly linked to the "a certain series of easily digestible tumor formula powder" product node.
[0094] S92, the system analyzes the nutritional strategy and intelligently matches resources. The system takes the nutrient delivery sequence output from step S6, the patient's current treatment stage, and symptom tags extracted from electronic medical records or patient self-reports as input. A strategy analysis engine first analyzes the nutrient sequence, transforming it into quantifiable nutritional goals, such as daily total protein intake and nighttime carbohydrate restriction periods. Subsequently, the system performs multiple rounds of matching queries in the product service knowledge graph. The matching logic is based on predefined rules and tag similarity: First, based on the treatment stage and high-protein goal, several clinical nutritional foods that conform to medical guidelines and whose ingredient ratios most closely match the goal are matched, and the total required quantity within a subscription period is automatically calculated based on daily consumption. Second, based on symptom tags, corresponding non-pharmacological relief kits are matched, such as ginger lozenges and a dietary guide for nausea. Finally, to ensure precise execution of the nutritional plan, necessary monitoring tools, such as a smart kitchen scale, are matched. Finally, based on the complexity of the treatment phase and the requirement for continuous intervention, a corresponding combination of digital services is matched. For example, for newly diagnosed patients, a service module including initial in-depth assessment, regular follow-up, and periodic review is matched. The output of this step is a set of candidate resources customized for the patient, containing a list of specific products and services.
[0095] S93, Service Package Pricing and Personalized Solution Generation. The system receives the aforementioned set of candidate resources as input. A dynamic pricing engine is triggered, which automatically calculates the total cost of the personalized service package within a subscription period based on the product bulk purchase cost price maintained in the system, the manpower and time costs corresponding to the service modules, and a preset markup rate model or value pricing model that conforms to business rules. Simultaneously, the system calculates the total price of all items and services in the list if purchased separately through retail channels and generates a comparison of cost savings. Subsequently, a solution rendering engine integrates the product list, detailed service schedule, usage instructions, cost details, and cost savings comparison information to generate a structured, easy-to-read personalized product service package solution document. This document is typically presented in webpage or PDF format, clearly showing the nutritional supplementation plan and professional service arrangements within the period.
[0096] S94 processes subscription orders and drives automated fulfillment and dynamic adjustments. Once a patient confirms and pays for the service package plan in the application, the system creates a formal subscription order and automatically triggers a parallel fulfillment process. On the product delivery side, the system issues purchasing and sorting instructions to partner suppliers or a central warehousing system via an application programming interface (API). All products are packaged into a single parcel, labeled with a unique identifier, and delivered to the patient's address. On the service delivery side, the service orchestration engine automatically creates appointment tasks in the designated nutritionist's or doctor's schedule management system based on the timeline in the plan and sends service reminders to the patient. Furthermore, the system incorporates a dynamic adjustment mechanism: if the core algorithm optimizes and updates the nutrition strategy based on new patient data during the subscription period, the system assesses the impact of the strategy change on the service package content. If adjustments are needed, such as changing supplies due to symptom changes or adjusting food formulas due to changes in nutritional goals, the system generates content change suggestions. After patient confirmation, the subscription content for the next period is automatically updated, ensuring continuous synchronization between the service package and the personalized nutrition strategy. The final output of this step is the delivery of physical products and the provision of a series of professional services to the patient as agreed, and the creation of a trackable and adjustable active subscription order status within the system.
[0097] Implementation Example 1 Ms. Zhang, a 55-year-old patient, is currently undergoing her third cycle of adjuvant chemotherapy after breast cancer surgery. Her chief complaints are loss of appetite, altered taste (metallic taste), and fatigue during chemotherapy intervals.
[0098] The system based on this method first integrates one week's worth of data from her continuous glucose meter and smart bracelet. After data synchronization and cleaning, time-domain statistical features and frequency-domain rhythm features with a 72-hour sliding window are extracted. Analysis shows that her blood glucose fluctuation variance has increased, and her diurnal rhythm is disordered. Subsequently, a bidirectional long short-term memory network model predicts Ms. Zhang's host metabolic curve for the next 24 hours based on these features. The curve shows that her metabolically active period has shifted later due to chemotherapy fatigue, while the metabolic peak has decreased. Based on the breast cancer knowledge graph and her current state, the system infers the corresponding tumor metabolic curve through a conditional generative adversarial network. This curve indicates that tumor metabolism still maintains a relatively active peak during the night. By calculating the difference between the two curves, the system generates a heatmap of temporal separation potential, which indicates that the separation between host metabolism and tumor metabolism is relatively high in the afternoon. Based on this heatmap information and combined with the patient's chemotherapy period and taste abnormality tags, the proximal strategy optimization algorithm generates a core nutritional strategy: (1) Arrange for the supplementation of easily absorbed protein and complex carbohydrates during the afternoon time window when the separation potential is high; (2) Strictly limit the intake of simple sugars throughout the day; (3) Set a low point for nutrient supply during the potentially active period of tumor metabolism at night.
[0099] Finally, based on the above strategies and records of patients' aversion to metallic tastes in their files, the genetic algorithm optimizes and generates specific recipes from the recipe database. For example, it recommends using acidic seasonings such as tomatoes and lemon juice to mask the metallic taste; selecting chicken and tofu as high-quality protein sources; and scheduling nutrient-dense foods, such as avocado smoothies, as afternoon snacks.
[0100] This process synchronizes nutritional delivery with the patient's individual metabolic rhythm, potentially improving energy and protein utilization efficiency and helping to combat chemotherapy-related muscle loss. Simultaneously, the diet proactively avoids foods that might aggravate the metallic taste and improves flavor through seasoning, directly enhancing the patient's appetite and intake. This time-segmented nutritional support is expected to alleviate fatigue during chemotherapy and provide a better nutritional window for bodily repair.
[0101] Implementation Example 2 Mr. Li, a 70-year-old patient, is recovering at home after colorectal cancer surgery. He lives alone, has limited mobility, and faces difficulties in purchasing food.
[0102] Based on this method, the system generated a personalized daily menu for Mr. Li, detailing each meal. For example, breakfast included oatmeal and boiled eggs; lunch recommended fish and brown rice; dinner included stewed beans and vegetable puree; and afternoon snacks of yogurt and nuts were planned. Next, the system used a product knowledge graph to match these needs to specific standardized inventory units, such as a 250ml four-pack of high-calcium, low-fat pure milk from a particular brand. Then, the system connected to the APIs of multiple fresh food e-commerce platforms, comparing the price, delivery time, and minimum order amount of this standardized inventory unit across different platforms in real time. Algorithm analysis revealed that platform A offered a one-stop shop for most items with free delivery, while platform B offered lower-priced salmon but required separate shipping fees. After considering both cost and convenience, the system recommended completing the main purchase on platform A and only supplementing with salmon on platform B. Finally, the system automatically added the specified items and quantities to Mr. Li's shopping cart on both platforms and generated two one-click add-to-cart links. Mr. Li simply clicked the links and confirmed payment to wait for the groceries to be delivered.
[0103] This process significantly addresses the core pain point of inconvenient shopping for elderly people living alone, enabling scientific dietary plans to be truly implemented and improving adherence and convenience. Automatic price comparison and combined purchasing strategies help patients save on shopping expenses and time. More importantly, the system automates the entire process from understanding recipes to buying the right ingredients, significantly reducing the cognitive burden on elderly users when implementing complex nutritional plans.
[0104] Implementation Example 3 Mr. Wang, a 48-year-old patient, has advanced pancreatic cancer and is undergoing palliative chemotherapy. He also experiences severe cancer fatigue, weight loss (pre-cachexia), and occasional ascites.
[0105] Based on this method, a highly refined nutritional strategy is generated, employing a small-volume, high-energy-density nutritional supply pattern, and prioritizing nutrient delivery during short, predicted periods of better host physical condition. In step S9, after parsing this strategy, the system intelligently matches it from an integrated product and service library. This includes matching a tumor-specific complete nutritional formula powder as the main food source, characterized by high energy, high protein, and added fish oil, while calculating the recommended monthly consumption; matching a nutritional supplement straw cup and a medical-grade oral moisturizing spray for convenient, frequent small doses to relieve dry mouth symptoms; matching a smart precision kitchen scale for accurate weighing of the formula powder; and matching digital services, namely weekly video follow-ups with a clinical nutritionist and monthly review of the treatment plan by an oncologist. The system integrates all of the above items into a monthly package called the Pancreatic Cancer Home Nutritional Support Service Package, generating a clear list including all products, service schedules, detailed usage instructions, and total costs. After the patient subscribes, the nutritional powder, related supplies, and scales are packaged and delivered to their home. The nutritionist then conducts weekly video calls according to the schedule, providing guidance and adjustments based on the patient's feedback. The system can also dynamically adjust the recommended concentration of the nutritional powder for the following week based on the patient's latest uploaded weight and fatigue score data.
[0106] This model provides families of critically ill patients with a one-stop solution, from professional products to professional services, saving them the energy and effort of searching and coordinating with multiple sources. Regular nutritionist and doctor services ensure the safety and adaptability of the nutritional plan, establishing an effective bridge between home care and professional medical care. A dynamic adjustment mechanism based on a subscription model and continuous data feedback allows the support plan to evolve as the patient's condition changes, achieving continuous and individualized management of issues such as cachexia, which is of great value in maintaining the patient's quality of life.
[0107] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0108] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented in software, the above embodiments can be stored, in whole or in part, in a readable storage medium, such as a memory. The memory can be a read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. The memory can be integrated with the processor or exist independently and coupled to the processor through an interface circuit of an electronic device; the embodiments of the present invention do not specifically limit this.
[0109] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0110] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for intelligent nutrition recommendation for cancer patients based on metabolic rhythm synchronization, characterized in that, Includes the following steps: Step S1: Obtain raw time-series physiological data from continuous glucose monitoring devices and smart wearable devices through the patient terminal, and obtain clinical information including the patient's tumor type and current treatment stage. Align the multi-source physiological data to a unified time grid through interpolation and resampling to form standardized multimodal time-series data. Step S2: Calculate the statistical features within a preset time window from the standardized multimodal time series data, and extract rhythmic features through frequency domain transformation to generate a feature vector for modeling. Step S3: Input the feature vector into the trained bidirectional long short-term memory network to predict the host metabolic activity curve; Step S4: Construct a conditional generative adversarial network based on a knowledge graph of prior knowledge of tumor metabolism. Using the host metabolic activity curve, tumor type and current treatment stage as conditions, the tumor metabolic activity curve is inferred and generated through the conditional generative adversarial network. Step S5: Calculate the phase difference and time overlap between the host metabolic activity curve and the tumor metabolic activity curve to generate a time separation potential heatmap; Step S6: Using the features including the time separation potential heatmap, tumor type and current treatment stage as state input, a proximal policy optimization algorithm integrating Lagrange multiplier constraints is used to make a decision, and outputs a sequence of nutrient delivery actions divided into time periods at fixed intervals within the future basal metabolic cycle, wherein each action includes the delivery amount of protein, carbohydrates and fat, and the decision-making process satisfies the temporal nutrient constraints set based on the time separation potential heatmap, tumor type and current treatment stage; Step S7: Using the nutrient delivery action sequence as the target, and based on the current treatment stage, an optimization algorithm is used to search and optimize the recipe database to generate a daily recipe plan that balances multiple objectives such as nutritional fit, taste preference, preparation complexity, and cost.
2. The intelligent nutrition recommendation method for cancer patients according to claim 1, characterized in that, In step S3, the bidirectional long short-term memory network has a two-layer structure. Its input is a sequence of feature vectors for 7 consecutive days, and its output is a sequence of blood glucose prediction values for the next 24 hours at 5-minute intervals. Step S3 further includes a post-processing step, which performs a moving average smoothing process on the initial predicted value output by the network and limits its value to a preset physiological range.
3. The intelligent nutrition recommendation method for cancer patients according to claim 1, characterized in that, In step S4, the knowledge graph is constructed by extracting entities and relationships related to detoxification tumor metabolism from medical literature and databases. The input condition vector of the conditional generative adversarial network is formed by splicing and fusing the high-level representation of the host metabolic activity curve, the tumor type encoding, the current treatment stage encoding, and the prior knowledge vector from the knowledge graph. Step S4 also includes physiologically reasonable constraints and smoothing of the generated tumor metabolic activity curve.
4. The intelligent nutrition recommendation method for cancer patients according to claim 1, characterized in that, In step S5, calculating the phase difference includes detecting the peak time points of the two metabolic activity curves within 24 hours and calculating the absolute value of their time difference. Calculating the overlap of the time periods includes dividing 24 hours into multiple overlapping time periods, calculating the area under the curves of the two curves in each time period, and calculating the overlap ratio based on the area of the common active part. Generating the time separation potential heatmap includes calculating the separation potential index for each time point based on the phase difference and the overlap of each time period, and mapping it onto a continuous color scale.
5. The intelligent nutrition recommendation method for cancer patients according to claim 1, characterized in that, Step S1 specifically includes: the original time-series physiological data is transmitted to a local server or cloud platform via a Bluetooth gateway; the clinical information is extracted from the electronic medical record and laboratory information system via an interface; the alignment to a unified time grid includes timestamp synchronization correction based on the clock of the continuous blood glucose monitoring device, and resampling by linear interpolation with fixed time intervals as grid points. Step S1 also includes identifying and removing outliers caused by motion artifacts, and interpolating to complete short-term signal loss.
6. The intelligent nutrition recommendation method for cancer patients according to claim 1, characterized in that, In step S2, the preset time window is 72 hours and the sliding step is 24 hours. The statistical features include mean, variance, linear fit slope, area under the curve, skewness, and kurtosis. The frequency domain transformation is a fast Fourier transform, and the extracted rhythm features include the dominant frequency, corresponding amplitude, and phase. Step S2 further includes using principal component analysis to reduce the dimensionality of the spliced time-domain and frequency-domain features in order to generate the feature vector.
7. The intelligent nutrition recommendation method for cancer patients according to claim 1, characterized in that, In step S6, the temporal nutritional constraint includes: during periods of high tumor activity indicated by the time separation potential heatmap, the amount of carbohydrates delivered must not exceed a preset threshold. The proximal policy optimization algorithm that integrates Lagrange multiplier constraints transforms nutrient constraints into penalty terms and incorporates them into the objective function for optimization through the Lagrange relaxation method.
8. The intelligent nutrition recommendation method for cancer patients according to claim 1, characterized in that, In step S7, the optimization algorithm is a genetic algorithm, in which chromosomes use hybrid encoding, discrete genes represent dishes selected from the recipe database, and continuous genes represent dish portion scaling factors. Step S7 also includes an fitness assessment step, which comprehensively calculates the weighted scores of four sub-objectives: nutritional fit, taste preference, preparation complexity, and cost. When generating the daily menu plan, the weights are dynamically adjusted and optimized based on the current treatment stage, and specific types of dishes are avoided for patients in the disease treatment period.
9. The intelligent nutrition recommendation method for cancer patients according to claim 1, characterized in that, The method further includes: Step S8: Parse and map the daily recipe plan generated in step S7 into a combination of purchasable product inventory units, connect to the e-commerce platform through an interface to perform dynamic price comparison and inventory check, and generate a pre-filled shopping cart link.
10. The intelligent nutrition recommendation method for cancer patients according to claim 1, characterized in that, The method further includes: Step S9: Based on the nutrient delivery action sequence output in step S6 and the current treatment stage, match and combine clinical nutritional foods, symptom relief products, home medical devices and digital services from the predefined product service library to generate a personalized subscription product service package plan.