Drug Incompatibility Big Data Analysis and Processing Methods and Systems
By constructing a drug compatibility risk transmission tensor field through multidimensional semantic mapping of pharmacological targets and graph convolution operators, the accuracy of drug compatibility incompatibility analysis in existing technologies is not sufficient, and in-depth mining and accurate determination of drug compatibility relationships are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- THE FIRST MEDICAL CENT CHINESE PLA GENERAL HOSPITAL
- Filing Date
- 2026-03-11
- Publication Date
- 2026-06-02
AI Technical Summary
Existing methods for analyzing drug incompatibilities cannot accurately identify new drugs or new combination regimens, lack the overall topological characteristics of the drug action network, and cannot reveal the deep mechanisms that cause incompatibilities, resulting in a lack of interpretability and accuracy in incompatibility determination.
Topological adaptive hierarchical clustering is performed by multidimensional semantic mapping of pharmacological targets to construct local compatibility subgraphs. Topological similarity measures are calculated using graph convolution operators, a compatibility risk transmission tensor field is established, and multi-scale risk signal propagation is performed. Combining manifold dimensionality reduction projection, compatibility incompatibilities judgment results are generated.
It achieves comprehensive and accurate characterization of drug compatibility relationships, improves the accuracy of incompatibility analysis and the practicality of clinical applications, effectively identifies cross-level risks of complex drug interactions, and reduces computational complexity.
Smart Images

