A traditional Chinese medicine syndrome classification method, system, device and medium

By combining first-order logic rules and deep neural networks, a syndrome classification model is constructed using knowledge from the field of traditional Chinese medicine, which solves the problem of syndrome differentiation in traditional Chinese medicine and improves the accuracy and intelligence of syndrome classification.

CN115862883BActive Publication Date: 2026-05-01HENAN UNIV OF SCI & TECH
View PDF -1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HENAN UNIV OF SCI & TECH
Filing Date
2022-12-05
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Traditional Chinese medicine (TCM) diagnosis struggles to accurately distinguish between disease, syndrome, and symptom. Existing machine learning methods lack domain knowledge support, resulting in low accuracy in TCM syndrome classification.

Method used

By combining first-order logic rules and deep neural networks, and utilizing the knowledge of traditional Chinese medicine in the training dataset, a syndrome classification model is constructed through mutual information feature selection and cross-entropy loss adjustment.

Benefits of technology

It improves the accuracy and reliability of TCM syndrome classification, conforms to the TCM syndrome differentiation and treatment principles, and enhances the effectiveness of intelligent syndrome differentiation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115862883B_ABST
    Figure CN115862883B_ABST
Patent Text Reader

Abstract

The application discloses a traditional Chinese medicine syndrome classification method, system, device and medium, and relates to the field of traditional Chinese medicine syndrome classification. The method comprises the following steps: acquiring a symptom to be classified; inputting the symptom to be classified into a syndrome classification model to obtain a classification result; the classification result is a syndrome name; wherein the syndrome classification model is obtained by training a deep neural network model by using a first-order logic rule as a constraint and by using a training data set; the training data set comprises a plurality of historical symptom information and a plurality of real syndromes; and the first-order logic rule is a mapping relationship between symptoms and syndromes compiled by traditional Chinese medicine field knowledge. The application combines the field knowledge in the form of the first-order logic with the deep neural network, and improves the effect and classification accuracy of the traditional Chinese medicine syndrome classification.
Need to check novelty before this filing date? Find Prior Art

Description

A method, system, equipment and medium for classifying syndromes in Traditional Chinese Medicine Technical Field

[0001] This invention relates to the field of TCM syndrome classification, and in particular to a TCM syndrome classification method, system, device and medium. Background Technology

[0002] The diagnostic and treatment process in Traditional Chinese Medicine (TCM) is "syndrome differentiation and treatment." Specifically, the doctor must first determine the patient's syndrome and then begin treatment based on this conclusion. Therefore, syndrome differentiation is one of the most important processes in TCM. Traditionally, syndrome differentiation involves the doctor observing and analyzing the patient's symptoms to obtain the basic information about the disease. However, because the human body is a complex organic whole, the relationship between symptoms and diseases is intricate, making it difficult to identify the correct syndrome. Furthermore, the wide variety and diverse combinations of symptoms further increase the difficulty of syndrome differentiation. In particular, TCM syndrome differentiation requires accurately distinguishing between disease, syndrome, and symptoms; however, the lack of a unified standard in the thousands of years of TCM development makes it difficult to differentiate these three elements. These are all problems that TCM urgently needs to solve.

[0003] Traditional Chinese medicine (TCM) diagnosis can be viewed as a classification problem, and some scholars have attempted to solve it using machine learning methods. Traditional machine learning algorithms, such as Decision Trees, Support Vector Machines (SVM), and k-Nearest Neighbors (KNN), have been designed for TCM disease classification and have achieved good results in TCM syndrome classification. However, their research focuses on a specific disease or syndrome, and their performance is limited to data containing a large number of features, making them unsuitable as general diagnostic methods. In recent years, some scholars have used deep learning algorithms such as Topic Models, Generative Clinical Networks (GCN), and Derivative Databases (DBN) to simulate the TCM diagnostic process. They designed algorithms and trained them using datasets containing symptoms and prescriptions, obtaining prescription recommendations. However, they did not clearly define the relationships between syndromes, which does not align with the TCM principle of "syndrome differentiation and treatment." Furthermore, the lack of domain knowledge support has led to skepticism from doctors regarding the results of these methods. Summary of the Invention

