A method and system for generating personalized treatment plans based on AI-based consultation
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-23
- Publication Date
- 2026-08-11
AI Technical Summary
微信小程序因便捷性、高覆盖率成为中医数字化服务的优选载体,现有相关产品多聚焦单一功能,如腧穴查询、图像识别定位或中医科普,尚未形成“AI问诊-精准识别-个性化调理的服务体系,难以满足用户对便捷化、精准化中医健康服务的需求
本发明提供的一种基于AI问诊的个性化调理方案生成方法及系统,通过AI问诊采集个体健康数据,结合体质辨证生成个性化方案,适配不同用户的健康诉求,实用性更强,使调理方案更精准;基于微信小程序生态,支持快速登录与拍照上传,简化了操作流程,普通用户无需专业知识即可上手,降低了中医服务使用门槛。
Smart Images

Figure CN122552102A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of healthcare information technology, and in particular to a method and system for generating personalized treatment plans based on AI-based consultation. Background Technology
[0002] The digitalization and intelligentization of Traditional Chinese Medicine (TCM) has become a development trend. Acupoint therapy, as a core component of traditional Chinese medicine, has significant value in regulating health and assisting in diagnosis and treatment. However, the difficulty in identifying acupoints and the lack of personalized treatment plans hinder its widespread adoption. WeChat mini-programs, due to their convenience and high coverage, have become the preferred platform for digital TCM services. Existing related products mostly focus on single functions, such as acupoint query, image recognition and positioning, or TCM popular science, and have not yet formed a comprehensive service system of "AI consultation - accurate identification - personalized treatment," making it difficult to meet users' needs for convenient and precise TCM health services.
[0003] Existing technical solution: A traditional Chinese medicine acupoint query mini-program. This mini-program's core function is acupoint database query. Its usage steps are as follows: First, the user launches the mini-program and enters the core query interface. They submit the name of the target acupoint through the input box, or select the corresponding area by clicking on a body part diagram to initiate an acupoint query request. Then, the mini-program matches the user's query command with its built-in acupoint database, retrieving standardized text and image information corresponding to the acupoint, including precise location descriptions, core effects, and basic indications. Next, for versions supporting illustration functionality, users can click to view a dedicated illustration of the acupoint, browsing its specific distribution on the body through zooming and dragging. However, the illustration is only statically displayed and lacks interactive guidance. Finally, the mini-program outputs general conditioning suggestions based on the query results. These suggestions are generated based on the general effects of acupoints and do not incorporate the user's individual health information. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method and system for generating personalized conditioning plans based on AI consultation. By collecting individual health data through AI consultation and combining it with constitution differentiation, personalized plans are generated to suit the health needs of different users, making them more practical and more accurate.
[0005] This invention is achieved through the following technical solution: A method for generating personalized treatment plans based on AI-based medical consultation includes the following steps: S1: Collect partial images of the human body through WeChat mini program, compress and optimize the collected partial images of the human body, and collect user information in the form of structured questions and answers through the moxibustion sandbox module by AI assistant; S2: The image preprocessing module performs denoising, grayscale conversion, contour extraction and normalization on the acquired local human images to obtain preprocessed local human images; S3: Construct a TCM-DT-AM model based on a high-resolution neural network framework, which deeply integrates the feature enhancement capabilities of adversarial autoencoders and multi-dimensional attention mechanisms; S4: Based on high-resolution neural networks, adversarial autoencoders and multi-dimensional attention mechanisms, a three-level localization system of posture perception, feature enhancement and precise focusing is constructed. Combined with the collected user information, the head acupoints are precisely located in the preprocessed local human images to obtain a precise head acupoint recognition image. S5: Construct a semantic support system for TCM. Based on the Word2Vec model, use TCM classic literature and clinical medical records as training data to pre-train the core terms in the TCM semantic support system and generate semantic vectors for TCM terms. Based on the generated semantic vectors for TCM terms, the collected user information is processed through three levels of analysis: semantic parsing, feature deepening, and precise extraction to obtain a structured health feature dataset. S6: Construct and optimize a TCM constitution differentiation rule base containing a four-tuple structure of indicator ID - weight value - association condition - constitution type. Traverse the TCM constitution differentiation rule base, integrate the accurate recognition images of head acupoints with the structured health feature dataset to perform rule matching and personalized constitution feature extraction, and generate personalized conditioning plans.
[0006] Furthermore, the method for constructing the three-level localization system of pose awareness-feature enhancement-precise focusing in step S4 is as follows: S411: The pre-trained high-resolution neural network is called to extract multi-scale features in parallel from the pre-processed local human images. Then, the extracted multi-scale features are fused using a cross-scale feature interaction mechanism to generate feature maps that enhance key skeletal nodes. Based on the high-dimensional feature maps of the enhanced key skeletal nodes, the key skeletal nodes of the head are located using a human posture perception algorithm. A standardized three-dimensional skeletal node coordinate system for the head is established, and the three-dimensional coordinates of all key skeletal nodes of the head are output to complete the construction of the posture perception and localization system. S412: Based on the adversarial autoencoder network, the high-dimensional feature map of the key skeletal nodes is reduced and compressed by the convolutional layer, and then fused with the semantic vector of TCM acupoints across modalities to generate a low-dimensional feature map with fused semantic information. The low-dimensional feature map with fused semantic information is then reconstructed by the deconvolutional layer to generate a reconstructed high-dimensional feature map. The reconstructed high-dimensional feature map is then compared with the feature map of the key skeletal nodes pixel by pixel or channel by channel to generate an AEE-enhanced feature map. At the same time, a three-level pseudo-label of skeleton-contour-texture is generated and the three-level pseudo-label is added to the training set, thereby completing the construction of the feature enhancement and localization system. S413: Based on the established standardized 3D head skeleton node coordinate system, a Gaussian kernel function is used to dynamically weight the spatial dimension of the AEE-enhanced feature map, generating a spatial weight map. The spatial weight map is then multiplied pixel-by-pixel with the AEE-enhanced feature map to obtain a spatial focusing feature map. The correlation between the feature channels of the labeled data in the training set and acupoint location is statistically analyzed. The correlation vector is input into the Sigmoid activation function to calculate the adaptive weight of each channel, generating a channel weight map. The channel weight map is then multiplied channel-by-channel with the spatial focusing feature map to obtain a dual-dimensional focusing feature map of space and channel. The semantic knowledge base of traditional Chinese medicine acupoints is called to convert the user's physical discomfort information collected by the AI assistant in the form of structured question answering into semantic vectors. The semantic vectors and the dual-dimensional focusing feature map of space and channel are then multiplied by a dot product to obtain the final multi-dimensional focusing feature map, thereby completing the construction of a precise focusing positioning system.
[0007] Furthermore, in step S4, the collected user information is used to accurately locate acupoints on the head in the preprocessed local human body image, resulting in the following method for accurately identifying acupoints on the head: S421: Calculate the global mean for each channel of the final multidimensional focused feature map, and compress the final multidimensional focused feature map into a one-dimensional 128-dimensional feature vector; S422: Calculate the cosine similarity between the one-dimensional 128-dimensional feature vector and the standard feature template of acupoints in the FAcupoint dataset. Filter out head acupoints in the one-dimensional 128-dimensional feature vector with similarity less than a set threshold, and output head acupoints with similarity greater than or equal to the set threshold to the candidate head acupoint list, thus completing the accurate localization of head acupoints and obtaining an accurate head acupoint recognition image.
[0008] Furthermore, the method for constructing a semantic support system specifically for Traditional Chinese Medicine in step 5 is as follows: S511: Integrate core terms from classic literature and clinical diagnosis and treatment guidelines, classify and collect terms related to TCM symptoms, signs, etiology and pathogenesis, and complete the construction of a dedicated TCM consultation terminology database; S512: Construct a semantic knowledge graph of traditional Chinese medicine with symptoms-signs-etiology-pathogenesis-constitution as the core association dimensions; S513: Construct a node layer containing symptom nodes, sign nodes, and etiology nodes, with each node associated with the standardized coding and clinical frequency of the corresponding term. S514: Construct a relation layer that includes relational types such as symptom-sign association and symptom-pathogenesis mapping.
[0009] Furthermore, the method for semantic parsing the collected user information in step S5 is as follows: S521: Based on the Word2Vec model, using classical Chinese medicine literature and clinical medical record corpora as training data, the terminology in the Chinese medicine consultation-specific lexicon is pre-trained to generate 128-dimensional semantic vectors. S522: Preprocess the collected user information, remove meaningless characters, filter duplicate expressions, and retain the detailed descriptions added by the user to obtain the preprocessed user information. S523: Customized word segmentation is performed using the jieba word segmentation tool combined with a TCM consultation-specific thesaurus, prioritizing the matching of TCM-specific terms with preprocessed user information; S524: Standardize and map the colloquial and ambiguous issues in the preprocessed user information using a hybrid rule and statistical model; S525: Match the TCM-specific terminology and the standardized mapping of user information to the rule base. Use the matched information as the standard terminology in the structured representation of user information. Calculate the semantic similarity between the unmatched information and the terminology in the TCM consultation terminology database. Compare the calculated semantic similarity with a preset threshold. If the semantic similarity is greater than or equal to the preset threshold, the unmatched information is used as candidate information in the structured representation of user information. Then, combine the candidate information in the structured representation of user information with clinical frequency statistics to determine the structured representation of user information. If the semantic similarity is less than the preset threshold, it is marked as a term to be manually reviewed and will not proceed to the next step. S526: Extract keywords and convert numerical values from the preprocessed user information to obtain symptom severity information, generate a final structured expression containing standard terms and symptom severity, and complete the semantic parsing of user information.
[0010] Furthermore, the method for feature enhancement of the collected user information in step S5 is as follows: S531: Match the final structured representation with the pre-trained semantic vectors of TCM-specific terms, then calculate the semantic similarity between the matched semantic vectors and the relevant nodes in the knowledge graph, and compare the semantic similarity with a preset threshold. If the semantic similarity is greater than or equal to the preset threshold, then the semantic vector is taken as a highly correlated pathogenesis; S532: Further combine the highly correlated pathogenesis with the TCM syndrome differentiation logic to obtain an optimized highly correlated pathogenesis; S533: Based on the semantic knowledge graph of traditional Chinese medicine, optimize the combination and synergistic relationship of highly correlated pathogenesis in the horizontal identification of symptoms and signs, and determine the horizontally correlated pathogenesis. S534: Based on the horizontal correlation pathogenesis, trace the potential causes and pathogenesis corresponding to the symptoms to generate the vertical correlation pathogenesis; S535: The vertically related pathogenesis is input into the BERT model for encoding. The BERT model captures contextual semantic information through a bidirectional attention mechanism and combines pre-trained semantic vectors of TCM-specific terms to generate semantically enhanced feature vectors that combine general semantics and TCM-specific semantics.
[0011] Furthermore, the method for accurately extracting the collected user information in step S5 is as follows: S541: Based on the TCM constitution classification theory, the semantic enhancement feature vector is divided into multiple dimensions. Core features are selected in each dimension, and irrelevant features are removed. S542: The selected core features are transformed into standardized structured data, and the standardized structured data is compared with the TCM semantic knowledge graph to accurately extract structured features. If there are missing features, the AI assistant will initiate supplementary consultations to the user in the form of structured questions and answers through the moxibustion sandbox module, and the supplementary consultations will be compensated into the structured features to form a complete structured health feature dataset.
[0012] Furthermore, the method for constructing and optimizing the TCM constitution differentiation rule base containing a four-tuple structure of indicator ID-weight value-association condition-constitution type in step S6 is as follows: S611: Based on the "Classification and Judgment Standards of Traditional Chinese Medicine Constitution", core diagnostic indicators are defined for each type of basic constitution, and rules for the association of core diagnostic indicators are formulated. S612: Quantify and assign values to the association rules of core diagnostic indicators, transforming qualitative descriptions into structured data; S613: The association rules of core diagnostic indicators are uniformly encoded into a four-tuple structure of indicator ID-weight value-association condition-constitution type and stored in the database to form a TCM constitution differentiation rule library. S614: Collect clinical cases of cooperation with TCM clinics and user feedback on treatment effects, calculate the rule matching accuracy rate, and compare the rule matching accuracy rate with the set threshold. If the rule matching accuracy rate is lower than the set threshold, the weight will be reduced or replaced.
[0013] Furthermore, in step S6, the method for integrating the accurately identified head acupoint images with the structured health feature dataset for rule matching and personalized constitution feature extraction to generate a personalized conditioning plan is as follows: S621: Traverse the TCM constitution differentiation rule base, perform rule matching on the structured health feature dataset and the head acupoint accurate recognition image, mark the core rules and related rules that are successfully matched, and calculate the rule matching score for each type of constitution; S622: Based on the constitution type with the highest rule matching score, determine the priority of the decision tree root node partitioning, prioritize the constitution features corresponding to the core indicators in the TCM constitution differentiation rule base, and select secondary core features based on the association rules of the constitution features to form a rule-driven initial branch structure. S623: Through the TCM feature-constitution association attention module, based on the feature weights in the TCM constitution differentiation rule base and the statistical results of clinical data, the initial feature importance score of all features in the structured health feature dataset is calculated, and the feature importance score is corrected by combining the accurate recognition image of head acupoints, forming a comprehensive importance ranking of consultation features and acupoint features. Based on the comprehensive importance ranking, the initial branch structure of the decision tree is weighted and adjusted to obtain the adjusted branch structure and features. S624: Using a structured health feature dataset as training data, and the adjusted branch structure and features as input, train the TCM-DT-AM model. Use 5-fold cross-validation to evaluate the performance of the TCM-DT-AM model, and calculate the body constitution determination accuracy and confusion matrix. Based on the body constitution determination accuracy and confusion matrix, determine whether the accuracy of the TCM-DT-AM model meets the standard. If the accuracy meets the standard, maintain the existing model rules unchanged. If the accuracy does not meet the standard, first identify which body constitutions and which symptoms caused the misjudgment, supplement the corresponding rules, adjust the symptom weights, add misjudged cases and new symptoms to the training data, and retrain the TCM-DT-AM model until the accuracy meets the standard. S625: Generates personalized treatment plans and outputs structured interpretation reports, which are synchronized to the WeChat mini-program interface.
[0014] A personalized treatment plan generation system based on AI consultation is used to execute a personalized treatment plan generation method based on AI consultation as described in any one of the above, which includes an information acquisition module, a preprocessing module, a TCM-DT-AM model construction module, a three-level positioning system construction module of posture perception-feature enhancement-precise focusing, a three-level parsing construction module of semantic parsing-feature deepening-precise extraction, and a personalized treatment plan generation module. The information collection module collects partial images of the human body through a WeChat mini program, compresses and optimizes the collected partial images, and collects user information in a structured question-and-answer format through the acupuncture sandbox module by an AI assistant. The preprocessing module is used to perform noise reduction, grayscale conversion, contour extraction and normalization on the acquired local human images to obtain preprocessed local human images. The TCM-DT-AM model building module is used to build a TCM-DT-AM model based on a high-resolution neural network framework, which deeply integrates the feature enhancement capabilities of adversarial autoencoders and multi-dimensional attention mechanisms. The three-level positioning system construction module of posture perception-feature enhancement-precision focusing is based on high-resolution neural network, adversarial autoencoder and multi-dimensional attention mechanism to construct the three-level positioning system of posture perception-feature enhancement-precision focusing. Combined with the collected user information, the preprocessed human body local image is used to accurately locate the head acupoints to obtain the head acupoint accurate recognition image. The semantic parsing-feature deepening-precise extraction three-level parsing construction module is used to construct a semantic support system for traditional Chinese medicine. Based on the Word2Vec model, it uses classic TCM literature and clinical medical records as training data to pre-train the core terms in the TCM-specific semantic support system, generating semantic vectors of TCM-specific terms. Based on the generated semantic vectors of TCM-specific terms, the collected user information is parsed through the three-level parsing of semantic parsing-feature deepening-precise extraction to obtain a structured health feature dataset. The personalized conditioning plan generation module is used to construct and optimize a TCM constitution differentiation rule library containing a four-tuple structure of indicator ID - weight value - association condition - constitution type. It traverses the TCM constitution differentiation rule library, integrates the accurate recognition images of head acupoints with the structured health feature dataset to perform rule matching and personalized constitution feature extraction, and generates a personalized conditioning plan.
[0015] Beneficial effects of the invention: This invention provides a method and system for generating personalized treatment plans based on AI consultation. It collects individual health data through AI consultation and combines it with constitution differentiation to generate personalized plans that are adapted to the health needs of different users, making them more practical and accurate. Based on the WeChat mini-program ecosystem, it supports quick login and photo upload, simplifying the operation process. Ordinary users can get started without professional knowledge, thus lowering the threshold for using traditional Chinese medicine services. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the process of this invention. Detailed Implementation
[0017] A method for generating personalized treatment plans based on AI-based consultation, the flowchart of which is shown below. Figure 1 As shown, it includes the following steps: S1: Collect partial images of the human body through WeChat mini program, compress and optimize the collected partial images of the human body, and collect user information in the form of structured questions and answers through the moxibustion sandbox module by AI assistant; Specifically, the collected partial images of the human body include images of the hands, face, and tongue, and the collected user information includes the user's age, gender, physical characteristics, physical discomfort, diet and lifestyle habits, and health needs.
[0018] Employing WeChat's authorization login mechanism, users can quickly complete identity verification using their WeChat profile picture and nickname, without additional registration. The app accesses the phone's camera via a WeChat mini-program, supporting real-time shooting or uploading of partial human images (such as hands, face, and tongue) from the album. Images are automatically compressed and optimized before uploading, maintaining a preset resolution to balance recognition accuracy and transmission efficiency.
[0019] S2: The image preprocessing module performs denoising, grayscale conversion, contour extraction and normalization on the acquired local human images to obtain preprocessed local human images; During noise reduction, Gaussian filtering algorithms can be used to eliminate interference noise such as light reflection and background clutter shadows, while preserving key features such as skin texture and bone contour.
[0020] Grayscale conversion can convert a color image into an 8-bit grayscale image, simplifying the data dimensions, highlighting local contours and texture differences, and reducing the computational complexity of the algorithm. Contour extraction can separate the target region from the background using the Canny edge detection algorithm, clearly defining the recognition range and eliminating non-regional interference.
[0021] The preprocessed images are normalized (pixel values are mapped to the [0,1] interval), and the corresponding attribute labels such as gender and age (from the three-level classification information of the dataset) are read simultaneously as auxiliary features for subsequent algorithm optimization.
[0022] S3: Construct a TCM-DT-AM model based on a high-resolution neural network framework, which deeply integrates the feature enhancement capabilities of adversarial autoencoders and multi-dimensional attention mechanisms.
[0023] S4: Based on high-resolution neural networks, adversarial autoencoders and multi-dimensional attention mechanisms, a three-level localization system of posture perception, feature enhancement and precise focusing is constructed. Combined with the collected user information, the head acupoints are precisely located in the preprocessed local human images to obtain a precise head acupoint recognition image. Specifically, the method for constructing a three-level localization system of posture awareness, feature enhancement, and precise focusing is as follows: S411: The pre-trained high-resolution neural network (HRNet) is called to extract multi-scale features in parallel from the pre-processed local human images. Then, the extracted multi-scale features are fused using a cross-scale feature interaction mechanism to generate feature maps that enhance key skeletal nodes. Based on the high-dimensional feature maps of the enhanced key skeletal nodes, the human posture perception algorithm is used to locate key head skeletal nodes, establish a standardized three-dimensional head skeletal node coordinate system, and output the three-dimensional coordinates of all key head skeletal nodes to complete the construction of the posture perception and localization system. When performing parallel extraction of multi-scale features, the four branches of the TCM-DT-AM model can be used to extract feature maps at resolutions of 1 / 4, 1 / 8, 1 / 16, and 1 / 32 of the local image, respectively, to fully preserve the head structure information at different scales (e.g., 1 / 4 resolution preserves local contour details, 1 / 32 resolution preserves local structural features). The low-resolution high-semantic features of 1 / 32 and 1 / 16 (reflecting the abstract information of acupoint and meridian association) are fused pixel by pixel with the high-resolution detail features of 1 / 8 and 1 / 4 (reflecting the concrete information of bone and skin texture).
[0024] When performing feature fusion using a cross-scale feature interaction mechanism on the extracted multi-scale features, the low-resolution high-semantic features (reflecting the abstract information of acupoint meridian association) of 1 / 32 and 1 / 16 are fused with the high-resolution detail features (reflecting the concrete information of bone and skin texture) of 1 / 8 and 1 / 4 on a pixel-by-pixel basis to generate feature maps that enhance key skeletal nodes. The feature maps that enhance key skeletal nodes have both global structure and local details, providing support for subsequent skeletal node localization.
[0025] Based on the high-dimensional feature map of enhanced key skeletal nodes, the human posture perception algorithm is used to locate key skeletal nodes of the head and establish a standardized three-dimensional skeletal node coordinate system of the head. The human posture perception algorithm can locate 12 key skeletal nodes of the head. The coordinate system is established with the eyebrow point as the origin, the horizontal direction as the X-axis (left-right symmetry), the vertical direction as the Y-axis (up-down extension), and the vertical plane of the head as the Z-axis.
[0026] Specifically, based on the traditional Chinese medicine bone measurement method, quantitative correlation rules can be established between 12 key skeletal nodes of the head and 35 acupoints of the head (e.g., "Baihui acupoint is located on the midline of the top of the head, at the midpoint between the anterior and posterior hairlines, corresponding to the midpoint of the line connecting the vertex of the head and the occipital protuberance"). These rules can then be transformed into calculable geometric constraint formulas, such as: Baihui acupoint X coordinate = vertex of the head X coordinate, Y coordinate = (vertex of the head Y coordinate + occipital protuberance Y coordinate) / 2, Z coordinate = vertex of the head Z coordinate). Then, head shape adaptive adjustment is performed: the user's head shape attribute tags (such as round head, long head) can be combined to introduce an adaptive offset coefficient into the geometric constraint formula (such as the offset coefficient of 1.05 for the Baihui acupoint Y coordinate for users with long heads). Theoretical coordinate range output: Through the above geometric constraints and head shape adaptive adjustment, the theoretical coordinate range of each candidate acupoint on the head is output, with an error allowable of ±3mm, which defines the core area for subsequent feature enhancement and precise focusing.
[0027] S412: Based on an adversarial autoencoder network, a high-dimensional feature map of key skeletal nodes is compressed by a convolutional layer and then fused with the semantic vector of acupoints in traditional Chinese medicine across modalities to generate a low-dimensional feature map with fused semantic information. The low-dimensional feature map with fused semantic information is then reconstructed by a deconvolutional layer to generate a reconstructed high-dimensional feature map. The reconstructed high-dimensional feature map is then compared pixel-wise or channel-wise with the feature map of key skeletal nodes to generate an AEE-enhanced feature map. Simultaneously, a three-level pseudo-label of skeleton-contour-texture is generated and added to the training set, thereby completing the construction of the feature enhancement and localization system.
[0028] Because the feature maps of key skeletal nodes extracted by pre-trained high-resolution neural networks are high-dimensional, informationally redundant, and only contain visual details (bones, textures, contours), lacking the professional semantic information of TCM acupoints, the TCM-DT-AM model tends to focus only on "looks alike," ignoring the physiological location and functional meaning of acupoints, leading to recognition errors. Therefore, feature enhancement processing is needed to reduce computational load while retaining core location information. Furthermore, TCM acupoint semantic vectors (from an acupoint knowledge base, containing textual information such as "location description, affiliated meridian, and physiological function") are introduced. Through cross-modal fusion (such as concatenation and attention weighting), visual features and semantic features can be bound, allowing the TCM-DT-AM model to simultaneously "understand the image and comprehend the semantics." The aim is to enhance the TCM semantic relevance of features while preserving key visual information of acupoint location, avoiding misidentification of acupoints by the TCM-DT-AM model due to visual similarity, and improving the interpretability and recognition stability of features.
[0029] Furthermore, due to the significant differences in human postures in real-world scenarios (standing, lying on one's side, bending over, etc.) and individual body shapes (height, weight, and build), the features of the original enhanced key skeletal nodes extracted by the pre-trained HRNet are easily affected by posture, resulting in poor generalization of the TCM-DT-AM model, which fails to accurately identify acupoints when the posture changes. Therefore, a discriminator is needed to distinguish between "initial features extracted by HRNet" and "reconstructed features generated by AAE." The encoder can generate reconstructed features, and by minimizing the adversarial loss function, the feature representation is continuously optimized, making it impossible for the discriminator to distinguish between "initial features" and "reconstructed features." This forces the encoder to learn posture-independent core features, weakening the influence of posture, body shape, and other interfering factors. The goal is to improve the adaptability of the TCM-DT-AM model to different postures and individuals, enabling it to stably extract core acupoint features even in complex scenarios, thus enhancing generalization.
[0030] Because encoding compression combined with adversarial training may cause features to deviate from the core objective of "acupoint localization" and even introduce irrelevant elements, directly using them for localization can easily lead to feature distortion and inaccurate localization. Therefore, this step reconstructs low-dimensional features that incorporate semantic information into high-dimensional feature maps through deconvolution layers, restoring visual details. A feature consistency constraint loss function is introduced, and the reconstructed high-dimensional feature map is compared pixel-by-pixel / channel-by-channel with the original enhanced key skeletal node feature map extracted by the pre-trained HRNet. This forces the reconstructed features to maintain consistency with the initial features in the core information of acupoint localization. The goal is to ensure that the reconstructed features retain semantic information and generalization ability while staying true to the core objective of acupoint localization, eliminating feature distortion caused by individual differences and pose variations, and ensuring localization accuracy.
[0031] Due to the limited sample size and high annotation cost of TCM acupoint localization datasets, the TCM-DT-AM model is prone to overfitting and cannot cover sufficient scenarios and individual differences. This paper addresses this issue by outputting AEE-enhanced feature maps (high-quality features integrating visual details, TCM semantics, and generalization ability, used for final acupoint localization) and simultaneously generating three levels of pseudo-labels: "skeleton (annotating the skeletal nodes corresponding to the acupoint), contour (annotating the contour of the body region where the acupoint is located), and texture (annotating the skin texture features around the acupoint)." These pseudo-labels are then added to the training set to expand data diversity. The aim is to improve the adaptability of the TCM-DT-AM model to different scenarios and individuals with limited samples, alleviate overfitting, and further optimize the accuracy and robustness of acupoint localization. S413: Based on the established standardized 3D head skeleton node coordinate system, a Gaussian kernel function is used to dynamically weight the spatial dimension of the AEE-enhanced feature map, generating a spatial weight map. The spatial weight map is then multiplied pixel-by-pixel with the AEE-enhanced feature map to obtain a spatial focusing feature map. The correlation between the feature channels of the labeled data in the training set and acupoint location is statistically analyzed. The correlation vector is input into the Sigmoid activation function to calculate the adaptive weight of each channel, generating a channel weight map. The channel weight map is then multiplied channel-by-channel with the spatial focusing feature map to obtain a dual-dimensional focusing feature map of space and channel. The semantic knowledge base of traditional Chinese medicine acupoints is called to convert the user's physical discomfort information collected by the AI assistant in the form of structured question answering into semantic vectors. The semantic vectors and the dual-dimensional focusing feature map of space and channel are then multiplied by a dot product to obtain the final multi-dimensional focusing feature map, thereby completing the construction of a precise focusing positioning system.
[0032] Spatial weighting is applied to the AAE-enhanced feature map. Using 12 key skeletal nodes of the head as anchor points, 35 high-incidence areas of acupoints on the head are delineated. A Gaussian kernel function is then used to dynamically generate a spatial weight map from the feature map. Specifically, pixels in high-incidence acupoint areas are assigned high weight values (0.8-1.0) to strengthen the feature response of core regions; irrelevant areas such as hair and cheeks (non-acupoint areas) are assigned low weights (0.1-0.3) to suppress background interference.
[0033] Specifically, the correlation between the feature channels of the data and the acupoint location can be taken as follows: the correlation coefficient of the "meridian direction channel" is 0.92, and the correlation coefficient of the "skin texture noise channel" is 0.15.
[0034] When performing dot product operations, if a pixel corresponds to the "temple" region, its weight vector value can be set to 0.9. In the semantic vector of "headache," the dimension value of "temple" is 0.9, so the dot product score is 0.81 (high match), and the weight of this region is strengthened. If it corresponds to the "Yongquan acupoint" region, the weight vector value is 0.05, the semantic vector value is 0.02, and the dot product score is 0.001 (low match). In the end, the weight of the high-match region is strengthened, and the weight of the low-match region is weakened. The resulting multi-dimensional focused feature map achieves the targeted focusing of "whatever disease the user wants to treat, the TCM-DT-AM model will prioritize looking at that acupoint."
[0035] Furthermore, in step S4, the collected user information is used to accurately locate acupoints on the head in the preprocessed local human body image, resulting in the following method for accurately identifying acupoints on the head: S421: Calculate the global mean for each channel of the final multidimensional focused feature map, and compress the final multidimensional focused feature map into a one-dimensional 128-dimensional feature vector; The compressed one-dimensional 128-dimensional feature vector integrates three types of core information: structural features: geometric parameters of the three-dimensional skeletal nodes of the head, visual structural information such as the contour / texture of acupoint areas; acupoint semantic features: TCM semantic association information that matches the user's health needs (such as the semantic weights of Baihui and Taiyang acupoints corresponding to "headache"); and individual attribute features: personalized features such as the user's gender and age (such as the differences in acupoint features between elderly women and young men), ensuring that the vector has both universality and individual adaptability.
[0036] S422: Calculate the cosine similarity between the one-dimensional 128-dimensional feature vector and the standard feature template of acupoints in the FAcupoint dataset. Filter out head acupoints in the one-dimensional 128-dimensional feature vector with similarity less than a set threshold, and output head acupoints with similarity greater than or equal to the set threshold to the candidate head acupoint list, thus completing the accurate localization of head acupoints and obtaining an accurate head acupoint recognition image.
[0037] The cosine similarity value ranges from [0,1], with higher values indicating stronger feature matching. The similarity threshold can be preferably set to 0.75 to filter out non-target acupoints with similarity <0.75, retaining only candidate acupoints with high matching. The candidate acupoint list is output, which includes acupoint name, standard coordinates, and similarity score.
[0038] The core design breakthrough of this invention lies in maintaining a high-resolution feature flow throughout the entire process: in the initial stage, four resolution branches (1 / 4, 1 / 8, 1 / 16, and 1 / 32) are started in parallel, with the 1 / 4 branch, which has the highest resolution, always retained to avoid the loss of key details during downsampling; each branch, through a cross-scale feature interaction mechanism, fuses the high semantic features (such as the overall skeletal structure of the head) of the 1 / 32 and 1 / 16 low-resolution branches with the detailed features (such as the texture of the acupoints behind the ear and between the eyebrows) of the 1 / 8 and 1 / 4 high-resolution branches pixel by pixel, forming a feature map that combines "global structure + local details", perfectly matching the recognition logic of acupoints, which "relies on both skeletal positioning (global) and skin texture (local)".
[0039] HRNet cross-scale feature fusion adapts to multiple head poses and individual differences: the low-resolution branches (1 / 16, 1 / 32) focus on extracting large-scale semantic features such as head skeletal contours and facial feature positioning points, providing the geometric constraints required for acupoints according to the "bone measurement method" (e.g., Baihui acupoint is located on the midline of the top of the head, relying on the top contour features); the high-resolution branches (1 / 4, 1 / 8) focus on extracting small-scale detailed features such as skin texture and blood vessel distribution around acupoints, compensating for the appearance variations of acupoints caused by individual differences (e.g., the skin texture density at acupoints differs between young and old people); the features of each branch interact and fuse in real time, enabling the TCM-DT-AM model to adapt to global localization of different poses and head shapes through large-scale features, and to capture the unique details of individual acupoints through small-scale features, greatly improving generalization ability and ensuring that the TCM-DT-AM model can stably recognize diverse samples.
[0040] The integration of feature extraction and posture perception reduces error propagation and is compatible with the positioning logic of the "bone measurement method" in traditional Chinese medicine. It provides high-quality basic features for subsequent AAE feature enhancement and AM feature focusing, forming the core support of the three-level positioning system of "posture perception-feature enhancement-precise matching". It is a key technology choice for achieving breakthroughs in head acupoint recognition.
[0041] S5: Construct a semantic support system specifically for Traditional Chinese Medicine (TCM). Based on the Word2Vec model, use classic TCM literature and clinical medical records as training data to pre-train the core terms in the TCM-specific semantic support system, generating semantic vectors for TCM-specific terms. Based on the generated semantic vectors for TCM-specific terms, the collected user information is processed through a three-level analysis process of semantic parsing, feature deepening, and precise extraction to obtain a structured health feature dataset.
[0042] Specifically, the method for constructing a semantic support system specifically for Traditional Chinese Medicine is as follows: S511: Integrate core terms from classic literature and clinical diagnosis and treatment guidelines, classify and collect terms related to TCM symptoms, signs, etiology and pathogenesis, and complete the construction of a dedicated TCM consultation terminology database; Classical texts include *Traditional Chinese Medicine Diagnostics*, *Huangdi Neijing*, and *Treatise on Febrile and Miscellaneous Diseases*. The collection includes terms related to TCM symptoms (such as "lower back and knee weakness" and "dry mouth and tongue"), signs (such as "thick and greasy tongue coating" and "wiry and rapid pulse"), etiologies (such as "external wind-cold" and "emotional imbalance"), and pathogenesis (such as "deficiency of qi and blood" and "internal accumulation of phlegm and dampness"). A total of ≥5000 core terms are included, each associated with a three-dimensional attribute of "term definition - clinical scenario - syndrome differentiation" (e.g., "loose stools" is defined as "thin and unformed stools," the scenario is "digestive system consultation," and the syndrome differentiation is "spleen deficiency and dampness accumulation").
[0043] S512: Construct a semantic knowledge graph of traditional Chinese medicine with symptoms-signs-etiology-pathogenesis-constitution as the core association dimensions; S513: Construct a node layer containing symptom nodes (such as "insomnia"), sign nodes (such as "red tongue with little coating"), and etiology nodes (such as "yin deficiency and fire excess"), and associate each node with the standardized coding and clinical frequency of the corresponding term. S514: Construct a relation layer that includes relational types such as symptom-sign association and symptom-pathogenesis mapping.
[0044] (For example, there is a strong correlation between "insomnia" and "red tongue with little coating"), and "symptom-pathogenesis mapping" (such as "dizziness" mapping to multiple pathogenesis such as "liver yang hyperactivity" and "qi and blood deficiency"), which provides logical support for semantic analysis.
[0045] Specifically, the method for semantic parsing the collected user information is as follows: S521: Based on the Word2Vec model, using classic TCM literature and clinical medical records as training data, the terminology in the TCM consultation-specific lexicon is pre-trained to generate 128-dimensional semantic vectors. This allows TCM-related terms (such as "tidal fever" and "night sweats") to exhibit high similarity in the vector space, laying the foundation for subsequent semantic similarity calculations.
[0046] S522: Preprocess the collected user information, remove meaningless characters (such as punctuation marks and interjections), filter duplicate expressions (such as simplifying "frequent insomnia, unable to sleep every day" to "frequent insomnia"), and retain the detailed descriptions added by the user (such as the duration and sleep duration information in "insomnia for 3 months, only sleeping 2-3 hours per night") to obtain the preprocessed user information; S523: Customized word segmentation is performed using the jieba word segmentation tool combined with a TCM consultation-specific thesaurus, prioritizing the matching of TCM-specific terms with preprocessed user information; For example, "Recently I've been feeling soreness in my lower back and knees, and dry mouth" can be broken down into "Recently / I always feel / soreness in my lower back and knees / dry mouth" to avoid common word segmentation tools mis-segmenting TCM terms (such as "pulse wiry and rapid" should not be broken down into "pulse / wiry / rapid"). S524: Standardize and map the colloquial and ambiguous issues in the preprocessed user information using a hybrid rule and statistical model; S525: Match the user information to the rule base after matching TCM-specific terms and standardized mapping. Use the matched information as the standard terms in the structured expression of user information (e.g., map "sweating a lot at night" to "night sweats", "stool sticky to the toilet" to "loose and sticky stool"). Calculate the semantic similarity between the unmatched information and the terms in the TCM consultation-specific terminology database. Compare the calculated semantic similarity with a preset threshold. If the semantic similarity is greater than or equal to the preset threshold, the unmatched information is used as candidate information in the structured expression of user information. Then, combine the candidate information in the structured expression of user information with clinical frequency statistics to determine the structured expression of user information (e.g., map "heaviness in the body" to "feeling heaviness in the limbs"). If the semantic similarity is less than the preset threshold, it is marked as a term awaiting manual review and will not proceed to the next step. S526: Extract keywords (such as "occasionally", "frequently", "lasting for 3 months") and convert them into numerical values ("occasionally" = level 1, "frequently" = level 2, "lasting ≥ 1 month" = level 3) from the preprocessed user information to obtain symptom severity information, generate a final structured expression containing standard terms and symptom severity (such as "insomnia level 3, lasting for 3 months"), and complete the semantic parsing of user information.
[0047] Furthermore, the method for feature enhancement of the collected user information in step S5 is as follows: S531: Match the final structured representation with the pre-trained semantic vectors of TCM-specific terms, then calculate the semantic similarity between the matched semantic vectors and the relevant nodes in the knowledge graph, and compare the semantic similarity with a preset threshold. If the semantic similarity is greater than or equal to the preset threshold, then the semantic vector is regarded as a highly associated pathogenesis. Specifically, the cosine similarity method can be used to calculate semantic similarity.
[0048] For example, if a user describes "dizziness and tinnitus", the semantic similarity between "dizziness" and "liver yang hyperactivity" and "qi and blood deficiency" is calculated, and the semantic similarity between "tinnitus" and "kidney yin deficiency" and "liver fire excess" is calculated to screen out highly associated pathogenesis (e.g., the similarity between "liver yang hyperactivity" and "kidney yin deficiency" is 0.92, and the similarity between "kidney yin deficiency" and "liver fire excess" is 0.88).
[0049] Semantic vectors with semantic similarity less than a preset threshold are considered to be non-highly correlated pathologies and are directly discarded, not participating in subsequent semantic enhancement. The preset threshold here can preferably be 0.85.
[0050] S532: Further integrate highly correlated pathogenesis with the logic of TCM syndrome differentiation to obtain optimized highly correlated pathogenesis; (e.g., "dizziness and tinnitus + red tongue with little coating" is preferentially associated with "kidney yin deficiency"), optimize similarity calculation rules, and avoid misjudging "dizziness" as ordinary head discomfort.
[0051] S533: Based on the semantic knowledge graph of traditional Chinese medicine, the synergistic relationship between the combination of symptoms and signs is identified by optimizing the horizontal identification of highly correlated pathogenesis, and the horizontal correlation pathogenesis is determined. Through the horizontal correlation pathogenesis, the synergistic relationship between symptoms / signs that occur at the same time can be identified (such as "lower back and knee weakness + aversion to cold and cold limbs" associating with "kidney yang deficiency").
[0052] S534: Based on the horizontal correlation pathogenesis, trace the potential causes and pathogenesis corresponding to the symptoms to generate the vertical correlation pathogenesis; it can trace the potential causes and pathogenesis corresponding to the symptoms (such as "poor appetite and abdominal distension" is associated with "spleen deficiency", and further associated with "phlegm and dampness accumulation"), generating the "symptom-sign-pathogenesis" association chain, enriching the feature dimensions.
[0053] S535: The vertically related pathogenesis is input into the BERT model for encoding. The BERT model captures contextual semantic information (such as the semantic difference between "dry mouth but no desire to drink water" and "dry mouth and desire to drink water") through a bidirectional attention mechanism. Combined with pre-trained semantic vectors of TCM-specific terms, it generates semantically enhanced feature vectors that combine general semantics and TCM-specific semantics.
[0054] The generated semantically enhanced feature vector is a 256-dimensional feature vector that combines general semantics and TCM professional semantics, realizing the deep expression of features, i.e. feature deepening.
[0055] Furthermore, the method for accurately extracting the collected user information in step S5 is as follows: S541: Based on the TCM constitution classification theory, the semantic enhancement feature vector is divided into multiple dimensions. Core features are selected in each dimension, and irrelevant features are removed. Based on the theory of TCM constitution classification, the extracted features can be divided into six dimensions, including "mental state", "digestive system", "respiratory system" and "constitution characteristics". Core features are selected under each dimension (such as retaining key expressions such as "poor appetite and abdominal distension" and "loose stools" in the digestive system dimension) and irrelevant features are removed (such as non-health-related information such as "busy at work" mentioned by users).
[0056] S542: The selected core features are transformed into standardized structured data, and the standardized structured data is compared with the TCM semantic knowledge graph to accurately extract structured features. If there are missing features, the AI assistant initiates a supplementary consultation with the user in the form of structured questions and answers through the moxibustion sandbox module, and the supplementary consultation is added to the structured features to form a complete structured health feature dataset, thereby completing the accurate extraction of user information.
[0057] The format of standardized structured data is "feature dimension - standard terminology - severity - associated pathogenesis".
[0058] For example: Mental state: Insomnia (level 3, lasting for 3 months) - Related pathogenesis: Yin deficiency with fire excess, deficiency of both heart and spleen; Digestive system: Poor appetite and abdominal distension (Grade 2, frequent) - Related pathogenesis: Spleen deficiency and qi stagnation.
[0059] S6: Construct and optimize a TCM constitution differentiation rule base containing a four-tuple structure of indicator ID - weight value - association condition - constitution type. Traverse the TCM constitution differentiation rule base, integrate the accurate recognition images of head acupoints with the structured health feature dataset to perform rule matching and personalized constitution feature extraction, and generate personalized conditioning plans.
[0060] Specifically, the method for constructing and optimizing a TCM constitution differentiation rule base containing a four-tuple structure of indicator ID-weight value-association condition-constitution type is as follows: S611: Based on the "Classification and Judgment Standards of Traditional Chinese Medicine Constitution", core diagnostic indicators are defined for each type of basic constitution, and rules for the association of core diagnostic indicators are formulated. Specifically, the basic constitutions include eight types: balanced constitution, yang deficiency constitution, yin deficiency constitution, qi deficiency constitution, phlegm-dampness constitution, damp-heat constitution, blood stasis constitution, and qi stagnation constitution. Each basic constitution can be defined with 3-5 core diagnostic indicators (such as the core indicators for phlegm-dampness constitution: loose stools, white and greasy tongue coating, heaviness in the limbs, abdominal distension, and sticky mouth). The core diagnostic indicators must simultaneously meet the dual conditions of "supported by traditional Chinese medicine theory + high frequency of clinical occurrence". Indicator association rules are formulated (such as when "loose stools + white and greasy tongue coating + heaviness in the limbs" occur simultaneously, the weight of phlegm-dampness constitution is increased by 50%).
[0061] S612: Quantify and assign values to the association rules of core diagnostic indicators, transforming qualitative descriptions into structured data; Core diagnostic indicators can be assigned a basic weight between 1.0 and 2.0 points according to their importance. For example, "white and greasy tongue coating" has a basic weight of 1.8 points for phlegm-dampness constitution. Association rules are assigned gain weights of 0.3-0.8 points based on the strength of synergy. For example, "loose stools + limb weakness" has a synergy gain of 0.6 points.
[0062] S613: The association rules of the core diagnostic indicators are uniformly encoded into a four-tuple structure of indicator ID-weight value-association condition-constitution type and stored in the database to form a TCM constitution differentiation rule library; (e.g. "T001-1.8 - None - Phlegm-Dampness Constitution" "R012-0.6-T001&T003 - Phlegm-Dampness Constitution").
[0063] S614: Collect clinical cases of cooperation with TCM clinics and user feedback on treatment effects, calculate the rule matching accuracy rate, and compare the rule matching accuracy rate with the set threshold. If the rule matching accuracy rate is lower than the set threshold, the weight will be reduced or replaced.
[0064] The threshold for rule matching accuracy can be preferably set at 60%. Rules with a matching accuracy of less than 60% will have their weight reduced or replaced (e.g., if the "abdominal fullness" feature of users in a certain region has a low correlation with phlegm-dampness constitution, the weight can be adjusted from 1.5 points to 1.0 points). For high-frequency effective rules (e.g., "sticky mouth" has an accuracy of 85% in damp-heat constitution), the weight will be increased and correlation conditions will be added to ensure that the TCM constitution differentiation rule library is adapted to actual clinical needs.
[0065] Furthermore, in step S6, the method for integrating the accurately identified head acupoint images with the structured health feature dataset for rule matching and personalized constitution feature extraction to generate a personalized conditioning plan is as follows: S621: Traverse the TCM constitution differentiation rule base, perform rule matching on the structured health feature dataset and the head acupoint accurate recognition image, mark the core rule that is successfully matched (e.g., if a user has both "loose stools" and "white and greasy tongue coating", mark the core rule of phlegm-dampness constitution as successfully matched) and related rules, and calculate the rule matching score for each constitution type; the rule matching score is the sum of the core rule score and the related rule gain score.
[0066] The core rule score can be determined as follows: First, based on the "Classification and Judgment of Traditional Chinese Medicine Constitutions" standard and combined with the experience of clinical TCM experts, basic weight values are preset for the core diagnostic indicators of each constitution and stored in the TCM constitution differentiation rule library of the system.
[0067] For example, for the phlegm-dampness constitution, the basic weight value of the core indicator "white and greasy tongue coating" is preset to 1.8 points, "loose stool" is preset to 1.6 points, and "heaviness in the limbs" is preset to 1.4 points.
[0068] During the user consultation process, the system traverses the rule base, matching the user's structured health characteristics with the core indicators of each body type. For each matched core indicator, its corresponding base weight value is added to the core indicator score for that body type. The calculation formula is as follows: Core indicator score = Σ(base weight value corresponding to the hit core indicator).
[0069] The association rule gain score can be determined as follows: First, based on clinical case data, symptom combinations with synergistic diagnostic value under different constitution types are statistically extracted, and a synergistic gain weight value is preset for each combination. The weight value is determined by statistically analyzing the co-occurrence frequency of two or more symptoms appearing simultaneously in the clinical database. For every 10% increase in co-occurrence frequency, the gain weight increases by 0.1; finally, the gain weight value is set in the range of 0.3-0.8. All association rules and their gain weights are also stored in the rule base, and each rule is encoded as a triple structure of "symptom combination - gain weight - applicable constitution".
[0070] For example, for a phlegm-dampness constitution, if a user simultaneously experiences both "loose stools" and "heaviness in the limbs," the system determines that the association rule has been matched, and the synergistic gain weight of this combination is preset to 0.6 points.
[0071] During the user consultation process, the system identifies symptom combinations that appear simultaneously in the user's characteristics. For each matching association rule, the gain weight value corresponding to that rule is added to the association rule gain score for that type of constitution. The calculation formula is as follows: Association rule gain score = Σ(gain weight value corresponding to the hit association rule).
[0072] S622: Based on the constitution type with the highest rule matching score, determine the priority of the decision tree root node partitioning, prioritize the constitution features corresponding to the core indicators in the TCM constitution differentiation rule base, and select secondary core features based on the association rules of the constitution features to form a rule-driven initial branch structure. If a user's phlegm-dampness constitution rule score is 3.2, which is higher than other constitutions, the root node of the decision tree will prioritize dividing around the phlegm-dampness constitution-related features, rather than relying solely on the feature with the greatest information gain, to ensure that the initial branches of the decision tree conform to the TCM diagnostic logic.
[0073] S623: Through the TCM feature-constitution association attention module, based on the feature weights in the TCM constitution differentiation rule base and the statistical results of clinical data, the initial feature importance score of all features in the structured health feature dataset is calculated, and the feature importance score is corrected by combining the accurate recognition image of head acupoints, forming a comprehensive importance ranking of consultation features and acupoint features. Based on the comprehensive importance ranking, the initial branch structure of the decision tree is weighted and adjusted to obtain the adjusted branch structure and features. The initial importance score calculation logic is based on "feature contribution rate × rule base base weight". Example (white, greasy tongue coating + phlegm-dampness constitution): It is known that "white and greasy tongue coating" contributes 78% to the phlegm-dampness constitution (clinical statistics, i.e. the proportion of users with this feature who can be accurately identified). Its basic weight in the rule base is 1.8 points, and the initial importance score is ≈1.8×78%≈1.40 points (the specific score can be fine-tuned based on clinical cases, the core is "the higher the contribution rate and the higher the basic weight, the higher the score").
[0074] When adjusting the feature importance score by combining the correlation of acupoint features on the head, for example, users with Yang deficiency often have the feature response of "poor blood circulation at Baihui acupoint", and the feature importance score of this acupoint is increased by 0.4 points.
[0075] When adjusting the initial branch structure of the decision tree based on the comprehensive importance ranking, key features (importance score ≥ 1.5, such as "fear of cold" for Yang deficiency constitution) are given high weight and given priority in node splitting. The branch purity threshold is also reduced (e.g., the information gain threshold is adjusted from 0.3 to 0.25) to ensure that key features dominate the branch direction. Secondary features (importance score 0.5-1.0, such as "occasionally stay up late") are given regular weights, while noisy features (importance score <0.5, such as "occasionally eat spicy food") are given low weights and are used only as supplementary conditions or directly filtered when dividing nodes. For features with uneven data distribution (such as a small sample size of "blood stasis constitution"), the weight of its core features (such as "limb tingling") is increased through an attention mechanism to compensate for the branching bias caused by insufficient data, so that the decision tree branching structure can both conform to the rule logic and adapt to the characteristics of data distribution.
[0076] S624: Using a structured health feature dataset as training data, and the adjusted branch structure and features as input, train the TCM-DT-AM model. Use 5-fold cross-validation to evaluate the performance of the TCM-DT-AM model, and calculate the body constitution determination accuracy and confusion matrix. Based on the body constitution determination accuracy and confusion matrix, determine whether the accuracy of the TCM-DT-AM model meets the standard. If the accuracy meets the standard, maintain the existing model rules unchanged. If the accuracy does not meet the standard, first identify which body constitutions and which symptoms caused the misjudgment, supplement the corresponding rules, adjust the symptom weights, add misjudged cases and new symptoms to the training data, and retrain the model until the accuracy meets the standard.
[0077] Specifically, the accuracy of the body constitution assessment can be calculated using the following formula: Accuracy rate of physical constitution assessment = Number of cases with correct physical constitution assessment ÷ Total number of cases × 100%; The confusion matrix can be constructed using the following method: rows represent the true constitution, columns represent the predicted constitution, and cells record the number of misjudgments or correct judgments for the corresponding constitution.
[0078] When performing constitution differentiation on a user, the system outputs the preliminary constitution type (e.g., "phlegm-dampness constitution"), records the user's characteristic combination and the differentiation result, and synchronizes it to the clinical feedback database. Based on the feedback database data each quarter, the model is retrained: if the differentiation accuracy of a certain constitution type decreases (e.g., damp-heat constitution from 82% to 75%), it is analyzed whether new symptom features (e.g., "long-term exposure to air conditioning") have not been included in the rule base, and the corresponding rules are added and the decision tree branch structure is adjusted.
[0079] This system can use a three-level accuracy assessment standard to quantitatively evaluate the performance of the TCM-DT-AM model: Overall accuracy assessment: The overall accuracy of the TCM-DT-AM model is calculated using 5-fold cross-validation. If the overall accuracy is ≥ 85%, the basic performance of the TCM-DT-AM model is considered satisfactory; if it is ≥ 90%, it is considered excellent; if it is < 80%, it is considered unsatisfactory and feature engineering or TCM-DT-AM model structure needs to be re-performed.
[0080] Average recall determination: Calculate the average recall of the 8 body types. If the average recall is ≥ 80%, the TCM-DT-AM model is considered to have achieved balanced recognition of each body type; if the recall of a certain body type is < 60%, the body type is considered a "difficult-to-identify body type", and targeted supplementation of training samples or optimization of its feature weights is required.
[0081] Confusion matrix analysis: Generate an 8×8 confusion matrix and focus on monitoring the following two types of false positives: Misclassification rate of related constitutions: Calculate the misclassification rate between similar constitutions in traditional Chinese medicine theory (such as Qi deficiency constitution and Yang deficiency constitution). If the rate is <15%, it is considered acceptable; if it is ≥15%, a distinguishing rule needs to be added (such as adding "whether it is accompanied by spontaneous sweating" as a characteristic for judging Qi deficiency constitution).
[0082] False positive rate for body types: Calculate the proportion of false positives between body types with opposite characteristics (such as Yin deficiency and Yang deficiency). If this proportion is ≥ 5%, it is considered a serious deviation, and the feature weights and rule base logic need to be reviewed immediately.
[0083] Iterative optimization trigger conditions: If any of the above criteria are not met, the system automatically triggers the TCM-DT-AM model iteration mechanism: If the misclassification rate of associated physical constitution is ≥ 15%, perform optimization operations such as supplementing association rules or adjusting feature weights; If the recall rate of difficult cases is less than 60%, targeted supplementary clinical case data will be implemented. After the iteration is completed, the TCM-DT-AM model is retrained until all metrics meet the requirements.
[0084] S525: Generates personalized treatment plans and outputs structured interpretation reports, which are synchronized to the WeChat mini-program interface.
[0085] The final personalized treatment plan includes personalized treatment content such as acupoint therapy, dietary advice, lifestyle guidance, and auxiliary health preservation methods.
[0086] This invention collects individual health data through AI-powered consultation and combines it with constitution differentiation to generate personalized treatment plans that include acupoint therapy, dietary recommendations, lifestyle guidance, and auxiliary health maintenance methods. These plans can be tailored to the health needs of different users, making them more practical and precise. Based on the WeChat mini-program ecosystem, it supports quick login and photo upload, simplifying the operation process. Ordinary users can easily use it without professional knowledge, lowering the barrier to entry for TCM services and promoting the digitalization and popularization of TCM.
[0087] A personalized treatment plan generation system based on AI consultation is used to execute a personalized treatment plan generation method based on AI consultation as described in any one of the above, which includes an information acquisition module, a preprocessing module, a TCM-DT-AM model construction module, a three-level positioning system construction module of posture perception-feature enhancement-precise focusing, a three-level parsing construction module of semantic parsing-feature deepening-precise extraction, and a personalized treatment plan generation module. The information collection module collects partial images of the human body through a WeChat mini program, compresses and optimizes the collected partial images, and collects user information in a structured question-and-answer format through the acupuncture sandbox module by an AI assistant. The preprocessing module is used to perform noise reduction, grayscale conversion, contour extraction and normalization on the acquired local human images to obtain preprocessed local human images. The TCM-DT-AM model building module is used to build a TCM-DT-AM model based on a high-resolution neural network framework, which deeply integrates the feature enhancement capabilities of adversarial autoencoders and multi-dimensional attention mechanisms. The three-level positioning system construction module of posture perception-feature enhancement-precision focusing is based on high-resolution neural network, adversarial autoencoder and multi-dimensional attention mechanism to construct the three-level positioning system of posture perception-feature enhancement-precision focusing. Combined with the collected user information, the preprocessed human body local image is used to accurately locate the head acupoints to obtain the head acupoint accurate recognition image. The semantic parsing-feature deepening-precise extraction three-level parsing construction module is used to construct a semantic support system for traditional Chinese medicine. Based on the Word2Vec model, it uses classic TCM literature and clinical medical records as training data to pre-train the core terms in the TCM-specific semantic support system, generating semantic vectors of TCM-specific terms. Based on the generated semantic vectors of TCM-specific terms, the collected user information is parsed through the three-level parsing of semantic parsing-feature deepening-precise extraction to obtain a structured health feature dataset. The personalized conditioning plan generation module is used to construct and optimize a TCM constitution differentiation rule library containing a four-tuple structure of indicator ID - weight value - association condition - constitution type. It traverses the TCM constitution differentiation rule library, integrates the accurate recognition images of head acupoints with the structured health feature dataset to perform rule matching and personalized constitution feature extraction, and generates a personalized conditioning plan.
[0088] In summary, the present invention provides a method and system for generating personalized treatment plans based on AI consultation. By collecting individual health data through AI consultation and combining it with constitution differentiation, personalized plans can be generated, which can be adapted to the health needs of different users, making them more practical and the treatment plans more accurate. Based on the WeChat mini-program ecosystem, it supports quick login and photo upload, simplifying the operation process. Ordinary users can get started without professional knowledge, thus lowering the threshold for using traditional Chinese medicine services.
[0089] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. An AI-based inquiry-based personalized conditioning scheme generation method, characterized by: Includes the following steps: S1: Collect partial images of the human body through WeChat mini program, compress and optimize the collected partial images of the human body, and collect user information in the form of structured questions and answers through the moxibustion sandbox module by AI assistant; S2: Denoise, grayscale, contour extraction and normalization are performed on the acquired local human images to obtain preprocessed local human images; S3: Construct a TCM-DT-AM model based on a high-resolution neural network framework, which deeply integrates the feature enhancement capabilities of adversarial autoencoders and multi-dimensional attention mechanisms; S4: Based on high-resolution neural networks, adversarial autoencoders and multi-dimensional attention mechanisms, a three-level localization system of posture perception, feature enhancement and precise focusing is constructed. Combined with the collected user information, the head acupoints are precisely located in the preprocessed local human images to obtain a precise head acupoint recognition image. S5: Construct a semantic support system for TCM. Based on the Word2Vec model, use TCM classic literature and clinical medical records as training data to pre-train the core terms in the TCM semantic support system and generate semantic vectors for TCM terms. Based on the generated semantic vectors for TCM terms, the collected user information is processed through three levels of analysis: semantic parsing, feature deepening, and precise extraction to obtain a structured health feature dataset. S6: Construct and optimize a TCM constitution differentiation rule base containing a four-tuple structure of indicator ID - weight value - association condition - constitution type. Traverse the TCM constitution differentiation rule base, integrate the accurate recognition images of head acupoints with the structured health feature dataset to perform rule matching and personalized constitution feature extraction, and generate personalized conditioning plans.
2. The AI-based inquiry individualized conditioning scheme generation method according to claim 1, characterized in that: The method for constructing the three-level localization system of pose awareness-feature enhancement-precise focusing in step S4 is as follows: S411: The pre-trained high-resolution neural network is called to extract multi-scale features in parallel from the pre-processed local human images. Then, the extracted multi-scale features are fused using a cross-scale feature interaction mechanism to generate feature maps that enhance key skeletal nodes. Based on the high-dimensional feature maps of the enhanced key skeletal nodes, the key skeletal nodes of the head are located using a human posture perception algorithm. A standardized three-dimensional skeletal node coordinate system for the head is established, and the three-dimensional coordinates of all key skeletal nodes of the head are output to complete the construction of the posture perception and localization system. S412: Based on the adversarial autoencoder network, the high-dimensional feature map of the key skeletal nodes is reduced and compressed by the convolutional layer, and then fused with the semantic vector of TCM acupoints across modalities to generate a low-dimensional feature map with fused semantic information. The low-dimensional feature map with fused semantic information is then reconstructed by the deconvolutional layer to generate a reconstructed high-dimensional feature map. The reconstructed high-dimensional feature map is then compared with the feature map of the key skeletal nodes pixel by pixel or channel by channel to generate an AEE-enhanced feature map. At the same time, a three-level pseudo-label of skeleton-contour-texture is generated and the three-level pseudo-label is added to the training set, thereby completing the construction of the feature enhancement and localization system. S413: Based on the established standardized three-dimensional skeletal node coordinate system of the head, a Gaussian kernel function is used to dynamically weight the spatial dimension of the AEE-enhanced feature map, generating a spatial weight map. The spatial weight map is then multiplied pixel-by-pixel with the AEE-enhanced feature map to obtain a spatial focusing feature map. The correlation between the feature channels of the labeled data in the training set and the acupoint location is statistically analyzed. The correlation vector is input into the Sigmoid activation function to calculate the adaptive weight of each channel, generating a channel weight map. The channel weight map is then multiplied channel-by-channel with the spatial focusing feature map to obtain a dual-dimensional focusing feature map of space and channel. The semantic knowledge base of traditional Chinese medicine acupoints is called to convert the user's physical discomfort information collected by the AI assistant in the form of structured question answering into semantic vectors. The semantic vectors and the dual-dimensional focusing feature map of space and channel are then multiplied by a dot product to obtain the final multi-dimensional focusing feature map, thereby completing the construction of a precise focusing positioning system.
3. The method of claim 2, wherein the method is characterized by: In step S4, the collected user information is used to accurately locate acupoints on the head in the preprocessed local human body image, resulting in the following method for obtaining an image of accurately identified acupoints on the head: S421: Calculate the global mean for each channel of the final multidimensional focused feature map, and compress the final multidimensional focused feature map into a one-dimensional 128-dimensional feature vector; S422: Calculate the cosine similarity between the one-dimensional 128-dimensional feature vector and the standard feature template of acupoints in the FAcupoint dataset. Filter out head acupoints in the one-dimensional 128-dimensional feature vector with similarity less than a set threshold, and output head acupoints with similarity greater than or equal to the set threshold to the candidate head acupoint list, thus completing the accurate localization of head acupoints and obtaining an accurate head acupoint recognition image.
4. The method for generating a personalized treatment plan based on AI consultation according to claim 1, characterized in that: The method for constructing a semantic support system specifically for Traditional Chinese Medicine in step 5 is as follows: S511: Integrate core terms from classic literature and clinical diagnosis and treatment guidelines, classify and collect terms related to TCM symptoms, signs, etiology and pathogenesis, and complete the construction of a dedicated TCM consultation terminology database; S512: Construct a semantic knowledge graph of traditional Chinese medicine with symptoms-signs-etiology-pathogenesis-constitution as the core association dimensions; S513: Construct a node layer containing symptom nodes, sign nodes, and etiology nodes, with each node associated with the standardized coding and clinical frequency of the corresponding term. S514: Construct a relation layer that includes relational types such as symptom-sign association and symptom-pathogenesis mapping.
5. The AI-based inquiry individualized conditioning scheme generation method according to claim 4, characterized in that: The method for semantic parsing the collected user information in step S5 is as follows: S521: Based on the Word2Vec model, using classical Chinese medicine literature and clinical medical record corpora as training data, the terminology in the Chinese medicine consultation-specific lexicon is pre-trained to generate 128-dimensional semantic vectors. S522: Preprocess the collected user information, remove meaningless characters, filter duplicate expressions, and retain the detailed descriptions added by the user to obtain the preprocessed user information. S523: Customized word segmentation is performed using the jieba word segmentation tool combined with a TCM consultation-specific thesaurus, prioritizing the matching of TCM-specific terms with preprocessed user information; S524: Standardize and map the colloquial and ambiguous issues in the preprocessed user information using a hybrid rule and statistical model; S525: Match the TCM-specific terminology and the standardized mapping of user information to the rule base. Use the matched information as the standard terminology in the structured representation of user information. Calculate the semantic similarity between the unmatched information and the terminology in the TCM consultation terminology database. Compare the calculated semantic similarity with a preset threshold. If the semantic similarity is greater than or equal to the preset threshold, the unmatched information is used as candidate information in the structured representation of user information. Then, combine the candidate information in the structured representation of user information with clinical frequency statistics to determine the structured representation of user information. If the semantic similarity is less than the preset threshold, it is marked as a term to be manually reviewed and will not proceed to the next step. S526: Extract keywords and convert numerical values from the preprocessed user information to obtain symptom severity information, generate a final structured expression containing standard terms and symptom severity, and complete the semantic parsing of user information.
6. The AI-based inquiry individualized conditioning scheme generation method according to claim 5, characterized in that: The method for feature enhancement of the collected user information in step S5 is as follows: S531: Match the final structured representation with the pre-trained semantic vectors of TCM-specific terms, then calculate the semantic similarity between the matched semantic vectors and the relevant nodes in the knowledge graph, and compare the semantic similarity with a preset threshold. If the semantic similarity is greater than or equal to the preset threshold, then the semantic vector is regarded as a highly associated pathogenesis. S532: Further integrate highly correlated pathogenesis with the logic of TCM syndrome differentiation to obtain optimized highly correlated pathogenesis; S533: Based on the semantic knowledge graph of traditional Chinese medicine, optimize the combination and synergistic relationship of highly correlated pathogenesis in the horizontal identification of symptoms and signs, and determine the horizontally correlated pathogenesis. S534: Based on the horizontal correlation pathogenesis, trace the potential causes and pathogenesis corresponding to the symptoms to generate the vertical correlation pathogenesis; S535: The vertically related pathogenesis is input into the BERT model for encoding. The BERT model captures contextual semantic information through a bidirectional attention mechanism and combines pre-trained semantic vectors of TCM-specific terms to generate semantically enhanced feature vectors that combine general semantics and TCM-specific semantics.
7. The method of claim 6, wherein the method further comprises: determining a personalized conditioning regimen based on the AI diagnosis. The method for accurately extracting the collected user information in step S5 is as follows: S541: Based on the TCM constitution classification theory, the semantic enhancement feature vector is divided into multiple dimensions. Core features are selected in each dimension, and irrelevant features are removed. S542: The selected core features are transformed into standardized structured data, and the standardized structured data is compared with the TCM semantic knowledge graph to accurately extract structured features. If there are missing features, the AI assistant will initiate supplementary consultations to the user in the form of structured questions and answers through the moxibustion sandbox module, and the supplementary consultations will be compensated into the structured features to form a complete structured health feature dataset.
8. The AI-based inquiry individualized conditioning scheme generation method according to claim 7, characterized in that: The method for constructing and optimizing the TCM constitution differentiation rule base containing a four-tuple structure of indicator ID-weight value-association condition-constitution type in step S6 is as follows: S611: Based on the "Classification and Judgment Standards of Traditional Chinese Medicine Constitution", core diagnostic indicators are defined for each type of basic constitution, and rules for the association of core diagnostic indicators are formulated. S612: Quantify and assign values to the association rules of core diagnostic indicators, transforming qualitative descriptions into structured data; S613: The association rules of core diagnostic indicators are uniformly encoded into a four-tuple structure of indicator ID-weight value-association condition-constitution type and stored in the database to form a TCM constitution differentiation rule library. S614: Collect clinical cases of cooperation with TCM clinics and user feedback on treatment effects, calculate the rule matching accuracy rate, and compare the rule matching accuracy rate with the set threshold. If the rule matching accuracy rate is lower than the set threshold, the weight will be reduced or replaced.
9. The AI-based inquiry individualized conditioning scheme generation method according to claim 8, characterized in that: The method for generating a personalized treatment plan by integrating the accurately identified head acupoint images with the structured health feature dataset in step S6, performing rule matching and personalized constitution feature extraction, is as follows: S621: Traverse the TCM constitution differentiation rule base, perform rule matching on the structured health feature dataset and the head acupoint accurate recognition image, mark the core rules and related rules that are successfully matched, and calculate the rule matching score for each type of constitution; S622: Based on the constitution type with the highest rule matching score, determine the priority of the decision tree root node partitioning, prioritize the constitution features corresponding to the core indicators in the TCM constitution differentiation rule base, and select secondary core features based on the association rules of the constitution features to form a rule-driven initial branch structure. S623: Through the TCM feature-constitution association attention module, based on the feature weights in the TCM constitution differentiation rule base and the statistical results of clinical data, the initial feature importance score of all features in the structured health feature dataset is calculated, and the feature importance score is corrected by combining the accurate recognition image of head acupoints, forming a comprehensive importance ranking of consultation features and acupoint features. Based on the comprehensive importance ranking, the initial branch structure of the decision tree is weighted and adjusted to obtain the adjusted branch structure and features. S624: Using a structured health feature dataset as training data, and the adjusted branch structure and features as input, train the TCM-DT-AM model. Use 5-fold cross-validation to evaluate the performance of the TCM-DT-AM model, and calculate the body constitution determination accuracy and confusion matrix. Based on the body constitution determination accuracy and confusion matrix, determine whether the accuracy of the TCM-DT-AM model meets the standard. If the accuracy meets the standard, maintain the existing model rules unchanged. If the accuracy does not meet the standard, first identify which body constitutions and which symptoms caused the misjudgment, supplement the corresponding rules, adjust the symptom weights, add misjudged cases and new symptoms to the training data, and retrain the TCM-DT-AM model until the accuracy meets the standard. S625: Generates personalized treatment plans and outputs structured interpretation reports, which are synchronized to the WeChat mini-program interface.
10. An AI-based inquiry individualized conditioning scheme generation system for performing an AI-based inquiry individualized conditioning scheme generation method according to any one of claims 1 to 9. It includes an information acquisition module, a preprocessing module, a TCM-DT-AM model construction module, a three-level positioning system construction module for attitude perception, feature enhancement, and precise focusing, a three-level parsing construction module for semantic parsing, feature deepening, and precise extraction, and a personalized conditioning solution generation module; The information collection module collects partial images of the human body through a WeChat mini program, compresses and optimizes the collected partial images, and collects user information in a structured question-and-answer format through the acupuncture sandbox module by an AI assistant. The preprocessing module is used to perform noise reduction, grayscale conversion, contour extraction and normalization on the acquired local human images to obtain preprocessed local human images. The TCM-DT-AM model building module is used to build a TCM-DT-AM model based on a high-resolution neural network framework, which deeply integrates the feature enhancement capabilities of adversarial autoencoders and multi-dimensional attention mechanisms. The three-level positioning system construction module of posture perception-feature enhancement-precision focusing is based on high-resolution neural network, adversarial autoencoder and multi-dimensional attention mechanism to construct the three-level positioning system of posture perception-feature enhancement-precision focusing. Combined with the collected user information, the preprocessed human body local image is used to accurately locate the head acupoints to obtain the head acupoint accurate recognition image. The semantic parsing-feature deepening-precise extraction three-level parsing construction module is used to construct a semantic support system for traditional Chinese medicine. Based on the Word2Vec model, it uses classic TCM literature and clinical medical records as training data to pre-train the core terms in the TCM-specific semantic support system, generating semantic vectors of TCM-specific terms. Based on the generated semantic vectors of TCM-specific terms, the collected user information is parsed through the three-level parsing of semantic parsing-feature deepening-precise extraction to obtain a structured health feature dataset. The personalized conditioning plan generation module is used to construct and optimize a TCM constitution differentiation rule library containing a four-tuple structure of indicator ID - weight value - association condition - constitution type. It traverses the TCM constitution differentiation rule library, integrates the accurate recognition images of head acupoints with the structured health feature dataset to perform rule matching and personalized constitution feature extraction, and generates a personalized conditioning plan.