Intelligent health-preserving recommendation method and system
By combining technical means of convolutional neural network, support vector machine, Autoencoder and decision tree, analyzing the user's tongue image and health data, and generating accurate health advice, the problem of the lack of personalized analysis and dynamic adjustment mechanism of existing health management applications is solved, and the effective satisfaction of users' diverse health management needs is achieved.
Patent Information
- Application Number
- CN202411725534.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-21
AI Technical Summary
The existing health management applications lack in-depth analysis of individual differences among users, fail to fully utilize the potential of combining user personalized health data with traditional Chinese medicine theory, it is difficult to generate accurate health advice, and lack dynamic adjustment mechanisms, so it is impossible to provide targeted optimization solutions based on the user's real-time health status and updated health data.
The user's tongue image photo is image-recognized through convolutional neural network to extract tongue image features; combined with the support vector machine, analyzing the user's basic health data, living habits, health feelings and tongue image features to generate preliminary diagnostic results; using the Autoencoder model to extract multimodal data to obtain low-dimensional feature vectors; then through the decision tree, intelligently matches in the health rule library, outputs health recommendations matching the feature vectors.
It fully utilizes the potential of combining user personalized health data with traditional Chinese medicine theory, can generate accurate health advice, effectively meet users' diverse health management needs, and overcomes the lack of dynamic adjustment mechanisms that cannot provide targeted optimization solutions based on users' real-time health status and updated health data.
Smart Images