[0004] The purpose of this invention is to provide a method, system, device, and medium for classifying TCM syndromes, so as to improve the accuracy of TCM syndrome classification.

[0005] To achieve the above objectives, the present invention provides the following solution:

[0006] A method for classifying syndromes in Traditional Chinese Medicine, including:

[0007] Obtain the symptoms to be classified;

[0008] The symptoms to be classified are input into the syndrome classification model to obtain the classification result; the classification result is the syndrome name.

[0009] The syndrome classification model is obtained by training a deep neural network model using a training dataset, with first-order logic rules as constraints. The training dataset includes multiple historical symptom information and multiple real syndromes. The first-order logic rules are the mapping relationship between symptoms and syndromes compiled from knowledge in the field of traditional Chinese medicine.

[0010] Optionally, the step of training the deep neural network model using a training dataset with first-order logic rules as constraints specifically includes:

[0011] Construct a deep neural network model;

[0012] The training dataset is filtered using a feature selection method based on mutual information to obtain a second training dataset;

[0013] The second training dataset is input into the deep neural network model to obtain the predicted classification result;

[0014] Calculate the cross-entropy loss value between the predicted classification result and the actual symptoms;

[0015] The hyperparameters of the deep neural network model are adjusted based on the cross-entropy loss value. When the cross-entropy loss value is less than a set threshold, the training ends, and the deep neural network model with the current hyperparameters becomes the syndrome classification model.

[0016] Optionally, the step of using a feature selection method based on mutual information to filter the training dataset to obtain a second training dataset specifically includes:

[0017] For each historical symptom and each actual syndrome in the training dataset, a unique identifier is generated to obtain training samples under the unique identifier, which constitute an intermediate training dataset; the training samples include a pair of historical symptom information and actual syndrome.

[0018] The intermediate training dataset is filtered using a feature selection method based on mutual information to obtain a second training dataset.

[0019] Optionally, the step of using a feature selection method based on mutual information to filter the intermediate training dataset to obtain a second training dataset specifically includes:

[0020] Using formula Calculate the mutual information value of each training sample under a unique identifier; where s represents historical symptom information and y represents the actual symptoms;

[0021] Select a predetermined number of the mutual information values ​​from largest to smallest;

[0022] The training samples corresponding to the mutual information values ​​under the unique identifiers are used as the second training dataset.

[0023] Optionally, the step of inputting the second training dataset into the deep neural network model to obtain the predicted classification result specifically includes:

[0024] The second training dataset is classified to obtain preliminary classification results;

[0025] The preliminary classification results are corrected using first-order logic rules to obtain the predicted classification results.

[0026] A traditional Chinese medicine syndrome classification system, comprising:

[0027] The data acquisition module is used to acquire the symptoms to be classified.

[0028] The classification module is used to input the symptoms to be classified into the syndrome classification model and obtain the classification result; the classification result is the syndrome name.

[0029] The syndrome classification model is obtained by training a deep neural network model using a training dataset, with first-order logic rules as constraints. The training dataset includes multiple historical symptom information and multiple real syndromes. The first-order logic rules are the mapping relationship between symptoms and syndromes compiled from knowledge in the field of traditional Chinese medicine.

[0030] An electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor runs the computer program to enable the electronic device to perform the above-described TCM syndrome classification method.

[0031] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for classifying TCM syndromes.

[0032] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0033] This invention provides a method for TCM syndrome classification, which involves acquiring symptoms to be classified; inputting the symptoms into a syndrome classification model to obtain a classification result; the classification result is the syndrome name; wherein, the syndrome classification model is obtained by training a deep neural network model using a training dataset with first-order logic rules as constraints; the training dataset includes multiple historical symptom information and multiple real syndromes; the first-order logic rules are mapping relationships between symptoms and syndromes compiled from TCM domain knowledge. This invention improves the effectiveness and accuracy of TCM syndrome classification by combining domain knowledge in the form of first-order logic with deep neural networks. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0035] Figure 1 is a flowchart of a TCM syndrome classification method provided by the present invention;

[0036] Figure 2 is a schematic diagram of the training process of the syndrome classification model of the present invention;

[0037] Figure 3 is a flowchart of the training process of the candidate classification model of the present invention;

[0038] Figure 4 is a data processing flowchart of the present invention;

