A nutrition and health prediction system based on big data

By introducing particle features and Particle Transformer models into health prediction systems, the problem of difficulty in capturing health data interaction and optimization in the prior art is solved, and more efficient nonlinear relationship learning and prediction performance improvements are achieved.

CN116864124BActive Publication Date: 2025-04-01SPACE INSTITUTE OF SOUTHERN CHINA (SHENZHEN) +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310825067.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-06
Publication Date
2025-04-01
Estimated Expiration
2043-07-06

AI Technical Summary

Technical Problem

The existing health prediction system based on the Transformer model is difficult to capture the interaction between multi-scale multi-feature health data, and the global optimization capability is weak, making it difficult to discover nonlinear relationships between health data, and the attention weight is difficult to dynamically adjust.

Method used

The concept of particle characteristics is introduced into the self-attention mechanism, and the health characteristic data is represented through the particle matrix, and the Particle Transformer model is constructed, and the attention weight is automatically adjusted by using the dynamic update of the particle swarm and the self-attention mechanism to improve prediction performance.

Benefits of technology

Effectively capture the interaction between different particles in healthy data, learn complex nonlinear relationships, improve prediction performance, and enhance the generalization ability and prediction accuracy of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116864124B_ABST
    Figure CN116864124B_ABST
Patent Text Reader

Abstract

The present invention provides a nutrition and health prediction system based on big data, which regards health characteristic data as particles and uses the Particle Transformer model to capture the nonlinear relationship between different health characteristic data. Health characteristic data including blood oxygen, exercise distance, sleep quality, etc. are collected through a smart bracelet, and the data is preprocessed. The Particle Transformer model is constructed and trained to predict blood sugar concentration and give nutritional advice based on blood sugar concentration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data, and in particular to a nutrition and health prediction system based on big data. Background Art

[0002] Nutritional health prediction systems are of great significance in many aspects, especially in blood sugar management and prevention, where they play the following key roles.

[0003] Early warning: The health prediction system can detect abnormal fluctuations in blood sugar levels in advance by analyzing the patient's physiological parameters and lifestyle data. This can help patients take timely measures, such as adjusting their diet, increasing exercise, or changing their medication regimen, to avoid serious health problems.

[0004] Personalized management: Each person’s physiological condition, lifestyle, and disease progression are unique. The health prediction system can develop a personalized diabetes management plan based on individual characteristics, thereby improving treatment outcomes and quality of life.

[0005] Reduce medical costs: By monitoring and predicting patients' health status in real time, the health prediction system can take intervention measures before the condition worsens, thereby reducing the use of medical resources and medical expenses. Improve patient compliance: Real-time health data and prediction results can help patients better understand their health status, thereby increasing their willingness to follow doctor's orders and management recommendations.

[0006] Disease prevention: For diabetic patients and high-risk groups, the health prediction system can reduce the risk of diabetes by predicting blood sugar trends and assisting in health education and lifestyle intervention.

[0007] The health prediction system aims to predict the health status and possible health problems of individuals by analyzing physiological parameters, living habits data and other related information. In the past few years, with the improvement of computing power and the development of big data technology, various health prediction systems based on neural networks and deep learning have emerged. In particular, after the Transformer model was first proposed by Vaswani et al. in the paper "Attention Is All You Need" in 2017, health prediction systems based on the Transformer model have sprung up like mushrooms after rain. However, the Transformer in the existing technology is difficult to capture the interaction between multi-scale and multi-feature health data. At the same time, its global optimization ability is weak, and it is difficult to find the nonlinear relationship between various health data in a complex health prediction system. At the same time, its attention weight is difficult to adjust dynamically. In order to solve the above problems, we propose a new nutrition and health prediction system based on big data. Summary of the invention

[0008] The purpose of this invention is to provide a nutrition and health prediction system based on big data. By introducing the concept of particle features into the self-attention mechanism, the interaction between different particles (health feature data) in health data can be better captured. In the health prediction system, there may be complex nonlinear relationships between different health indicators. These nonlinear relationships can be learned more effectively to improve the prediction performance. The dynamic update of the particle group is considered in the self-attention calculation, which may help our system learn feature representations with more generalization performance. At the same time, in the health prediction system, the attention weight can be automatically adjusted according to different types of health feature data (such as blood oxygen, exercise distance, sleep quality, etc.), thereby improving the prediction performance.

[0009] A nutrition and health prediction system based on big data, characterized in that the system comprises the following steps:

[0010] S1. Health characteristic data collection, using smart bracelets to collect user health characteristic data, specifically including the following types of health characteristic data: blood oxygen, number of steps, exercise distance, exercise time, exercise type, standing time, sleep time, breathing rate, sleep stage, number of sleep interruptions, calorie consumption and skin temperature;

[0011] S2. Health feature data preprocessing: data cleaning, data standardization, data feature extraction and data serialization of the collected data, specifically:

[0012] S2.1. Data cleaning: Check and handle missing values, outliers and duplicate values;

[0013] S2.2. Data normalization: Scale the data to the same range [0, 1];

[0014] S2.3. Data feature extraction: For continuous health data, keep the original format; for discrete health data, use one-hot encoding or other encoding methods for conversion; the continuous health data includes: blood oxygen, number of steps, exercise distance, exercise time, standing time, sleep time, breathing rate, calorie consumption and skin temperature; the discrete health data includes: exercise type, sleep quality, sleep stage, number of sleep interruptions;

[0015] S2.4. Particleize the health feature data to obtain the health feature data particle matrix. Each row of the particle matrix represents the embedded representation of the health data at a time point, representing the position of a particle. Since the row is a vector, the position is the expression of the vector in the mathematical space. The concept of speed will be involved later, which is also an expression in the mathematical space. The particle matrix is:

[0016] Among them, Oxygen represents blood oxygen, Steps represents the number of steps, Distance represents the exercise distance, ExerciseTime represents the exercise time, StandingTime represents the standing time, SleepTime represents the sleep time, RespirationRate represents the breathing rate, Calories represents the calorie consumption, SkinTemperature represents the skin temperature, ExerciseType represents the exercise type, SleepQuality represents the sleep quality, SleepStage represents the sleep stage, and SleepInterruptions represents the number of sleep interruptions.

[0017] S3. Build the Particle Transformer model. The specific steps are as follows:

[0018] S3.1. The particle matrix is ​​used as a particle group, which is used as the input sequence matrix of the Particle Transformer, and each element in the input sequence is used as the position of the particle;

[0019] S3.2. Initialize the particle velocity matrix , has the same dimensions as the input sequence matrix;

[0020] S3.3. Using the Input Sequence Matrix , the optimal position matrix of each particle in history and the optimal position matrix in the population history , the particle velocity matrix is ​​calculated according to the following formula : ,in, It is the current moment The particle velocity matrix, It is the current moment The input sequence matrix (particle position matrix), is the optimal position matrix of each particle in history, is the optimal position matrix in the history of the group, is the inertia weight, which controls the moving speed of the particle and is used to balance the influence of the current speed and the new speed. are acceleration constants, representing the weight of a single particle and the weight of a particle group, are two random numbers, ranging from [0, 1], which introduce randomness into each update;

[0021] S3.4. Based on the calculated particle velocity matrix Update particle position matrix ;

[0022] S3.5. Using the updated particle position matrix Compute the query matrix , key matrix Sum Matrix ;

[0023] S3.6. Calculate the query matrix and key matrix The dot product of ;

[0024] S3.7. Perform softmax on the result of S3.6 to get Particle Attention: ;

[0025] S3.8. Stack multiple encoder layers, each consisting of a multi-head particle attention and a feed-forward neural network sublayer;

[0026] S3.9. Add a linear layer at the output to convert the encoder output to the required output dimension;

[0027] S4. Training the Particle Transformer model;

[0028] S5. Use the trained Particle Transformer model to predict blood glucose concentration;

[0029] S6. Providing nutritional advice based on the blood glucose concentration, specifically:

[0030] High blood sugar: Reduce carbohydrates, increase dietary fiber, and eat more vegetables;

[0031] Normal blood sugar: Eat a balanced diet, exercise moderately, and maintain a healthy lifestyle;

[0032] Hypoglycemia: Appropriately supplement with sugary foods, avoid fasting, monitor blood sugar regularly, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A flowchart of a nutrition and health prediction system based on big data is provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0034] like Figure 1As shown, the present invention provides a nutrition and health prediction system based on big data, comprising the following steps: S1. health feature data collection, S2. health feature data preprocessing, S3. building a Particle Transformer model, S4. training the Particle Transformer model, S5. predicting blood glucose concentration using the trained Particle Transformer model; S6. giving nutrition advice based on the blood glucose concentration. The following is a specific embodiment:

