Deep learning-based syndrome classification matching system and method

CN123033755APending Publication Date: 2026-11-03XIANKE GROUP HOLDINGS LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611094066.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing technologies are unable to effectively express the complex semantic relationships and hierarchical structures between TCM syndromes. Furthermore, diagnostic and treatment information from different sources differs in expression methods, data structures, and time dimensions, making it difficult for the syndrome identification process to fully utilize complete diagnostic and treatment information.

Method used

The deep learning-based syndrome classification and matching system acquires TCM diagnosis and treatment data, performs terminology normalization and feature extraction, combines knowledge graphs for semantic alignment, constructs evidence features, and uses a deep learning model for encoding. It calculates the similarity between the evidence vector and the syndrome prototype, performs syndrome matching, and optimizes the model through consistency constraints to improve matching accuracy.

Benefits of technology

It achieves stable syndrome identification and matching under complex evidence conditions, and can comprehensively utilize multi-source diagnosis and treatment information and evidence relationship structure to output key evidence and evidence path related to syndrome determination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123033755A_ABST
    Figure CN123033755A_ABST
Patent Text Reader

Abstract

The application discloses a syndrome classification matching system and method based on deep learning, and belongs to the technical field of data classification matching. The method specifically comprises the following steps: obtaining traditional Chinese medicine diagnosis and treatment data of an individual to be diagnosed, constructing evidence characteristics, constructing a syndrome prototype library, and using a deep learning model to encode the evidence characteristics to obtain an evidence vector. The similarity between the evidence vector and each syndrome prototype is calculated by self-adaptive measurement to obtain a syndrome candidate set and a corresponding matching score. The deep learning model is optimized by consistency constraint, the evidence characteristics are counterfactually disturbed, and the syndrome matching score is recalculated. The target syndrome category or syndrome combination is determined according to the optimized matching score, and the corresponding syndrome matching result and key evidence are output. The application can realize stable syndrome recognition and matching under complex evidence conditions, and can output key evidence and evidence path related to syndrome determination.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data classification and matching technology, specifically a syndrome classification and matching system and method based on deep learning. Background Technology

[0002] With the development of medical information technology, a large amount of TCM diagnosis and treatment data has been gradually accumulated in the form of electronic medical records, consultation records, tongue and pulse descriptions, and laboratory indicators. Some studies have begun to explore the use of machine learning or deep learning methods to automatically identify and classify TCM syndromes. These technologies typically extract features from symptoms or signs and use classification models to predict syndromes.

[0003] Most existing technologies treat syndrome recognition as a routine multi-classification task, relying mainly on fixed feature vectors for training, which makes it difficult to express the complex semantic relationships and hierarchical structures between TCM syndromes. At the same time, diagnostic and treatment information from different sources varies significantly in terms of expression, data structure, and time dimension. Traditional models have limited ability to integrate multi-source heterogeneous data, making it difficult for the syndrome recognition process to fully utilize complete diagnostic and treatment information. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention proposes a syndrome classification and matching system and method based on deep learning.

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

[0006] Deep learning-based syndrome classification and matching methods include:

[0007] Acquire individual syndrome-related data, perform terminology normalization and feature extraction on the syndrome-related data, and combine it with knowledge graph for semantic alignment to construct evidence features. The syndrome-related data includes textual information on the four diagnostic methods, structured test indicators, or physical signs records.

[0008] A syndrome prototype library is constructed, and the evidence features are encoded using a deep learning model to obtain evidence vectors. The similarity between the evidence vectors and each syndrome prototype is calculated using an adaptive metric to obtain a syndrome candidate set and corresponding matching scores.

[0009] The deep learning model is optimized by using consistency constraints, the evidence features are subjected to counterfactual perturbation, and the evidence matching score is recalculated.

[0010] The target syndrome category or syndrome combination is determined based on the optimized matching score, and the corresponding syndrome matching results and key evidence are output.

[0011] Specifically, the construction of evidence features includes:

[0012] Acquire TCM diagnosis and treatment data of the individual to be diagnosed within a preset treatment period, and collect them according to data source and time order to form a set of original evidence fragments. The TCM diagnosis and treatment data includes medical record text, consultation record, tongue image description, pulse image description, test indicators and symptom change record.

[0013] The original evidence fragment set is segmented into words and identified as a symptom phrase. Different expressions conveying the same diagnostic or treatment meaning are uniformly mapped into standard terms and reorganized into a standard evidence unit sequence according to preset rules.

[0014] Contextual analysis is performed on the standard evidence unit sequence, and related standard evidence units are combined to form a set of candidate dialectical clues;

[0015] The evidence units in the candidate diagnostic clues are mapped to the corresponding nodes in the TCM knowledge graph, and evidence association paths are formed based on the diagnostic relationships between the nodes.

[0016] Based on the standard evidence unit type, knowledge graph mapping results, and time sequence, the evidence association path is organized and identified to generate evidence features.

[0017] Specifically, the process of organizing and identifying the evidence association paths based on standard evidence unit types, knowledge graph mapping results, and time sequence to generate evidence features includes:

[0018] According to the category attributes of standard evidence units, the evidence units in the evidence association path are divided, and according to the mapping nodes of each evidence unit in the knowledge graph, they are assigned to the corresponding syndrome element level to form a multi-layer evidence path set.

[0019] The evidence units in the multi-layered evidence path set are rearranged in chronological order, and similar evidence units appearing in consecutive time segments are merged and organized to form a chronological evidence chain segment.

[0020] Based on the node relationships in the knowledge graph, adjacent evidence units in the temporal evidence chain segment are marked with relationships, and an evidence relationship sequence is constructed according to the order in which the relationships appear.

[0021] The evidence relationship sequence is combined and labeled with the corresponding evidence unit category information, time sequence, and knowledge graph node relationship to form an evidence feature sequence.

[0022] Specifically, the process of constructing a syndrome prototype library and encoding the evidence features using a deep learning model to obtain evidence vectors, and then calculating the similarity between the evidence vectors and each syndrome prototype using an adaptive metric to obtain a syndrome candidate set and corresponding matching scores, includes:

[0023] Historical diagnostic samples corresponding to preset syndrome categories are collected, core evidence features and related evidence features are extracted, and a set of syndrome prototypes corresponding to the syndrome categories is constructed according to the differences in diagnostic paths.

[0024] The evidence features are input into a deep learning model, and the order of evidence units, evidence relationships and knowledge graph node information are jointly encoded to generate the evidence vector of the individual to be diagnosed.

[0025] The evidence vector is pre-matched with each syndrome prototype set, and the target syndrome prototypes to be matched are selected based on the evidence vector of the individual to be diagnosed.

[0026] Based on the evidence composition and temporal order of the evidence vectors, an adaptive measurement rule is used to calculate the similarity relationship between the evidence vectors and each target syndrome prototype;

[0027] The syndrome categories are sorted according to the similarity relationship to determine the syndrome candidate set and generate the corresponding matching score.

[0028] Specifically, the step of calculating the similarity relationship between the evidence vector and each target symptom prototype using an adaptive metric rule based on the evidence composition and temporal order of the evidence vector includes:

[0029] Read the evidence category information, knowledge graph node relationships and time sequence in the evidence vector, and determine the corresponding dialectical measurement scenario accordingly;

[0030] Based on the dialectical measurement scenario, select the corresponding target measurement rule from the preset set of adaptive measurement rules;

[0031] Based on the target measurement rule, the evidence vector is divided into multiple comparison segments, and each segment is matched with the corresponding segment in the target syndrome prototype.

[0032] The completed comparison segments are aggregated to form the similarity relationship between the evidence vector and the prototype of each target symptom.

[0033] Specifically, the syndrome categories are sorted according to the similarity relationship to determine the syndrome candidate set, and corresponding matching scores are generated, including:

[0034] The similarity relationships between the evidence vectors and the prototypes of each syndrome are merged according to the syndrome category to form the category matching records corresponding to each syndrome category;

[0035] Based on the category matching records of each syndrome category, and combined with the organ orientation and cold / heat and deficiency / excess attributes in the knowledge graph, the syndrome categories are arranged in order to form the syndrome category ranking results;

[0036] Based on the sorting results of the syndrome categories, select syndrome categories that are located within the preset sorting interval, and combine them according to the coexistence relationship or primary and secondary relationship between syndromes to form a syndrome candidate set;

[0037] Based on the sorting results of the syndrome categories and the category matching records corresponding to each syndrome category, a corresponding matching score is generated for each candidate in the syndrome candidate set.

[0038] Specifically, the optimization of the deep learning model through consistency constraints, the counterfactual perturbation of the evidence features, and the recalculation of the symptom matching score include:

[0039] Identify the key evidence units, accompanying evidence units, and constraining evidence units involved in the current symptom matching, and determine the key evidence units, accompanying evidence units, and constraining evidence units as different types of counterfactual perturbation anchor points respectively;

[0040] Based on the counterfactual disturbance anchor point, the original evidence features are replaced, deleted, inserted, time-shifted, or attribution rewritten to generate counterfactual evidence features corresponding to the original evidence features.

[0041] The original evidence features and each counterfactual evidence feature are re-input into the deep learning model to obtain the first matching result corresponding to the original evidence features and the second matching result corresponding to each counterfactual evidence feature.

[0042] The first matching result is compared with each of the second matching results to generate constraint instructions that change the original syndrome ranking relationship or switch the candidate syndrome attribution; and the constraint instructions are organized into a set of consistency constraints.

[0043] Based on the set of consistency constraints, the deep learning model is iteratively adjusted, and after the adjustment is completed, the original evidence features are recalculated for syndrome matching to generate a set of candidate syndromes optimized by consistency constraints and corresponding matching scores.

[0044] Specifically, based on the aforementioned consistency constraint set, the deep learning model is iteratively adjusted, and after the adjustment is completed, the original evidence features are recalculated for syndrome matching to generate a consistency constraint-optimized candidate syndrome set and corresponding matching scores, including:

[0045] Each constraint instruction in the consistency constraint set is mapped to the evidence encoding processing, syndrome prototype comparison processing, and syndrome ranking processing stages, forming a corresponding constraint action sequence;

[0046] Based on the aforementioned constraint sequence, the evidence encoding relationship, prototype matching relationship, and syndrome ranking relationship in the deep learning model are iteratively adjusted;

[0047] After completing the iterative adjustment, the original evidence features are re-input into the deep learning model, and the evidence encoding, syndrome prototype comparison and syndrome ranking processes are re-executed to obtain new syndrome matching results.

[0048] Based on the new syndrome matching results, a set of candidate syndromes is determined, and a matching score corresponding to each candidate syndrome is generated.

[0049] Specifically, the step of determining the target syndrome category or syndrome combination based on the optimized matching score and outputting the corresponding syndrome matching results and key evidence includes:

[0050] Read the matching scores of each syndrome candidate after consistency constraint optimization, and determine the target syndrome category or syndrome combination based on the score ranking and the coexistence or primary and secondary relationship between syndromes;

[0051] For the target syndrome category or syndrome combination, starting from the original evidence features, backtracking is performed along the order of evidence units and the knowledge graph mapping path to form the corresponding dialectical path record;

[0052] Based on the dialectical path record, identify the evidence units involved in the syndrome determination and determine them as the key evidence set corresponding to the target syndrome;

[0053] The target syndrome category or syndrome combination, the corresponding matching score, and the key evidence set are correlated and output to form a syndrome matching result.

[0054] A deep learning-based syndrome classification and matching system is used to implement the deep learning-based syndrome classification and matching method, including: an evidence feature construction module, a similarity calculation module, a recalculation module, and a classification and matching module;

[0055] The evidence feature construction module is used to acquire TCM diagnosis and treatment data of the individual to be diagnosed, perform terminology normalization and feature extraction on the TCM diagnosis and treatment data, and perform semantic alignment in combination with TCM knowledge graph to construct evidence features. The TCM diagnosis and treatment data includes text of four diagnostic methods, structured test indicators or physical signs records.

[0056] The similarity calculation module is used to construct a syndrome prototype library, and to encode the evidence features using a deep learning model to obtain evidence vectors. The similarity between the evidence vectors and each syndrome prototype is calculated through adaptive metric to obtain a syndrome candidate set and corresponding matching scores.

[0057] The recalculation module is used to optimize the deep learning model through consistency constraints, perform counterfactual perturbations on the evidence features, and recalculate the evidence matching score.

[0058] The classification and matching module is used to determine the target syndrome category or syndrome combination based on the optimized matching score, and output the corresponding syndrome matching results and key evidence.

[0059] Compared with the prior art, the beneficial effects of the present invention are:

[0060] This invention proposes a syndrome classification and matching system and method based on deep learning. It constructs evidence features with both evidence category and temporal sequence information. Based on this, a syndrome prototype library is established, and a deep learning model is used to encode and match the evidence features, obtaining a candidate set of syndromes and matching scores. The deep learning model is further iteratively optimized, and the original evidence is recalculated for syndrome matching, ultimately determining the target syndrome category or combination and outputting the corresponding key evidence path. Through this technical solution, the syndrome classification process can comprehensively utilize multi-source diagnostic and treatment information and evidence relationship structures to form a matching mechanism corresponding to the logic of traditional Chinese medicine syndrome differentiation. This enables stable syndrome identification and matching under complex evidence conditions and allows for the output of key evidence and evidence paths related to syndrome determination. Attached Figure Description

[0061] Figure 1 A flowchart of the syndrome classification and matching method based on deep learning provided by this invention;

[0062] Figure 2 A schematic diagram of the prototype structure of the syndrome provided by the present invention;

[0063] Figure 3 The counterfactual consistency optimization flowchart provided by this invention;

[0064] Figure 4 The system architecture diagram of the syndrome classification and matching system based on deep learning provided by this invention. Detailed Implementation

[0065] The present application will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application. These all fall within the protection scope of the present application.

[0066] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0067] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. In addition, the terms "first," "second," and "third" used in this application do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.

[0068] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items.

[0069] Example 1

[0070] Please see Figures 1-3 The present invention provides an embodiment of a syndrome classification and matching method based on deep learning, comprising the following specific steps:

[0071] Step S1: Obtain the TCM diagnosis and treatment data of the individual to be diagnosed, perform terminology normalization and feature extraction on the TCM diagnosis and treatment data, and perform semantic alignment in combination with the TCM knowledge graph to construct evidence features. The TCM diagnosis and treatment data includes textual information on the four diagnostic methods, structured test indicators or physical signs records.

[0072] It should be noted that the syndrome-related data are the same as TCM diagnosis and treatment data.

[0073] The specific steps of step S1 are as follows:

[0074] Step S101: Obtain TCM diagnosis and treatment data generated by the individual to be diagnosed within a preset treatment period, and collect the data according to the data source and time order to form a set of original evidence fragments. The TCM diagnosis and treatment data includes medical record text, consultation record, tongue image description, pulse image description, test indicators and symptom change record.

[0075] In this embodiment, diagnostic and treatment data related to the individual seeking medical attention are extracted from the electronic medical record system, the consultation record system, and the laboratory information records. This includes physician-written medical record texts, symptom description records generated during consultations, textual descriptions of tongue and pulse, structured laboratory test data, and symptom change information recorded at different consultation times. The acquired data is then preliminarily grouped according to its source type. For example, medical record texts and consultation records are categorized as subjective symptom description data, tongue and pulse descriptions as physical sign observation data, laboratory test indicators as objective indicator data, and symptom change records as disease progression information data. After completing the source classification, the time stamps in each type of data are read, and the consultation time or record time is used as the time anchor point to merge the medical information formed at the same time node or adjacent time segments. This organizes the information that is discretely distributed in different data sources into several medical record segments with temporal continuity. On this basis, the symptom descriptions, signs and indicator changes in each medical record segment are further semantically segmented, so that each segment corresponds to a relatively independent medical evidence expression unit, and finally forms a set of original evidence segments arranged in chronological order.

[0076] Step S102: The original evidence fragment set is segmented into words and identified as a physical sign phrase. Different expressions that express the same diagnostic and treatment meaning are uniformly mapped into standard terms and reorganized into a standard evidence unit sequence according to preset rules.

[0077] In this embodiment, the original evidence fragment set formed in step S101 is preprocessed line by line, and punctuation, interjections and non-clinical information are filtered out. The text content is segmented according to word boundaries, so that the continuous text is split into multiple semantic fragments. Then, based on the word segmentation results, phrase recognition is performed on the word combinations involving descriptions of symptoms, signs, tongue appearance and pulse. For example, continuous expressions such as "red tongue with yellow coating", "wiry and thin pulse" and "bitter mouth and dry throat" are identified as signs phrases. Words modified by degree, frequency or duration are bound to the symptoms or signs they modify, thereby forming evidence phrases with complete diagnostic and clinical meaning. Then, based on a pre-constructed TCM terminology mapping table, expressions representing the same diagnostic and treatment meaning in different texts are uniformly mapped. For example, expressions such as "aversion to cold," "fear of cold," and "dislike of cold" are uniformly grouped into corresponding standard symptom terms, and expressions such as "thick yellow tongue coating" and "yellow and greasy tongue coating" are mapped to corresponding standard tongue appearance terms to eliminate semantic differences caused by different writing habits. After completing the terminology unification, each phrase is further combined and reconstructed according to a preset evidence organization rule. This rule uses "symptom or sign entity - attribute description - degree or state information" as the basic organization unit, while preserving the time order in the original records, so that each combination result forms a structured evidence unit, which is arranged according to the order in which the evidence appears, and finally obtains a standard evidence unit sequence for subsequent knowledge graph mapping and syndrome matching processing.

[0078] It should be noted that the TCM terminology mapping table is constructed based on historical TCM electronic medical record corpus and standard TCM terminology specifications. The construction process includes: first, statistical analysis of symptom descriptions, signs, and tongue and pulse terms in historical medical record texts to extract high-frequency expressions; then, in conjunction with the standard terminology system, different expressions are classified and organized to establish the correspondence between original expressions and standard terms; each standard term corresponds to multiple semantically equivalent expressions, and the accuracy of the mapping relationship is ensured through manual verification.

[0079] Step S103: Perform contextual analysis on the standard evidence unit sequence and combine the relevant standard evidence units to form a candidate set of dialectical clues.

[0080] In this embodiment, a context window is established for the standard evidence unit sequence obtained in step S102 according to the recording time order, and several adjacent evidence units before and after each evidence unit are read as the center, thereby forming an evidence context fragment with local semantic continuity. Subsequently, according to the pre-organized dialectical association rules, the semantic relationship of the evidence units in the context fragment is determined. The rules map symptom evidence, sign evidence, and disease course evidence to dialectical elements such as cold and heat attributes, deficiency and excess attributes, organ affiliation, and disease stage, respectively, and identify the potential connection between different evidence through evidence co-occurrence relationships. For example, when evidence units indicating bitter taste in the mouth, dry throat, and red tongue with yellow coating appear simultaneously in the same context fragment, they are associated with the same cold and heat attribute clue; when symptom evidence and pulse or tongue evidence appear consecutively in time, the corresponding organ or pathogenesis indication is established based on their combination relationship. After completing a single context analysis, evidence units that appear repeatedly in different context fragments and have a common dialectical orientation are aggregated, and several evidence combination fragments are formed according to the time sequence and semantic relationship between the evidence, so that each combination fragment can reflect a relatively complete dialectical orientation; finally, by sorting and collecting all the evidence combination fragments, a set containing multiple candidate dialectical clues is obtained.

