A method and device for predicting and analyzing health intervention factors based on eight-principle syndrome differentiation

By constructing a deep learning model and intervention factor library based on information from the four diagnostic methods of traditional Chinese medicine, the problem of insufficient personalization in health management based on the eight principles of syndrome differentiation was solved, and more accurate and complete analysis of health intervention factors was achieved.

CN122135992APending Publication Date: 2026-06-02BEIJING HUIYANG SCI & TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING HUIYANG SCI & TECH CO LTD
Filing Date
2026-03-18
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

The existing health intervention factor identification and management recommendations in the Eight-Principle Diagnosis Health Management system, which rely on human experience, suffer from insufficient personalization and inaccurate recommendations.

Method used

A deep learning model based on the four diagnostic methods of traditional Chinese medicine is constructed. Combined with an intervention factor library, the model is used to classify and predict cold and heat, deficiency and excess, exterior and interior, and yin and yang through the input of the four diagnostic vectors, and then generates a health intervention report.

Benefits of technology

It improves the personalized prediction level and analytical accuracy of health intervention factors, and provides more comprehensive health management recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122135992A_ABST
    Figure CN122135992A_ABST
Patent Text Reader

Abstract

This invention relates to a method and apparatus for predicting and analyzing health intervention factors based on the Eight Principles of Traditional Chinese Medicine (TCM) diagnostic methods. The method includes: constructing a deep learning model, denoted as the first prediction model, for predicting TCM interventions based on the four diagnostic methods of TCM; constructing a first dataset through volunteer data collection and expert group classification; training the first prediction model based on the first dataset; after model training, feeding the user-input four diagnostic vector X into the first prediction model for prediction, and performing health intervention factor analysis based on the model's output prediction vector Y and an intervention factor library to obtain a corresponding health intervention report, which is then fed back to the current user. This invention can improve the personalized prediction level of health intervention factors and enhance the accuracy and completeness of health intervention factor analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method and apparatus for predictive analysis of health intervention factors based on the Eight Principles of Diagnosis. Background Technology

[0002] The Eight Principles of Differentiation, a core tool in Traditional Chinese Medicine (TCM) for understanding the functional state of the human body, has been widely applied in the field of health promotion in recent years. By examining the four pairs of principles—cold / heat, deficiency / excess, exterior / interior, and yin / yang—health management suggestions such as dietary therapy can be provided to individuals. The individual foods involved in these suggestions are also referred to as health intervention factors. An analysis of various application models of the Eight Principles of Differentiation in health promotion reveals that conventional models largely rely on the human experience of nutritionists or health managers to identify intervention factors and provide management suggestions. Limited by human experience, this approach is prone to problems such as insufficient personalization and inaccurate recommendations.

[0003] With the development and application of big data and artificial intelligence technologies, a large database (referred to as the intervention factor database) recording the efficacy of foods and their compatibility / contraindications with the Eight Principles of Traditional Chinese Medicine can be constructed through knowledge engineering. Based on this, if a deep learning model can be designed to classify and predict the four pairs of principles of traditional Chinese medicine differentiation (cold / heat, deficiency / excess, exterior / interior, yin / yang) according to the four diagnostic methods of traditional Chinese medicine (inspection, auscultation, inquiry, and palpation), then querying the intervention factor database based on the model's predicted output will naturally yield more complete and accurate health intervention factor information. Furthermore, through training, the model can also improve the level and accuracy of personalized predictions. In other words, combining a deep learning model with a large database can solve problems such as insufficient personalization and inaccurate recommendations in conventional solutions. The technical problems that this invention aims to solve are how to construct and train a deep learning model and how to analyze the appropriate health intervention factors based on the model's output and the large database. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of existing technologies by providing a method, apparatus, electronic device, and computer-readable storage medium for predictive analysis of health intervention factors based on the Eight Principles of Diagnosis. This invention constructs a first prediction model for predicting the eight-principle syndrome differentiation based on the four diagnostic methods of traditional Chinese medicine. The model input is the four diagnostic vectors X, which consists of the vectors x1 (inspection), x2 (auscultation), x3 (inquiry), and x4 (palpation). The model output is the prediction vector Y, which consists of the cold-heat type y1, the deficiency-excess type y2, the exterior-interior type y3, and the yin-yang type y4. Specifically, y1 is one of the nine cold-heat types (no cold-heat, cold in the upper body, cold in the lower body, cold in both upper and lower body, heat in the upper body, heat in the lower body, heat in both upper and lower body, cold in the upper body and heat in the lower body, heat in the upper body and cold in the lower body), y2 is one of the four deficiency-excess types (harmony between deficiency and excess, deficiency syndrome, excess syndrome, deficiency of vital energy and excess of pathogenic factors), y3 is one of the four exterior-interior types (no exterior-interior, exterior, half exterior and half interior, interior), and y4 is one of the eight yin-yang types (harmony between yin and yang, excess of yang, deficiency of yin, deficiency of yang and excess of yin, yin deficiency and yang hyperactivity, deficiency of yang and excess of yin, deficiency of both yin and yang). An intervention factor library is configured to record the efficacy of foods and their compatibility / contraindications with the Eight Principles of Health. Each intervention factor record in the library corresponds to a type of edible plant or meat. Each record includes the food name, food description, instructions on how to consume it, instructions on contraindications, a set of applicable types according to the Eight Principles, and a set of incompatible types according to the Eight Principles. The set of applicable types and the set of incompatible types are used to summarize the cold / hot, deficiency / excess, exterior / interior, and yin / yang types of the applicable / incompatible foods, respectively. Specifically, each suitable / incompatible type consists of one or more suitable / incompatible types, and each suitable / incompatible type is a specific cold / hot, deficiency / excess, exterior / interior, or yin / yang type. A first dataset is constructed through volunteer data collection and expert group classification; and a first prediction model is trained based on the first dataset. After the model training is completed, the user-input four diagnostic vectors X are fed into the first prediction model for prediction, and a health intervention report is obtained by analyzing the predicted vector Y output by the model and the intervention factor library. This invention can improve the personalized prediction level of health intervention factors and improve the accuracy and completeness of health intervention factor analysis.

[0005] To achieve the above objectives, a first aspect of the present invention provides a method for predicting and analyzing health intervention factors based on the Eight Principles of Diagnosis, the method comprising: A deep learning model, denoted as the first prediction model, is constructed for predicting the eight-principle syndrome differentiation based on the four diagnostic methods of Traditional Chinese Medicine (TCM). The first prediction model is used to perform four-symbol classification predictions on the cold / heat, deficiency / excess, exterior / interior, and yin / yang aspects corresponding to the eight-principle syndrome differentiation based on the input four diagnostic vectors X, and outputs the corresponding prediction vector Y. The four diagnostic vectors X include inspection vector x1, auscultation / olfaction vector x2, inquiry vector x3, and palpation vector x4. The prediction vector Y includes cold / heat type y1, deficiency / excess type y2, and deficiency / excess type y3. Type y2, Exterior / Interior type y3, Yin / Yang type y4; The cold / heat type y1 includes no cold / heat, cold in the upper body, cold in the lower body, cold in both upper and lower body, heat in the upper body, heat in the lower body, heat in both upper and lower body, cold in the upper body and heat in the lower body, heat in the upper body and cold in the lower body; The deficiency / excess type y2 includes balanced deficiency / excess, deficiency syndrome, excess syndrome, deficiency of vital energy and excess of pathogenic factors; The exterior / interior type y3 includes no exterior / interior, in the exterior, half exterior and half interior, in the interior; The Yin / Yang type y4 includes harmonious Yin and Yang, excess Yang, deficiency Yin, excess Yang, deficiency Yin and excess Yin, deficiency of both Yin and Yang; The first dataset was constructed through volunteer data collection and expert group classification. The first prediction model is trained based on the first dataset; After model training, the system receives the four diagnostic vectors X input by the user; inputs the current four diagnostic vectors X into the first prediction model to obtain the corresponding prediction vector Y; performs health intervention factor analysis based on the prediction vector Y and a preset intervention factor library to obtain the corresponding health intervention report; and feeds back the health intervention report to the current user. The intervention factor library includes multiple intervention factor records; each intervention factor record corresponds to a type of edible plant or meat; each intervention factor record includes food name, food description, instructions on how to eat it, instructions on dietary restrictions, a set of applicable types of the eight principles, and a set of prohibited types of the eight principles; the food description is used to describe the current food... The basic information and efficacy are explained; the method of consumption is used to explain the common or best way to consume the current food; the dietary taboos are used to explain the dietary taboos of the current food; the eight applicable types set is used to summarize the cold / heat, deficiency / excess, exterior / interior, and yin / yang types of the current food, specifically composed of one or more suitable types, each of which is a specific cold / heat, deficiency / excess, exterior / interior, or yin / yang type; the eight incompatible types set is used to summarize the cold / heat, deficiency / excess, exterior / interior, and yin / yang types of the current food that should be avoided, specifically composed of one or more incompatible types, each of which is a specific cold / heat, deficiency / excess, exterior / interior, or yin / yang type.