[0035] The present invention provides a nutrition and health prediction system based on big data, which regards health feature data as particles, and can better capture the interaction between different particles (health feature data) in health data. In the health prediction system, there may be complex nonlinear relationships between different health indicators. By integrating particle features into self-attention calculations, our system can learn these nonlinear relationships more effectively and improve prediction performance. The dynamic update of particle groups is considered in the self-attention calculation, which may help our system learn feature representations with more generalization performance. At the same time, in the health prediction system, the attention weight can be automatically adjusted according to different types of health feature data (such as blood oxygen, exercise distance, sleep quality, etc.), thereby improving prediction performance.

[0036] A nutrition and health prediction system based on big data, characterized in that the system includes the following modules:

[0037] Data collection module: used to collect health characteristic data of the mobile phone according to the following steps, S1. Health characteristic data collection, using a smart bracelet to collect user health characteristic data, specifically including collecting the following types of health characteristic data: blood oxygen, number of steps, exercise distance, exercise time, exercise type, standing time, sleep time, breathing rate, sleep stage, number of sleep interruptions, calorie consumption and skin temperature.

[0038] Data preprocessing module: used to preprocess health characteristic data according to the following steps, S2. Health characteristic data preprocessing, data cleaning, data standardization, data feature extraction and serialization of the collected data, specifically:

[0039] S2.1. Data cleaning: Check and handle missing values, outliers and duplicate values;

[0040] S2.2. Data normalization: Scale the data to the same range [0, 1];

[0041] S2.3. Data feature extraction: For continuous health data, keep the original format; for discrete health data, use one-hot encoding or other encoding methods for conversion; the continuous health data includes: blood oxygen, number of steps, exercise distance, exercise time, standing time, sleep time, breathing rate, calorie consumption and skin temperature; the discrete health data includes: exercise type, sleep quality, sleep stage, number of sleep interruptions;

[0042] S2.4. Particleize the health feature data to obtain the health feature data particle matrix. Each row of the particle matrix represents the embedded representation of the health data at a time point, representing the position of a particle. Each row is a vector. The position is the expression of the vector in the mathematical space. The concept of speed will be involved later, which is also an expression in the mathematical space. The particle matrix is:

[0043] Among them, Oxygen represents blood oxygen, Steps represents the number of steps, Distance represents the exercise distance, ExerciseTime represents the exercise time, StandingTime represents the standing time, SleepTime represents the sleep time, RespirationRate represents the breathing rate, Calories represents the calorie consumption, SkinTemperature represents the skin temperature, ExerciseType represents the exercise type, SleepQuality represents the sleep quality, SleepStage represents the sleep stage, and SleepInterruptions represents the number of sleep interruptions.

[0044] Model building module: used to build a Particle Transformer model according to the following steps. S3. Build a Particle Transformer model. The specific steps are as follows:

[0045] S3.1. The particle matrix is ​​used as a particle group, which is used as the input sequence matrix of the Particle Transformer, and each element in the input sequence is used as the position of the particle;

[0046] S3.2. Initialize the particle velocity matrix , has the same dimensions as the input sequence matrix;

[0047] S3.3. Using the Input Sequence Matrix , the optimal position matrix of each particle in history and the optimal position matrix in the population history , the particle velocity matrix is ​​calculated according to the following formula : ,in, It is the current moment The particle velocity matrix, It is the current moment The input sequence matrix (particle position matrix), is the optimal position matrix of each particle in history, is the optimal position matrix in the history of the group, is the inertia weight, which controls the moving speed of the particle and is used to balance the influence of the current speed and the new speed. are acceleration constants, representing the weight of a single particle and the weight of a particle group, are two random numbers, ranging from [0, 1], which introduce randomness into each update;

[0048] S3.4. Based on the calculated particle velocity matrix Update particle position matrix ;

[0049] S3.5. Using the updated particle position matrix Compute the query matrix , key matrix Sum Matrix ;

[0050] S3.6. Calculate the query matrix and key matrix The dot product of ;

[0051] S3.7. Perform softmax on the result of S3.6 to get Particle Attention: ;

[0052] S3.8. Stack multiple encoder layers, each consisting of a multi-head particle attention and a feed-forward neural network sublayer;

[0053] S3.9. Add a linear layer at the output to convert the encoder output to the required output dimension;

[0054] In order to facilitate the implementation by technicians in this field, the Particle Transformer is constructed using a deep learning framework, as shown below:

[0055]