[0039] Figure 5 is a flowchart of the deep neural network model training process of the present invention;

[0040] Figure 6 is a flowchart of the first-order logic knowledge module processing of the present invention;

[0041] Figure 7 is a structural diagram of a TCM syndrome classification system provided by the present invention. Detailed Implementation

[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0043] The purpose of this invention is to provide a method, system, device, and medium for classifying TCM syndromes, so as to improve the accuracy of TCM syndrome classification.

[0044] This invention relates to the field of deep learning technology. It proposes a TCM syndrome classification method based on knowledge constraints and deep networks by combining knowledge in the field of traditional Chinese medicine. This method can quickly and accurately provide syndrome classification results based on the input symptoms.

[0045] To address the issues of low levels of intelligence in traditional Chinese medicine (TCM) and shortage of physician resources, this invention combines first-order logical domain knowledge with deep neural networks, which can significantly improve the effectiveness of syndrome classification. Furthermore, the etiology and location domain knowledge used are based on the guidance of TCM experts, which has positive implications for the reliability of TCM intelligence.

[0046] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0047] As shown in Figure 1, a TCM syndrome classification method of the present invention includes:

[0048] Step 101: Obtain the symptoms to be classified.

[0049] Step 102: Input the symptoms to be classified into the syndrome classification model to obtain the classification result; the classification result is the syndrome name.

[0050] The syndrome classification model is obtained by training a deep neural network model using a training dataset, with first-order logic rules as constraints. The training dataset includes multiple historical symptom information and multiple real syndromes. The first-order logic rules are the mapping relationship between symptoms and syndromes compiled from knowledge in the field of traditional Chinese medicine.

[0051] In practical applications, the training process of the TCM syndrome classification model includes three modules, as shown in Figures 2 and 3. This invention includes three modules: a data processing module, a deep neural network module, and a first-order logic knowledge module. This invention collects and processes clinical data through the data processing module, then trains the deep neural network using a dual attention mechanism based on etiology and location in the deep neural network module, and finally uses the first-order logic knowledge module to correct the training results of the deep network, thus obtaining accurate syndrome differentiation results.

[0052] The specific training process is as follows:

[0053] Step S1: Use a feature selection method based on mutual information to filter the training dataset to obtain a second training dataset.

[0054] Further, step S1 specifically includes:

[0055] Step S11: Generate a unique identifier for each historical symptom and each actual syndrome in the training dataset to obtain training samples under the unique identifier, forming an intermediate training dataset. The training samples include a pair of historical symptom information and actual syndrome.

[0056] Step S12: Use a feature selection method based on mutual information to filter the intermediate training dataset to obtain the second training dataset, as follows:

[0057] Using formula Calculate the mutual information value for each training sample under a unique identifier. Here, s represents historical symptom information, and y represents the actual symptoms.

[0058] Select a set number of the mutual information values ​​from largest to smallest.

[0059] The training samples corresponding to the mutual information values ​​under the unique identifiers are used as the second training dataset.

[0060] (I) Data Processing Module

[0061] First, patient symptom data (historical symptom information) is collected from medical record texts. This data is then categorized and formatted according to examination, auscultation and olfaction, inquiry, and pulse diagnosis. Since the symptom data may contain many features that affect system performance, but the impact of these features is limited, supervised feature selection is performed before conducting experiments. Statistical methods are used to calculate the correlation between symptom data and syndrome labels. The workflow of the data processing module is shown in Figure 4.

[0062] (1) Determine whether the labels of the disease data are complete. If they are complete, proceed to (3); otherwise, proceed to (2). The labels of the disease data include information on the four diagnostic methods, etiology, location of the disease, and syndrome name.

[0063] (2) Disease data with incomplete labels need to be annotated by domain experts, that is, the four diagnostic methods symptoms, etiology, location of disease and syndrome name are marked for the disease data. After the domain experts have finished processing, it is considered as data with complete labels and is transferred to (3).

[0064] (3) Generate a unique identifier for the current disease data.

[0065] (4) Determine whether the current disease data has a unique identifier. If yes, proceed to (5); otherwise, generate a new unique identifier for the current disease data.

[0066] (5) Enter the current disease data into the system according to the categories of observation, auscultation, inquiry and palpation, and format it.

