Data analysis method, electronic device, and computer-readable storage medium

By constructing a target ternary heterogeneous graph and a symptom analysis model, the problem of logical conflict between disease, syndrome, and symptom in the TCM auxiliary diagnostic system was solved, and more accurate diagnostic results were achieved.

CN123053442APending Publication Date: 2026-11-06SANLUWU WISDOM (BEIJING) MEDICAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611075475.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-20
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

There is a logical conflict between disease, syndrome, and symptom in existing TCM auxiliary diagnostic systems.

Method used

A target ternary heterogeneous graph is constructed, including disease nodes, syndrome nodes, and symptom nodes. Prediction is performed using a symptom analysis model. By combining a heterogeneous graph attention network and a dual-task head, the compatibility and confidence of disease-syndrome combinations are determined to avoid logical contradictions.

Benefits of technology

It enables data analysis based on the correlation between diseases, syndrome types, and symptoms, avoiding contradictory disease-syndrome combinations and improving the accuracy and logical correctness of diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123053442A_ABST
    Figure CN123053442A_ABST
Patent Text Reader

Abstract

This invention proposes a data analysis method, electronic device, and computer-readable storage medium. The method includes the following steps: acquiring medical history data of a target object; constructing a target ternary heterogeneous graph corresponding to the medical history data, wherein the nodes in the target ternary heterogeneous graph include disease nodes, syndrome type nodes, and symptom nodes, and the edges of the target ternary heterogeneous graph indicate the association between disease, syndrome type, and symptom; and inputting the target ternary heterogeneous graph into a symptom analysis model to obtain data analysis information corresponding to the medical history data. By constructing a ternary heterogeneous graph corresponding to the medical history data, it is possible to perform prediction of data analysis information based on the association between disease, syndrome type, and symptom, thereby ensuring that the data analysis information satisfies the association between disease, syndrome type, and symptom, avoiding the output of contradictory disease, syndrome type, and symptom information, and guaranteeing the logical correctness of the data analysis information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent assistance in traditional Chinese medicine, and in particular to a data analysis method, an electronic device, and a computer-readable storage medium. Background Technology

[0002] Current TCM-assisted diagnostic systems mostly employ rule engines (such as Drools), traditional machine learning (SVM, XGBoost), or independent multi-class deep learning models to map patient symptoms to pre-defined disease or syndrome databases. Some studies attempt to construct TCM knowledge graphs for symptom retrieval or single-point syndrome recommendation; however, existing matching and detection methods for determining diseases and syndromes are characterized by independence, leading to logical conflicts between the resulting diseases, syndromes, and symptoms. Summary of the Invention

[0003] The main objective of this invention is to propose a data analysis method, electronic device, and computer-readable storage medium, which aims to solve the problem of logical conflicts between the diseases, syndromes, and symptoms obtained by existing diagnostic methods.

[0004] To achieve the above objectives, the present invention provides a data analysis method, the method comprising the following steps: Obtain the medical consultation data of the target group; Construct a target ternary heterogeneous graph corresponding to the consultation data, wherein the nodes in the target ternary heterogeneous graph include disease nodes, syndrome type nodes, and symptom nodes, and the edges of the target ternary heterogeneous graph indicate the association between diseases, syndrome types, and symptoms; The target ternary heterogeneous graph is input into the symptom analysis model to obtain the data analysis information corresponding to the consultation data, wherein the symptom analysis model predicts the data analysis results based on the correlation between disease, syndrome type and symptoms.

[0005] Optionally, constructing the target ternary heterogeneous graph corresponding to the consultation data includes: Obtain multi-source collected data from the consultation data; Modal features are obtained by performing feature extraction on the collected data respectively; Cross-modal contrastive learning alignment is performed on each of the modal features to project each of the modal features into the target semantic space; Generate the symptom node embedding matrix corresponding to the modal features; The target ternary heterogeneous graph is constructed based on the symptom node embedding matrix.

[0006] Optionally, constructing the target ternary heterogeneous graph based on the symptom node embedding matrix includes: Obtain an initial ternary heterogeneous graph, wherein the initial ternary heterogeneous graph includes initial nodes and edges, and the edges indicate the association between diseases, syndrome types, and symptoms; The symptom node embedding matrix is ​​assigned to the symptom nodes in the initial ternary heterogeneous graph to obtain the target ternary heterogeneous graph.