Figure CN122135880A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pharmaceutical data processing technology, and in particular to a method and system for big data analysis and processing of drug incompatibilities. Background Technology
[0002] In clinical medication practice, the identification of drug incompatibilities has always been a crucial step in ensuring patient medication safety. With the increasing complexity of combination drug regimens, traditional incompatibility detection primarily relies on the experience of medical experts and literature reviews, using databases to search and match incompatibilities. These methods typically simplify drug relationships into binary pairs, performing rule matching based on known drug interaction records, or employing basic association rule mining algorithms to extract incompatibility patterns from clinical data. Some studies have attempted to introduce machine learning techniques, constructing drug feature vectors and using classification models to predict the safety of drug combinations. However, these feature representations are often limited to single-dimensional information such as drug chemical structure and pharmacokinetic parameters, lacking a deep characterization of the pharmacological mechanisms of action.
[0003] Existing methods for drug incompatibilities analysis still have significant limitations. Rule-matching methods can only identify clearly recorded incompatible combinations, lacking predictive ability for new drugs or new combination regimens constantly emerging in clinical practice, and failing to reveal the deep mechanisms underlying incompatibilities, resulting in a lack of interpretability in incompatibilities determination. Machine learning methods treat drug compatibility relationships as isolated data points, ignoring the overall topological structure of the drug action network, failing to effectively capture the complex relationships between pharmacological targets, and lacking accuracy in assessing compatibility risks involving multiple drugs and multiple target interactions. In particular, when dealing with the hierarchical and transmissive characteristics of drug action, existing methods struggle to integrate risk signals across levels, failing to accurately quantify the cumulative risk effects of drug combinations at different action scales, thus limiting the precision and comprehensiveness of drug incompatibilities analysis. Summary of the Invention
[0004] This invention provides a method and system for big data analysis and processing of drug incompatibilities, which can solve the problems in the prior art.
[0005] A first aspect of this invention provides a method for big data analysis and processing of drug incompatibilities, comprising: Obtain a drug dataset containing drug identifiers and pharmacological targets; Based on the multidimensional semantic mapping of pharmacological targets, topological adaptive hierarchical clustering is performed on the drug dataset. Local compatibility subgraphs are constructed at each level, and the topological invariants of the local compatibility subgraphs are extracted as hierarchical feature encodings. The topological similarity measure of the local compatibility relationship subgraphs at adjacent levels is calculated using graph convolution operators, and a compatibility risk propagation tensor field is established based on the gradient direction of the topological similarity measure. Multi-scale risk signal propagation is performed along the compatibility risk propagation tensor field. At each propagation node, an adaptive attenuation factor is applied to the risk signal based on the eigenvalue spectrum of the local compatibility relationship subgraph, and the transmission is allocated according to the proportion of the number of connected edges. The risk signal intensity at each level is aggregated across levels to obtain the global risk assessment tensor. The global risk assessment tensor is subjected to manifold dimensionality reduction projection, and the incompatibility determination results of the drug combinations to be tested are generated by combining hierarchical feature encoding.
[0006] In one optional embodiment, topologically adaptive hierarchical clustering of the drug dataset based on the multidimensional semantic mapping of pharmacological targets includes: Pharmacological targets are constructed into multidimensional semantic vectors according to receptor type and signaling pathway cascade depth; Calculate the semantic distance between multidimensional semantic vectors and construct a semantic distance matrix. Perform kernel density estimation on the semantic distance matrix. Detect the zeros of the second derivative of the density function in the kernel density estimation results. Extract the distance values corresponding to the zeros of the second derivative as a hierarchical partitioning threshold sequence. Based on the hierarchical threshold sequence, a bottom-up agglomerative clustering is performed on the drug dataset. In each clustering iteration, a drug connectivity graph of the current level is constructed. Each connected component in the drug connectivity graph is traversed, and the average shortest path length between nodes inside the connected component and the boundary distance between connected components are calculated. The cohesion threshold is determined based on the distribution of the average shortest path length of all connected components in the drug connectivity graph, and the separation threshold is determined based on the distribution of the boundary distances between all connected components in the drug connectivity graph. When the average shortest path length is less than the cohesion threshold and the boundary distance is greater than the separation threshold, the connected component is determined as the hierarchical clustering node of the current level, and the process is carried out layer by layer upwards until the hierarchical clustering nodes of all levels are generated, forming a drug hierarchical clustering structure.
[0007] In one optional embodiment, constructing local compatibility subgraphs at each level and extracting the topological invariants of the local compatibility subgraphs as hierarchical feature encoding includes: Traverse each level of the drug hierarchical clustering structure to obtain the drug subset contained in each level of the clustering structure; In the drug subset, each drug is set as a graph node. The metabolic enzyme competition pathway and receptor co-blocking relationship between drugs are queried. Graph edge connections are established for drug pairs with metabolic enzyme competition pathways or receptor co-blocking relationships. Local compatibility subgraphs are constructed based on graph nodes and graph edges. Calculate the degree matrix and adjacency matrix of the local compatibility subgraph, subtract the adjacency matrix from the degree matrix to obtain the graph Laplacian matrix, perform eigenvalue decomposition on the graph Laplacian matrix, extract the second smallest eigenvalue from the eigenvalues obtained by eigenvalue decomposition as the algebraic connectivity, calculate the difference between the second smallest eigenvalue and the third smallest eigenvalue as the spectral gap, and combine the algebraic connectivity and the spectral gap as topological invariants. Obtain the hierarchical depth value and the number of drugs contained in the hierarchical clustering node in the drug hierarchical clustering structure. Concatenate the topological invariant, the hierarchical depth value and the number of drugs in sequence into a fixed-length vector to generate hierarchical feature encoding.
[0008] In one optional embodiment, the topological similarity measure of local compatibility subgraphs at adjacent levels is calculated using a graph convolution operator, and a compatibility risk propagation tensor field is established based on the gradient direction of the topological similarity measure, including: Extract hierarchical clustering node pairs from adjacent levels in the drug hierarchical clustering structure, and obtain the local compatibility subgraphs and hierarchical feature codes corresponding to the hierarchical clustering node pairs respectively; The adjacency matrix of the local matching subgraph and the hierarchical feature encoding are input into the graph convolution operator. The graph convolution operator performs a multi-hop neighborhood aggregation operation on the local matching subgraph to obtain the node embedding representation. A bidirectional mapping matrix between the node embedding representations of adjacent hierarchical local matching subgraphs is constructed. The nuclear norm of the bidirectional mapping matrix is calculated to determine the topological similarity measure. A coordinate system is established in the hierarchical space of the drug hierarchical clustering structure. The hierarchical depth value of each cluster node is mapped to the vertical axis coordinate, and the centroid of the pharmacological target cluster of each cluster node is mapped to the horizontal axis coordinate. The directional derivatives of the topological similarity metric with respect to the vertical and horizontal axes coordinates are calculated in the coordinate system. The vector field formed by the directional derivatives is defined as the compatibility risk transmission tensor field. The direction of each vector in the compatibility risk transmission tensor field corresponds to the transmission direction of compatibility incompatibilities information between levels.
[0009] In an optional embodiment, constructing a bidirectional mapping matrix between node embedding representations of adjacent-level local compatibility subgraphs includes: Identify cross-level drug delivery chains from adjacent-level local compatibility subgraphs. The drug delivery chain records the delivery sequence of the active metabolite of the upper-level drug to the receptor binding site of the lower-level drug. Convert the delivery sequences in the drug delivery chain into node index pairs. Construct a sparse connection matrix for node index pairs. In the sparse connection matrix, only the matrix positions corresponding to the node index pairs are assigned values to transmit strength weights. Perform singular value decomposition on the sparse connection matrix to obtain a left singular vector matrix and a right singular vector matrix. Use the left singular vector matrix as the first one-way mapping matrix from the upper level to the lower level, and use the transpose of the right singular vector matrix as the second one-way mapping matrix from the lower level to the upper level. Combine the first one-way mapping matrix and the second one-way mapping matrix to form a bidirectional mapping matrix.
[0010] In one optional embodiment, multi-scale risk signal propagation is performed along the compatibility risk propagation tensor field. At each propagation node, an adaptive attenuation factor is applied to the risk signal based on the eigenvalue spectrum of the local compatibility subgraph, and the propagation is distributed according to the proportion of the number of connected edges, including: Identify the hierarchical level of the drug combination to be tested in the drug hierarchical clustering structure, calculate the overlap of metabolic enzyme competitive pathways and the intensity of receptor co-blocking between drug pairs, and determine the initial risk signal intensity. Construct a normalized random walk transition matrix for the corresponding local matching relationship subgraph at the current propagation node, perform eigenvalue decomposition on the normalized random walk transition matrix, calculate the fourth and third central moments of the difference sequence of adjacent elements of the eigenvalue spectrum, multiply them by the current propagation node level depth value and sum them to obtain the adaptive decay factor. Based on the risk signal strength received by the current propagation node and the adaptive attenuation factor, the attenuated risk signal strength is determined, the number of connecting edges of each graph node in the local matching relationship subgraph is counted, the cumulative ratio curve of the number of connecting edges and the uniformly distributed diagonal envelope area are calculated as the topology concentration value, and the attenuated risk signal strength is distributed to each graph node according to the ratio of the number of connecting edges of each graph node to the total number of connecting edges. The risk signal intensity assigned to each graph node is weighted and summed with the topological similarity metric and then passed to the next propagation node. The propagation is iterative and the accumulated risk signal intensity of each propagation node is summarized to form a multi-scale risk signal propagation result.
[0011] In one optional embodiment, the cross-level aggregation of risk signal strengths at each level to obtain the global risk assessment tensor includes: Extract the local compatibility subgraphs of each propagation node from the multi-scale risk signal propagation results, calculate the number of connected components and loops in each local compatibility subgraph, determine the hierarchical topological features, and concatenate the hierarchical topological features with the risk signal intensity accumulated by the corresponding propagation nodes to form a hierarchical risk feature vector. Calculate the cosine similarity between the hierarchical topological features of adjacent levels, construct the inter-level mapping matrix with the cosine similarity as the element, and multiply the hierarchical risk feature vector of each level with the inter-level mapping matrix to obtain the standard hierarchical risk feature vector. The hierarchical weights are determined by the proportion of the number of nodes at each level to the total number of nodes. The standard hierarchical risk feature vectors of each level are multiplied by their corresponding hierarchical weights and summed to obtain the aggregated risk feature vector. The aggregated risk feature vectors are then reshaped into tensors to obtain the global risk assessment tensor.
[0012] A second aspect of this invention provides a big data analysis and processing system for drug incompatibilities, comprising: The data acquisition unit is used to acquire drug datasets containing drug identifiers and pharmacological targets. Clustering coding unit is used for multidimensional semantic mapping based on pharmacological targets to perform topological adaptive hierarchical clustering of drug datasets, construct local compatibility subgraphs at each level, and extract the topological invariants of the local compatibility subgraphs as hierarchical feature encodings; Tensor building units are used to calculate the topological similarity measure of local matching relationship subgraphs at adjacent levels through graph convolution operators, and to establish a matching risk propagation tensor field based on the gradient direction of the topological similarity measure. The signal propagation unit is used to perform multi-scale risk signal propagation along the compatibility risk propagation tensor field. At each propagation node, an adaptive attenuation factor is applied to the risk signal according to the eigenvalue spectrum of the local compatibility relationship subgraph, and the transmission is allocated according to the proportion of the number of connected edges. The cross-level aggregation of the risk signal intensity at each level is used to obtain the global risk assessment tensor. The result determination unit is used to perform manifold dimensionality reduction projection on the global risk assessment tensor and combine it with hierarchical feature encoding to generate the incompatibility determination result of the drug combination to be tested.
[0013] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0014] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0015] In this embodiment of the invention, topological adaptive hierarchical clustering is performed through multidimensional semantic mapping of pharmacological targets, which can deeply explore the complex interaction mechanisms between drugs, breaking through the limitations of traditional analysis based on a single feature dimension, and making the characterization of drug compatibility relationships more comprehensive and accurate. Local compatibility relationship subgraphs are constructed at each level, and topological invariants are extracted as hierarchical feature codes, achieving efficient capture of the structured features of drug compatibility relationships. Graph convolution operators are used to calculate the topological similarity measure between adjacent levels, and a compatibility risk propagation tensor field is established, transforming the propagation process of drug compatibility risk into a quantifiable mathematical model. A multi-scale risk signal propagation mechanism combined with an adaptive attenuation factor can dynamically adjust the risk signal intensity according to the feature value spectrum of the local compatibility relationship subgraph. This adaptive mechanism effectively avoids the misjudgment problem caused by traditional fixed-weight methods, making risk assessment more consistent with the complexity of actual drug interactions. Manifold dimensionality reduction projection is performed on the global risk assessment tensor, effectively reducing computational complexity while retaining key risk features, making large-scale drug combination incompatibility screening possible, and significantly improving the practicality and efficiency of clinical applications. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the big data analysis and processing method for drug incompatibility according to an embodiment of the present invention. Figure 2 A flowchart for constructing the tensor field for drug compatibility risk transmission. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0019] Figure 1 This is a flowchart illustrating the big data analysis and processing method for drug incompatibilities according to an embodiment of the present invention. Figure 1 As shown, the method includes: Obtain a drug dataset containing drug identifiers and pharmacological targets; Based on the multidimensional semantic mapping of pharmacological targets, topological adaptive hierarchical clustering is performed on the drug dataset. Local compatibility subgraphs are constructed at each level, and the topological invariants of the local compatibility subgraphs are extracted as hierarchical feature encodings. The topological similarity measure of the local compatibility relationship subgraphs at adjacent levels is calculated using graph convolution operators, and a compatibility risk propagation tensor field is established based on the gradient direction of the topological similarity measure. Multi-scale risk signal propagation is performed along the compatibility risk propagation tensor field. At each propagation node, an adaptive attenuation factor is applied to the risk signal based on the eigenvalue spectrum of the local compatibility relationship subgraph, and the transmission is allocated according to the proportion of the number of connected edges. The risk signal intensity at each level is aggregated across levels to obtain the global risk assessment tensor. The global risk assessment tensor is subjected to manifold dimensionality reduction projection, and the incompatibility determination results of the drug combinations to be tested are generated by combining hierarchical feature encoding.
[0020] In one optional implementation, the drug incompatibility big data analysis and processing method includes several key steps, achieving accurate determination of drug incompatibility through hierarchical clustering and graph theory analysis.
[0021] Specifically, the data acquisition stage extracts drug datasets containing drug identifiers and pharmacological targets from the drug information system. Each record in the drug dataset includes key information such as the drug's unique code, generic name, drug ingredient, target type, signaling pathway classification, and binding strength. For example, amoxicillin, with the ATC code J01CA04, has pharmacological targets including bacterial cell wall synthases PBP1A and PBP1B; while clarithromycin, with the ATC code J01FA09, has the 50S ribosomal subunit as its pharmacological target. This information constitutes the foundational data for the analysis.
[0022] The topology-adaptive hierarchical clustering stage performs multidimensional semantic mapping based on pharmacological targets. Specifically, the target of amoxicillin, "bacterial cell wall synthase," is mapped to a vector of [1.2, 0.8, 0.3], and the target of clarithromycin, "50S ribosomal subunit," is mapped to a vector of [0.4, 1.5, 0.7]. After calculating semantic distance, a distance matrix is constructed. Kernel density estimation is performed on the distance matrix, and the zeros of the second derivative of the density function are extracted as thresholds for hierarchical division, such as 0.35, 0.72, and 1.18. Bottom-up agglomerative clustering is performed, constructing a drug connectivity graph for the current level in each iteration. For example, in the first level, amoxicillin and penicillin form a connected component, with an average shortest path length of 0.25, less than the cohesion threshold of 0.3; while the boundary distance with cephalosporins is 0.85, greater than the separation threshold of 0.7. Therefore, amoxicillin and penicillin are determined as cluster nodes in the first level. By building layer by layer, the clustering structure of all levels is completed.
[0023] When constructing local compatibility subgraphs in cluster nodes at each level, the competitive pathways of metabolic enzymes and the synergistic blocking relationships between receptors are queried. For example, clarithromycin and atorvastatin are both metabolized by the CYP3A4 enzyme, and there is a competitive relationship between metabolic enzymes, so graph edge connections are established. The degree matrix and adjacency matrix of the local compatibility subgraph are calculated to obtain the graph Laplacian matrix and perform eigenvalue decomposition. If the eigenvalue of a certain subgraph is [0, 0.24, 0.76, 1.35], the second smallest eigenvalue of 0.24 is extracted as the algebraic connectivity, and the spectral gap is calculated as 0.52 (0.76-0.24). The algebraic connectivity, spectral gap, level depth value 2, and drug quantity value 4 are concatenated to form the level feature code [0.24, 0.52, 2, 4].
[0024] The topological similarity of local compatibility subgraphs at adjacent levels is calculated using graph convolution operators. The graph convolution operator performs multi-hop neighborhood aggregation on the local compatibility subgraphs to obtain node embedding representations. For example, the node embedding representation of amoxicillin at a certain level is [0.32, 0.65, 0.41], while at adjacent levels it is [0.28, 0.70, 0.36]. A bidirectional mapping matrix is constructed, and the nuclear norm is calculated to obtain a topological similarity metric of 0.85. In the hierarchical spatial coordinate system, the hierarchical depth value is mapped to the vertical axis, and the centroid of the pharmacological target cluster is mapped to the horizontal axis. The directional derivative of the topological similarity metric with respect to the coordinates is calculated to construct a compatibility risk propagation tensor field. For example, the propagation direction at the hierarchical spatial point (2.5, 1.8) is [0.25, -0.15], indicating that the compatibility incompatibility information is mainly propagated to the upper right.
[0025] Multi-scale risk signal propagation begins with the drug combination to be detected. Taking the combination of clarithromycin and atorvastatin as an example, the overlap of their metabolic enzyme competition paths is calculated to be 0.75, and the initial risk signal intensity is set to 0.75. At the current propagation node, a normalized random walk transition matrix of the local compatibility subgraph is constructed, with an eigenvalue spectrum of [1, 0.78, 0.45, 0.12]. The fourth central moment of the adjacent element difference sequence [0.22, 0.33, 0.33] of the eigenvalue spectrum is calculated to be 0.0021, and the third central moment is 0.0008. Multiplying these by the level depth value 2 and summing them yields an adaptive attenuation factor of 0.0058. The risk signal intensity after attenuation is 0.746. In the local compatibility subgraph, the number of connecting edges for each node is [3, 2, 2, 1], the total number of connecting edges is 8, the connecting edge ratio is [0.375, 0.25, 0.25, 0.125], and the topological concentration value is 0.18. The risk signal is proportionally distributed to each node, resulting in an allocation of [0.280, 0.187, 0.187, 0.093]. After weighted summation with the topological similarity metric of 0.85, the signal strength transmitted to the next propagation node is 0.634.
[0026] When aggregating risk signals across different levels, the number of connected components (2) and the number of loops (1) in the local compatibility subgraph are calculated to form a hierarchical topological feature [2, 1]. This hierarchical topological feature is concatenated with the risk signal strength (0.634) to form a hierarchical risk feature vector [2, 1, 0.634]. The cosine similarity between adjacent hierarchical topological features is calculated to be 0.91. An inter-hierarchical mapping matrix is constructed, and multiplication yields a standard hierarchical risk feature vector [1.82, 0.91, 0.577]. The node count ratio of each level is 0.3, which is multiplied by the standard hierarchical risk feature vector to obtain [0.546, 0.273, 0.173]. This is then aggregated with other levels to form a global risk assessment tensor.
[0027] Finally, manifold dimensionality reduction projection was performed on the global risk assessment tensor, and hierarchical feature encoding was combined to generate incompatibility determination results. For the combination of clarithromycin and atorvastatin, the final determination result showed that the incompatibility risk value was 0.82, which exceeded the set threshold of 0.75, indicating a serious incompatibility risk, and it was recommended to avoid combined use.
[0028] In one optional embodiment, topologically adaptive hierarchical clustering of the drug dataset based on the multidimensional semantic mapping of pharmacological targets includes: Pharmacological targets are constructed into multidimensional semantic vectors according to receptor type and signaling pathway cascade depth; Calculate the semantic distance between multidimensional semantic vectors and construct a semantic distance matrix. Perform kernel density estimation on the semantic distance matrix. Detect the zeros of the second derivative of the density function in the kernel density estimation results. Extract the distance values corresponding to the zeros of the second derivative as a hierarchical partitioning threshold sequence. Based on the hierarchical threshold sequence, a bottom-up agglomerative clustering is performed on the drug dataset. In each clustering iteration, a drug connectivity graph of the current level is constructed. Each connected component in the drug connectivity graph is traversed, and the average shortest path length between nodes inside the connected component and the boundary distance between connected components are calculated. The cohesion threshold is determined based on the distribution of the average shortest path length of all connected components in the drug connectivity graph, and the separation threshold is determined based on the distribution of the boundary distances between all connected components in the drug connectivity graph. When the average shortest path length is less than the cohesion threshold and the boundary distance is greater than the separation threshold, the connected component is determined as the hierarchical clustering node of the current level, and the process is carried out layer by layer upwards until the hierarchical clustering nodes of all levels are generated, forming a drug hierarchical clustering structure.
[0029] In one specific implementation, during the construction of multidimensional semantic vectors for pharmacological targets based on receptor type and signaling pathway cascade depth, the receptor type of each pharmacological target is used as the first dimension feature. Receptor types include G protein-coupled receptors, ion channel receptors, enzyme-linked receptors, and nuclear receptors, and are represented using one-hot encoding. The signaling pathway cascade depth is used as the second dimension feature. By tracing the signal transduction path originating from the target, the number of transduction layers from the membrane receptor to the nuclear transcription factor is counted, and the cascade depth value is normalized to the range of 0 to 1. The receptor type encoding vector is concatenated with the normalized cascade depth value to form the multidimensional semantic vector for each pharmacological target, with the vector dimension typically between 10 and 50.
[0030] When calculating the semantic distance between multidimensional semantic vectors, a weighted Euclidean distance metric is used. A weighting coefficient of 0.6 is set for the receptor type dimension, and a weighting coefficient of 0.4 is set for the signal pathway cascade depth dimension. All target vector pairs are traversed, and the weighted distance between each pair is calculated to construct a symmetric semantic distance matrix. Kernel density estimation of the semantic distance matrix is performed using a Gaussian kernel function. The bandwidth of the kernel function is adaptively determined using the Silverman rule, with a bandwidth range of 0.8 to 1.2 times the standard deviation of the distance matrix. Zeros of the second derivative of the density function are detected in the kernel density estimation results. The second derivative is obtained by performing cubic spline interpolation on the density curve. Zeros where the second derivative changes from positive to negative correspond to local maxima of the cluster density. The semantic distance values corresponding to these zeros are extracted as a hierarchical partitioning threshold sequence.
[0031] When performing bottom-up agglomerative clustering on a drug dataset based on a hierarchical threshold sequence, each drug is initially treated as an independent cluster. Following the ascending order of the hierarchical threshold sequence, in each clustering iteration, drug pairs with a semantic distance less than the current threshold are merged into the same cluster. When constructing the drug connectivity graph at the current level, clusters are used as nodes, the number of drugs within a cluster is used as the node weight, and connections are established between clusters with a minimum semantic distance less than the current threshold. Each connected component in the drug connectivity graph is traversed, and the Floyd-Warshall algorithm is used to calculate the shortest path length between any two nodes within a connected component. The average shortest path length for that connected component is obtained by averaging the shortest path lengths of all node pairs. The boundary distance between connected components is defined as the minimum semantic distance between the corresponding clusters of nodes in different connected components.
[0032] Based on the distribution of the average shortest path length of all connected components in the drug connectivity graph, the 25th percentile is calculated as the cohesion threshold. Based on the distribution of boundary distances between all connected components in the drug connectivity graph, the 75th percentile of this distribution is calculated as the separation threshold. For each connected component, if its average shortest path length is less than the cohesion threshold, it indicates that its internal nodes are tightly connected and have high cohesion; if its boundary distance from other connected components is greater than the separation threshold, it indicates that it is clearly separated from the outside. Connected components that satisfy both conditions are identified as hierarchical clustering nodes for the current level. These hierarchical clustering nodes are used as input nodes for the next level, and clustering iterations are continued according to the next threshold in the threshold sequence, building upwards layer by layer until the threshold sequence is traversed or all nodes are merged into a single connected component, thus completing the generation of the drug hierarchical clustering structure.
[0033] In one optional embodiment, constructing local compatibility subgraphs at each level and extracting the topological invariants of the local compatibility subgraphs as hierarchical feature encoding includes: Traverse each level of the drug hierarchical clustering structure to obtain the drug subset contained in each level of the clustering structure; In the drug subset, each drug is set as a graph node. The metabolic enzyme competition pathway and receptor co-blocking relationship between drugs are queried. Graph edge connections are established for drug pairs with metabolic enzyme competition pathways or receptor co-blocking relationships. Local compatibility subgraphs are constructed based on graph nodes and graph edges. Calculate the degree matrix and adjacency matrix of the local compatibility subgraph, subtract the adjacency matrix from the degree matrix to obtain the graph Laplacian matrix, perform eigenvalue decomposition on the graph Laplacian matrix, extract the second smallest eigenvalue from the eigenvalues obtained by eigenvalue decomposition as the algebraic connectivity, calculate the difference between the second smallest eigenvalue and the third smallest eigenvalue as the spectral gap, and combine the algebraic connectivity and the spectral gap as topological invariants. Obtain the hierarchical depth value and the number of drugs contained in the hierarchical clustering node in the drug hierarchical clustering structure. Concatenate the topological invariant, the hierarchical depth value and the number of drugs in sequence into a fixed-length vector to generate hierarchical feature encoding.
[0034] In one specific implementation, after obtaining the drug hierarchical clustering structure, a detailed topological analysis of each level is required. The system uses a depth-first traversal algorithm to sequentially visit each level of the clustering tree. Each level clustering node maintains a drug index list, recording all drug identifiers covered by that node. For each visited level clustering node, a subset of its contained drugs is extracted. The size of this drug subset decreases with increasing level depth; top-level nodes may contain hundreds of drugs, while bottom-level leaf nodes typically contain only 5 to 15 drugs.
[0035] When constructing the local compatibility subgraph, each drug in the drug subset is mapped to a vertex of the graph. Whether an edge connection is established between two drugs depends on their metabolic pathway interactions. Specifically, a pre-constructed database of drug-metabolizing enzymes is queried to identify whether two drugs are metabolized by the same cytochrome P450 enzyme system, such as CYP3A4 and CYP2D6. If the same metabolic enzyme is present, it is marked as a competing pathway. Simultaneously, a receptor binding database is searched to determine whether two drugs act on the same receptor site and produce an antagonistic effect. For example, if both drugs block the α1-adrenergic receptor, a receptor co-blocking relationship is established. For drug pairs that satisfy any of these conditions, an undirected edge is established between the corresponding graph nodes, with an edge weight set to 1.
[0036] After completing the graph structure construction, calculate the degree matrix D, and its diagonal elements D ii The number of edges connecting node i is equal to the number of edges connecting node i; off-diagonal elements are zero. The elements A of the adjacency matrix A are... ij The function indicates whether an edge exists between node i and node j; a value of 1 indicates existence, and a value of 0 indicates non-existence. The graph Laplacian matrix L is obtained through matrix subtraction, L = D - A. Eigenvalue decomposition is performed on L, and the resulting eigenvalues are sorted in ascending order, with the first eigenvalue always being zero. λ² is extracted as the algebraic connectivity, reflecting the strength of graph connectivity; a larger value indicates a stronger compatibility association between drugs. The spectral gap is calculated as λ³ - λ², which measures the modularity of the graph; a larger spectral gap indicates significant drug subgroup differentiation.
[0037] The hierarchical depth value is obtained by calculating the path length from the node to the root node. The root node has a depth of 0, its direct child nodes have a depth of 1, and so on. The drug quantity value directly counts the total number of drug identifiers contained in the node. The algebraic connectivity, spectral gap, hierarchical depth value, and drug quantity value are arranged in sequence to form a four-dimensional vector, for example, [0.82, 0.35, 3, 47]. This vector is the hierarchical feature encoding of the cluster node at that level, which is used for subsequent risk transmission analysis.
[0038] In one optional embodiment, the topological similarity measure of local compatibility subgraphs at adjacent levels is calculated using a graph convolution operator, and a compatibility risk propagation tensor field is established based on the gradient direction of the topological similarity measure, including: Extract hierarchical clustering node pairs from adjacent levels in the drug hierarchical clustering structure, and obtain the local compatibility subgraphs and hierarchical feature codes corresponding to the hierarchical clustering node pairs respectively; The adjacency matrix of the local matching subgraph and the hierarchical feature encoding are input into the graph convolution operator. The graph convolution operator performs a multi-hop neighborhood aggregation operation on the local matching subgraph to obtain the node embedding representation. A bidirectional mapping matrix between the node embedding representations of adjacent hierarchical local matching subgraphs is constructed. The nuclear norm of the bidirectional mapping matrix is calculated to determine the topological similarity measure. A coordinate system is established in the hierarchical space of the drug hierarchical clustering structure. The hierarchical depth value of each cluster node is mapped to the vertical axis coordinate, and the centroid of the pharmacological target cluster of each cluster node is mapped to the horizontal axis coordinate. The directional derivatives of the topological similarity metric with respect to the vertical and horizontal axes coordinates are calculated in the coordinate system. The vector field formed by the directional derivatives is defined as the compatibility risk transmission tensor field. The direction of each vector in the compatibility risk transmission tensor field corresponds to the transmission direction of compatibility incompatibilities information between levels.
[0039] In one specific implementation, when calculating the topological similarity measure of the local compatibility subgraphs of adjacent levels, all node pairs of adjacent levels are traversed from the constructed drug hierarchical clustering structure. For any node pair located at level k and level (k+1), its corresponding local compatibility subgraph is extracted. Each local compatibility subgraph is represented by an adjacency matrix A. k For example, matrix element a is stored in a formal way. ij This indicates whether there is a compatibility interaction between drug i and drug j. Simultaneously, the hierarchical feature code h corresponding to this node is obtained. k This encoding contains the topological invariant information calculated in the preceding steps.
[0040] Let the adjacency matrix A k With hierarchical feature encoding h k The inputs are combined into a preset graph convolution operator. The graph convolution operator is then processed according to the normalized adjacency matrix. Multi-hop neighborhood aggregation is performed, where D is the degree matrix. Second-order neighborhood information is aggregated through two-layer graph convolution operations to obtain the embedding representation vector of each drug node in the current level subgraph. For two local matching relationship subgraphs at adjacent levels, the node embedding representation matrix Z is obtained respectively. k With Z k+1 .
[0041] Construct a bidirectional mapping matrix from layer k to layer (k+1). Specifically, this is done by calculating Z. k With Z k+1 A similarity matrix is used to construct a mapping relationship between the two subgraphs, with the nuclear norm used as a metric. The nuclear norm is defined as the sum of all singular values of the matrix and can effectively characterize the overall topological correspondence between the two subgraph structures. For the bidirectional mapping matrix M... k,k+1 Perform singular value decomposition and sum the singular values to obtain the topological similarity measure s. k,k+1 A higher value indicates a more similar topological structure of drug compatibility relationships between adjacent levels, and a higher reliability of compatibility risk transmission.
[0042] After calculating the topological similarity metric for all adjacent hierarchical node pairs, a hierarchical spatial coordinate system is established. The hierarchical depth value of each node in the drug hierarchical clustering structure is used as the ordinate (y), with the depth value determined based on the number of clustering iterations. The centroid of the pharmacological target clusters of the drugs contained in that hierarchical cluster node is calculated, and the centroid is projected onto a one-dimensional space using multidimensional scaling analysis to obtain the abscissa (x). In the established two-dimensional coordinate system, each hierarchical cluster node is represented as a coordinate point (x...). i y i ), its topological similarity metric s i Appended to this coordinate point.
[0043] A continuous field function S(x, y) is constructed by interpolating the discretely distributed topological similarity metrics in the coordinate system. The partial derivatives of this function with respect to the ordinate and the abscissa are then obtained. and Construct a directional derivative vector at each coordinate point. This set of vectors forms a tensor field for the transmission of mismatch risk. The direction of each vector in the tensor field indicates the preferred path for the propagation of mismatch taboo information between levels, and the vector magnitude reflects the transmission strength, thus providing directional guidance for the subsequent propagation of risk signals.
[0044] like Figure 2 As shown, a flowchart illustrating the construction of the drug compatibility risk transmission tensor field is presented.
[0045] In an optional embodiment, constructing a bidirectional mapping matrix between node embedding representations of adjacent-level local compatibility subgraphs includes: Identify cross-level drug delivery chains from adjacent-level local compatibility subgraphs. The drug delivery chain records the delivery sequence of the active metabolite of the upper-level drug to the receptor binding site of the lower-level drug. Convert the delivery sequences in the drug delivery chain into node index pairs. Construct a sparse connection matrix for node index pairs. In the sparse connection matrix, only the matrix positions corresponding to the node index pairs are assigned values to transmit strength weights. Perform singular value decomposition on the sparse connection matrix to obtain a left singular vector matrix and a right singular vector matrix. Use the left singular vector matrix as the first one-way mapping matrix from the upper level to the lower level, and use the transpose of the right singular vector matrix as the second one-way mapping matrix from the lower level to the upper level. Combine the first one-way mapping matrix and the second one-way mapping matrix to form a bidirectional mapping matrix.
[0046] In one specific implementation, during topology-adaptive hierarchical clustering, there is a hierarchical transmission relationship of drug components between local compatibility subgraphs of adjacent levels. To accurately characterize this cross-level association, a bidirectional mapping matrix between node embedding representations needs to be constructed.
[0047] The identification of drug delivery chains is based on pharmacokinetic principles. After metabolic transformation in vivo, the active ingredients corresponding to drug nodes in the upper-level local compatibility subgraph may interact with drug receptors in the lower-level local compatibility subgraph. By querying a drug metabolism database, the chemical structure identifiers of the main active metabolites of each upper-level drug are extracted, and the three-dimensional spatial coordinates of known receptor binding sites of lower-level drugs are obtained. A molecular docking algorithm is used to calculate the affinity score between the metabolite and the receptor binding site. When the affinity score exceeds a preset threshold, a valid delivery relationship is considered to exist, and this relationship is recorded as a drug delivery chain. The delivery chain is stored in triplets: upper-level drug node index, lower-level drug node index, and delivery strength value. The delivery strength value comprehensively considers the area under the plasma concentration-time curve of the metabolite and the receptor occupancy, and is used as a weight after normalization.
[0048] Extract the node index pairs from all identified drug component delivery chains and construct a sparse connectivity matrix C. The number of rows in this matrix corresponds to the total number of nodes m in the upper-level local compatibility subgraph, and the number of columns corresponds to the total number of nodes n in the lower-level local compatibility subgraph. Initialize all elements of the matrix to zero. Traverse each delivery chain; if the upper-level node index is i, the lower-level node index is j, and the delivery strength weight is w... ij Then, the matrix position C(i,j) is assigned the value w. ij Since the number of node pairs with actual transitive relationships usually accounts for a small proportion of all possible combinations, matrix C exhibits highly sparse characteristics. Therefore, a compressed sparse row format is used for storage to save memory overhead.
[0049] A truncated singular value decomposition (SVD) is performed on the sparse connectivity matrix C, retaining the top k largest singular values and their corresponding singular vectors, where k is determined based on the cumulative variance contribution rate reaching 95%. The decomposition yields a left singular vector matrix U of dimension m×k, a singular value diagonal matrix Σ of dimension k×k, and a right singular vector matrix V of dimension n×k. Each row of the left singular vector matrix U represents the representation of the upper-level node in the low-dimensional semantic space, and is directly used as the first one-way mapping matrix from the upper to the lower level. Each row of the right singular vector matrix V represents the semantic representation of the lower-level node, and a transpose operation is performed on V to obtain a matrix V of dimension k×n. T , which serves as the second one-way mapping matrix from the lower level to the upper level.
[0050] The bidirectional mapping matrix is constructed by concatenating the first one-way mapping matrix U and the second one-way mapping matrix V. T The organization is based on mapping matrix pairs. In actual computation, given the embedding vector x of the upper-level nodes... upper Through matrix multiplication U T x upperObtain the corresponding lower-level semantic representation; during backpropagation, given the lower-level node embedding vector x lower via Vx lower Mapping back to the upper-level space. This bidirectional mapping mechanism ensures that cross-level node features can flow bidirectionally, providing a structured hierarchical connection relationship for the subsequent construction of the matching risk transmission tensor field.
[0051] In one optional embodiment, multi-scale risk signal propagation is performed along the compatibility risk propagation tensor field. At each propagation node, an adaptive attenuation factor is applied to the risk signal based on the eigenvalue spectrum of the local compatibility subgraph, and the propagation is distributed according to the proportion of the number of connected edges, including: Identify the hierarchical level of the drug combination to be tested in the drug hierarchical clustering structure, calculate the overlap of metabolic enzyme competitive pathways and the intensity of receptor co-blocking between drug pairs, and determine the initial risk signal intensity. Construct a normalized random walk transition matrix for the corresponding local matching relationship subgraph at the current propagation node, perform eigenvalue decomposition on the normalized random walk transition matrix, calculate the fourth and third central moments of the difference sequence of adjacent elements of the eigenvalue spectrum, multiply them by the current propagation node level depth value and sum them to obtain the adaptive decay factor. Based on the risk signal strength received by the current propagation node and the adaptive attenuation factor, the attenuated risk signal strength is determined, the number of connecting edges of each graph node in the local matching relationship subgraph is counted, the cumulative ratio curve of the number of connecting edges and the uniformly distributed diagonal envelope area are calculated as the topology concentration value, and the attenuated risk signal strength is distributed to each graph node according to the ratio of the number of connecting edges of each graph node to the total number of connecting edges. The risk signal intensity assigned to each graph node is weighted and summed with the topological similarity metric and then passed to the next propagation node. The propagation is iterative and the accumulated risk signal intensity of each propagation node is summarized to form a multi-scale risk signal propagation result.
[0052] In one specific implementation, after obtaining the drug combination to be detected, the hierarchical level of each drug node is first located in the constructed multi-level clustering structure. By querying the CYP450 metabolic enzyme subtype database of the drugs, the types of metabolic enzymes involved in the drug pair are extracted, and the overlap of the enzyme competition pathways between the two drugs is calculated as the ratio of the number of common metabolic enzymes to the geometric mean of the total number of each drug's metabolic enzymes. Simultaneously, receptor affinity parameters are obtained from the drug receptor binding database. When two drugs act on the same receptor and produce an antagonistic effect, the receptor affinity constant is logarithmically taken and multiplied to obtain the receptor co-blocking strength value. The overlap of the metabolic enzyme competition pathways and the receptor co-blocking strength value are weighted and summed with weights of 0.6 and 0.4, respectively, and mapped to the 0-1 interval as the initial risk signal intensity.
[0053] For the local matching subgraph corresponding to the current propagation node, extract the set of connecting edges for each node in the graph, construct an adjacency matrix, and calculate the degree matrix. Divide each element of the adjacency matrix by the degree value of the corresponding node to obtain the normalized random walk transition matrix. Perform eigenvalue decomposition on this matrix to obtain the eigenvalue sequence arranged in descending order. Calculate the difference sequence of adjacent eigenvalues, and calculate the fourth-order central moment for the difference sequence, specifically the average of the fourth power of the difference between each difference and the mean. Simultaneously, calculate the third-order central moment, which is the average of the cube of the difference between each difference and the mean. Multiply the fourth-order central moment by the depth value of the current node in the clustering tree, and multiply the third-order central moment by the square root of the depth value. Summing these two terms and normalizing them using the sigmoid function yields an adaptive decay factor ranging from 0.3 to 0.9.
[0054] The attenuated risk signal strength is obtained by multiplying the received risk signal strength by the calculated adaptive attenuation factor. The number of connected edges for each node in the local compatibility subgraph is counted and arranged in node number order to form an edge count sequence. After normalizing the edge count sequence, the cumulative distribution function is calculated, and a cumulative proportion curve is plotted. The area envelope between this curve and the uniform distribution diagonal is calculated, and the summation is performed segment by segment using the trapezoidal integral method. The area value is multiplied by 2 to obtain the topological concentration value. The proportion of each node's connected edges to the total number of connected edges of all nodes is calculated, and the attenuated risk signal strength is distributed to each node according to this proportion.
[0055] For each node receiving the assigned signal, the topological similarity metric between it and the next-level propagation node is extracted. The risk signal strength assigned to the node is multiplied by the corresponding topological similarity metric, and then weighted by the node's degree centrality in the subgraph at a ratio of 0.7 and 0.3 to obtain the signal strength propagated downwards. The signal is propagated to the corresponding node in the next level along the gradient direction indicated by the matching risk propagation tensor field. The eigenvalue spectral decomposition, attenuation factor calculation, and signal allocation process are repeated at the next node until the leaf node level of the clustering tree is reached. The cumulative risk signal strength received by each propagation node during the iteration process is recorded and grouped according to the node's level. The cumulative strength of nodes in the same level is weighted and averaged, with the weight being the normalized result of the node's degree value, to obtain the representative risk strength of each level. The representative risk strengths of all levels are summarized with exponential weights decreasing with level depth to form a risk signal propagation result vector containing multi-scale information.
[0056] In one optional embodiment, the cross-level aggregation of risk signal strengths at each level to obtain the global risk assessment tensor includes: Extract the local compatibility subgraphs of each propagation node from the multi-scale risk signal propagation results, calculate the number of connected components and loops in each local compatibility subgraph, determine the hierarchical topological features, and concatenate the hierarchical topological features with the risk signal intensity accumulated by the corresponding propagation nodes to form a hierarchical risk feature vector. Calculate the cosine similarity between the hierarchical topological features of adjacent levels, construct the inter-level mapping matrix with the cosine similarity as the element, and multiply the hierarchical risk feature vector of each level with the inter-level mapping matrix to obtain the standard hierarchical risk feature vector. The hierarchical weights are determined by the proportion of the number of nodes at each level to the total number of nodes. The standard hierarchical risk feature vectors of each level are multiplied by their corresponding hierarchical weights and summed to obtain the aggregated risk feature vector. The aggregated risk feature vectors are then reshaped into tensors to obtain the global risk assessment tensor.
[0057] In one specific implementation, after multi-scale risk signal propagation is completed, cross-level information needs to be integrated from the signals accumulated by each propagation node. For each node that has performed propagation, its belonging level in the topological hierarchy is located, and the corresponding local compatibility subgraph is extracted. Graph theory properties are calculated on the extracted local compatibility subgraph: the number of interconnected maximal connected subgraphs is counted using a depth-first search algorithm as the number of connected components, which reflects the isolation degree of the compatibility relationship; a backtracking algorithm is used to detect and count all simple loops, and the number of loops characterizes the feedback complexity of the compatibility relationship network. The calculated number of connected components and the number of loops are combined to form a two-dimensional vector as the hierarchical topological feature. This feature is concatenated with the accumulated risk signal strength value of the propagation node to form a hierarchical risk feature vector containing topological structure information and risk numerical information.
[0058] The topological structures between adjacent levels exhibit evolutionary relationships, necessitating the establishment of inter-level mapping relationships. For adjacent layers p and p+1, their respective topological feature vectors are extracted, and the cosine similarity value between the two vectors is calculated. This value quantifies the degree of inheritance in topological structure between adjacent layers. The cosine similarity values between all adjacent layer pairs are then used to fill the corresponding positions in the matrix, constructing an inter-level mapping matrix, with the row and column indices corresponding to the layer numbers. Matrix multiplication is performed between the layer risk feature vectors of each layer and the inter-level mapping matrix. The mapping matrix is used to weight and fuse the risk features of different layers, eliminating the inconsistency in dimensions caused by topological differences between layers, resulting in a standard layer risk feature vector corrected for inter-level relationships.
[0059] The difference in the number of nodes at different levels leads to different contributions to the global risk. The total number of nodes in each level is counted, and the proportion of nodes in that level to the total number of nodes in all levels is calculated as the level weight. The standard level risk feature vector of each level is multiplied element-wise with the corresponding level weight to achieve a weighted operation based on node size. The weighted standard level risk feature vectors of all levels are then summed element-wise to obtain an aggregated risk feature vector that incorporates information from all levels. This vector is in the form of a one-dimensional array. It is reshaped according to a preset tensor dimension specification to transform it into a multi-dimensional tensor structure. This tensor is the global risk assessment tensor, with each dimension corresponding to a different risk assessment perspective, providing input data for subsequent manifold dimensionality reduction projection.
[0060] The drug incompatibility big data analysis and processing system of this invention includes: The data acquisition unit is used to acquire drug datasets containing drug identifiers and pharmacological targets. Clustering coding unit is used for multidimensional semantic mapping based on pharmacological targets to perform topological adaptive hierarchical clustering of drug datasets, construct local compatibility subgraphs at each level, and extract the topological invariants of the local compatibility subgraphs as hierarchical feature encodings; Tensor building units are used to calculate the topological similarity measure of local matching relationship subgraphs at adjacent levels through graph convolution operators, and to establish a matching risk propagation tensor field based on the gradient direction of the topological similarity measure. The signal propagation unit is used to perform multi-scale risk signal propagation along the compatibility risk propagation tensor field. At each propagation node, an adaptive attenuation factor is applied to the risk signal according to the eigenvalue spectrum of the local compatibility relationship subgraph, and the transmission is allocated according to the proportion of the number of connected edges. The cross-level aggregation of the risk signal intensity at each level is used to obtain the global risk assessment tensor. The result determination unit is used to perform manifold dimensionality reduction projection on the global risk assessment tensor and combine it with hierarchical feature encoding to generate the incompatibility determination result of the drug combination to be tested.
[0061] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0062] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0063] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.
[0064] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for big data analysis and processing of drug incompatibilities, characterized in that, include: Obtain a drug dataset containing drug identifiers and pharmacological targets; Based on the multidimensional semantic mapping of pharmacological targets, topological adaptive hierarchical clustering is performed on the drug dataset. Local compatibility subgraphs are constructed at each level, and the topological invariants of the local compatibility subgraphs are extracted as hierarchical feature encodings. The topological similarity measure of the local compatibility relationship subgraphs at adjacent levels is calculated using graph convolution operators, and a compatibility risk propagation tensor field is established based on the gradient direction of the topological similarity measure. Multi-scale risk signal propagation is performed along the compatibility risk propagation tensor field. At each propagation node, an adaptive attenuation factor is applied to the risk signal based on the eigenvalue spectrum of the local compatibility relationship subgraph, and the transmission is allocated according to the proportion of the number of connected edges. The risk signal intensity at each level is aggregated across levels to obtain the global risk assessment tensor. The global risk assessment tensor is subjected to manifold dimensionality reduction projection, and the incompatibility determination results of the drug combinations to be tested are generated by combining hierarchical feature encoding.
2. The method according to claim 1, characterized in that, Topology-adaptive hierarchical clustering of drug datasets based on multidimensional semantic mapping of pharmacological targets includes: Pharmacological targets are constructed into multidimensional semantic vectors according to receptor type and signaling pathway cascade depth; Calculate the semantic distance between multidimensional semantic vectors and construct a semantic distance matrix. Perform kernel density estimation on the semantic distance matrix. Detect the zeros of the second derivative of the density function in the kernel density estimation results. Extract the distance values corresponding to the zeros of the second derivative as a hierarchical partitioning threshold sequence. Based on the hierarchical threshold sequence, a bottom-up agglomerative clustering is performed on the drug dataset. In each clustering iteration, a drug connectivity graph of the current level is constructed. Each connected component in the drug connectivity graph is traversed, and the average shortest path length between nodes inside the connected component and the boundary distance between connected components are calculated. The cohesion threshold is determined based on the distribution of the average shortest path length of all connected components in the drug connectivity graph, and the separation threshold is determined based on the distribution of the boundary distances between all connected components in the drug connectivity graph. When the average shortest path length is less than the cohesion threshold and the boundary distance is greater than the separation threshold, the connected component is determined as the hierarchical clustering node of the current level, and the process is carried out layer by layer upwards until the hierarchical clustering nodes of all levels are generated, forming a drug hierarchical clustering structure.
3. The method according to claim 1, characterized in that, Constructing local compatibility subgraphs at each level and extracting the topological invariants of these subgraphs as hierarchical feature encodings includes: Traverse each level of the drug hierarchical clustering structure to obtain the drug subset contained in each level of the clustering structure; In the drug subset, each drug is set as a graph node. The metabolic enzyme competition pathway and receptor co-blocking relationship between drugs are queried. Graph edge connections are established for drug pairs with metabolic enzyme competition pathways or receptor co-blocking relationships. Local compatibility subgraphs are constructed based on graph nodes and graph edges. Calculate the degree matrix and adjacency matrix of the local compatibility subgraph, subtract the adjacency matrix from the degree matrix to obtain the graph Laplacian matrix, perform eigenvalue decomposition on the graph Laplacian matrix, extract the second smallest eigenvalue from the eigenvalues obtained by eigenvalue decomposition as the algebraic connectivity, calculate the difference between the second smallest eigenvalue and the third smallest eigenvalue as the spectral gap, and combine the algebraic connectivity and the spectral gap as topological invariants. Obtain the hierarchical depth value and the number of drugs contained in the hierarchical clustering node in the drug hierarchical clustering structure. Concatenate the topological invariant, the hierarchical depth value and the number of drugs in sequence into a fixed-length vector to generate hierarchical feature encoding.
4. The method according to claim 1, characterized in that, The topological similarity measure of local compatibility subgraphs at adjacent levels is calculated using graph convolution operators. Based on the gradient direction of the topological similarity measure, a compatibility risk propagation tensor field is established, including: Extract hierarchical clustering node pairs from adjacent levels in the drug hierarchical clustering structure, and obtain the local compatibility subgraphs and hierarchical feature codes corresponding to the hierarchical clustering node pairs respectively; The adjacency matrix of the local matching subgraph and the hierarchical feature encoding are input into the graph convolution operator. The graph convolution operator performs a multi-hop neighborhood aggregation operation on the local matching subgraph to obtain the node embedding representation. A bidirectional mapping matrix between the node embedding representations of adjacent hierarchical local matching subgraphs is constructed. The nuclear norm of the bidirectional mapping matrix is calculated to determine the topological similarity measure. A coordinate system is established in the hierarchical space of the drug hierarchical clustering structure. The hierarchical depth value of each cluster node is mapped to the vertical axis coordinate, and the centroid of the pharmacological target cluster of each cluster node is mapped to the horizontal axis coordinate. The directional derivatives of the topological similarity metric with respect to the vertical and horizontal axes coordinates are calculated in the coordinate system. The vector field formed by the directional derivatives is defined as the compatibility risk transmission tensor field. The direction of each vector in the compatibility risk transmission tensor field corresponds to the transmission direction of compatibility incompatibilities information between levels.
5. The method according to claim 4, characterized in that, The bidirectional mapping matrix between the node embedding representations of the local compatibility subgraphs of adjacent levels includes: Identify cross-level drug delivery chains from adjacent-level local compatibility subgraphs. The drug delivery chain records the delivery sequence of the active metabolite of the upper-level drug to the receptor binding site of the lower-level drug. Convert the delivery sequences in the drug delivery chain into node index pairs. Construct a sparse connection matrix for node index pairs. In the sparse connection matrix, only the matrix positions corresponding to the node index pairs are assigned values to transmit strength weights. Perform singular value decomposition on the sparse connection matrix to obtain a left singular vector matrix and a right singular vector matrix. Use the left singular vector matrix as the first one-way mapping matrix from the upper level to the lower level, and use the transpose of the right singular vector matrix as the second one-way mapping matrix from the lower level to the upper level. Combine the first one-way mapping matrix and the second one-way mapping matrix to form a bidirectional mapping matrix.
6. The method according to claim 1, characterized in that, Multi-scale risk signal propagation is performed along the compatibility risk propagation tensor field. At each propagation node, an adaptive attenuation factor is applied to the risk signal based on the eigenvalue spectrum of the local compatibility subgraph, and the propagation is distributed according to the proportion of the number of connected edges. Identify the hierarchical level of the drug combination to be tested in the drug hierarchical clustering structure, calculate the overlap of metabolic enzyme competitive pathways and the intensity of receptor co-blocking between drug pairs, and determine the initial risk signal intensity. Construct a normalized random walk transition matrix for the corresponding local matching relationship subgraph at the current propagation node, perform eigenvalue decomposition on the normalized random walk transition matrix, calculate the fourth and third central moments of the difference sequence of adjacent elements of the eigenvalue spectrum, multiply them by the current propagation node level depth value and sum them to obtain the adaptive decay factor. Based on the risk signal strength received by the current propagation node and the adaptive attenuation factor, the attenuated risk signal strength is determined, the number of connecting edges of each graph node in the local matching relationship subgraph is counted, the cumulative ratio curve of the number of connecting edges and the uniformly distributed diagonal envelope area are calculated as the topology concentration value, and the attenuated risk signal strength is distributed to each graph node according to the ratio of the number of connecting edges of each graph node to the total number of connecting edges. The risk signal intensity assigned to each graph node is weighted and summed with the topological similarity metric and then passed to the next propagation node. The propagation is iterative and the accumulated risk signal intensity of each propagation node is summarized to form a multi-scale risk signal propagation result.
7. The method according to claim 6, characterized in that, The global risk assessment tensor is obtained by aggregating the risk signal strengths across different levels, including: Extract the local compatibility subgraphs of each propagation node from the multi-scale risk signal propagation results, calculate the number of connected components and loops in each local compatibility subgraph, determine the hierarchical topological features, and concatenate the hierarchical topological features with the risk signal intensity accumulated by the corresponding propagation nodes to form a hierarchical risk feature vector. Calculate the cosine similarity between the hierarchical topological features of adjacent levels, construct the inter-level mapping matrix with the cosine similarity as the element, and multiply the hierarchical risk feature vector of each level with the inter-level mapping matrix to obtain the standard hierarchical risk feature vector. The hierarchical weights are determined by the proportion of the number of nodes at each level to the total number of nodes. The standard hierarchical risk feature vectors of each level are multiplied by their corresponding hierarchical weights and summed to obtain the aggregated risk feature vector. The aggregated risk feature vectors are then reshaped into tensors to obtain the global risk assessment tensor.
8. A big data analysis and processing system for drug incompatibilities, used to implement the method of any one of claims 1-7, characterized in that, include: The data acquisition unit is used to acquire drug datasets containing drug identifiers and pharmacological targets. Clustering coding unit is used for multidimensional semantic mapping based on pharmacological targets to perform topological adaptive hierarchical clustering of drug datasets, construct local compatibility subgraphs at each level, and extract the topological invariants of the local compatibility subgraphs as hierarchical feature encodings; Tensor building units are used to calculate the topological similarity measure of local matching relationship subgraphs at adjacent levels through graph convolution operators, and to establish a matching risk propagation tensor field based on the gradient direction of the topological similarity measure. The signal propagation unit is used to perform multi-scale risk signal propagation along the compatibility risk propagation tensor field. At each propagation node, an adaptive attenuation factor is applied to the risk signal according to the eigenvalue spectrum of the local compatibility relationship subgraph, and the transmission is allocated according to the proportion of the number of connected edges. The cross-level aggregation of the risk signal intensity at each level is used to obtain the global risk assessment tensor. The result determination unit is used to perform manifold dimensionality reduction projection on the global risk assessment tensor and combine it with hierarchical feature encoding to generate the incompatibility determination result of the drug combination to be tested.
9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 7.