[0067] (6) Obtain the formatted data that has been entered into the system.

[0068] (7) Use a feature selection method based on mutual information to filter formatted data. Mutual information is expressed by the following formula:

[0069] Here, s and y represent historical symptom information and actual syndrome labels, respectively. The larger the value of M(S;Y), the stronger the correlation between the two variables.

[0070] (8) Input the data features and labels after feature filtering into the deep network module.

[0071] Step S2: Construct a deep neural network model.

[0072] Step S3: Input the second training dataset into the deep neural network model to obtain the predicted classification result.

[0073] Further, step S3 specifically includes:

[0074] The second training dataset is classified to obtain preliminary classification results.

[0075] The preliminary classification results are corrected using first-order logic rules to obtain the predicted classification results.

[0076] Step S4: Calculate the cross-entropy loss value between the predicted classification result and the actual symptoms.

[0077] Step S5: Adjust the hyperparameters of the deep neural network model according to the cross-entropy loss value. When the cross-entropy loss value is less than a set threshold, end the training. The deep neural network model with the current hyperparameters is the syndrome classification model.

[0078] (II) Deep Network Module

[0079] The deep network module integrates two knowledge-attention layers based on etiology and lesion location. First, a set of symptoms is input into the deep neural network model containing the two knowledge-attention layers to obtain preliminary classification results. Then, the preliminary classification results are weighted using first-order logic rules from the first-order logic knowledge module to obtain the predicted classification result. Let S = {s1, s2, ..., s...} n} represents the patient's symptoms, among which This represents one of the patient's symptoms. Given symptom S, the task aims to predict the patient's syndrome. At the same time, the etiology c that can be classified into syndromes know and lesion location l know Knowledge injection into the deep neural network model improves prediction accuracy. The workflow of the deep network module is shown in Figure 5.

[0080] (1) Construct a data embedding representation layer, in which a set of symptoms is represented as Where F(·) is a function of the data embedding representation layer. The embedding S is encoded using a one-hot encoding method, and d is the number of symptoms. This means all symptoms x i The matrix formed by superposition, where N represents the number of samples.

[0081] (2) Constructing the etiology attention vector c know ,in Let be a vector representing symptoms for which the cause of an illness can be identified. Let c represent the symptoms in y that indicate the cause of the illness. know,iThe value is 1 if it is not 1, and 0 otherwise. It is designed based on the research of authoritative experts in the field and is recognized as industry-wide knowledge.

[0082] (3) Construct an etiology knowledge attention layer. In this layer, an etiology attention mechanism is used to strengthen the representation of the relationship between symptoms and etiology. Specifically, symptoms and etiology knowledge are first soft-aligned, and X and c are calculated using a dot product. know Similarity between them:

[0083] (4) For A c A softmax function is applied to weight potentially important symptom features using etiological knowledge: α c,i =softmax(A c ).

[0084] (5) Representing the combined perception of etiological knowledge and symptoms as Each row is a weighted sum of the symptom representations:

[0085] (6) Constructing the lesion site attention vector l know ,in Let be a vector representing symptoms that can pinpoint the location of a lesion in y. know,i The value is 1 if it is not 1, and 0 otherwise. It is designed based on the research of authoritative experts in the field and is recognized as industry-wide knowledge.

[0086] (7) Construct a lesion location knowledge attention layer. In this layer, a lesion location attention mechanism is used to strengthen the representation of the relationship between symptoms and lesions. Specifically, firstly, the symptom and lesion location knowledge are softly aligned, and then the dot product is used to calculate X and l. know Similarity between them:

[0087] (8) For A l Apply a softmax function: α l,i =softmax(A l ).

[0088] (9) Represent the combined perception of lesion location knowledge and symptoms as Each row is a weighted sum of the symptom representations:

[0089] (10) In order to make full use of etiological and lesion location attention information, X, Perform splicing and fusion:

[0090] (11) Construct an output layer in which the fused representation Z is provided to an output layer with a softmax activation function, and the output layer computes the probability distribution δ = softmax(W). θ Z), where W θ These are trainable parameters.