[0007] Optionally, the process of obtaining the initial ternary heterogeneous graph includes: Obtain sample case data; For each of the sample case data, the sample disease, sample syndrome, and sample symptoms contained in the sample case data are determined, and sub-data indicating the association between the sample disease, the sample syndrome, and the sample symptoms is generated; The probability of association between sample diseases, sample syndrome types, and sample symptoms is determined by combining the sub-data in the sample case data; Generate a node set corresponding to the sample disease, the sample syndrome, and the sample symptoms; The edges of the initial ternary heterogeneous graph are determined based on the association probability; The initial ternary heterogeneous graph is obtained by combining the node set and the edges.

[0008] Optionally, the symptom analysis model includes an attention network layer, and the step of inputting the target ternary heterogeneous graph into the symptom analysis model to obtain the data analysis information corresponding to the consultation data includes: The target ternary heterogeneous graph is input into the heterogeneous graph attention network layer for propagation to obtain high-dimensional contextual features, wherein the meta-paths corresponding to the heterogeneous graph attention network indicate the association direction of disease, syndrome type, and symptoms; The data analysis information is obtained by predicting the high-dimensional context features.

[0009] Optionally, the symptom analysis model includes a dual-task head, and the prediction of the high-level context features to obtain the data analysis information includes: The high-level context features are input into the dual task head to obtain the initial probability, which includes the disease probability corresponding to each disease node and the syndrome probability corresponding to each syndrome node. Determine the combination of disease and syndrome corresponding to any disease node and any syndrome type node. For each of the aforementioned disease-symptom combinations, the compatibility of the disease-symptom combinations is determined by combining the edges of the target ternary heterogeneous graph; The confidence level of the disease combination is determined based on the compatibility and the initial probability, wherein the confidence level is positively correlated with the compatibility; The combination of diseases and symptoms with the highest confidence level is selected as the target combination of diseases and symptoms included in the data analysis information.

[0010] Optionally, after determining the confidence level of the disease combination based on the compatibility and the initial probability, the process includes: Determine whether the highest confidence level reaches the confidence threshold; If the highest confidence level does not reach the confidence threshold, then it is determined that the consultation data does not contain the suggested consultation type. Generate supplementary suggestions that include the suggested consultation type; The data analysis information is obtained by combining the supplementary suggestions.

[0011] Optionally, the step of predicting the high-dimensional context features to obtain the data analysis information includes: The target disease combination is obtained by predicting the high-dimensional context features; Obtain the target disease and target syndrome type from the target syndrome combination; Obtain the symptoms from the consultation data; The derivation path between the consultation symptoms, target disease, and target syndrome is determined based on the correlation relationships contained in the edges of the target ternary heterogeneous graph. Generate the data analysis information containing the target disease combination and the derivation path.

[0012] To achieve the above objectives, the present invention also provides an electronic device, the electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the data analysis method as described above.

[0013] To achieve the above objectives, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the data analysis method described above.

[0014] This invention proposes a data analysis method, electronic device, and computer-readable storage medium to acquire medical records of a target object; construct a target ternary heterogeneous graph corresponding to the medical records, wherein the nodes in the target ternary heterogeneous graph include disease nodes, syndrome type nodes, and symptom nodes, and the edges of the target ternary heterogeneous graph indicate the association between disease, syndrome type, and symptom; input the target ternary heterogeneous graph into a symptom analysis model to obtain data analysis information corresponding to the medical records. By constructing a ternary heterogeneous graph corresponding to the medical records, it is possible to perform prediction of data analysis information under the association between disease, syndrome type, and symptom, thereby ensuring that the data analysis information can satisfy the association between disease, syndrome type, and symptom, avoiding the output of contradictory disease, syndrome type, and symptom, and guaranteeing the logical correctness of the data analysis information. Attached Figure Description

[0015] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating the first embodiment of the data analysis method of the present invention; Figure 2 This is a schematic diagram of the module structure of the electronic device of the present invention. Detailed Implementation

[0018] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.

[0019] This invention provides a data analysis method, referring to Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the data analysis method of the present invention, the method comprising the following steps: Step S10: Obtain the medical history data of the target subject; The target audience is users who are seeking medical treatment.

[0020] The consultation data is the data obtained by collecting symptoms from the target subject; the specific type of consultation data can be set according to actual needs, such as consultation data including text data, image data, pulse signals, etc. Text data may include the user's chief complaint and present medical history; Image data may include images of the tongue and its surface; Pulse signals can be obtained by detecting a user's pulse using sensors, such as pressure sensors or photoelectric sensors.

[0021] Step S20: Construct a target ternary heterogeneous graph corresponding to the consultation data, wherein the nodes in the target ternary heterogeneous graph include disease nodes, syndrome nodes, and symptom nodes, and the edges of the target ternary heterogeneous graph indicate the association between diseases, syndromes, and symptoms; A ternary heterogeneous graph is a data structure that includes three types of nodes and models their relationships. It should be noted that the relationships described in this embodiment indicate the probability of the coexistence of diseases, syndromes, and symptoms. For example, the more related the diseases and syndromes are, the higher the probability that they coexist in a single diagnosis of the same object.

