Patient multi-dimensional data similarity measurement and queue discovery method based on artificial intelligence

By employing an artificial intelligence-based approach, utilizing Transformer encoders and Bayesian networks, the dynamic adaptability issues of patients' health status changes and cohort segmentation were addressed, enabling precise and personalized medicine support for chronic disease subtyping.

CN121839083APending Publication Date: 2026-04-10BEIJING XIANYUN QIYUAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies cannot effectively capture the dynamic changes in patients' health status, ignore the intermediate states that patients may cross multiple clusters, have a single dimension in cohort division, lack dynamic adaptability, and are difficult to quickly aggregate enough samples for statistical analysis.

Method used

An artificial intelligence-based approach was adopted to calculate the correlation of multi-source time series data through the self-attention mechanism of the Transformer encoder, construct hierarchical clustering trees and Bayesian networks, establish a patient data graph structure, and perform cohort partitioning.

Benefits of technology

It enables the capture of dynamic changes in patients' health status, distinguishes between patients with short-term fluctuations and those with long-term stability, improves the accuracy of chronic disease subtyping, takes into account both disease commonality and individual heterogeneity, distinguishes between correlation and causation, and supports personalized and group-based medical care.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121839083A_ABST
    Figure CN121839083A_ABST
Patent Text Reader

Abstract

The invention discloses a patient multi-dimensional data similarity measurement and queue discovery method based on artificial intelligence, relates to the technical field of smart medical treatment, and solves the technical problems that an intermediate state that a patient possibly crosses multiple clusters is ignored, the queue division dimension is single, and dynamic adaptability is lacked. By extracting dynamic characteristics, such as vital signs and symptom scores, of the patient, which change along with time, the limitation of only depending on static characteristics is avoided. And patients with short-term fluctuation but long-term stability and continuous deterioration can be distinguished conveniently. And subtype typing of chronic diseases is more accurate, and a time sequence mode is a key typing basis. And the time sequence track vector and the static feature are used for similarity calculation after being spliced or subjected to dimension reduction. And the single feature noise influence is reduced. Disease generality and individual heterogeneity are considered. Aggregate hierarchical clustering is adopted, similarity among samples is calculated, similar clusters are gradually combined, a tree diagram is generated, and patient grouping logic and correlation and causality distinguishing are visually displayed through a clustering tree.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of intelligent medical treatment, and particularly relates to a patient multi-dimensional data similarity measurement and cohort discovery method based on artificial intelligence. BACKGROUND

[0002] Under the background of precision medicine and digital transformation of clinical research, similar patient cohort discovery has become one of the core technologies connecting basic medical research and clinical practice. Traditional clinical research relies on manual screening of patient cohorts meeting the inclusion and exclusion criteria, which has problems such as low efficiency, strong subjectivity, and limited coverage. In rare disease research, due to the dispersion of cases and strong heterogeneity of symptoms, traditional methods are difficult to quickly aggregate enough samples for statistical analysis. With the popularity of electronic health records (EHR), medical images, genomics, wearable devices and other technologies, patient data presents the characteristics of multi-source heterogeneity, dynamic time series and high-dimensional sparsity: multi-source heterogeneity: covering structured data, unstructured data, time series data and omics data; dynamic time series: disease development is a continuous process, and static data snapshots cannot capture the evolution of the disease; high-dimensional sparsity: the feature dimension of a single patient can reach thousands or even tens of thousands, and there are a large number of missing values. These characteristics pose a serious challenge to traditional similarity measurement methods, and artificial intelligence technology is needed to break through the three core bottlenecks of “data silos”, “dynamic capture” and “explainability”, and realize the transformation of the cohort discovery mode from “experience-driven” to “data-driven”.

[0003] Existing patient multi-dimensional data similarity measurement and cohort discovery schemes are mostly based on static features or single-time-point data, which cannot capture the dynamic changes of patient health status, directly use raw multi-dimensional data to calculate similarity, do not consider the correlation or time series dependence between features, and traditional schemes use hard clustering to ignore the intermediate state of patients that may cross multiple clusters, while the cohort division dimension is single and lacks dynamic adaptability. SUMMARY

[0004] The present application aims to at least solve one of the technical problems existing in the prior art; for this purpose, the present application proposes a patient multi-dimensional data similarity measurement and cohort discovery method based on artificial intelligence, which is used to solve the technical problems of being unable to capture the dynamic changes of patient health status, ignoring the intermediate state of patients that may cross multiple clusters, and the cohort division dimension being single and lacking dynamic adaptability.

[0005] To solve the above problems, the first aspect of the present application provides a patient multi-dimensional data similarity measurement and cohort discovery method based on artificial intelligence, comprising the following steps: Collecting image data, genomic data and medical text data of patients, performing feature extraction, and converting the features into numerical vectors, performing weighted fusion, and obtaining a comprehensive feature vector; The multi-source time series data of the patient at different detection points is collected, the multi-source data of different detection points in each time period is converted into a comprehensive feature vector, the correlation between the comprehensive feature vectors of each time period and other time periods is calculated through the self-attention mechanism of the Transformer encoder, the rate and mode of development of the multi-source time series data of the patient are analyzed, and a time sequence health trajectory vector of the patient is obtained. According to the time sequence health trajectory vector, the similarity of the patient data is analyzed, a hierarchical clustering tree is constructed by calculating the similarity between samples, and a high-similarity cluster is obtained through the hierarchical clustering in the clustering tree. According to the comprehensive feature vector of the patient in the high-similarity cluster, a similarity edge is established, and a patient data graph structure is constructed. A directed acyclic graph of a Bayesian network is constructed by establishing a causal edge between the data in the patient data graph structure through the time sequence health trajectory vector, and taking the disease initiation data as a parent node. The patient data is divided into queues, the data with the established similarity edge is divided into a similar data queue, and the data with the established causal edge is divided into a causal data queue.