[0091] (12) The output layer results are fed into the TCM knowledge constraint layer for adjustment. Generally, the final result is corrected by reweighting the output δ of the deep neural network. When the symptom S satisfies the first-order logic rule in the first-order logic knowledge module, the correlation value of y increases; otherwise, the correlation value of y decreases. Specifically, the output layer result δ is modified under the guidance of domain knowledge using the first-order logic constraint function d(·). The function d(·) strengthens or weakens y by judging whether the current preliminary classification result violates the first-order logic rule. Given the output result δ and the first-order logic rule M→Y, the domain knowledge in the first-order logic form is combined with the deep neural network, and the formula is expressed as: y=softmax(δ+βd(M)), where β is a hyperparameter representing the importance of domain knowledge. Detailed information about d(·) is shown in Table 1.

[0092] (13) Train a deep neural network model. Given a set of symptoms D = {s1, s2, ..., s...} n The system predicts the classification result. And the true symptom label Assuming there are k categories of labels, the predicted classification result of the i-th sample is represented as: The real label is represented as Training a deep neural network using cross-entropy loss is as follows:

[0093] (14) Adjust the various hyperparameters in the deep neural network to obtain the best network model.

[0094] (15) Save the deep network model with the best performance and show the system classification results.

[0095] (III) First-order logic knowledge module

[0096] As shown in Figure 6, the workflow of the first-order logic knowledge module is as follows: How can the positive interaction between first-order logic and domain knowledge influence the training results of a deep neural network?

[0097] (1) Determine whether the domain knowledge in the first-order logic knowledge module is applicable to the current syndrome classification task. If yes, proceed to (2); otherwise, continue to determine.

[0098] (2) Assign a unique identifier to the knowledge in the current domain.

[0099] (3) Determine whether the current domain knowledge has a unique identifier. If yes, proceed to (4); otherwise, reassign a unique identifier to the current domain knowledge.

[0100] (4) Using first-order logic to represent domain knowledge in the system. In this embodiment, the results of compiling some typical cold syndrome classification domain knowledge into first-order logic rules are as follows. These first-order logic rules are important basis for clinical syndrome classification.

[0101] 1) If a patient simultaneously presents with symptoms such as aversion to cold and preference for warmth, clear and fishy-smelling bodily fluids, and a clear and fishy odor, the condition can be diagnosed as a cold syndrome. This knowledge can be represented using first-order logic as TK1:M AC ∧M CW ∧M CS →Y, where M AC This indicates whether the patient experiences symptoms of aversion to cold and preference for warmth. M CW This indicates whether the patient's vomit, excrement, and blood are clear. CS This indicates whether the patient's sputum, vomit, and excrement have a fishy or clear odor. This rule will support the classification of syndromes with obvious cold characteristics.

[0102] 2) If the patient has symptoms of foul-smelling, cloudy fluids, meaning their vomit or excrement is cloudy and has a sour odor, then it can be determined that it is not a cold syndrome. This knowledge can be represented using first-order logic as TK2: This rule is primarily used to punish erroneous dialectical results.

[0103] 3) When a patient experiences symptoms such as contraction, urgency, and weakness in stretching, it can be diagnosed as a cold syndrome. That is, the patient will feel contraction, prefer pressure and warmth, have no sweating, and have a tight pulse. This knowledge can be represented using first-order logic as TK3:M AC ∧(M EC ∨M PR ∨M WA ∨M SW ∨M PT →Y, where M EC Indicates whether the patient experiences a contraction sensation, M PR Indicates whether you like pressing, M WA Indicates whether one prefers warmth, M SW Indicates whether or not you are sweating, M PT This indicates whether the pulse is tight or not. This rule adds support for identifying the "constriction sensation" as a characteristic feature of cold syndrome.

[0104] 4) If the patient's skin is dark, such as their face, nails, or affected areas, and their pulse is tight or slow, it can be classified as a cold syndrome. This knowledge is recorded as TK4: (M BF ∨M BN ∨M BD )∧(M PT ∨MPS →Y, where M BF M BN and M BD These indicate whether the patient has symptoms such as dark skin, black nails, or black skin disease. M PS This indicates whether the pulse is tight or slow. This rule emphasizes the importance of color in syndrome classification.

