A medical data completion method and related products

By constructing a medical knowledge graph and using graph convolutional layers for node representation learning, the problem of accuracy of missing values ​​in medical data is solved, thereby improving the completeness and usability of the dataset and supporting more accurate diagnosis and disease prevention.

CN116894155BActive Publication Date: 2026-05-29NEUSOFT CORP

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NEUSOFT CORP
Filing Date
2023-07-19
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing medical data completion methods cannot accurately restore missing values, leading to inaccurate diagnoses or incomplete treatment plans, thus affecting the integrity and usability of medical data.

Method used

A medical knowledge graph is constructed, and node representation learning is performed by aggregating information of adjacent nodes using graph convolutional layers. Missing values ​​are predicted and added to the target dataset through a medical data completion model.

Benefits of technology

It improved the accuracy and availability of medical data, restored the integrity of datasets, provided more accurate diagnostic and treatment support, and reduced the burden on doctors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116894155B_ABST
    Figure CN116894155B_ABST
Patent Text Reader

Abstract

The application discloses a medical data completion method and related products, and relates to the technical field of data processing. In the application, a medical knowledge graph corresponding to a target medical data set is constructed according to the characteristics or attributes of the data in the target medical data set and the relationship between the data; the medical knowledge graph is taken as the input of a medical data completion model, the prediction value of a tail entity to be predicted in the medical knowledge graph is obtained through the medical data completion model, and the prediction value of the tail entity to be predicted is supplemented to the position of the missing data corresponding in the target medical data set. Since the medical data completion method adopted in the application fully considers the complexity and correlation of the data in the medical data set, the prediction value obtained by the method is less different from the true value of the tail entity to be predicted, the problem that the traditional medical data completion method cannot obtain a medical data missing value with good accuracy is finally solved, the integrity of the medical data set is restored, and the usability of the medical data set is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method for medical data completion and related products. Background Technology

[0002] With the advent of the "data deluge" era, the medical field is rapidly developing towards digitalization, datafication, and informatization, resulting in the collection and storage of massive amounts of medical and health data. Analyzing real medical data collected daily, such as patient health status and treatment details, can provide effective data support for diagnosis, treatment, and disease prevention in actual medical processes, thereby reducing the burden on doctors and improving the quality of care.

[0003] However, due to irregular data collection, incomplete recording, or unstable transmission, a large amount of medical data is missing, severely affecting the integrity and usability of medical data information and limiting the development of medical technology innovation. Currently, missing values ​​in medical data can be supplemented through methods such as prior knowledge of distributions or clustering prediction of medical data. However, the former requires the data to be processed to have strong statistical distribution characteristics, while the latter may ignore the correlation between different features of medical data or fail to fully reflect the information between features.

[0004] Therefore, the theoretical values ​​of missing medical data obtained using traditional medical data completion methods differ significantly from the actual values. Using medical datasets completed using traditional methods to predict a patient's actual treatment process can lead to inaccurate diagnoses or incomplete treatment plans, negatively impacting patient health. Therefore, obtaining more accurate missing medical data values, restoring the integrity of medical datasets, and improving their usability have become pressing technical problems in the field. Summary of the Invention

[0005] To address the aforementioned issues, this application provides a medical data completion method and related products to obtain accurate missing values ​​in medical data, restore the integrity of medical datasets, and improve the usability of medical datasets.

[0006] The first aspect of this application provides a method for medical data completion, including:

[0007] Based on the characteristics or attributes of the data in the target medical dataset and the relationships between the data, a medical knowledge graph corresponding to the target medical dataset is constructed; the missing data in the target medical dataset corresponds to the tail entities to be predicted in the medical knowledge graph;

[0008] The medical knowledge graph is used as input to a medical data completion model, which obtains the predicted values ​​of tail entities to be predicted in the medical knowledge graph. The medical data completion model includes at least one graph convolutional layer, which is used to learn node representations based on data relationships by aggregating information of adjacent nodes in the medical knowledge graph. Two adjacent nodes include a head entity and a tail entity, and the edge between two adjacent nodes represents the relationship between the connected head entity and tail entity. The head entity and tail entity have different data features or attributes.

[0009] The predicted values ​​of the tail entities to be predicted are added to the positions of the missing data in the target medical dataset.

[0010] The training steps for the medical data completion model include:

[0011] Based on the characteristics or attributes of the data in the medical data sample set, and the relationships between the data, the data in the medical data sample set is structured to construct a sample medical knowledge graph corresponding to the medical data sample set.

[0012] The sample medical knowledge graph is input into the model to be trained, and the feature vector representation matrix of the sample medical knowledge graph is obtained through learning at least one graph convolutional layer in the model to be trained; the feature vector representation matrix includes a new feature vector representation formed by aggregating the information of each node in the sample medical knowledge graph after at least one graph convolutional layer.

[0013] The feature vector representation matrix and the relationship representation matrix of the sample medical knowledge graph are concatenated to obtain the concatenated matrix;

[0014] The tail entity matrix is ​​obtained by performing convolution, vectorization, and activation function processing on the concatenated matrix.

[0015] The predicted values ​​of the sample tail entities in the sample medical knowledge graph are obtained based on the solution results of the tail entity matrix.

[0016] Based on the difference between the predicted and actual values ​​of the sample tail entities in the sample medical knowledge graph, the parameters of the model to be trained are adjusted until the training is completed and the medical data completion model is obtained.

[0017] Optionally, the model to be trained includes a graph convolutional layer; the step of inputting the sample medical knowledge graph into the model to be trained, and obtaining the feature vector representation matrix of the sample medical knowledge graph through learning from at least one graph convolutional layer in the model to be trained, includes:

[0018] The initial feature vector representation of each node is extracted from the sample medical knowledge graph, and the set of neighboring nodes of each node is determined.

[0019] For the target node in the sample medical knowledge graph, a graph convolutional layer in the model to be trained obtains the first-order feature vector representation of the target node based on the number of neighboring nodes of the target node, the autocorrelation weight of the target node, the relationship weight between the target node and each of its neighboring nodes, the initial feature vector representation of the target node, and the initial feature vector representation of each of its neighboring nodes.

[0020] The feature vector representation matrix of the sample medical knowledge graph is obtained based on the first-order feature vector representation of each node in the sample medical knowledge graph.

[0021] Optionally, obtaining the first-order feature vector representation of the target node based on the number of neighboring nodes of the target node, the autocorrelation weight of the target node, the relationship weight between the target node and each of its neighboring nodes, the initial feature vector representation of the target node, and the initial feature vector representations of each of the target node's neighboring nodes includes:

[0022] The reciprocal of the number of neighboring nodes of the target node is used as the scaling factor corresponding to the target node;

[0023] The scaling factor, the initial feature vector representation of the target node's target neighbor nodes, and the relationship weight between the target node and the target neighbor nodes are multiplied together to obtain the cross-correlation term between the target node and the target neighbor nodes.

[0024] The cross-correlation terms between the target node and each of its neighboring nodes are accumulated to obtain the cumulative cross-correlation term result;

[0025] The autocorrelation weight of the target node is multiplied by the initial feature vector representation of the target node to obtain the autocorrelation term of the target node;

[0026] The sum of the cross-correlation terms and the sum of the autocorrelation terms are processed by an activation function to obtain the first-order feature vector representation of the target node.

[0027] Optionally, the model to be trained includes multiple graph convolutional layers, wherein the multiple graph convolutional layers include consecutively connected graph convolutional layers from layer 1 to layer N; N is the total number of graph convolutional layers in the model to be trained; the step of inputting the sample medical knowledge graph into the model to be trained, and obtaining the feature vector representation matrix of the sample medical knowledge graph through learning from at least one graph convolutional layer in the model to be trained, includes:

[0028] The initial feature vector representation of each node is extracted from the sample medical knowledge graph, and the set of neighboring nodes of each node is determined.

[0029] For a target node in the sample medical knowledge graph, the first-order feature vector representation of the target node is obtained by the first-layer graph convolutional layer in the model to be trained, based on the number of neighboring nodes of the target node, the weight matrix of the first-layer graph convolutional layer, the initial feature vector representation of the target node, and the initial feature vector representations of each neighboring node of the target node. The weight matrix of the first-layer graph convolutional layer includes the autocorrelation weights configured by the first-layer graph convolutional layer for the target node, and also includes the relation weights between the target node and each neighboring node configured by the first-layer graph convolutional layer.