[0081] It should be noted that the syndrome differentiation association rules are a set of semantic association rules pre-organized based on the theory of syndrome differentiation in traditional Chinese medicine. They are used to describe the logical relationship between different evidence units. Specifically, the rules include symptom-pathogenesis association rules, symptom-organ attribution rules, sign-attribute mapping rules, and multi-evidence co-occurrence rules. Among them, the symptom-pathogenesis association rules are used to describe the potential pathogenesis type pointed to by a certain combination of symptoms, the symptom-organ attribution rules are used to determine the correspondence between symptoms and organ systems, the sign-attribute mapping rules are used to map signs such as tongue appearance and pulse appearance to cold, heat, deficiency and excess attributes, and the multi-evidence co-occurrence rules are used to characterize the combined syndrome differentiation significance formed when multiple pieces of evidence appear in the same time window.

[0082] Step S104: Map the evidence units in the candidate diagnostic clues to the corresponding nodes in the TCM knowledge graph, and form evidence association paths based on the diagnostic relationships between the nodes.

[0083] In this embodiment, the candidate diagnostic clues obtained in step S103 are read one by one, and the corresponding nodes are retrieved in a pre-constructed TCM knowledge graph according to the standard terminology of the evidence units. This knowledge graph includes at least symptom nodes, sign nodes, tongue and pulse nodes, pathogenesis nodes, viscera nodes, and syndrome element nodes, and records the diagnostic relationships between nodes, such as symptom pointing to pathogenesis, pathogenesis belonging to viscera, and syndrome including symptoms. When a certain evidence unit corresponds to multiple candidate nodes, semantic constraints are applied in combination with other evidence units in the diagnostic clue, such as filtering nodes based on tongue appearance, pulse appearance, or accompanying symptoms, to determine a unique or preferred mapping node. After completing the node mapping, based on the order of evidence units in the candidate diagnostic clues, starting from the symptom or sign node, the corresponding pathogenesis node and viscera node are traced step by step along the preset diagnostic relationships in the knowledge graph, and further connected to the possible corresponding syndrome element nodes, so that multiple evidence units in the same diagnostic clue form a continuous relationship chain in the graph structure. When multiple evidence units point to the same pathogenesis or organ node, their relationship chains are aggregated and organized to form a common diagnostic path; when evidence units point to different pathogenesis or organ nodes, branch paths are established based on the relationships in the knowledge graph.

[0084] Step S105: Based on the standard evidence unit type, knowledge graph mapping results, and time sequence, organize and identify the evidence association path to generate evidence features.

[0085] The specific steps of step S105 are as follows:

[0086] Step S1051: According to the category attributes of the standard evidence units, the evidence units in the evidence association path are divided into symptom evidence, physical sign evidence, tongue and pulse evidence, test indicator evidence, and disease course description evidence. Based on the mapping nodes of each evidence unit in the knowledge graph, they are assigned to the corresponding syndrome element level to form a multi-layer evidence path set.

[0087] In this embodiment, the evidence association path formed in step S104 is read, and each evidence unit contained in the path is identified one by one. The category is determined based on its source and semantic attributes. Information from the chief complaint or consultation description that reflects the patient's subjective feelings is identified as symptom evidence; information from objective observations such as inspection and palpation is identified as physical sign evidence; information clearly describing the state of the tongue, tongue coating, or pulse is identified as tongue and pulse evidence; indicator data generated by testing equipment is identified as test indicator evidence; and content involving the stage of symptom development, duration, or changes in outcome is identified as disease course description evidence. After completing the category identification, the mapping nodes of each evidence unit in the TCM knowledge graph are read. Based on the semantic hierarchy of the node in the graph, the evidence unit is further classified into the corresponding syndrome element level. For example, nodes pointing to cold / heat attributes, deficiency / excess attributes, or exterior / interior attributes are classified into the syndrome differentiation attribute level; nodes pointing to viscera or meridians are classified into the viscera element level; and nodes pointing to specific pathogenesis or syndrome structure are classified into the pathogenesis element level. After completing the classification and hierarchical categorization, based on the original evidence association paths, evidence units belonging to the same syndrome element level are organized and aggregated, while maintaining their order in the original path, thus forming a hierarchical path structure composed of evidence at different levels on a single path structure; finally, each hierarchical path is aggregated to obtain a set of evidence paths with multiple layers, including symptom layer, sign layer, tongue and pulse layer, indicator layer, and disease course layer.

[0088] Step S1052: Rearrange the evidence units in the multi-layer evidence path set in chronological order, and merge and organize the similar evidence units that appear in consecutive time segments to form a chronological evidence chain segment that reflects the order in which the evidence appears.

[0089] In this embodiment, the multi-layered evidence path set obtained in step S1051 is read, and the recording time information corresponding to each evidence unit is extracted. This time information can come from the electronic medical record recording time, consultation time, test report generation time, or symptom change recording time. Subsequently, using the time information as the sorting basis, all evidence units in the path set are uniformly sorted, so that evidence units from different evidence levels are arranged in chronological order, thereby establishing a basic time series reflecting the evolution of the diagnosis and treatment process. After completing the time sorting, evidence units appearing in adjacent time segments are scanned. When evidence units of the same category and with consistent semantics are detected to appear repeatedly in consecutive time segments, they are regarded as a continuous expression of the same evidence event, and are merged into a single evidence node, while retaining the duration range information in the node. When the same type of evidence appears at different time nodes but the semantic attributes change, it is kept independent and marked as a new evidence node in the time series to reflect the stage changes of symptoms or signs. Through the above-mentioned time sorting and continuous evidence merging process, the evidence units originally scattered in different time records are organized into several continuously arranged evidence fragments, and connected in chronological order to form a time-series evidence chain, thereby obtaining a time-series structure that can reflect the order of evidence generation and change process.

[0090] Step S1053: Based on the node relationships in the knowledge graph, the adjacent evidence units in the temporal evidence chain segment are marked with relationships. The relationship markings include etiology pointing relationships, organ attribution relationships, cold and heat attribute relationships, deficiency and excess attribute relationships, and symptom co-occurrence relationships. An evidence relationship sequence is constructed according to the order in which the relationships appear.

[0091] In this embodiment, evidence units in each time-series evidence chain segment are read and combined in pairs according to their adjacent order in the time sequence to form adjacent evidence unit pairs. Then, based on the mapping nodes of each evidence unit in the knowledge graph, the knowledge graph is searched to determine whether a pre-defined dialectical relationship exists between corresponding nodes. Examples include the etiological relationship between symptom nodes and pathogenesis nodes, the organ attribution relationship between symptom or sign nodes and organ nodes, the cold / heat attribute relationship between symptom nodes and cold / heat attribute nodes, the virtual / real attribute relationship between symptom nodes and virtual / real attribute nodes, and the symptom co-occurrence relationship between different symptom nodes. When a corresponding relationship is found in the knowledge graph, a corresponding relationship marker is added between the adjacent evidence unit pairs, and this relationship marker is associated with the position of the adjacent evidence unit in the time-series chain segment. When multiple possible relationships exist, the relationship markers that conform to the current dialectical context are retained, based on the level of the evidence unit and its semantic orientation in the original dialectical clues. After completing the relationship labeling of all adjacent evidence unit pairs, the relationship labels are connected sequentially according to their appearance order in the chronological evidence chain segment, and their positions are kept in correspondence with the corresponding evidence units, thereby constructing an evidence relationship sequence that reflects the dialectical relationship between evidence and its temporal order.

[0092] Step S1054: Combine and label the evidence relationship sequence with the corresponding evidence unit category information, time sequence and knowledge graph node relationship to form an evidence feature sequence.

[0093] In this embodiment, the evidence relationship sequence obtained in step S1053 is read, and the evidence unit identification information corresponding to each relationship in the sequence is extracted simultaneously. Then, according to the evidence unit category determined in step S1051, a category identifier is added to each evidence unit, so that evidence from different sources has distinguishable type information in the same structure, such as being identified as symptom type, sign type, tongue and pulse type, laboratory indicator type, or disease course description type. Based on this, the time sequence information formed in step S1052 is further read, and according to the arrangement position of the evidence in the time-series evidence chain, a time sequence identifier is added to each evidence unit and its relationship marker, thereby maintaining the continuity of the order in which the evidence appears. Subsequently, the mapping nodes of each evidence unit in the TCM knowledge graph are read again, and the diagnostic element relationship corresponding to the node is jointly bound to the evidence relationship sequence, so that each evidence unit, while recording its category and time sequence, also contains its semantic pointing information in the knowledge graph. After completing the above information binding, the relationship markers, evidence category identifiers, time sequence identifiers, and knowledge graph node relationships are sequentially combined according to the order of the evidence in the time sequence segment, and organized in the form of a continuous sequence so that each sequence position simultaneously reflects the evidence content, evidence type, time position, and dialectical relationship, thereby forming an evidence feature sequence with a complete semantic structure.

[0094] Step S2: Construct a syndrome prototype library and use a deep learning model to encode the evidence features to obtain evidence vectors. Calculate the similarity between the evidence vectors and each syndrome prototype using an adaptive metric to obtain a syndrome candidate set and corresponding matching scores.

[0095] like Figure 2 As shown, the specific steps of step S2 are as follows:

[0096] Step S201: Collect historical diagnostic samples corresponding to the preset syndrome categories, extract the core evidence features and related evidence features, and construct a set of syndrome prototypes for the corresponding syndrome categories according to the differences in diagnostic paths.

