Personalized health preserving suggestion generation system and method based on image processing
Through real-time image quality evaluation and deep learning model, visual features of the tongue are extracted, combined with dynamic knowledge graphs, misjudgment problems caused by poor image quality in traditional health assessment systems are solved, and the accurate generation of personalized health advice is achieved, which improves the scientificity and user experience of traditional Chinese medicine physique recognition.
Patent Information
- Application Number
- CN202510609543.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-08-19
AI Technical Summary
In traditional health assessment system, due to the complex environment in the identification of physical constitution of traditional Chinese medicine, the image quality is poor, the tongue image characteristics are misjudged, and homogeneous health care suggestions are generated, which is difficult to match the user's real physical constitution status.
Tongue images are processed through real-time image quality evaluation, adaptive color correction and multi-scale normalization technology, combined with deep learning models, visual features of the tongue are extracted, and multi-dimensional matching is performed in the dynamic knowledge graph to generate personalized health suggestions.
It improves the accuracy of image feature extraction and the individual adaptability of health advice, ensures the scientificity and pertinence of tongue image analysis, and improves user experience.
Smart Images

Figure CN120509484A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent health management, and more specifically, to a system and method for generating personalized health advice based on image processing. Background Art
[0002] With the increasing demand for modern health management, personalized and intelligent health assessments are becoming the future direction of development. Technologies for generating personalized health recommendations are gaining increasing attention. In Traditional Chinese Medicine (TCM) diagnosis and treatment, tongue analysis, a key component of "visual diagnosis," reflects the functional state of the body's internal organs by observing visual features such as tongue texture, tongue coating, and cracks, providing a key basis for constitution identification and health management.
[0003] While traditional health assessment systems can provide basic recommendations based on questionnaires or physiological indicators, their limitations are increasingly evident in scenarios such as Traditional Chinese Medicine (TCM) constitution analysis, which rely on visual feature analysis. Users often face complex and variable shooting environments. Differences in indoor and outdoor lighting levels can cause color temperature shifts. The use of mobile phone flashlights or backlit shooting can easily cause tongue reflections or partial overexposure. Furthermore, device jitter, tilt angle deviation, or poor control of shooting distance can cause deformation of the tongue's edges, blurred textures, or even cause key areas to fall out of frame. Furthermore, existing systems lack real-time interactive mechanisms during the capture process, preventing users from determining whether an image meets analysis requirements during the acquisition phase. This often requires trial and error, resulting in a poor user experience. Once these low-quality images enter the analysis process, traditional fixed-threshold image segmentation algorithms struggle to correct for ambient light interference, potentially misclassifying shadows as ecchymosis or misidentifying tongue coating color due to color shifts. Furthermore, static rule bases often overlook the complex interplay of multiple physical features when analyzing the correlation between tongue fissure depth and tongue fatness. This ultimately generates generic dietary recommendations or exercise plans that fail to match the user's true constitution.
[0004] Therefore, an optimized image processing-based personalized health advice generation solution is desired. Summary of the Invention
[0005] In order to solve the above technical problems, the present application is proposed. The embodiments of the present application provide a system and method for generating personalized health advice based on image processing.
[0006] According to one aspect of the present application, a method for generating personalized health advice based on image processing is provided, which includes:
[0007] Step 1: In response to receiving a user request to start shooting, guiding the user to capture tongue image data to obtain user tongue image data;
[0008] Step 2: Perform image quality evaluation on the user's tongue image data. If the image quality is unqualified, return to step 1; if the image quality is qualified, proceed to step 3;
[0009] Step 3: preprocessing and normalizing the user's tongue image data to obtain normalized tongue image data;
[0010] Step 4: extracting tongue visual features from the standardized tongue image data, including: performing local visual feature encoding on the standardized tongue image data to obtain a set of tongue local visual feature vectors; performing individual-group feature selection on the set of tongue local visual feature vectors to obtain a refined set of tongue local visual feature vectors; and performing feature combination on the refined set of tongue local visual feature vectors to obtain a tongue visual feature combination vector as the tongue visual feature;
[0011] Step 5: Input the tongue visual features into a knowledge base-based reasoning engine to obtain personalized health recommendations;
[0012] Step 6: Display the personalized health advice on the software interface.
[0013] According to another aspect of the present application, a personalized health advice generation system based on image processing is provided, which includes:
[0014] an image acquisition module, configured to, in response to receiving a user's request to initiate shooting, guide the user to acquire tongue image data to obtain user tongue image data;
[0015] An image quality assessment module is used to perform image quality assessment on the user's tongue image data. If the image quality is unqualified, the process returns to the image acquisition module. If the image quality is qualified, the process enters the image standardization processing module.
[0016] an image standardization processing module, configured to preprocess and standardize the user's tongue image data to obtain standardized tongue image data;
[0017] an image analysis module for extracting tongue visual features from the standardized tongue image data, wherein the image analysis module comprises: a tongue visual feature encoding unit for performing local visual feature encoding on the standardized tongue image data to obtain a set of tongue local visual feature vectors; a tongue visual feature selection unit for performing individual-group feature selection on the set of tongue local visual feature vectors to obtain a refined set of tongue local visual feature vectors; and a tongue visual feature combination unit for performing feature combination on the refined set of tongue local visual feature vectors to obtain a tongue visual feature combination vector as the tongue visual feature;
[0018] a health advice generation module, configured to input the tongue visual features into a knowledge base-based reasoning engine to obtain personalized health advice;
[0019] The health advice display module is used to display the personalized health advice on the software interface.
[0020] Compared to existing technologies, the image processing-based personalized health advice generation system and method provided by this application first responds to the user's shooting request and guides the user to collect tongue image data. It then performs a quality assessment on the collected image data. If the quality is unqualified, it re-collects it. If it is qualified, it continues with subsequent processing. The qualified tongue image data is then pre-processed and normalized to obtain standardized image data. Subsequently, the tongue visual features are extracted from the standardized image and input into a knowledge-based reasoning engine to generate personalized health advice. Finally, the generated health advice is presented to the user through a software interface. This ensures the accuracy of image feature extraction and physical constitution analysis, thereby improving the individual adaptability of health advice. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and other purposes, features, and advantages of the present application will become more apparent through a more detailed description of the embodiments of the present application in conjunction with the accompanying drawings. The accompanying drawings are intended to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the drawings, the same reference numerals generally represent the same components or steps.
[0022] Figure 1 This is a flowchart of a method for generating personalized health advice based on image processing according to an embodiment of the present application.
[0023] Figure 2 This is a flowchart of step 4 in the method for generating personalized health advice based on image processing according to an embodiment of the present application.
[0024] Figure 3 This is a flowchart of step 41 in the method for generating personalized health advice based on image processing according to an embodiment of the present application.
[0025] Figure 4 This is a flowchart of step 42 in the method for generating personalized health advice based on image processing according to an embodiment of the present application.
[0026] Figure 5 This is a flowchart of step 42-3 in the method for generating personalized health advice based on image processing according to an embodiment of the present application.
[0027] Figure 6 This is a system block diagram of a personalized health advice generation system based on image processing according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described herein.
[0029] As personalized and intelligent approaches become key trends in modern health assessment, Traditional Chinese Medicine (TCM) tongue image analysis is gaining traction due to its unique role in constitution identification and health management. As a core component of TCM's "visual diagnosis," tongue image analysis reflects the functional status of the body's internal organs by observing features such as tongue texture, coating, and cracks, providing a key basis for personalized health recommendations. However, traditional health assessment systems have significant limitations in TCM constitution identification, particularly in scenarios that rely on visual feature analysis. In practice, tongue image capture often suffers from complex environmental factors, such as color temperature shifts caused by varying lighting conditions, glare and overexposure, as well as image distortion or blurring caused by camera angle, distance, and camera shake. Furthermore, the lack of real-time feedback makes it difficult for users to determine whether an image meets analysis requirements, requiring multiple attempts and reducing the user experience. When low-quality images enter the analysis process, traditional algorithms struggle to cope with lighting interference and color casts, leading to misjudgment of tongue image features. Furthermore, static rule bases ignore the complex interrelationships between multiple physical features, resulting in homogeneous recommendations that fail to accurately meet user needs.
[0030] Based on this, this application proposes a method for generating personalized health advice based on image processing. Figure 1 Flowchart of the method for generating personalized health advice based on image processing according to an embodiment of the present application. Figure 1 As shown, according to an embodiment of the present application, the method for generating personalized health advice based on image processing includes: step 1: in response to receiving a user-initiated shooting request, guiding the user to collect tongue image data to obtain user tongue image data; step 2: performing image quality evaluation on the user tongue image data, if the image quality is unqualified, returning to step 1, if the image quality is qualified, entering step 3; step 3: preprocessing and standardizing the user tongue image data to obtain standardized tongue image data; step 4: extracting tongue visual features from the standardized tongue image data; step 5: inputting the tongue visual features into a knowledge base-based reasoning engine to obtain personalized health advice; step 6: displaying the personalized health advice on the software interface.
[0031] Specifically, first, through the shooting guidance mechanism of step 1, combined with the real-time image quality assessment of step 2, it can actively intervene when the user collects the tongue image, dynamically correct the feature deformation problem caused by hand-held shaking, angle deviation or improper distance, and automatically identify overexposure or color temperature offset with the help of the ambient light perception algorithm, thereby overcoming the interference caused by irregular user operation and environmental diversity. After the image quality is qualified, the preprocessing and standardization of step 3 adopts adaptive color correction and multi-scale normalization technology to eliminate the influence of color deviation on the interpretation of tongue coating color under different lighting conditions, and avoid the risk of misjudgment of traditional fixed threshold segmentation algorithms in complex scenes. The feature extraction link of step 4 captures detailed features such as tongue texture and crack morphology through a deep learning model. Compared with traditional manual feature selection methods, it can more accurately distinguish between true pathological features and shooting artifacts. The inference engine in step 5 builds a dynamic knowledge graph, performing a multi-dimensional match between tongue image features and TCM constitution types and symptom association rules. Specifically, for cross-signals such as tongue fissure depth and tongue fatness, the probabilistic inference model quantifies the association weights, breaking through the mechanical matching limitations of traditional static rule bases to generate personalized recommendations that integrate multiple dimensions such as diet therapy and exercise. This entire process forms a closed-loop optimization loop from data collection to recommendation output, addressing the core pain point of inaccurate feature extraction caused by low-quality images while also enhancing the targeted and scientific nature of health recommendations through intelligent inference mechanisms.
[0032] In step 1, in response to receiving a user request to initiate capture, the user is guided to capture tongue image data to obtain the user's tongue image data. Specifically, in an embodiment of the present application, step 1 includes: providing a real-time viewfinder with a superimposed tongue extension position frame; real-time detection of ambient light intensity and uniformity, and determining whether to prompt the user to adjust the lighting based on the detection results; real-time detection of image clarity, and determining whether to prompt the user to maintain stability based on the image clarity detection results; real-time detection of shooting distance and angle, and determining whether to prompt the user to adjust based on the detection results. It is understandable that a lack of operational standardization is common when users independently capture tongue images. Due to the lack of professional medical photography knowledge, ordinary users, without guidance, often suffer from blurred images due to insufficient handheld device stability or missing features due to misalignment of the tongue area. Especially in complex lighting environments, users find it difficult to independently determine the optimal distance and angle between the phone and the tongue surface, which can easily cause interference such as mirror reflections or shadows, resulting in edge distortion, overexposure of key areas, and color temperature distortion in the captured original image. These data deviations caused by non-standardized operations directly result in the subsequent image quality assessment module having to process large amounts of invalid data streams, severely reducing system efficiency and potentially worsening the user experience due to repeated failed attempts. By guiding users to collect tongue image data, it is possible to correct feature distortions caused by hand-held jitter, angle deviation, or improper distance. At the same time, with the help of ambient light perception algorithms, it automatically identifies and minimizes issues such as overexposure and color temperature shift, thereby obtaining high-quality user tongue image data that meets analysis requirements, laying the foundation for subsequent accurate image analysis and the generation of personalized health recommendations.
[0033] Specifically, when the user captures a tongue image, the system first provides a real-time viewfinder within the capture interface, overlaying a tongue extension position frame. This visual guidance allows the user to intuitively adjust the tongue's position within the frame, ensuring the capture captures a complete and appropriate image of the tongue area, laying a solid foundation for subsequent analysis. Simultaneously, the system monitors ambient light intensity and uniformity in real time. If the lighting is perceived as excessive, insufficient, or uneven, it determines whether to prompt the user to adjust the lighting based on preset criteria. This prevents reflections, shadows, or color distortion caused by lighting issues, thereby improving image quality. Furthermore, the system analyzes the real-time image using an image clarity algorithm. If the clarity falls below a threshold, it identifies possible device vibration and prompts the user to maintain stability to prevent blurring that could affect tongue feature recognition. Finally, the system uses camera parameters and tongue features in the image to detect the shooting distance and angle in real time. After comparing the shooting distance and angle against a preset appropriate range, the system prompts the user to adjust the angle if it exceeds this range. This ensures the tongue appears the appropriate size and shape in the image, minimizing edge distortion or missing key areas due to distance and angle issues.
[0034] In step 2, the user's tongue image data is evaluated for image quality. If the image quality fails, the process returns to step 1. If the image quality passes, the process proceeds to step 3. Specifically, metrics such as brightness, contrast, clarity (e.g., using the Laplacian operator), face / tongue region integrity, and the presence of significant reflections or shadows are calculated. Accordingly, in practical applications, the environments and methods used by users to capture tongue images may vary, such as unstable lighting conditions, hand tremors during capture, and inappropriate shooting angles and distances. These factors can all lead to poor image quality. Using low-quality images directly for subsequent analysis can result in inaccurate feature extraction, which in turn affects the generation of personalized health recommendations. Image quality assessment can filter out images that do not meet the requirements, preventing erroneous analysis results due to image quality issues. Specifically, the image quality assessment process is as follows: First, brightness is calculated to determine whether the lighting during capture was appropriate—light that is too dark or too bright can affect the accurate identification of tongue features. Next, contrast is assessed to ensure that features such as color and texture are clearly distinguishable, avoiding the confusion and difficulty in identifying features due to insufficient contrast. The system then calculates clarity using the Laplacian operator, testing the sharpness and texture of image details. A blurred image can make it difficult to discern tongue texture (such as coating lines and cracks). The system also checks the integrity of the tongue region, verifying that the tongue is fully captured and any edges are missing or deformed. If the tongue is not fully captured, comprehensive analysis is impossible. Furthermore, the system determines the presence of significant reflections or shadows, as these can obscure the true color of the tongue coating, while shadows can lead to errors in tongue quality assessment. After completing these assessments, the system compares each indicator against pre-set quality thresholds to determine image quality. If the image fails, the system rejects the image and provides the user with a detailed explanation, such as "Insufficient lighting, making it difficult to discern tongue features," "Blurred image, unclear tongue patterns," or "Incompletely captured, partially missing tongue edges." The system then directs the user to retake the image and returns to step 1. If the image quality passes, the system proceeds to step 3 for further processing.
[0035] In step 3, the user's tongue image data is preprocessed and standardized to obtain standardized tongue image data. Specifically, in the embodiment of the present application, the preprocessing and standardization include: color correction, illumination normalization, region segmentation, image enhancement and size normalization. It should be understood that tongue images taken by different users may have large differences in color, illumination, size, etc. Even if they pass the quality assessment of step 2, these differences may still affect the accuracy of subsequent feature extraction and analysis. For example, color temperature offset will cause the tongue coating color to appear cold or warm, resulting in a misjudgment of the constitution of excessive internal heat and spleen and stomach deficiency; and shadow projection under a dynamic light source may form pseudo-cracks or false ecchymosis features, interfering with the true expression of tongue texture. More seriously, if the original image is directly input into the analysis process, the adhesion of the tongue area to the background and the interference of local reflective points will destroy the continuity of the tongue edge, so that the subsequent region segmentation algorithm needs to consume a lot of computing resources for error correction and compensation, and even cause distortion in the measurement of tongue shape parameters. Therefore, the present application obtains standardized tongue image data by preprocessing and standardizing the user's tongue image data to make the tongue features more prominent and clear. Specifically, color correction uses a white balance algorithm to reconstruct the color gamut space under a standard light source, eliminating the interference of device sensor differences and ambient color temperature; illumination normalization uses the Retinex theory to decompose the reflection component and remove the influence of ambient light on the light and dark distribution of the tongue surface; region segmentation uses the U-Net network to accurately extract the tongue contour, avoiding the failure of traditional threshold segmentation in complex backgrounds; the image enhancement link uses multi-scale fusion technology to enhance microstructural features such as tongue papillae and cracks; size normalization establishes a unified pixel coordinate system to ensure that images from devices with different resolutions are comparable. This enables the subsequent feature extraction step to more accurately extract feature information reflecting the true condition of the user's tongue, such as the color of the tongue coating, the texture of the tongue, the shape and cracks of the tongue, etc., providing more reliable data support for the identification of Chinese medicine constitutions and the generation of personalized health recommendations based on these features.
[0036] In step 4, tongue visual features are extracted from the standardized tongue image data. Accordingly, tongue visual features are an important basis for determining the user's physical condition. Extracting these features provides a data foundation for subsequent feature-based TCM constitution identification, disease risk assessment, and the generation of personalized health recommendations. Various tongue features, such as tongue color, tongue coating thickness, and tongue shape, are closely linked to human health. Traditional methods rely on manually selected superficial features such as colorimetric values and geometric parameters, making it difficult to fully characterize dynamically changing physiological indicators such as tongue moisture and coating thickness, and even more difficult to capture the gradual changes in tongue microtexture. For example, the correlation between the density of tongue papilla distribution and spleen and stomach function, and the role of morphological characteristics of crack edges indicative of Yin deficiency, are key information often weakened or lost in manually designed feature spaces. More seriously, when images contain residual environmental noise or incomplete standardization, traditional edge detection algorithms may misidentify reflective spots as flaking coating or shadows as ecchymosis, resulting in feature vectors containing a large number of interference items.
[0037] Based on this, in step 4, the technical concept of this application is to first capture the local hierarchical features of the tongue, focusing on micro-texture features such as the distribution density of tongue papillae and the granularity of the moss, and then introduce individual-group feature selection for feature selection, dynamically screening out feature subsets with significant discriminative power (for example, distinguishing the longitudinal fissures on the tongue surface that are unique to Yin deficiency constitution from ordinary dry lines), while suppressing interference items introduced by residual reflections or standardization deviations; the selected local features are correlated and fused to form comprehensive features with pathological discrimination. This feature extraction paradigm breaks through the limitations of artificial feature design, effectively retains the details of tongue biomarkers, and eliminates pseudo-feature interference caused by image acquisition defects, providing a high-fidelity data foundation for subsequent inference engines to identify constitutions and generate health recommendations.
[0038] Specifically, Figure 2 This is a flowchart of step 4 in the method for generating personalized health advice based on image processing according to an embodiment of the present application. Figure 2 As shown, the step 4 includes: step 41, performing local visual feature encoding on the standardized tongue image data to obtain a set of tongue local visual feature vectors; step 42, performing individual-group feature selection on the set of tongue local visual feature vectors to obtain a refined set of tongue local visual feature vectors; step 43, performing feature combination on the refined set of tongue local visual feature vectors to obtain a tongue visual feature combination vector as the tongue visual feature.
[0039] In step 41, local visual feature encoding is performed on the standardized tongue image data to obtain a set of tongue local visual feature vectors. Specifically, Figure 3Flowchart of step 41 in the method for generating personalized health advice based on image processing according to an embodiment of the present application. Figure 3 As shown, the step 41 includes: step 411, performing tongue local visual feature extraction based on a convolutional neural network model on the standardized tongue image data to obtain a set of tongue local visual feature maps; step 412, performing feature flattening on each tongue local visual feature map in the set of tongue local visual feature maps to obtain a set of tongue local visual feature vectors.
[0040] In step 411, the standardized tongue image data is subjected to a convolutional neural network model-based tongue local visual feature extraction to obtain a set of tongue local visual feature maps. Accordingly, considering that the standardized tongue image data has been preprocessed and standardized, it still contains complex information, such as the microscopic texture of the tongue and the characteristic differences between different regions. Although manually designed chromaticity thresholds or geometric parameters can capture superficial information such as the overall contour and average color of the tongue, it is difficult to quantify the dynamic changes in the microtexture of the tongue surface (such as the density fluctuations of the tongue papilla with changes in digestion status) and the morphological details of the crack edges (such as the tree-like bifurcation characteristics unique to Yin deficiency constitution). More importantly, when there are still local reflection residues or slight motion blur in the image after standardization, the traditional gradient operator will confuse these interference signals with the real pathological texture (for example, misjudging the device reflection as a peeling moss area), resulting in the extracted feature vector containing a large amount of noise, which directly affects the accuracy of subsequent constitution identification. Therefore, the present application obtains a set of local visual feature maps of the tongue by extracting local visual features of the tongue based on a convolutional neural network model for the standardized tongue image data. In particular, the bottom convolution layer of the network automatically captures the basic texture of the tongue (such as the roughness of the tongue coating particles and the moist feeling of saliva coverage), the middle-level feature map analyzes regional characteristics (such as the distribution morphology of the tongue papilla at the tip of the tongue and the crack network topology in the middle of the tongue), and the high-level semantic perception focuses on microscopic pathological signs (such as the pigment deposition gradient at the edge of the ecchymosis, the texture difference in the transition zone between the peeling coating and the normal tongue coating). This multi-scale feature extraction process does not simply segment the tongue area, but establishes a local feature response map through the sliding perception of the convolution kernel, and encodes the visual information of each pixel point on the tongue surface into a set of feature maps with spatial correlation. For example, for the tongue fissure feature, the network can not only identify the existence of the crack, but also distinguish the morphological differences between physiological cracks and pathological cracks through the spatial distribution differences of the feature map, thereby focusing on microscopic texture features such as the distribution density of the tongue papilla and the granularity of the coating to obtain richer and more detailed tongue information.
[0041] In step 412, feature flattening is performed on each of the tongue local visual feature maps in the set of tongue local visual feature maps to obtain a set of tongue local visual feature vectors. Accordingly, considering that the set of tongue local visual feature maps contains feature maps of multiple different local areas, each feature map reflects the characteristic information of the tongue from a different angle. Therefore, in order to improve the efficiency of subsequent processing and make subsequent calculations and processing relatively more efficient and simple, in the technical solution of the present application, feature flattening is performed on each of the tongue local visual feature maps in the set of tongue local visual feature maps to obtain a set of tongue local visual feature vectors.
[0042] In step 42, individual-group feature selection is performed on the set of tongue local visual feature vectors to obtain a refined set of tongue local visual feature vectors. Specifically, Figure 4 Flowchart of step 42 in the method for generating personalized health advice based on image processing according to an embodiment of the present application. Figure 4 As shown, the step 42 includes: step 42-1, calculating the tongue visual group distribution semantic map of the set of tongue local visual feature vectors; step 42-2, extracting the i-th tongue local visual feature vector from the set of tongue local visual feature vectors as the tongue local visual individual feature vector; step 42-3, based on the tongue visual group distribution semantic map, performing modulation and incremental-driven pruning processing on the tongue local visual individual feature vector to determine whether to delete the i-th tongue local visual feature vector.
[0043] It should be understood that although the flattened local feature vector set carries the visual information of various areas of the tongue surface, it inevitably contains a large number of redundant features (such as repeated textures on the edge of the tongue) and residual environmental noise (such as local reflections that are not completely eliminated by standardization). More importantly, the key pathological features that Chinese medicine constitution identification relies on (such as the turtle back-shaped cracks of Yin deficiency constitution) often have a high degree of overlap with the common characteristics of the group (such as the ubiquitous physiological tongue patterns) in the original feature space. Traditional feature selection methods based on variance analysis or mutual information are difficult to accurately separate these two types of features. For example, when the tongue images of most users in the group database have a generally thick tongue coating caused by the regional climate, traditional methods are prone to misjudge such common group features as important indicators, and ignore individual-specific pathological features (such as crack bifurcation morphology that only appears in specific constitutions), resulting in a decrease in the medical discrimination of the feature vector set. Based on this, the present application performs individual-group feature selection on the set of local visual feature vectors of the tongue to screen out a feature subset with significant discrimination power, thereby obtaining a refined set of local visual feature vectors of the tongue. For example, it can distinguish the longitudinal fissures on the tongue surface that are unique to Yin deficiency constitution from ordinary dry lines, thereby accurately extracting features that are closely related to specific constitution and health status from the many local visual features of the tongue, providing a key basis for subsequent constitution identification and health advice generation.
[0044] Specifically, in the embodiment of the present application, step 42-1 includes: calculating a tongue visual group distribution semantic map of the set of tongue local visual feature vectors. This process can be expressed as:
[0045] X={x1,x2,...,x i ,...,x n}
[0046]
[0047] Among them, X is the set of local visual feature vectors of the tongue, x1, x2, x i , x j and x n are the first, second, i-th, j-th and n-th tongue local visual feature vectors in the set of tongue local visual feature vectors, W r is a learnable weight matrix, b is a bias vector, [·;·] is a vector concatenation, r i,j is x i and x j The linear aggregation vector of the local visual features of the tongue between is r i,j The eigenvalue of the hth position in , T is r i,j The number of eigenvalues in , sigmoid is the sigmoid activation function, R(x i,x j ) is x i and x j The semantic correlation between the local visual features of the tongue, that is, the value of the (i, j) position in the semantic map of the tongue visual group distribution, R(x1,x1), R(x1,x n ),R(x n ,x1)…R(x n ,x n ) are the feature values of each position in the tongue visual group distribution semantic map, and M is the tongue visual group distribution semantic map.
[0048] It should be understandable that traditional feature selection methods (such as variance analysis) rely on linear assumptions and cannot capture the complex semantic associations between high-dimensional features, which can easily lead to confusion between common group features (such as a generally thick tongue coating) and individual pathological features (such as Yin deficiency cracks). For example, in the original feature space, physiological tongue patterns and pathological cracks may be mistakenly classified as the same category due to overlapping distributions. By constructing a semantic graph of the visual group distribution of the tongue, it is possible to model nonlinear dependencies between features (such as co-occurrence frequency, topological structure), encode global contextual information into a graph structure, and thus reveal the potential semantic boundaries of feature clusters. That is, this step can map the set of original tongue local visual feature vectors into a structured semantic space through unsupervised graph learning, and clearly distinguish the distribution differences between group commonality and individual-specific features. For example, the general thickening of the tongue coating caused by climate will form a dense cluster in the semantic graph, while Yin deficiency cracks will form independent nodes due to their sparse distribution, which can provide prior knowledge support for subsequent screening.
[0049] Specifically, in the embodiment of the present application, the step 42-2 includes: extracting the i-th tongue local visual feature vector from the set of tongue local visual feature vectors as the tongue local visual individual feature vector.
[0050] It should be understandable that TCM constitution identification needs to focus on individual specificity, but traditional methods are easily interfered by group commonalities due to the lack of an "individual-group" comparative perspective. For example, if a single tongue fissure feature is directly analyzed, it may be mistakenly attributed to group dry lines rather than a Yin deficiency constitution. By independently extracting the i-th tongue local visual feature vector as the tongue local visual individual feature vector, it can be placed in the context of the group distribution semantic map, highlighting its uniqueness relative to the whole. In other words, this step decouples the micro-individual features from the macro-group distribution, making it an independent analysis unit, realizing the perspective shift from global distribution to local differences, and can provide input for subsequent modulation that is not interfered by group bias.
[0051] Specifically, Figure 5 This is a flowchart of step 42-3 in the method for generating personalized health advice based on image processing according to an embodiment of the present application. Figure 5 As shown, the step 42-3 includes: step 42-31, mapping the tongue local vision individual feature vector to the feature space of the tongue vision group distribution semantic map to obtain the tongue local vision individual modulation feature vector; step 42-32, calculating the tongue local vision individual semantic increment operator of the tongue local vision individual modulation feature vector relative to the set of tongue local vision feature vectors; step 42-33, determining whether to delete the i-th tongue local vision feature vector based on the comparison between the tongue local vision individual semantic increment operator and a preset threshold.
[0052] More specifically, in the embodiment of the present application, step 42-31 includes: mapping the tongue local visual individual feature vector to the feature space of the tongue visual group distribution semantic map to obtain the tongue local visual individual modulation feature vector. This process can be expressed as follows:
[0053]
[0054] in, is matrix multiplication, v i is x i The corresponding tongue local visual individual modulation feature vector.
[0055] It should be understandable that the original expression of the tongue local visual individual feature vector lacks group context, and it is difficult to distinguish whether it is common or specific. For example, if the depth feature of the tongue fissure is analyzed alone, it is impossible to determine whether it is a common dry line or a sign of Yin deficiency pathology. By projecting it into the feature space of the tongue visual group distribution semantic map, the neighborhood relationship in the graph structure (such as feature co-occurrence and topological connection) can be used to enhance its semantic expression ability. In other words, the local visual individual modulation feature vector of the tongue obtained after modulation combines its own local information with group semantic associations (such as the occurrence pattern of crack morphology in the global sample), so that subsequent evaluation can consider individual uniqueness and group significance at the same time, reducing false elimination caused by isolated analysis.
[0056] More specifically, in the embodiment of the present application, step 42-32 includes: performing scale-invariant optimization of group semantic association on the tongue local visual individual modulation feature vector to obtain the tongue local visual individual optimized modulation feature vector. This process can be expressed as:
[0057]
[0058] Where T is the transpose operation, (·) ⊙-1 It is the inverse of the eigenvalue of each position in the calculation vector, M i ′ is x iThe corresponding tongue local visual feature scale invariant correlation matrix, ln is the logarithmic function value with the natural constant e as the base, x′ i is x i The corresponding tongue local visual feature global correlation abnormal dimension vector, ⊙ is the position point product, v′ i is x i The corresponding tongue local visual individual optimized modulation feature vector;
[0059] Based on the set of tongue local visual feature vectors, the group-referenced individual semantic energy ratio of the tongue local visual individual optimized modulation feature vector is calculated to obtain the tongue local visual individual semantic increment operator. This process can be expressed as follows:
[0060]
[0061] Among them, v′ ik It is v i The eigenvalue at the kth position in i,k is x i The eigenvalue of the kth position in L is v′ i and x i The number of eigenvalues in , and v′ i and x i The length of is the same, n is the number of vectors in the set of tongue local visual feature vectors, λ i is x i The corresponding tongue local visual individual semantic energy ratio, arctan is the inverse tangent function, π is the pi, is x i The corresponding tongue local visual individual semantic increment operator.
[0062] In particular, here, the tongue visual group distribution semantic map M is obtained by the tongue local visual feature vector x i ,x j When the pair-wise calculation is used to capture the information such as the eigenvalue distribution, feature co-occurrence frequency and feature space topology structure based on the local correlation of the eigenvector, the global universal unevenness problem of local correlation defects is inevitable. That is, the semantic near-field energy distribution generated by the local correlation defect will have encoding defects in the energy channel transmission process of the global semantic background field, affecting the independent individual x i The accuracy of the global-local difference significance measure.
[0063] Therefore, it is preferred to first calculate the tongue local visual feature scale invariant correlation matrix That is, by expressing individual characteristics x iAs the fixed point under the semantic map M of tongue visual group distribution, the beta function expansion of the global semantic conjugate distribution relative to the mapping modulation result is performed, and then x′ i =ln(v i )⊙[ln(x i ) ⊙-1 ] to determine the abnormal dimension of global correlation, which is the critical dimension of local correlation defects under global universality. Finally, M′-M is used as the energy scale dimension propagation channel, and The abnormal dimension is directed to the fixed point, so that the local fluctuation of the near-field energy of the local correlation defect is globally correlated under the invariant scale dimension, the local-global transfer universality of the difference significance measure is improved, and the local visual individual modulation feature vector v of the tongue is enhanced. i Expression accuracy based on tongue visual group distribution semantic map M.
[0064] It should be understandable that traditional feature importance assessment (such as mutual information) cannot quantify the causal impact of feature removal on the overall semantics, while the tongue local visual individual semantic increment operator can solve this problem through counterfactual reasoning. Specifically, this operator simulates "the degree of loss of expressive power of the semantic graph if the current feature is deleted", for example, after removing a certain crack feature, the proportion of the decrease in the discrimination of the Yin deficiency constitution nodes in the tongue visual group distribution semantic graph. Its calculation relies on the information contribution entropy of the optimized modulation feature vector of the local visual individual of the tongue in the group space, and quantifies its causal effect by comparing the distribution differences under the presence and absence of the feature. In other words, this step converts feature selection into an interpretable contribution ranking, such as identifying crack bifurcation features that are only sensitive to specific constitutions, and filtering out the dry grain noise shared with most samples.
[0065] More specifically, in the embodiment of the present application, the steps 42-33 include: determining whether to delete the i-th tongue local visual feature vector based on a comparison between the tongue local visual individual semantic increment operator and a preset threshold. This process can be expressed as follows:
[0066]
[0067] in, is x i The corresponding tongue local visual individual semantic increment operator, mask(x i ) is the pair x i Perform feature selection, θ is the preset threshold.
[0068] It should be understood that the preset threshold is a key parameter for dynamically balancing medical discrimination and feature sparsity, and its setting needs to be combined with clinical priors (such as the sensitivity requirements for constitution identification). For example, a high threshold can strictly retain features that are strongly correlated with turtle back cracks, but may miss weakly significant features; a low threshold expands the selection range but introduces redundancy. By comparing the local visual individual semantic increment operator of the tongue with the threshold, rule-driven adaptive screening can be achieved: for example, when the incremental value of a certain tongue coating thickness feature is lower than the threshold, it is judged to be a group common noise and deleted, while the longitudinal fissure feature above the threshold is retained. The refined set of local visual feature vectors of the tongue that is finally output by this step can ensure that subsequent constitution identification relies only on pathological indicators with causal discrimination, thereby improving the individual adaptability of health recommendations.
[0069] In step 43, the refined set of local visual feature vectors of the tongue is subjected to feature combination to obtain a tongue visual feature combination vector as the tongue visual feature. Specifically, in an embodiment of the present application, the step 43 includes: performing transformer-based feature combination on the refined set of local visual feature vectors of the tongue to obtain the tongue visual feature combination vector. Accordingly, considering that the refined feature vector set after feature selection has eliminated redundant noise, its discretized local features (such as ecchymosis on the tip of the tongue, cracks on the root of the tongue, etc.) are still in an independent state, it is difficult to reflect the holistic view required for Chinese medicine syndrome differentiation. Although the traditional weighted summation or simple splicing fusion method can achieve feature aggregation, it cannot capture the dynamic correlation of cross-regional features (such as the coordinated changes in the thickness of the tongue coating and the fatness of the tongue body to indicate the phlegm-damp constitution). To this end, the present application performs transformer-based feature combination on the refined set of local visual feature vectors of the tongue to model the long-distance dependency between features through the self-attention mechanism, thereby mining the potential complex connections between different features and obtaining the tongue visual feature combination vector.
[0070] The following is a detailed description of a specific implementation process of “performing transformer-based feature combination on the refined set of tongue local visual feature vectors to obtain the tongue visual feature combination vector”:
[0071] The first stage is the input embedding phase. The core goal of this phase is to add positional information to the local visual feature vectors of the tongue and map them to a dimensional space suitable for Transformer processing. Since the Transformer model itself does not have sequence position perception capabilities, positional semantics must be assigned to each local visual feature vector of the tongue through positional encoding technology. Specifically, sine and cosine functions are used to generate a positional encoding vector that matches the feature vector dimension. This encoding converts the relative position of each feature vector in the sequence into a learnable numerical representation through a combination of trigonometric functions of different frequencies, thereby preserving the spatial distribution information of the local tongue features (such as the positional relationship between regions such as the tip, middle, and root of the tongue). After the positional encoding is generated, it is element-wise added to the corresponding feature vector to obtain an initial embedding vector that incorporates the positional information. Subsequently, a learnable linear transformation layer is used to perform dimension mapping on the initial embedding vector, converting it to the fixed dimension required for the Transformer model input (such as d_model). The weight matrix of this linear layer is automatically optimized during model training to achieve effective alignment between the input features and the model's internal representation space.
[0072] After input embedding, the multi-head self-attention mechanism enters the processing phase. The core of this phase is to model the semantic associations between different local tongue feature vectors and to exploit long-range dependencies between features across regions. First, the embedded input vectors are fed into three independent linear transformation layers to generate query, key, and value vectors, each with the same dimensionality as the input. For each query vector, a dot product operation is used to calculate its similarity with all key vectors, resulting in a raw attention score. To avoid numerical instability, the score is scaled (divided by the square root of the key vector's dimensionality) and then converted into a normalized attention weight using a softmax function. This weight represents the degree of attention paid by the current feature vector to all other feature vectors. The value vector is then weighted and summed based on the attention weights to produce the output of a single head. The multi-head self-attention mechanism runs multiple independent attention heads (e.g., eight) in parallel, enabling the model to capture complex associations between features from different subspaces. The outputs of each head are concatenated and mapped through a linear layer to form a feature representation that contains multi-dimensional semantic associations.
[0073] Following the multi-head self-attention mechanism, a feedforward neural network is used to perform nonlinear transformations on the features to further enhance the model's expressive power. This feedforward neural network consists of two linear transformation layers. The first linear layer increases the input feature dimension to a higher dimension (e.g., 4×d_model). A ReLU activation function then introduces nonlinearity, enabling the model to learn complex interactions between features. The second linear layer then restores the dimension to the original input dimension (d_model) to ensure consistent feature representation. This process deeply integrates the feature correlation information captured by the self-attention mechanism through nonlinear transformations, generating more discriminative feature representations.
[0074] To stabilize the model training process and accelerate convergence, layer normalization is required after both the multi-head self-attention mechanism and the feedforward neural network. Layer normalization normalizes the feature dimensions of each sample, calculating the mean and variance of each feature dimension and normalizing the feature values to a distribution with a mean of 0 and a variance of 1. This prevents vanishing or exploding gradients and improves the stability of model training. Specifically, layer normalization is performed on both the self-attention output and the feedforward neural network output to ensure consistent distribution of input data across all layers.
[0075] After the above processing, the feature combination vector generation stage begins. At this point, the refined set of input tongue local visual feature vectors has modeled the semantic associations between features through a multi-head self-attention mechanism, implemented nonlinear transformations through a feedforward neural network, and ensured data stability through layer normalization. The final output feature vector is the tongue visual feature combination vector. This vector is no longer an isolated list of local features, but rather contains global correlation information about features in different regions of the tongue, such as the collaborative pathological indications of ecchymosis at the tip of the tongue and cracks at the root of the tongue, and the physical correlation between the thickness of the tongue coating and the fatness of the tongue body. It can comprehensively reflect the overall characteristics of the tongue image and provide high-fidelity input data for the subsequent knowledge base-based reasoning engine.
[0076] In summary, step 4 is clearly explained. It first captures the local hierarchical features of the tongue to focus on microtexture features such as the density of lingual papillae and the granularity of the coating. It then dynamically selects a subset of features with significant discriminative power through individual-group feature selection. These selected local features are then correlated and fused to form a comprehensive feature with pathological differentiation. This feature extraction paradigm effectively preserves the details of tongue biomarkers while eliminating pseudo-feature interference caused by image acquisition flaws. This provides a high-fidelity data foundation for subsequent inference engines to identify physical constitutions and generate health recommendations.
[0077] In step 5, the tongue visual features are input into a knowledge-based inference engine to generate personalized health recommendations. It should be understood that tongue visual features, obtained by processing and analyzing tongue images, reflect the user's physical condition. However, these features alone cannot be directly translated into specific health recommendations. The knowledge-based inference engine, however, stores a wealth of Traditional Chinese Medicine (TCM) knowledge, health management expertise, and relevant empirical rules. Inputting tongue visual features into the inference engine combines the specific data extracted from the image with existing knowledge, effectively integrating knowledge and data and enabling the generation of informed health recommendations. Specifically, the inference engine possesses powerful reasoning capabilities, enabling it to search, match, and infer information within the knowledge base based on input tongue visual features. For example, it can infer potential health issues and risks based on characteristics such as tongue color and tongue coating thickness, combined with TCM descriptions of different constitutions and health conditions. This knowledge-based and logical inference process provides a scientific and rational basis for generating health recommendations, rather than simply relying on image features.
[0078] In particular, step 5 can be implemented in the following specific manner: First, when the visual features of the tongue are input into the inference engine, the TCM knowledge base preset within the inference engine immediately activates the analysis mechanism. This knowledge base encompasses the classical theories of TCM, the experience of doctors throughout the ages, and the research results of modern medicine on tongue images, constructing a complex network of associations between tongue image features and human health status. For example, when the visual features of the tongue show a red tongue with little coating, the inference engine can infer that the user has a constitution prone to Yin deficiency and hyperactivity of fire based on the Yin deficiency syndrome differentiation rules in the knowledge base; if the tongue is fat, has tooth marks on the edges, and has a greasy white coating, it indicates a constitution prone to spleen deficiency and dampness. The inference engine analyzes tongue features in multiple dimensions, including tongue color, tongue coating thickness and color, tongue shape (such as cracks, tooth marks), sublingual veins, etc., and combines it with TCM viscera differentiation and Qi, blood, and body fluid theory to accurately judge the user's potential health risks and physical constitution. This judgment is not a simple correspondence of a single feature, but a comprehensive consideration of the relationship between various features. For example, when yellow and greasy tongue coating and red tongue appear together, it is more inclined to the judgment of internal dampness and heat, which reflects the holistic dialectical thinking of TCM.
[0079] After completing the health status analysis, the inference engine retrieves and matches the corresponding personalized suggestions from the health knowledge base based on the conclusions. The health knowledge base is a systematically organized collection of suggestions. It is guided by the idea of preventing illness before it occurs in traditional Chinese medicine, and combines different constitutions and health conditions to form a multi-level and multi-dimensional intervention plan. In terms of dietary adjustment, for the constitution of Yin deficiency and hyperactivity of fire, the knowledge base will recommend ingredients with the effect of nourishing Yin and reducing fire, such as Tremella, lily, snow pear, etc. The characteristics of these ingredients are consistent with the conditioning needs of the constitution of Yin deficiency and hyperactivity of fire. At the same time, it is clearly recommended to reduce the intake of spicy and warm foods (such as peppers and mutton) to avoid further depletion of Yin fluid. For users with spleen deficiency and dampness, the knowledge base will retrieve ingredients that strengthen the spleen and eliminate dampness, such as yam, coix seed, poria, etc., and at the same time remind them to avoid raw, cold and greasy foods to prevent aggravating the state of spleen deficiency and dampness. In terms of lifestyle habits, those with Yin deficiency and excessive fire are recommended to use gentle exercises and relaxation methods, such as Ba Duan Jin (Eight-Section Brocade) and meditation, to avoid strenuous exercise that can further deplete Yin fluid. Those with spleen deficiency and dampness are advised to maintain a regular work and rest schedule and engage in exercises like jogging and Tai Chi to strengthen the spleen and stomach. Regarding emotional regulation, the knowledge base addresses the irritability and anxiety that can often accompany Yin deficiency and excessive fire, with methods like listening to light music and reading available for meditation. For the fatigue and low mood that can accompany spleen deficiency and dampness, increased social activities and exposure to nature are recommended to improve mood. Simple acupoint massage recommendations also require precise targeting. For example, those with Yin deficiency and excessive fire can massage Taixi and Yongquan acupoints to nourish Yin and reduce fire, while those with spleen deficiency and dampness can massage Zusanli and Yinlingquan acupoints to strengthen the spleen and eliminate dampness. Each acupoint is selected based on Traditional Chinese Medicine meridian theory to ensure the scientific and effective nature of the massage recommendations.
[0080] Finally, natural language generation technology is used to convert these professional and systematic health recommendations into text that is easy for users to understand. Natural language generation technology will popularize the professional terms in the knowledge base and organize the language structure to make it conform to daily expression habits. For example, when the inference result is "liver depression and qi stagnation", the system will not directly use professional terms to express it, but will convert it into "Your current physical condition shows that you may be prone to irritability, depression, etc. in terms of mood, which is related to the liver's function of dispersing qi. In terms of diet, you can appropriately increase the intake of ingredients such as Buddha's hand and rose that have the effect of soothing the liver and regulating qi; in life, it is recommended to maintain a certain amount of outdoor activities every day, such as walking or mountain climbing, which can help soothe emotions and regulate qi; you can also try massaging Taichong acupoint for 3-5 minutes each time to help relieve liver depression."
[0081] In step 6, the personalized health advice is displayed on the software interface. In particular, the software interface is an important window for users to interact with the system. The generated personalized health advice needs to be presented to the user through a visual interface so that the user can easily obtain and view this information. Displaying the advice on the software interface can achieve effective communication between the system and the user, so that the user can understand the health guidance given by the system after analyzing the tongue image. It is an indispensable part of the entire personalized health advice generation system based on image processing. By displaying personalized health advice on the software interface, users can directly view the health guidance for their physical condition on the interface without performing additional operations or searches. This enables users to quickly and conveniently obtain useful information, keep abreast of their health status and the health measures they need to take, and improve the efficiency of users' health management.
[0082] In summary, the image processing-based personalized health advice generation method according to the embodiment of the present application is explained. It first responds to the user's shooting request and guides the user to collect tongue image data. Then, the collected image data is evaluated for quality. If the quality is unqualified, it is re-collected. If it is qualified, subsequent processing is continued. Then, the qualified tongue image data is pre-processed and standardized to obtain standardized image data. Subsequently, the tongue visual features are extracted from the standardized image and input into the knowledge base-based reasoning engine to generate personalized health advice. Finally, the generated health advice is presented to the user through the software interface. In this way, the accuracy of image feature extraction and physical constitution analysis can be ensured, which is conducive to improving the individual adaptability of health advice.
[0083] Figure 6 This is a system block diagram of a personalized health advice generation system based on image processing according to an embodiment of the present application. Figure 6 As shown, according to an embodiment of the present application, the personalized health advice generation system 100 based on image processing includes: an image acquisition module 110, which is used to guide the user to collect tongue image data in response to receiving a user-initiated shooting request to obtain user tongue image data; an image quality assessment module 120, which is used to perform image quality assessment on the user tongue image data. If the image quality is unqualified, it returns to the image acquisition module; if the image quality is qualified, it enters the image standardization processing module; an image standardization processing module 130, which is used to preprocess and standardize the user tongue image data to obtain standardized tongue image data; an image analysis module 140, which is used to extract tongue visual features from the standardized tongue image data; a health advice generation module 150, which is used to input the tongue visual features into a knowledge base-based reasoning engine to obtain personalized health advice; and a health advice generation module 160, which is used to display the personalized health advice on a software interface.
[0084] Here, those skilled in the art will appreciate that the specific functions and operations of the various units and modules in the above-mentioned personalized health advice generation system 100 based on image processing have been described in detail in the above-mentioned reference. Figures 1 to 5 The description of the personalized health advice generation method based on image processing has been introduced in detail, and therefore, its repeated description will be omitted.
[0085] In summary, the image processing-based personalized health advice generation system 100 according to the embodiment of the present application is illustrated. It first responds to the user's shooting request and guides the user to collect tongue image data. Then, the collected image data is evaluated for quality. If the quality is unqualified, it is re-collected. If it is qualified, subsequent processing is continued. Then, the qualified tongue image data is pre-processed and standardized to obtain standardized image data. Subsequently, the tongue visual features are extracted from the standardized image and input into the knowledge base-based reasoning engine to generate personalized health advice. Finally, the generated health advice is presented to the user through the software interface. In this way, the accuracy of image feature extraction and physical constitution analysis can be ensured, which is conducive to improving the individual adaptability of health advice.
Claims
1. A method for generating personalized health advice based on image processing, characterized in that: include: Step 1: In response to receiving a user request to start shooting, guiding the user to capture tongue image data to obtain user tongue image data; Step 2: Perform image quality evaluation on the user's tongue image data. If the image quality is unqualified, return to step 1; if the image quality is qualified, proceed to step 3; Step 3: preprocessing and normalizing the user's tongue image data to obtain normalized tongue image data; Step 4: extracting tongue visual features from the standardized tongue image data, including: performing local visual feature encoding on the standardized tongue image data to obtain a set of tongue local visual feature vectors; performing individual-group feature selection on the set of tongue local visual feature vectors to obtain a refined set of tongue local visual feature vectors; and performing feature combination on the refined set of tongue local visual feature vectors to obtain a tongue visual feature combination vector as the tongue visual feature; Step 5: Input the tongue visual features into a knowledge base-based reasoning engine to obtain personalized health recommendations; Step 6: Display the personalized health advice on the software interface.
2. The method for generating personalized health advice based on image processing according to claim 1, characterized in that: The step 1 comprises: providing a real-time view frame having a superimposed tongue extension position frame; Real-time detection of ambient light intensity and uniformity, and based on the light detection results, determining whether to prompt the user to adjust the light; Detect image clarity in real time and determine whether to prompt the user to maintain stability based on the image clarity detection result; The system detects the shooting distance and angle in real time and determines whether to prompt the user to adjust the shooting distance and angle based on the detection results.
3. The method for generating personalized health advice based on image processing according to claim 2, characterized in that: The preprocessing and normalization include: color correction, illumination normalization, region segmentation, image enhancement and size normalization.
4. The method for generating personalized health advice based on image processing according to claim 3, characterized in that: Performing local visual feature encoding on the standardized tongue image data to obtain a set of tongue local visual feature vectors includes: Performing tongue local visual feature extraction based on a convolutional neural network model on the standardized tongue image data to obtain a set of tongue local visual feature maps; Feature flattening is performed on each tongue local visual feature map in the set of tongue local visual feature maps to obtain the set of tongue local visual feature vectors.
5. The method for generating personalized health advice based on image processing according to claim 1, characterized in that: Performing individual-group feature selection on the set of tongue local visual feature vectors to obtain a refined set of tongue local visual feature vectors, including: Calculating a tongue visual group distribution semantic map of the set of tongue local visual feature vectors; Extracting the i-th tongue local visual feature vector from the set of tongue local visual feature vectors as the tongue local visual individual feature vector; Based on the tongue visual group distribution semantic map, the tongue local visual individual feature vector is modulated and incrementally driven by pruning to determine whether to delete the i-th tongue local visual feature vector.
6. The method for generating personalized health advice based on image processing according to claim 5, characterized in that: Based on the tongue visual group distribution semantic map, performing modulation and incremental-driven pruning processing on the tongue local visual individual feature vector to determine whether to delete the i-th tongue local visual feature vector, including: Mapping the tongue local vision individual feature vector to the feature space of the tongue vision group distribution semantic map to obtain the tongue local vision individual modulation feature vector; Calculating a tongue local vision individual semantic increment operator of the tongue local vision individual modulation feature vector relative to the set of tongue local vision feature vectors; Based on the comparison between the tongue local visual individual semantic increment operator and a preset threshold, it is determined whether to delete the i-th tongue local visual feature vector.
7. The method for generating personalized health advice based on image processing according to claim 6, characterized in that: Calculating a tongue local vision individual semantic increment operator of the tongue local vision individual modulation feature vector relative to a set of tongue local vision feature vectors, comprising: performing group semantic association scale-invariant optimization on the tongue local visual individual modulation feature vector to obtain the tongue local visual individual optimized modulation feature vector; Based on the set of tongue local visual feature vectors, a group-referenced individual semantic energy ratio calculation is performed on the tongue local visual individual optimized modulation feature vector to obtain the tongue local visual individual semantic increment operator.
8. The method for generating personalized health advice based on image processing according to claim 7, characterized in that: Performing feature combination on the refined set of the tongue local visual feature vectors to obtain the tongue visual feature combination vector, including: performing transformer-based feature combination on the refined set of the tongue local visual feature vectors to obtain the tongue visual feature combination vector.
9. A personalized health advice generation system based on image processing, characterized in that: include: an image acquisition module, configured to, in response to receiving a user's request to initiate shooting, guide the user to acquire tongue image data to obtain user tongue image data; An image quality assessment module is used to perform image quality assessment on the user's tongue image data. If the image quality is unqualified, the process returns to the image acquisition module. If the image quality is qualified, the process enters the image standardization processing module. an image standardization processing module, configured to preprocess and standardize the user's tongue image data to obtain standardized tongue image data; an image analysis module for extracting tongue visual features from the standardized tongue image data, wherein the image analysis module comprises: a tongue visual feature encoding unit for performing local visual feature encoding on the standardized tongue image data to obtain a set of tongue local visual feature vectors; a tongue visual feature selection unit for performing individual-group feature selection on the set of tongue local visual feature vectors to obtain a refined set of tongue local visual feature vectors; and a tongue visual feature combination unit for performing feature combination on the refined set of tongue local visual feature vectors to obtain a tongue visual feature combination vector as the tongue visual feature; a health advice generation module, configured to input the tongue visual features into a knowledge base-based reasoning engine to obtain personalized health advice; The health advice display module is used to display the personalized health advice on the software interface.
10. The personalized health advice generation system based on image processing according to claim 9, characterized in that: The tongue visual feature encoding unit includes: a tongue local visual feature extraction subunit, configured to perform tongue local visual feature extraction based on a convolutional neural network model on the standardized tongue image data to obtain a set of tongue local visual feature maps; The tongue local visual feature flattening subunit is used to perform feature flattening on each tongue local visual feature map in the set of tongue local visual feature maps to obtain the set of tongue local visual feature vectors.
Citation Information
Cited By
Industrial production quality detection method and system based on stepping visual detection
CN121236049A
AI health analysis method and system based on tongue image and pulse wave and related equipment
CN121730769A