[0030] For the target node, the Lth-order feature vector representation of the target node is obtained by the Lth-th graph convolutional layer in the model to be trained, based on the number of neighboring nodes of the target node, the weight matrix of the Lth-th graph convolutional layer, the L-1 order feature vector representation of the target node, and the L-1 order feature vector representations of each neighboring node of the target node; the weight matrix of the Lth-th graph convolutional layer includes the autocorrelation weights configured by the Lth-th graph convolutional layer for the target node, and also includes the relation weights between the target node and each neighboring node configured by the Lth-th graph convolutional layer; where L is an integer greater than 1 and less than or equal to N;

[0031] The feature vector representation matrix of the sample medical knowledge graph is obtained based on the N-order feature vector representation of each node in the sample medical knowledge graph.

[0032] Optionally, the model to be trained further includes a multilayer perceptron; obtaining the predicted value of the sample tail entity in the sample medical knowledge graph based on the solution result of the tail entity matrix includes:

[0033] The solution of the tail entity matrix is ​​used as the input of the multilayer perceptron, and the predicted value of the sample tail entity in the sample medical knowledge graph is obtained by the multilayer perceptron.

[0034] Optionally, the step of structuring the data in the medical data sample set according to the characteristics or attributes of the data and the relationships between the data, and constructing a sample medical knowledge graph corresponding to the medical data sample set, includes:

[0035] The data in the medical data sample set is structured into initial triples based on the characteristics or attributes of the data and the relationships between the data; wherein, in the initial triples, the head entity is the patient identifier, the entity relationship is the patient's indicator item, and the tail entity is the patient's indicator value under the indicator item.

[0036] Encode the head entity, entity relation, and tail entity in the initial triplet to obtain the encoded triplet corresponding to the initial triplet;

[0037] Based on multiple coded triples of the medical data sample set, a sample medical knowledge graph corresponding to the medical data sample set is constructed.

[0038] Optionally, constructing a medical knowledge graph corresponding to the target medical dataset based on the features or attributes of the data in the target medical dataset and the relationships between the data includes:

[0039] The data in the target medical dataset is structured according to the characteristics or attributes of the data and the relationships between the data into a triplet with the patient identifier as the head entity, the patient's indicator items as the entity relationship, and the patient's indicator value under the indicator item as the tail entity.

[0040] The head entity, entity relation, and tail entity in the structured triples of the target medical dataset are encoded to obtain the encoded triples of the target medical dataset.

[0041] A medical knowledge graph corresponding to the target medical dataset is constructed based on multiple encoded triples of the target medical dataset.

[0042] Optionally, encoding the head entity, entity relation, and tail entity in the initial triple to obtain the encoded triple corresponding to the initial triple includes:

[0043] Obtain the different patient identifiers in the medical data sample set, and construct the head entity set of the medical data sample set;

[0044] Obtain the indicator values ​​of each patient under different indicator items in the medical data sample set, and construct the tail entity set of the medical data sample set;

[0045] The entity encoding range is obtained by summing the number of head entities in the head entity set and the number of tail entities in the tail entity set;

[0046] Obtain different indicator items from the medical data sample set and construct a relation set for the medical data sample set;

[0047] The relation coding range is obtained based on the number of relation types in the relation set;

[0048] The head entity and tail entity in the initial triple are encoded according to the entity encoding range, and the entity relations in the initial triple are encoded according to the relation encoding range, to obtain the encoded triple corresponding to the initial triple.

[0049] A second aspect of this application provides a medical data completion device, the device comprising:

[0050] The data acquisition module is used to construct a medical knowledge graph corresponding to the target medical dataset based on the characteristics or attributes of the data in the target medical dataset and the relationships between the data; the missing data in the target medical dataset corresponds to the tail entities to be predicted in the medical knowledge graph;

[0051] The model processing module is used to take the medical knowledge graph as input to the medical data completion model, and obtain the predicted values ​​of the tail entities to be predicted in the medical knowledge graph through the medical data completion model. The medical data completion model includes at least one graph convolutional layer, which is used to achieve node representation learning based on the relationship between data by aggregating the information of adjacent nodes in the medical knowledge graph. Two adjacent nodes include a head entity and a tail entity, and the edge between two adjacent nodes represents the relationship between the connected head entity and tail entity. The head entity and the tail entity have different features or attributes.

[0052] The numerical completion module is used to fill in the missing data positions in the target medical dataset with the predicted values ​​of the tail entities to be predicted.

[0053] A third aspect of this application provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method provided in the first aspect.

[0054] A fourth aspect of this application provides an electronic device, comprising:

[0055] A memory on which computer programs are stored;

[0056] A processor for executing the computer program in the memory to implement the steps of the method provided in the first aspect.

[0057] Compared with the prior art, this application has the following beneficial effects:

[0058] The medical data completion method provided in this application constructs a medical knowledge graph corresponding to the target medical dataset based on the characteristics or attributes of the data in the target medical dataset and the relationships between the data; uses the medical knowledge graph as input to a medical data completion model, obtains the predicted values ​​of the tail entities to be predicted in the medical knowledge graph through the medical data completion model; and fills the positions of the missing data in the target medical dataset with the predicted values ​​of the tail entities to be predicted.

[0059] This application utilizes nodes and edges in a medical knowledge graph to represent data information in the target medical dataset and the relationships between data points. It aggregates information from adjacent nodes in the medical knowledge graph using at least one graph convolutional layer within the medical data completion model to achieve representation learning based on data relationships. Therefore, the medical data completion method employed in this application fully considers the complexity and relevance of the medical dataset, enabling the acquisition of predicted values ​​with minimal difference from the true values ​​of the tail entities to be predicted. Ultimately, it solves the problem that traditional medical data completion methods cannot obtain accurate missing values ​​for medical data, restoring the integrity of the medical dataset and improving its usability. This provides effective data support for diagnosis, treatment, and disease prevention in actual clinical practice, helping to reduce the burden on doctors and improve the quality of medical care. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0061] Figure 1 A flowchart illustrating a medical data completion method provided in this application embodiment;

[0062] Figure 2 A flowchart illustrating the training of a medical data completion model is provided in this application embodiment;

[0063] Figure 3 A flowchart illustrating how to obtain the feature vector representation matrix of a sample medical knowledge graph using a single graph convolutional layer, as provided in this application embodiment;

[0064] Figure 4 A flowchart illustrating how to obtain the feature vector representation matrix of a sample medical knowledge graph using a multi-layer graph convolutional layer is provided in this application embodiment;

[0065] Figure 5 A schematic diagram illustrating a multi-node representation learning method provided in an embodiment of this application;

[0066] Figure 6 This is a schematic diagram of a medical data completion method apparatus provided in an embodiment of this application. Detailed Implementation

[0067] In actual medical practice, medical data can provide useful information for diagnosis, treatment, and disease prevention. Through analysis and research, scientists and doctors can discover new medical models and treatment methods. However, due to irregular data collection, incomplete recording, or unstable transmission, a large amount of medical data is missing. Missing data affects the completeness and usability of medical information, leading to inaccurate diagnoses or inadequate treatment plans, thus negatively impacting patient health. It also hinders the progress of medical research and development, limiting doctors' and scientists' research and innovation in disease treatment and prevention.

[0068] To address the aforementioned issues, this application provides a medical data completion method. The method includes: constructing a medical knowledge graph corresponding to the target medical dataset based on the characteristics or attributes of the data in the target medical dataset and the relationships between the data; inputting the medical knowledge graph into a medical data completion model to obtain predicted values ​​for tail entities to be predicted in the medical knowledge graph; and supplementing the predicted values ​​of the tail entities to be predicted into the positions of the corresponding missing data in the target medical dataset. Because it fully considers the complexity and correlation of the data in the medical dataset, it can obtain predicted values ​​that are relatively close to the actual values ​​of the tail entities to be predicted. This ultimately solves the problem that traditional medical data completion methods cannot obtain accurate missing values ​​for medical data, restoring the integrity of the medical dataset and improving its usability.

[0069] The technical solution of this application will be described below with reference to the embodiments and accompanying drawings.

[0070] To facilitate understanding, before introducing the medical data completion method disclosed in this application, we will first introduce the characteristics of centralized data in clinical medical testing datasets and related knowledge graphs.

[0071] Clinical medical testing datasets are characterized by their diverse types, strong correlations, large volume, and complex structure. Clinical medical testing data includes patient identifiers, various sampling indicators, and the values ​​for each indicator. Furthermore, because clinical medical testing data undergoes multiple stages such as data collection, recording, and transmission before being stored in the hospital's information database, a significant amount of missing data is inevitable. The clinical medical testing dataset in this embodiment includes multiple sets of complete clinical medical testing data and multiple sets of clinical medical testing data with missing values.