[0006] Preferably, the four diagnostic vectors X represent a set of four diagnostic indicators for an examinee; wherein, the visual diagnostic vector x1 is the corresponding set of visual diagnostic indicators, consisting of N1 visual diagnostic indicators; the auscultation and olfaction vector x2 is the corresponding set of auscultation and olfaction indicators, consisting of N2 auscultation and olfaction indicators; the inquiry diagnostic vector x3 is the corresponding set of inquiry diagnostic indicators, consisting of N3 inquiry diagnostic indicators; and the palpation vector x4 is the corresponding set of palpation diagnostic indicators, consisting of N4 palpation diagnostic indicators; the total number of indicators N1, N2, N3, and N4 are four preset positive integers; Each of the following diagnostic indicators—visual, auscultatory, inquiry, and palpation—is a binary data point that is either 0 or 1. Each of these indicators corresponds to a type of environmental, physiological, or psychological representation. When the visual diagnosis indicator, the auscultation and olfaction indicator, the inquiry indicator, or the palpation indicator corresponds to a type of environmental representation, if the value is 0, it means that the current examinee is not in the natural or social environment corresponding to the current environmental representation type; if the value is 1, it means that the current examinee is in the natural or social environment corresponding to the current environmental representation type. When the indicators of the inspection, the auscultation, the inquiry, or the palpation correspond to a type of physiological or psychological representation, a value of 0 indicates that the current examinee does not possess the physiological or psychological state corresponding to the current physiological representation type, while a value of 1 indicates that the current examinee possesses the physiological or psychological state corresponding to the current physiological representation type. The first dataset includes multiple first data records; each first data record includes the four diagnostic vectors X and four label vectors. , , , ; tag vector Probability of 9 labels Composition, 1 ≤ index i ≤ 9, 9 of the label probabilities Each of the nine labels corresponds one-to-one with one of the nine cold / heat types, and the probabilities of the nine labels are as follows: There is only one label vector with a value of 1, and the rest are all 0. Probability of 4 labels Composition, 1 ≤ index j ≤ 4, the probability of the 4 labels The four labels correspond one-to-one with the four types of virtual and real data, and their probabilities are as follows: There is only one label vector with a value of 1, and the rest are all 0. Probability of 4 labels Composition, 1 ≤ index k ≤ 4, the probability of the 4 labels The four labels correspond one-to-one with the four types in the table, representing the probabilities of each label. There is only one label vector with a value of 1, and the rest are all 0. Probability of 8 labels Composition, 1 ≤ index g ≤ 8, 8 of the stated label probabilities The eight labels correspond one-to-one with the eight Yin-Yang types, and their probabilities are as follows: There is only one 1 among them, and the rest are 0.

[0007] Preferably, the model input terminal of the first prediction model is used to receive the four diagnostic vectors X, and the model output terminal is used to output the corresponding prediction vector Y; The first prediction model includes a first feature extraction network, a first linear layer, a second linear layer, a third linear layer, a fourth linear layer, a first classification layer, a second classification layer, a third classification layer, a fourth classification layer, and an output layer; The input of the first feature extraction network is connected to the input of the model, and its output is connected to the inputs of the first linear layer, the second linear layer, the third linear layer, and the fourth linear layer, respectively. The outputs of the first linear layer, the second linear layer, the third linear layer, and the fourth linear layer are connected to the inputs of the corresponding first classification layer, the second classification layer, the third classification layer, and the fourth classification layer, respectively. The outputs of the first classification layer, the second classification layer, the third classification layer, and the fourth classification layer are connected to the first input, the second input, the third input, and the fourth input of the output layer, respectively. The output of the output layer is connected to the output of the model. The first feature extraction network is implemented based on an MLP model structure; the first feature extraction network is used to extract features from the four diagnostic vectors X to obtain the corresponding feature vector Z and send it to the first linear layer, the second linear layer, the third linear layer and the fourth linear layer; The first linear layer performs a feature vector transformation on the feature vector Z in the hot / cold feature space to obtain a 1×9 feature vector R1, which is then sent to the first classification layer. The first classification layer substitutes the feature vector R1 into the Softmax function to calculate the probability and obtains the corresponding classification vector S1, which is then sent to the output layer. The classification vector S1 consists of 9 classification probabilities s. 1,i Composed of 9 classification probabilities s 1,i Each corresponds one-to-one with one of the nine types of cold and heat; The second linear layer performs a feature vector transformation on the feature vector Z in both virtual and real feature spaces to obtain a 1×4 feature vector R2, which is then sent to the second classification layer. The second classification layer substitutes the feature vector R2 into the Softmax function to calculate the probability and obtains the corresponding classification vector S2, which is then sent to the output layer. The classification vector S2 consists of four classification probabilities s.2,j Composed of 4 classification probabilities s 2,j Each of the four types of virtual and real corresponds one-to-one; The third linear layer is used to perform a feature vector transformation on the feature vector Z in the feature space to obtain a 1×4 feature vector R3, which is then sent to the third classification layer. The third classification layer is used to substitute the feature vector R3 into the Softmax function to calculate the probability and obtain the corresponding classification vector S3, which is then sent to the output layer. The classification vector S3 consists of four classification probabilities s. 3,k Composed of 4 classification probabilities s 3,k Each of the four table types corresponds one-to-one; The fourth linear layer is used to perform a feature vector transformation on the feature vector Z in the Yin-Yang feature space to obtain a 1×8 feature vector R4, which is then sent to the fourth classification layer. The fourth classification layer is used to substitute the feature vector R4 into the Softmax function to calculate the probability and obtain the corresponding classification vector S4, which is then sent to the output layer. The classification vector S4 consists of 8 classification probabilities s. 8,g Composed of 8 classification probabilities s 8,g Each of the eight Yin-Yang types corresponds one-to-one; The output layer is used to take the cold / heat type corresponding to the highest probability in the classification vector S1 as the cold / heat type y1, the virtual / real type corresponding to the highest probability in the classification vector S2 as the virtual / real type y2, the surface / interior type corresponding to the highest probability in the classification vector S3 as the surface / interior type y3, and the yin / yang type corresponding to the highest probability in the classification vector S4 as the yin / yang type y4; and the corresponding prediction vector Y is composed of the cold / heat type y1, the virtual / real type y2, the surface / interior type y3, and the yin / yang type y4.

[0008] Preferably, the construction of the first dataset through volunteer data collection and expert group classification specifically includes: Step 41: The predicted vector Y is composed of 9 types of cold and heat, 4 types of deficiency and excess, 4 types of exterior and interior, and 8 types of yin and yang, forming a total set of recruitment population types; and multiple volunteers are recruited to form a volunteer group based on the total set of recruitment population types; and multiple medical experts are recruited to form an expert group. Among them, the cold / heat, deficiency / excess, exterior / interior, and yin / yang types of each volunteer should have an intersection with the total set of types of the recruited population; the total set of cold / heat, deficiency / excess, exterior / interior, and yin / yang types of all volunteers should match the total set of types of the recruited population; the expert group should include at least several specialists or general practitioners in multiple fields of traditional Chinese medicine and health guidance experts in multiple fields of health promotion. Step 42: Each volunteer in the volunteer group is designated as the current volunteer; with authorization from the current volunteer or their guardian, data is collected on the four diagnostic vectors X of the current volunteer; the expert group then assesses the current volunteer's cold / heat, deficiency / excess, exterior / interior, and yin / yang types through expert consultation, and generates the corresponding four label vectors based on the assessment results. , , , ; and composed of the current volunteer's four diagnostic vectors X and the four label vectors. , , , Form a corresponding first data record; Step 43: The first dataset is composed of all the first data records obtained.