[0022] The ternary heterogeneous graph G takes the form of:

[0023] Where V is the set of nodes; E is the edge.

[0024] The node set includes disease node V D Certificate type node V Sy Symptom Node V S The form is V={V D V Sy V S}; It is understandable that.

[0025] The symbols indicate the relationship between diseases, syndrome types, and symptoms; the format is: E a→b This represents the correlation between a and b. The correlation is quantified by probability, such as E. a→b have:

[0026] W a,b Let be the probability that b exists when a occurs.

[0027] Relationships between nodes are constructed using edges, such as: E S→Sy The correlation between indicative symptoms and syndrome types includes:

[0028] This indicates the probability that a syndrome type is established when symptoms appear. It can be understood that this type of edge can be set with multiple sets of directed edges for different symptoms and syndrome types, thereby clarifying the relationship between multiple sets of symptoms and syndrome types.

[0029] E Sy→D The association between indicative syndrome types and diseases includes:

[0030] This represents the probability of the disease occurring when the syndrome is established. It can be understood that this type of edge can be set with multiple sets of directed edges for different syndromes and different diseases, thereby clarifying the relationship between multiple sets of syndromes and diseases.

[0031] E S→D Indicators of the association between symptoms and disease include:

[0032] This represents the probability of a disease occurring when symptoms appear. It is understandable that this type of edge can be used to set multiple sets of directed edges for different symptoms and diseases, thereby clarifying the relationship between multiple sets of symptoms and diseases.

[0033] The probabilities between specific nodes in the edge are set by analyzing cases or expert opinions; the edge is an inherent property of the ternary heterogeneous graph and does not change with the consultation data; the nodes in the target ternary heterogeneous graph are determined by the consultation data.

[0034] Step S30: Input the target ternary heterogeneous graph into the symptom analysis model to obtain the data analysis information corresponding to the consultation data, wherein the symptom analysis model predicts the data analysis results based on the correlation between disease, syndrome type and symptoms.

[0035] The target ternary heterogeneous graph combines object characteristics from the medical history data with the relationships between diseases, syndrome types, and symptoms. Therefore, based on the target ternary heterogeneous graph, the relationships between diseases, syndrome types, and symptoms constrain the diagnostic prediction results, enabling the diagnosis to be predicted under the constraints of these relationships. This ensures that the data analysis information does not violate the relationships between diseases, syndrome types, and symptoms, avoiding results that do not conform to diagnostic logic and improving diagnostic accuracy. Specific prediction methods can be set based on actual needs.

[0036] The symptom analysis model is used to predict diseases, syndrome types, and symptoms based on the target ternary heterogeneous graph and obtain data analysis information; the specific type of the symptom analysis model can be set according to actual needs.

[0037] This embodiment constructs a ternary heterogeneous graph corresponding to the consultation data, enabling the prediction of data analysis information based on the correlation between diseases, syndromes, and symptoms. This ensures that the data analysis information satisfies the correlation between diseases, syndromes, and symptoms, avoids outputting contradictory diseases, syndromes, and symptoms, and guarantees the logical correctness of the data analysis information.

[0038] Furthermore, in the second embodiment of the data analysis method of the present invention based on the first embodiment of the present invention, step S20 includes the following steps: Step S21: Obtain multi-source collected data from the consultation data; Step S22: Extract modal features from the collected data to obtain modal features; Step S23: Perform cross-modal contrastive learning alignment on each modal feature to project each modal feature onto the target semantic space; Step S24: Generate the symptom node embedding matrix corresponding to the modal features; Step S25: Construct the target ternary heterogeneous graph based on the symptom node embedding matrix.

[0039] Multi-source data refers to data obtained through different acquisition methods, such as multi-source data including text data, image data, pulse signals, etc.

[0040] It is understandable that different collected data come from different sources and have different modalities. Therefore, it is necessary to unify the multi-source collected data into the same space in order to achieve the fusion of data from different modalities.

[0041] Modal features are feature vectors obtained by extracting features from collected data based on the modality type of the collected data. Specific feature extraction methods can be set based on the actual modality of the collected data; for example, text data can be parsed using NLP (Natural Language Processing) to obtain corresponding modal features from user complaints and medical records. Image data includes images of the tongue and face of the target object acquired under standard light sources, which are then segmented and processed using a CNN (Convolutional Neural Network) to extract modal features of texture, color, and shape from the tongue and face images. The pulse signal is filtered, subjected to wavelet transform, and extracted using a one-dimensional 1D-CNN to obtain the corresponding modal features.