[0097] In this embodiment, diagnostic samples with clear syndrome diagnosis results are screened from a historical TCM electronic medical record database. The samples are then categorized according to syndrome name, with each syndrome category corresponding to a set of historical diagnostic sample records. Subsequently, symptom descriptions, physical signs, tongue and pulse manifestations, laboratory indicators, and disease progression information from each sample record are read and uniformly organized according to the evidence feature expression method formed in the aforementioned steps, thereby obtaining an evidence feature sequence corresponding to each diagnostic sample. After completing the feature organization, evidence statistics and correlation analysis are performed on all samples under the same syndrome category. Evidence units that repeatedly appear in most samples and have a directional effect on syndrome determination are identified and determined as core evidence features. Simultaneously, evidence units that frequently co-occur with core evidence during the diagnostic process or form a pathogenesis explanation relationship are identified and determined as associated evidence features. Subsequently, based on the organization of evidence units in the knowledge graph path and time sequence in the sample, different evidence combination structures existing under the same syndrome category are distinguished. When the core evidence is the same but the order of related evidence or the pathogenesis is different, they are divided into different diagnostic path types and organized into independent prototype structures. Finally, the core evidence features, related evidence features and their corresponding relationship order contained in each type of diagnostic path structure are integrated to form a syndrome prototype set that can represent different diagnostic manifestations of the syndrome category.

[0098] Step S202: Input the evidence features into the deep learning model, and jointly encode the order of evidence units, evidence relationships and knowledge graph node information to generate the evidence vector of the individual to be diagnosed.

[0099] In this embodiment, the evidence feature sequence formed in step S1054 is read, and each evidence unit in the sequence is decomposed and marked according to its category identifier, time sequence, and corresponding knowledge graph node relationship, so that each evidence unit simultaneously contains evidence content information, evidence category information, relationship information, and time position information. Then, the above-mentioned marked information is input into the encoding layer of the deep learning model to perform sequential modeling of the sequential structure of the evidence units, enabling the model to identify the sequential relationship of evidence in the diagnosis and treatment process; simultaneously, relationship modeling is performed on the evidence relationship sequence, enabling the model to read the etiological orientation, organ attribution, or attribute association relationship between different evidence units; and knowledge graph node information is also included in the encoding as semantic constraint information to maintain the consistency of the orientation of evidence units in the dialectical semantic structure. After completing the encoding processing of various types of information, the encoding results in the same evidence sequence are integrated according to their time sequence, so that the evidence expression in the sequence is uniformly converted into a set of continuous numerical feature representations; then, these feature representations are aggregated and organized, so that the entire evidence feature sequence forms a vector expression within the model that can comprehensively represent the diagnosis and treatment evidence structure of the individual to be diagnosed, and finally, an evidence vector corresponding to the individual to be diagnosed is generated.

[0100] Step S203: Pre-match the evidence vector with each syndrome prototype set, and select target syndrome prototypes to participate in the matching based on the evidence vector of the individual to be diagnosed.

[0101] In this embodiment, the evidence vector generated in step S202 is read, and the evidence category structure, knowledge graph node pointers, and relationship information between evidence contained in the evidence vector are analyzed. Then, the evidence vector is compared sequentially with each syndrome prototype set formed in step S201. During the comparison process, the main diagnostic elements reflected in the evidence vector are first identified, such as cold / heat attributes, deficiency / excess attributes, and organ orientation information. Prototype structures containing the same or similar diagnostic elements are retrieved from the syndrome prototype sets and marked as candidate matching objects. Prototype structures that are significantly inconsistent with the main diagnostic elements in the evidence vector are eliminated in the pre-matching stage. Next, the evidence relationship structure in the evidence vector is further read and checked against the evidence path structure in the candidate prototypes. When a key evidence relationship in the evidence vector can be found in the candidate prototype path, the prototype structure is retained as the target syndrome prototype for subsequent calculations. Prototype structures lacking key evidence relationships or with significantly different path structures are no longer matched. Through the above evidence element screening and path structure verification process, the originally large set of syndrome prototypes is reduced to a target syndrome prototype set that matches the evidence structure of the individual to be diagnosed.

[0102] Step S204: Based on the evidence composition and time sequence of the evidence vector, use an adaptive measurement rule to calculate the similarity relationship between the evidence vector and each target syndrome prototype.

[0103] The specific steps of step S204 are as follows:

[0104] Step S2041: Read the evidence category information, knowledge graph node relationships and time sequence in the evidence vector, and determine the corresponding dialectical measurement scenario accordingly.

[0105] In this embodiment, the evidence vector generated in step S202 is read, and the evidence category information recorded therein is parsed to identify the composition ratio and distribution of symptom-related evidence, sign-related evidence, tongue and pulse-related evidence, laboratory indicator-related evidence, and disease course description-related evidence in the evidence vector. Then, the knowledge graph node relationship information carried in the evidence vector is read to identify the pathogenesis node, organ node, and cold / heat / deficiency / excess attribute node corresponding to the evidence unit, and the association structure between different nodes in the evidence vector is analyzed. For example, whether multiple evidence units point to the same organ node or the same attribute node, thereby determining the degree of concentration of diagnostic focus among the evidence. Based on this, the temporal sequence information in the evidence vector is further read to analyze the order of appearance of each evidence unit to determine whether there is a stage-based change relationship between the evidence, such as a certain type of symptom appearing first and a certain type of sign appearing later. Subsequently, based on the combined characteristics of evidence category distribution, knowledge graph node relationship structure, and time sequence structure, the current evidence vector is classified into a preset dialectical measurement scenario type, such as a single-path dialectical scenario dominated by symptom evidence, a parallel dialectical scenario where multiple types of evidence appear together, or a stage dialectical scenario containing obvious time evolution characteristics, thereby obtaining a dialectical measurement scenario corresponding to the evidence structure of the individual to be diagnosed.

[0106] Step S2042: Based on the dialectical measurement scenario, select the corresponding target measurement rule from the preset adaptive measurement rule set.

[0107] In this embodiment, the diagnostic measurement scenario identifier output in step S2041 is read, and a rule group corresponding to the scenario type is retrieved from a preset set of measurement rules. This rule set is constructed based on common evidence organization methods in TCM diagnostic processes, including single-path measurement rules dominated by core symptoms, parallel measurement rules used when multiple pieces of evidence appear in parallel, and time-series measurement rules used when there are obvious changes in the disease course. Subsequently, the evidence category distribution, knowledge graph node relationships, and temporal sequence structure recorded in the evidence vector are further verified. This information is compared item by item with the conditions applicable to each rule in the candidate rule group. For example, it checks whether the evidence relationship structure has a single main line or multiple parallel paths, and determines whether the evidence shows continuous development or stage transitions in the time series, thereby excluding rule types that do not match the current evidence structure. After completing the rule screening, the target measurement rule that best matches the current diagnostic measurement scenario is determined from the remaining rules, and a correspondence is established between this rule and the evidence vector of the individual to be diagnosed.

[0108] It should be noted that the adaptive measurement rule is used to calculate the similarity between the evidence vector and the syndrome prototype vector. Specifically, it first calculates the basic similarity between the evidence vector and the syndrome prototype vector, using metrics such as cosine similarity, Euclidean distance, or inner product similarity. Then, it combines evidence category weights, evidence temporal order weights, and knowledge graph node relationship weights to weight and adjust the basic similarity. Among these, the evidence category weights are used to distinguish the importance of symptom-based evidence, sign-based evidence, tongue and pulse-based evidence, and laboratory indicator-based evidence in the diagnostic process; the temporal order weights are used to reflect the sequential relationship of evidence in the course of disease evolution; and the knowledge graph node relationship weights are used to strengthen the matching degree between evidence with the same pathogenesis or organ-related relationship.

[0109] Step S2043: According to the target measurement rule, the evidence vector is divided into multiple comparison segments, and each segment is matched with the corresponding segment in each target syndrome prototype.

[0110] In this embodiment, the target measurement rule selected in step S2042 is read, and the evidence category information, relationship sequence, and time order contained in the evidence vector are parsed according to the rule. The evidence vector is divided into several continuous comparison segments, each corresponding to a relatively independent dialectical information unit, such as an evidence combination structure composed of several symptom-type evidence, sign-type evidence, and their corresponding knowledge graph relationships. After the segment division is completed, the corresponding knowledge graph node pointers, evidence category composition, and time order information are extracted for each comparison segment, and structurally similar prototype segments are retrieved from the target syndrome prototype set obtained in step S203. Subsequently, the structural consistency between the evidence segments and prototype segments is compared according to the target measurement rule, such as checking whether the evidence category combinations correspond, whether the node relationships have the same dialectical pointers, and whether the time order maintains the same logical sequence. When a certain evidence segment can find a corresponding structure in the syndrome prototype, a matching relationship is established between the two and their corresponding positions are recorded. When there are multiple possible corresponding structures for an evidence segment in the prototype, further filtering is performed according to its knowledge graph node relationships and time order information to determine the closest prototype segment.

[0111] Step S2044: Aggregate the compared segments to form the similarity relationship between the evidence vector and the prototype of each target syndrome.

[0112] In this embodiment, the established matching records between each comparison segment and the symptom prototype segment are read and rearranged according to the chronological order of the segments in the evidence vector, ensuring that all matching segments maintain the same order as the original evidence sequence. Subsequently, all matching segments corresponding to each symptom prototype are aggregated, and the distribution of these segments within the prototype structure is analyzed to determine whether they cover the core and related evidence structures within the prototype. When multiple evidence segments correspond to different structural positions within the same symptom prototype, these segments are connected according to the arrangement order of the prototype structure, forming a continuous corresponding path from the evidence vector to the symptom prototype structure. When some evidence segments have multiple possible positions within the prototype structure, the corresponding position most consistent with the prototype path is selected based on the knowledge graph nodes pointed to by the segments and their chronological order. After completing the above path connection, all matching paths under the same syndrome prototype are organized, and the sequential connection relationship between evidence fragments, the pointing relationship of knowledge graph nodes, and the structure of evidence categories are recorded together, thereby forming a similarity relationship record describing the degree of structural correspondence between the evidence vector and the syndrome prototype. After performing the above convergence processing on all target syndrome prototypes, the similarity relationship set between the evidence vector and each target syndrome prototype is obtained.

[0113] Step S205: Sort the syndrome categories according to the similarity relationship, determine the syndrome candidate set, and generate the corresponding matching score.