[0105] 5) The results Y of these first-order logic rules are non-differentiable and cannot be directly used in the computation of deep neural networks. Therefore, the Boolean operations of first-order logic are transformed into probabilistic logic, represented in a continuous real-valued space. Specifically, the variable M in the preconditions is associated with the corresponding neuron output x. Then, the logic rules are transformed into a softened version, and a set of functions that can map first-order logic to real values ​​are designed. In addition, a mapping function for negation predicates is also designed. The mapping function d(·) is shown in Table 1.

[0106] Table 1 Mapping Functions for First-Order Logic

[0107]

[0108]

[0109] Among them, M i Defined as the i-th variable in first-order logic, m i Defined as an associated neuron in a neural network.

[0110] (6) Store the first-order logic rules and mapping function d and wait for the deep network module to call them.

[0111] The core idea of ​​this invention is to use the aforementioned first-order logic rules to constrain the training process of deep networks, thereby achieving the goal of accurate syndrome classification. That is, the combined effect of case sample data and domain knowledge ultimately yields a reliable classification result y.

[0112] Example 2

[0113] To implement the method corresponding to Embodiment 1 above and achieve the corresponding functions and technical effects, a traditional Chinese medicine syndrome classification system is provided below, as shown in Figure 7, including:

[0114] The data acquisition module 701 is used to acquire the symptoms to be classified.

[0115] The classification module 702 is used to input the symptoms to be classified into the syndrome classification model to obtain the classification result; the classification result is the syndrome name.

[0116] The syndrome classification model is obtained by training a deep neural network model using a training dataset, with first-order logic rules as constraints. The training dataset includes multiple historical symptom information and multiple real syndromes. The first-order logic rules are the mapping relationship between symptoms and syndromes compiled from knowledge in the field of traditional Chinese medicine.

[0117] Example 3

[0118] The present invention also provides an electronic device, comprising: a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform the TCM syndrome classification method of Embodiment 1.

[0119] Example 4

[0120] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the TCM syndrome classification method of Embodiment 1.

[0121] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.

[0122] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for classifying syndromes in Traditional Chinese Medicine, characterized in that, include: Obtain the symptoms to be classified; input the symptoms to be classified into the syndrome classification model to obtain the classification result; The classification result is the syndrome name; wherein, the syndrome classification model is obtained by training a deep neural network model using a training dataset with first-order logic rules as constraints; the training dataset includes multiple historical symptom information and multiple real syndromes; the deep neural network model includes a data embedding representation layer, an etiology knowledge attention layer, a lesion location knowledge attention layer, an output layer, and a TCM knowledge constraint layer; the first-order logic rules are the mapping relationship between symptoms and syndromes compiled from TCM domain knowledge; the first-order logic rules include: if a patient simultaneously presents with symptoms of aversion to cold and preference for warmth, clear and fishy-smelling fluids, and clear and fishy odor, it is determined to be a cold syndrome, expressed in first-order logic as follows: : ,in, This indicates whether the patient has symptoms of aversion to cold and preference for warmth; Indicate whether the patient's vomit, excrement, and blood are clear; This indicates whether the patient's sputum, vomit, and excrement have a clear or fishy odor; Y represents the syndrome determined based on first-order logic rules; if the patient has symptoms of foul-smelling, watery fluids, it is determined that it is not a cold syndrome, and this is represented by first-order logic as... : When a patient exhibits symptoms of contraction, urgency, and weakness in extension, it is diagnosed as a cold syndrome, which can be represented using first-order logic as follows: : ,in, Indicate whether the patient experiences a contraction sensation. Indicate whether you like pressing, Indicates whether or not one prefers warmth. Indicates whether or not you are sweating. This indicates whether the pulse is tight or weak; if the patient has a dark complexion and a tight or slow pulse, it is classified as a cold syndrome, which can be represented using first-order logic as follows: : ,in, 、 and These indicate whether the patient has symptoms such as dark skin, black nails, or black disease. This indicates whether the pulse is tight or slow; the TCM knowledge constraint layer is used to weight the preliminary classification results output by the output layer to obtain the classification result, expressed by the formula: Where y represents the classification result; This is the initial classification result output by the output layer; It is a hyperparameter that represents the importance of domain knowledge; The first-order logic constraint mapping function is used. The deep neural network model is trained using a training dataset with first-order logic rules as constraints. Specifically, this includes: constructing a deep neural network model; filtering the training dataset using a feature selection method based on mutual information to obtain a second training dataset; inputting the second training dataset into the deep neural network model to obtain a predicted classification result; calculating the cross-entropy loss value between the predicted classification result and the actual syndrome; adjusting the hyperparameters of the deep neural network model according to the cross-entropy loss value; ending training when the cross-entropy loss value is less than a set threshold; and the deep neural network model with the current hyperparameters becoming the syndrome classification model. The second training dataset is then input into the deep neural network model to obtain a predicted classification result, specifically including: classifying the second training dataset to obtain a preliminary classification result; and correcting the preliminary classification result using first-order logic rules to obtain a predicted classification result.