[0006] Optionally, in one example of the above aspect, image data, genomic data and medical text data of the patient are collected, features are extracted, and the features are converted into numerical vectors, weighted fusion is performed, and a comprehensive feature vector is obtained, including the following steps: The collected patient data is cleaned and denoised, and is subjected to standardization processing. The image data is subjected to feature extraction, the image data is output as a feature map through the last convolution layer of a CNN convolutional neural network model, the feature map is flattened into a vector representation, and the vector representation is taken as a feature representation of the image data. The genomic data is preprocessed, PCA dimensionality reduction is performed on the genomic data through principal component analysis, and the first several principal components are taken as a feature representation of the genomic data. The medical text data is subjected to natural language processing, each word in the text is converted into a numerical vector representation through a Word2Vec word embedding technology, and a feature representation of the text is obtained by encoding the text sequence through an RNN model. A weight is assigned to the feature representation of each modality, and the feature sequences of the feature representation of the image data, the feature representation of the genomic data and the feature representation of the text are weighted and fused to obtain a comprehensive feature vector.

[0007] Optionally, in one example of the above aspect, the multi-source time series data of the patient at different detection points is collected, the multi-source data of different detection points in each time period is converted into a comprehensive feature vector, and the correlation between the comprehensive feature vectors of each time period and other time periods is calculated through the self-attention mechanism of the Transformer encoder, including the following steps: For each time period, for each detection point, a query vector, a key vector and a value vector are generated by the self-attention mechanism, and the value vector is the comprehensive feature vector of the detection point in the corresponding time period; The self-attention mechanism calculates the dot product of the query vector and all key vectors, and performs softmax normalization to obtain the attention weight of the time period. The attention weight of different detection points in the corresponding time period is multiplied by the corresponding value vector and summed to obtain the self-attention output of the corresponding time period, and the weighted fused comprehensive feature vector is obtained. The comprehensive feature vectors of different detection points contained in the weighted fused comprehensive feature vector are taken as the comprehensive feature vector group of the same time period; The cosine similarity between the vectors output by the self-attention mechanism of each time period is calculated as the correlation coefficient between the comprehensive feature vectors in the comprehensive feature vector group of different time periods.

[0008] Optionally, in one example of the above aspect, according to the correlation between the comprehensive feature vectors, the rate and mode of development of the patient's multi-source time series data are analyzed as the patient's time sequence health trajectory vector, including the following steps: The comprehensive feature vectors of each detection point in each time period of the patient, and the comprehensive feature vectors with a correlation between the corresponding comprehensive feature vectors greater than a threshold value are combined to obtain a patient multi-source time series data group. According to the number of comprehensive feature vectors contained in the multi-source time series data group, m kinds of comprehensive feature vectors are determined, and the numerical vector of each comprehensive feature vector in the time interval t is xi,t, where i∈(1,2,…,m), and each comprehensive feature vector is linearly embedded: E(i,t)=Wi*xi,t+bi, where E(i,t) is the embedding vector of the i-th comprehensive feature vector in the time interval t, Wi is the embedding matrix of the i-th comprehensive feature vector in the time interval t, and bi is the bias vector of the i-th comprehensive feature vector. For the i-th comprehensive feature vector, the embedding vectors of different time intervals t are combined to form an embedding sequence: Ei=[E(i,1),E(i,2),…,E(i,t),…,E(i,T)], where T is the number of time steps, the embedding sequence is mapped to the key, key, value space through the projection matrix, and the attention weight is calculated through the dot product: wherein, To calculate the dot product of the query vector Qi and the key vector Ki, d is the scaling of the dot product result, softmax is the normalization of the scaled dot product result, an attention weight matrix Ai is generated, and the final aggregation value vector generates the attention output. The attention outputs of different comprehensive feature vectors are spliced, and a fully connected layer is used for dimension reduction and feature fusion to obtain a time-series health trajectory vector representation of the patient.

[0009] Optionally, in one example of the above aspect, the similarity of the patient data is analyzed according to the time-series health trajectory vector, by calculating the similarity between samples, including the following steps: Obtain the correlation coefficient between the comprehensive feature vectors contained in the time-series health trajectory vector, splice the correlation coefficient data between the time-series health trajectory vector and the comprehensive feature vectors contained therein, and obtain the similarity feature data; Calculate the cosine similarity between the similarity feature data of the patient as the similarity coefficient of the patient data.

[0010] Optionally, in one example of the above aspect, a hierarchical clustering tree is constructed, and high-similarity clusters are clustered by the clustering tree, including the following steps: According to the similarity coefficient of the patient data, perform agglomerative hierarchical clustering, and regard each patient as a separate cluster, i.e., initially there are N clusters, and each cluster contains one patient; In each iteration, find the two clusters with the highest similarity in the similarity matrix, merge the two clusters to form a new cluster, and update the similarity matrix; The similarity between the new cluster and other clusters is calculated by the average linkage method:

[0011] Wherein, is the similarity between the new cluster and other clusters, Cp and Cq represent the two clusters to be merged, is the similarity between the original cluster Cj and other clusters Ck, j∈Cp∪Cq, j is the cluster index belonging to Cp or Cq; The termination condition is set as follows: a preset minimum similarity threshold is set, and when a cluster with a similarity coefficient lower than the minimum similarity threshold is merged, the clustering is terminated; In each merging, record the two clusters to be merged and the new cluster after merging, and record the similarity value at the time of merging; By recording the merging process information, a hierarchical clustering tree is drawn, and the horizontal axis of the hierarchical clustering tree represents the patient or cluster, and the vertical axis represents the similarity coefficient at the time of merging; According to the drawn hierarchical clustering tree, a highest similarity threshold is set, the mean value of the similarity coefficients of the patient data in the same cluster is calculated, and the cluster with a mean value of the similarity coefficients of the patient data in the same cluster higher than the highest similarity threshold is considered as a high-similarity cluster, and all high-similarity clusters are extracted from the drawn hierarchical clustering tree.

[0012] Optionally, in one example of the above aspect, the similarity edges are established according to the comprehensive feature vectors of the patients in the high-similarity cluster, and the patient data graph structure is constructed, including the following steps: The comprehensive feature vector of each patient data time interval t is regarded as a node in the graph, and the similarity edges are established between the comprehensive feature vectors of the patients in the high-similarity cluster; If the number of patients involved in the comprehensive feature vectors within the high-similarity cluster is greater than a threshold, only the similarity edges between the comprehensive feature vectors ranked from high to low are retained, and the top several proportions of the similarity edges are retained. The similarity coefficients between the comprehensive feature vectors are used as the weights of the established similarity edges to construct the patient data graph structure.

[0013] Optionally, in one example of the above aspect, the causal edges are established between the data in the patient data graph structure by the time-series health trajectory vectors, and the disease onset data is taken as the parent node to construct the directed acyclic graph of the Bayesian network, including the following steps: According to the context logic of the comprehensive feature vectors of the patients in the drawn hierarchical clustering tree, the structure of the Bayesian network is constructed, and the parent node is set as the disease onset data, including: discrete variable D and continuous variable Donset. The different comprehensive feature vectors contained in the time-series health trajectory vectors of the patients are taken as time-series trajectory nodes, if the attention weight matrix Ai corresponding to the time-series trajectory node is greater than a threshold, the time-series trajectory nodes are connected through the causal edges, otherwise no causal edge is established, and the time-series trajectory node with the latest time stamp is taken as the outcome node. The leaf node is set as the cluster label Cv extracted in the hierarchical clustering tree. For the high-similarity cluster obtained by hierarchical clustering, the core features within the high-similarity cluster are extracted as the cluster feature nodes of the Bayesian network. The conditional mutual information between the cluster feature node and the time-series trajectory node is calculated: CMI(A,B|Cv)=I(A,B)-I(A,B|Cc); wherein CMI(A,B|Cv) is the conditional mutual information between the cluster feature node A and the time-series trajectory node B given the cluster label Cv, I(A,B) is the mutual information between the cluster feature node A and the time-series trajectory node B, I(A,B|Cc) is the conditional mutual information between the cluster feature node A and the time-series trajectory node B given the non-cluster label Cc, Cv is the cluster label, and Cc is the non-cluster label; if CMI(A,B|Cv)≥0.3, a causal edge is established from the cluster feature node to the time-series trajectory node.

[0014] Optionally, in one example of the above aspect, the patient data is queue-divided, the data for establishing similarity edges is divided into a similar data queue, and the data for establishing causal edges is divided into a causal data queue, including the following steps: According to the constructed patient data graph structure, the patient data is queue-divided, the data corresponding to the node pair for establishing similarity edges is extracted, and is divided into a similar data queue, and the similarity edges and the corresponding weights are retained; According to the directed acyclic graph of the Bayesian network, the patient data is queue-divided, the data corresponding to the node for establishing causal edges is extracted, and is divided into a causal data queue, and the causal edges of the time sequence track node are retained.

[0015] Compared with the prior art, the beneficial effects of the present application are: The present application avoids the limitations of relying only on static characteristics by extracting dynamic characteristics such as patient vital signs and symptom scores that change over time. It is convenient to distinguish between "short-term fluctuations but long-term stability" and "continuous deterioration" of patients. Subtyping of chronic diseases is more accurate because time sequence patterns are the key basis for typing, for example, morning peak phenomenon and seasonal exacerbation. The time sequence track vector is spliced or dimensionally reduced with static characteristics and used for similarity calculation. The influence of single feature noise is reduced. Both disease commonality and individual heterogeneity are considered.

[0016] The present application adopts agglomerative hierarchical clustering, gradually merges similar clusters by calculating the similarity between samples, generates a tree diagram, and intuitively displays the patient grouping logic through the clustering tree, for example, first classifying into large categories according to disease types, and then classifying into subcategories according to disease courses. After agglomerative hierarchical clustering, high-similarity cluster extraction is performed to avoid local similarity that may be ignored by global clustering.

[0017] The present application distinguishes between correlation and causality. Avoiding false causality, such as pseudo-association caused by common exposure to environmental factors. Through the directed acyclic graph (DAG) of the Bayesian network, the causal path is clear, the disease initiation data is used as a parent node, and a causal transmission chain is constructed, which is convenient for intuitively displaying the causal chain. By focusing on homogenized groups, similarity edges are established based on the comprehensive feature vector of patients within a high-similarity cluster, which is convenient for subsequent observation of patient responses to treatment within the same cohort. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.