[0114] The specific steps of step S205 are as follows:

[0115] Step S2051: Merge the similarity relationships between the evidence vector and each syndrome prototype according to the syndrome category to form the category matching record corresponding to each syndrome category.

[0116] In this embodiment, the similarity relationship records corresponding to each target syndrome prototype are read, and the syndrome category to which each syndrome prototype belongs is determined according to the syndrome prototype identifier established in step S201. Then, the similarity relationship records are grouped according to the syndrome category, and the matching paths corresponding to all prototype structures under the same syndrome category are centrally organized. After the initial grouping is completed, the matching paths within each syndrome category are structurally parsed, and the positions of the evidence fragments, the knowledge graph node pointers, and the temporal order relationships corresponding to each path are read. This information is then organized into a unified category matching description structure, which includes the set of evidence fragments corresponding to the prototype of that category, the evidence relationship path, and the evidence order relationship. When multiple prototype structures in the same syndrome category form a matching relationship with the evidence vector, these matching paths are converged according to their positions in the prototype structure, and the structural differences between the paths are retained to reflect the matching situation of the same syndrome category under different dialectical paths. If the matching fragments in different prototype structures have the same characteristics in terms of evidence category or knowledge graph node pointers, they are merged and organized so that the same type of evidence relationship forms a unified record at the category level. Through the above classification, merging, and path organization processes, the matching relationships between evidence vectors and multiple syndrome prototypes are integrated into several category matching records based on syndrome categories.

[0117] Step S2052: Based on the category matching records of each syndrome category, and combined with the organ orientation and cold / heat and deficiency / excess attributes in the knowledge graph, arrange each syndrome category in order to form a syndrome category ranking result.

[0118] In this embodiment, the category matching records corresponding to each syndrome category obtained in step S2051 are read, and the evidence fragment structure, knowledge graph node pointing, and the arrangement relationship of evidence in the temporal chain segment are extracted. Then, based on the core evidence structure and related evidence structure contained in the category matching records, the evidence coverage of each syndrome category is compared, so that the category containing more key evidence relationships is prioritized to enter the ranking. After completing the evidence structure comparison, the mapping nodes of each evidence unit in the knowledge graph in the category matching records are further read, and the organ pointing relationship corresponding to these nodes is analyzed. For example, it is determined that the evidence combination mainly points to the liver, spleen, lung, or other organ nodes, and the cold / heat and deficiency / excess attributes reflected in the evidence combination are identified. When multiple syndrome categories have similar matching situations in evidence structure, their corresponding organ pointing and cold / heat / deficiency / excess attributes are compared with the main diagnostic pointing in the current evidence vector. Syndrome categories with consistent pointing are arranged in a higher position, while categories with large differences in pointing are arranged in a lower position. After completing the above hierarchical comparison and sorting, all syndrome categories are arranged in order according to their corresponding positions, and finally a syndrome category sorting result is formed that reflects the degree of matching between each syndrome category and the evidence structure of the individual to be diagnosed.

[0119] Step S2053: Based on the sorting results of the syndrome categories, select the syndrome categories located within the preset sorting interval, and combine them according to the coexistence relationship or primary and secondary relationship between the syndromes to form a syndrome candidate set.

[0120] In this embodiment, the syndrome category ranking results are read, and several syndrome categories at the top of the ranking are selected as initial candidate categories according to a pre-set ranking interval. The ranking interval can be set according to the syndrome distribution range obtained from historical diagnostic samples, so that the syndrome categories entering the candidate range have a high correlation in evidence structure. Subsequently, the selected initial candidate categories are analyzed for relationships. By reading the relationship between each syndrome node in the TCM knowledge graph, it is identified whether there is a syndrome coexistence relationship, syndrome subordination relationship, or syndrome transformation relationship between different syndromes. Specifically, when two or more syndrome categories have a parallel coexistence relationship in the knowledge graph and their evidence paths correspond to different evidence fragments, these syndrome categories are combined into a coexistence syndrome structure. When a syndrome category belongs to the pathogenesis extension or subordinate branch of another syndrome category in the graph structure, it is combined into a primary-secondary syndrome structure. After completing the relationship identification, each combination structure is further verified according to the distribution of evidence fragments corresponding to the evidence vector, so that the syndrome categories participating in the combination can find corresponding supporting evidence in the evidence path, thereby excluding combination relationships lacking evidence support. Through the above sorting, filtering and relationship combination processing, the initial candidate categories are organized into several syndrome combination structures according to their coexistence relationship or primary and secondary relationship, and these structures are organized into a syndrome candidate set.

[0121] Step S2054: Based on the sorting results of the syndrome categories and the category matching records corresponding to each syndrome category, generate a corresponding matching score for each candidate in the syndrome candidate set.

[0122] In this embodiment, the syndrome category ranking result formed in step S2052 is read, and the relative position of each syndrome category in the ranking is extracted. Simultaneously, the category matching information recorded in step S2051 is read. This information includes at least the number of evidence fragments corresponding to the syndrome category, the evidence relationship path, and the knowledge graph node pointing structure. Subsequently, each candidate in the syndrome candidate set is analyzed item by item. When a candidate is a single syndrome category, its matching degree is comprehensively evaluated based on its position in the ranking and the evidence coverage, the continuity of evidence relationships, and the consistency of node pointing in its category matching record. When a candidate is a combination structure composed of multiple syndrome categories, the matching records corresponding to each syndrome category in the combination are read separately. Combined with the coexistence or primary / secondary relationships between syndromes in the knowledge graph, the connection of evidence paths between categories is checked to ensure that evidence paths can form continuous or complementary relationships in the combination structure. After completing the above analysis, the overall matching priority reflected by the sorting position and the evidence structure matching situation reflected by the category matching record are comprehensively organized so that each candidate option forms a set of matching descriptions reflecting its degree of association with the current evidence vector, and the descriptions are converted into corresponding matching scores; finally, matching score records are generated for all candidates in the syndrome candidate set, so as to obtain matching results that can reflect the degree of association between different syndromes or syndrome combinations and the evidence structure of the individual to be diagnosed.

[0123] It should be noted that deep learning models can employ neural network models based on sequence encoding structures to learn representations of evidence features. For example, a deep learning structure containing an embedding layer, a sequence encoding layer, and a feature aggregation layer can be used. The embedding layer maps standard terms, evidence category identifiers, temporal order identifiers, and knowledge graph node identifiers in the evidence units into corresponding vector representations. The sequence encoding layer models the temporal arrangement of evidence units. This sequence encoding layer can use recurrent neural networks, long short-term memory networks (LSTM), gated recurrent units (GRU), or Transformer encoding structures, capturing the contextual relationships between evidence through attention mechanisms or recurrent structures. The feature aggregation layer aggregates the multidimensional features after sequence encoding to generate evidence vectors that can comprehensively represent the diagnostic evidence structure of the individual being diagnosed. Through this structure, the model can simultaneously learn the semantic relationships, temporal relationships, and associations in the knowledge graph between evidence units.

[0124] During the model training phase, training samples are constructed using historical TCM electronic medical record data. Each sample includes a sequence of diagnostic and treatment evidence features and a corresponding syndrome category label. First, the evidence feature sequences in the training samples are encoded and input into the deep learning model for forward computation to obtain the corresponding syndrome prediction results. Then, a loss function is calculated based on the difference between the predicted results and the actual syndrome labels, and the model parameters are updated using a backpropagation algorithm. In one implementation, the loss function can be a cross-entropy loss function or a multi-label classification loss function, combined with a regularization strategy to constrain the model parameters. This allows the trained model to learn the mapping relationship between different evidence structures and syndrome categories. Specific model training parameters are set according to the actual task or based on historical experience data. After multiple rounds of training iterations, a deep learning model for syndrome matching calculation is obtained.

[0125] Step S3: Optimize the deep learning model through consistency constraints, apply counterfactual perturbations to the evidence features, and recalculate the evidence matching score.

[0126] It should be noted that counterfactual perturbation is generated based on semantic relationships within the TCM knowledge graph. Specifically, it first retrieves candidate nodes with semantic relationships to the mapping nodes of evidence units in the evidence feature sequence within the knowledge graph. These candidate nodes may have relationships such as transformation between cold and heat attributes, transformation between deficiency and excess attributes, organ-related relationships, or pathogenesis evolution relationships. Then, one or more nodes are selected from these candidate nodes to replace the original evidence units, thereby generating a new evidence expression structure. To ensure that the generated counterfactual evidence still possesses medical semantic rationality, the selection range of candidate nodes can be restricted, limiting replacements to adjacent or semantically similar nodes within the knowledge graph.

[0127] like Figure 3 As shown, the specific steps of step S3 are as follows:

[0128] Step S301: Identify the key evidence unit, accompanying evidence unit, and constraining evidence unit involved in the current symptom matching, and determine the key evidence unit, accompanying evidence unit, and constraining evidence unit as different types of counterfactual perturbation anchor points.

[0129] In this embodiment, the candidate syndrome set and its matching score obtained in step S2054 are read, and the position of the evidence fragment and the evidence relationship path corresponding to each candidate syndrome in the category matching record are traced. Then, all evidence units that form a matching relationship with the candidate syndrome are extracted from the evidence feature sequence, and they are classified in combination with the knowledge graph node pointing relationship and the evidence path structure. When an evidence unit directly points to the core pathogenesis node or core symptom node in the syndrome prototype in the evidence path and appears repeatedly in multiple matching paths, the evidence unit is identified as a key evidence unit. When an evidence unit does not directly determine the syndrome category, but has a co-occurrence relationship or auxiliary pointing relationship with the key evidence in the knowledge graph, it is identified as an accompanying evidence unit. When an evidence unit is used to limit the scope of evidence interpretation, such as playing a role in constraining organ attribution, cold and heat attributes, or deficiency and excess attributes in the knowledge graph, it is identified as a constraining evidence unit. After completing the above classification, the position of each type of evidence unit in the evidence feature sequence and its corresponding knowledge graph node are recorded, and they are marked as different types of counterfactual perturbation anchors according to their role in the evidence path. Among them, key evidence units correspond to key perturbation anchors, accompanying evidence units correspond to accompanying perturbation anchors, and constraint evidence units correspond to constraint perturbation anchors.