[0009] Preferably, training the first prediction model based on the first dataset specifically includes: Step 51: Based on a preset first segmentation ratio, the first dataset is randomly divided into two sub-datasets, denoted as the first training set and the first evaluation set. The first training set and the first evaluation set are each composed of multiple first data records; the total number of records in the first training set and the first evaluation set is denoted as N. tr N av The ratio of the total number of records in the first training set to the total number of records in the first evaluation set is N. tr :N av Satisfying the first segmentation ratio; the four label vectors of each of the first data records in the first training set. , , , Record as the corresponding , , , The four label vectors , , , Corresponding label probability , , , Record as the corresponding , , , 1 ≤ index u ≤ N tr ; Step 52: Input the four diagnostic vectors X of each of the first data records in the first training set into the first prediction model for processing, and denote the four classification vectors S1, S2, S3, and S4 generated during this processing as the corresponding S... 1,u S 2,u S 3,u S 4,u And the classification probabilities s corresponding to the four component vectors S1, S2, S3, and S4 are... 1,i s 2,j s 3,k s 4,g Let s be the corresponding s 1,u,i s 2,u,j s 3,u,k s 4,u,g And from the four classification vectors S obtained this time 1,u S 2,u S 3,u S 4,u Its four corresponding label vectors , , , Form the corresponding first prediction-label set; Step 53, obtain N tr Substituting each of the first prediction-label sets into the preset first model loss function L1, the corresponding first loss value is calculated. Wherein, the first model loss function L1 is composed of the cold and heat loss function L a Real and virtual loss functions L b Table-based loss function L c Yin-Yang loss function L d The composition is as follows: , , , , ; Step 54: Identify whether the first loss value meets the preset first loss value range; if it does, proceed to step 55; if it does not, perform a round of modulation on the model parameters of the first prediction model based on the preset first model optimizer in the direction of minimizing the first model loss function L1, and return to step 52 when the current round of modulation ends. The first model optimizer includes the Adam optimizer and the SGD optimizer. Step 55: Input the four diagnostic vectors X of each of the first data records in the first evaluation set into the first prediction model for processing, and generate four classification vectors S1, S2, S3, and S4 and their corresponding four label vectors during this processing. , , , Form the corresponding second prediction-label set; and based on the obtained N av The second prediction-label set is evaluated for accuracy, precision, recall, and F1 score to obtain the corresponding first accuracy, first precision, first recall, and first F1 score; Step 56: Identify whether the first accuracy, first precision, first recall, and first F1 score each satisfy their respective first accuracy range, first precision range, first recall range, and first F1 score range; if not, return to step 51; if yes, stop training and confirm that the model training is complete.

[0010] Preferably, the step of performing health intervention factor analysis based on the prediction vector Y and a preset intervention factor library to obtain the corresponding health intervention report specifically includes: The intervention factor records that intersect with the prediction vector Y in the intervention factor library are extracted to form a first set; the intervention factor records that intersect with the prediction vector Y in the intervention factor library are extracted to form a second set; and a corresponding third set is determined based on the first set and the second set, where the third set = the first set - (the first set ∩ the second set); all food names in the third set are extracted to form a corresponding natural factor set; and the corresponding health intervention report is composed of the prediction vector Y and the natural factor set.

[0011] A second aspect of the present invention provides an apparatus for implementing the method for predicting and analyzing health intervention factors based on the eight principles of syndrome differentiation described in the first aspect above. The apparatus includes: a model building module, a data acquisition module, a model training module, and a model application module. The model building module is used to construct a deep learning model, denoted as the first prediction model, for predicting the eight-principle syndrome differentiation based on the four diagnostic methods of traditional Chinese medicine. The first prediction model is used to perform four-symbol classification predictions on the cold / heat, deficiency / excess, exterior / interior, and yin / yang aspects corresponding to the eight-principle syndrome differentiation based on the input four diagnostic vectors X, and outputs the corresponding prediction vector Y. The four diagnostic vectors X include inspection vector x1, auscultation / olfaction vector x2, inquiry vector x3, and palpation vector x4; the prediction vector Y includes the cold / heat type y. 1. Deficiency / Excess type y2, Exterior / Interior type y3, Yin / Yang type y4; The cold / heat type y1 includes no cold / heat, cold in the upper body, cold in the lower body, cold in both upper and lower body, heat in the upper body, heat in the lower body, heat in both upper and lower body, cold in the upper body and heat in the lower body, heat in the upper body and cold in the lower body; The deficiency / excess type y2 includes balanced deficiency / excess, deficiency syndrome, excess syndrome, deficiency of vital energy and excess of pathogenic factors; The exterior / interior type y3 includes no exterior / interior, in the exterior, half exterior and half interior, in the interior; The Yin / Yang type y4 includes harmonious Yin and Yang, excess Yang, deficiency Yin, deficiency Yang, excess Yin, deficiency Yin and excess Yang, deficiency Yang and excess Yin, deficiency of both Yin and Yang; The data acquisition module is used to construct the first dataset through volunteer data collection and expert group classification; The model training module trains the first prediction model based on the first dataset; The model application module is used to receive the four diagnostic vectors X input by the user after model training; input the current four diagnostic vectors X into the first prediction model to predict and obtain the corresponding prediction vector Y; and perform health intervention factor analysis based on the prediction vector Y and a preset intervention factor library to obtain the corresponding health intervention report; and provide feedback of the health intervention report to the current user; the intervention factor library includes multiple intervention factor records; each intervention factor record corresponds to a type of edible plant or meat; the intervention factor record includes food name, food description, instructions on how to eat it, instructions on dietary restrictions, a set of applicable types of the eight principles, and a set of prohibited types of the eight principles; the food description is used to describe the current... The document provides basic information and efficacy details for the food; the instructions on consumption methods describe the common or optimal ways to consume the food; the instructions on dietary restrictions explain any contraindications for the food; the set of applicable types based on the Eight Principles summarizes the applicable types of the food based on their cold / hot, deficiency / excess, exterior / interior, and yin / yang characteristics, specifically consisting of one or more suitable types, each of which represents a specific type of cold / hot, deficiency / excess, exterior / interior, or yin / yang; and the set of prohibited types based on the Eight Principles summarizes the prohibited types of the food based on their cold / hot, deficiency / excess, exterior / interior, and yin / yang characteristics, specifically consisting of one or more prohibited types, each of which represents a specific type of cold / hot, deficiency / excess, exterior / interior, or yin / yang.

[0012] A third aspect of the present invention provides an electronic device, including: a memory, a processor, and a transceiver; The processor is used to couple with the memory, read and execute instructions in the memory to implement the steps of the method described in the first aspect above; The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.

[0013] A fourth aspect of the present invention provides a computer-readable storage medium storing computer instructions that, when executed by a computer, cause the computer to perform the instructions described in the first aspect.

[0014] This invention provides a method, apparatus, electronic device, and computer-readable storage medium for predictive analysis of health intervention factors based on the Eight Principles of Diagnosis. As can be seen from the above, the embodiments of the present invention construct a first prediction model for predicting the eight-principle syndrome differentiation based on the four diagnostic methods of traditional Chinese medicine. The model input is the four diagnostic vectors X, which consists of the observation vector x1, the auscultation vector x2, the inquiry vector x3, and the palpation vector x4. The model output is the prediction vector Y, which consists of the cold-heat type y1, the deficiency-excess type y2, the exterior-interior type y3, and the yin-yang type y4. Specifically, y1 is one of the nine cold-heat types (no cold-heat, cold in the upper body, cold in the lower body, cold in both upper and lower body, heat in the upper body, heat in the lower body, heat in both upper and lower body, cold in the upper body and heat in the lower body, heat in the upper body and cold in the lower body), y2 is one of the four deficiency-excess types (harmony between deficiency and excess, deficiency syndrome, excess syndrome, deficiency of the body and excess of the pathogenic factors), y3 is one of the four exterior-interior types (no exterior-interior, exterior, half exterior and half interior, interior), and y4 is one of the eight yin-yang types (yin-yang harmony, yang excess, yin deficiency, yang deficiency, yin excess, yin deficiency and yang hyperactivity, yang deficiency and yin excess, yin and yang deficiency). An intervention factor library is configured to record the efficacy of foods and their compatibility / contraindications with the Eight Principles of Health. Each intervention factor record in the library corresponds to a type of edible plant or meat. Each record includes the food name, food description, instructions on how to consume it, instructions on contraindications, a set of applicable types according to the Eight Principles, and a set of incompatible types according to the Eight Principles. The set of applicable types and the set of incompatible types are used to summarize the cold / hot, deficiency / excess, exterior / interior, and yin / yang types of the applicable / incompatible foods, respectively. Specifically, each suitable / incompatible type consists of one or more suitable / incompatible types, and each suitable / incompatible type is a specific cold / hot, deficiency / excess, exterior / interior, or yin / yang type. A first dataset is constructed through volunteer data collection and expert group classification; and a first prediction model is trained based on the first dataset. After the model training is completed, the user-input four diagnostic vector X is fed into the first prediction model for prediction, and a health intervention report is obtained by analyzing the health intervention factors based on the model output prediction vector Y and the intervention factor library. This embodiment of the invention improves the personalized prediction level of health intervention factors and improves the accuracy and completeness of health intervention factor analysis. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of a method for predicting and analyzing health intervention factors based on the Eight Principles of Differentiation, provided in Embodiment 1 of the present invention. Figure 2 This is a model structure diagram of the first prediction model provided in Embodiment 1 of the present invention; Figure 3 This is a module structure diagram of a device for predicting and analyzing health intervention factors based on the Eight Principles of Diagnosis provided in Embodiment 2 of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0017] Embodiment 1 of this invention provides a method for predicting and analyzing health intervention factors based on the Eight Principles of Syndrome Differentiation, such as... Figure 1 The schematic diagram of a method for predicting and analyzing health intervention factors based on the Eight Principles of Differentiation provided in Embodiment 1 of the present invention is shown. The method mainly includes the following steps: Step 1: Construct a deep learning model for predicting the eight-principle syndrome differentiation based on the four diagnostic methods of traditional Chinese medicine, denoted as the first prediction model.