[0042] Cross-modal contrastive learning alignment is used to eliminate differences in feature spaces across different modalities, unify the semantic representation of features from different modalities, and achieve semantic interoperability of tongue, face, vein, and text features. Specific methods for cross-modal contrastive learning alignment can be set based on actual needs, such as using CLIP-style (Contrastive Language-Image Pre-training, a cross-modal contrastive learning method based on the CLIP paradigm) to achieve alignment.

[0043] The target semantic space is the semantic space in which each modality feature is aligned.

[0044] Modal features are converted into symptom node embedding matrices; the symptom node embedding matrix is ​​a node matrix carrying the symptom features contained in the consultation data; the symptom node embedding matrix corresponds to the nodes in the ternary heterogeneous graph; the symptom node embedding matrix HS The forms include:

[0045] Here, NS indicates the number of symptoms included; d represents the dimension.

[0046] The symptom node embedding matrix contains features corresponding to the consultation data. Therefore, the node parameters in the target ternary heterogeneous graph can be determined through the symptom node embedding matrix.

[0047] This embodiment achieves unified semantic fusion of multimodal diagnostic information, solving the problem of spatial fragmentation of tongue, face, pulse, and text features in traditional solutions.

[0048] Further, step S25 includes the following steps: Step S251: Obtain an initial ternary heterogeneous graph, wherein the initial ternary heterogeneous graph includes initial nodes and edges, and the edges indicate the association between diseases, syndrome types, and symptoms; Step S252: Assign the symptom node embedding matrix to the symptom nodes in the initial ternary heterogeneous graph to obtain the target ternary heterogeneous graph.

[0049] The initial ternary heterogeneous graph is a ternary heterogeneous graph template that does not carry personalized data of specific patients.

[0050] It is understandable that the edges in a ternary heterogeneous graph are data that objectively reflects the relationships, rather than personalized data for specific objects. Therefore, the edges in the initial ternary heterogeneous graph are directly used as the edges in the target ternary heterogeneous graph.

[0051] It is understandable that the consultation data reflects the symptoms of the target object, while what needs to be determined is the possible syndrome and disease of the symptoms. Therefore, the syndrome node and disease node in the initial ternary heterogeneous graph are preset embedding vectors. The preset values ​​of the syndrome node and disease node can be set according to actual needs, such as obtaining priors based on authoritative and standard knowledge bases through offline and training methods.

[0052] The symptom nodes in the initial ternary heterogeneous graph are null values ​​or placeholder vectors and do not contain any actual meaning. The features contained in the symptom node embedding matrix are assigned to the symptom nodes of the initial ternary heterogeneous graph, so that the initial ternary heterogeneous graph contains the symptom information of the specific object, and the desired target ternary heterogeneous graph is obtained.

[0053] This embodiment only updates the symptom node features, retains the preset embedding vectors of disease and syndrome type nodes, and accurately models the coupling relationship between the same disease with different symptoms and different diseases with the same symptoms.

[0054] Further, the following steps are included before step S251: Step S253: Obtain sample case data; Step S254: For each of the sample case data, determine the sample disease, sample syndrome, and sample symptoms contained in the sample case data, and generate sub-data indicating the association between the sample disease, the sample syndrome, and the sample symptoms; Step S255: Determine the correlation probability between the sample disease, sample syndrome type, and sample symptoms by combining the sub-data in the sample case data; Step S256: Generate a node set corresponding to the sample disease, the sample syndrome, and the sample symptoms; Step S257: Determine the edges of the initial ternary heterogeneous graph based on the association probability; Step S258: Combine the node set and the edges to obtain the initial ternary heterogeneous graph.

[0055] The sample case data is based on real TCM diagnosis and treatment records or data constructed by combining expert, standard, and guideline information; each sample case data includes information such as the patient's symptoms, clinically diagnosed syndrome type, and diagnosed TCM disease.

[0056] The sample diseases are standardized TCM disease names diagnosed by doctors in the sample cases; The sample syndrome type is the standardized TCM syndrome type classification obtained from the syndrome differentiation of sample cases; The sample symptoms are those of the sample cases that include standardized four diagnostic signs such as chief complaint, tongue appearance, facial appearance, and pulse.

[0057] It is understandable that the sample disease, sample syndrome, and sample symptoms obtained from a single sample case are related and are treated as a sub-data; that is, the sub-data is a ternary association record obtained from a single sample case; in order to match the form of edges, the sub-data is set as paired association entries, that is, the sub-data contains three pairwise paired associations: "sample symptoms-sample syndrome", "sample syndrome-sample disease", and "sample symptoms-sample disease".