[0130] Step S302: Based on the counterfactual perturbation anchor point, the original evidence features are replaced, deleted, inserted, shifted in time, or rewritten in attribution to generate counterfactual evidence features corresponding to the original evidence features. The replacement, deletion, insertion, shifting in time, or rewriting in attribution is organized according to the relationships of organ association, cold-heat transformation, deficiency-excess transformation, exterior-interior transmission, or disease progression in the TCM knowledge graph, so that each counterfactual evidence feature corresponds to a different diagnostic evolution path.

[0131] In this embodiment, the original evidence feature sequence, along with its marked key perturbation anchors, accompanying perturbation anchors, and constraint perturbation anchors, is read. Based on the category of the evidence unit containing the anchor and its node pointing relationship in the knowledge graph, the executable transformation method is determined. Subsequently, the original evidence structure is partially reconstructed according to the pre-established organ-branch relationships, cold-heat transformation relationships, deficiency-excess transformation relationships, exterior-interior transmission relationships, and disease progression relationships in the TCM knowledge graph. When the anchor is a key evidence unit, the evidence unit is mapped to a node expression with an adjacent diagnostic relationship in the knowledge graph through replacement processing; for example, a cold symptom is replaced with a corresponding heat symptom node. When the anchor is an accompanying evidence unit, the auxiliary evidence structure in the evidence path is changed through deletion or insertion processing; for example, a accompanying symptom is deleted or a supplementary symptom related to the core pathogenesis is inserted in an adjacent position. When the anchor is a constraint evidence unit, the organ or attribute node pointing to it is changed through attribution rewriting processing; for example, the organ attribution of the same symptom is adjusted from the spleen system to the stomach system. Simultaneously, based on the chronological order information in the original evidence sequence, temporal shifting is performed on some evidence units, causing changes in the position of certain evidence within the disease progression chain, thereby forming different disease progression structures. Through the above-mentioned replacement, deletion, insertion, temporal shifting, and attribution rewriting processes, multiple structurally differentiated counterfactual evidence features are generated from the original evidence features while maintaining the interpretability of the overall structure. Each counterfactual evidence feature corresponds to a different dialectical evolution path in the knowledge graph.

[0132] Step S303: Re-input the original evidence features and each counterfactual evidence feature into the deep learning model, and re-execute the evidence encoding, target syndrome prototype comparison, similarity relationship generation and candidate syndrome determination processes to obtain the first matching result corresponding to the original evidence features and the second matching result corresponding to each counterfactual evidence feature. The first matching result and the second matching result both include a syndrome candidate set and a corresponding matching score.

[0133] In this embodiment, the original evidence features and counterfactual evidence features generated in step S302 are read and sequentially input into the encoding process of the deep learning model according to a unified data structure. During this process, the evidence unit encoding process is re-executed for each evidence feature sequence, so that the evidence category information, knowledge graph node relationship, and time sequence information are converted into the corresponding evidence vector expression again. Subsequently, the generated evidence vectors are compared with the syndrome prototype set constructed in step S201, and the target syndrome prototype screening, comparison segment matching, and similarity relationship aggregation processing are sequentially performed to obtain the structural correspondence between each evidence feature and different syndrome prototypes. After the similarity relationship is generated, according to the category merging and syndrome sorting rules between each syndrome prototype, the matching results of each set of evidence features are processed to determine the candidate syndrome, so that each set of evidence features obtains a corresponding syndrome candidate set, and a corresponding matching score is generated for each candidate syndrome in the candidate set. The result calculated by the original evidence features is recorded as the first matching result, while the results calculated by each counterfactual evidence feature are recorded as the corresponding second matching results.

[0134] Step S304: Compare the first matching result with each of the second matching results, determine the matching relationship to be maintained and the matching relationship to be changed according to the type of counterfactual disturbance anchor point, generate constraint instructions to maintain the original syndrome ranking relationship for counterfactual evidence features formed by accompanying evidence units or constraint evidence units, and generate constraint instructions to change the original syndrome ranking relationship or switch the candidate syndrome attribution for counterfactual evidence features formed by key evidence units; and organize the constraint instructions into a set of consistency constraints.

[0135] In this embodiment, the first matching result and each of the second matching results obtained in step S303 are read, and the candidate syndrome set, syndrome category ranking relationship, and matching score corresponding to each candidate syndrome are extracted respectively. Then, based on the counterfactual disturbance anchor point type recorded in step S301, the source of difference between each set of counterfactual evidence features and the original evidence features is identified, and a comparison relationship with the corresponding matching results is established. When the counterfactual evidence features are generated by changes in accompanying evidence units or constraint evidence units, the syndrome ranking structure in the first matching result and the corresponding second matching result are compared. If the ranking relationship remains consistent, it is recorded as a stable matching relationship. If the ranking changes, it is marked as a constraint item that needs to restore the original ranking structure, and a constraint instruction to maintain the original syndrome ranking relationship is generated accordingly. When the counterfactual evidence features are generated by changes in key evidence units, the composition structure of the candidate syndrome set and its ranking changes are compared. When a replacement of the candidate syndrome category, an adjustment of the ranking position, or a recombination of the candidate set is detected, the change is recorded as a matching relationship that allows changes, and a corresponding ranking adjustment or candidate attribution switching constraint instruction is generated. After completing the comparative analysis of all matching results, all generated order-preserving constraint instructions and change-allowing constraint instructions are uniformly organized according to their corresponding evidence positions, syndrome categories and ordering relationships, so as to form a set of constraint records that can reflect the model output change rules under different evidence disturbance conditions, thereby obtaining a set of consistency constraints for subsequent model iteration and adjustment.

[0136] Step S305: Based on the consistency constraint set, iteratively adjust the evidence encoding process, target syndrome prototype comparison process, and similarity relationship generation process in the deep learning model, and after completing the adjustment, perform syndrome matching calculation on the original evidence features again to generate a syndrome candidate set optimized by consistency constraints and corresponding matching scores.

[0137] The specific steps of step S305 are as follows:

[0138] Step S3051: Map each constraint instruction in the consistency constraint set to the evidence encoding processing, syndrome prototype comparison processing and syndrome sorting processing stages, and form a corresponding constraint action sequence.

[0139] In this embodiment, all constraint instructions in the consistency constraint set are read, and the counterfactual disturbance source, evidence unit position, and related syndrome category ranking relationship corresponding to each instruction are extracted. Then, based on the processing structure of the syndrome matching process, the entire reasoning process is divided into an evidence encoding processing stage, a syndrome prototype comparison processing stage, and a syndrome ranking processing stage, and the object constrained by each constraint instruction is analyzed one by one. When a constraint instruction involves the expression structure of an evidence unit or the stability of an evidence relationship path, the instruction is mapped to the evidence encoding processing stage, so that this stage maintains the original encoding structure or limits its range of change when processing the corresponding evidence unit. When a constraint instruction involves the matching path relationship between an evidence vector and a syndrome prototype, it is mapped to the syndrome prototype comparison processing stage, so that this stage follows the corresponding matching restrictions when establishing the correspondence between evidence fragments and prototype fragments. When a constraint instruction involves the ranking relationship of a syndrome candidate set or changes in candidate attribution, it is mapped to the syndrome ranking processing stage, so that this stage adjusts or maintains the ranking relationship according to the corresponding instruction when generating the syndrome ranking result. After completing the above mapping, the mapped constraint instructions are arranged in sequence according to the execution order of each processing stage in the symptom matching process, and the corresponding constraint instruction set is recorded for each processing stage, thus forming a constraint action sequence that runs through the entire matching process.

[0140] Step S3052: Based on the constraint action sequence, iteratively adjust the evidence encoding relationship, prototype matching relationship, and syndrome ranking relationship in the deep learning model.

[0141] In this embodiment, constraint instructions arranged according to processing stages in the constraint action sequence are read, and the corresponding instructions are applied to the relevant processing structures of the deep learning model in sequence. In the evidence encoding processing stage, according to the constraint instructions mapped to this stage, the evidence category association relationship and knowledge graph node pointing relationship established by the model when encoding evidence units are adjusted to keep the relative expression of key evidence and accompanying evidence in the encoding structure stable, while limiting the encoding structure offset caused by changes in non-key evidence. Subsequently, in the symptom prototype comparison processing stage, the fragment matching path between the evidence vector and the symptom prototype is corrected according to the corresponding constraint instructions. When the counterfactual evidence change is detected to originate from accompanying evidence or constraint evidence, the original matching path structure is maintained; when the change originates from key evidence, the prototype matching path is allowed to re-correspond according to the new evidence structure. After the matching path adjustment is completed, the symptom ranking processing stage is entered. According to the instructions involving ranking relationships in the constraint action sequence, the ranking relationship of the symptom candidate set is corrected so that the ranking changes caused by changes in key evidence are retained, while the ranking fluctuations caused by changes in accompanying evidence or constraint evidence are restored to the original ranking structure. After completing a full processing flow, the adjusted model is applied again to the same evidence input, and the new matching results are checked. If an inconsistency with the constraint instructions is still detected, the above adjustment process is repeated again according to the constraint action sequence. In this way, the encoding relationship, prototype matching relationship and syndrome ranking relationship within the model are gradually corrected through multiple rounds of iteration.

[0142] Step S3053: After completing the iterative adjustment, the original evidence features are re-input into the deep learning model, and the evidence encoding, syndrome prototype comparison and syndrome ranking processes are re-executed to obtain new syndrome matching results.