[0072] Table 1 shows the clinical medical test data obtained from the hospital's data acquisition system. It should be noted that Table 1 only provides an illustrative overview of the sampling indicators that may be included in the clinical medical test data. Many other sampling indicators, such as systolic blood pressure, diastolic blood pressure, serum triglyceride levels, and serum total cholesterol, are not listed in Table 1. Furthermore, Table 1 does not list the units for the values ​​under each indicator; however, in actual use, each indicator value has its own corresponding unit, such as height in centimeters, blood pressure in millimeters of mercury, glucose in moles per liter, and weight in kilograms.

[0073] Table 1 Clinical Medical Testing Data

[0074] Patient identification age height diastolic blood pressure systolic blood pressure glucose … weight Patient_0001 62 152 78 Nan 5.14 … 49.5 Patient_0002 70 Nan 77 177 5.65 … 50.5 Patient_0003 53 166 90 139 8.81 … Nan Patient_0004 34 181 Nan 124 4.98 … 88 Patient_0005 36 167 66 120 5.1 … 105.5 … … … … … … … … Patient_n 45 173 108 175 16.55 … 117.5

[0075] As shown in Table 1, the clinical medical test dataset includes various information such as patient identification, age, height, diastolic blood pressure, systolic blood pressure, glucose, and weight. The patient identification, such as Patient_0001, is a unique identifier for the patient during their hospital visit; hospitals use different patient identification numbers to distinguish patients. Age, height, diastolic blood pressure, systolic blood pressure, glucose, and weight are sampling indicators for patients during clinical examinations at the hospital. Table 1 also includes the indicator values ​​for each sampling indicator for each patient; some of these indicator values ​​are missing. For example, patient Patient_0002 is 70 years old, height information is missing (shown as Nan in Table 1), diastolic blood pressure is 77 mmHg, systolic blood pressure is 177 mmHg, glucose is 6.65 mol / L, and weight is 50.5 kg.

[0076] In summary, clinical medical testing data encompasses a variety of data with different characteristics or attributes. This includes a patient's unique identifier within the hospital, such as their ID number; it also includes various test indicators for the patient during clinical medical testing, such as age, height, diastolic blood pressure, systolic blood pressure, glucose, and weight; and it further includes the values ​​for each test indicator, with different dimensions for different indicators. For the same patient, there are corresponding relationships between the values ​​of various sampling indicators, comprehensively reflecting the patient's health status.

[0077] A knowledge graph is a data processing method that maps real-world problems to mathematical problems; it is a special type of graph structure. A knowledge graph includes nodes and edges, where nodes represent entities or concepts in the physical world, and edges represent the relationships between entities. Knowledge graphs typically use a triple structure, including a head entity h, a relation r, and a tail entity t for data storage and representation. Generally, once the triple structure of a set of data is obtained, using the head entity h and the tail entity t as nodes in the knowledge graph, and the relation r as an edge, the knowledge graph for that data can be obtained.

[0078] Figure 1 This is a flowchart illustrating a medical data completion method provided in an embodiment of this application. Figure 1 The methods for completing medical data shown include:

[0079] Step 101: Based on the characteristics or attributes of the data in the target medical dataset and the relationships between the data, construct a medical knowledge graph corresponding to the target medical dataset.

[0080] The target medical dataset used in this step is taken from the clinical medical testing dataset mentioned above; it is a collection of data from the clinical medical testing dataset that contains missing values. Therefore, the characteristics or attributes of the data in the target medical dataset refer to the characteristics or attributes of the data in the clinical medical testing dataset.

[0081] The characteristics or attributes of the data can refer to a specific aspect of a patient's information, such as patient identification information; or to sampling indicators such as the patient's age, height, diastolic blood pressure, systolic blood pressure, glucose, and weight; or to the patient's indicator values ​​for each sampling indicator. In one possible scenario, constructing a medical knowledge graph corresponding to the target medical dataset based on its characteristics or attributes and the relationships between the data can be achieved through the following steps:

[0082] The data in the target medical dataset is structured according to the characteristics or attributes of the data and the relationships between the data into triples with patient identifiers as head entities, patient indicator items as entity relations, and patient indicator values ​​under indicator items as tail entities. The head entities, entity relations, and tail entities in the structured triples of the target medical dataset are encoded to obtain the encoded triples of the target medical dataset. A medical knowledge graph corresponding to the target medical dataset is constructed based on the multiple encoded triples of the target medical dataset.

[0083] Specifically, the patient identifiers in the target medical dataset, such as Patient_0001 and Patient_0002 in Table 1, are used as head entities; the indicator values ​​under the patient's indicator items, such as the indicator values ​​of 62 years old, 152 cm, and 578 mmHg in Table 1, are used as tail entities; the patient's indicator items, such as age, height, diastolic blood pressure, systolic blood pressure, glucose, and weight, are used as entity relations; and the data in the target medical dataset is structured into triples with patient identifiers as head entities, patient indicator items as entity relations, and patient indicator values ​​under the indicator items as tail entities.

[0084] Then, the head entity, entity relation, and tail entity in the structured triples of the target medical dataset are encoded to obtain the encoded triples of the target medical dataset.

[0085] In another possible scenario, the encoded triples of the target medical dataset can be obtained using the following steps:

[0086] Obtain the distinct patient identifiers from the target medical dataset and construct the head entity set of the target medical dataset; obtain the indicator values ​​of each patient under different indicator items from the target medical dataset and construct the tail entity set of the target medical dataset; obtain the entity encoding range based on the sum of the number of head entities in the head entity set and the number of tail entities in the tail entity set; obtain the distinct indicator items from the target medical dataset and construct the relation set of the target medical dataset; obtain the relation encoding range based on the number of relation types in the relation set; encode the head and tail entities in the triples according to the entity encoding range, and encode the entity relations in the triples according to the relation encoding range, to obtain the encoded triples corresponding to the triples.

[0087] Specifically, multiple patient identifiers are obtained, such as Patient_0001 and Patient_0002 in Table 1. These multiple patient identifiers are used as elements in the head entity to construct a head entity set. The indicator values ​​under the indicator items of multiple patients are obtained, such as 62 years old, 152 cm, and 578 mmHg in Table 1. These indicator values ​​are used as elements in the tail entity to construct a tail entity set.

[0088] Then, the number of header entities in the header entity set and the number of tail entities in the tail entity set are added together to obtain the entity encoding range. For example, if the header entity set contains 4080 header entity elements and the tail entity set contains 279987 tail entity elements, adding them together gives 284067 entity elements; therefore, following the encoding rule starting from 0 and increasing from small to large, the entity encoding range is obtained as 0-284066.

[0089] Obtain multiple patient metrics, such as age, height, diastolic blood pressure, systolic blood pressure, glucose, and weight. Use these patient metrics as elements in entity relations to construct an entity relation set. The relation coding range is obtained based on the number of elements in each relation within the set. For example, if the entity relation set has 70 metrics, following a coding rule starting from 0 and increasing in ascending order, the relation coding range is 0-69.

[0090] The head and tail entities in the triple are encoded using the entity encoding range of 0-284066; the entity relations are encoded using the relation encoding range of 0-69, resulting in the encoded triples. For example, the encoded triple (Patient_5, Age, 36) is (5, 0, 4084).

[0091] Finally, a medical knowledge graph corresponding to the target medical dataset is constructed based on multiple encoded triples of the target medical dataset.

[0092] After obtaining multiple encoded triples of the target medical dataset, the head entity data and tail entity data in the triples are used as nodes in the knowledge graph, and the relations in the triples are used as edges in the knowledge graph, thus obtaining the medical knowledge graph corresponding to the target medical dataset.

[0093] The medical knowledge graph corresponding to the target medical dataset, constructed through the steps described above, serves as the input data for the medical data completion model in this embodiment. It is precisely because the data in the target medical dataset is converted into a medical knowledge graph that the medical data completion model can handle diverse, highly correlated, and structurally complex medical data. Therefore, generating a medical knowledge graph corresponding to the target medical dataset is of great significance to the medical data completion method in this embodiment.

[0094] Step 102: Use the medical knowledge graph as input to the medical data completion model, and obtain the predicted values ​​of the tail entities to be predicted in the medical knowledge graph through the medical data completion model.

[0095] The medical data completion model includes at least one graph convolutional layer. The graph convolutional layer is used to learn node representations based on the relationships between data by aggregating information of adjacent nodes in the medical knowledge graph. The two adjacent nodes include a head entity and a tail entity. The edge between the two adjacent nodes represents the relationship between the connected head entity and tail entity. The head entity and tail entity have different data features or attributes.

[0096] The process of this step can be described in detail as follows: input the medical knowledge graph obtained in step 101 into the medical data completion model trained in this application; use the medical completion model to learn the node representation of multiple nodes in the medical knowledge graph, so that each node gathers rich information from other nodes in the medical knowledge graph; finally output the predicted value of the tail entity to be predicted in the medical knowledge graph.