Figure CN119673387A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of health management, and in particular to an intelligent health care recommendation method and system. Background Art
[0002] With the rapid development of artificial intelligence technology, especially breakthroughs in image recognition and data analysis, it has become a new possibility to combine traditional Chinese medicine theory with modern intelligent technology to provide users with personalized health management and health advice.
[0003] In the existing technology, although many health management applications can provide some general health advice, they often lack in-depth analysis of individual differences among users. Intelligent health systems combined with traditional Chinese medicine theory are relatively scarce. They fail to fully utilize the potential of combining users' personalized health data with Chinese medicine theory, making it difficult to generate accurate health advice and unable to effectively meet users' diverse health management needs.
[0004] In addition, existing technologies generally lack a dynamic adjustment mechanism and are unable to provide targeted optimization solutions based on the user's real-time health status and updated health data. Summary of the invention
[0005] In order to solve the technical problems that existing health management applications often lack in-depth analysis of individual differences of users, intelligent health systems combined with traditional Chinese medicine theory are relatively scarce, and the potential of combining users' personalized health data with Chinese medicine theory is not fully utilized, it is difficult to generate accurate health suggestions, and it is impossible to effectively meet users' diverse health management needs. In addition, there is a lack of dynamic adjustment mechanism and it is impossible to provide targeted optimization solutions based on users' real-time health status and updated health data, the present invention provides an intelligent health recommendation method and system.
[0006] The technical solution provided by the embodiment of the present invention is as follows:
[0007] First aspect:
[0008] An embodiment of the present invention provides an intelligent health recommendation method, comprising:
[0009] S1: Obtaining user health information, which includes basic health data of the user, photos of the user's tongue, user's living habits, and user's health experience;
[0010] S2: performing image recognition on the user's tongue image photo through a convolutional neural network to obtain tongue image features;
[0011] S3: Analyze the basic health data of the user, the user's living habits, the user's health feelings and the tongue image characteristics through a support vector machine to obtain a preliminary diagnosis result;
[0012] S4: construct an Autoencoder model, wherein the Autoencoder model includes an encoder and a decoder;
[0013] S5: extracting features of the user's basic health data, the user's living habits, the user's health feelings, the tongue image features, and the preliminary diagnosis results through the encoder of the Autoencoder model to obtain a low-dimensional feature vector;
[0014] S6: Build a health rule library;
[0015] S7: Based on the low-dimensional feature vector, intelligent matching is performed in the health rule library through a decision tree, and a health recommendation matching the low-dimensional feature vector is output.
[0016] Second aspect:
[0017] An intelligent health recommendation system provided by an embodiment of the present invention includes: a memory and one or more processors;
[0018] One or more application programs are stored in the memory, and the one or more application programs are suitable for being executed by the one or more processors to implement the above-mentioned intelligent health recommendation method.
[0019] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0020] In the present invention, a convolutional neural network is used to perform image recognition on the user's tongue photo to extract tongue features, a support vector machine is used to analyze the user's basic health data, living habits, health feelings and tongue features to generate a preliminary diagnosis result, and the encoder of the Autoencoder model is used to extract features of the user's basic health data, living habits, health feelings, tongue features and preliminary diagnosis results to obtain a low-dimensional feature vector, and then based on the low-dimensional feature vector, a decision tree is used to intelligently match the health rule library to output a health recommendation that matches the feature vector, which fully utilizes the potential of combining the user's personalized health data with traditional Chinese medicine theory, can generate accurate health suggestions, effectively meet the user's diverse health management needs, and overcome the deficiency of being unable to provide targeted optimization solutions based on the user's real-time health status and updated health data due to the lack of a dynamic adjustment mechanism. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A schematic diagram of a flow chart of an intelligent health recommendation method provided by an embodiment of the present invention;
[0023] Figure 2 A schematic diagram of the structure of an intelligent health recommendation system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0025] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0026] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0027] Reference Manual Attached Figure 1 , which shows a flow chart of an intelligent health recommendation method provided by an embodiment of the present invention.
[0028] The embodiment of the present invention provides an intelligent health recommendation method, which can be implemented by an intelligent health recommendation device, which can be a terminal or a server. The processing flow of the intelligent health recommendation method can include the following steps:
[0029] S1: Obtain user health information, which includes user basic health data, user tongue image photos, user living habits and user health perception.
[0030] Among them, the user's basic health data includes: age, gender, weight, height and underlying diseases.
[0031] The user's tongue image photo includes: a photo of the user's tongue.
[0032] Among them, user living habits include: daily diet (including: user's daily diet, such as food types and quantities for breakfast, lunch and dinner) and exercise habits (including: user's daily exercise records, such as walking, running time and distance).
[0033] Among them, user health feelings include: users record their physical feelings (including mental state (whether tired or energetic) and symptoms (whether having a headache or cough)).
[0034] In the present invention, by obtaining multi-dimensional information of the user's basic health data, the user's tongue image, the user's living habits and the user's health feelings, the user's health status and individual needs can be fully and accurately captured. The collection of this multimodal data combines objective physiological characteristics (such as tongue images and basic data) with subjective health feelings, and refines the user's daily behavior (such as diet and exercise), providing a detailed foundation for subsequent intelligent analysis and personalized health recommendations, thereby ensuring the scientificity and pertinence of the recommendation results and improving the user's health management effect.
[0035] S2: Use convolutional neural network to perform image recognition on the user’s tongue image photo to obtain tongue image features.
[0036] It should be noted that Convolutional Neural Network (CNN) is a deep learning model designed for processing grid-structured data (such as images). Its core consists of convolutional layers, pooling layers, and fully connected layers. It gradually extracts local features of data by imitating the working principle of biological visual systems. The convolutional layer extracts features such as edges and textures through convolution operations. The pooling layer reduces the dimension of features and retains key information. The fully connected layer integrates features for classification or regression tasks. CNN is widely used in image recognition, object detection, natural language processing, and other fields, and is favored for its powerful automatic feature extraction capabilities and efficient computing performance.
[0037] In the present invention, the convolutional neural network is used to perform image recognition on the user's tongue photo, which can efficiently extract the subtle features of the tongue such as color, shape, and coating, and provide an accurate analysis of the user's health status. The multi-layer feature extraction capability of CNN can deeply capture the complex patterns of tongue images (such as cracks, tooth marks, etc.), make up for the subjectivity and limitations of traditional manual analysis, provide scientific and reliable data support for subsequent health diagnosis and health advice, and improve the intelligence and automation level of the system.
[0038] In a possible implementation, S2 specifically includes sub-steps S201 and S202:
[0039] S201: Preprocessing the user's tongue photo.
[0040] In a possible implementation, S201 specifically includes sub-steps S2011 to S2013:
[0041] S2011: grayscale the user's tongue photo to obtain a grayscale image:
[0042] I gray =0.299R+0.587G+0.114B
[0043] Among them, I gray Represents the pixel value of the grayscale image, R represents the pixel value of the red channel, G represents the pixel value of the green channel, and B represents the pixel value of the blue channel.
[0044] S2012: Normalize the grayscale image to obtain a normalized image:
[0045]
[0046] Among them, I norm Represents the pixel value of the normalized image, min() represents the minimum value, and max() represents the maximum value.
[0047] Specifically, the grayscale image is normalized to normalize the pixel values of the grayscale image to the range of [0, 1].
[0048] S2013: Crop the normalized image to obtain an image of target size.
[0049] Specifically, the normalized image is cropped to a fixed target size of 224×224 pixels.
[0050] In the present invention, by converting color images into grayscale images, the dimension and computational complexity of the data are reduced, while retaining the key texture information of the tongue image, which is convenient for subsequent feature extraction. The pixel values are scaled to a uniform range of [0,1] to eliminate the image brightness differences caused by factors such as light and shooting equipment, enhance the robustness and contrast of the model to the input data, and improve the training efficiency. The image is cropped to a fixed size (224×224 pixels) and the input size is unified to ensure that the image can adapt to the structural requirements of the convolutional neural network and improve the computational efficiency.
[0051] S202: Input the preprocessed user tongue image photo into a convolutional neural network for image recognition to obtain tongue image features.
[0052] Optionally, a convolutional neural network ResNet or VGG.
[0053] It should be noted that ResNet (Residual Network) is a deep convolutional neural network that introduces "residual blocks" to solve the gradient vanishing and degradation problems that are prone to occur when the number of layers of deep neural networks increases. The core idea is to add skip connections in the network layer to directly jump the input data to the subsequent layers in order to learn the residual mapping (that is, the difference between the original mapping and the input). This structure allows the network to maintain stable training as it deepens and effectively improves the performance of the model. ResNet has performed well in tasks such as image classification and object detection, and is an important milestone in modern deep learning.
[0054] It should be noted that VGG (Visual Geometry Group Network) is a deep convolutional neural network that is widely used due to its simple and unified network design. The main feature of VGG is that it uses small convolution kernels (such as 3×3) and fixed strides to gradually deepen the network depth to extract more complex features, while reducing the dimension through the pooling layer. Its network structure is unified and easy to expand, but it has many parameters and a large amount of calculation. VGG performs well in image classification tasks and is an important cornerstone of the development of convolutional neural networks.
[0055] In a possible implementation, the convolutional neural network includes an input layer, multiple convolutional layers, multiple pooling layers, a fully connected layer, and an output layer. S202 specifically includes sub-steps S2021 to S2025:
[0056] S2021: In the input layer, input the preprocessed user tongue photo.
[0057] S2022: In the convolution layer, local features are extracted from the preprocessed user tongue image photo, and a convolution feature map is output:
[0058] O conv =σ(W*I+b)
[0059] Among them, O conv represents the convolution feature map, σ represents the activation function, W represents the weight of the convolution kernel, I represents the preprocessed user tongue photo, and b represents the bias term of the convolution kernel.
[0060] S2023: In the pooling layer, perform the maximum pooling operation on the convolution feature map and output the pooled feature map:
[0061] O pool =max(O conv,i,j )
[0062] Among them, O pool Represents the pooling feature map, max() represents the maximum value, O conv,i,jRepresents the element in the i-th row and j-th column of the convolutional feature map.
[0063] S2024: In the fully connected layer, image recognition is performed based on the pooled feature map:
[0064] y=W0x+b0
[0065] Among them, y represents the label of the tongue image feature, W0 represents the weight matrix of the fully connected layer, x represents the feature vector after the pooling feature map is flattened, and b0 represents the bias term of the fully connected layer.
[0066] S2025: In the output layer, the image recognition result is output to obtain the tongue image features.
[0067] It should be noted that the characteristics of tongue appearance include: tongue color (light red, dark red, dark purple), thickness of tongue coating (moderate thickness, thick and greasy, exfoliated), changes in tongue shape (fat, thin, cracked, tooth marks), and dynamic characteristics (trembling, crooked, hard).
[0068] In the present invention, the convolution layer extracts the local features of the tongue image through the convolution operation, and the pooling layer further extracts the significant areas of the image, retains the key information, and reduces the computational complexity. The automated feature extraction avoids the subjectivity and limitations of manual extraction, and improves the objectivity and accuracy of tongue image analysis. The fully connected layer and the output layer map the extracted high-dimensional features to specific tongue image labels, and provide refined tongue image classification and regression results. This process enables the complex features of the tongue image to be quantified and structured, laying a scientific foundation for health diagnosis and health advice. Through the deep learning model, the system can quickly and efficiently process a large number of tongue image images uploaded by users, reduce manual intervention, and improve the intelligence and convenience of health management.
[0069] S3: Through the support vector machine, the user's basic health data, user living habits, user health feelings and tongue characteristics are analyzed to obtain preliminary diagnosis results.
[0070] It should be noted that Support Vector Machine (SVM) is a supervised learning algorithm for classification and regression tasks. Its core idea is to find an optimal hyperplane to separate data of different categories and maximize the interval between the classification boundary and the sample (that is, maximize the safe distance of the decision boundary). SVM is particularly suitable for processing high-dimensional data and nonlinear classification problems. By introducing kernel functions (such as linear kernels and RBF kernels), data is mapped to a higher-dimensional space to solve complex nonlinear separable problems. SVM has been widely used in text classification, image recognition and other fields due to its powerful classification performance and robustness.
[0071] In the present invention, the user's basic health data, living habits, health feelings and tongue characteristics are analyzed by support vector machine (SVM), which can combine multi-dimensional input data to accurately classify and predict health status and generate scientific and reliable preliminary diagnosis results. SVM is good at processing small samples, high-dimensional data and complex classification problems. Its optimization mechanism can find the optimal separation hyperplane between different categories to ensure the accuracy and stability of diagnosis. This analysis method provides a basis for subsequent personalized health recommendations, while improving the efficiency and objectivity of diagnosis, and avoiding the deviation that may be caused by relying solely on a single data source.
[0072] In a possible implementation, S3 specifically includes sub-steps S301 to S304:
[0073] S301: Perform data cleaning on the user's basic health data, user's living habits, user's health perception and tongue characteristics.
[0074] S302: Perform data standardization on the cleaned basic health data of the user, the user's living habits, the user's health feelings, and the tongue image characteristics:
[0075]
[0076] Among them, X norm represents the data after standardization, x' represents the data after cleaning, μ represents the mean, and σ0 represents the standard deviation.
[0077] S303: Extract features from the standardized user basic health data, user living habits, user health perception, and tongue image features to obtain multiple feature vectors.
[0078] S304: Analyze each feature vector through a support vector machine to obtain a preliminary diagnosis result:
[0079]
[0080] Among them, w represents the weight vector of the support vector machine, b' represents the bias term of the support vector machine, and y i represents the i-th category label, x″ i represents the i-th eigenvector.
[0081] It should be noted that the preliminary diagnosis results include: an assessment of the user's health status, such as whether there is dampness, heat, or insufficient qi and blood.
[0082] In the present invention, data cleaning eliminates invalid or abnormal data to ensure the reliability of input, and data standardization eliminates the dimensional differences between different data features, ensures the consistency of the model processing process, and enhances classification accuracy. Multimodal data (such as health data, living habits, and tongue characteristics) are converted into quantifiable feature vectors to enrich the data dimensions and provide more information for the diagnostic model. SVM can accurately classify the user's health status by optimizing and finding the optimal classification hyperplane, and can show excellent robustness even in multi-dimensional, high-noise feature data. The preliminary diagnosis results provide a scientific basis for subsequent intelligent health recommendations, making the recommendation plan more targeted.
[0083] S4: Build an Autoencoder model, which includes an encoder and a decoder.
[0084] It should be noted that Autoencoder is an unsupervised learning model for feature extraction and dimensionality reduction of data. It consists of two parts: encoder and decoder. The encoder compresses the input data into a low-dimensional latent feature vector (encoding) to extract the core information of the data. The decoder reconstructs the original data based on this feature vector. Its goal is to learn a low-dimensional representation that can effectively express the key features of the data by minimizing the difference between the reconstructed data and the input data (usually using the mean square error loss function). Autoencoder is widely used in tasks such as dimensionality reduction, anomaly detection, image denoising, and generative models, and has attracted attention due to its flexible structure and applicability to a variety of data types.
[0085] In the present invention, an Autoencoder model is constructed, and the dimension reduction and feature restoration of data are achieved through the combination of encoder and decoder, which can effectively extract the low-dimensional key features of the user's multimodal health data while retaining the core information of the data. The encoder compresses high-dimensional data into low-dimensional feature vectors, improves the efficiency of subsequent algorithm processing, and reduces redundant information. The decoder verifies the effectiveness of the extracted features and ensures the feature expression ability of the model. Such a design improves the robustness and generalization ability of the model in data processing, and provides more accurate and efficient support for intelligent health recommendations.
[0086] S5: Through the encoder of the Autoencoder model, feature extraction is performed on the user's basic health data, user's living habits, user's health feelings, tongue image characteristics and preliminary diagnosis results to obtain a low-dimensional feature vector.
[0087] In a possible implementation, S5 is specifically:
[0088] According to the following formula, the encoder of the Autoencoder model extracts the user's basic health data, user's living habits, user's health feelings, tongue characteristics, and preliminary diagnosis results to obtain a low-dimensional feature vector:
[0089] H=f(W1D+B1)
[0090] F=f(W2H+B2)
[0091] Among them, H represents the output of the first hidden layer of the encoder, f represents the activation function of the encoder, W1 represents the weight matrix of the first hidden layer of the encoder, D represents the input data, B1 represents the bias term of the first hidden layer of the encoder, F represents the output of the second hidden layer of the encoder, that is, the low-dimensional feature vector, W2 represents the weight matrix of the second hidden layer of the encoder, and B2 represents the bias term of the second hidden layer of the encoder.
[0092] In the present invention, the encoder of the Autoencoder model extracts features from multimodal data, compresses the user's basic health data, living habits, health feelings, tongue characteristics and preliminary diagnosis results into low-dimensional feature vectors, which can effectively remove redundant information, extract key features, and improve data processing efficiency. At the same time, the low-dimensional feature vector retains the core information of the multimodal data, providing a high-quality input basis for subsequent intelligent matching and personalized recommendations. This method improves the system's ability to model complex health data and ensures the accuracy and applicability of the analysis results.
[0093] In a possible implementation manner, after S5 and before S6, the method further includes:
[0094] Through the decoder of the Autoencoder model, the low-dimensional feature vector is restored to obtain the reconstructed data:
[0095] H ′ =g(W3F+B3)
[0096] R=g(W4H ′ +B4)
[0097] Among them, H' represents the output of the first hidden layer of the decoder, g represents the activation function of the decoder, W3 represents the weight matrix of the first hidden layer of the decoder, B3 represents the bias term of the first hidden layer of the decoder, R represents the output of the second hidden layer of the decoder, that is, the reconstructed data, W4 represents the weight matrix of the second hidden layer of the decoder, and B4 represents the bias term of the second hidden layer of the decoder.
[0098] In the present invention, the decoder of the Autoencoder model performs feature restoration on the low-dimensional feature vector, which can verify whether the low-dimensional feature vector extracted by the encoder can accurately reconstruct the original data, thereby evaluating the model's ability to retain key features. This feature restoration process helps to detect and optimize the dimensionality reduction quality of the model, ensuring that the feature vector after dimensionality reduction reduces redundant information without losing the core information of the data, providing reliable feature expression for subsequent intelligent health recommendations. This method improves the robustness of the model and the scientific nature of feature extraction.
[0099] S6: Build a health rules library.
[0100] It should be noted that the health rules library includes: dietary recommendations, exercise recommendations and lifestyle adjustments.
[0101] Among them, the dietary recommendations include: when the user's physical characteristics are of a peaceful type, chicken, fish and other peaceful ingredients are recommended. When the user's physical characteristics are of a Qi deficiency type, Qi-tonifying ingredients such as Astragalus and Codonopsis are recommended. When the user's physical characteristics are of a blood deficiency type, red dates, angelica and other blood-tonifying ingredients are recommended. When the user's physical characteristics are of a Yin deficiency type, lily, Ophiopogon japonicus and other Yin-nourishing ingredients are recommended. When the user's physical characteristics are of a Yang deficiency type, deer antlers, cinnamon and other warming Yang ingredients are recommended. When the user's physical characteristics are of a phlegm-damp type, winter melon, coix seed, yam, white radish and other ingredients with spleen-strengthening and dampness-removing effects are recommended. When the user's physical characteristics are of a damp-heat type, green beans, bitter melon, cucumbers, watermelons and other ingredients that clear heat and detoxify, diuretic and detumescence are recommended. When the user's physical characteristics are of a blood stasis type, black fungus, onions, garlic, ginger and other ingredients that can promote blood circulation and remove blood stasis are recommended. When the user's physical characteristics are special, we recommend honey, red dates, wolfberry, walnut kernels and other ingredients that can replenish qi and blood and enhance immunity. When the user's physical characteristics are qi stagnation, we recommend rose, jasmine, bergamot, tangerine peel and other ingredients that can soothe the liver and regulate qi and regulate emotions.
[0102] Among them, the sports recommendations include: when the user's physical characteristics are peaceful, moderate-intensity aerobic exercises such as swimming, jogging, yoga, and Tai Chi are recommended. When the user's physical characteristics are Qi deficiency, gentle exercises such as walking, Tai Chi, and Qigong are recommended. When the user's physical characteristics are blood deficiency, yoga, Tai Chi, walking, swimming, and other sports that are beneficial to improving anemia are recommended. When the user's physical characteristics are Yin deficiency, yoga, Pilates, meditation, and other relaxing sports are recommended. When the user's physical characteristics are Yang deficiency, Tai Chi, Ba Duan Jin, yoga, and other medium-to-low-intensity sports are recommended. When the user's physical characteristics are phlegm-dampness, brisk walking, jogging, swimming, and other moderate-intensity aerobic exercises are recommended. When the user's physical characteristics are damp-heat, basketball, football, badminton, and other medium-to-high-intensity team competitive sports are recommended. When the user's physical characteristics are blood stasis, running, mountaineering, cycling, and other moderate-intensity aerobic exercises are recommended. When the user's physical characteristics are special, because people with special physical characteristics have special physical conditions, they should choose personalized sports according to their own conditions to avoid discomfort. For example, people with allergic constitutions should avoid contact with allergens in sports venues. When the user's physical characteristics are qi stagnation type, yoga, dancing, singing and other sports that help relieve stress are recommended.
[0103] Among them, lifestyle adjustments include: when the user's physical characteristics are peaceful, the recommended work and rest recommendations are to maintain 7-8 hours of adequate sleep every day, eat three meals at regular times and in regular quantities, and try meditation or deep breathing to help relax the body and mind. When the user's physical characteristics are qi deficiency, it is recommended to maintain 8-9 hours of adequate sleep every day, try to reduce staying up late, avoid overwork, and relieve stress by reading books or enjoying music. When the user's physical characteristics are blood deficiency, the recommended work and rest recommendations are to ensure 7-8 hours of high-quality sleep every day, a reasonable diet, eat regularly and in regular quantities, avoid staying up late and fatigue, and improve physical and mental health through appropriate physical activities such as walking and yoga. When the user's physical characteristics are yin deficiency, the recommended work and rest recommendations are to maintain 7-8 hours of adequate sleep every day, try to avoid long-term exposure to high temperature environments, and balance the physical and mental state through meditation or meditation. When the user's physical characteristics are yang deficiency, the recommended work and rest recommendations are to maintain 7-8 hours of adequate sleep every day, try to be active in a warm environment, and improve the body's energy level by practicing yoga or Tai Chi. When the user's physical characteristics are phlegm-dampness type, it is recommended to maintain 7-8 hours of adequate sleep every day, try to avoid overeating, and improve your mood by practicing dance or walking. When the user's physical characteristics are damp-heat type, the recommended work and rest recommendations are to maintain 7-8 hours of adequate sleep every day, try to avoid spicy and irritating foods, and express your emotions through painting or calligraphy. When the user's physical characteristics are blood stasis type, the recommended work and rest recommendations are to maintain 7-8 hours of adequate sleep every day, try to avoid sitting for a long time, and promote blood circulation through massage or foot soaking. When the user's physical characteristics are special type, it is recommended to maintain 7-8 hours of adequate sleep every day, try to avoid contact with allergens, and divert attention by learning new skills or hobbies. When the user's physical characteristics are qi stagnation type, the recommended work and rest recommendations are to maintain 7-8 hours of adequate sleep every day, try to avoid being alone, participate in social activities appropriately, and release negative emotions by writing a diary or chatting with friends.
[0104] In the present invention, by constructing a health rule library including diet recommendations, exercise recommendations and lifestyle adjustments, the theory of Chinese medicine constitution is combined with modern intelligent recommendation technology, which can provide users with scientific, comprehensive and highly personalized health advice. The rule library has refined the design of appropriate diet, exercise and work and rest plans according to different constitution types to ensure that the recommended content meets the health characteristics and actual needs of users. This method can not only improve the pertinence and practicality of health advice, but also enhance the user's sense of participation and health management effects, and help to achieve efficient and intelligent health maintenance under the framework of solar terms (such as winter solstice).
[0105] S7: Based on the low-dimensional feature vector, intelligent matching is performed in the health rule library through a decision tree, and health recommendations matching the low-dimensional feature vector are output.
[0106] It should be noted that the decision tree is a supervised learning algorithm based on a tree structure, which is used for classification and regression tasks. It constructs a hierarchical decision process from the root node to the leaf node by recursively splitting the data set into smaller subsets. Each split point is selected according to a certain feature and its threshold, and criteria such as Gini impurity and information gain are used to ensure that the purity of the data is maximized or the error after the split is minimized. Finally, the leaf node outputs the category label or predicted value. The decision tree is easy to understand and interpret, and is suitable for processing data with nonlinear relationships, but it may be prone to overfitting, so it is often combined with pruning methods to improve generalization ability. It is widely used in fields such as financial analysis, medical diagnosis, and recommendation systems.
[0107] In the present invention, by analyzing low-dimensional feature vectors through decision trees and intelligently matching them in the health rule library, accurate docking of multi-dimensional health data and personalized health recommendations can be efficiently achieved. The decision tree has the characteristics of clear logic and strong interpretability, and can screen the most suitable health regimen layer by layer according to the user's health characteristics. This method improves the scientificity and accuracy of the recommendation, while reducing the computational overhead of complex data analysis, providing users with fast and individual health recommendations, and significantly enhancing the user experience and health management effect.
[0108] In a possible implementation, S7 specifically includes sub-steps S701 to S703:
[0109] S701: Based on the low-dimensional feature vector, the best split feature is recursively selected from the root node through Gini impurity until the preset conditions are met to build a decision tree:
[0110]
[0111] Among them, Gain(F) represents the Gini impurity of the low-dimensional feature vector, P i represents the total proportion of the i-th category, and C represents the total number of categories.
[0112] It should be noted that Gini Impurity is an indicator to measure the purity of a data set, and is often used to select the best splitting feature in the decision tree algorithm. The core idea is: the purer a data set is (that is, all data belongs to the same category), the lower the Gini Impurity value. When the data is evenly distributed to all categories, the impurity value reaches the maximum. Gini Impurity helps the decision tree find the best split point by comparing the purity changes of the data set before and after the split, ensuring that each split can effectively improve the classification performance.
[0113] S702: Perform post-pruning on the constructed decision tree.
[0114] S703: Perform intelligent matching in the health rule library through the pruned decision tree, and output health recommendations that match the low-dimensional feature vector.
[0115] In the present invention, the data is recursively split by Gini impurity to ensure that each split selects the variable that can best distinguish health characteristics, effectively reducing redundant information, and improving matching efficiency and decision accuracy. Post-pruning simplifies the decision tree structure, avoids overfitting of training data, improves the generalization ability of the model, and ensures the reliability of recommendation results in practical applications. The pruned decision tree has a clear logical structure, can quickly locate the health advice that best suits the user, and realizes the precise docking of the health rule library with the user's personalized needs.
[0116] Furthermore, through user interaction, users can easily view personal health reports and tailored health advice (including: health reports, health advice, and operation guides). The health report intuitively displays the user's health status in the form of charts, and is supplemented by text descriptions to explain the meaning of each indicator in detail. The health advice section provides a detailed list of suggestions including diet, exercise, and work and rest adjustments to help users clarify the direction and specific methods that need to be improved. The operation guide uses simple and clear steps to guide users on how to efficiently obtain and use this information to achieve targeted health management and health practices.
[0117] In the present invention, health reports, health care suggestions and operation guides are provided through user interaction, and the user's health status and personalized improvement plan can be intuitively displayed with charts, texts and clear operation steps, helping users to better understand their own health problems and their solutions. This design enhances the readability and practicality of information, lowers the threshold of professional knowledge, and improves the user's sense of participation and execution in health management, thereby achieving scientific and effective health intervention and health care practice, while improving the user experience and satisfaction of the system.
[0118] Optionally, the convolutional neural network is trained as follows:
[0119] With the goal of minimizing the cross entropy loss function, the convolutional neural network is trained using the Adam optimizer.
[0120] It should be noted that the cross entropy loss function is a commonly used loss function, which is mainly used to measure the difference between the predicted value and the true value in classification tasks. Its core idea is to calculate the degree of matching of the model to the target category by comparing the probability distribution of the true label with the probability distribution predicted by the model. The cross entropy loss function guides the model optimization by penalizing the wrong prediction probability (that is, the loss is larger when the prediction probability of the true category is lower), so that its output is closer to the true distribution. It is an important tool for optimizing probability models in classification tasks.
[0121] It should be noted that the Adam optimizer (Adaptive Moment Estimation) is a widely used gradient descent optimization algorithm that combines the advantages of momentum and adaptive learning rate (AdaGrad). It dynamically adjusts the learning rate of each parameter by simultaneously calculating the first-order momentum (mean) and second-order momentum (variance) of the gradient, thereby accelerating convergence and enhancing robustness. Adam's update rule is based on the historical gradient changes of each parameter, so it can perform well on data of different scales. Due to its fast convergence speed and insensitivity to hyperparameter debugging, Adam is widely used in deep learning tasks and is one of the preferred optimizers for training complex neural networks.
[0122] Specifically, the cross entropy loss function is constructed with the goal of minimizing the difference between the predicted label and the true label:
[0123] L=-∑ i y′ i log(P′ i )
[0124] Where L represents the cross entropy loss function, y′ i represents the label value of the i-th category of the true label (usually a one-hot encoded vector, only the label value of the correct category is 1, and the label values of the other categories are 0), log() represents the natural logarithm function, P′ i Represents the label value of the i-th category of the predicted label.
[0125] Furthermore, the convolutional neural network is trained using the Adam optimizer based on the cross entropy loss function.
[0126] In the present invention, the goal is to minimize the difference between the true label and the predicted label, which can effectively optimize the probability output of the classification model, make the prediction more accurate, and is particularly suitable for multi-category classification tasks. Combining the advantages of momentum and adaptive learning rate adjustment, it shows fast convergence and robustness under different data distributions, improves training efficiency and reduces the complexity of hyperparameter debugging. Improve the accuracy of convolutional neural networks in tongue image classification tasks, and ensure that the generated tongue feature labels have high credibility.
[0127] The training method of the Autoencoder model is as follows:
[0128] With the goal of minimizing the mean square error loss function, the Autoencoder model is trained by gradient descent method.
[0129] It should be noted that the mean squared error (MSE) loss function is a loss function commonly used in regression tasks, which is used to measure the average difference between the model's predicted value and the true value. The mean squared error penalizes the deviation by squaring the difference, emphasizing the impact of larger prediction errors on the overall loss, thereby guiding the model to fit the data more accurately. It is simple and easy to understand, and is widely used in fields such as regression analysis, time series prediction, and reconstruction tasks in deep learning.
[0130] It should be noted that the gradient descent method is a commonly used optimization algorithm used to minimize the loss function by continuously adjusting the model parameters. The core idea is: according to the gradient direction of the loss function to the parameters, the parameters are gradually updated in the opposite direction of the gradient, so that the loss value gradually decreases and the optimal solution is finally found. The gradient descent method is simple and efficient, suitable for most machine learning and deep learning tasks, and has multiple variants (such as stochastic gradient descent and mini-batch gradient descent) to improve the convergence speed and computational efficiency.
[0131] Specifically, with the goal of minimizing the difference between the reconstructed data R and the input data D, a mean square error loss function is constructed:
[0132]
[0133] Among them, L' represents the mean square error loss function, n represents the dimension of the data, and D i Represents the i-th element of the input data, R i Represents the i-th element of the reconstructed data.
[0134] Furthermore, the Autoencoder model is trained by the gradient descent method based on the mean square error loss function.
[0135] In the present invention, by minimizing the difference between the reconstructed data and the input data, it is ensured that the model can accurately capture the core features of the data, thereby extracting high-quality low-dimensional feature vectors. A simple and efficient optimization algorithm can gradually approach the optimal solution and ensure the stability and reliability of the model. The quality of feature extraction and data dimensionality reduction is improved, ensuring that the low-dimensional feature vector can accurately express the key features of the user's health data, providing more powerful support for intelligent matching.
[0136] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0137] In the present invention, a convolutional neural network is used to perform image recognition on the user's tongue photo to extract tongue features, a support vector machine is used to analyze the user's basic health data, living habits, health feelings and tongue features to generate a preliminary diagnosis result, and the encoder of the Autoencoder model is used to extract features of the user's basic health data, living habits, health feelings, tongue features and preliminary diagnosis results to obtain a low-dimensional feature vector, and then based on the low-dimensional feature vector, a decision tree is used to intelligently match the health rule library to output a health recommendation that matches the feature vector, which fully utilizes the potential of combining the user's personalized health data with traditional Chinese medicine theory, can generate accurate health suggestions, effectively meet the user's diverse health management needs, and overcome the deficiency of being unable to provide targeted optimization solutions based on the user's real-time health status and updated health data due to the lack of a dynamic adjustment mechanism.
[0138] Reference Manual Attached Figure 2 , showing a structural schematic diagram of an intelligent health recommendation system provided by the present invention.
[0139] The present invention also provides an intelligent health recommendation system 30 , comprising: a memory 303 and one or more processors 301 .
[0140] One or more application programs are stored in the memory 303 , and the one or more application programs are suitable for being executed by the one or more processors 301 to implement the intelligent health recommendation method described in the method embodiment.
[0141] The intelligent health recommendation system 30 includes: a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, such as through a bus 302.
[0142] The structure of the intelligent health recommendation system 30 does not constitute a limitation on the embodiment of the present invention.
[0143] Processor 301 may be a CPU, a general purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. Processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0144] The bus 302 may include a path to transmit information between the above components. The bus 302 may be a PCI bus or an EISA bus, etc. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0145] The memory 303 can be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an EEPROM, a CD-ROM or other optical disk storage, an optical disk storage (including a compressed optical disk, a laser disk, an optical disk, a digital versatile disk, a Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.
[0146] It should be noted that the intelligent health recommendation system 30 can implement the above-mentioned intelligent health recommendation method and can achieve the same or similar technical effects. To avoid repetition, the present invention will not go into details.
[0147] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0148] In the present invention, a convolutional neural network is used to perform image recognition on the user's tongue photo to extract tongue features, a support vector machine is used to analyze the user's basic health data, living habits, health feelings and tongue features to generate a preliminary diagnosis result, and the encoder of the Autoencoder model is used to extract features of the user's basic health data, living habits, health feelings, tongue features and preliminary diagnosis results to obtain a low-dimensional feature vector, and then based on the low-dimensional feature vector, a decision tree is used to intelligently match the health rule library to output a health recommendation that matches the feature vector, which fully utilizes the potential of combining the user's personalized health data with traditional Chinese medicine theory, can generate accurate health suggestions, effectively meet the user's diverse health management needs, and overcome the deficiency of being unable to provide targeted optimization solutions based on the user's real-time health status and updated health data due to the lack of a dynamic adjustment mechanism.
[0149] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which can be loaded and executed by a processor to implement the intelligent health recommendation method described in the first aspect.
[0150] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0151] There are a few points to note:
[0152] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention, and other structures may refer to the general design.
[0153] (2) For the sake of clarity, in the drawings used to describe the embodiments of the present invention, the thickness of the layers or regions is exaggerated or reduced, that is, these drawings are not drawn according to the actual scale. It is understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or there may be intermediate elements.
[0154] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.
[0155] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. An intelligent health recommendation method, characterized in that: include: S1: Obtaining user health information, which includes basic health data of the user, photos of the user's tongue, user's living habits, and user's health experience; S2: performing image recognition on the user's tongue image photo through a convolutional neural network to obtain tongue image features; S3: Analyze the basic health data of the user, the user's living habits, the user's health feelings and the tongue image characteristics through a support vector machine to obtain a preliminary diagnosis result; S4: construct an Autoencoder model, wherein the Autoencoder model includes an encoder and a decoder; S5: extracting features of the user's basic health data, the user's living habits, the user's health feelings, the tongue image features, and the preliminary diagnosis results through the encoder of the Autoencoder model to obtain a low-dimensional feature vector; S6: Build a health rule library; S7: Based on the low-dimensional feature vector, intelligent matching is performed in the health rule library through a decision tree, and a health recommendation matching the low-dimensional feature vector is output.
2. The intelligent health recommendation method according to claim 1, characterized in that: The S2 specifically includes: S201: pre-processing the user's tongue photo; S202: Input the preprocessed user tongue image photo into a convolutional neural network for image recognition to obtain tongue image features.
3. The intelligent health recommendation method according to claim 2, characterized in that: The S201 specifically includes: S2011: grayscale the user's tongue photo to obtain a grayscale image: I gray =0.299R+0.587G+0.114B Among them, I gray Represents the pixel value of the grayscale image, R represents the pixel value of the red channel, G represents the pixel value of the green channel, and B represents the pixel value of the blue channel; S2012: normalizing the grayscale image to obtain a normalized image: Among them, I norm Represents the pixel value of the normalized image, min() represents the minimum value, and max() represents the maximum value; S2013: Crop the normalized image to obtain an image of a target size.
4. The intelligent health recommendation method according to claim 2, characterized in that: The convolutional neural network includes an input layer, multiple convolutional layers, multiple pooling layers, a fully connected layer and an output layer, and S202 specifically includes: S2021: In the input layer, input the pre-processed user tongue image photo; S2022: In the convolution layer, local features are extracted from the preprocessed user tongue image photo, and a convolution feature map is output: The conv =σ(W*I+b) Among them, O conv represents the convolution feature map, σ represents the activation function, W represents the weight of the convolution kernel, I represents the preprocessed user tongue image photo, and b represents the bias term of the convolution kernel; S2023: In the pooling layer, perform a maximum pooling operation on the convolutional feature map, and output a pooling feature map: O pool =max(O conv,i,j ) Among them, O pool Represents the pooling feature map, max() represents the maximum value, O conv,i,j Represents the element in the i-th row and j-th column of the convolution feature map; S2024: In the fully connected layer, image recognition is performed according to the pooled feature map: y=W0x+b0 Among them, y represents the label of the tongue image feature, W0 represents the weight matrix of the fully connected layer, x represents the feature vector after the pooling feature map is flattened, and b0 represents the bias term of the fully connected layer; S2025: In the output layer, the image recognition result is output to obtain tongue image features.
5. The intelligent health recommendation method according to claim 1, characterized in that: The S3 specifically includes: S301: performing data cleaning on the basic health data of the user, the living habits of the user, the health feelings of the user, and the tongue image characteristics; S302: Perform data standardization on the cleaned user's basic health data, user's living habits, user's health feelings, and tongue characteristics: Among them, X norm represents the data after standardization, x' represents the data after cleaning, μ represents the mean, and σ0 represents the standard deviation; S303: extracting features from the standardized user's basic health data, user's living habits, user's health feelings, and tongue image features to obtain multiple feature vectors; S304: Analyze each of the feature vectors using a support vector machine to obtain a preliminary diagnosis result: Among them, w represents the weight vector of the support vector machine, b' represents the bias term of the support vector machine, and y i represents the i-th category label, x″ i represents the i-th eigenvector.
6. The intelligent health recommendation method according to claim 1, characterized in that: The S5 is specifically: According to the following formula, the encoder of the Autoencoder model extracts features of the user's basic health data, the user's living habits, the user's health feelings, the tongue image features, and the preliminary diagnosis results to obtain a low-dimensional feature vector: H=f(W1D+B1) F=f(W2H+B2) Among them, H represents the output of the first hidden layer of the encoder, f represents the activation function of the encoder, W1 represents the weight matrix of the first hidden layer of the encoder, D represents the input data, B1 represents the bias term of the first hidden layer of the encoder, F represents the output of the second hidden layer of the encoder, that is, the low-dimensional feature vector, W2 represents the weight matrix of the second hidden layer of the encoder, and B2 represents the bias term of the second hidden layer of the encoder.
7. The intelligent health recommendation method according to claim 6, characterized in that: After S5 and before S6, the method further includes: The low-dimensional feature vector is restored by the decoder of the Autoencoder model to obtain reconstructed data: H ′ =g(3F+B3) R=g(W4H ′ +B4) Among them, H' represents the output of the first hidden layer of the decoder, g represents the activation function of the decoder, W3 represents the weight matrix of the first hidden layer of the decoder, B3 represents the bias term of the first hidden layer of the decoder, R represents the output of the second hidden layer of the decoder, that is, the reconstructed data, W4 represents the weight matrix of the second hidden layer of the decoder, and B4 represents the bias term of the second hidden layer of the decoder.
8. The intelligent health recommendation method according to claim 1, characterized in that: The S7 specifically includes: S701: According to the low-dimensional feature vector, the best split feature is recursively selected from the root node through Gini impurity until the preset conditions are met to construct a decision tree: Among them, Gain(F) represents the Gini impurity of the low-dimensional feature vector, P i represents the total proportion of the i-th category, and C represents the total number of categories; S702: Post-pruning the constructed decision tree; S703: Perform intelligent matching in the health rule library through the pruned decision tree, and output health recommendations that match the low-dimensional feature vector.
9. The intelligent health recommendation method according to claim 1, characterized in that: The training method of the convolutional neural network is specifically as follows: The convolutional neural network is trained by using the Adam optimizer with the goal of minimizing the cross entropy loss function; The training method of the Autoencoder model is specifically as follows: The Autoencoder model is trained by gradient descent method with the goal of minimizing the mean square error loss function.
10. An intelligent health recommendation system, characterized in that: include: memory and one or more processors; One or more applications are stored in the memory, and the one or more applications are suitable for being executed by the one or more processors to implement the intelligent health recommendation method according to any one of claims 1 to 9.
Citation Information
Cited By
Multi-modal tongue image analysis system
CN120472504A
A multimodal tongue image analysis system
CN120472504B