[0143] In this embodiment, the deep learning model structure iteratively adjusted in step S3052 is read, and the original evidence feature sequence is re-input into the model processing flow. During the evidence encoding stage, the evidence unit category information, knowledge graph node relationships, and temporal sequence information are parsed again to regenerate the corresponding evidence vector expression. Subsequently, this evidence vector is compared with the syndrome prototype set constructed in step S201. By performing evidence fragment matching and prototype path correspondence analysis, each structural fragment in the evidence vector can establish a matching relationship with the corresponding structure in the syndrome prototype. After completing the prototype comparison, the matching relationships corresponding to each prototype are categorized and merged. Based on the organ-direction relationship and the cold / heat / deficiency / excess attribute relationship in the knowledge graph, the syndrome categories are sorted, thereby obtaining the updated syndrome candidate set and its sorting structure. Since the deep learning model has already undergone structural adjustment based on consistency constraints in the aforementioned steps, during this re-matching process, the evidence encoding relationship, prototype matching path, and syndrome sorting structure all operate within the constraint rules, thereby generating a new syndrome matching result corresponding to the original evidence features.

[0144] Step S3054: Determine the candidate syndrome set based on the new syndrome matching results, and generate matching scores corresponding to each candidate syndrome.

[0145] In this embodiment, the new syndrome matching results contain the syndrome category ranking structure and the evidence matching path corresponding to each syndrome category. Syndrome categories within a preset ranking interval are selected as candidate syndrome ranges based on the ranking results. Subsequently, the matching path corresponding to each candidate syndrome is parsed, extracting the evidence fragment structure, knowledge graph node pointing relationships, and the positional relationship of evidence in the temporal chain segment. This information is then organized into matching records reflecting the degree of association between the syndrome and the evidence structure. When a candidate syndrome is a single syndrome category, the matching degree of the syndrome is comprehensively evaluated based on its position in the ranking and the key and related evidence structures covered by its matching path. When a candidate syndrome is formed by a combination of multiple syndrome categories, the matching records corresponding to each syndrome category in the combination are read separately. Combined with the coexistence or primary / secondary relationships between syndromes in the knowledge graph, the connection of evidence paths between each syndrome category is analyzed, enabling the combined structure to form a continuous dialectical interpretation path. After completing the above matching record organization, the priority information reflected by the sorting position and the evidence structure consistency information reflected by the matching path are comprehensively summarized so that each candidate syndrome or syndrome combination forms a corresponding matching degree description, and a corresponding matching score is generated for each candidate syndrome in the syndrome candidate set.

[0146] It should be noted that by comparing the symptom matching results corresponding to the original evidence features and the counterfactual evidence features, model consistency constraints can be constructed. When the counterfactual perturbation only changes the accompanying evidence or constraining evidence, the symptom ranking results output by the model should remain stable; however, when the key evidence changes, the symptom category or ranking output by the model can change accordingly. Based on the above rules, a consistency constraint loss function can be constructed, and this loss function can be jointly optimized with the original classification loss function during model training, thereby improving the model's sensitivity to changes in key evidence while maintaining the stability of the dialectical logic.

[0147] Step S4: Determine the target syndrome category or syndrome combination based on the optimized matching score, and output the corresponding syndrome matching results and key evidence.

[0148] The specific steps of step S4 are as follows:

[0149] Step S401: Read the matching scores of each syndrome candidate after consistency constraint optimization, and determine the target syndrome category or syndrome combination based on the score sorting and the coexistence or primary-secondary relationship between syndromes.

[0150] In this embodiment, based on the syndrome candidate set and its corresponding matching score generated in step S3054, the candidates are sorted from high to low according to the matching score, so that the candidate syndromes with a higher degree of correlation with the current evidence structure are placed at the top of the sort. Then, the relationships of the top few candidates in the sorting results are analyzed. By searching the relationship between each syndrome node in the TCM knowledge graph, it is identified whether there is a syndrome coexistence relationship, a primary-secondary relationship, or a pathogenesis evolution relationship between these syndromes. When multiple syndromes with high ranking have a parallel coexistence relationship in the knowledge graph and their evidence paths correspond to different evidence fragments, these syndromes are combined into a coexistence syndrome structure. When one of the syndromes belongs to the pathogenesis branch or subordinate syndrome of another syndrome in the graph relationship, the syndrome with high ranking is determined as the primary syndrome and the subordinate syndrome is determined as a secondary syndrome, thus forming a primary-secondary syndrome combination. After determining the relationships, each combination structure undergoes another evidence path verification to ensure that each symptom in the combination can find a corresponding supporting evidence path in the evidence feature sequence. If a candidate symptom lacks corresponding evidence support, it is removed from the candidate structure. Through the above sorting, filtering, relationship determination, and evidence verification processes, the target symptom category or symptom combination that best matches the current evidence structure is finally determined.

[0151] Step S402: For the target syndrome category or syndrome combination, starting from the original evidence features, backtrack along the order of evidence units and the knowledge graph mapping path to form the corresponding dialectical path record.

[0152] In this embodiment, based on the target syndrome category or syndrome combination determined in step S401, the position of the evidence unit corresponding to the syndrome is retrieved in the original evidence feature sequence. Then, according to the chronological order of the evidence units in the sequence, starting from the earliest relevant evidence unit, the mapping node of each evidence unit in the TCM knowledge graph is read and its pathogenesis node, organ node, and cold / heat / deficiency / excess attribute node in the graph structure are identified. Next, according to the preset dialectical relationships in the knowledge graph, the relationships between these nodes are connected step by step. For example, the symptom node is traced to its corresponding pathogenesis node, and then the pathogenesis node is connected to the corresponding organ node or syndrome node, so that a continuous dialectical reasoning chain is formed between different evidence units. When the target result is a single syndrome category, all evidence relationship paths pointing to that syndrome node are aggregated and organized into one or more dialectical paths according to the order of evidence appearance. When the target result is a combination of syndromes, the evidence paths corresponding to each syndrome are traced back, and the relevant paths are connected or arranged in parallel according to the distribution of evidence in the time series, so that multiple syndromes can form a primary-secondary or parallel dialectical structure. Through the above evidence location tracing and knowledge graph path connection processing, the target syndrome category or syndrome combination can be mapped to a complete evidence reasoning path in the original evidence feature sequence, thereby forming a dialectical path record consistent with the evidence structure.

[0153] Step S403: Based on the diagnostic path record, identify the evidence units involved in the syndrome determination and determine them as the key evidence set corresponding to the target syndrome.

[0154] In this embodiment, based on all evidence nodes and their corresponding knowledge graph node relationships contained in the dialectical path record, the evidence is analyzed segment by segment according to the connection order in the path. Then, evidence units that directly point to the target syndrome node or its upstream pathogenesis node in the dialectical path are identified. These evidence units are considered as evidence that directly explains the formation of the syndrome, and their positional relationship in the path is recorded. Next, the transitional nodes in the dialectical path between these direct evidences are examined. If certain evidence units play a role in connecting different pathogenesis nodes or attribute nodes in the path structure, such as connecting symptom nodes and organ nodes or connecting pathogenesis nodes and syndrome nodes, they are identified as evidence units that maintain the integrity of the dialectical reasoning chain, and are included in the candidate evidence range along with the direct evidence. After completing the above identification, path contribution analysis is performed on the evidence units in the candidate evidence range. When an evidence unit appears repeatedly in multiple dialectical paths or is in a key connection position in the path, it is identified as a key evidence unit. Then, all key evidence units are organized according to their order in the evidence feature sequence and recorded together with the corresponding knowledge graph node relationship, thereby forming a key evidence set corresponding to the target syndrome category or syndrome combination.

[0155] Step S404: Associate the target syndrome category or syndrome combination, the corresponding matching score, and the key evidence set to form a syndrome matching result.

[0156] In this embodiment, based on the target syndrome category or syndrome combination determined in step S401, the matching score corresponding to the target syndrome recorded in step S3054 is extracted, and the key evidence set identified in step S403 and its positional relationship in the evidence feature sequence are read. Subsequently, each evidence unit in the key evidence set is structured, so that each evidence unit is simultaneously associated with its corresponding evidence category information, temporal sequence position, and node pointing relationship in the knowledge graph. After completing the evidence organization, using the target syndrome category or syndrome combination as the result subject, a correspondence is established between the matching score and the key evidence set one by one, and the key evidence is arranged according to the order of the key evidence in the diagnostic path, so that the evidence can reflect the reasoning process from symptoms or signs to pathogenesis and then to syndrome nodes. When the target result is a syndrome combination, a corresponding evidence path is established for each syndrome in the combination, and they are marked according to primary and secondary relationships or parallel relationships, thereby forming a hierarchical syndrome description record. Finally, the target syndrome category or syndrome combination, the corresponding matching score, and the organized key evidence set are output in a unified manner, so that the generated syndrome matching result not only includes the syndrome judgment conclusion, but also the evidence basis and structural relationship corresponding to the conclusion.

[0157] Example 2

[0158] Please see Figure 4 Another embodiment of the present invention provides a deep learning-based syndrome classification and matching system, comprising: an evidence feature construction module, a similarity calculation module, a recalculation module, and a classification and matching module;

[0159] The evidence feature construction module is used to acquire TCM diagnosis and treatment data of the individual to be diagnosed, perform terminology normalization and feature extraction on the TCM diagnosis and treatment data, and perform semantic alignment in combination with TCM knowledge graph to construct evidence features. The TCM diagnosis and treatment data includes text of four diagnostic methods, structured test indicators or physical signs records.

[0160] The similarity calculation module is used to construct a syndrome prototype library, and to encode the evidence features using a deep learning model to obtain evidence vectors. The similarity between the evidence vectors and each syndrome prototype is calculated through adaptive metric to obtain a syndrome candidate set and corresponding matching scores.

[0161] The recalculation module is used to optimize the deep learning model through consistency constraints, perform counterfactual perturbations on the evidence features, and recalculate the evidence matching score.

