Patient diet digital visual management method and system based on multi-source data
By obtaining and analyzing the blood sugar, diet and exercise data of patients, constructing blood sugar fluctuation curves and performing correlation analysis, the problem of difficulty in in-depth modeling of the relationship between blood sugar fluctuations and behavior in the existing technology is solved, and more accurate blood sugar monitoring and personalized health management are achieved.
Patent Information
- Application Number
- CN202510623519.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-15
- Publication Date
- 2025-06-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing diabetes management methods are difficult to model in depth and systematically attribut the relationship between blood sugar fluctuations and diet and exercise behavior, making it difficult to provide targeted and interpreted dietary adjustment suggestions.
By obtaining multi-source data on blood sugar, diet and exercise, a blood sugar fluctuation curve is constructed, and a correlation analysis and attribution modeling is performed based on nutritional components and exercise characteristics, a multi-dimensional behavioral source analysis of blood sugar changes is achieved.
Accurately identify potential behavioral causes of blood sugar abnormalities, improve the accuracy of blood sugar fluctuation monitoring and the targeted nature of individualized health management, and provide patients with visual, understandable and traceable dietary and exercise behavior intervention support.
Smart Images

Figure CN120148766A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical and health information processing, and particularly to a method and system for digital visualization management of patients' diet based on multi-source data. Background Art
[0002] With the changes in lifestyle and dietary structure, the incidence of chronic metabolic diseases such as diabetes continues to rise, posing higher requirements for the long-term health management of patients. As the core goal of diabetes management, blood glucose control is affected by various factors, among which diet and exercise behaviors are the most crucial. Most of the existing diabetes management methods rely on patients to manually record their diet and exercise conditions and simply compare them with the results of intermittent blood glucose detection. There is a lack of in-depth modeling and systematic attribution between behaviors and blood glucose fluctuations, and it is often difficult to provide targeted and explanatory diet adjustment suggestions.
[0003] With the development of wearable devices, image recognition, behavior perception, and health data mining technologies, new opportunities have been provided for realizing personalized and data-driven health management. Currently, some systems have tried to assist in obtaining diet information through image recognition or perform blood glucose trend analysis through continuous blood glucose monitoring. However, how to further process blood glucose data with multi-source behavior data such as diet and exercise has become a problem. Summary of the Invention
[0004] To solve the above technical problems, the present invention proposes a method and system for digital visualization management of patients' diet based on multi-source data to solve at least one of the above technical problems.
[0005] The present application provides a method for digital visualization management of patients' diet based on multi-source data, including the following steps: Step S1: Obtain patients' blood glucose data, generate a blood glucose fluctuation curve based on the patients' blood glucose data to obtain blood glucose fluctuation curve data; obtain patients' diet data, perform nutritional analysis based on the patients' diet data to obtain diet nutrition data; obtain patients' exercise data, and extract patients' exercise characteristics based on the patients' exercise data to obtain patients' exercise characteristic data; Step S2: Perform blood glucose-diet analysis based on the blood glucose fluctuation curve data and the diet nutrition data to obtain blood glucose-diet data; Step S3: Perform blood glucose-exercise analysis based on the blood glucose fluctuation curve data and the patients' exercise characteristic data to obtain blood glucose-exercise data; Step S4: Perform combined diet-exercise analysis based on the blood glucose-diet data and the blood glucose-exercise data to obtain multi-source influence data on patients' diet, and perform visualization operations on the multi-source influence data on patients' diet.
[0006] In the present invention, by collecting and analyzing multi-source data such as the blood glucose, diet, and exercise of patients, a blood glucose fluctuation curve is constructed, and correlation analysis and attribution modeling are respectively carried out in combination with nutritional components and exercise characteristics, so as to realize multi-dimensional behavior source analysis of blood glucose changes. The present invention can accurately identify potential behavioral incentives for abnormal blood glucose, improve the accuracy of blood glucose fluctuation monitoring and the pertinence of individualized health management, provide visual, understandable, and traceable dietary and exercise behavior intervention support for patients, and has good intelligent analysis capabilities and application promotion value.
[0007] Preferably, step S1 is specifically as follows: Obtain the blood glucose data of the patient through a subcutaneous blood glucose meter or a portable blood glucose meter; Conduct blood glucose range division based on the patient's blood glucose data to obtain blood glucose range data; Conduct interval segmentation fitting based on the blood glucose range data to obtain blood glucose fluctuation curve data; Obtain the patient's diet data, and conduct nutritional analysis based on the patient's diet data and a preset dietary nutrition knowledge graph to obtain dietary nutrition data; Obtain the patient's exercise data, and extract the patient's exercise characteristics based on the patient's exercise data to obtain the patient's exercise characteristic data.
[0008] In the present invention, by introducing various blood glucose collection methods such as subcutaneous blood glucose meters or portable blood glucose meters, the continuity and flexibility of blood glucose data acquisition are improved; through blood glucose range division and segmentation fitting processing, the local change trend of blood glucose fluctuations can be accurately depicted, and the expression accuracy of the blood glucose curve can be improved; combining the dietary nutrition knowledge graph to conduct structured analysis of the diet data is conducive to realizing the intelligent identification and classification of nutritional components; at the same time, through the feature extraction of exercise data, the patient's exercise behavior patterns can be comprehensively captured, providing high-quality and multi-dimensional data support for correlation modeling and behavior attribution.
[0009] Preferably, the blood glucose range division is specifically as follows: Obtain the user's historical blood glucose data; Extract the fluctuation characteristics based on the user's historical blood glucose data to obtain historical blood glucose fluctuation characteristic data; Calculate the slope based on the historical blood glucose fluctuation characteristic data to obtain the fluctuation slope data; Conduct clustering calculation based on the fluctuation slope data to obtain the fluctuation slope clustering data; Conduct blood glucose range division on the patient's blood glucose data based on the fluctuation slope clustering data to obtain low blood glucose fluctuation range data, normal blood glucose fluctuation range data, and high blood glucose fluctuation range data; Integrate the low blood glucose fluctuation range data, normal blood glucose fluctuation range data, and high blood glucose fluctuation range data in layers to obtain blood glucose range data.
[0010] In the present invention, by extracting the fluctuation characteristics of the user's historical blood glucose data and realizing the intelligent division of blood glucose fluctuation patterns based on slope calculation and clustering algorithms, it no longer relies on traditional static threshold judgment and can more accurately identify the individual fluctuation laws in blood glucose data. By dividing blood glucose into multiple intervals such as low fluctuation, normal fluctuation, and high fluctuation and performing hierarchical integration, the dynamic adaptability and expression accuracy of the blood glucose curve can be improved, providing more targeted and robust interval-based data for blood glucose behavior attribution, risk identification, and personalized intervention.
[0011] Preferably, the blood glucose fluctuation curve data includes the first blood glucose interval curve data, the second blood glucose interval curve data, and the third blood glucose interval curve data, and the interval piecewise fitting is specifically as follows: Perform exponential rise fitting on the blood glucose low-fluctuation interval data to obtain the first blood glucose interval curve data; Perform moving average fitting on the blood glucose normal-fluctuation interval data to obtain the second blood glucose interval curve data; Perform spline fitting on the blood glucose high-fluctuation interval data to obtain the third blood glucose interval data.
[0012] In the present invention, by respectively adopting exponential rise fitting, moving average fitting, and spline fitting for the blood glucose low-fluctuation, normal-fluctuation, and high-fluctuation intervals, it can accurately match the fitting model according to the change characteristics of blood glucose data in different fluctuation states, and realize the reconstruction of the blood glucose curve with high fidelity in sub-regions. The present invention effectively improves the fitting accuracy and trend expression ability of the blood glucose curve in scenarios of stable rise, normal fluctuation, and drastic change, providing more representative blood glucose fluctuation characteristic data support for behavior attribution, prediction modeling, and personalized health intervention.
[0013] Preferably, the specific method for obtaining the patient's diet data is as follows: Obtain the patient's diet image data; Perform image segmentation on the patient's diet image data to obtain diet image segmentation data; Perform food recognition according to the diet image segmentation data to obtain food recognition data; Perform volume estimation according to the food recognition data and the diet image segmentation data to obtain food volume estimation data; Integrate the food volume estimation data and the food recognition data to obtain the patient's diet data.
[0014] In the present invention, by acquiring the dietary image data of patients and successively performing image segmentation, food recognition, and volume estimation processing, the automatic extraction and quantitative analysis of the types and quantities of ingested foods can be realized, avoiding the problems of manual recording errors and inaccurate subjective judgments. By integrating the recognition results with the volume data to generate structured patient dietary data, not only the accuracy and efficiency of dietary information acquisition are improved, but also a highly reliable data basis is provided for nutritional analysis and blood glucose behavior modeling, with significant intelligent and practical value.
[0015] Preferably, step S2 is specifically as follows: Perform short-time Fourier transform on the blood glucose fluctuation curve data to obtain curve spectrum feature data; Obtain the dietary time data corresponding to the dietary nutrition data; Construct a dietary event based on the dietary nutrition data and the dietary time data to obtain dietary event data; Perform spectrum interference marking on the curve spectrum feature data according to the dietary event data to obtain curve spectrum feature marking data; Perform multi-resolution spectrum decomposition on the curve spectrum feature marking data to obtain curve scale weighted map data; Perform spectrum component attribution on the curve scale weighted map data to obtain blood glucose dietary data.
[0016] In the present invention, by performing short-time Fourier transform on the blood glucose fluctuation curve data, combining dietary events for spectrum interference marking and multi-resolution decomposition, the frequency domain characteristics in the blood glucose change process can be accurately associated with specific dietary behaviors. By constructing a scale weighted map and implementing spectrum component attribution, not only the fine-grained recognition of the dietary impact components in the blood glucose response is realized, but also the interpretability and accuracy of the blood glucose-diet relationship modeling are improved, which helps to more scientifically analyze the action mechanism of different dietary events on blood glucose fluctuations, thereby providing a high-value analysis basis for personalized diet optimization.
[0017] Preferably, the spectrum component attribution is specifically as follows: Obtain the blood glucose fluctuation curve data of multiple users and the user dietary event data; Construct a dietary event based on the blood glucose fluctuation curve data of the user and the user dietary event data to obtain user dietary event data; Extract the spectrum fingerprint from the user dietary event data to obtain user spectrum fingerprint data; Compare the user spectrum fingerprint data with the curve scale weighted map data to obtain curve comparison data; Perform attribution processing on the curve comparison data and the user dietary event data to obtain blood glucose dietary data.
[0018] In the present invention, by jointly modeling the blood glucose fluctuation curve data and diet event data of multiple users, constructing a diet event spectrum fingerprint, and comparing its features with the scale-weighted graph of the blood glucose curve, the accurate positioning and identification of diet behavior in frequency domain features can be achieved. Through attribution processing based on the comparison results, not only the spectral response characteristics of different types of diet behavior on blood glucose fluctuations are effectively extracted, but also the accuracy and personalized discrimination ability of diet influencing factor analysis are significantly improved, providing more interpretable and high-dimensional blood glucose-diet association data support for diet optimization suggestions and behavior prediction.
[0019] Preferably, step S3 is specifically as follows: Synchronize the time according to the blood glucose fluctuation curve data and the patient's exercise characteristic data to obtain blood glucose-exercise synchronized data; Calculate the blood glucose change rate according to the blood glucose-exercise synchronized data to obtain blood glucose change rate data; Determine the blood glucose stable period according to different blood glucose-exercise data to obtain blood glucose stable period data; Determine the blood glucose unstable period according to the blood glucose stable period data and different blood glucose-exercise data to obtain blood glucose unstable period data; Classify the exercise according to the patient's exercise characteristic data to obtain exercise classification data; Associate the blood glucose change rate data, the blood glucose stable period data, the blood glucose unstable period data, and the exercise classification data to obtain blood glucose-exercise data.
[0020] In the present invention, by performing time synchronization processing on the blood glucose fluctuation curve data and the patient's exercise characteristic data, and combining blood glucose change rate calculation and fluctuation interval division, the stable period and unstable period of blood glucose before and after exercise of the patient can be accurately identified, and then the response state of blood glucose to different types of exercise behavior can be clarified. At the same time, by classifying the exercise characteristics and performing multi-dimensional correlation analysis in combination with blood glucose fluctuation characteristics, the differences in the roles of different exercise methods in blood glucose regulation can be effectively mined, the accuracy and personalization ability of blood glucose-exercise influence modeling can be improved, and data support for formulating scientific and targeted exercise intervention strategies can be provided.
[0021] Preferably, step S4 is specifically as follows: Synchronize the time according to the blood glucose-diet data and the blood glucose-exercise data to obtain blood glucose-exercise-diet synchronized data; Calculate the single-factor influence according to the blood glucose-exercise-diet synchronized data to obtain single-factor influence data; Calculate the attribution ratio according to the single-factor influence data to obtain multi-source influence data of the patient's diet, and perform visualization operation on the multi-source influence data of the patient's diet; Perform tree model regression based on single-factor influence data to obtain multi-source influence data on patients' diet, and visualize the multi-source influence data on patients' diet.
[0022] In the present invention, through time synchronization processing of blood glucose diet data and blood glucose exercise data, collaborative analysis of multi-behavior data under a unified time axis is realized. Through single-factor influence calculation and attribution ratio analysis, the relative contribution degrees of diet and exercise to blood glucose fluctuations can be quantified, and complex non-linear relationships can be further explored based on tree model regression or attribution ratio calculation, thereby generating structured and interpretable multi-source influence data on diet. The present invention not only improves the accuracy and intelligent level of the analysis of the causes of blood glucose fluctuations, but also provides an intuitive and quantitative visual reference basis for individualized health management, and has good practicality and promotion value.
[0023] Preferably, the present application also provides a digital visualization management system for patients' diet based on multi-source data, which is used to execute the digital visualization management method for patients' diet based on multi-source data as described above. The digital visualization management system for patients' diet based on multi-source data includes: A patient multi-source data acquisition module, configured to obtain patients' blood glucose data, generate a blood glucose fluctuation curve based on the patients' blood glucose data to obtain blood glucose fluctuation curve data; obtain patients' diet data, perform nutritional analysis based on the patients' diet data to obtain diet nutrition data; obtain patients' exercise data, and extract patients' exercise characteristics based on the patients' exercise data to obtain patients' exercise characteristic data; A patient blood glucose diet analysis module, configured to perform blood glucose diet analysis based on the blood glucose fluctuation curve data and the diet nutrition data to obtain blood glucose diet data; A patient blood glucose exercise analysis module, configured to perform blood glucose exercise analysis based on the blood glucose fluctuation curve data and the patients' exercise characteristic data to obtain blood glucose exercise data; A patient diet and exercise joint analysis module, configured to perform diet and exercise joint analysis based on the blood glucose diet data and the blood glucose exercise data to obtain multi-source influence data on patients' diet, and visualize the multi-source influence data on patients' diet.
[0024] By integrating multi-source data of the patient's blood glucose, diet, and exercise, the present invention constructs a complete behavior-physiological correlation analysis chain and has high-precision data acquisition and modeling capabilities. In step S1, technologies such as partition fitting and image recognition are used to accurately extract blood glucose fluctuations, dietary nutrition, and exercise feature data; in steps S2 and S3, through spectrum analysis and stability modeling, the effects of diet and exercise on blood glucose changes are respectively modeled; in step S4, attribution ratio calculation or tree model regression is further introduced to perform multi-source fusion analysis on the causes of blood glucose fluctuations. The present invention can dynamically identify the dominant behavior factors of blood glucose fluctuations, improve the intelligent and personalized management capabilities of blood glucose monitoring, and enhance the patient's understanding of the relationship between their own behavior and blood glucose through visualization means, which helps to scientifically formulate diet and exercise plans and has good health intervention support value and practical application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Other features, objects, and advantages of the present application will become more apparent by reading the detailed description of the non-limiting embodiments with reference to the following drawings: Figure 1 The flowchart showing the steps of a method for digital visualization management of a patient's diet based on multi-source data in an embodiment; Figure 2 The flowchart showing the steps of a method for collecting multi-source data of a patient in an embodiment; Figure 3 The flowchart showing the steps of a method for analyzing a patient's blood glucose and diet in an embodiment; Figure 4 The flowchart showing the steps of a method for analyzing a patient's blood glucose and exercise in an embodiment; Figure 5 The flowchart showing the steps of a method for joint analysis of a patient's diet and exercise in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0026] The technical method of the present invention will be clearly and completely described below with reference to the drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.
[0027] In addition, the attached drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor methods and / or microcontroller methods.
[0028] It should be understood that although terms such as "first" and "second" may be used herein to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.
[0029] Please refer to Figures 1 to 5 , this application provides a digital visualization management method for patient diet based on multi-source data, including the following steps: Step S1: Obtain the patient's blood glucose data, generate a blood glucose fluctuation curve based on the patient's blood glucose data to obtain blood glucose fluctuation curve data; obtain the patient's diet data, perform nutritional analysis based on the patient's diet data to obtain diet nutrition data; obtain the patient's exercise data, and extract the patient's exercise characteristics based on the patient's exercise data to obtain patient exercise characteristic data; Specifically, the blood glucose values of the patient are collected every 5 minutes by a continuous blood glucose monitoring device (such as CGM), and the continuous collection time is not less than 24 hours. The original blood glucose data is smoothed (such as moving average filtering, window length is 3), and outliers (such as value change greater than 50 mg / dL / 5 min) are removed, and then the blood glucose fluctuation curve is plotted. Calculate the following characteristic data as the blood glucose fluctuation curve data: daily average blood glucose value, blood glucose standard deviation, maximum fluctuation amplitude, blood glucose increase amplitude 2 hours after a meal, and the proportion of hyperglycemic duration.
[0030] The patient uploads the food images of three meals a day by taking pictures through the APP, and analyzes the food types and portions in combination with the AI food recognition algorithm (such as YOLO+ResNet). Combining with the national nutrition database, convert the nutritional components according to each food to obtain the daily intake of: total calories (kcal), carbohydrate / protein / fat ratio (%), cellulose, sugar, sodium, vitamin content, generate diet nutrition data, and align it with the blood glucose data according to the timestamp.
[0031] The following data are collected through wearable devices (such as smart bracelets): number of steps, heart rate, exercise duration, type (walking / running / cycling), and the frequency is recorded once per minute. Time series analysis and activity recognition models (such as LSTM+decision tree) are used to extract the following exercise feature data: total daily energy consumption (unit kcal), high-intensity exercise duration (>6 METs), whether light exercise is performed within 1 hour after each meal, and exercise regularity score (continuity, interval).
[0032] Step S2: performing blood sugar diet analysis according to the blood sugar fluctuation curve data and the diet nutrition data to obtain blood sugar diet data; Specifically, the dietary nutrition data and blood glucose fluctuation curve data are aligned in time, and the window is ±2 hours to analyze the pre-meal and post-meal blood glucose response. A meal-blood glucose response model is established, and the following relationships are fitted using linear regression (fitting based on data by minimizing error calculation) and decision tree model (by performing preliminary feature extraction on the data to obtain feature data; extracting tree nodes from feature data to obtain tree node data; and constructing a tree on tree node data to obtain a decision tree model): whether a specific amount of carbon water causes a rapid rise in blood glucose after a meal (>40 mg / dL), whether a high-fat diet causes a delayed rise in blood glucose (>3 hours peak), and the buffering effect of a high-fiber diet on blood glucose rise. The output result is blood glucose diet data, including the blood glucose response weight coefficient (positive / negative correlation) of each nutrient, the impact significance score (such as P value), and recommended dietary adjustment suggestions.
[0033] Step S3: performing blood sugar movement analysis according to the blood sugar fluctuation curve data and the patient's movement characteristic data to obtain blood sugar movement data; Specifically, the exercise feature data and blood sugar fluctuation curve data are also aligned in time, focusing on the blood sugar change trend within 1 hour before and after exercise. Analyze the pattern of exercise affecting blood sugar, such as whether there is a drop in blood sugar within 2 hours after exercise (the drop is >30mg / dL), whether evening exercise reduces fasting blood sugar the next morning, and the correlation between total daily exercise time and blood sugar stability throughout the day. Output blood sugar exercise data, including the average intervention effect of different types of exercise on blood sugar, personalized recommended exercise time periods (such as walking within 30 minutes after a meal), and the functional relationship between the blood sugar fluctuation reduction rate and exercise frequency.
[0034] Step S4: Perform a diet-exercise joint analysis based on the blood sugar diet data and the blood sugar exercise data to obtain the multi-source impact data of the patient's diet, so as to visualize the multi-source impact data of the patient's diet.
[0035] Specifically, input the blood glucose diet data and blood glucose exercise data into a fusion model (such as multi-factor logistic regression, SVM, or Bayesian network) to evaluate the synergistic effect of diet + exercise on blood glucose control. The output results are the multi-source influence data of the patient's diet, specifically including the comprehensive score (-10 + 10) of each meal + the exercise combination during that period on blood glucose, the weight decomposition diagram of influencing factors (such as 60% diet, 30% exercise, 10% others), and the blood glucose trend simulation diagram (predicting the blood glucose curve for the next 24 hours based on the existing diet + exercise behavior). Use visualization tools (such as echarts / d3.js) to display, such as the relationship diagram between blood glucose and nutritional components (radar chart), the heat map of the diet-exercise intervention matrix, and the dynamic panel of intervention suggestions (the intervention suggestions can be given through the medical cloud platform, such as recommending reducing carbohydrates for breakfast and increasing light exercise).
[0036] Preferably, step S1 is specifically as follows: Step S11: Obtain the patient's blood glucose data through a subcutaneous blood glucose meter or a portable blood glucose meter; Specifically, for the subcutaneous blood glucose meter (such as a CGM device): Automatically collect the blood glucose value (unit: mg / dL) every 5 minutes. For the portable blood glucose meter: The patient manually measures the blood glucose at specific time points (such as when getting up, before and after three meals, and before going to bed).
[0037] Step S12: Divide the blood glucose intervals according to the patient's blood glucose data to obtain blood glucose interval data; Specifically, divide the blood glucose intervals according to the International Diabetes Federation (IDF) standard or a custom strategy. For example: The blood glucose interval division standard table 1 is as follows: ; Step S13: Perform interval segmentation fitting according to the blood glucose interval data to obtain blood glucose fluctuation curve data; Specifically, the daily blood glucose curve has time as the horizontal axis and blood glucose value as the vertical axis. Perform a linear fitting between each adjacent interval segment (such as normal → hyperglycemia). The form of the fitting function: (For each segment ) or use spline interpolation (such as cubic spline) to improve the smoothness. The calculated indicators include the slope of each segment : indicating the blood glucose rising / falling rate; the number of fluctuation points: that is, the number of times of interval changes; the daily maximum fluctuation amplitude and fluctuation frequency.
[0038] Step S14: Obtain the patient's diet data and perform nutritional analysis according to the patient's diet data and the preset diet nutrition knowledge graph to obtain diet nutrition data; Specifically, the user uploads photos of each meal or voice input content (such as "Breakfast: two eggs, a cup of soy milk") using a mobile phone APP. An image recognition model (such as YOLOv5 + ResNet50) is used to identify the types and portions of dishes, or a natural language processing model is used to parse the description. The types and portions of dishes are nutritionally matched with a preset diet nutrition knowledge graph to obtain diet nutrition data.
[0039] Step S15: Obtain the patient's exercise data, and extract the patient's exercise characteristics based on the patient's exercise data to obtain the patient's exercise characteristic data.
[0040] Specifically, it comes from intelligent wearable devices (such as Apple Watch, Xiaomi bracelet); the collected content includes time, exercise type (walking / running / cycling), duration, heart rate, steps, calories, etc. The feature extraction rules are the total daily exercise time and total steps; the intensity level of each exercise (calculated based on METs): <3 METs: low intensity; 3 - 6 METs: moderate intensity; >6 METs: high intensity; whether there is moderate-intensity exercise within 1 hour after a meal (such as walking ≥15 minutes); the exercise regularity score (such as marking "irregular" if there is no exercise for 3 consecutive days).
[0041] Preferably, the specific blood glucose range division is as follows: Obtain the user's historical blood glucose data; Specifically, continuous blood glucose data recorded at least every 5 minutes for the past 7 days (such as provided by a CGM device).
[0042] Extract the fluctuation characteristics based on the user's historical blood glucose data to obtain the historical blood glucose fluctuation characteristic data; Specifically, perform a sliding window process on the 24-hour blood glucose sequence (such as a 30-minute window, 15-minute step size); extract the following fluctuation characteristics within each window: average slope (subsequent calculation); maximum-minimum difference (ΔG); number of local peaks; number of blood glucose direction changes (rising → falling or falling → rising).
[0043] Calculate the slope based on the historical blood glucose fluctuation characteristic data to obtain the fluctuation slope data; Specifically, fit a linear trend to the blood glucose values within each window: to obtain the slope . The slope value is the rate of change per unit time (mg / dL / min), positive slope: blood glucose rising; negative slope: blood glucose falling; near zero: blood glucose stable.
[0044] Perform clustering calculation based on the fluctuation slope data to obtain the fluctuation slope clustering data; Specifically, the slope data is divided into three categories using an unsupervised clustering algorithm (such as K-Means, K = 3): low volatility interval: slope near 0, blood glucose is stable; normal volatility interval: medium positive / negative slope, belonging to normal fluctuations; high volatility interval: large absolute value of slope, drastic changes. K-means parameters: feature: slope value; normalization processing: Z-score normalization; number of iterations: 100 rounds; clustering stability verification: silhouette coefficient > 0.5.
[0045] Based on the clustered data of the fluctuation slope, the blood glucose data of the patient is divided into blood glucose low volatility interval data, blood glucose normal volatility interval data, and blood glucose high volatility interval data; Specifically, all original blood glucose data segments (divided by time window) are mapped according to their slope categories as: low volatility interval data (Low): steady state; normal volatility interval data (Normal): fluctuations before and after meals; high volatility interval data (High): drastic rise / fall; The blood glucose low volatility interval data, blood glucose normal volatility interval data, and blood glucose high volatility interval data are hierarchically integrated to obtain blood glucose interval data.
[0046] Specifically, windows of the same continuous category are merged to form larger "interval blocks"; for example: 4 consecutive windows (08:00~09:00) are all "high volatility" → merged into one "high volatility interval"; hierarchical annotation: each interval is marked with annotations (volatility level, start and end times, average slope, maximum amplitude, etc.); Preferably, the blood glucose fluctuation curve data includes first blood glucose interval curve data, second blood glucose interval curve data, and third blood glucose interval curve data, and the interval segmentation fitting is specifically as follows: Perform exponential rise fitting on the blood glucose low volatility interval data to obtain the first blood glucose interval curve data; Specifically, an exponential model is used for fitting, in the form as follows: , is the time blood glucose value at the moment, is the initial amplitude coefficient of exponential growth (set through empirical data), is the base of the natural logarithm, is the exponential growth rate, is the current time point, is the start time point of the fitting interval, is the blood glucose baseline value / constant offset, and the fitting start and end intervals are determined by the previous stage of blood glucose stable section (such as 00:00~06:00); use the least squares method for fitting, and the error function is: , is the overall fitting error (sum of squared errors), is the sampling point index, is the number of sampling points, is the th actually observed blood glucose value; applicable to the section where the data slope is less than a certain threshold (such as ±0.05); the model evaluation index is controlled within a set range (such as <10 mg / dL²) by the mean squared error (MSE).
[0047] Perform a moving average fitting on the data in the normal blood glucose fluctuation range to obtain the second blood glucose range curve data; Specifically, perform smoothing processing using a moving average. For example, the window size is set to 57 data points (corresponding to 2535 minutes); weighted moving average can be performed through a preset weight to enhance the weight of recent changes, and the weight is obtained by fitting historical data.
[0048] , is the blood glucose value after moving average, is 2k + 1, which is the total number of points in the window, is the current sampling point index, is the traversal index within the moving window, is the th blood glucose value at a certain time point; used for data in the normal slope range (the absolute value of the slope is between 0.05 - 0.2); the main function of this method is to remove small fluctuations and retain the overall trend; the output is a smooth polyline without obvious fluctuations, used to evaluate the diet response.
[0049] Perform spline fitting on the data in the high blood glucose fluctuation range to obtain the third blood glucose range data.
[0050] Specifically, the blood glucose changes violently, such as a rapid increase after a meal or a rapid decrease after exercise; the curve has multiple extreme points and is difficult to fit. Use a cubic spline function for continuous fitting; the spline function constructs multiple cubic polynomials between each data point and keeps the first and second derivatives continuous. Node selection: Construct local segments with every 5 points (i.e., every 25 minutes); Boundary condition selection: Use natural boundary splines (the second derivative at both ends is 0), or Clamped splines (set the derivative at the endpoints); The fitting function form is: , is the th spline fitting curve function for a segment, is the blood glucose level (function value baseline) at the starting point of the is the initial change rate of blood glucose increase / decrease, is the current time point, is the th starting time point of a fitting segment, is the The acceleration of blood glucose change in each segment affects the degree of curve bending. For the curvature and volatility of the blood glucose change trend in each segment; accurately capture the trends of multiple peaks and valleys while avoiding overfitting jitter; the fitting effect is evaluated by the criteria of the smoothest curve and the minimum sum of squared residuals.
[0051] Preferably, obtaining the patient's dietary data specifically includes: Obtaining the patient's dietary image data; Specifically, the patient uses a mobile device (such as a mobile phone or a smart plate) to take pictures of each meal, with the shooting angle required to be vertical or 45-degree top-down view; including a standard reference object (such as a plate border or a reference block of known size); the image needs to be taken under natural light or white light to reduce shadow interference; each picture needs to be bound with a timestamp and the patient ID for synchronization with the blood glucose timeline.
[0052] Performing image segmentation on the patient's dietary image data to obtain dietary image segmentation data; Specifically, using a deep learning image segmentation model (such as Mask R-CNN, DeepLabV3+) to segment the image and identify and separate each food area in the picture; the model training data includes thousands of labeled food images covering mainstream dietary structures (such as rice, vegetables, meat, etc.); when segmenting, generating a pixel-level mask for each area and outputting the bounding box information of the area. The segmentation result of each food area includes the area location; the area contour; the area pixel mask (for subsequent volume estimation); the segmentation confidence.
[0053] Performing food recognition based on the dietary image segmentation data to obtain food recognition data; Specifically, applying an image classification network (such as ResNet50 + Attention mechanism) to each segmented area to identify the food type; using the constructed food type database to support common dishes such as Chinese cuisine, Western cuisine, and fast food; if the system is unsure, it can prompt the user to confirm (e.g., Is this "Braised Pork" or "Sweet and Sour Pork Tenderloin?") for human-computer collaborative recognition; multi-label recognition supports composite dishes (e.g., "Fish-Flavored Shredded Pork with Rice" → separate recognition of "shredded pork", "rice", "sauce"). Output content: the food category name of each segmented area; the matching confidence score; the food standard ID (for matching with the nutrition database).
[0054] Performing volume estimation based on the food recognition data and the dietary image segmentation data to obtain food volume estimation data; Specifically, the monocular volume estimation technology based on images combines the following methods: reference object ratio method: pixel comparison with standard reference objects (such as coins, tableware, tray grids); depth estimation model: using deep learning to estimate the relative depth of each pixel in the image and reconstruct an approximate 3D structure; regional height hypothesis: establishing a typical height hypothesis interval for each type of food (such as rice is about 2 cm thick, steak is about 3 cm); estimating the three-dimensional volume of each food (unit: cm³). Volume estimation elements: food type → determines density; image segmentation area (pixels); shooting reference size conversion ratio; reconstructed depth (or assumed height) → volume.
[0055] Integrate the food volume estimation data and the food recognition data to obtain the patient's diet data.
[0056] Specifically, bind each food recognition result to its corresponding volume; query the nutrition knowledge graph database (such as: 100 cm³ of rice ≈ 130 kcal, 28 g of carbohydrates, 2 g of protein); combine volume and density to estimate the mass (g) of each portion of food, and further calculate: calories (kcal); carbohydrates, protein, fat (g); trace indexes such as sugar, sodium, dietary fiber; summarize the nutritional values of all dishes to obtain the total nutritional intake structure for a meal / day. Output content: food list (name + recognition ID); estimated volume, mass, and nutritional composition of each food; total calories, macronutrient ratio; data format is structured for easy joint analysis with blood glucose data.
[0057] Preferably, step S2 is specifically as follows: Step S21: Perform short-time Fourier transform on the blood glucose fluctuation curve data to obtain curve spectrum feature data; Specifically, convert the curve of blood glucose changing with time into a frequency-domain signal to identify periodic components and high-frequency interference. Perform short-time Fourier transform (STFT) on the blood glucose fluctuation curve: use a sliding window (such as a 1-hour window, 10-minute step); perform fast Fourier transform (FFT) within each window; extract the frequency distribution map of each time window: including frequency components (such as low frequency, main frequency, sub-high frequency); frequency amplitude (blood glucose change intensity); phase change (trend direction). Obtain a spectrum time series matrix, with the horizontal axis being time, the vertical axis being frequency, and the color / value representing the amplitude.
[0058] Step S22: Obtain the diet time data corresponding to the diet nutrition data; Specifically, determine the exact time points for each dietary behavior as event trigger points. From the dietary data obtained in step S1, extract the timestamps (photo-taking time, recording time) of each piece of data; if a meal involves multiple food images, take the earliest shooting time as the dietary time for that meal; if the patient is allowed to supplement the dietary record (such as taking a photo after eating), mark it as a delayed input. Obtain each dietary record with a time tag to mark the event window in the spectrogram.
[0059] Step S23: Construct dietary events based on the dietary nutrition data and dietary time data to obtain dietary event data; Specifically, integrate "food + time" into an analysis unit: dietary event, for marking and attribution. Each complete intake behavior is marked as a dietary event, including: dietary time (such as 7:30 am); total calorie intake; proportions of key components such as carbohydrates, proteins, and fats; carbohydrate density (g / minute) as an indicator of hyperglycemic interference potential. Set an interference analysis window for each event (such as the 2 hours after the event as the main observation period); obtain dietary event structure data (time + nutritional components + analysis window), providing a basis for spectral marking.
[0060] Step S24: Perform spectral interference marking on the curve spectral feature data according to the dietary event data to obtain curve spectral feature marked data; Specifically, mark in the blood glucose spectrogram which time windows are affected by dietary behaviors. Traverse the spectral feature data to find the spectral segments that fall within the analysis window of each dietary event; mark the corresponding frequency region (from 0.01 to 0.05 Hz, i.e., the change in 20 - 100 minutes) as "possibly affected by diet"; at the same time, record the main frequency component and abnormal amplitude fluctuations during this period (such as an increase in frequency amplitude by more than 30%); obtain the marked spectral matrix, with each segment having an "interference flag"; indicate whether it is affected by high-carbohydrate diet or delayed effect of high-fat diet.
[0061] Step S25: Perform multi-resolution spectral decomposition on the curve spectral feature marked data to obtain curve scale weighted map data; Specifically, use a multi-scale method to separate frequency components and further analyze the impact of dietary events on fluctuations at different time scales. Perform multi-resolution decomposition on the blood glucose signal using wavelet transform (such as Daubechies or Symlet); split the signal into multiple frequency bands: low frequency (>2-hour trend), medium frequency (1 - 2-hour dietary response), high frequency (rapid anomaly); weight and superimpose the impact weights of dietary interference on each scale band (such as a high carbohydrate content → increase the medium frequency weight); obtain the curve scale weighted map: showing the distribution of the impact of dietary interference at different time scales; it can be presented in a graphical form, with the horizontal axis representing time, the vertical axis representing scale, and the color representing the response intensity.
[0062] Step S26: Perform spectrum component attribution based on the curve scale weighted graph data to obtain blood glucose diet data.
[0063] Specifically, correspond spectrum anomalies to specific diet events to achieve causal speculation and structured output. For each diet event, extract the peak value of the weighted spectrogram within the corresponding analysis window; calculate its interpretation strength for medium / high frequency fluctuations (such as contribution degree > 0.6); output the attribution result: the interpretation ratio of this diet to the blood glucose rise peak value; the contribution of each nutrient component to the frequency response (such as the regression coefficient of high carbohydrate on the frequency amplitude increase); whether it triggers "delayed hyperglycemia". The blood glucose diet data structure includes time points; corresponding diet events; response frequency bands; attribution strength; recommended regulation strategies (such as reducing carbohydrate intake during this period).
[0064] Preferably, the spectrum component attribution is specifically as follows: Obtain blood glucose fluctuation curve data of multiple users and user diet event data; Specifically, construct a training and comparison sample library for spectrum attribution analysis; the data source must have diversity and time integrity. From users who have agreed to share data, batch obtain their: continuous blood glucose monitoring data (at least 72 hours or more, sampling interval ≤ 5 minutes); diet event data identified by the system or annotated by users (including time and nutrition information); uniformly format and clean the data (remove outliers, complete missing points); require each blood glucose curve to cover multiple complete diet cycles to ensure event density.
[0065] Construct diet events based on the blood glucose fluctuation curve data of users and the user diet event data to obtain user diet event data; Specifically, structure the original food intake and time points into diet event entities with analysis dimensions. Repeat the diet event construction method in step S2 to extract the following elements: diet time; nutritional composition (carbohydrates, fats, proteins, sugars, etc.); intake intensity (such as calorie density per minute); food category coding (such as staple food category, dairy product category, fried food category, etc.); background blood glucose status (such as whether it is in a high fluctuation state 30 minutes before eating). Form a structured diet event label data set to facilitate alignment with spectrum data.
[0066] Extract spectrum fingerprints from the user diet event data to obtain user spectrum fingerprint data; Specifically, a typical spectral response template, i.e., a spectral fingerprint, is constructed for each dietary event. Within the analysis window after the occurrence of the dietary event (such as 0 - 3 hours), the spectral distribution map of the blood glucose curve within this interval is extracted; the spectral map is normalized to ensure comparability among different users and different blood glucose levels; the following key spectral features are extracted to form the spectral fingerprint: the main frequency position and amplitude; the high-frequency amplitude change rate; the frequency energy center (spectral centroid); the number and spacing of peaks (representing the fluctuation pattern); the spectral fingerprints of different users under the same type of diet (such as "high-carbohydrate, low-fat breakfast") can be clustered to form a standard response template. A set of spectral fingerprint vectors (for comparison) is output for each dietary event; the fingerprints of similar events can be further used to construct a feature cluster for the dietary event category.
[0067] Specifically, further, the dietary event data of the user is subjected to diet-induced time window cropping to obtain diet-induced partition data; the diet-induced partition data is subjected to multi-resolution spectral segmentation processing to obtain multi-resolution spectral map data; the multi-resolution spectral map data is subjected to local main frequency drift path tracking to obtain main frequency drift trajectory curve data; the main frequency drift trajectory curve data is subjected to sub-band energy density sub-region coding to obtain sub-band signature data; deep feature coding is performed based on the sub-band signature data and the main frequency drift trajectory curve data to obtain user spectral fingerprint data.
[0068] Obtain the time stamp corresponding to the user's dietary event, denoted as . Starting from as the starting time point, retrieve the corresponding blood glucose curve data backward from this time point. The initially set analysis window range is the 0 - 3 hour time period starting from . During the retrieval process, the change rate of the blood glucose curve in each consecutive time period is calculated in real time, denoted as , where represents the change speed of the blood glucose value per unit time, with the unit of mg / dL / min. For the above blood glucose change rate, a dynamic adjustment rule is set. If within a 15-minute time window, it is observed that the absolute value of the blood glucose change rate continuously remains less than 0.1 mg / dL / min (threshold setting, set according to historical experience or expert knowledge), and there is no obvious upward trend, then it is determined that the blood glucose change has tended to be stable. In this case, the current analysis window will be terminated in advance. If during continuous monitoring, the blood glucose change rate is continuously positive and the total analysis duration has reached the upper limit condition of 3 hours, then 3 hours will be used as the window termination time and will not extend backward. Through the above dynamic adjustment process, for each dietary event, a dynamically cropped blood glucose curve segment associated with this event is determined.
[0069] For each blood glucose curve segment obtained by cropping induced by dietary events, continuous wavelet transform processing is performed to extract its multi-resolution spectral features. During the wavelet transform process, the Morlet wavelet function or the Mexican Hat wavelet function is selected as the basis function to adapt to the modeling requirements of the smooth trend change and weak periodicity characteristics in blood glucose signals. During the wavelet analysis process, different time window setting strategies are adopted for different frequency bands: when processing the low-frequency part of the blood glucose signal (frequency less than 0.02 Hz), a wider time window is used, such as the time length is preferably set to 60 minutes to 90 minutes; when processing the high-frequency part of the blood glucose signal (frequency higher than 0.05 Hz), a narrower time window is used, such as the time length is preferably set to 10 minutes to 20 minutes; in the intermediate frequency region where the frequency is between 0.02 Hz and 0.05 Hz, the time window size can be appropriately set to 30 minutes to 45 minutes. Threshold judgment is performed on the change of the local blood glucose signal energy distribution to obtain the corresponding preset weight data to adjust the wavelet scaling factor. After the wavelet transform is completed, the obtained spectrogram is subjected to sub-band segmentation processing. The specific division is as follows: the frequency range is divided into four sub-bands of 0–0.01 Hz, 0.01–0.02 Hz, 0.02–0.05 Hz, and 0.05–0.1 Hz, and there is no overlapping interval between each sub-band. Within each sub-band range, the corresponding amplitude characteristics, energy characteristics, and frequency center position characteristics are extracted and recorded respectively. During the spectral sub-segment division process, the resolution is adjusted according to the frequency reciprocal adaptation principle, that is, the higher the frequency of the segment, the finer the segmentation granularity, and the lower frequency part maintains a coarser granularity to balance the expression accuracy and calculation efficiency of different frequency components. Through the above processing method, fine-grained feature extraction at different time scales and frequency scales during the blood glucose change process can be realized.
[0070] For each multi-resolution spectrogram data, a sliding time window is set, and segmented analysis is performed in units of every 30 minutes. Within each 30-minute time window, energy scanning is performed on the current spectrogram to identify the main frequency component with the largest amplitude, denoted as , where represents the start time point of the current time window. The sliding time window is advanced backward along the time axis with a fixed step size (such as 5 minutes or 10 minutes), and the energy scanning and main frequency identification operations are repeated in each new time window, and the main frequency at the corresponding time point is recorded By continuously recording a series of time points and their corresponding dominant frequency values, a time-frequency trajectory curve with time on the horizontal axis and dominant frequency on the vertical axis is formed. After forming the preliminary trajectory curve, a coherence check for dominant frequency drift is performed. Specifically, if the change amplitude of the dominant frequency between two consecutive adjacent time windows exceeds 50% of the previous dominant frequency value (i.e., the frequency mutation exceeds 50%), it is judged as an abnormal drift phenomenon. For the time points with abnormal drift, interpolation or smoothing techniques are used for correction, and transitional frequency nodes are inserted to ensure the overall continuity of the trajectory.
[0071] According to the pre-divided sub-band ranges, such as 0–0.01 Hz, 0.01–0.02 Hz, 0.02–0.05 Hz, and 0.05–0.1 Hz, energy encoding processing is performed on the multi-resolution spectrogram data. Within each sub-band, the squares of the corresponding spectral amplitudes are accumulated to obtain the total local band energy within the sub-band. The local energy of each obtained sub-band is then de-scaled or normalized to eliminate the comparison bias caused by different amplitude scales between different blood glucose signal segments, so as to ensure the comparability of energy characteristics between different users or different time periods. The normalized energy values calculated for all sub-bands are arranged in sequence to construct an energy vector with a fixed length, denoted as , where represents the normalized energy value of the -th sub-band, and takes values of 1, 2, 3, 4. In terms of the energy vector organization method, it is structured and represented in matrix form. The specific rule is that the rows of the matrix correspond to different time windows, such as each 30-minute time period; the columns of the matrix correspond to different divided frequency band intervals, so that each row completely reflects the energy distribution in each sub-band within the current time window. Z-score normalization processing is performed on the preliminarily generated energy vector, that is, for each column of sub-band energy values, the steps of de-meaning and normalizing by standard deviation are performed. An energy component pruning rule is set. When the normalized energy value of a certain sub-band is lower than 1% of the total energy, it is regarded as weak and invalid energy, and its corresponding component is cleared to improve the sparsity and discriminability of the energy vector.
[0072] Perform feature fusion construction processing on the obtained main frequency drift trajectory curve data and sub-band energy signature data. Synchronously splice the main frequency drift trajectory curve data, as a type of continuous time series feature, with the sub-band energy signature data, as a structured tabular feature, to form unified composite input feature data. In the feature encoding stage, a small-scale deep neural network structure is used for multi-modal feature extraction. For the main frequency drift trajectory curve part, a one-dimensional convolutional network is used as the input layer to extract local change patterns and time correlation features in the trajectory sequence; for the sub-band energy vector part, a fully connected network is used as the input layer to capture the energy distribution characteristics and the internal correlation relationship between different sub-bands. In the intermediate feature fusion stage, a Transformer Encoder module is introduced to further model the deep correlation between trajectory changes and frequency sub-segment features. The Transformer Encoder can adaptively focus on the interaction relationships between different time segments and different band energy features through the self-attention mechanism, enhancing the global modeling ability of feature representation. In the output stage of feature encoding, the above multi-modal fusion features are compressed and mapped into a fingerprint vector of a fixed length, such as a 128-dimensional vector, as the spectral fingerprint expression. During the network training process, a triplet loss function is introduced as the optimization objective. By constructing anchor samples, positive samples, and negative sample triplets, the fingerprint encoding network is optimized to make the fingerprint feature distances between samples of the same-source diet events as close as possible, while the feature distances between samples of different-source events are as far away as possible, thereby improving the discrimination ability of the fingerprint.
[0073] Compare according to the user's spectral fingerprint data and the curve scale weighted graph data to obtain curve comparison data; Specifically, match the spectrogram of the user to be analyzed with the spectral fingerprints in the historical event library; determine which type of diet triggers the current spectral features. Extract the scale weighted graph data generated by the current user's blood glucose curve as the current spectral segment; compare it with the template in the spectral fingerprint database using a multi-dimensional similarity index, and calculate the dynamic time warping distance (DTW); calculate the Pearson correlation coefficient; when the matching score is higher than the set threshold (such as similarity > 0.85), it is considered that there is a "spectral attribution relationship". Output the similarity result between the current spectral segment and a certain type of diet event; multiple matching results are sorted by weight to form an attribution candidate set.
[0074] Perform attribution processing according to the curve comparison data and the user's diet event data to obtain blood glucose diet data.
[0075] Specifically, by synthesizing the spectrum comparison results and the current dietary behavior, it is determined which dietary events have caused which abnormal blood glucose fluctuations; attribution is achieved. For the severely fluctuating regions of each blood glucose fluctuation curve, it is traced back whether there is a high-confidence spectrum fingerprint match within 2-3 hours; if the characteristics of the current dietary event are highly consistent with the highly similar fingerprint, then this event is considered the main attribution; if there is no matching dietary event but the spectrum is abnormal, it can be marked as non-dietary fluctuation or missed dietary intake; the following attribution results are output: the start and end times of the blood glucose fluctuation segment; the most likely dietary event; the attribution intensity score (0-1).
[0076] Preferably, step S3 is specifically as follows: Step S31: Synchronize the time according to the blood glucose fluctuation curve data and the patient's exercise characteristic data to obtain the blood glucose-exercise synchronized data; Specifically, ensure that the blood glucose data and the exercise data are aligned on the same time axis to provide a basis for joint analysis. Blood glucose data time resolution: one point every 5 minutes; exercise data time resolution: record the number of steps, heart rate, activity type, etc. per minute; according to the timestamp alignment principle (timestamp accuracy at least to the minute), merge the blood glucose and exercise data into a unified structure; if the time is inconsistent, use linear interpolation / previous value filling method to fill in the blood glucose values. Record the time series structure per minute, such as the current blood glucose value; exercise state (such as resting, walking, running); heart rate, number of steps, calorie consumption, etc.
[0077] Step S32: Calculate the blood glucose change rate according to the blood glucose-exercise synchronized data to obtain the blood glucose change rate data; Specifically, measure the speed of blood glucose change per unit time to provide data support for judging the exercise influence trend. Use the difference method to calculate the blood glucose change rate: , is the blood glucose change rate for the th time period, is the blood glucose value at the th time point, is the blood glucose value at the previous time point, is the th time point, is the th time point. Set the abnormal change rate threshold (such as a change rate > 1.5 mg / dL / min is considered a severe fluctuation); if there is an exercise event, mark the change rate within 30 minutes before and after it as the exercise-related blood glucose response. Obtain a blood glucose change rate value per minute; mark the response degree of the exercise event influence interval.
[0078] Step S33: Determine the blood glucose stable period according to the different blood glucose-exercise data to obtain the blood glucose stable period data; Specifically, identify the time period during which blood glucose remains relatively stable, which can be used as the baseline period. The judgment rules for the stable period are as follows: the absolute value of the blood glucose change rate within 30 consecutive minutes < 0.3 mg / dL / min; and the standard deviation < 5 mg / dL; use a sliding window to judge the time periods that meet the conditions and perform marker merging (continuous window splicing); the stable period is preferentially identified as the pre-exercise period or the resting control period. Obtain the list of blood glucose stable period time periods (start and end times); the average blood glucose value, fluctuation range, etc. corresponding to each period.
[0079] Step S34: Determine the blood glucose non-stable period based on the blood glucose stable period data and different blood glucose movement data to obtain the blood glucose non-stable period data; Specifically, identify the blood glucose active fluctuation intervals caused by exercise or other factors. All time periods not determined to be the stable period → are initially marked as the non-stable period; further screen through exercise behavior, and mark the sections that coincide with or are adjacent to the exercise time as the exercise-related non-stable period; set the blood glucose change rate exceeding the threshold (such as ±1.0 mg / dL / min) as a significant fluctuation and mark it as the severe fluctuation section; refine and classify these non-stable periods: caused by high-intensity exercise; exercise after meals; nighttime fluctuations, etc. Obtain the non-stable period time periods, types, maximum fluctuation amplitudes, and change rate curves.
[0080] Step S35: Classify the exercise based on the patient's exercise characteristic data to obtain the exercise classification data; Specifically, perform label classification on different exercise types to provide a basis for identifying which type of exercise affects blood glucose. Classify according to exercise intensity (based on METs), duration, heart rate changes, etc. The classification rules are as follows: resting state (METs < 1.5); light activity (such as walking, 1.5 ≤ METs < 3); moderate-intensity exercise (such as fast walking / cycling, 3 ≤ METs < 6); high-intensity exercise (such as running, HIIT, METs ≥ 6); at the same time, record the exercise occurrence time point, duration, and peak heart rate. Obtain the classification label + time period for each exercise segment; the statistical characteristics such as the average consumption and heart rate response for each type of exercise.
[0081] Step S36: Correlate the blood glucose change rate data, blood glucose stable period data, blood glucose non-stable period data, and exercise classification data to obtain the blood glucose movement data.
[0082] Specifically, an association model between exercise behavior and blood glucose response is established to achieve attribution and evaluation. Analyze the blood glucose change trend before and after each exercise time point: the period before exercise is the stable period, and significant changes occur after the start → caused by exercise; high-intensity exercise causes a rapid decline; exercise after a meal delays the peak of blood glucose increase, etc.; output the following indicators: the blood glucose response slope corresponding to each exercise; the response delay time (how long after exercise the blood glucose starts to change); the maximum impact amplitude; whether it helps to recover to the target range; bind these analyses to the exercise type to generate a blood glucose-exercise response profile. Blood glucose exercise data, including the average intervention effect of each exercise type on blood glucose change; blood glucose improvement efficiency (such as the blood glucose value reduced per minute of exercise).
[0083] Preferably, step S4 is specifically as follows: Step S41: Synchronize the time based on the blood glucose diet data and the blood glucose exercise data to obtain the synchronized blood glucose exercise diet data; Specifically, align the diet behavior, exercise behavior, and blood glucose response time to establish a unified analysis basis. Both the blood glucose diet data and the blood glucose exercise data contain timestamps; divide them according to a unified time window (such as a sliding window with a unit of 15 minutes); for each time window, sort out: whether there is a diet event; whether there is an exercise behavior; the current blood glucose value, change rate, and whether it is in the fluctuation range; specially process the diet + exercise overlapping window (such as exercise behavior within 30 minutes after a meal), which needs to be marked as a combined event segment. Obtain the synchronized time series data structure, and record the states of blood glucose change, diet behavior, and exercise behavior in three dimensions for each time period.
[0084] Step S42: Calculate the single-factor influence based on the synchronized blood glucose exercise diet data to obtain the single-factor influence data; Specifically, preliminarily judge the direct influence degree of each of the two factors of diet and exercise on blood glucose fluctuation. Screen the "only diet without exercise" section and the "only exercise without diet" section respectively to construct a control; calculate the influence indicators for these two factors respectively: blood glucose change slope (mg / dL / min); fluctuation amplitude (maximum - minimum); response delay (the time when blood glucose starts to change after diet / exercise); group and statistically analyze each indicator according to the event average and clustering type (such as high-carbohydrate, light-intensity exercise); the output is: the average value + confidence interval of the blood glucose response characteristics for each type of diet / exercise behavior →. Obtain the single-factor influence data: list the average influence values of different factors (exercise / diet subtypes) on blood glucose.
[0085] Step S43: Calculate the attribution ratio based on the single-factor influence data to obtain the multi-source influence data of the patient's diet, so as to perform a visualization operation on the multi-source influence data of the patient's diet; Specifically, the effects of diet and exercise on blood glucose fluctuations are proportionally attributed to provide a multi-source explanation for abnormal blood glucose. In a certain blood glucose fluctuation range, if diet and exercise behaviors exist simultaneously, the following operations are performed: Use a regression equation based on slope changes: , is the blood glucose change rate, is the influence of the diet factor, is the diet factor score, is the influence of the exercise factor, is the exercise factor, is the error term, representing the part not explained by the model, generally a preset value.
[0086] Step S44: Perform tree model regression based on the single-factor influence data to obtain the multi-source influence data of the patient's diet, so as to visualize the multi-source influence data of the patient's diet.
[0087] Specifically, use machine learning methods to replace the linear model and more flexibly model the diet-exercise-blood glucose relationship. Use decision tree regression or gradient boosting trees (such as XGBoost) to build the model. The features include diet features (carbohydrate content, calories, nutritional structure); exercise features (type, intensity, duration, delay time); environmental features (time period, whether fasting); the label is: blood glucose change rate or fluctuation amplitude; after the model training is completed, extract the feature importance score as the attribution of the influence source; for each blood glucose fluctuation event, obtain the attribution distribution through model inference. The prediction result of the decision tree or boosting tree model + the influence intensity of each factor; output the multi-source attribution explanation in a structured manner: such as "lower protein ratio → more severe postprandial blood glucose increase".
[0088] Preferably, the present application also provides a digital visualization management system for the patient's diet based on multi-source data, which is used to execute the digital visualization management method for the patient's diet based on multi-source data as described above. The digital visualization management system for the patient's diet based on multi-source data includes: A patient multi-source data acquisition module, which is used to obtain the patient's blood glucose data, generate a blood glucose fluctuation curve according to the patient's blood glucose data to obtain blood glucose fluctuation curve data; obtain the patient's diet data, perform nutritional analysis according to the patient's diet data to obtain diet nutrition data; obtain the patient's exercise data, and extract the patient's exercise characteristics according to the patient's exercise data to obtain the patient's exercise characteristic data; A patient blood glucose diet analysis module, which is used to perform blood glucose diet analysis according to the blood glucose fluctuation curve data and the diet nutrition data to obtain blood glucose diet data; A patient blood glucose exercise analysis module, which is used to perform blood glucose exercise analysis according to the blood glucose fluctuation curve data and the patient's exercise characteristic data to obtain blood glucose exercise data; The patient diet and exercise combined analysis module is used to perform combined analysis of diet and exercise based on blood glucose diet data and blood glucose exercise data, obtain multi-source influence data on the patient's diet, and visualize the multi-source influence data on the patient's diet.
[0089] Therefore, from any perspective, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended application documents rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the application documents are intended to be encompassed within the present invention.
[0090] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.
Claims
1. A patient diet digital visualization management method based on multi-source data, characterized in that: The following steps are involved: Step S1: Obtain patient blood sugar data and user historical blood sugar data; Extract fluctuation characteristics based on the user's historical blood sugar data to obtain historical blood sugar fluctuation characteristic data; The slope is calculated based on the historical blood sugar fluctuation characteristic data to obtain the fluctuation slope data; Perform cluster calculation based on the fluctuation slope data to obtain fluctuation slope cluster data; The patient's blood sugar data is divided into blood sugar intervals according to the fluctuation slope clustering data, and blood sugar low fluctuation interval data, blood sugar regular fluctuation interval data and blood sugar high fluctuation interval data are obtained; The blood sugar low fluctuation interval data, blood sugar regular fluctuation interval data and blood sugar high fluctuation interval data are layered and integrated to obtain blood sugar interval data; Perform interval segmentation fitting according to the blood sugar interval data to obtain blood sugar fluctuation curve data; Generate a blood sugar fluctuation curve according to the patient's blood sugar data to obtain blood sugar fluctuation curve data; Obtaining patient dietary data, and performing nutritional analysis based on the patient dietary data to obtain dietary nutritional data; Acquire patient motion data, and extract patient motion features based on the patient motion data to obtain patient motion feature data; Step S2: performing blood sugar diet analysis according to the blood sugar fluctuation curve data and the diet nutrition data to obtain blood sugar diet data; Step S3: performing blood sugar movement analysis according to the blood sugar fluctuation curve data and the patient's movement characteristic data to obtain blood sugar movement data; Step S4: Perform a diet-exercise joint analysis based on the blood sugar diet data and the blood sugar exercise data to obtain the multi-source impact data of the patient's diet, so as to visualize the multi-source impact data of the patient's diet.
2. The method according to claim 1, characterized in that Step S1 is specifically as follows: Obtain patient blood glucose data through a subcutaneous blood glucose meter or a portable blood glucose meter; Obtain the user's historical blood sugar data; extract fluctuation characteristics based on the user's historical blood sugar data to obtain historical blood sugar fluctuation characteristic data; The slope is calculated based on the historical blood sugar fluctuation characteristic data to obtain the fluctuation slope data; Perform cluster calculation based on the fluctuation slope data to obtain fluctuation slope cluster data; The patient's blood sugar data is divided into blood sugar intervals according to the fluctuation slope clustering data, and blood sugar low fluctuation interval data, blood sugar regular fluctuation interval data and blood sugar high fluctuation interval data are obtained; The blood sugar low fluctuation interval data, blood sugar regular fluctuation interval data and blood sugar high fluctuation interval data are layered and integrated to obtain blood sugar interval data; Perform interval segmentation fitting according to the blood sugar interval data to obtain blood sugar fluctuation curve data; Obtaining the patient's dietary data, and performing nutritional analysis based on the patient's dietary data and a preset dietary nutrition knowledge graph to obtain dietary nutrition data; Acquire patient motion data, and extract patient motion features based on the patient motion data to obtain patient motion feature data.
3. The method according to claim 1, characterized in that The blood sugar fluctuation curve data includes the first blood sugar interval curve data, the second blood sugar interval curve data and the third blood sugar interval curve data, wherein the interval segmented fitting is specifically as follows: Performing exponential rising fitting on the blood sugar low fluctuation interval data to obtain the first blood sugar interval curve data; Perform sliding average fitting on the normal blood sugar fluctuation interval data to obtain the second blood sugar interval curve data; Spline fitting is performed on the blood sugar high fluctuation interval data to obtain the third blood sugar interval data.
4. The method according to claim 2, characterized in that: The specific steps for obtaining patient dietary data are as follows: Acquire patient diet image data; Perform image segmentation according to the patient's diet image data to obtain diet image segmentation data; Perform food recognition according to the diet image segmentation data to obtain food recognition data; Performing volume estimation based on food recognition data and diet image segmentation data to obtain food volume estimation data; The food volume estimation data and food identification data are integrated to obtain the patient's dietary data.
5. The method according to claim 1, characterized in that Step S2 is specifically as follows: Perform short-time Fourier transform on the blood sugar fluctuation curve data to obtain the curve spectrum characteristic data; Obtaining dietary time data corresponding to dietary nutrition data; Constructing dietary events according to dietary nutrition data and dietary time data to obtain dietary event data; Performing spectrum interference marking on the curve spectrum feature data according to the dietary event data to obtain curve spectrum feature marking data; Perform multi-resolution spectrum decomposition according to the curve spectrum feature labeling data to obtain the curve scale weighted graph data; Spectral component attribution is performed based on the curve scale weighted graph data to obtain blood glucose diet data.
6. The method according to claim 5, characterized in that The spectrum components are specifically attributed as follows: Obtaining blood sugar fluctuation curve data and dietary event data of multiple users; Constructing a diet event according to the user's blood sugar fluctuation curve data and the user's diet event data to obtain the user's diet event data; Perform spectrum fingerprint extraction on user diet event data to obtain user spectrum fingerprint data; Compare the user spectrum fingerprint data and the curve scale weighted graph data to obtain curve comparison data; Attribution processing is performed based on the curve comparison data and the user's dietary event data to obtain blood sugar dietary data.
7. The method according to claim 1, characterized in that Step S3 is specifically as follows: Time synchronization is performed based on the blood sugar fluctuation curve data and the patient's motion characteristic data to obtain blood sugar motion synchronization data; Calculate the blood sugar change rate according to the blood sugar movement synchronization data to obtain the blood sugar change rate data; Determine the blood sugar stable period according to different blood sugar exercise data to obtain blood sugar stable period data; The blood sugar unstable period is determined according to the blood sugar stable period data and the blood sugar different exercise data, and the blood sugar unstable period data is obtained; Performing motion classification according to the patient's motion characteristic data to obtain motion classification data; Blood sugar exercise data is obtained by associating the blood sugar change rate data, blood sugar stable period data, blood sugar unstable period data and exercise classification data.
8. The method according to claim 1, characterized in that Step S4 is specifically as follows: Perform time synchronization based on blood sugar diet data and blood sugar exercise data to obtain blood sugar exercise diet synchronization data; Calculate the single factor impact based on the blood sugar, exercise and diet synchronization data to obtain the single factor impact data; Calculate the attribution ratio based on the single factor impact data to obtain the multi-source impact data of the patient's diet, so as to visualize the multi-source impact data of the patient's diet; or, A tree model regression is performed based on the single factor influence data to obtain the multi-source influence data of the patient's diet, so as to visualize the multi-source influence data of the patient's diet.
9. A patient diet digital visualization management system based on multi-source data, characterized in that: Used to execute the patient diet digital visualization management method based on multi-source data as claimed in claim 1, the patient diet digital visualization management system based on multi-source data comprises: The patient multi-source data acquisition module is used to obtain the patient's blood sugar data, and generate a blood sugar fluctuation curve based on the patient's blood sugar data to obtain blood sugar fluctuation curve data; obtain the patient's diet data, and perform nutritional analysis based on the patient's diet data to obtain dietary nutritional data; obtain the patient's movement data, and extract the patient's movement features based on the patient's movement data to obtain the patient's movement feature data; The patient blood sugar diet analysis module is used to perform blood sugar diet analysis based on the blood sugar fluctuation curve data and diet nutrition data to obtain blood sugar diet data; The patient blood sugar movement analysis module is used to perform blood sugar movement analysis based on the blood sugar fluctuation curve data and the patient movement characteristic data to obtain blood sugar movement data; The patient diet and exercise joint analysis module is used to perform diet and exercise joint analysis based on blood sugar diet data and blood sugar exercise data to obtain the patient's diet multi-source influence data so as to visualize the patient's diet multi-source influence data.
Citation Information
Patent Citations
Continuous blood sugar monitoring based method for processing and displaying diabetes management information with intervention information
CN105160199A
Intelligent health monitoring system based on digital medical archive management
CN117373677A
Diabetes data processing and analyzing system based on machine learning
CN118969314A
Blood glucose management system based on artificial intelligence
CN119580997A
Diabetes nursing data collecting and processing system based on machine learning
CN119943240A
Cited By
Cardiovascular trend prediction method and system based on time sequence medical health data
CN121460193A