[0058] The association probability is the probability of a possible association relationship. Specifically, it can be determined based on the frequency of association relationships appearing in the sub-data. For example, count the pairwise association relationships in all sub-data and calculate the frequency of the association relationships. Based on the frequency, obtain the frequency of the association relationships in all data. Normalize the frequency of all association relationships and map it to the interval [0, 1]. The normalized frequency is used as the association frequency. Laplace smoothing is used for sparse association relationships to avoid the zero probability problem. Furthermore, the corresponding association probability can be set by combining the experience of experts, standards, and guidelines.

[0059] Disease nodes in the node set are obtained by deduplicating the sample diseases, and syndrome nodes are obtained by deduplicating the sample syndromes; symptom nodes are null values ​​or placeholder vectors.

[0060] Assigning the association probability to the weight of the corresponding edge, and combining the node set edges, we can obtain the initial ternary heterogeneous graph; furthermore, in the initial ternary heterogeneous graph, we can also simultaneously construct a clinical conflict mask, forcibly setting the weights corresponding to mutually exclusive medical and logically contradictory edges to 0, so as to embed a disease-symptom joint constraint mechanism within the graph structure.

[0061] It should be noted that the initial ternary heterogeneity diagram can be updated based on the supplementation and modification of sample case data.

[0062] This embodiment automatically calculates the correlation probability based on real sample cases, and the edge weights are consistent with the real clinical diagnostic rules.

[0063] Furthermore, in the third embodiment of the data analysis method of the present invention based on the first embodiment, the symptom analysis model includes an attention network layer, and step S30 includes the following steps: Step S31: Input the target ternary heterogeneous graph into the heterogeneous graph attention network layer for propagation to obtain high-dimensional contextual features, wherein the meta-path corresponding to the heterogeneous graph attention network indicates the association direction of disease, syndrome type, and symptoms; Step S32: Predict the high-dimensional context features to obtain the data analysis information.

[0064] HAN (Heterogeneous Graph Attention Network) aggregates features of different types of neighbor nodes in a hierarchical manner based on a preset metapath, and automatically calculates the attention coefficients between nodes to determine the deep associations between nodes; the specific structure of the heterogeneous graph attention network can be set according to actual needs, such as setting the heterogeneous graph attention network to 3 layers.

[0065] Metapaths define a fixed sequence of nodes for semantic propagation in heterogeneous graphs. In this embodiment, the metapath Φ = {S→Sy→D, S→D, S→Sy}, meaning that there are three metapaths: S→Sy→D indicates a path for identifying symptoms and then determining the disease based on the syndrome; S→D indicates a path for directly associating specific symptoms with the disease; and S→Sy indicates a path for associating symptoms with the syndrome.

[0066] The high-dimensional context feature is a high-dimensional vector of the fused global graph association information output by the disease node, syndrome node, and symptom node after being updated through multiple layers of HAN propagation.

[0067] High-dimensional contextual features integrate consultation data, prior probabilities contained in edges, and semantic context of different meta-paths, reflecting the dynamic contribution weight of symptoms to diseases and syndromes; therefore, high-dimensional contextual features can provide comprehensive data features for diagnosis.

[0068] In this embodiment, multi-modal features are fused through multi-layer HAN propagation, which solves the defects of traditional multimodal fusion such as simple splicing and information fragmentation. Meta-path, as a standardized semantic carrier, can directly trace back the complete inference link of symptoms, syndromes and diseases, and output quantitative contribution and confidence interval, making the model inference process interpretable.

[0069] Furthermore, the symptom analysis model includes a dual-task head, and step S32 includes the following steps: Step S321: Input the high-level context features into the dual task head to obtain the initial probability, which includes the disease probability corresponding to each disease node and the syndrome probability corresponding to each syndrome node. Step S322: Determine the disease-syndrome combination corresponding to any disease node and any syndrome type node. Step S323: For each of the disease combination, determine the compatibility of the disease combination by combining the edges of the target ternary heterogeneous graph; Step S324: Determine the confidence level of the disease combination based on the compatibility and the initial probability, wherein the confidence level is positively correlated with the compatibility; Step S325: The combination of diseases with the highest confidence level is selected as the target combination of diseases included in the data analysis information.

[0070] Dual-task head: Two independent classification networks. The specific type of classification network can be set according to actual needs, such as using MLP (Multilayer Perceptron). One branch of the dual-task head receives disease node features for disease classification, and the other branch receives syndrome node features for syndrome classification, each completing independent prediction.

[0071] The initial probability is the independent marginal probability output by the dual task heads; the initial probability does not consider the correlation between diseases and syndrome types.