[0019] Figure 1 The present application is a method flowchart. DETAILED DESCRIPTION

[0020] The technical solutions of the present application will be described clearly and completely below in conjunction with the embodiments. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0021] Please refer to Figure 1 The first aspect of the present application provides a patient multi-dimensional data similarity measurement and cohort discovery method based on artificial intelligence, comprising the following steps: Collecting image data, genomic data and medical text data of patients, performing feature extraction, and converting the features into numerical vectors, performing weighted fusion to obtain a comprehensive feature vector; Collecting multi-source time series data of patients at different detection points, converting the multi-source data at each time period into a comprehensive feature vector, calculating the correlation between the comprehensive feature vectors of each time period and other time periods through the self-attention mechanism of the Transformer encoder, analyzing the rate and pattern of the development of the patient's multi-source time series data as the patient's time series health trajectory vector; The time series data is encoded using a self-attention transformer (Transformer) architecture. The Transformer architecture can capture long-range dependencies in data and is suitable for processing time series data. The data at each time point is treated as a vector and input into the encoder of the Transformer. The encoder consists of multiple self-attention layers and feedforward neural network layers, which calculate the correlation between each time point and other time points through the self-attention mechanism, thereby capturing the rate and pattern of disease development.

[0022] After processing by the encoder, a unified high-dimensional vector that can capture the rate and pattern of disease development is obtained, which serves as the patient's time series health trajectory representation.

[0023] According to the time series health trajectory vector, the similarity of the patient data is analyzed, a hierarchical clustering tree is constructed by calculating the similarity between samples, and a high-similarity cluster is clustered through the clustering tree; According to the comprehensive feature vector of the patients in the high-similarity cluster, a similarity edge is established, and a patient data graph structure is constructed; A causal edge is established between the data in the patient data graph structure through the time series health trajectory vector, the disease initiation data is taken as the parent node, and a directed acyclic graph of the Bayesian network is constructed; The patient data is divided into cohorts, the data with established similarity edges are divided into similar data cohorts, and the data with established causal edges are divided into causal data cohorts.

[0024] Specifically, by extracting dynamic features of patients' vital signs and symptom scores over time, the limitations of relying solely on static features are avoided. This facilitates the differentiation between patients with "short-term fluctuations but long-term stability" and those with "continuous deterioration." It also allows for more accurate subtyping of chronic diseases, as temporal patterns are a key classification criterion, such as morning peaks and seasonal exacerbations.

[0025] The temporal trajectory vector is concatenated with or dimensionality-reduced from static features for similarity calculation. This reduces the impact of noise from single features and takes into account both disease commonality and individual heterogeneity.

[0026] Agglomerative hierarchical clustering is employed, which calculates the similarity between samples and progressively merges similar clusters to generate a dendritic chart. The clustering tree visually illustrates the patient grouping logic; for example, patients are first categorized by disease type, and then by disease course. High-similarity clusters are extracted after agglomerative hierarchical clustering to avoid local similarities that might be overlooked by global clustering.

[0027] Distinguish between correlation and causation. Avoid spurious causation, such as false associations caused by shared exposure to environmental factors. Define causal paths using a Bayesian directed acyclic graph (DAG), with disease initiation data as the parent node to construct a causal transmission chain. This facilitates a visual representation of the causal chain, such as the propagation path "Patient A → Patient B → Patient C".

[0028] It can simulate the impact of blocking a certain node on the overall queue, and at the same time eliminate confounding factors, such as shared doctors and hospital environment, through conditional independence tests.

[0029] Focusing on homogeneous groups, similarity edges (e.g., Euclidean distance < threshold) are established based on the comprehensive feature vectors of patients within highly similar clusters. Patients within the same cohort exhibit similar treatment responses (e.g., consistent efficacy of ACE inhibitors for the same hypertension subtype). This facilitates the design of unified intervention protocols for similar cohorts (e.g., standardized medication guidelines).

[0030] Patients are connected by causal edges in Bayesian networks. This facilitates the rapid identification of transmission sources and high-risk contacts, such as super-spreaders in influenza outbreaks. It also allows for the quantification of the blocking effect of interventions in the causal chain.

[0031] Similarity queues answer the question "who is similar to whom," while causal queues answer "who influences whom." Combining the two enables personalized and group-based healthcare: similarity queues guide individualized treatment, while causal queues optimize group prevention and control strategies. As new data is added, similarity and causality are recalculated, and the queues are dynamically updated.

[0032] In one embodiment of the present invention, patient image data, genomic data, and medical text data are collected, feature extraction is performed, and the features are converted into numerical vectors. Weighted fusion is then performed to obtain a comprehensive feature vector, including the following steps: The collected patient data is cleaned, denoised, and standardized; Feature extraction is performed on the image data, and the image data is output as a feature map through the last convolutional layer of the CNN convolutional neural network model, and the feature map is flattened into a vector representation as the feature representation of the image data; The genomic data is preprocessed, and PCA dimensionality reduction is performed on the genomic data by principal component analysis, and the first several principal components are used as the feature representation of the genomic data; The medical text data is subjected to natural language processing, each word in the text is converted into a numerical vector representation by the Word2Vec word embedding technology, and the text sequence is encoded by the RNN model to obtain the feature representation of the text; A weight is assigned to each modality feature representation, and the feature sequences of the image data feature representation, the genomic data feature representation, and the text feature representation are weighted and fused to obtain a comprehensive feature vector.

[0033] In this embodiment, the image data includes CT, MRI images, etc., and the genomic data includes gene sequencing data, etc.