[0097] For example, the clinical medical test data in Table 1 is used as the target medical dataset. Using the method in step 101, the clinical medical test data in Table 1 is structured into a triple structure of the target medical dataset. Then, the knowledge graph of the clinical medical test data in Table 1 is constructed using the triple information. For ease of introduction, the knowledge graph of the clinical medical test data in Table 1 is referred to as the target knowledge graph.

[0098] This target knowledge graph includes multiple nodes, each with multiple adjacent nodes connected by edges. For example, the target knowledge graph includes head entity nodes composed of multiple patient identifiers such as Patient_0001 and Patient_0002, tail entity nodes composed of parameters such as age (62 years), height (152 cm), and systolic blood pressure (78 mmHg), and edges composed of indicators such as age, height, and diastolic blood pressure. The target knowledge graph also contains missing values ​​due to incomplete recording or unstable transmission; for example, the systolic blood pressure value for Patient_0001 is missing.

[0099] After inputting the target knowledge graph containing missing values ​​into the medical data completion model, the predicted values ​​of the tail entities to be predicted in the medical knowledge graph can be obtained. For example, the specific value of the systolic blood pressure of Patient_0001 can be obtained.

[0100] It should be noted that this step only describes the process of using a medical completion model to obtain the predicted values ​​of the tail entities to be predicted in the medical knowledge graph. The subsequent parts of this application embodiment will describe in detail the process of using a medical data sample set to train the model to be trained and finally obtain the medical completion model. Step 103: Fill in the positions of the missing data in the target medical dataset with the predicted values ​​of the tail entities to be predicted.

[0101] The predicted values ​​of the tail entities from step 102 are then added to the corresponding missing data positions in the medical dataset to obtain the complete medical dataset. Specifically, the specific systolic blood pressure value of Patient_0001 is added to the clinical medical testing dataset in Table 1 to obtain the complete clinical medical testing dataset in Table 1.

[0102] It should be noted that the medical knowledge graph constructed using the method in step 101, corresponding to the target medical dataset, is an incomplete knowledge graph, with missing values ​​for multiple tail entities. After inputting this knowledge graph into the medical data completion model, it outputs the predicted values ​​for all tail entities in the medical knowledge graph; this includes the predicted values ​​for tail entities that need to be predicted, as well as the predicted values ​​for other tail entities. Then, the predicted values ​​for the tail entities that need to be predicted are extracted and used to fill in the missing data positions in the target medical dataset, thus obtaining the complete target medical dataset.

[0103] In summary, after determining the target medical dataset, the method in step 101 is used to structure the target medical dataset into triple information. That is, the various indicators, the indicator values ​​under the various indicators, and patient information in the target medical dataset are transformed into edge, tail, and head entities, respectively. Then, the structured triple information is used to construct a medical knowledge graph. The medical knowledge graph is used to express the complex data information in the target medical dataset and the interrelationships between the data information.

[0104] Using the method in step 102, the medical knowledge graph is input into the medical data completion model to obtain the predicted values ​​of the tail entities to be predicted in the medical knowledge graph, that is, to directly obtain the indicator values ​​of the missing indicator items in the target medical dataset.

[0105] The predicted values ​​of the tail entities obtained in step 102, i.e. the indicator values ​​under the missing indicator items in the target medical dataset, are filled back into the positions of the missing data in the target medical dataset to obtain the complete target medical dataset.

[0106] Therefore, by using the medical data completion method disclosed in the embodiments of this application, the indicator values ​​of missing indicator items in the target medical dataset can be obtained simply and efficiently, thereby obtaining the complete target medical dataset.

[0107] Meanwhile, since the medical data completion model used in this application includes at least one graph convolutional layer, the graph convolutional layer can aggregate the information of adjacent nodes in the medical knowledge graph and fully consider the complexity and relevance of the data in the medical dataset. Therefore, the medical data completion method of this application can obtain relatively accurate missing values ​​of medical data.

[0108] Therefore, the medical data completion method disclosed in this application can easily and efficiently obtain medical data missing values ​​with good accuracy, solving the problem that traditional medical data completion methods cannot obtain medical data missing values ​​with good accuracy, restoring the integrity of the medical dataset and improving its usability, providing effective data support for diagnosis, treatment and disease prevention in actual diagnosis and treatment, which is conducive to reducing the burden on doctors and improving the quality of diagnosis and treatment.

[0109] Figure 2 This is a flowchart illustrating a training model for medical data completion, provided as an embodiment of this application. Figure 2 As shown, the training steps for the medical data completion model include:

[0110] Step 201: Based on the characteristics or attributes of the data in the medical data sample set and the relationships between the data, perform structured processing on the data in the medical data sample set to construct a sample medical knowledge graph corresponding to the medical data sample set.

[0111] Both the medical data sample set and the target medical dataset are derived from the clinical medical testing dataset. Like the target medical dataset, the medical data sample set also includes various data with different characteristics or attributes, such as patient identifiers, multiple indicator items, and indicator values ​​under each indicator item; these data are interconnected. For specific data in the medical data sample set, please refer to Table 1 and the introduction to the target medical dataset in step 101; these details will not be repeated here.

[0112] The medical data sample contains both complete sets of clinical medical test data and sets with missing values. Some of the sets with missing values ​​can be recovered by tracing the data flow process within the hospital, while others are completely lost and cannot be retrieved.

[0113] In one possible implementation, the data in the medical data sample set is structured according to the characteristics or attributes of the data and the relationships between the data, to construct a sample medical knowledge graph corresponding to the medical data sample set, including:

[0114] The data in the medical data sample set is structured into initial triples based on the data's characteristics or attributes and the relationships between data. In each initial triple, the head entity is the patient identifier, the entity relation is the patient's indicator item, and the tail entity is the patient's indicator value under that indicator item. The head entity, entity relation, and tail entity in the initial triples are encoded to obtain the corresponding encoded triples. A sample medical knowledge graph is constructed based on multiple encoded triples from the medical data sample set. It is worth noting that the sample medical knowledge graph is an incomplete knowledge graph containing many missing values ​​for tail entities.

[0115] Specifically, the patient identifier in the medical data sample set is used as the head entity; the indicator value under the patient's indicator item is used as the tail entity; the patient's indicator item is used as the entity relation; and the data in the target medical dataset is structured into an initial triple with the patient identifier as the head entity, the patient's indicator item as the entity relation, and the patient's indicator value under the indicator item as the tail entity.

[0116] Then, according to the encoding rules recorded in step 102, the entity encoding range and relation encoding range are obtained respectively; the head entity and tail entity in the initial triple are encoded using the entity encoding range, and the entity relation in the initial triple is encoded using the relation encoding range, and finally the encoded triple corresponding to the initial triple is obtained.

[0117] It should be noted that the encoded triples corresponding to the initial triples can be divided into three groups: the first group serves as the training set for the model to be trained, the second group as the test set, and the third group as the validation set. The training set is used to train the model, the validation set is used to adjust the parameters in the model, and the test set is used to verify the accuracy of the model's output.

[0118] Finally, a medical knowledge graph corresponding to the medical dataset is constructed based on multiple encoded triples from the medical data sample set. Specifically, after obtaining multiple encoded triples from the medical data sample set, the head and tail entity data in the triples are used as nodes in the knowledge graph, and the relations in the triples are used as edges, thus obtaining the sample medical knowledge graph corresponding to the medical data sample set.

[0119] Step 202: Input the sample medical knowledge graph into the model to be trained, and obtain the feature vector representation matrix of the sample medical knowledge graph through learning from at least one graph convolutional layer in the model to be trained. The feature vector representation matrix includes new feature vector representations formed after information aggregation from each node in the sample medical knowledge graph through at least one graph convolutional layer.

[0120] There are two options for inputting sample medical knowledge graphs into the model to be trained. The first option is to input all data from the sample medical knowledge graph into the model, which then processes all the data to obtain a feature vector representation matrix containing all the data in the sample medical knowledge graph. The second option is to select a portion of the data from the sample medical knowledge graph as the training set, input the corresponding knowledge graph into the model, and then process the data in the training set to obtain a feature vector representation matrix containing all the data in the training set. Using the first option results in a large amount of training data, longer training time, and higher accuracy in the resulting medical data completion model. Using the second option results in a smaller amount of training data, shorter training time, and lower accuracy in the resulting medical data completion model.

[0121] In this step, the sample medical knowledge graph is input into the model to be trained to obtain the feature vector representation matrix of the sample medical knowledge graph. Since this feature vector representation matrix is ​​composed of new feature vector representations of multiple nodes in the sample medical knowledge graph, the process of the model to be trained processing the medical knowledge graph described in this step can be understood from two dimensions.