[0018] Here, the first prediction model in this embodiment of the invention is used to perform corresponding four-symbol classification predictions on cold and heat, deficiency and excess, exterior and interior, and yin and yang corresponding to the eight principles of syndrome differentiation based on the four diagnostic vectors X input to the model, and output the corresponding prediction vector Y.

[0019] In this embodiment of the invention, the four diagnostic vector X represents a set of four diagnostic indicators for an examinee, including inspection vector x1, auscultation vector x2, inquiry vector x3, and palpation vector x4. Specifically, inspection vector x1 is the corresponding set of inspection indicators, consisting of N1 inspection indicators; auscultation vector x2 is the corresponding set of auscultation indicators, consisting of N2 auscultation indicators; inquiry vector x3 is the corresponding set of inquiry indicators, consisting of N3 inquiry indicators; and palpation vector x4 is the corresponding set of palpation indicators, consisting of N4 palpation indicators. The total number of indicators N1, N2, N3, and N4 are four preset positive integers.

[0020] In the four diagnostic vectors X, each of the following indicators—inspection, auscultation, inquiry, and palpation—is a binary data point that is either 0 or 1. Each of these indicators corresponds to a type of environmental, physiological, or psychological representation.

[0021] When the indicators for observation, auscultation, inquiry, or palpation correspond to a type of environmental representation, a value of 0 indicates that the examinee is not in the natural or social environment corresponding to that type of environmental representation, while a value of 1 indicates that the examinee is in the natural or social environment corresponding to that type of environmental representation. For example, in the inquiry vector x3, there is an inquiry indicator that corresponds to the binary environmental question "Is there environmental noise?" If the examinee is indeed in a noisy environment, the inquiry indicator is 1; otherwise, it is 0.

[0022] When the indicators for inspection, auscultation, inquiry, or palpation correspond to a type of physiological or psychological representation, a value of 0 indicates that the examinee does not possess the physiological or psychological state corresponding to that type of physiological representation, while a value of 1 indicates that the examinee possesses the physiological or psychological state corresponding to that type of physiological representation. For example, in the palpation vector x4, there is a palpation indicator that corresponds to the binary physiological state question "whether there is a slippery pulse." If the examinee does indeed have a slippery pulse, then this palpation indicator is 1; otherwise, it is 0. Similarly, in the inspection vector x1, there is an inspection indicator that corresponds to the binary psychological state question "whether there is mental agitation." If the examinee is indeed mentally agitated, then this inspection indicator is 1; otherwise, it is 0.

[0023] It should be noted that the indicators for inspection, auscultation, inquiry, and palpation included in each of the inspection vector x1, auscultation vector x2, inquiry vector x3, and palpation vector x4 can be selected and defined based on the opinions of experts in the medical and health field. This invention does not specifically limit the range of these four types of indicators.

[0024] The prediction vector Y in this embodiment of the invention includes cold / heat type y1, deficiency / excess type y2, exterior / interior type y3, and yin / yang type y4. Specifically, cold / heat type y1 includes no cold / heat, cold in the upper body, cold in the lower body, cold in both upper and lower body, heat in the upper body, heat in the lower body, heat in both upper and lower body, cold in the upper body and heat in the lower body, and heat in the upper body and cold in the lower body; deficiency / excess type y2 includes balanced deficiency / excess, deficiency syndrome, excess syndrome, and deficiency of vital energy and excess of pathogenic factors; exterior / interior type y3 includes no exterior / interior, in the exterior, half-exterior / half-interior, and in the interior; and yin / yang type y4 includes yin / yang harmony, yang excess, yin deficiency, yang deficiency, yin excess, yin deficiency with yang hyperactivity, yang deficiency with yin excess, and deficiency of both yin and yang.

[0025] like Figure 2As shown in the model structure diagram of the first prediction model provided in Embodiment 1 of the present invention, the model input end of the first prediction model of the present invention is used to receive the four diagnostic vectors X, and the model output end is used to output the corresponding prediction vector Y.

[0026] like Figure 2 As shown, the model components of the first prediction model include: a first feature extraction network, a first linear layer, a second linear layer, a third linear layer, a fourth linear layer, a first classification layer, a second classification layer, a third classification layer, a fourth classification layer, and an output layer.

[0027] like Figure 2 As shown, the connection relationships of the model components of the first prediction model are as follows: the input end of the first feature extraction network is connected to the model input end, and the output end is connected to the input ends of the first linear layer, the second linear layer, the third linear layer, and the fourth linear layer, respectively; the output ends of the first linear layer, the second linear layer, the third linear layer, and the fourth linear layer are connected to the input ends of the corresponding first classification layer, the second classification layer, the third classification layer, and the fourth classification layer, respectively; the output ends of the first classification layer, the second classification layer, the third classification layer, and the fourth classification layer are connected to the first input end, the second input end, the third input end, and the fourth input end of the output layer, respectively; and the output end of the output layer is connected to the model output end.

[0028] The model components of the first prediction model are shown below.

[0029] 1) First feature extraction network: The first feature extraction network in this embodiment of the invention is implemented based on an MLP model structure. The first feature extraction network is used to extract features from the four diagnostic vectors X to obtain the corresponding feature vector Z, which is then sent to the first linear layer, the second linear layer, the third linear layer, and the fourth linear layer.

[0030] 2) First linear layer + first classification layer: The first linear layer in this embodiment of the invention is implemented based on a fully connected model structure. The first linear layer is used to perform a feature vector transformation of the feature vector Z in the hot / cold feature space to obtain a feature vector R1 of shape 1×9, which is then sent to the first classification layer.

[0031] In this embodiment of the invention, the first classification layer is used to substitute the feature vector R1 into the Softmax function to calculate the probability and obtain the corresponding classification vector S1, which is then sent to the output layer. The classification vector S1 consists of nine classification probabilities s. 1,i Composed of 9 classification probabilities s 1,i It corresponds one-to-one with the nine types of cold and heat.

[0032] 3) Second linear layer + second classification layer: The second linear layer in this embodiment of the invention is implemented based on a fully connected model structure. The second linear layer is used to perform a feature vector transformation between the virtual and real feature spaces on the feature vector Z to obtain a feature vector R2 of shape 1×4, which is then sent to the second classification layer.

[0033] In this embodiment of the invention, the second classification layer is used to substitute the feature vector R2 into the Softmax function to calculate the probability and obtain the corresponding classification vector S2, which is then sent to the output layer. The classification vector S2 consists of four classification probabilities s. 2,j Composed of 4 class probabilities s 2,j It corresponds one-to-one with the four types of virtual and real.

[0034] 4) Third linear layer + third classification layer: The third linear layer in this embodiment of the invention is implemented based on a fully connected model structure. The third linear layer is used to perform a feature vector transformation on the feature vector Z in the feature space to obtain a feature vector R3 of shape 1×4, which is then sent to the third classification layer.

[0035] In this embodiment of the invention, the third classification layer is used to substitute the feature vector R3 into the Softmax function to calculate the probability and obtain the corresponding classification vector S3, which is then sent to the output layer. The classification vector S3 consists of four classification probabilities s. 3,k Composed of 4 class probabilities s 3,k It corresponds one-to-one with the four types of tables.

[0036] 5) Fourth linear layer + fourth classification layer: The fourth linear layer in this embodiment of the invention is implemented based on a fully connected model structure. The fourth linear layer is used to perform a feature vector transformation on the feature vector Z in the Yin-Yang feature space to obtain a feature vector R4 of shape 1×8, which is then sent to the fourth classification layer.