[0056]

[0057] Model training module: used to train the Particle Transformer model according to the following steps: S4. training the Particle Transformer model;

[0058]

[0059] Prediction module: used to predict blood glucose concentration using the trained Particle Transformer model according to the following steps, S5. Predicting blood glucose concentration using the trained Particle Transformer model;

[0060] Nutritional advice module: used to give nutritional advice according to the blood glucose concentration according to the following steps, S6. Give nutritional advice according to the blood glucose concentration, specifically:

[0061] High blood sugar: Reduce carbohydrates, increase dietary fiber, and eat more vegetables;

[0062] Normal blood sugar: Eat a balanced diet, exercise moderately, and maintain a healthy lifestyle;

[0063] Hypoglycemia: Appropriately supplement with sugary foods, avoid fasting, monitor blood sugar regularly, etc.

Claims

1. A nutrition and health prediction system based on big data, characterized in that: The system includes the following modules: Data collection module: used to collect health characteristic data; Data preprocessing module: used for health feature data preprocessing. The specific steps are as follows: S2.

1. Data cleaning: Check and handle missing values, outliers and duplicate values; S2.

2. Data normalization: Scale the data to the same range [0, 1]; S2.

3. Data feature extraction: For continuous health data, keep the original format; for discrete health data, use one-hot encoding for conversion; The continuous health data includes: blood oxygen, number of steps, exercise distance, exercise time, standing time, sleep time, breathing rate, calorie consumption and skin temperature; the discrete health data includes: exercise type, sleep quality, sleep stage, number of sleep interruptions; S2.

4. Particleize the health feature data to obtain a health feature data particle matrix. Each row of the particle matrix represents an embedded representation of health data at a time point and represents the position of a particle. The particle matrix is: ; Oxygen represents blood oxygen, Steps represents the number of steps, Distance represents the exercise distance, ExerciseTime represents the exercise time, StandingTime represents the standing time, SleepTime represents the sleep time, RespirationRate represents the breathing rate, Calories represents the calorie consumption, SkinTemperature represents the skin temperature, ExerciseType represents the exercise type, SleepQuality represents the sleep quality, SleepStage represents the sleep stage, and SleepInterruptions represents the number of sleep interruptions; Model construction module: used to build the Particle Transformer model. The specific steps are as follows: S3.

1. The particle matrix is ​​used as a particle group, which is used as the input sequence matrix of the Particle Transformer, and each element in the input sequence is used as the position of the particle; S3.

2. Initialize the particle velocity matrix , which has the same dimensions as the input sequence matrix; S3.

3. Using the Input Sequence Matrix , the optimal position matrix of each particle in history and the optimal position matrix in the population history , the particle velocity matrix is ​​calculated according to the following formula : ,in, It is the current moment The particle velocity matrix, It is the current moment The input sequence matrix, is the optimal position matrix of each particle in history, is the optimal position matrix in the history of the group, is the inertia weight, which controls the moving speed of the particle and is used to balance the influence of the current speed and the new speed. are acceleration constants, representing the weight of a single particle and the weight of a particle group, are two random numbers, ranging from [0, 1], which introduce randomness into each update; S3.

4. Based on the calculated particle velocity matrix Update particle position matrix ; S3.

5. Using the updated particle position matrix Compute the query matrix , key matrix Sum Matrix ; S3.

6. Calculate the query matrix and key matrix The dot product of ; S3.

7. Perform softmax on the result of S3.6 to get Particle Attention: ; S3.

8. Stack multiple encoder layers, each consisting of a multi-head particle attention and a feed-forward neural network sublayer; S3.

9. Add a linear layer at the output to convert the encoder output to the required output dimension; Model training module: used to train the Particle Transformer model; Prediction module: Use the trained Particle Transformer model to predict blood glucose concentration; Nutritional advice module: used to give nutritional advice based on the blood sugar concentration.

2. The nutrition and health prediction system based on big data according to claim 1 is characterized in that: Providing nutritional advice according to the blood sugar concentration includes: High blood sugar: Reduce carbohydrates, increase dietary fiber, and eat more vegetables; Normal blood sugar: Eat a balanced diet, exercise moderately, and maintain a healthy lifestyle; Hypoglycemia: Supplement sugary foods appropriately, avoid fasting, and monitor blood sugar regularly.

Citation Information

Patent Citations

  • Improved particle swarm parameter optimization method for glioma multi-task integrated network

    CN115222007A