[0122] The first dimension starts from the perspective of a single target node in the sample medical knowledge graph, analyzing how a single target node in the sample medical knowledge graph obtains a new feature vector, and then combining the new feature vectors of multiple nodes to obtain the feature vector representation matrix of the sample medical knowledge graph.

[0123] The second dimension starts with the initial feature vector representation matrix, which is composed of the initial feature vector representations of all nodes in the sample medical knowledge graph, and analyzes the generation process of the feature vector representation matrix of the sample medical knowledge graph.

[0124] First, from the perspective of a single target node in the sample medical knowledge graph, we analyze how a single target node in the sample medical knowledge graph obtains a new feature vector. Then, we combine the new feature vectors of multiple nodes to obtain the feature vector representation matrix of the sample medical knowledge graph.

[0125] Figure 3 This is a flowchart illustrating how to obtain the feature vector representation matrix of a sample medical knowledge graph using a single graph convolutional layer, as provided in an embodiment of this application. Figure 3 It is known that, in one possible implementation, the model to be trained includes a graph convolutional layer; the step of inputting the sample medical knowledge graph into the model to be trained, and obtaining the feature vector representation matrix of the sample medical knowledge graph through learning from at least one graph convolutional layer in the model to be trained, includes:

[0126] Step a1: Extract the initial feature vector representation of each node from the sample medical knowledge graph and determine the set of neighboring nodes of each node;

[0127] After obtaining the sample medical knowledge graph, each node in the sample medical knowledge graph, including the head entity and the tail entity, is vectorized to obtain the initial feature vector representation of each node.

[0128] In the sample medical knowledge graph, the target node is connected to multiple other nodes via edges. These other nodes connected to the target node through edges form the target node's neighbor set. Each node in the sample medical knowledge graph has its own neighbor set. For a head entity node, i.e., a patient identifier, its neighbor set consists of the indicator values ​​under that indicator; for a tail entity node, its neighbor set consists of patient identifiers that possess that indicator.

[0129] Step b1: For the target node in the sample medical knowledge graph, a graph convolutional layer in the model to be trained obtains the first-order feature vector representation of the target node based on the number of neighboring nodes of the target node, the autocorrelation weight of the target node, the relationship weight between the target node and each of its neighboring nodes, the initial feature vector representation of the target node, and the initial feature vector representation of each of its neighboring nodes.

[0130] In one possible implementation, for a target node in the sample medical knowledge graph, the first-order feature vector representation of the target node is obtained from a graph convolutional layer in the model to be trained, according to formula (1):

[0131]

[0132] Where i represents the target node; R represents the set of relationships between the target node and its neighboring nodes; and r represents a relationship between the target node and its neighboring nodes. Let j represent the set of neighboring nodes of target node i; j represents One of the nodes, namely the target neighbor node as described below; It is a scaling factor. In one possible case, c can be the reciprocal of the number of nodes contained in the neighboring nodes of the target node i. i,j The value; It is the initial feature vector representation of the target neighbor nodes; It is the weight of the relationship between the target node and its neighboring nodes; It is the autocorrelation weight of the target node; It is the initial feature vector representation of the target node; σ is the first-order feature vector representation of the target node; σ is the activation function.

[0133] In determining the scaling factor c in formula (1) i,j Autocorrelation weights Relationship weight After obtaining the parameter values, the initial feature vector of the target node of the sample medical knowledge graph obtained in step a1 is represented. And the initial feature vector representation of each neighbor node in the set of neighbor nodes of the target node. After inputting the above formula, the first-order feature vector representation of the target node can be obtained.

[0134] As shown in formula (1), when using the graph convolutional layer to obtain the first-order feature vector representation of the target node, the information of all neighboring nodes of the target node in the sample medical knowledge graph is considered. That is, the graph convolutional layer aggregates the rich information of all neighboring nodes of the target node from the sample medical knowledge graph before finally generating the first-order feature vector representation of the target node.

[0135] Step c1: Obtain the feature vector representation matrix of the sample medical knowledge graph based on the first-order feature vector representation of each node in the sample medical knowledge graph.

[0136] After the operation in step b1, each node in the sample medical knowledge graph obtains its own first-order feature vector representation; the first-order feature vector representations of each node in the sample medical knowledge graph are combined to obtain the feature vector representation matrix of the sample medical knowledge graph.

[0137] Figure 4 This is a flowchart illustrating how a multi-layer graph convolutional layer is used to obtain the feature vector representation matrix of a sample medical knowledge graph, as provided in an embodiment of this application. Figure 4 As shown, in one possible implementation, the model to be trained includes multiple graph convolutional layers, wherein the multiple graph convolutional layers include consecutively connected graph convolutional layers from layer 1 to layer N; N is the total number of graph convolutional layers in the model to be trained; the sample medical knowledge graph is input into the model to be trained, and through learning from at least one graph convolutional layer in the model to be trained, the feature vector representation matrix of the sample medical knowledge graph is obtained, including...

[0138] Step a2: Extract the initial feature vector representation of each node from the sample medical knowledge graph and determine the set of neighboring nodes of each node.

[0139] Step a2 is the same as step a1. For details, please refer to the description in step a1. It will not be repeated here.

[0140] Step b2: For the target node in the sample medical knowledge graph, the first-order feature vector representation of the target node is obtained by the first-layer graph convolutional layer in the model to be trained, based on the number of neighboring nodes of the target node, the weight matrix of the first-layer graph convolutional layer, the initial feature vector representation of the target node, and the initial feature vector representations of each neighboring node of the target node; the weight matrix of the first-layer graph convolutional layer includes the autocorrelation weights configured by the first-layer graph convolutional layer for the target node, and also includes the relation weights between the target node and each neighboring node configured by the first-layer graph convolutional layer.

[0141] Step b2 is the same as step b1, and the details are described in step b1, so they will not be repeated here.

[0142] Step c2: For the target node, the Lth-order feature vector representation of the target node is obtained from the Lth-th graph convolutional layer in the model to be trained, based on the number of neighboring nodes of the target node, the weight matrix of the Lth-th graph convolutional layer, the L-1 order feature vector representation of the target node, and the L-1 order feature vector representations of each neighboring node of the target node; the weight matrix of the Lth-th graph convolutional layer includes the autocorrelation weights configured by the Lth-th graph convolutional layer for the target node, and also includes the relation weights between the target node and each neighboring node configured by the Lth-th graph convolutional layer; where L is an integer greater than 1 and less than or equal to N.

[0143] As described above, after inputting the initial feature vector representation of the target node in the sample medical knowledge graph into the first layer of the graph convolutional layer, the first-order feature vector representation of the target node is obtained after processing by the first layer of the graph convolutional layer. If the model to be trained contains multiple graph convolutional layers, the first-order feature vector representation of the target node is used as the input information of the second graph convolutional layer. After processing by the second graph convolutional layer, the second-order feature vector representation of the target node is obtained. Similarly, for the model to be trained containing L graph convolutional layers, the (L-1)th-order feature vector representation of the target node is used as the input of the Lth graph convolutional layer. After processing by the Lth graph convolutional layer, the Lth-order feature vector representation of the target node is finally obtained.

[0144] The above process can be expressed by the following formula (2):

[0145]

[0146] Where i represents the target node; R represents the set of relationships between the target node and its neighboring nodes; and r represents a relationship between the target node and its neighboring nodes. Let j represent the set of neighboring nodes of target node i; j represents One of the nodes, namely the target neighbor node as described below; It is the scaling factor; It is the L-1 layer feature vector representation of the target neighbor nodes; It is the weight of the (L-1)th layer relationship between the target node and its neighboring nodes; It is the L-1 layer autocorrelation weight of the target node; σ is the feature vector representation of the target node at layer L(1); σ is the activation function.

[0147] Step d2: Obtain the feature vector representation matrix of the sample medical knowledge graph based on the N-order feature vector representation of each node in the sample medical knowledge graph.

[0148] Step d2 is the same as step c1, and the details are described in step c1, so they will not be repeated here.

[0149] It should be noted that the process by which each node in the medical knowledge graph obtains its feature vector representation is the same as the process by which the target node obtains its feature vector representation.

[0150] Figure 5 This is a schematic diagram of a multi-node representation learning method provided in an embodiment of this application. Figure 5 This vividly illustrates the process by which numerous nodes in a medical knowledge graph simultaneously undergo graph convolutional layer operations to obtain feature vector representations.

[0151] Figure 5 In the diagram, circular points represent the initial feature vector representations of multiple nodes in the medical knowledge graph, while square points represent the Lth-order feature vector representations of multiple nodes in the medical knowledge graph, where L is an integer greater than or equal to 1.