[0037] In this embodiment of the invention, the fourth classification layer is used to substitute the feature vector R4 into the Softmax function to calculate the probability and obtain the corresponding classification vector S4, which is then sent to the output layer. The classification vector S4 consists of eight classification probabilities s. 8,g Composed of 8 classification probabilities s 8,g It corresponds one-to-one with the eight Yin-Yang types.

[0038] 6) Output layer: In this embodiment of the invention, the output layer is used to take the cold / heat type corresponding to the highest probability in classification vector S1 as cold / heat type y1, the virtual / real type corresponding to the highest probability in classification vector S2 as virtual / real type y2, the surface / interior type corresponding to the highest probability in classification vector S3 as surface / interior type y3, and the yin / yang type corresponding to the highest probability in classification vector S4 as yin / yang type y4; and the corresponding prediction vector Y is output by combining cold / heat type y1, virtual / real type y2, surface / interior type y3, and yin / yang type y4.

[0039] Step 2: Construct the first dataset by collecting data from volunteers and classifying it using expert data.

[0040] The first dataset in this embodiment of the invention includes multiple first data records; each first data record includes a four diagnostic vector X and four label vectors. , , , ; tag vector Probability of 9 labels Composition, 1 ≤ index i ≤ 9, 9 label probabilities Each of the nine categories corresponds to a type of cold or heat, and the probability of each of the nine tags is [not specified]. There is only one label vector with a value of 1, and the rest are all 0. Probability of 4 labels Composition, 1 ≤ index j ≤ 4, 4 label probabilities Each of the four types of virtual and real data corresponds one-to-one, with four label probabilities. There is only one label vector with a value of 1, and the rest are all 0. Probability of 4 labels Composition, 1 ≤ index k ≤ 4, 4 label probabilities Each of the four categories corresponds one-to-one with the four label probabilities. There is only one label vector with a value of 1, and the rest are all 0. Probability of 8 labels Composition, 1 ≤ index g ≤ 8, 8 label probabilities Each of the eight Yin-Yang types corresponds one-to-one with one of the eight label probabilities. There is only one 1 among them, and the rest are 0.

[0041] Step 2 specifically includes: Step 21: The recruitment population type set is composed of 9 types of cold and heat, 4 types of false and real, 4 types of surface and interior, and 8 types of yin and yang corresponding to the prediction vector Y; and multiple volunteers are recruited to form a volunteer group based on the recruitment population type set; and multiple medical experts are recruited to form an expert group.

[0042] Here, the cold / heat, deficiency / excess, exterior / interior, and yin / yang types of each volunteer in this embodiment of the invention should overlap with the total set of recruited population types; the total set of cold / heat, deficiency / excess, exterior / interior, and yin / yang types of all volunteers in this embodiment of the invention should match the total set of recruited population types; the expert group in this embodiment of the invention should include at least specialists or general practitioners in multiple fields of traditional Chinese medicine and health guidance experts in multiple fields of health promotion.

[0043] Step 22: Designate each volunteer in the volunteer group as the current volunteer; with the authorization of the current volunteer or their guardian, collect data on the current volunteer's four diagnostic vectors X; and have an expert group assess the current volunteer's cold / heat, deficiency / excess, exterior / interior, and yin / yang types through expert consultation, and generate four corresponding label vectors based on the assessment results. , , , ; and consists of the current volunteer's four diagnostic vectors X and four label vectors. , , , This forms a corresponding first data record.

[0044] Step 23: The first dataset is composed of all the first data records obtained.

[0045] Step 3: Train the first prediction model based on the first dataset.

[0046] Specifically, it includes: Step 31: Based on the preset first segmentation ratio, the first dataset is randomly divided into two sub-datasets, denoted as the first training set and the first evaluation set.

[0047] Here, the first segmentation ratio in this embodiment of the invention is a pre-set ratio parameter, such as 8:2. Both the first training set and the first evaluation set consist of multiple first data records; the total number of records in the first training set and the first evaluation set is denoted as N. tr N av The ratio of the total number of records in the first training set to the total number of records in the first evaluation set is N. tr :N av It satisfies the first segmentation ratio.

[0048] It should be noted that the four label vectors of each first data record in the first training set , , , Record as the corresponding , , , Four label vectors , , , Corresponding label probability , , , Record as the corresponding , , , 1 ≤ index u ≤ N tr .

[0049] Step 32: Input the four diagnostic vectors X of each first data record in the first training set into the first prediction model for processing, and denote the four classification vectors S1, S2, S3, and S4 generated during this processing as the corresponding S... 1,u S 2,u S 3,u S 4,u And assign the classification probabilities s corresponding to the four component vectors S1, S2, S3, and S4. 1,i s 2,j s 3,k s 4,g Let s be the corresponding s 1,u,i s 2,u,j s 3,u,k s 4,u,g And from the four classification vectors S obtained this time 1,u S 2,u S 3,u S 4,u Its four corresponding label vectors , , , This forms the corresponding first prediction-label set.

[0050] Step 33, obtain N tr The first prediction-label set is substituted into the preset first model loss function L1 to calculate the corresponding first loss value.

[0051] Here, the first model loss function L1 in this embodiment of the invention is derived from the cold / heat loss function L. a Real and virtual loss functions L b Table-based loss function L c Yin-Yang loss function L d The composition is as follows: , , , , .

[0052] Step 34: Identify whether the first loss value meets the preset first loss value range; if it does, proceed to step 35; if it does not, modulate the model parameters of the first prediction model in one round based on the preset first model optimizer in the direction of minimizing the first model loss function L1, and return to step 32 when the first round of modulation ends.

[0053] Here, the first loss value range in this embodiment of the invention is a pre-set numerical range. The first model optimizer includes the Adam optimizer and the SGD optimizer.

[0054] Step 35: Input the four diagnostic vectors X of each first data record in the first evaluation set into the first prediction model for processing, and generate the four classification vectors S1, S2, S3, and S4 and their corresponding four label vectors during this processing. , , , Form the corresponding second prediction-label set; and based on the obtained N av The first precision, first accuracy, first recall, and first F1 score are evaluated on the second prediction-label set to obtain the corresponding first precision, first accuracy, first recall, and first F1 score.

[0055] Step 36: Identify whether the first accuracy, first precision, first recall, and first F1 score each satisfy their respective first accuracy range, first precision range, first recall range, and first F1 score range; if not, return to step 31; if yes, stop training and confirm that the model training is complete.

[0056] Here, the first accuracy range, the first precision range, the first recall range, and the first F1 score range in this embodiment of the invention are four preset numerical ranges.

[0057] Step 4: After the model training is completed, the four diagnostic vectors X input by the user are received; the current four diagnostic vectors X are input into the first prediction model to obtain the corresponding prediction vector Y; and based on the prediction vector Y and the preset intervention factor library, health intervention factor analysis is performed to obtain the corresponding health intervention report; and the health intervention report is fed back to the current user.

[0058] Here, the intervention factor library of this invention includes multiple intervention factor records; each intervention factor record corresponds to a type of edible plant or meat; the intervention factor record includes food name, food description, instructions on how to eat, instructions on dietary restrictions, a set of applicable types according to the Eight Principles, and a set of incompatible types according to the Eight Principles; the food description is used to explain the basic information and efficacy of the current food; the instructions on how to eat are used to explain the common or best ways to eat the current food; the instructions on dietary restrictions are used to explain the dietary restrictions of the current food; the set of applicable types according to the Eight Principles is used to summarize the cold / hot, deficiency / excess, exterior / interior, and yin / yang types applicable to the current food, specifically composed of one or more suitable types, each suitable type being a specific cold / hot, deficiency / excess, exterior / interior, or yin / yang type; the set of incompatible types according to the Eight Principles is used to summarize the cold / hot, deficiency / excess, exterior / interior, and yin / yang types of the current food that should be avoided, specifically composed of one or more incompatible types, each incompatible type being a specific cold / hot, deficiency / excess, exterior / interior, or yin / yang type.

[0059] Step 4 specifically includes: Step 41: After the model training is completed, receive the four diagnostic vectors X input by the user.

[0060] Step 42: Input the current four diagnostic vector X into the first prediction model to obtain the corresponding prediction vector Y.

[0061] Step 43: Based on the predicted vector Y and the preset intervention factor library, perform health intervention factor analysis to obtain the corresponding health intervention report.

[0062] Specifically, this includes: extracting intervention factor records from the intervention factor database that intersect with the eight applicable types set and the prediction vector Y to form a first set; extracting intervention factor records from the intervention factor database that intersect with the eight prohibited types set and the prediction vector Y to form a second set; determining the corresponding third set based on the first and second sets, where the third set = the first set - (the first set ∩ the second set); extracting all food names from the third set to form the corresponding natural factor set; and combining the prediction vector Y and the natural factor set to form the corresponding health intervention report.