[0072] Disease-syndrome combination: A binary pairing set formed by pairing any disease node with any syndrome node, including all theoretically existing disease and syndrome combinations.

[0073] Compatibility is a numerical indicator used to quantitatively evaluate whether a combination of diseases and syndromes conforms to the clinical diagnosis and treatment rules of traditional Chinese medicine. Compatibility can be determined by combining prior knowledge. For example, the relationship between syndrome and disease can be determined by the weight of the corresponding edge. If the relationship between the two is low, the compatibility between them is low. Another example is to determine whether the specific syndrome can be compatible with the existing symptoms by the weight of the corresponding edge.

[0074] Assuming the initial probabilities of diseases and syndromes remain unchanged, the higher the compatibility score, the higher the final confidence score. The specific method for determining the confidence score can be set based on actual needs, such as using CRF (Conditional Random Field) decoding optimization to obtain the confidence score of each disease and syndrome combination through joint distribution.

[0075] It is understandable that the higher the confidence level, the higher the accuracy of the disease combination. Therefore, in this embodiment, the disease combination with the highest confidence level is taken as the disease combination determined in the final diagnosis.

[0076] In this embodiment, dual-task output, disease-symptom conflict penalty loss, and CRF global optimization ensure that the output conforms to clinical priors and avoids common-sense errors such as disease-symptom mismatch.

[0077] Further, the following step is included after step S324: Step S326: Determine whether the highest confidence level has reached the confidence threshold; Step S327: If the highest confidence level does not reach the confidence threshold, then determine the suggested consultation type not included in the consultation data; Step S328: Generate supplementary suggestions containing the suggested consultation type; Step S329: Obtain the data analysis information by combining the supplementary suggestions.

[0078] If the highest confidence level reaches the confidence threshold, no additional operation is performed.

[0079] Understandably, when even the highest confidence level is low, it indicates that the existing consultation data cannot support clear data analysis information; therefore, in order to improve diagnostic results, it is recommended to supplement more consultation data.

[0080] The confidence threshold is the threshold for determining the reliability of the confidence level; the specific value can be set based on actual needs, such as based on TCM diagnosis and treatment guidelines or clinical medical record statistics.

[0081] It is recommended that the consultation type be a data type that is not included in the consultation data and can provide more effective information.

[0082] Multiple required consultation types can be preset, such as chief complaint, images, pulse, etc. When the highest confidence level does not reach the confidence threshold, the missing consultation type to be provided is determined in the consultation data, and a suggested consultation type is obtained. For example, when the difference between two high confidence levels is less than the preset difference threshold, it can be suggested to supplement the consultation type corresponding to Western medicine examination, such as gastroscopy report, to further increase the data dimensions.

[0083] Supplementary suggestions are generated based on the suggested consultation type to remind doctors or patients to provide more data in the data analysis information.

[0084] Further, step S32 includes the following steps: Step S3210: Predict the target disease combination by analyzing the high-dimensional context features; Step S3211: Obtain the target disease and target syndrome type in the target disease-syndrome combination; Step S3212: Obtain the consultation symptoms from the consultation data; Step S3213: Determine the derivation path between the consultation symptoms, target disease and target syndrome based on the association relationships contained in the edges of the target ternary heterogeneous graph; Step S3214: Generate the data analysis information containing the target disease combination and the derivation path.

[0085] Symptoms in the consultation refer to the symptoms of the target subject determined through consultation data.

[0086] The derivation path is a complete traceable reasoning link generated based on the diagnostic meta-path.

[0087] In this embodiment, after obtaining the target disease, target syndrome type, and symptoms, the derivation path is constructed based on the association relationship contained in the edge, that is, the association probability determined in the prior. This enables the reasoning of data analysis information to be clear, which is in line with the core diagnosis and treatment logic of TCM syndrome differentiation and disease diagnosis, meets the transparent regulatory requirements of medical AI, and supports secondary review and teaching training for physicians.

[0088] The overall implementation process of this application is illustrated below with a practical example: For patients presenting with "abdominal distension and pain accompanied by belching, pale red tongue with thin white coating, and wiry pulse," a combined diagnosis of the disease and symptoms is recommended. 1. Multimodal feature alignment; The consultation data includes: The text symptoms are "abdominal distension and pain, frequent belching, and worsening mood swings" (BERT encoding yields ftext∈R768); Tongue image (feature vector f extracted by ResNet50) tongue ∈R512); Pulse waveform (feature vector f extracted using 1D-CNN+BiLSTM (Bidirectional Long Short-Term Memory) network) pulse ∈R256).