[0152] After the feature vector composed of multiple nodes of the sample medical knowledge graph is input into the medical data completion model in this application, the multiple nodes simultaneously undergo aggregation processing through the L-layer graph convolutional layer in the medical data completion model, finally outputting the L-th order feature vector representation of the multiple nodes of the sample medical knowledge graph. In this process, multiple nodes simultaneously aggregate the information of their neighboring nodes and update their own feature vector representation, ultimately obtaining the L-th order feature vector representation of the multiple nodes.

[0153] The following analysis focuses on the second dimension, namely the initial feature vector representation matrix composed of the initial vector representations of all nodes in the sample medical knowledge graph, to analyze the generation process of the feature vector representation matrix of the sample medical knowledge graph.

[0154] The above process can be expressed by formula (3):

[0155]

[0156] in, A represents the adjacency matrix in the Lth layer of the initial feature vector representation of the sample medical knowledge graph; I N Represents the identity matrix; yes The degree matrix; diagonal elements A ij Let A represent the weight of the edge from node i to node j. If i = j, then A... ij =1; W (L) H represents the weights of the Lth layer of the initial eigenvector matrix; (L) The output feature vector representation matrix of the Lth layer of the medical knowledge graph of the representative sample; H (L-1)The output feature vector representation matrix of the (L-1)th layer of the medical knowledge graph of the representative sample; H (0) σ represents the initial feature vector matrix of the medical knowledge graph of the sample; σ is the activation function. In the embodiments of this application, ReLU is used as the activation function. In practical applications, other formulas can also be selected as activation functions according to the needs of use.

[0157] Step 203: Concatenate the feature vector representation matrix and the relationship representation matrix of the sample medical knowledge graph to obtain the concatenated matrix.

[0158] The feature vector representation matrix of the sample medical knowledge graph obtained in step 202 is concatenated with the representation matrix of the sample medical knowledge graph to obtain the concatenated matrix. Here, the relation representation matrix of the sample medical knowledge graph refers to the matrix expression obtained by abstracting and quantifying the indicator items representing the relationships between nodes in the sample medical data.

[0159] Step 204: By performing convolution, vectorization, and activation function processing on the concatenated matrix, the tail entity matrix solution is obtained.

[0160] Using formula (4), the concatenated matrix is ​​processed by convolution, vectorization and activation function to obtain the solution of the tail entity matrix.

[0161] Y output =σ(vec(σ(Y) ALL *ω))) (4)

[0162] Among them, Y ALL Y represents the concatenated matrix obtained in step 203; ω is the convolution kernel, vec(·) is the operation of expanding the matrix into a vector, and σ is the activation function; output It is the eigenvector representation of the tail entity matrix.

[0163] For matrix Y ALL The matrix after the first activation is obtained by multiplying the matrix with the convolution kernel ω. Then, the matrix after the first activation is expanded into a vector using vec(·). The vector is then activated a second time using an activation function (i.e., the outermost activation in formula (4)). Finally, Y is obtained. output That is, the solution result of the tail entity matrix obtained by using the head entity matrix and the correspondence matrix is ​​obtained.

[0164] It should be noted that a subset of data containing complete information is selected from the medical data sample set mentioned above as the tail entity of the sample; the tail entity has a true value. The true value of the tail entity can be compared with the predicted value of the tail entity to determine the training level of the model to be trained. Based on the difference between the true value and the predicted value, the parameters of the model to be trained are adjusted using a loss function, and finally, the model is validated using medical data.

[0165] Step 205: Obtain the predicted value of the sample tail entity in the sample medical knowledge graph based on the solution result of the tail entity matrix.

[0166] In one possible scenario, the model to be trained further includes a multilayer perceptron; obtaining the predicted values ​​of the sample tail entities in the sample medical knowledge graph based on the solution result of the tail entity matrix includes:

[0167] The tail entity matrix solution is used as input to a multilayer perceptron, which then predicts the tail entities in the sample medical knowledge graph.

[0168] Taking one tail entity j in the tail entity matrix as an example, the process of using a multilayer perceptron to solve for the predicted value of a single tail entity j in the tail entity matrix can be represented by the following formula (5):

[0169] y final,j =f(wy output,j +b) (5)

[0170] Where w represents the weight, b represents the offset, and y output,j y represents tail entity j in the tail entity matrix; f represents the process by which the multilayer perceptron solves for the predicted value of a single tail entity j in the tail entity matrix. final,j The predicted value represents the tail entity j.

[0171] Step 206: Based on the difference between the predicted and actual values ​​of the sample tail entities in the sample medical knowledge graph, adjust the parameters of the model to be trained until the training is completed and the medical data completion model is obtained.

[0172] The predicted values ​​of tail entities in the sample medical knowledge graph are compared with the actual values ​​of the tail entities. The parameters in the model to be trained are adjusted using the mean squared error loss function. When the difference between the predicted value and the actual value is controlled within a preset range, the training of the model to be trained is stopped, and the medical data completion model is obtained.

[0173] The expression for the mean squared error loss function is given by formula (6):

[0174]

[0175] Where n represents the number of sample tail entities in the sample knowledge graph; t j y represents the true value of entity j in the sample tail; final,j The predicted value represents the tail entity j of the sample; MSELoss(t,y) final ) represents the mean of the sum of squares of the errors between the predicted and actual values ​​of entity j in the sample tail.

[0176] In summary, steps 201 to 206 detail the process of training the model to be trained using a medical data sample set to obtain a medical data completion model. This process, on the one hand, structures the diverse, feature- or attribute-different, and strongly correlated medical data in the medical data sample set into triplet data, and uses the aforementioned triplet data to construct a sample medical knowledge graph, thus processing the complex medical data sample set. On the other hand, the medical data completion model obtained in this embodiment contains at least one graph convolutional layer. Because the graph convolutional layer can perform convolution operations on the neighboring nodes of each node, each node gathers rich information from other nodes in the sample medical knowledge graph; thereby taking into account the interrelationships between data in the medical data sample set, it can ultimately output highly accurate predicted values ​​for the tail entities to be predicted.

[0177] Therefore, the medical data completion model adopted in this application fully considers the complexity and correlation of data in the medical dataset, and can obtain predicted values ​​with small differences from the true values ​​of the tail entities to be predicted. Ultimately, it solves the problem that traditional medical data completion methods cannot obtain medical data missing values ​​with good accuracy, restores the integrity of the medical dataset and improves its usability, and provides effective data support for diagnosis, treatment and disease prevention in actual diagnosis and treatment, which is conducive to reducing the burden on doctors and improving the quality of diagnosis and treatment.

[0178] Based on the methods provided in the foregoing embodiments, this application also provides a medical data completion device. The specific implementation of this device will be described below with reference to embodiments and accompanying drawings.

[0179] See Figure 6 This figure is a schematic diagram of the structure of a medical data completion device provided in an embodiment of this application. Figure 6 The medical data completion device 600 shown includes:

[0180] The data acquisition module 601 is used to construct a medical knowledge graph corresponding to the target medical dataset based on the characteristics or attributes of the data in the target medical dataset and the relationships between the data; the missing data in the target medical dataset corresponds to the tail entities to be predicted in the medical knowledge graph;

[0181] The model processing module 602 is used to take the medical knowledge graph as input to the medical data completion model, and obtain the predicted values ​​of the tail entities to be predicted in the medical knowledge graph through the medical data completion model; the medical data completion model includes at least one graph convolutional layer, which is used to achieve node representation learning based on the relationship between data by aggregating the information of adjacent nodes in the medical knowledge graph; two adjacent nodes include head entities and tail entities, and the edge between two adjacent nodes represents the relationship between the connected head entity and tail entity, and the head entity and tail entity have different data features or attributes;

[0182] The numerical completion module 603 is used to supplement the predicted values ​​of tail entities to be predicted into the positions of the missing data in the target medical dataset.

[0183] In one possible implementation, the apparatus for acquiring a medical data completion model includes:

[0184] The sample data acquisition module is used to perform structured processing on the data in the medical data sample set according to the characteristics or attributes of the data and the relationships between the data, and to construct a sample medical knowledge graph corresponding to the medical data sample set.

[0185] The feature vector generation module is used to input the sample medical knowledge graph into the model to be trained, and obtain the feature vector representation matrix of the sample medical knowledge graph through learning from at least one graph convolutional layer in the model to be trained; the feature vector representation matrix includes a new feature vector representation formed by aggregating the information of each node in the sample medical knowledge graph after passing through at least one graph convolutional layer.

[0186] The matrix concatenation module is used to concatenate the feature vector representation matrix and the relationship representation matrix of the sample medical knowledge graph to obtain the concatenated matrix.