[0034] In one embodiment of the present application, multi-source time series data of patients at different detection points is collected, and the multi-source data of different detection points in each time period is converted into a comprehensive feature vector, and the correlation between the comprehensive feature vectors of each time period and other time periods is calculated by the self-attention mechanism of the Transformer encoder, including the following steps: For each detection point in each time period, a query vector, a key vector and a value vector are generated by the self-attention mechanism, and the value vector is the comprehensive feature vector of the detection point in the corresponding time period; for example, the data detected in different hospitals in each time period is taken as the data of different detection points.

[0035] The self-attention mechanism calculates the dot product of the query vector and all key vectors, and normalizes it by softmax to obtain the attention weight of the time period, multiplies the attention weight of the different detection points in the corresponding time period with the corresponding value vector and sums them up to obtain the self-attention output of the corresponding time period, and obtains the weighted and fused comprehensive feature vector; The comprehensive feature vectors of different detection points contained in the weighted and fused comprehensive feature vector are taken as the comprehensive feature vector group of the same time period; The cosine similarity between the vectors output by the self-attention mechanism of each time period is calculated as the correlation coefficient between the comprehensive feature vectors in the comprehensive feature vector group of different time periods.

[0036] In this embodiment, the multi-dimensional data of the patient is reduced and feature extracted by using the autoencoder. The autoencoder is composed of an encoder and a decoder. The encoder compresses the high-dimensional data into a low-dimensional representation, and the decoder reconstructs the low-dimensional representation into the original data. The autoencoder is trained by minimizing the reconstruction error, so that the low-dimensional representation can retain the main information of the original data. Then, the similarity between patients is calculated according to the low-dimensional representation, and the cohort division is performed.

[0037] In one embodiment of the present application, the rate and mode of development of the patient's multi-source time series data are analyzed according to the correlation between the comprehensive feature vectors, as the patient's time series health trajectory vector, including the following steps: The comprehensive feature vectors of each detection point in each time period of the patient, and the comprehensive feature vectors with a correlation between the corresponding comprehensive feature vectors greater than a threshold value, are combined to obtain a patient multi-source time series data set. According to the number of comprehensive feature vectors contained in the multi-source time series data set, determine m kinds of comprehensive feature vectors, and the value vector of each comprehensive feature vector at time interval t is x(i,t), where i∈(1,2,…,m), and linear embedding is performed on each comprehensive feature vector: E(i,t)=Wi*xi,t+bi, where E(i,t) is the embedding vector of the i-th comprehensive feature vector at time interval t, Wi is the embedding matrix of the i-th comprehensive feature vector at time interval t, and bi is the bias vector of the i-th comprehensive feature vector. For the i-th comprehensive feature vector, the embedding vectors of different time intervals t are combined to form an embedding sequence: Ei=[E(i,1),E(i,2),…,E(i,t),…,E(i,T)], where T is the number of time steps, the embedding sequence is mapped to the key, key, value space through the projection matrix, and the attention weight is calculated through the dot product: where, To calculate the dot product of the query vector Qi and the key vector Ki, measure the matching degree of different time steps; d is used to scale the dot product result to avoid the dot product value being too large when the dimension d is large, which leads to the gradient disappearance of the softmax function; softmax is used to normalize the scaled dot product result to generate the attention weight matrix Ai, and the final aggregation value vector generates the attention output. The attention outputs of different comprehensive feature vectors are spliced, and then a fully connected layer is used for dimension reduction and feature fusion to obtain the time series health trajectory vector representation of the patient.

[0038] In one embodiment of the present application, the similarity of the patient data is analyzed according to the time series health trajectory vector, by calculating the similarity between samples, including the following steps: The correlation coefficients between the comprehensive feature vectors contained in the time-series health trajectory vectors are obtained, and the correlation coefficient data between the time-series health trajectory vectors and the comprehensive feature vectors contained therein are spliced to obtain similarity feature data. The cosine similarity between the similarity feature data of the patients is calculated as the similarity coefficient of the patient data.

[0039] In one embodiment of the present application, a hierarchical clustering tree is constructed, and high-similarity clusters are obtained by agglomerative hierarchical clustering in the clustering tree, including the following steps: According to the similarity coefficient of the patient data, agglomerative hierarchical clustering is performed, and each patient is regarded as a separate cluster, i.e., there are N clusters initially, and each cluster contains one patient. In each iteration, the two clusters with the highest similarity in the similarity matrix are found, the two clusters are merged to form a new cluster, and the similarity matrix is updated. The similarity between the new cluster and other clusters is calculated by the average linkage method:

[0040] wherein, is the similarity between the new cluster and other clusters, Cp and Cq represent the two clusters to be merged, is the similarity between the original cluster Cj and other clusters Ck, j∈Cp∪Cq, j is the cluster index belonging to Cp or Cq; The preset condition is set as follows: a prefabricated minimum similarity threshold is set, and when the merging of a cluster with a similarity coefficient lower than the minimum similarity threshold occurs, the clustering is terminated. In each merging, the two clusters to be merged and the new cluster after merging are recorded, and the similarity value at the time of merging is also recorded. By recording the merging process information, a hierarchical clustering tree is drawn, and the horizontal axis of the hierarchical clustering tree represents the patients or clusters, and the vertical axis represents the similarity coefficient at the time of merging. According to the drawn hierarchical clustering tree, a highest similarity threshold is set, the mean value of the similarity coefficients of the patient data in the same cluster is calculated, and the cluster with a mean value of the similarity coefficients of the patient data in the same cluster higher than the highest similarity threshold is regarded as a high-similarity cluster, and all high-similarity clusters are extracted from the drawn hierarchical clustering tree.

