Knowledge graph vectorization representation method for medical field
By generating multi-channel fusion configuration parameters and iteratively optimizing the common feature mapping model, the cone phase blind zone problem in medical knowledge graph representation was solved, stable node index table generation was achieved, and the recall rate and data integrity of medical retrieval were improved.
Patent Information
- Application Number
- CN202512021388.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-03-03
AI Technical Summary
Existing joint nonnegative matrix factorization methods based on view weight configuration ignore the cone phase segmentation characteristics in medical knowledge graph representation learning, resulting in the cone phase blind zone problem. They cannot capture the associated features that only appear under specific weight phases, and the vector representation is sensitive to the weight parameters, resulting in unstable entity embeddings.
By generating multi-channel fusion configuration parameters to cover the entire data fusion space, using a common feature mapping model for iterative optimization, generating a machine-readable node feature index table, automatically capturing sparse correlated data, eliminating the dependence on manual parameter tuning, and reducing computing resource consumption.
It significantly improves the recall rate and data integrity of downstream medical retrieval tasks, reduces the time and resource consumption during model deployment, and can capture the hidden links of rare diseases and special symptoms.
Smart Images

Figure CN121597694A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graph vectorization technology, and more specifically, to a knowledge graph vectorization representation method for the medical field. Background Technology
[0002] With the rapid development of medical informatics and intelligent assisted diagnosis and treatment technologies, the medical field has accumulated massive amounts of multi-source heterogeneous data, including electronic medical records, medical literature, drug molecular structures, and clinical guidelines. To effectively mine the complex semantic relationships contained within these data, constructing heterogeneous knowledge graphs (HKGs) for the medical field has become a mainstream data organization method. Heterogeneous knowledge graphs typically contain multiple types of entities (such as diseases, symptoms, drugs, and genes) and multiple types of relationships (such as treatment, induction, and targeting). To apply this symbolic graph data to downstream deep learning tasks (such as potential drug discovery, disease risk prediction, and intelligent triage recommendation), researchers typically utilize network representation learning techniques to map nodes in the graph into low-dimensional, dense real-valued vectors (Embeddings) to preserve the structural information and semantic attributes of the original graph.
[0003] Among existing heterogeneous knowledge graph representation learning methods, Joint Non-negative Matrix Factorization (JointNMF) based on meta-paths is a classic and widely used technique. This type of method typically predefines multiple medical meta-paths (e.g., disease-symptom-disease or drug-target-drug), constructs node similarity matrices under multiple views based on these paths, and then weights and fuses these matrices at the loss function level or the data level by introducing a set of view weights, thereby decomposing them into shared node basis vectors. This method attempts to balance the contributions of different meta-paths to the final vector representation by learning or setting an optimal set of view weights, thereby fusing multi-source structural information.
[0004] However, existing joint decomposition methods based on view weight configuration neglect the inherent cone phase segmentation in the geometric space of nonnegative matrix factorization. Specifically, the smallest simple cone containing the data point cloud (i.e., the space spanned by the basis matrices) does not evolve continuously and smoothly with changes in view weights, but rather exhibits piecewise constant characteristics. That is, the weight space is divided into several phase regions, with abrupt changes in the set of epipolar rays occurring only at the phase boundaries. Existing techniques fix or learn only a single set of weights in a single decomposition, which leads to a severe cone phase blind spot problem: the model can only capture specific structural patterns manifested under the current weight phase, while systematically missing those associated features that are significant only under other weight phases (such as certain rare diseases forming tight communities only under specific path weight combinations). Furthermore, this single-phase learning mechanism makes the vector representation extremely sensitive to small perturbations in the weight parameters, resulting in unstable geometric embeddings of the generated entities. Summary of the Invention
[0005] This invention provides a vectorized representation method for knowledge graphs in the medical field, solving the technical problems mentioned in the background.
[0006] This invention provides a vectorized representation method for knowledge graphs in the medical field, including: The process involves acquiring heterogeneous knowledge graph data stored in memory, extracting multiple topological association data between the central node and other nodes, and converting this data into a standardized heterogeneous association view dataset. A set of multi-channel fusion configuration parameters is generated to detect different data distribution patterns, covering a preset global data fusion space. The heterogeneous association view dataset is then weighted and aggregated using these multi-channel fusion configuration parameters to generate multiple joint observation data blocks corresponding to different structural patterns. A joint reconstruction computation task containing a common feature mapping model is established in memory, using the common feature mapping model as a shared decoder for all the joint observation data blocks. Iterative optimization is performed to minimize the reconstruction error until the common feature mapping model converges to a state that can characterize the global structural features of all the joint observation data blocks. The converged common feature mapping model is parsed, and row feature data corresponding to the central node is extracted. A machine-readable node feature index table is generated and stored for information retrieval.
[0007] The beneficial effects of this invention are as follows: By using a global deterministic scanning and joint reconstruction mechanism, it solves the technical problem of losing key correlation information due to parameter setting deviations in traditional medical data mining systems; this invention can automatically capture sparse correlation data (such as the implicit links between rare diseases and special symptoms) that only appear at a specific fusion ratio, significantly improving the recall rate and data integrity of the generated node index table in downstream medical retrieval tasks. At the same time, it eliminates the dependence on manual parameter tuning, effectively reducing the computational resource consumption and time cost of the system in the model deployment stage. Attached Figure Description
[0008] Figure 1 This is a flowchart of the knowledge graph vectorization representation method for the medical field of the present invention; Figure 2 This is a schematic diagram of the overall architecture of the heterogeneous knowledge graph cone phase scanning and matrix decomposition of the present invention; Figure 3 This is a schematic diagram of the weighted simplex scan and multi-cone under the cone phase segmentation feature of the present invention. Detailed Implementation
[0009] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, features described in some examples may be combined in other examples.
[0010] like Figure 1 As shown, the vectorized representation method for knowledge graphs in the medical field includes: The process involves acquiring heterogeneous knowledge graph data stored in memory, extracting multiple topological association data between the central node and other nodes, and converting this data into a standardized heterogeneous association view dataset. A set of multi-channel fusion configuration parameters is generated to detect different data distribution patterns, covering a preset global data fusion space. The heterogeneous association view dataset is then weighted and aggregated using these multi-channel fusion configuration parameters to generate multiple joint observation data blocks corresponding to different structural patterns. A joint reconstruction computation task containing a common feature mapping model is established in memory, using the common feature mapping model as a shared decoder for all the joint observation data blocks. Iterative optimization is performed to minimize the reconstruction error until the common feature mapping model converges to a state that can characterize the global structural features of all the joint observation data blocks. The converged common feature mapping model is parsed, and row feature data corresponding to the central node is extracted. A machine-readable node feature index table is generated and stored for information retrieval.
[0011] In a preferred embodiment, heterogeneous knowledge graph data stored in memory is acquired, multiple topological association data between the central node and other nodes are extracted, and the data is converted into a standardized heterogeneous association view dataset, including: Regarding the first heterogeneous topology path Construct the original co-occurrence matrix among the central nodes. , of which Line number Column elements The calculation is as follows: ; in, Indicates from the first The central node to the first Path instance count of each central node Indicates from the first The sum of the counts of all path instances originating from each central node. To prevent division by zero smoothing factor; For the original co-occurrence matrix Normalization is performed to obtain the first [value] in the heterogeneous related view dataset. View Matrix : ; in, Represents the original co-occurrence matrix The Frobenius norm, This is the preset view smoothing constant.
[0012] It should be noted that, in order to address the problem of computational bias caused by the huge difference in the order of magnitude of entities involved in different types of meta-paths in heterogeneous knowledge graphs and the uneven distribution of node degree, a heterogeneous association view construction mechanism with dual normalization is designed. First, row normalization is used to eliminate the influence of the degree offset of the central node, and then matrix-level normalization is used to eliminate the dimensional differences between different views.
[0013] Preferably, the specific implementation process of acquiring heterogeneous knowledge graph data stored in memory, extracting multiple topological association data between the central node and other nodes, and converting it into a standardized heterogeneous association view dataset includes the following three sub-steps: Step 1: The system reads heterogeneous knowledge graph data stored in non-volatile storage media, which is formally defined as... ,in For a set of nodes, Let be the set of edges. and These are node type mapping functions and edge type mapping functions, respectively. Since the knowledge graph itself is a decentralized network structure, this embodiment specifies the central node type set according to a preset medical application scenario (such as disease-assisted diagnosis or drug discovery). For example, in a disease association analysis scenario, setting... The system executes a database query command, retrieving data from all nodes in the graph. Filter out types belonging to All entities constitute the central node set. Subsequently, the system processed the set. Each node in the array is assigned a unique, consecutive integer row index. , which serves as the reference coordinate system for all subsequent matrix operations.
[0014] Step 2: The meta-path-based multi-topology association extraction system extracts multiple topology associations between central nodes using a pre-built meta-path library. Meta-path Defined as a semantic sequence The starting point and the end point All are of the central node type. For example, define Define disease-symptom-disease. For disease-medicine-disease. Regarding the first... For each meta-path, the system uses matrix operations to extract associated data: Constructing an atomic adjacency matrix: for each edge type in the meta-path... Construct the atomic adjacency matrix of the entire graph. If node With nodes There exists a type of If the edge is there, then the matrix elements (or edge weight), otherwise 0. Generate path co-occurrence matrix: calculate the combined adjacency matrix under this meta-path using matrix multiplication. .matrix elements in Indicates from node Start from the point and follow the path to the node. The number of path instances. Extracting the central submatrix: from Only the row and column indices are extracted, both of which belong to the central node set. The submatrix, thus obtaining the first The original co-occurrence matrix of each view Among them, the first Line number Column elements The calculation is as follows: in, That is, a matrix The corresponding path instance count, with the denominator being the number of slave nodes. The sum of the counts of all starting path instances. To prevent node smoothing factors from being divided by zero (preferred value) This achieves preliminary normalization of the central node degree, eliminating numerical biases caused by isolated or high-frequency nodes.
[0015] Step 3: Standardization of multi-view data ensures the comparability of matrices generated from different meta-paths (views) in subsequent joint decomposition processes, preventing the numerical magnitude of certain dense views (e.g., symptom-disease) from masking the structural features of sparse views (e.g., drug-gene-disease). The system then performs a process on the original co-occurrence matrix. Further Frobenius norm normalization is performed to obtain the first normalized value in the heterogeneous relational view dataset. View Matrix The specific calculation formula is as follows: In this formula, It is the standardized data that is ultimately input into the subsequent model; Represents the original co-occurrence matrix The Frobenius norm is calculated as the square root of the sum of the squares of all elements in the matrix (i.e., ...). This norm measures the overall information strength of the current view matrix from an energy perspective; parameters It is the preset view smoothing constant (preferred value) Through the above processing, all different types of view matrices All of these are mapped to a unified dimension, so that subsequent weight parameters can truly reflect the importance of the view, rather than being influenced by the original size of the data.
[0016] In some preferred embodiments, for the original co-occurrence matrix The construction method can employ an approximate calculation method based on random walk probabilities. This involves estimating path probabilities through Monte Carlo random walks on the graph, replacing precise path counting. This approach effectively reduces computational complexity when dealing with extremely large graphs. Simultaneously, regarding the view matrix... Normalization, besides using the Frobenius norm, can also employ max-min normalization or L1 norm normalization strategies. For example, each element in the matrix can be divided by the value of the largest element in the matrix, i.e. .
[0017] In a preferred embodiment, a set of multi-channel fusion configuration parameters for detecting different data distribution patterns is generated. These fusion configuration parameters cover a preset global data fusion space and include: Build includes A set of weight vectors ,in The number of types in the heterogeneous related view dataset; Generate a uniformly distributed parameter vector The value of each of its dimensions is ; generate The bias distribution parameter vector, for the , a vector of bias distribution parameters , its first The numerical calculations for each dimension are as follows: ; in, The preset bias coefficient is used to control the degree to which the multi-channel fusion configuration parameters are tilted towards a single view.
[0018] It should be noted that the optimal solution structure of heterogeneous data fusion (i.e., the cone spanned by the basis matrices) exhibits discontinuous segmented jump characteristics as the weights change. To avoid a single weight configuration falling into the blind zone of the local structure, the system must construct a set of deterministic probe grids to cover the central and boundary regions in the global data fusion space.
[0019] Preferably, the generation of a set of multi-channel fusion configuration parameters for detecting different data distribution patterns is designed based on the cone geometry characteristics of nonnegative matrix factorization (NMF). The specific principles and parameter settings are as follows: The first step, heterogeneous knowledge graphs include The view is a type of view, and the corresponding view matrix is: The weight vector constructed by the system Defined in On the simplex, satisfying Specifically, dominant weight refers to a particular weight allocation. In this context, the value is significantly larger than the weights of all other components. It is defined as: if a view index exists... Make And for all All Then it is called a view. As the dominant view, As the dominant weight. The preset dominant threshold value ranges from [value range missing]. The mechanism by which the dominant weights function is reflected in the joint reconstruction loss function: When the dominant weight of a view is greater than 0.5, the reconstruction error term of that view accounts for more than 50% of the total loss function. This means that in calculating the common basis matrix... When the gradient comes from the dominant view gradient components The direction of updating the dominant parameters forces the model to preferentially fit the structural features of the view.
[0020] The second step involves the geometric definition of cone phase regions. The geometric essence of nonnegative matrix decomposition is to find a region composed of basis matrices. The convex cone spanned by column vectors This ensures that it includes as many data points as possible. In multi-view fusion scenarios, as the weight vector... The optimal basis matrix varies continuously within the simplex space. The resulting cone structure is not a continuous change, but rather exhibits piecewise constant characteristics. This is achieved by defining the cone phase region as a subregion within the weighted simplex space. In the same area Within, the optimal solution corresponding to any weight vector All have the same base vector topology; the combination of base vectors only changes qualitatively when crossing region boundaries. The multi-channel fusion configuration parameters generated by the system are designed to cover different cone-phase regions: equalization parameters. Located at the center of the simplex, corresponding to the phase region where contributions are balanced across all views; offset parameters. Located near the vertex of the simplex, corresponding to the phase region dominated by a single view.
[0021] The third step, optimization trajectory and traction effect optimization trajectory, refers to the common basis matrix during the execution of the iterative algorithm. numerical sequence A path formed in a high-dimensional parameter space. Strong traction refers to the presence of a clearly dominant weight in the configuration parameters (e.g., ...). When the optimized trajectory descends in the initial iterations, it will closely match the dominant view. The steepest descent direction of the gradient. Specifically, the preferred range of dominant weight values is... (e.g., 0.7). Lower limit (>0.5): The weight of the dominant view must exceed the sum of the weights of all other views to gain an absolute advantage in competitive learning and avoid falling into a saddle point where multiple views cancel each other out. Upper limit (<1.0): Approximately 20%-40% of the weight must be reserved for other auxiliary views (i.e., ... If the dominant weight is too large (close to 1.0), the model will completely degenerate into a single-view decomposition, resulting in the loss of other types of association information in the graph (such as implicit connections specific to rare diseases); while the setting of 0.7 strengthens the dominant view structure and prevents the model from overfitting on sparse data through the regularization effect of the auxiliary view, thus achieving the best balance between the dominant structure and auxiliary information.
[0022] In a preferred embodiment, the heterogeneous associated view dataset is weighted and aggregated using the multi-channel fusion configuration parameters to generate multiple joint observation data blocks corresponding to different structural patterns, including: For the first in the multi-channel fusion configuration parameter set A deterministic weight vector Construct the corresponding first Joint observation data blocks The calculation formula is as follows: ; in, Indicates the first The corresponding deterministic weight vector in the nth deterministic weight vector Weight components of a heterogeneous related view dataset This indicates that the arithmetic square root of the weighted component is calculated. Indicates the first A heterogeneous related view dataset, symbol This represents the cascading and splicing operation of matrices along the column direction.
[0023] It's important to note that traditional weighted matrix factorization often directly weights the reconstruction error terms at the loss function level, rather than employing a data-side weighting strategy. Specifically, since subsequent nonnegative matrix factorization (NMF) typically uses the Frobenius norm as the loss metric, which is essentially the sum of squared errors (the square of the L2 norm), to make the weight vector... In a linear sense, control the contribution of each view to the total error (i.e., achieve...) To achieve the desired effect, the original data must be scaled using the arithmetic square root of the weights (i.e., ).
[0024] Preferably, firstly, the system iterates through the set of multi-channel fusion configuration parameters generated in the preceding steps. This set contains The set contains deterministic weight vectors. For each weight vector in the set (denoted as the nth weight vector),... A deterministic weight vector The system constructs a corresponding joint observation data block. The specific calculation formula for this construction process is defined as follows: ; in, Indicates the generated first A joint observation data block, which is an extremely wide matrix in the column direction, with the number of rows equal to the number of central nodes. Keep it consistent, while the number of columns is all. The sum of the number of columns in the view matrix (i.e.) , Indicates the first The number of columns in the view matrix), which represents the number of columns in the first view matrix. A panoramic view after all view data is flattened and merged under various weight configuration perspectives; Indicates the first The weight vector assigned to the first weight vector Heterogeneous related view datasets ( The specific weight component of ) is a scalar value between 0 and 1; symbol This represents the standard arithmetic square root operation, thereby adjusting the energy magnitude to match the quadratic characteristics of the subsequent loss function; It is the first A normalized and standardized original heterogeneous relational view matrix; This represents a concatenation operation of matrices along the column vector direction, where the weighted view matrices are arranged horizontally in sequence and combined into a larger supermatrix. In this way, the system will... An independent view matrix to Geometrically, they are pieced together to form a unified data object containing global information. This makes the subsequent common basis matrix... It can reconstruct the structural features of all views simultaneously within the same optimization objective, without having to build a separate model for each view.
[0025] In a preferred embodiment, a joint reconstruction computation task containing a common feature mapping model is established in memory, including: Construct the joint optimization objective function as shown below. And the goal is to minimize this function: ; in, Indicates the first A joint observation data block, This represents the common feature mapping model. Indicates the corresponding to the first Independent coefficient encoding matrix of joint observation data blocks, Describe the Frobenius norm. This represents the preset regularization coefficient used to control model complexity. This represents the total number of joint observation data blocks.
[0026] Preferably, the specific implementation process of establishing the joint reconstruction computation task containing the common feature mapping model in the memory and performing iterative optimization processing is as follows: The first step involves constructing a joint optimization objective function and a regularization mechanism. This system is based on a multi-view joint nonnegative matrix factorization (JointNMF) objective function. The aim is to minimize the reconstruction error of all jointly observed data blocks while constraining the model complexity. The objective function is defined as follows: in, For the first A joint observation data block, It is a common feature mapping model (shared basis matrix). This is the corresponding independent coefficient encoding matrix. Regarding the mechanism of the regularization term: [Term...] This is an L2 regularization constraint. Unlike sparsity in traditional methods, the main purpose of introducing this term is to control model capacity and prevent overfitting. In the derivation of the multiplicative update rule, this regularization term generates a positive additive factor in the denominator, acting as numerical compression, forcing... The elements in the model tend to have smaller values while ensuring reconstruction accuracy, thus avoiding model instability caused by unbounded growth of parameter size.
[0027] The second step involves iterative optimization and parameter update rules. To solve the aforementioned non-convex optimization problem, the system employs multiplicative update rules within the Block Coordinate Descent framework to alternately update the coefficient matrix. and basis matrix (1) Update the independent coefficient matrix : (2) Update the common feature mapping model : in, and This is a preset smoothing factor used to ensure the stability of numerical calculations (preventing division by zero errors).
[0028] The third step is to develop a convergence criterion for multiple constraints in order to overcome single dependency. The matrix transformation method is insufficient to determine convergence, thus a joint convergence criterion based on the objective function value and parameter state is designed. The algorithm is considered convergent and iteration stops when any of the following conditions are met: Condition 1 (Relative Change of Objective Function): The rate of change of the objective function value in two consecutive iterations is less than a threshold. ,Right now ; Condition 2 (Joint Stability of Parameters): Common Basis Matrix With all independent coefficient matrices The relative rate of change is less than the threshold. ,Right now and ; Condition 3 (Computational Boundary): The number of iterations reaches the preset upper limit. .
[0029] The fourth step involves selecting key hyperparameters. Those skilled in the art can select hyperparameters within the following preferred range based on the scale and sparsity of the input data: regularization coefficient. Preferred range Due to the input view matrix It has been normalized, and its element values are usually in the range of Range, smaller This value can strike a balance between fitting accuracy and regularization. Smoothing factor Preferred range This value is much smaller than the effective data precision, which prevents floating-point overflow without interfering with the true direction of the gradient. Convergence threshold Preferred range Experiments show that the model can extract stable topological features at this level of accuracy. Maximum number of iterations. Preferred range Based on the convergence characteristics of the NMF algorithm, a local optimum is typically reached within 300-500 iterations.
[0030] In a preferred embodiment, the common feature mapping model is used as a shared decoder for all the jointly observed data blocks, and iterative optimization is performed to minimize the reconstruction error until the common feature mapping model converges to a state that can characterize the global structural features of all the jointly observed data blocks, including: In the In this iteration, first for each Update the independent coefficient encoding matrix according to the following formula. : ; Subsequently, using the updated independent coefficient encoding matrices, the common feature mapping model is updated according to the following formula. : ; in, An element-wise multiplication is represented by a decimal, and an element-wise division by a fraction is represented by a decimal. For the first A joint observation data block, Indicates matrix transpose. To preset the regularization coefficient, and These are the preset coefficient smoothing factor and the preset model smoothing factor, respectively, to prevent division by zero.
[0031] It should be noted that the common feature map model is used as a shared decoder for all jointly observed data blocks and iterative optimization is performed to achieve a generalized extension of the Lee-Seung multiplication update rule based on nonnegative matrix factorization (NMF). In particular, a global gradient aggregation mechanism is introduced to solve for the shared basis matrix of the multi-view problem. Thus, the constrained optimization problem is transformed into a fixed-point iterative problem using the Karush-Kuhn-Tucker conditions, and an auxiliary function is constructed to ensure that the objective function is monotonically non-increasing in each iteration.
[0032] Preferably, the system initializes a common feature mapping model. and each independent coefficient encoding matrix (Usually initialized with random positive numbers), then proceed to the next step. The system iterates through the next iteration. First, it executes step S61, which involves a parallelized local update for each joint observation data block. For each index in the set... ( Traverse from 0 to The corresponding independent coefficient encoding matrix is updated using the multiplication update rule. The specific update formula is as follows: ; In this formula, This represents element-wise matrix multiplication (HadamardProduct), which ensures that the update process does not change the sparse pattern of the matrix and is computationally efficient. Indicates the first During the nth iteration In the coefficient matrix, the first... Line number Column elements; This represents the transpose of the current common basis matrix; It is the first input A weighted joint observation data block; numerator item The projection representing the correlation between the current basis vector and the observed data, i.e., the positive excitation; denominator term This represents the inner product of the approximate value of the reconstructed data by the current model and the basis vectors, i.e., reconstruction suppression; parameters It is a preset coefficient smoothing factor, and its preferred value is Introducing parameters This is to prevent numerical overflow caused by the reconstructed approximation in the denominator being zero, and to avoid falling into a zero-locking state. Then, after completing all... After the update, the system executes step S62, which involves using the multiplicative update rule of global aggregation to update the shared public feature mapping model. This is a synchronous blocking operation, meaning it must wait for the coefficient matrices of all views to be updated. The update formula is: ; Among them, the numerator term It embodies the aggregation of information across the entire domain, encompassing all... The residual gradients of the data from each view are superimposed in the basis matrix space, making It doesn't just adapt to a single view, but rather seeks the common structural center of gravity of all views; the summation part in the denominator. This represents the sum of the covariances of all view coefficient matrices, used for... Apply normalization constraints; It is the regularization term in the objective function. right The gradient components generated after taking the partial derivative (i.e.) Since the positive gradient term must be placed in the denominator in the derivation of the multiplicative update rule, the existence of this term plays a role in numerical compression, forcing... The elements in the parameter tend to smaller values, thereby achieving sparsity or preventing overfitting; It is the preset model smoothing factor, and the preferred value is also set to... ; This is the regularization coefficient. Finally, the system executes step S63 to check the convergence condition. The preferred convergence criterion is to calculate the convergence coefficients of the two iterations. Difference of Frobenius norms of matrices When the difference is less than a preset threshold (e.g.) When the number of iterations reaches a preset limit (e.g., 500 times), the model is considered to have converged and the algorithm terminates.
[0033] In a preferred embodiment, the converged common feature mapping model is parsed, and row feature data corresponding to the center node is extracted, including: For the converged common feature mapping model The first in row vector Execute the following: The normalization operation yields the first... The final vector representation of each central node : ; in, The range of values is arrive , The total number of central nodes, Indicates the first row vectors Norm, This is a preset row smoothing term.
[0034] It should be noted that the converged common feature map model is analyzed and the row feature data corresponding to the center node is extracted to eliminate the scale uncertainty inherent in nonnegative matrix factorization (NMF). Specifically, for any nonsingular diagonal matrix... Decomposition results and It can be transformed into and Without changing the product The approximation of the original basis matrix leads to the original basis matrix being... The norm of a row vector is often strongly correlated with the activity of a node (such as degree centrality) rather than simply reflecting its semantic distribution direction. In order for the final generated vector to purely express the structural semantics of medical entities (i.e., their orientation in the feature space), all vectors must be projected onto the same unit hypersphere, making subsequent cosine similarity-based retrieval equivalent to Euclidean distance.
[0035] Preferably, firstly, the system reads the common feature mapping model that has been determined to have converged in the previous steps. The model is A matrix, where each row vector Corresponding to the index in the heterogeneous knowledge graph A central node. The system starts a traversal loop, for each... ( The value range is strictly traversed from 1 to 1. ,in (Given the total number of center nodes), first calculate the L2 norm (Euclidean norm) of the row vector, denoted as . The specific calculation method for this norm is as follows: first, calculate the square of the value of each element in the row vector, sum them, and then perform the arithmetic square root operation (i.e., ... ), representing the feature vector of this node in The length or energy amplitude in dimensional space. Next, the system uses the calculated L2 norm to scale the original row vector, obtaining the ... The final vector representation of each central node The specific calculation formula is defined as follows: ; in, It is the normalized output vector, and its direction is... They are the same, but the modulus is approximately 1, and can be directly used for downstream tasks; It is the first of the original outputs of the model Row vectors; in the denominator It is a preset row smoothing term, and its preferred value range is: to The preferred setting is Ultimately, the system will calculate all the results. normalized vectors The matrix is reorganized in memory according to the index order to form the final matrix decomposition vector representation, which is phase-stable and scale-uniform.
[0036] In some possible implementations, for the extraction of row feature data, L1 norm normalization (i.e., Manhattan distance normalization) can be used instead of L2 norm. In this case, the calculation formula changes to: ; This transforms each feature vector into a probability distribution (the sum of all elements is 1), representing the semantic interpretation of a node as its membership probability on each latent basis vector (Topic). This representation is suitable for scenarios where downstream tasks require probabilistic inference or use KL divergence as a metric (such as multi-causal analysis in medical diagnosis). Furthermore, in the storage stage, if... The quantity is extremely large and The system can set a cutoff threshold (e.g., ...) where a large number of values close to zero exist in the dimensional features (induced by L1 regularization). ), set dimensions smaller than the threshold to zero, and output in sparse vector format (Key-Value Pairs). This significantly reduces storage space.
[0037] In a preferred embodiment, generating a machine-readable node feature index table includes: The final vector representation of all central nodes According to node index The elements are stacked in the row direction to form the final heterogeneous knowledge graph embedding matrix. : ; in, Indicates the first The transpose of the final vector representation of each central node. It is the transpose symbol. The total number of central nodes, For one OK A matrix of columns, For the embedded dimension; Establishing a matrix from medical entity identifiers in heterogeneous knowledge graphs row index The lookup table is then used in conjunction with the embedding matrix. They are collectively encapsulated into a machine-readable node feature index table.
[0038] It should be noted that a machine-readable node feature index table is generated to map the business semantic space of medical entities (such as disease IDs and drug names) to a vector geometric space (i.e., matrix row indexes). Since the embedded matrix lacks business semantic labels, directly storing the matrix cannot meet the needs of downstream systems (such as medical diagnostic support systems) for retrieval based on entity IDs. Therefore, a key-value pair mapping mechanism is established, and this mapping relationship is encapsulated within the numerical matrix.
[0039] Preferably, the system first performs a matrix stacking operation in memory to generate the final vector representation of all central nodes. According to node index The order (i.e. from 1 to) The rows are arranged closely together. The system constructs the final heterogeneous knowledge graph embedding matrix as shown below. Construction formula: ; in, This represents the final generated heterogeneous knowledge graph embedding matrix, which is a... A two-dimensional real matrix, This represents the total number of central nodes in a heterogeneous knowledge graph (e.g., 100,000 nodes). Indicates the preset embedding dimension (e.g., 128 dimensions). Indicates the first The final vector representation of each central node The transpose of , The matrix transpose operator converts column vectors into row vectors, ensuring that the features of each node occupy contiguous blocks of memory, thereby optimizing CPU cache hit rate. The comma inside indicates an ordered stacking of row vectors in the vertical direction. Complete the matrix. After construction, the system traverses the original graph data, establishes an in-memory hash table (HashMap), and uses the unique identifier (e.g., Disease:D00123) of each medical entity in the heterogeneous knowledge graph as the key, thus storing the entity in the matrix. The corresponding row index (For example, integers 0 or 122) are used as values. Subsequently, to achieve data persistence and cross-platform interaction, the system preferably uses HDF5 (Hierarchical Data Format version 5) as the serialization container to store the embedded matrix. The dataset is stored as ` / embeddings`. The hash table is serialized into a JSON string and stored as a metadata attribute of this dataset. The HDF5 format was chosen because it supports efficient compression and parallel I / O read / write of large-scale numerical matrices, making it particularly suitable for storing data with dimensions of [missing information]. The system then writes the HDF5 file to the server's non-volatile storage medium (such as an NVMe SSD array), completing the index table's persistence.
[0040] In some possible embodiments, the generation and storage of the machine-readable node feature index table do not rely on a single file system, but are instead built based on a vector database (such as Milvus or Faiss). Specifically, the index table is a dynamic server-side index structure. In particular, the system will use a matrix... Each row vector in As the payload, the corresponding medical entity identifier is used as the primary key and inserted in batches into a collection of the vector database via a network interface. Specifically, in the formula... regarded as The data stream consists of independent vectors. The stored procedure is accompanied by the real-time construction of an inverted index or an HNSW (Hierarchical Navigable SmallWorld) graph index. This leverages the nearest neighbor search capability of the vector database, enabling downstream medical diagnostic systems to not only precisely look up vectors by ID, but also perform fuzzy searches based on vector similarity.
[0041] like Figure 2 As shown, Figure 2 From the geometric perspective of nonnegative matrix factorization (NMF), the basis for designing multi-channel fusion configuration parameters is given. The left side of the figure shows the simplex space (200) where the view weights are located. Due to the inherent characteristics of NMF, this space is implicitly divided into several phase regions (210) by boundaries. Within the same phase region, the cone structure of the optimal solution remains relatively stable, but abrupt changes occur when crossing the boundary. The designed scanning strategy (220) sets uniform points at the center of the simplex. Set an offset point near the vertex. The algorithm forces the observation points to fall within different phase regions. The right side of the figure shows the corresponding weights. The excited minimum simple cone (230) shows that different This causes a significant change in the geometric envelope (polar ray direction) of the data point cloud. Figure 2Existing technologies using single weights (single-point estimation) are prone to getting stuck in local phase blind zones, while scanning strategies can effectively cover the entire geometric structure and capture phases that are only visible at specific phases (such as...). or The sparse structure pattern that only becomes apparent when ( )
[0042] like Figure 3 As shown, Figure 3 This paper elucidates the internal mechanism of transforming multi-phase data into a unified feature representation. The left side of the figure shows multiple weighted sample point cloud cones with different polarimetric angles, generated by different weight configurations (corresponding to...). (etc.); if decomposed individually, they will produce incompatible basis vectors. The joint cone compression module (300) forces a uniform cone (310) by a shared optimization objective (by a shared basis matrix) through a shared optimization objective. Zhang Cheng) uses a phase cone that simultaneously wraps around or approximates all inputs. Geometrically, this unified cone... This constitutes the common envelope of all local phase cones, whose polar rays (i.e. The column vectors of the shared basis matrix thus incorporate the structural information of the entire domain. Subsequently, the shared basis matrix is processed by the row normalization module (330) to eliminate the difference in modulus caused by the different activity levels of each node, and finally outputs the embedding matrix (340). Figure 3 The explanation explains that by using algorithmic constraints, the instability caused by the cone phase transition is overcome, resulting in node vector representations that are robust to the weight parameters and contain rich semantics. .
[0043] The embodiments of this example have been described above. However, this example is not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms based on the guidance of this example, and all of them are within the protection scope of this example.
Claims
1. A vectorized representation method for knowledge graphs in the medical field, characterized in that, include: Acquire heterogeneous knowledge graph data stored in memory, extract multiple topological association data between the central node and other nodes, and convert it into a standardized heterogeneous association view dataset; generate a set of multi-channel fusion configuration parameters for detecting different data distribution patterns, the fusion configuration parameters covering a preset global data fusion space; The heterogeneous associated view dataset is weighted and aggregated using the multi-channel fusion configuration parameters to generate multiple joint observation data blocks corresponding to different structural patterns. A joint reconstruction computation task containing a common feature mapping model is established in memory. The common feature mapping model is used as a shared decoder for all the joint observation data blocks. Iterative optimization processing is performed to minimize the reconstruction error until the common feature mapping model converges to a state that can characterize the global structural features of all the joint observation data blocks. The converged common feature mapping model is parsed, the row feature data corresponding to the central node is extracted, a machine-readable node feature index table is generated and stored for information retrieval.
2. The knowledge graph vectorization representation method for the medical field according to claim 1, characterized in that, Acquire heterogeneous knowledge graph data stored in memory, extract multiple topological relationships between the central node and other nodes, and transform them into a standardized heterogeneous relationship view dataset, including: For each type of heterogeneous topological path in the heterogeneous knowledge graph, the number of path instances starting from the source center node, passing through intermediate entities, and reaching the target center node is counted. The total number of all path instances starting from the source center node is calculated, and the total number of path instances is divided by the sum of the total and a preset smoothing factor to obtain the original co-occurrence matrix. The original co-occurrence matrix is normalized using the Frobenius norm, and the square root of the sum of squares of all elements in the original co-occurrence matrix is calculated as the overall matrix norm. Each element in the original co-occurrence matrix is divided by the sum of the overall matrix norm and a preset view smoothing constant to obtain a normalized matrix column vector. The set of normalized matrix column vectors corresponding to all views is used as the standardized heterogeneous associated view dataset.
3. The knowledge graph vectorization representation method for the medical field according to claim 1, characterized in that, A set of multi-channel fusion configuration parameters is generated for detecting different data distribution patterns. These fusion configuration parameters cover a preset global data fusion space and include: A parameter set containing multiple deterministic vectors is constructed, where each vector represents a weighting scheme for different heterogeneous related view datasets. The parameter set includes a uniformly distributed parameter vector and multiple biased distributed parameter vectors. The uniformly distributed parameter vector has equal values in the dimensions corresponding to all heterogeneous related view datasets. The number of biased distributed parameter vectors is equal to the number of types of heterogeneous related view datasets. For a biased distributed parameter vector for a specific type of view, a dominant value determined by a preset bias coefficient is assigned in the dimension corresponding to that specific type of view, while non-dominant values determined by the preset bias coefficient are assigned in other dimensions to cover the boundary regions in the global data fusion space.
4. The knowledge graph vectorization representation method for the medical field according to claim 1, characterized in that, The heterogeneous associated view dataset is weighted and aggregated using the multi-channel fusion configuration parameters to generate multiple joint observation data blocks corresponding to different structural patterns, including: Iterate through each deterministic weight vector in the multi-channel fusion configuration parameter set. For each deterministic weight vector, perform the following operations: extract the component values corresponding to each type of heterogeneous associated view dataset from the deterministic weight vector, and calculate the arithmetic square root of the component values as a weighting scaling factor; use the weighting scaling factor to perform element-wise multiplication operations on the corresponding heterogeneous associated view datasets to obtain weighted feature view data; concatenate and stitch all weighted feature view data belonging to the same deterministic weight vector in the direction of the column vector to form a wide-dimensional joint observation data block, thereby generating multiple joint observation data blocks equal in number to the multi-channel fusion configuration parameter set.
5. The knowledge graph vectorization representation method for the medical field according to claim 1, characterized in that, Establish a joint reconstruction computation task in memory that includes a common feature mapping model, including: A joint nonnegative matrix factorization loss function is constructed, which consists of a reconstruction error term and a model regularization term. The reconstruction error term is defined as the sum of the reconstruction residuals of all jointly observed data blocks, where the reconstruction residual of each jointly observed data block is calculated as the square of the Frobenius norm between the product of the jointly observed data block and the common feature mapping model multiplied by a corresponding independent coefficient encoding matrix. The model regularization term is defined as the product of the square of the Frobenius norm of the common feature mapping model and a preset regularization coefficient. The joint reconstruction calculation task is defined as minimizing the value of the loss function under the constraint that the common feature mapping model and all independent coefficient encoding matrices are nonnegative.
6. The knowledge graph vectorization representation method for the medical field according to claim 5, characterized in that, The common feature mapping model is used as a shared decoder for all the jointly observed data blocks. Iterative optimization is performed to minimize the reconstruction error until the common feature mapping model converges to a state that can characterize the global structural features of all the jointly observed data blocks, including: S61, for each joint observation data block, update its corresponding independent coefficient encoding matrix using a multiplication update rule. The numerator of the multiplication update rule is the matrix product of the transpose of the common feature mapping model and the joint observation data block, and the denominator is the sum of the transpose of the common feature mapping model, the product of the common feature mapping model and the independent coefficient encoding matrix, and a preset coefficient smoothing factor. S62, update the common feature mapping model using the multiplicative update rule of global aggregation. The numerator of the multiplicative update rule of global aggregation is the sum of the matrix products of all joint observation data blocks and the transpose of their respective updated independent coefficient coding matrices. The denominator is the sum of the products of all common feature mapping models, the updated independent coefficient coding matrices and their transposes, plus the product of the preset regularization coefficient and the common feature mapping model and the preset model smoothing factor. S63, repeat S61 and S62 until the numerical change of the common feature mapping model is less than a preset threshold.
7. The knowledge graph vectorization representation method for the medical field according to claim 1, characterized in that, The converged common feature mapping model is analyzed, and the row feature data corresponding to the center node is extracted, including: Traverse each row vector in the common feature mapping model, where each row vector corresponds to a central node in the heterogeneous knowledge graph; calculate the Euclidean norm of the row vector, that is, calculate the arithmetic square root of the sum of squares of all elements in the row vector; divide each element in the row vector by the sum of the Euclidean norm and the preset row smoothing term to obtain the normalized row feature vector; arrange all the normalized row feature vectors in the index order of the central nodes to form the final matrix decomposition vector representation result.
8. The knowledge graph vectorization representation method for the medical field according to claim 1, characterized in that, Generate a machine-readable node feature index table, including: Each extracted normalized row feature data is mapped one-to-one with the unique identifier of the corresponding central node in the heterogeneous knowledge graph. A node feature index table containing the key-value mapping is constructed, where the index key is the unique identifier of the medical entity and the index value is the cross-phase stable multidimensional feature vector corresponding to the medical entity. The node feature index table is written into a non-volatile storage medium according to a preset serialization format so that downstream medical diagnostic auxiliary systems can read the corresponding multidimensional feature vector by querying the unique identifier.
Citation Information
Cited By
Screening method and system for key regulatory pathway subsets of large medical model
CN121790010A