[0187] The matrix solving module is used to obtain the tail entity matrix solution result by performing convolution, vectorization and activation function processing on the concatenated matrix;

[0188] The prediction value acquisition module is used to obtain the prediction value of the sample tail entity in the sample medical knowledge graph based on the solution result of the tail entity matrix.

[0189] The backpropagation module is used to adjust the parameters of the model to be trained based on the difference between the predicted and actual values ​​of the sample tail entities in the sample medical knowledge graph, until the training is completed and the medical data completion model is obtained.

[0190] In one possible implementation, the feature vector generation module may include:

[0191] The first node acquisition unit is used to extract the initial feature vector representation of each node from the sample medical knowledge graph and determine the set of neighboring nodes of each node.

[0192] The first vector generation unit is used to generate a first-order feature vector representation of a target node in the sample medical knowledge graph by using a graph convolutional layer in the model to be trained, based on the number of neighboring nodes of the target node, the autocorrelation weight of the target node, the relationship weight between the target node and each of its neighboring nodes, the initial feature vector representation of the target node, and the initial feature vector representation of each of the target node's neighboring nodes.

[0193] The first matrix generation unit is used to obtain the feature vector representation matrix of the sample medical knowledge graph based on the first-order feature vector representation of each node in the sample medical knowledge graph.

[0194] In one possible implementation, the first vector generation unit includes:

[0195] The coefficient acquisition subunit is used to take the reciprocal of the number of neighboring nodes of the target node as the scaling factor corresponding to the target node;

[0196] A cross-correlation term generation subunit is used to multiply the scaling factor, the initial feature vector representation of the target node's target neighbor nodes, and the relationship weight between the target node and the target neighbor nodes to obtain the cross-correlation term between the target node and the target neighbor nodes;

[0197] The cumulative result acquisition subunit is used to accumulate the cross-correlation terms between the target node and each of the target node's neighboring nodes to obtain the cumulative cross-correlation term result;

[0198] The autocorrelation term generation sub-unit is used to multiply the autocorrelation weight of the target node and the initial feature vector representation of the target node to obtain the autocorrelation term of the target node;

[0199] A first-order vector generation subunit is used to process the sum of the cross-correlation terms and the autocorrelation terms using an activation function to obtain the first-order feature vector representation of the target node.

[0200] In one possible implementation, the feature vector generation module may include:

[0201] The second node acquisition unit is used to extract the initial feature vector representation of each node from the sample medical knowledge graph and determine the set of neighboring nodes of each node.

[0202] The second vector generation unit is used to generate a first-order feature vector representation of a target node in the sample medical knowledge graph, using the first-layer graph convolutional layer of the model to be trained, based on the number of neighboring nodes of the target node, the weight matrix of the first-layer graph convolutional layer, the initial feature vector representation of the target node, and the initial feature vector representations of each neighboring node of the target node. The weight matrix of the first-layer graph convolutional layer includes the autocorrelation weights configured by the first-layer graph convolutional layer for the target node, and also includes the relation weights between the target node and each neighboring node configured by the first-layer graph convolutional layer.

[0203] The third vector generation unit is used to, for the target node, obtain the L-th order feature vector representation of the target node from the L-th graph convolutional layer in the model to be trained, based on the number of neighboring nodes of the target node, the weight matrix of the L-th graph convolutional layer, the L-1 order feature vector representation of the target node, and the L-1 order feature vector representations of each neighboring node of the target node; the weight matrix of the L-th graph convolutional layer includes the autocorrelation weights configured by the L-th graph convolutional layer for the target node, and also includes the relation weights between the target node and each neighboring node configured by the L-th graph convolutional layer; where L is an integer greater than 1 and less than or equal to N;

[0204] The first matrix acquisition unit is used to obtain the feature vector representation matrix of the sample medical knowledge graph based on the N-order feature vector representation of each node in the sample medical knowledge graph.

[0205] In one possible implementation, the sample data acquisition module includes:

[0206] The initial triplet acquisition unit is used to structure the data in the medical data sample set into initial triplets based on the characteristics or attributes of the data and the relationships between the data; wherein, in the initial triplet, the head entity is the patient identifier, the entity relationship is the patient's indicator item, and the tail entity is the patient's indicator value under the indicator item.

[0207] The encoded triplet acquisition unit is used to encode the head entity, entity relation and tail entity in the initial triplet respectively to obtain the encoded triplet corresponding to the initial triplet;

[0208] The sample medical knowledge graph generation unit is used to construct a sample medical knowledge graph corresponding to the medical data sample set based on multiple encoded triples of the medical data sample set.

[0209] In one possible implementation, the data acquisition module 601 includes:

[0210] The structured processing unit is used to structure the data in the target medical dataset according to the characteristics or attributes of the data and the relationships between the data into a triplet with the patient identifier as the head entity, the patient's indicator items as the entity relationship, and the patient's indicator value under the indicator item as the tail entity.

[0211] The entity number encoding unit is used to encode the head entity, entity relation and tail entity in the structured triples of the target medical dataset respectively, so as to obtain the encoded triples of the target medical dataset;

[0212] The first graph generation unit is used to construct a medical knowledge graph corresponding to the target medical dataset based on multiple encoded triples of the target medical dataset.

[0213] In one possible implementation, the encoded triplet acquisition unit includes:

[0214] The head entity generation subunit is used to obtain different patient identifiers in the medical data sample set and construct the head entity set of the medical data sample set.

[0215] The tail entity generation subunit is used to obtain the indicator values ​​of each patient under different indicator items in the medical data sample set and construct the tail entity set of the medical data sample set.

[0216] The first encoding generation subunit is used to obtain the entity encoding range based on the sum of the number of head entities in the head entity set and the number of tail entities in the tail entity set;

[0217] A relation set generation subunit is used to obtain different indicator items in the medical data sample set and construct the relation set of the medical data sample set.

[0218] The second encoding generation subunit is used to obtain the relation encoding range based on the number of types of relations in the relation set;

[0219] The triplet generation subunit is used to encode the head entity and tail entity in the initial triplet according to the entity encoding range, and to encode the entity relationship in the initial triplet according to the relationship encoding range, so as to obtain the encoded triplet corresponding to the initial triplet.

[0220] Based on the medical data completion method and apparatus provided in the foregoing embodiments, this application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements some or all of the steps in the aforementioned medical data completion method.

[0221] Based on the medical data completion method and apparatus provided in the foregoing embodiments, this application also provides an electronic device, including:

[0222] A memory on which computer programs are stored;

[0223] A processor is configured to execute the computer program stored in the memory to implement the medical data completion method and apparatus provided in the foregoing embodiments.

[0224] The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for medical data completion, characterized in that, include: The data in the target medical dataset is structured into triples based on the data's features or attributes and the relationships between the data, thus constructing a medical knowledge graph corresponding to the target medical dataset. The missing data in the target medical dataset corresponds to tail entities to be predicted in the medical knowledge graph. The data in the target medical dataset includes patient identifiers and indicator values ​​under indicator items when patients undergo clinical examinations in the hospital. In the triples, the patient identifier is the head entity, the patient's indicator items are the entity relationships, and the patient's indicator values ​​under the indicator items are the tail entities. The medical knowledge graph is used as input to a medical data completion model, which obtains the predicted values ​​of tail entities to be predicted in the medical knowledge graph. The medical data completion model includes at least one graph convolutional layer, which is used to learn node representations based on data relationships by aggregating information of adjacent nodes in the medical knowledge graph. Two adjacent nodes include a head entity and a tail entity, and the edge between two adjacent nodes represents the relationship between the connected head entity and tail entity. The head entity and tail entity have different features or attributes. The predicted value of the tail entity to be predicted is the indicator value of the missing indicator item in the target medical dataset. The predicted values ​​of the tail entities to be predicted are added to the positions of the missing data in the target medical dataset. The training steps of the medical data completion model include: Based on the characteristics or attributes of the data in the medical data sample set, and the relationships between the data, the data in the medical data sample set is structured to construct a sample medical knowledge graph corresponding to the medical data sample set. The sample medical knowledge graph is input into the model to be trained, and the feature vector representation matrix of the sample medical knowledge graph is obtained through learning by at least one graph convolutional layer in the model to be trained; the feature vector representation matrix includes a new feature vector representation formed by aggregating the information of each node in the sample medical knowledge graph after at least one graph convolutional layer; the model to be trained includes a multilayer perceptron. The feature vector representation matrix and the relationship representation matrix of the sample medical knowledge graph are concatenated to obtain the concatenated matrix; The tail entity matrix is ​​obtained by performing convolution, vectorization, and activation function processing on the concatenated matrix. The solution of the tail entity matrix is ​​used as the input of the multilayer perceptron, and the predicted value of the sample tail entity in the sample medical knowledge graph is obtained by the multilayer perceptron. Based on the difference between the predicted and actual values ​​of the sample tail entities in the sample medical knowledge graph, the parameters of the model to be trained are adjusted until the training is completed and the medical data completion model is obtained.