[0089] After cross-modal comparison and alignment of consultation data, it is mapped to the initial embedding H of symptom nodes. S (0)Matching graph nodes: stomach distension and pain, belching, pale red tongue, thin white coating, and wiry pulse.

[0090] 2. Heterogeneous graph construction and prior injection; Load the pre-built ternary heterogeneous graph G=(V,E).

[0091] Initialize the activation value for the symptom node.

[0092] Edge weight example: w 胃胀痛→肝胃不和 =0.78, w 肝胃不和→慢性胃 Inflammation = 0.65, w 胃胀痛→慢性胃炎 =0.71.

[0093] Conflict mask set to zero: For example, if “spleen and stomach deficiency and cold syndrome” and “pulse wiry, slippery and rapid” are incompatible, their corresponding edge weights are forced to 0.

[0094] 3. Information dissemination through different images; Set up L=3 layers of HAN propagation. The meta-path set Φ={S→Sy→D, S→D, S→Sy}. Calculate the attention coefficient and aggregate neighbor information. After 3 layers, the disease node h... 慢性胃炎 Certificate type node h 肝胃不和 A high-dimensional contextual representation was obtained. The attention heatmap showed that "stomach bloating and pain" and "wiry pulse" contributed the most to "liver-stomach disharmony" (0.62 / 0.58).

[0095] 4. Joint reasoning and constraint optimization; Initial output probabilities for dual task heads: p(chronic gastritis) = 0.84, p(liver-stomach disharmony) = 0.79, p(spleen-stomach deficiency) = 0.21.

[0096] Coupling constraint verification: Chronic gastritis Liver-stomach disharmony (incompatibility); chronic gastritis Spleen and stomach deficiency and cold (compatible but tongue and pulse do not match, weight reduced).

[0097] After CRF decoding optimization, the joint distribution is as follows: Confidence P(chronic gastritis, liver-stomach disharmony) = 0.76, Confidence P(chronic gastritis, spleen-stomach deficiency) = 0.09. The system outputs Top-1, i.e., the diagnosis with the highest confidence.

[0098] 5. Result output and path backtracking; The system generates a diagnostic report: Disease: Chronic gastritis (confidence level 0.84) Syndrome type: Liver-stomach disharmony (confidence level 0.79) Reasoning path: Stomach distension and pain + belching → 0.78 → Liver-stomach disharmony syndrome → 0.65 → Chronic gastritis; Wiry pulse → 0.72 → Liver-stomach disharmony syndrome (emotional association); Pale red tongue with thin white coating → → Exclude damp-heat / yin deficiency syndrome.

[0099] Quality control notice: The disease-symptom match rate is 92%, which conforms to the diagnostic and treatment guidelines of "Traditional Chinese Medicine Internal Medicine". If the confidence level is <0.7, the instruction to "suggest supplementing the abdominal palpation or gastroscopy report" will be triggered.

[0100] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0101] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0102] Reference Figure 2 In terms of hardware structure, the electronic device may include components such as a communication module 10, a memory 20, and a processor 30. In the electronic device, the processor 30 is connected to both the memory 20 and the communication module 10. The memory 20 stores a computer program, which is executed by the processor 30. When the computer program is executed, it implements the steps of the above-described method embodiments.

[0103] The communication module 10 can connect to external communication devices via a network. The communication module 10 can receive requests from the external communication devices and can also send requests, instructions, and information to the external communication devices. The external communication devices can be other electronic devices, servers, or IoT devices, such as televisions, etc.

[0104] The memory 20 can be used to store software programs and various data. The memory 20 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as acquiring diagnostic data from a target subject), etc.; the data storage area may include a database, and may store data or information created based on system usage. Furthermore, the memory 20 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0105] The processor 30 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 20, and by calling data stored in the memory 20, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. The processor 30 may include one or more processing units; optionally, the processor 30 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 30.

[0106] although Figure 2 Not shown, but the above-described electronic device may further include a circuit control module for connecting to a power supply to ensure the normal operation of other components. Those skilled in the art will understand that... Figure 2 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0107] The present invention also proposes a computer-readable storage medium having a computer program stored thereon. The computer-readable storage medium may be... Figure 2 The memory 20 in the electronic device may also be at least one of ROM (Read-Only Memory) / RAM (Random Access Memory), magnetic disk, optical disk, etc. The computer-readable storage medium includes a number of instructions to cause a terminal device with a processor (which may be a television, automobile, mobile phone, computer, server, terminal, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0108] In this invention, the terms "first," "second," "third," "fourth," and "fifth" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0109] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0110] Although embodiments of the present invention have been shown and described above, the scope of protection of the present invention is not limited thereto. It is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, and substitutions to the above embodiments within the scope of the present invention, and such changes, modifications, and substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A data analysis method, characterized by, The data analysis methods include: Obtain the medical consultation data of the target group; Construct a target ternary heterogeneous graph corresponding to the consultation data, wherein the nodes in the target ternary heterogeneous graph include disease nodes, syndrome type nodes, and symptom nodes, and the edges of the target ternary heterogeneous graph indicate the association between diseases, syndrome types, and symptoms; The target ternary heterogeneous graph is input into the symptom analysis model to obtain the data analysis information corresponding to the consultation data, wherein the symptom analysis model predicts the data analysis results based on the correlation between disease, syndrome type and symptoms.