[0162] The classification and matching module is used to determine the target syndrome category or syndrome combination based on the optimized matching score, and output the corresponding syndrome matching results and key evidence.

[0163] In addition, the parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of the corresponding technical solutions in the prior art have not been described in detail, so as to avoid excessive elaboration.

[0164] 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 descriptions are merely specific embodiments of the present invention and are not intended to limit the invention. Any modifications, equivalent substitutions, or improvements 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 syndrome classification and matching method based on deep learning, characterized in that, include: Acquire individual syndrome-related data, perform terminology normalization and feature extraction on the syndrome-related data, and combine it with knowledge graph for semantic alignment to construct evidence features. The syndrome-related data includes textual information on the four diagnostic methods, structured test indicators, or physical signs records. A syndrome prototype library is constructed, and the evidence features are encoded using a deep learning model to obtain evidence vectors. The similarity between the evidence vectors and each syndrome prototype is calculated using an adaptive metric to obtain a syndrome candidate set and corresponding matching scores. The deep learning model is optimized by using consistency constraints, the evidence features are perturbed by counterfactual means, and the evidence matching score is recalculated. The target syndrome category or syndrome combination is determined based on the optimized matching score, and the corresponding syndrome matching results and key evidence are output.

2. The syndrome classification and matching method based on deep learning as described in claim 1, characterized in that, The constructed evidence features include: Acquire TCM diagnosis and treatment data of the individual to be diagnosed within a preset treatment period, and collect them according to data source and time order to form a set of original evidence fragments. The TCM diagnosis and treatment data includes medical record text, consultation record, tongue image description, pulse image description, test indicators and symptom change record. The original evidence fragment set is segmented into words and identified as a symptom phrase. Different expressions conveying the same diagnostic or treatment meaning are uniformly mapped into standard terms and reorganized into a standard evidence unit sequence according to preset rules. Contextual analysis is performed on the standard evidence unit sequence, and related standard evidence units are combined to form a set of candidate dialectical clues; The evidence units in the candidate diagnostic clues are mapped to the corresponding nodes in the TCM knowledge graph, and evidence association paths are formed based on the diagnostic relationships between the nodes. Based on the standard evidence unit type, knowledge graph mapping results, and time sequence, the evidence association path is organized and identified to generate evidence features.

3. The syndrome classification and matching method based on deep learning as described in claim 2, characterized in that, The process of organizing and identifying the evidence association paths based on standard evidence unit types, knowledge graph mapping results, and time sequence to generate evidence features includes: According to the category attributes of standard evidence units, the evidence units in the evidence association path are divided, and according to the mapping nodes of each evidence unit in the knowledge graph, they are assigned to the corresponding syndrome element level to form a multi-layer evidence path set. The evidence units in the multi-layered evidence path set are rearranged in chronological order, and similar evidence units appearing in consecutive time segments are merged and organized to form a chronological evidence chain segment. Based on the node relationships in the knowledge graph, adjacent evidence units in the temporal evidence chain segment are marked with relationships, and an evidence relationship sequence is constructed according to the order in which the relationships appear. The evidence relationship sequence is combined and labeled with the corresponding evidence unit category information, time sequence, and knowledge graph node relationship to form an evidence feature sequence.

4. The syndrome classification and matching method based on deep learning as described in claim 1, characterized in that, The process of constructing a syndrome prototype library and encoding the evidence features using a deep learning model to obtain evidence vectors, then calculating the similarity between the evidence vectors and each syndrome prototype using an adaptive metric to obtain a syndrome candidate set and corresponding matching scores, includes: Historical diagnostic samples corresponding to preset syndrome categories are collected, core evidence features and related evidence features are extracted, and a set of syndrome prototypes corresponding to the syndrome categories is constructed according to the differences in diagnostic paths. The evidence features are input into a deep learning model, and the order of evidence units, evidence relationships and knowledge graph node information are jointly encoded to generate the evidence vector of the individual to be diagnosed. The evidence vector is pre-matched with each syndrome prototype set, and the target syndrome prototypes to be matched are selected based on the evidence vector of the individual to be diagnosed. Based on the evidence composition and temporal order of the evidence vectors, an adaptive measurement rule is used to calculate the similarity relationship between the evidence vectors and each target syndrome prototype; The syndrome categories are sorted according to the similarity relationship to determine the syndrome candidate set and generate the corresponding matching score.

5. The syndrome classification and matching method based on deep learning as described in claim 4, characterized in that, The step of calculating the similarity relationship between the evidence vector and each target symptom prototype using an adaptive metric rule based on the evidence composition and temporal order of the evidence vector includes: Read the evidence category information, knowledge graph node relationships and time sequence in the evidence vector, and determine the corresponding dialectical measurement scenario accordingly; Based on the dialectical measurement scenario, the corresponding target measurement rule is selected from the preset set of adaptive measurement rules; Based on the target measurement rule, the evidence vector is divided into multiple comparison segments, and each segment is matched with the corresponding segment in each target syndrome prototype. The compared segments are aggregated to form the similarity relationship between the evidence vector and the prototype of each target symptom.

6. The syndrome classification and matching method based on deep learning as described in claim 5, characterized in that, Based on the similarity relationship, the syndrome categories are sorted to determine the candidate syndrome set, and corresponding matching scores are generated, including: The similarity relationships between the evidence vectors and the prototypes of each syndrome are merged according to the syndrome category to form the category matching records corresponding to each syndrome category; Based on the category matching records of each syndrome category, and combined with the organ orientation and cold / heat and deficiency / excess attributes in the knowledge graph, the syndrome categories are arranged in order to form the syndrome category ranking results; Based on the sorting results of the syndrome categories, select syndrome categories that are within the preset sorting range, and combine them according to the coexistence relationship or primary and secondary relationship between syndromes to form a syndrome candidate set; Based on the sorting results of the syndrome categories and the category matching records corresponding to each syndrome category, a corresponding matching score is generated for each candidate in the syndrome candidate set.

7. The syndrome classification and matching method based on deep learning as described in claim 1, characterized in that, The optimization of the deep learning model through consistency constraints, the counterfactual perturbation of the evidence features, and the recalculation of the symptom matching score include: Identify the key evidence units, accompanying evidence units, and constraining evidence units involved in the current symptom matching, and determine the key evidence units, accompanying evidence units, and constraining evidence units as different types of counterfactual perturbation anchor points respectively; Based on the counterfactual disturbance anchor point, the original evidence features are replaced, deleted, inserted, time-shifted, or attribution rewritten to generate counterfactual evidence features corresponding to the original evidence features. The original evidence features and each counterfactual evidence feature are re-input into the deep learning model to obtain the first matching result corresponding to the original evidence features and the second matching result corresponding to each counterfactual evidence feature. The first matching result is compared with each of the second matching results to generate constraint instructions that change the original syndrome ranking relationship or switch the candidate syndrome attribution; and the constraint instructions are organized into a set of consistency constraints. Based on the set of consistency constraints, the deep learning model is iteratively adjusted, and after the adjustment is completed, the original evidence features are recalculated for syndrome matching to generate a set of candidate syndromes optimized by consistency constraints and corresponding matching scores.

8. The syndrome classification and matching method based on deep learning as described in claim 7, characterized in that, Based on the aforementioned consistency constraint set, the deep learning model is iteratively adjusted, and after the adjustment is completed, the original evidence features are recalculated for syndrome matching to generate a consistency constraint-optimized candidate syndrome set and corresponding matching scores, including: Each constraint instruction in the consistency constraint set is mapped to the evidence encoding processing, syndrome prototype comparison processing, and syndrome ranking processing stages, forming a corresponding constraint action sequence; Based on the aforementioned constraint sequence, the evidence encoding relationship, prototype matching relationship, and syndrome ranking relationship in the deep learning model are iteratively adjusted; After completing the iterative adjustment, the original evidence features are re-input into the deep learning model, and the evidence encoding, syndrome prototype comparison and syndrome ranking processes are re-executed to obtain new syndrome matching results. Based on the new syndrome matching results, a set of candidate syndromes is determined, and a matching score corresponding to each candidate syndrome is generated.

9. The syndrome classification and matching method based on deep learning as described in claim 1, characterized in that, The process of determining the target syndrome category or syndrome combination based on the optimized matching score and outputting the corresponding syndrome matching results and key evidence includes: Read the matching scores of each syndrome candidate after consistency constraint optimization, and determine the target syndrome category or syndrome combination based on the score ranking and the coexistence or primary and secondary relationship between syndromes; For the target syndrome category or syndrome combination, starting from the original evidence features, backtracking is performed along the order of evidence units and the knowledge graph mapping path to form a corresponding dialectical path record; Based on the dialectical path record, identify the evidence units involved in the syndrome determination and determine them as the key evidence set corresponding to the target syndrome; The target syndrome category or syndrome combination, the corresponding matching score, and the key evidence set are correlated and output to form a syndrome matching result.

10. A deep learning-based syndrome classification and matching system, used to implement the deep learning-based syndrome classification and matching method according to any one of claims 1-9, characterized in that, include: The system includes a feature construction module, a similarity calculation module, a recalculation module, and a classification and matching module. The evidence feature construction module is used to acquire individual syndrome-related data, perform terminology normalization and feature extraction on the syndrome-related data, and perform semantic alignment in conjunction with knowledge graphs to construct evidence features. The syndrome-related data includes textual information on the four diagnostic methods, structured test indicators, or physical signs records. The similarity calculation module is used to construct a syndrome prototype library, and to encode the evidence features using a deep learning model to obtain evidence vectors. The similarity between the evidence vectors and each syndrome prototype is calculated through adaptive metric to obtain a syndrome candidate set and corresponding matching scores. The recalculation module is used to optimize the deep learning model through consistency constraints, perform counterfactual perturbations on the evidence features, and recalculate the evidence matching score. The classification and matching module is used to determine the target syndrome category or syndrome combination based on the optimized matching score, and output the corresponding syndrome matching results and key evidence.