[0063] Step 44: Feedback the health intervention report to the current user.

[0064] Figure 3 This is a module structure diagram of a device for predictive analysis of health intervention factors based on the Eight Principles of Diagnosis provided in Embodiment 2 of the present invention. This device can be a terminal device or server implementing the aforementioned method embodiments, or it can be a device that enables the aforementioned terminal device or server to implement the aforementioned method embodiments. For example, the device can be a device or chip system of the aforementioned terminal device or server. Figure 3As shown, the device includes: a model building module 201, a data acquisition module 202, a model training module 203, and a model application module 204.

[0065] Model building module 201 is used to build a deep learning model for predicting the eight-principle syndrome differentiation based on the four diagnostic methods of traditional Chinese medicine, denoted as the first prediction model. The first prediction model is used to perform four-symbol classification prediction on the cold / heat, deficiency / excess, exterior / interior, and yin / yang corresponding to the eight-principle syndrome based on the four diagnostic vectors X input to the model, and output the corresponding prediction vector Y. The four diagnostic vectors X include inspection vector x1, auscultation vector x2, inquiry vector x3, and palpation vector x4; the prediction vector Y includes cold / heat category... Type y1, Deficiency-Excess Type y2, Exterior-Interior Type y3, Yin-Yang Type y4; Cold-Heat Type y1 includes no cold or heat, cold in the upper body, cold in the lower body, cold in both upper and lower body, heat in the upper body, heat in the lower body, heat in both upper and lower body, cold in the upper body and heat in the lower body, heat in the upper body and cold in the lower body; Deficiency-Excess Type y2 includes balanced deficiency and excess, deficiency syndrome, excess syndrome, deficiency of vital energy and excess of pathogenic factors; Exterior-Interior Type y3 includes no exterior or interior, exterior, half exterior and half interior, interior; Yin-Yang Type y4 includes harmonious Yin and Yang, excess Yang, deficiency of Yin, excess Yang, deficiency of Yang and excess Yin, deficiency of both Yin and Yang.

[0066] The data acquisition module 202 is used to construct the first dataset through volunteer data collection and expert group classification.

[0067] Model training module 203 trains the first prediction model based on the first dataset.

[0068] The model application module 204 is used to receive the four diagnostic vectors X input by the user after model training; input the current four diagnostic vectors X into the first prediction model to predict the corresponding prediction vector Y; and perform health intervention factor analysis based on the prediction vector Y and the preset intervention factor library to obtain the corresponding health intervention report; and provide feedback on the health intervention report to the current user; the intervention factor library includes multiple intervention factor records; each intervention factor record corresponds to a type of edible plant or meat; the intervention factor record includes food name, food description, instructions on how to eat it, instructions on dietary restrictions, set of applicable types of the eight principles, and set of types of foods to avoid according to the eight principles; the food description is used to describe the current food The basic information and efficacy of the food are explained; the method of consumption is explained in terms of the common or best way to consume the food; the dietary taboos are explained in terms of the dietary taboos of the food; the set of applicable types of the Eight Principles is used to summarize the cold / heat, deficiency / excess, exterior / interior, and yin / yang types of the food, which are specifically composed of one or more suitable types, each of which is a specific type of cold / heat, deficiency / excess, exterior / interior, or yin / yang; the set of food taboos of the Eight Principles is used to summarize the cold / heat, deficiency / excess, exterior / interior, and yin / yang types of the food that should be avoided, which are specifically composed of one or more taboo types, each of which is a specific type of cold / heat, deficiency / excess, exterior / interior, or yin / yang.

[0069] The device provided in this embodiment of the invention is based on the Eight Principles of Differentiation for predictive analysis of health intervention factors. It can execute the method steps in the above method embodiment. Its implementation principle and technical effect are similar, and will not be repeated here.

[0070] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing elements; they can be fully implemented in hardware; or some modules can be implemented by processing elements calling software, while others are implemented in hardware. For example, the model building module can be a separate processing element, or it can be integrated into a chip in the above device. Alternatively, it can be stored as program code in the memory of the above device, and its functions can be called and executed by a processing element. The implementation of other modules is similar. Moreover, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.

[0071] For example, these modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). As another example, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a System-on-a-Chip (SOC).

[0072] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the foregoing method embodiments are generated. The computer described above can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The aforementioned computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the aforementioned computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, Bluetooth, microwave, etc.) means. The aforementioned computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The aforementioned available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks (SSDs)).

[0073] Figure 4 This is a schematic diagram of an electronic device provided in Embodiment 3 of the present invention. This electronic device can be a terminal device or server implementing the methods of the aforementioned embodiments, or it can be a terminal device or server connected to the aforementioned terminal device or server implementing the methods of the aforementioned embodiments. Figure 4 As shown, the electronic device may include: a processor 301 (e.g., CPU), a memory 302, and a transceiver 303; the transceiver 303 is coupled to the processor 301, and the processor 301 controls the transmission and reception operations of the transceiver 303. The memory 302 may store various instructions for performing various processing functions and implementing the processing steps described in the foregoing embodiments. Preferably, the electronic device involved in the embodiments of the present invention further includes: a power supply 304, a system bus 305, and a communication port 306. The system bus 305 is used to realize communication connections between components. The communication port 306 is used for communication between the electronic device and other peripherals.

[0074] exist Figure 4The system bus 305 mentioned can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, it is represented by only one thick line in the figure, but this does not indicate that there is only one bus or one type of bus. The communication interface is used to enable communication between the database access device and other devices (e.g., clients, read-write libraries, and read-only libraries). Memory may include Random Access Memory (RAM) and may also include Non-Volatile Memory, such as at least one disk storage device.

[0075] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), graphics processing units (GPUs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0076] It should be noted that the embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when run on a computer, cause the computer to perform the methods and processes provided in the above embodiments.

[0077] This invention provides a method, apparatus, electronic device, and computer-readable storage medium for predictive analysis of health intervention factors based on the Eight Principles of Diagnosis. As can be seen from the above, the embodiments of the present invention construct a first prediction model for predicting the eight-principle syndrome differentiation based on the four diagnostic methods of traditional Chinese medicine. The model input is the four diagnostic vectors X, which consists of the observation vector x1, the auscultation vector x2, the inquiry vector x3, and the palpation vector x4. The model output is the prediction vector Y, which consists of the cold-heat type y1, the deficiency-excess type y2, the exterior-interior type y3, and the yin-yang type y4. Specifically, y1 is one of the nine cold-heat types (no cold-heat, cold in the upper body, cold in the lower body, cold in both upper and lower body, heat in the upper body, heat in the lower body, heat in both upper and lower body, cold in the upper body and heat in the lower body, heat in the upper body and cold in the lower body), y2 is one of the four deficiency-excess types (harmony between deficiency and excess, deficiency syndrome, excess syndrome, deficiency of the body and excess of the pathogenic factors), y3 is one of the four exterior-interior types (no exterior-interior, exterior, half exterior and half interior, interior), and y4 is one of the eight yin-yang types (yin-yang harmony, yang excess, yin deficiency, yang deficiency, yin excess, yin deficiency and yang hyperactivity, yang deficiency and yin excess, yin and yang deficiency). An intervention factor library is configured to record the efficacy of foods and their compatibility / contraindications with the Eight Principles of Health. Each intervention factor record in the library corresponds to a type of edible plant or meat. Each record includes the food name, food description, instructions on how to consume it, instructions on contraindications, a set of applicable types according to the Eight Principles, and a set of incompatible types according to the Eight Principles. The set of applicable types and the set of incompatible types are used to summarize the cold / hot, deficiency / excess, exterior / interior, and yin / yang types of the applicable / incompatible foods, respectively. Specifically, each suitable / incompatible type consists of one or more suitable / incompatible types, and each suitable / incompatible type is a specific cold / hot, deficiency / excess, exterior / interior, or yin / yang type. A first dataset is constructed through volunteer data collection and expert group classification; and a first prediction model is trained based on the first dataset. After the model training is completed, the user-input four diagnostic vector X is fed into the first prediction model for prediction, and a health intervention report is obtained by analyzing the health intervention factors based on the model output prediction vector Y and the intervention factor library. This embodiment of the invention improves the personalized prediction level of health intervention factors and improves the accuracy and completeness of health intervention factor analysis.