2. The data analysis method as described in claim 1, characterized in that, The construction of the target ternary heterogeneous graph corresponding to the consultation data includes: Obtain multi-source collected data from the consultation data; Modal features are obtained by performing feature extraction on the collected data respectively; Cross-modal contrastive learning alignment is performed on each of the modal features to project each of the modal features into the target semantic space; Generate the symptom node embedding matrix corresponding to the modality features; The target ternary heterogeneous graph is constructed based on the symptom node embedding matrix.

3. The data analysis method as described in claim 2, characterized in that, The construction of the target ternary heterogeneous graph based on the symptom node embedding matrix includes: Obtain an initial ternary heterogeneous graph, wherein the initial ternary heterogeneous graph includes initial nodes and edges, and the edges indicate the association between diseases, syndrome types, and symptoms; The symptom node embedding matrix is ​​assigned to the symptom nodes in the initial ternary heterogeneous graph to obtain the target ternary heterogeneous graph.

4. The data analysis method as described in claim 3, characterized in that, The process of obtaining the initial ternary heterogeneous graph includes: Obtain sample case data; For each of the sample case data, the sample disease, sample syndrome, and sample symptoms contained in the sample case data are determined, and sub-data indicating the association between the sample disease, the sample syndrome, and the sample symptoms is generated; The probability of association between sample diseases, sample syndrome types, and sample symptoms is determined by combining the sub-data in the sample case data; Generate a node set corresponding to the sample disease, the sample syndrome, and the sample symptoms; The edges of the initial ternary heterogeneous graph are determined based on the association probability; The initial ternary heterogeneous graph is obtained by combining the node set and the edges.

5. The data analysis method as described in claim 1, characterized in that, The symptom analysis model includes an attention network layer, and the step of inputting the target ternary heterogeneous graph into the symptom analysis model to obtain the data analysis information corresponding to the consultation data includes: The target ternary heterogeneous graph is input into the heterogeneous graph attention network layer for propagation to obtain high-dimensional contextual features, wherein the meta-paths corresponding to the heterogeneous graph attention network indicate the association direction of disease, syndrome type, and symptoms; The data analysis information is obtained by predicting the high-dimensional context features.

6. The data analysis method as described in claim 5, characterized in that, The symptom analysis model includes a dual-task head, and the prediction of the high-level context features to obtain the data analysis information includes: The high-level context features are input into the dual task head to obtain the initial probability, which includes the disease probability corresponding to each disease node and the syndrome probability corresponding to each syndrome node. Determine the combination of disease and syndrome corresponding to any disease node and any syndrome type node. For each of the aforementioned disease-symptom combinations, the compatibility of the disease-symptom combinations is determined by combining the edges of the target ternary heterogeneous graph; The confidence level of the disease combination is determined based on the compatibility and the initial probability, wherein the confidence level is positively correlated with the compatibility; The combination of diseases and symptoms with the highest confidence level is selected as the target combination of diseases and symptoms included in the data analysis information.

7. The data analysis method as described in claim 6, characterized in that, After determining the confidence level of the disease combination based on the compatibility and the initial probability, the process includes: Determine whether the highest confidence level reaches the confidence threshold; If the highest confidence level does not reach the confidence threshold, then it is determined that the consultation data does not contain the suggested consultation type. Generate supplementary suggestions that include the suggested consultation type; The data analysis information is obtained by combining the supplementary suggestions.

8. The data analysis method as described in claim 5, characterized in that, The process of predicting the high-dimensional context features to obtain the data analysis information includes: The target disease combination is obtained by predicting the high-dimensional context features; Obtain the target disease and target syndrome type from the target syndrome combination; Obtain the symptoms from the consultation data; The derivation path between the consultation symptoms, target disease, and target syndrome is determined based on the correlation relationships contained in the edges of the target ternary heterogeneous graph. Generate the data analysis information containing the target disease combination and the derivation path.

9. An electronic device, characterized in that, The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the data analysis method as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the data analysis method as described in any one of claims 1 to 8.