[0041] In this embodiment, agglomerative hierarchical clustering is used: initially, each patient is an independent cluster. In each iteration, the two clusters with the highest similarity are merged, and the distance between clusters (such as the average linkage method or the complete linkage method) is updated. The similarity coefficient at the time of merging (i.e., the reciprocal of the distance between clusters or a self-defined similarity) is recorded until all samples are merged into one cluster.

[0042] Output: Dendrogram, horizontal axis for patients / clusters, vertical axis for similarity coefficient.

[0043] Select similarity threshold, select similarity threshold τ on vertical axis in dendrogram by cut-off threshold, the higher the threshold, the fewer the clusters generated (higher similarity within clusters). τ can be determined by domain knowledge (such as clinical classification criteria) or elbow method.

[0044] Example: If the vertical axis is distance, select τ = 0.5 to represent merging clusters with similarity ≥ 0.5.

[0045] Divide cluster structure, cut dendrogram according to threshold τ, get multiple clusters C1, C2, …, Ck, where the similarity of patients in each cluster is high.

[0046] Patients in these clusters have high similarity and can be further analyzed or used for subsequent tasks (such as disease classification, prognosis prediction, etc.).

[0047] The hierarchical clustering used in this embodiment constructs a hierarchical clustering tree by calculating the similarity between samples. Hierarchical clustering can be divided into two ways: agglomerative hierarchical clustering and divisive hierarchical clustering. Agglomerative hierarchical clustering starts with each sample as a cluster and gradually merges clusters with high similarity; divisive hierarchical clustering starts with all samples as a cluster and gradually splits into sub-clusters with low similarity.

[0048] In one embodiment of the present application, according to the comprehensive feature vectors of patients in high-similarity clusters, similarity edges are established and a patient data graph structure is constructed, including the following steps: The comprehensive feature vector of each patient data time interval t is regarded as a node in the graph, and similarity edges are established between the comprehensive feature vectors of patients in high-similarity clusters; If the number of patients involved in the comprehensive feature vectors within the high-similarity cluster is greater than a threshold, only the similarity coefficients between the comprehensive feature vectors are retained in descending order, and the top few proportion of similarity edges are retained; The similarity coefficients between the comprehensive feature vectors are used as the weights of the established similarity edges to construct the patient data graph structure.

[0049] In this embodiment, each patient is a node, and the attributes can include original features (such as age, disease type).

[0050] Edges include: inter-cluster edges and intra-cluster edges, intra-cluster edges: high weight, indicating strong similarity. Inter-cluster edges: low weight, indicating weak association. Directly use similarity, or suppress extreme values through nonlinear transformation, inter-cluster edges are optional edges that can be determined according to actual conditions.

[0051] In one embodiment of the present invention, causal edges are established between data in the patient data graph structure using time-series health trajectory vectors, and the disease initiation data is used as the parent node to construct a directed acyclic graph of a Bayesian network, including the following steps: Based on the contextual logic of the patient comprehensive feature vector in the drawn hierarchical clustering tree, the structure of the Bayesian network is constructed, with the parent node set as the disease starting data, including: discrete variable D (such as "whether the patient is sick" or disease stage) and continuous variable Donset (such as the onset time stamp). The different comprehensive feature vectors contained in the patient's temporal health trajectory vector are used as temporal trajectory nodes. If the attention weight matrix Ai corresponding to the temporal trajectory node is greater than the threshold, the temporal trajectory nodes are connected by causal edges. Otherwise, no causal edges are established, and the temporal trajectory node with the latest timestamp is used as the ending node. Leaf nodes are set to cluster labels Cv extracted from hierarchical clustering trees; time-series aggregated features include blood pressure trend data, etc.

[0052] For high-similarity clusters obtained by hierarchical clustering, the core features within the high-similarity clusters are extracted. For example, cluster 1: elderly + hypertension + slowly increasing creatinine, is used as the cluster feature node of the Bayesian network. Calculate the conditional mutual information between cluster feature nodes and temporal trajectory nodes: CMI(A,B|Cv)=I(A,B)-I(A,B|Cc); where CMI(A,B|Cv) is the conditional mutual information between cluster feature node A and time-series trajectory node B given cluster label Cv, I(A,B) is the mutual information between cluster feature node A and time-series trajectory node B, and I(A,B|Cc) is the conditional mutual information between cluster feature node A and time-series trajectory node B given non-cluster label Cc, that is, the correlation and information sharing between cluster feature node A and time-series trajectory node B when the non-cluster label Cc is known, Cv is the cluster label, and Cc is the non-cluster label; if CMI(A,B|Cv)≥0.3, then a causal edge is established from the cluster feature node to the time-series trajectory node.

[0053] In one embodiment of the present invention, patient data is divided into queues, with data establishing similarity edges divided into similar data queues and data establishing causal edges divided into causal data queues, including the following steps: Based on the constructed patient data graph structure, the patient data is divided into queues, the data corresponding to the nodes with similarity edges are extracted, and the data is divided into similar data queues, while retaining the similarity edges and their corresponding weights. Based on the directed acyclic graph of the Bayesian network, the patient data is divided into queues, the data corresponding to the nodes for which causal edges will be established is extracted, the data is divided into causal data queues, and the causal edges of the time-series trajectory nodes are retained.