2. The medical data completion method according to claim 1, characterized in that, The model to be trained includes a graph convolutional layer; the step of inputting the sample medical knowledge graph into the model to be trained, and obtaining the feature vector representation matrix of the sample medical knowledge graph through learning from at least one graph convolutional layer in the model to be trained, includes: The initial feature vector representation of each node is extracted from the sample medical knowledge graph, and the set of neighboring nodes of each node is determined. For the target node in the sample medical knowledge graph, a graph convolutional layer in the model to be trained obtains the first-order feature vector representation of the target node based on the number of neighboring nodes of the target node, the autocorrelation weight of the target node, the relationship weight between the target node and each of its neighboring nodes, the initial feature vector representation of the target node, and the initial feature vector representation of each of its neighboring nodes. The feature vector representation matrix of the sample medical knowledge graph is obtained based on the first-order feature vector representation of each node in the sample medical knowledge graph.

3. The medical data completion method according to claim 2, characterized in that, The step of obtaining the first-order feature vector representation of the target node based on the number of neighboring nodes of the target node, the autocorrelation weight of the target node, the relationship weight between the target node and each of its neighboring nodes, the initial feature vector representation of the target node, and the initial feature vector representations of each of the target node's neighboring nodes includes: The reciprocal of the number of neighboring nodes of the target node is used as the scaling factor corresponding to the target node; The scaling factor, the initial feature vector representation of the target node's target neighbor nodes, and the relationship weight between the target node and the target neighbor nodes are multiplied together to obtain the cross-correlation term between the target node and the target neighbor nodes. The cross-correlation terms between the target node and each of its neighboring nodes are accumulated to obtain the cumulative cross-correlation term result; The autocorrelation weight of the target node is multiplied by the initial feature vector representation of the target node to obtain the autocorrelation term of the target node; The sum of the cross-correlation terms and the sum of the autocorrelation terms are processed by an activation function to obtain the first-order feature vector representation of the target node.

4. The medical data completion method according to claim 1, characterized in that, The model to be trained includes multiple graph convolutional layers, wherein the multiple graph convolutional layers include consecutively connected graph convolutional layers from layer 1 to layer N; N is the total number of graph convolutional layers in the model to be trained; the step of inputting the sample medical knowledge graph into the model to be trained, and obtaining the feature vector representation matrix of the sample medical knowledge graph through learning from at least one graph convolutional layer in the model to be trained, includes: The initial feature vector representation of each node is extracted from the sample medical knowledge graph, and the set of neighboring nodes of each node is determined. For a target node in the sample medical knowledge graph, the first-order feature vector representation of the target node is obtained by the first-layer graph convolutional layer in the model to be trained, based on the number of neighboring nodes of the target node, the weight matrix of the first-layer graph convolutional layer, the initial feature vector representation of the target node, and the initial feature vector representations of each neighboring node of the target node. The weight matrix of the first-layer graph convolutional layer includes the autocorrelation weights configured by the first-layer graph convolutional layer for the target node, and also includes the relation weights between the target node and each neighboring node configured by the first-layer graph convolutional layer. For the target node, the Lth-order feature vector representation of the target node is obtained by the Lth-th graph convolutional layer in the model to be trained, based on the number of neighboring nodes of the target node, the weight matrix of the Lth-th graph convolutional layer, the L-1 order feature vector representation of the target node, and the L-1 order feature vector representations of each neighboring node of the target node; the weight matrix of the Lth-th graph convolutional layer includes the autocorrelation weights configured by the Lth-th graph convolutional layer for the target node, and also includes the relation weights between the target node and each neighboring node configured by the Lth-th graph convolutional layer; where L is an integer greater than 1 and less than or equal to N; The feature vector representation matrix of the sample medical knowledge graph is obtained based on the N-order feature vector representation of each node in the sample medical knowledge graph.

5. The medical data completion method according to claim 1, characterized in that, The step of structuring the data in the medical data sample set according to its characteristics or attributes and the relationships between data, and constructing a sample medical knowledge graph corresponding to the medical data sample set, includes: The data in the medical data sample set are structured into initial triples based on the characteristics or attributes of the data and the relationships between the data. Encode the head entity, entity relation, and tail entity in the initial triplet to obtain the encoded triplet corresponding to the initial triplet; Based on multiple coded triples of the medical data sample set, a sample medical knowledge graph corresponding to the medical data sample set is constructed.

6. The medical data completion method according to claim 5, characterized in that, The step of structuring the data in the target medical dataset into triples based on the data's features or attributes and the relationships between the data, and constructing a medical knowledge graph corresponding to the target medical dataset, includes: The head entity, entity relation, and tail entity in the structured triples of the target medical dataset are encoded to obtain the encoded triples of the target medical dataset. A medical knowledge graph corresponding to the target medical dataset is constructed based on multiple encoded triples of the target medical dataset.

7. The medical data completion method according to claim 5 or 6, characterized in that, The step of encoding the head entity, entity relation, and tail entity in the initial triplet to obtain the encoded triplet corresponding to the initial triplet includes: Obtain the different patient identifiers in the medical data sample set, and construct the head entity set of the medical data sample set; Obtain the indicator values ​​of each patient under different indicator items in the medical data sample set, and construct the tail entity set of the medical data sample set; The entity encoding range is obtained by summing the number of head entities in the head entity set and the number of tail entities in the tail entity set; Obtain different indicator items from the medical data sample set and construct a relation set for the medical data sample set; The relation coding range is obtained based on the number of relation types in the relation set; The head entity and tail entity in the initial triple are encoded according to the entity encoding range, and the entity relations in the initial triple are encoded according to the relation encoding range, to obtain the encoded triple corresponding to the initial triple.

8. A medical data completion device, characterized in that, include: The data acquisition module is used to structure the data in the target medical dataset into triples based on the characteristics or attributes of the data and the relationships between the data, and to construct a medical knowledge graph corresponding to the target medical dataset. The missing data in the target medical dataset corresponds to the tail entities to be predicted in the medical knowledge graph. The data in the target medical dataset includes patient identifiers and indicator values ​​under indicator items when patients undergo clinical examinations in the hospital. In the triples, the patient identifier is the head entity, the patient's indicator items are the entity relationships, and the patient's indicator values ​​under the indicator items are the tail entities. The model processing module is used to take the medical knowledge graph as input to a medical data completion model, and obtain the predicted values ​​of the tail entities to be predicted in the medical knowledge graph through the medical data completion model. The medical data completion model includes at least one graph convolutional layer, which is used to achieve node representation learning based on data relationships by aggregating the information of adjacent nodes in the medical knowledge graph. Two adjacent nodes include a head entity and a tail entity, and the edge between two adjacent nodes represents the relationship between the connected head entity and tail entity. The head entity and tail entity have different features or attributes. The predicted value of the tail entity to be predicted is the indicator value under the missing indicator item in the target medical dataset. The numerical completion module is used to fill in the missing data positions in the target medical dataset with the predicted values ​​of the tail entities to be predicted. The sample data acquisition module is used to perform structured processing on the data in the medical data sample set according to the characteristics or attributes of the data and the relationships between the data, and to construct a sample medical knowledge graph corresponding to the medical data sample set. The feature vector generation module is used to input the sample medical knowledge graph into the model to be trained, and obtain the feature vector representation matrix of the sample medical knowledge graph through learning from at least one graph convolutional layer in the model to be trained; the feature vector representation matrix includes a new feature vector representation formed by aggregating the information of each node in the sample medical knowledge graph after at least one graph convolutional layer; the model to be trained also includes a multilayer perceptron. The matrix concatenation module is used to concatenate the feature vector representation matrix and the relationship representation matrix of the sample medical knowledge graph to obtain the concatenated matrix. The matrix solving module is used to obtain the tail entity matrix solution result by performing convolution, vectorization and activation function processing on the concatenated matrix; The prediction value acquisition module is used to take the solution result of the tail entity matrix as the input of the multilayer perceptron, and use the multilayer perceptron to predict the predicted value of the sample tail entity in the sample medical knowledge graph. The backpropagation module is used to adjust the parameters of the model to be trained based on the difference between the predicted and actual values ​​of the sample tail entities in the sample medical knowledge graph, until the training is completed and the medical data completion model is obtained.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method described in any one of claims 1-7.

10. An electronic device, characterized in that, include: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the method according to any one of claims 1-7.