[0078] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0079] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. 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. A method for predicting and analyzing health intervention factors based on the Eight Principles of Diagnosis, characterized in that, The method includes: A deep learning model, denoted as the first prediction model, is constructed for predicting the eight-principle syndrome differentiation based on the four diagnostic methods of Traditional Chinese Medicine (TCM). The first prediction model is used to perform four-symbol classification predictions on the cold / heat, deficiency / excess, exterior / interior, and yin / yang aspects corresponding to the eight-principle syndrome differentiation based on the input four diagnostic vectors X, and outputs the corresponding prediction vector Y. The four diagnostic vectors X include inspection vector x1, auscultation / olfaction vector x2, inquiry vector x3, and palpation vector x4. The prediction vector Y includes cold / heat type y1, deficiency / excess type y2, and deficiency / excess type y3. Type y2, Exterior / Interior type y3, Yin / Yang type y4; The cold / heat type y1 includes no cold / heat, cold in the upper body, cold in the lower body, cold in both upper and lower body, heat in the upper body, heat in the lower body, heat in both upper and lower body, cold in the upper body and heat in the lower body, heat in the upper body and cold in the lower body; The deficiency / excess type y2 includes balanced deficiency / excess, deficiency syndrome, excess syndrome, deficiency of vital energy and excess of pathogenic factors; The exterior / interior type y3 includes no exterior / interior, in the exterior, half exterior and half interior, in the interior; The Yin / Yang type y4 includes harmonious Yin and Yang, excess Yang, deficiency Yin, excess Yang, deficiency Yin and excess Yin, deficiency of both Yin and Yang; The first dataset was constructed through volunteer data collection and expert group classification. The first prediction model is trained based on the first dataset; After model training, the system receives the four diagnostic vectors X input by the user; inputs the current four diagnostic vectors X into the first prediction model to obtain the corresponding prediction vector Y; performs health intervention factor analysis based on the prediction vector Y and a preset intervention factor library to obtain the corresponding health intervention report; and feeds back the health intervention report to the current user. The intervention factor library includes multiple intervention factor records; each intervention factor record corresponds to a type of edible plant or meat; each intervention factor record includes food name, food description, instructions on how to eat it, instructions on dietary restrictions, a set of applicable types of the eight principles, and a set of prohibited types of the eight principles; the food description is used to describe the current food... The basic information and efficacy are explained; the method of consumption is used to explain the common or best way to consume the current food; the dietary taboos are used to explain the dietary taboos of the current food; the eight applicable types set is used to summarize the cold / heat, deficiency / excess, exterior / interior, and yin / yang types of the current food, specifically composed of one or more suitable types, each of which is a specific cold / heat, deficiency / excess, exterior / interior, or yin / yang type; the eight incompatible types set is used to summarize the cold / heat, deficiency / excess, exterior / interior, and yin / yang types of the current food that should be avoided, specifically composed of one or more incompatible types, each of which is a specific cold / heat, deficiency / excess, exterior / interior, or yin / yang type.

2. The method for predicting and analyzing health intervention factors based on the Eight Principles of Diagnosis according to claim 1, characterized in that, The four diagnostic vector X represents a set of diagnostic indicators for an examinee; wherein, the inspection vector x1 is the corresponding set of inspection indicators, consisting of N1 inspection indicators; the auscultation vector x2 is the corresponding set of auscultation indicators, consisting of N2 auscultation indicators; the inquiry vector x3 is the corresponding set of inquiry indicators, consisting of N3 inquiry indicators; and the palpation vector x4 is the corresponding set of palpation indicators, consisting of N4 palpation indicators; the total number of indicators N1, N2, N3, and N4 are four preset positive integers. Each of the following diagnostic indicators—visual, auscultatory, inquiry, and palpation—is a binary data point that is either 0 or 1. Each of these indicators corresponds to a type of environmental, physiological, or psychological representation. When the visual diagnosis indicator, the auscultation and olfaction indicator, the inquiry indicator, or the palpation indicator corresponds to a type of environmental representation, if the value is 0, it means that the current examinee is not in the natural or social environment corresponding to the current environmental representation type; if the value is 1, it means that the current examinee is in the natural or social environment corresponding to the current environmental representation type. When the indicators of the inspection, the auscultation, the inquiry, or the palpation correspond to a type of physiological or psychological representation, a value of 0 indicates that the current examinee does not possess the physiological or psychological state corresponding to the current physiological representation type, while a value of 1 indicates that the current examinee possesses the physiological or psychological state corresponding to the current physiological representation type. The first dataset includes multiple first data records; each first data record includes the four diagnostic vectors X and four label vectors. , , , ; tag vector Probability of 9 labels Composition, 1 ≤ index i ≤ 9, 9 of the label probabilities Each of the nine labels corresponds one-to-one with one of the nine cold / heat types, and the probabilities of the nine labels are as follows: There is only one label vector with a value of 1, and the rest are all 0. Probability of 4 labels Composition, 1 ≤ index j ≤ 4, the probability of the 4 labels The four labels correspond one-to-one with the four types of virtual and real data, and their probabilities are as follows: There is only one label vector with a value of 1, and the rest are all 0. Probability of 4 labels Composition, 1 ≤ index k ≤ 4, the probability of the 4 labels The four labels correspond one-to-one with the four types in the table, representing the probabilities of each label. There is only one label vector with a value of 1, and the rest are all 0. Probability of 8 labels Composition, 1 ≤ index g ≤ 8, 8 of the stated label probabilities The eight labels correspond one-to-one with the eight Yin-Yang types, and their probabilities are as follows: There is only one 1 among them, and the rest are 0.

3. The method for predicting and analyzing health intervention factors based on the Eight Principles of Diagnosis according to claim 2, characterized in that, The model input terminal of the first prediction model is used to receive the four diagnostic vectors X, and the model output terminal is used to output the corresponding prediction vector Y; The first prediction model includes a first feature extraction network, a first linear layer, a second linear layer, a third linear layer, a fourth linear layer, a first classification layer, a second classification layer, a third classification layer, a fourth classification layer, and an output layer; The input of the first feature extraction network is connected to the input of the model, and its output is connected to the inputs of the first linear layer, the second linear layer, the third linear layer, and the fourth linear layer, respectively. The outputs of the first linear layer, the second linear layer, the third linear layer, and the fourth linear layer are connected to the inputs of the corresponding first classification layer, the second classification layer, the third classification layer, and the fourth classification layer, respectively. The outputs of the first classification layer, the second classification layer, the third classification layer, and the fourth classification layer are connected to the first input, the second input, the third input, and the fourth input of the output layer, respectively. The output of the output layer is connected to the output of the model. The first feature extraction network is implemented based on an MLP model structure; the first feature extraction network is used to extract features from the four diagnostic vectors X to obtain the corresponding feature vector Z and send it to the first linear layer, the second linear layer, the third linear layer and the fourth linear layer; The first linear layer performs a feature vector transformation on the feature vector Z in the hot / cold feature space to obtain a 1×9 feature vector R1, which is then sent to the first classification layer. The first classification layer substitutes the feature vector R1 into the Softmax function to calculate the probability and obtains the corresponding classification vector S1, which is then sent to the output layer. The classification vector S1 consists of 9 classification probabilities s. 1,i Composed of 9 classification probabilities s 1,i Each corresponds one-to-one with one of the nine types of cold and heat; The second linear layer performs a feature vector transformation on the feature vector Z in both virtual and real feature spaces to obtain a 1×4 feature vector R2, which is then sent to the second classification layer. The second classification layer substitutes the feature vector R2 into the Softmax function to calculate the probability and obtains the corresponding classification vector S2, which is then sent to the output layer. The classification vector S2 consists of four classification probabilities s. 2,j Composed of 4 classification probabilities s 2,j Each of the four types of virtual and real corresponds one-to-one; The third linear layer is used to perform a feature vector transformation on the feature vector Z in the feature space to obtain a 1×4 feature vector R3, which is then sent to the third classification layer. The third classification layer is used to substitute the feature vector R3 into the Softmax function to calculate the probability and obtain the corresponding classification vector S3, which is then sent to the output layer. The classification vector S3 consists of four classification probabilities s. 3,k Composed of 4 classification probabilities s 3,k Each of the four table types corresponds one-to-one; The fourth linear layer is used to perform a feature vector transformation on the feature vector Z in the Yin-Yang feature space to obtain a 1×8 feature vector R4, which is then sent to the fourth classification layer. The fourth classification layer is used to substitute the feature vector R4 into the Softmax function to calculate the probability and obtain the corresponding classification vector S4, which is then sent to the output layer. The classification vector S4 consists of 8 classification probabilities s. 8,g Composed of 8 classification probabilities s 8,g Each of the eight Yin-Yang types corresponds one-to-one; The output layer is used to take the cold / heat type corresponding to the highest probability in the classification vector S1 as the cold / heat type y1, the virtual / real type corresponding to the highest probability in the classification vector S2 as the virtual / real type y2, the surface / interior type corresponding to the highest probability in the classification vector S3 as the surface / interior type y3, and the yin / yang type corresponding to the highest probability in the classification vector S4 as the yin / yang type y4; and the corresponding prediction vector Y is composed of the cold / heat type y1, the virtual / real type y2, the surface / interior type y3, and the yin / yang type y4.