[0054] The above examples are only used to illustrate the technical method of the present application but not limit the present application. Although the present application is explained in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical method of the present application can be modified or replaced equivalently without departing from the spirit and scope of the technical method of the present application.

Claims

1. A method for measuring the similarity of multidimensional patient data and identifying cohorts based on artificial intelligence, characterized in that, Includes the following steps: Collect patient image data, genomic data, and medical text data, extract features, convert the features into numerical vectors, perform weighted fusion, and obtain a comprehensive feature vector. Multi-source time series data of patients at different detection points are collected. The multi-source data of different detection points in each time period are transformed into a comprehensive feature vector. The correlation between the comprehensive feature vectors of each time period and other time periods is calculated through the self-attention mechanism of the Transformer encoder. The rate and pattern of the development of the patient's multi-source time series data are analyzed as the patient's temporal health trajectory vector. Based on the time-series health trajectory vector, the similarity of patient data is analyzed. By calculating the similarity between samples, a hierarchical clustering tree is constructed, and high-similarity clusters are formed through agglomerated hierarchical clustering in the clustering tree. Based on the comprehensive feature vectors of patients in high-similarity clusters, similarity edges are established to construct the patient data graph structure; By establishing causal edges between data in the patient data graph structure using time-series health trajectory vectors, and taking the disease initiation data as the parent node, a directed acyclic graph of a Bayesian network is constructed. The patient data is divided into queues: data with similarity edges are divided into similar data queues, and data with causal edges are divided into causal data queues.

2. The method for measuring and discovering patient multidimensional data similarity based on artificial intelligence according to claim 1, characterized in that, The process involves collecting patient imaging data, genomic data, and medical text data, extracting features, converting these features into numerical vectors, and then weighted and fused to obtain a comprehensive feature vector. This includes the following steps: The collected patient data is cleaned, noise-removed, and standardized. Feature extraction is performed on the image data. The image data is output as a feature map through the last convolutional layer of the CNN convolutional neural network model. The feature map is flattened into a vector representation, which serves as the feature representation of the image data. The genomic data is preprocessed, and PCA is used to reduce the dimensionality of the genomic data. The first few principal components are used as the feature representation of the genomic data. Natural language processing is performed on medical text data. Each word in the text is converted into a numerical vector representation using Word2Vec word embedding technology. The text sequence is then encoded using an RNN model to obtain the feature representation of the text. A weight is assigned to the feature representation of each modality, and the feature sequences of the feature representations of image data, genomic data, and text are weighted and fused to obtain a comprehensive feature vector.

3. The method for measuring and discovering patient multidimensional data similarity based on artificial intelligence according to claim 1, characterized in that, Multi-source time-series data of patients at different detection points are collected. The multi-source data from different detection points in each time period are transformed into a comprehensive feature vector. The correlation between the comprehensive feature vectors of each time period and other time periods is calculated through the self-attention mechanism of the Transformer encoder. The process includes the following steps: For each detection point in each time period, a query vector, a key vector, and a value vector are generated through the self-attention mechanism. The value vector is the comprehensive feature vector of the detection point in the corresponding time period. The self-attention mechanism calculates the dot product of the query vector and all key vectors, and then normalizes it using softmax to obtain the attention weights for each time period. The attention weights of different detection points in the corresponding time period are multiplied by the corresponding value vectors and summed to obtain the self-attention output for the corresponding time period, resulting in a weighted and fused comprehensive feature vector. The combined feature vectors of different detection points contained in the weighted and fused combined feature vector are taken as a group of combined feature vectors for the same time period; Calculate the cosine similarity between the vectors output by the self-attention mechanism in each time period, and use it as the correlation coefficient between the comprehensive feature vectors in the comprehensive feature vector group in different time periods.

4. The method for measuring and discovering patient multidimensional data similarity based on artificial intelligence according to claim 1, characterized in that, Based on the correlation between comprehensive feature vectors, the rate and pattern of development of multi-source time series data of patients are analyzed as the patient's time-series health trajectory vector, including the following steps: The comprehensive feature vectors of each detection point in each time period of the patient, and the comprehensive feature vectors with correlation data greater than a threshold between the corresponding comprehensive feature vectors are combined to obtain the patient's multi-source time series data group. Based on the number of comprehensive feature vectors contained in the multi-source time series data group, m kinds of comprehensive feature vectors are determined. The numerical vector of each comprehensive feature vector in the time interval t is x(i,t), where i∈(1,2,…,m). Linear embedding is performed on each comprehensive feature vector: E(i,t)=Wi*xi,t+bi, where E(i,t) is the embedding vector of the i-th comprehensive feature vector in the time interval t, Wi is the embedding matrix of the i-th comprehensive feature vector in the time interval t, and bi is the bias vector of the i-th comprehensive feature vector. For the i-th comprehensive feature vector, the embedding vectors of different time intervals t are combined into an embedding sequence: Ei=[E(i,1),E(i,2),…,E(i,t),…,E(i,T)], where T is the number of time steps. The embedding sequence is mapped to the key, key, and value space through a projection matrix, and then the attention weights are calculated through a dot product. ,in, To calculate the dot product of the query vector Qi and the key vector Ki, d is used to scale the dot product result, softmax is used to normalize the scaled dot product result, and an attention weight matrix Ai is generated. Finally, the aggregated value vector is used to generate the attention output. The attention outputs of different comprehensive feature vectors are concatenated, and then a fully connected layer is used for dimensionality reduction and feature fusion to obtain the temporal health trajectory vector representation of the patient.