2. The method for classifying TCM syndromes according to claim 1, characterized in that, The step of using a feature selection method based on mutual information to filter the training dataset to obtain a second training dataset specifically includes: generating a unique identifier for each historical symptom and each actual syndrome in the training dataset, obtaining training samples under the unique identifier, and forming an intermediate training dataset; the training samples include a pair of historical symptom information and actual syndrome; and using a feature selection method based on mutual information to filter the intermediate training dataset to obtain the second training dataset.

3. The method for classifying TCM syndromes according to claim 2, characterized in that, The step of using a feature selection method based on mutual information to filter the intermediate training dataset to obtain the second training dataset specifically includes: using the formula... Calculate the mutual information value of each training sample under the unique identifier code; where s is the historical symptom information and y is the actual syndrome; select a set number of the mutual information values ​​from largest to smallest; and use the training samples under the unique identifier code corresponding to the mutual information values ​​as the second training dataset.

4. A traditional Chinese medicine syndrome classification system, characterized in that, The TCM syndrome classification system described above is used to implement the TCM syndrome classification method according to any one of claims 1-3. The TCM syndrome classification system includes: a data acquisition module for acquiring symptoms to be classified; a classification module for inputting the symptoms to be classified into a syndrome classification model to obtain a classification result; the classification result is a syndrome name; wherein the syndrome classification model is obtained by training a deep neural network model using a training dataset with first-order logic rules as constraints; the training dataset includes multiple historical symptom information and multiple real syndromes; the deep neural network model includes a data embedding representation layer, an etiology knowledge attention layer, a lesion location knowledge attention layer, an output layer, and a TCM knowledge constraint layer; the first-order logic rules are the mapping relationship between symptoms and syndromes compiled from TCM domain knowledge; the first-order logic rules include: if a patient simultaneously experiences symptoms of aversion to cold and preference for warmth, clear and fishy-smelling fluids, and clear and fishy odors, it is determined to be a cold syndrome, expressed in first-order logic as follows: : ,in, This indicates whether the patient has symptoms of aversion to cold and preference for warmth; Indicate whether the patient's vomit, excrement, and blood are clear; This indicates whether the patient's sputum, vomit, and excrement have a clear or fishy odor; if the patient has symptoms of watery, foul-smelling fluids, confirming it is not a cold syndrome, this can be represented using first-order logic as follows: : When a patient exhibits symptoms of contraction, urgency, and weakness in extension, it is diagnosed as a cold syndrome, which can be represented using first-order logic as follows: : ,in, Indicate whether the patient experiences a contraction sensation. Indicate whether you like pressing, Indicates whether or not one prefers warmth. Indicates whether or not you are sweating. This indicates whether the pulse is tight or weak; if the patient has a dark complexion and a tight or slow pulse, it is classified as a cold syndrome, which can be represented using first-order logic as follows: : ,in, 、 and These indicate whether the patient has symptoms such as dark skin, black nails, or black disease. This indicates whether the pulse is tight or slow; the TCM knowledge constraint layer is used to weight the preliminary classification results output by the output layer to obtain the classification result, expressed by the formula: Where y represents the classification result; This is the initial classification result output by the output layer; It is a hyperparameter that represents the importance of domain knowledge; It is a first-order logic constraint mapping function.

5. An electronic device, characterized in that, include: A memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to cause the electronic device to perform the traditional Chinese medicine syndrome classification method according to any one of claims 1-3.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the TCM syndrome classification method according to any one of claims 1-3.