4. The method for predicting and analyzing health intervention factors based on the Eight Principles of Diagnosis according to claim 2, characterized in that, The construction of the first dataset through volunteer data collection and expert group classification specifically includes: Step 41: The predicted vector Y is composed of 9 types of cold and heat, 4 types of deficiency and excess, 4 types of exterior and interior, and 8 types of yin and yang, forming a total set of recruitment population types; and multiple volunteers are recruited to form a volunteer group based on the total set of recruitment population types; and multiple medical experts are recruited to form an expert group. Among them, the cold / heat, deficiency / excess, exterior / interior, and yin / yang types of each volunteer should have an intersection with the total set of types of the recruited population; the total set of cold / heat, deficiency / excess, exterior / interior, and yin / yang types of all volunteers should match the total set of types of the recruited population; the expert group should include at least several specialists or general practitioners in multiple fields of traditional Chinese medicine and health guidance experts in multiple fields of health promotion. Step 42: Each volunteer in the volunteer group is designated as the current volunteer; with authorization from the current volunteer or their guardian, data is collected on the four diagnostic vectors X of the current volunteer; the expert group then assesses the current volunteer's cold / heat, deficiency / excess, exterior / interior, and yin / yang types through expert consultation, and generates the corresponding four label vectors based on the assessment results. , , , ; and composed of the current volunteer's four diagnostic vectors X and the four label vectors. , , , Form a corresponding first data record; Step 43: The first dataset is composed of all the first data records obtained.

5. The method for predicting and analyzing health intervention factors based on the Eight Principles of Diagnosis according to claim 2, characterized in that, Training the first prediction model based on the first dataset specifically includes: Step 51: Based on a preset first segmentation ratio, the first dataset is randomly divided into two sub-datasets, denoted as the first training set and the first evaluation set. The first training set and the first evaluation set are each composed of multiple first data records; the total number of records in the first training set and the first evaluation set is denoted as N. tr N av The ratio of the total number of records in the first training set to the total number of records in the first evaluation set is N. tr :N av Satisfying the first segmentation ratio; the four label vectors of each of the first data records in the first training set. , , , Record as the corresponding , , , The four label vectors , , , Corresponding label probability , , , Record as the corresponding , , , 1 ≤ index u ≤ N tr ; Step 52: Input the four diagnostic vectors X of each of the first data records in the first training set into the first prediction model for processing, and denote the four classification vectors S1, S2, S3, and S4 generated during this processing as the corresponding S... 1,u S 2,u S 3,u S 4,u And the classification probabilities s corresponding to the four component vectors S1, S2, S3, and S4 are... 1,i s 2,j s 3,k s 4,g Let s be the corresponding s 1,u,i s 2,u,j s 3,u,k s 4,u,g And from the four classification vectors S obtained this time 1,u S 2,u S 3,u S 4,u Its four corresponding label vectors , , , Form the corresponding first prediction-label set; Step 53, obtain N tr Substituting each of the first prediction-label sets into the preset first model loss function L1, the corresponding first loss value is calculated. Wherein, the first model loss function L1 is composed of the cold and heat loss function L a Real and virtual loss functions L b Table-based loss function L c Yin-Yang loss function L d The composition is as follows: , , , , ; Step 54: Identify whether the first loss value meets the preset first loss value range; if it does, proceed to step 55; if it does not, perform a round of modulation on the model parameters of the first prediction model based on the preset first model optimizer in the direction of minimizing the first model loss function L1, and return to step 52 when the current round of modulation ends. The first model optimizer includes the Adam optimizer and the SGD optimizer. Step 55: Input the four diagnostic vectors X of each of the first data records in the first evaluation set into the first prediction model for processing, and generate four classification vectors S1, S2, S3, and S4 and their corresponding four label vectors during this processing. , , , Form the corresponding second prediction-label set; and based on the obtained N av The second prediction-label set is evaluated for accuracy, precision, recall, and F1 score to obtain the corresponding first accuracy, first precision, first recall, and first F1 score; Step 56: Identify whether the first accuracy, first precision, first recall, and first F1 score each satisfy their respective first accuracy range, first precision range, first recall range, and first F1 score range; if not, return to step 51; if yes, stop training and confirm that the model training is complete.

6. The method for predicting and analyzing health intervention factors based on the Eight Principles of Diagnosis according to claim 2, characterized in that, The process of obtaining a corresponding health intervention report by performing health intervention factor analysis based on the predicted vector Y and a preset intervention factor library specifically includes: The intervention factor records that intersect with the prediction vector Y in the intervention factor library are extracted to form a first set; the intervention factor records that intersect with the prediction vector Y in the intervention factor library are extracted to form a second set; and a corresponding third set is determined based on the first set and the second set, where the third set = the first set - (the first set ∩ the second set); all food names in the third set are extracted to form a corresponding natural factor set; and the corresponding health intervention report is composed of the prediction vector Y and the natural factor set.

7. An apparatus for performing the method for predictive analysis of health intervention factors based on the Eight Principles of Dialectics as described in any one of claims 1-6, characterized in that, The device includes: a model building module, a data acquisition module, a model training module, and a model application module; The model building module is used to construct a deep learning model, denoted as the first prediction model, for predicting the eight-principle syndrome differentiation based on the four diagnostic methods of traditional Chinese medicine. The first prediction model is used to perform four-symbol classification predictions on the cold / heat, deficiency / excess, exterior / interior, and yin / yang aspects corresponding to the eight-principle syndrome differentiation based on the input four diagnostic vectors X, and outputs the corresponding prediction vector Y. The four diagnostic vectors X include inspection vector x1, auscultation / olfaction vector x2, inquiry vector x3, and palpation vector x4; the prediction vector Y includes the cold / heat type y.

1. Deficiency / Excess type y2, Exterior / Interior type y3, Yin / Yang type y4; The cold / heat type y1 includes no cold / heat, cold in the upper body, cold in the lower body, cold in both upper and lower body, heat in the upper body, heat in the lower body, heat in both upper and lower body, cold in the upper body and heat in the lower body, heat in the upper body and cold in the lower body; The deficiency / excess type y2 includes balanced deficiency / excess, deficiency syndrome, excess syndrome, deficiency of vital energy and excess of pathogenic factors; The exterior / interior type y3 includes no exterior / interior, in the exterior, half exterior and half interior, in the interior; The Yin / Yang type y4 includes harmonious Yin and Yang, excess Yang, deficiency Yin, deficiency Yang, excess Yin, deficiency Yin and excess Yang, deficiency Yang and excess Yin, deficiency of both Yin and Yang; The data acquisition module is used to construct the first dataset through volunteer data collection and expert group classification; The model training module trains the first prediction model based on the first dataset; The model application module is used to receive the four diagnostic vectors X input by the user after model training; input the current four diagnostic vectors X into the first prediction model to predict and obtain the corresponding prediction vector Y; and perform health intervention factor analysis based on the prediction vector Y and a preset intervention factor library to obtain the corresponding health intervention report; and provide feedback of the health intervention report to the current user; the intervention factor library includes multiple intervention factor records; each intervention factor record corresponds to a type of edible plant or meat; the intervention factor record includes food name, food description, instructions on how to eat it, instructions on dietary restrictions, a set of applicable types of the eight principles, and a set of prohibited types of the eight principles; the food description is used to describe the current... The document provides basic information and efficacy details for the food; the instructions on consumption methods describe the common or optimal ways to consume the food; the instructions on dietary restrictions explain any contraindications for the food; the set of applicable types based on the Eight Principles summarizes the applicable types of the food based on their cold / hot, deficiency / excess, exterior / interior, and yin / yang characteristics, specifically consisting of one or more suitable types, each of which represents a specific type of cold / hot, deficiency / excess, exterior / interior, or yin / yang; and the set of prohibited types based on the Eight Principles summarizes the prohibited types of the food based on their cold / hot, deficiency / excess, exterior / interior, and yin / yang characteristics, specifically consisting of one or more prohibited types, each of which represents a specific type of cold / hot, deficiency / excess, exterior / interior, or yin / yang.

8. An electronic device, characterized in that, include: Memory, processor, and transceiver; The processor is configured to be coupled to the memory, read and execute instructions in the memory to implement the method according to any one of claims 1-6; The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a computer, cause the computer to perform the method according to any one of claims 1-6.