5. The method for measuring and discovering multidimensional patient data similarity based on artificial intelligence according to claim 1, characterized in that, Based on the time-series health trajectory vector, the similarity of patient data is analyzed by calculating the similarity between samples, including the following steps: Obtain the correlation coefficient between the comprehensive feature vectors contained in the time-series health trajectory vector, and concatenate the correlation coefficient data between the time-series health trajectory vector and the comprehensive feature vectors contained therein to obtain similarity feature data; Calculate the cosine similarity between the similarity feature data of patients, and use it as the similarity coefficient of patient data.

6. The method for measuring and discovering multidimensional patient data similarity based on artificial intelligence according to claim 5, characterized in that, Construct a hierarchical clustering tree, and use the agglomerative hierarchical clustering of high-similarity clusters in the clustering tree, including the following steps: Based on the similarity coefficient of patient data, agglomerative hierarchical clustering is performed, treating each patient as a separate cluster. Initially, there are N clusters, each containing one patient. In each iteration, the two clusters with the highest similarity in the similarity matrix are found, these two clusters are merged to form a new cluster, and the similarity matrix is ​​updated. The similarity between the new cluster and other clusters was calculated using the average connectivity method: in, Let Cp and Cq represent the similarity between the new cluster and other clusters, respectively. Let j be the similarity between the original cluster Cj and other clusters Ck, where j∈Cp∪Cq, and j belongs to the cluster index of Cp or Cq. The termination condition is set as follows: when a minimum similarity threshold is preset, clustering is terminated when clusters with similarity coefficients lower than the minimum similarity threshold are merged. During each merge, record the two clusters being merged and the new cluster after the merge, and also record the similarity value at the time of the merge. By recording information about the merging process, a hierarchical clustering tree is drawn. The horizontal axis of the hierarchical clustering tree represents patients or clusters, and the vertical axis represents the similarity coefficient at the time of merging. Based on the constructed hierarchical clustering tree, a maximum similarity threshold is set, and the mean similarity coefficient of patient data in the same cluster is calculated. Clusters in the same cluster whose mean similarity coefficient of patient data is higher than the maximum similarity threshold are considered high similarity clusters, and all high similarity clusters are extracted from the constructed hierarchical clustering tree.

7. The method for measuring and discovering patient multidimensional data similarity based on artificial intelligence according to claim 5, characterized in that, Based on the comprehensive feature vectors of patients in high-similarity clusters, similarity edges are established to construct the patient data graph structure, including the following steps: The comprehensive feature vector of each patient's data time interval t is regarded as a node in the graph, and similarity edges are established between the comprehensive feature vectors of patients in the high similarity cluster; If the number of patients involved in the comprehensive feature vector within a high similarity cluster is greater than the threshold, only the similarity coefficients between the comprehensive feature vectors are retained in descending order, and the similarity edges in the top few proportions are retained. The patient data graph structure is constructed by using the similarity coefficient between the comprehensive feature vectors as the weights of the established similarity edges.

8. The method for measuring and discovering patient multidimensional data similarity based on artificial intelligence according to claim 1, characterized in that, By establishing causal edges between data points in the patient data graph structure using time-series health trajectory vectors, and taking the disease initiation data as the parent node, a directed acyclic graph of a Bayesian network is constructed, including the following steps: Based on the contextual logic of the patient comprehensive feature vector in the drawn hierarchical clustering tree, the structure of the Bayesian network is constructed, with the parent node set as the disease starting data, including: discrete variable D and continuous variable Donset; The different comprehensive feature vectors contained in the patient's temporal health trajectory vector are used as temporal trajectory nodes. If the attention weight matrix Ai corresponding to the temporal trajectory node is greater than the threshold, the temporal trajectory nodes are connected by causal edges. Otherwise, no causal edges are established, and the temporal trajectory node with the latest timestamp is used as the ending node. The leaf nodes are set to the cluster labels Cv extracted from the hierarchical clustering tree; For high-similarity clusters obtained by hierarchical clustering, the core features within the high-similarity clusters are extracted and used as cluster feature nodes of the Bayesian network. Calculate the conditional mutual information between cluster feature nodes and temporal trajectory nodes: CMI(A,B∣Cv)=I(A,B)-I(A,B∣Cc); where CMI(A,B∣Cv) is the conditional mutual information between cluster feature node A and temporal trajectory node B given cluster label Cv, I(A,B) is the mutual information between cluster feature node A and temporal trajectory node B, I(A,B∣Cc) is the conditional mutual information between cluster feature node A and temporal trajectory node B given non-cluster label Cc, Cv is the cluster label, and Cc is the non-cluster label; if CMI(A,B∣Cv)≥0.3, then a causal edge is established from the cluster feature node to the temporal trajectory node.

9. The method for measuring and discovering patient multidimensional data similarity based on artificial intelligence according to claim 1, characterized in that, The patient data is divided into queues: data with similarity edges are divided into similar data queues, and data with causal edges are divided into causal data queues. This includes the following steps: Based on the constructed patient data graph structure, the patient data is divided into queues, the data corresponding to the nodes with similarity edges are extracted, and the data is divided into similar data queues, while retaining the similarity edges and their corresponding weights. Based on the directed acyclic graph of the Bayesian network, the patient data is divided into queues, the data corresponding to the nodes for which causal edges will be established is extracted, the data is divided into causal data queues, and the causal edges of the time-series trajectory nodes are retained.