Method and device for automatically filling missing values of medical time series data

CN117894420BActive Publication Date: 2026-08-18TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410052499.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-12
Publication Date
2026-08-18
Estimated Expiration
2044-01-12

AI Technical Summary

Technical Problem

填充的方法包括统计方式填充和机器学习填充,统计学习填充方式难以捕获时序数据的内在规律,难以生成高质量的数据

Benefits of technology

[0015] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for automatically filling missing values ​​in medical time-series data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117894420B_ABST
    Figure CN117894420B_ABST
Patent Text Reader

Abstract

The application discloses a kind of medical time series data missing value automatic filling method and device, the method includes: the original medical time series data is as current medical time series data;Repeatedly execute the following steps until meeting iteration termination condition: train time series data filling model with current medical time series data, fill in the missing value in current medical time series data using trained time series data filling model;When not meeting iteration termination condition, fill in the medical time series data as current medical time series data;Time series data filling model includes: first generator is used to capture the individual characteristics of current medical time series data, obtains first output matrix;Second generator is used to learn the time information in first output matrix, obtains second output matrix;First discriminator is used to judge whether second output matrix is real from individual characteristics dimension;Second discriminator is used to judge whether second output matrix is real in combination with time information.The application generates high-quality complete medical data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method and apparatus for automatically filling missing values ​​in medical time-series data. Background Technology

[0002] This section is intended to provide background or context for the embodiments of the invention set forth in the claims. The description herein is not an admission that it is prior art simply because it is included in this section.

[0003] Medical data plays a crucial role in clinical decision-making, disease diagnosis, and treatment. With the development of medical information technology, the volume of medical data has exploded. However, this data often contains missing, noisy, or incomplete information, which can affect its analysis and utilization. In the medical field, complete time-series data is of great importance for medical decision-making, but obtaining a sufficient amount of medical time-series data is difficult. Therefore, it is essential to determine how to obtain complete time-series data from medical time-series data containing missing values.

[0004] Currently, there are three main methods for handling missing values ​​in time series data: deletion, imputation, and no processing. Deletion, while relatively simple, results in the loss of important information from the original data. No processing involves directly performing data mining on the data containing missing values. Mining methods include Bayesian networks and artificial neural networks, but these have many estimation parameters, low prediction accuracy, and high network maintenance costs. Imputation methods include statistical imputation and machine learning imputation. Statistical learning imputation methods struggle to capture the inherent patterns in time series data, making it difficult to generate high-quality data. Medical time series data possesses characteristics such as temporal sequence, dynamism, diversity, and nonlinearity, which are crucial for the design of medical data imputation methods. Machine learning imputation methods can effectively meet the imputation requirements of medical time series data, generating high-quality time series data.

[0005] Among machine learning-based imputation methods, Generative Adversarial Networks (GANs) have unique advantages in data generation and imputation, and can be well combined with other models to improve performance and generate realistic data. Although there are already some time series data imputation models based on GANs, these models still have the following problems in the field of medical time series data imputation: (1) Medical data may be affected by individual patient differences, and how to perform personalized modeling in GAN models to adapt to the data characteristics of different patients is a challenge; (2) In the medical field, it is difficult to obtain large-scale complete time series data, and how to imput medical data with high quality when the data is a short time series is an urgent problem to be solved. Summary of the Invention

[0006] This invention provides a method for automatically filling missing values ​​in medical time-series data. It can effectively fill in medical data when the data is a short time series, adapting to the data characteristics of different patients. Using multivariate medical time-series data containing missing values ​​as input, it generates high-quality, complete medical data, providing a robust data foundation for accurate medical decision-making. The method includes:

[0007] Obtain the original medical time series data as the current medical time series data;

[0008] Repeat the following steps until the iteration termination condition is met, and output the current medical time series data: train the time series data imputation model with the current medical time series data to obtain the trained time series data imputation model; use the trained time series data imputation model to fill the missing values ​​in the current medical time series data to obtain the imputed medical time series data; if the iteration termination condition is not met, use the imputed medical time series data as the current medical time series data.

[0009] The time-series data imputation model includes: a first generator for capturing the individual characteristics of the current medical time-series data and obtaining a first output matrix; a second generator for learning the time information in the first output matrix and obtaining a second output matrix; a first discriminator for judging whether the second output matrix is ​​real from the dimension of individual characteristics; and a second discriminator for judging whether the second output matrix is ​​real by combining the time information.

[0010] This invention also provides an automatic missing value filling device for medical time series data, which can effectively fill medical data when the data is a short time series. It can adapt to the data characteristics of different patients, and uses medical multivariate time series data containing missing values ​​as input to generate high-quality and complete medical data, providing a sound data foundation for accurate medical decision-making. The device includes:

[0011] The original medical time-series data acquisition module is used to acquire the original medical time-series data as the current medical time-series data;

[0012] The missing value imputation module is used to repeatedly execute the following steps until the iteration termination condition is met, and output the current medical time series data: train the time series data imputation model with the current medical time series data to obtain the trained time series data imputation model; use the trained time series data imputation model to imput the missing values ​​in the current medical time series data to obtain the imputed medical time series data; if the iteration termination condition is not met, use the imputed medical time series data as the current medical time series data.

[0013] The time-series data imputation model includes: a first generator for capturing the individual characteristics of the current medical time-series data and obtaining a first output matrix; a second generator for learning the time information in the first output matrix and obtaining a second output matrix; a first discriminator for judging whether the second output matrix is ​​real from the dimension of individual characteristics; and a second discriminator for judging whether the second output matrix is ​​real by combining the time information.

[0014] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-mentioned method for automatically filling missing values ​​in medical time series data.

[0015] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for automatically filling missing values ​​in medical time-series data.

[0016] In this embodiment of the invention, original medical time-series data is obtained as the current medical time-series data; the following steps are repeated until the iteration termination condition is met, and the current medical time-series data is output: a time-series data imputation model is trained using the current medical time-series data to obtain the trained time-series data imputation model; the missing values ​​in the current medical time-series data are filled using the trained time-series data imputation model to obtain the imputed medical time-series data; if the iteration termination condition is not met, the imputed medical time-series data is used as the current medical time-series data; wherein, the time-series data imputation model includes: a first generator, used to capture the individual characteristics of the current medical time-series data to obtain a first output matrix; a second generator, used to learn the time information in the first output matrix to obtain a second output matrix; a first discriminator, used to determine whether the second output matrix is ​​real from the dimension of individual characteristics; and a second discriminator, used to determine whether the second output matrix is ​​real by combining the time information. Through the above steps, a T2GAN model composed of two generators and two discriminators is adopted. The first generator and the first discriminator take the patient's individual characteristics as input, which can capture the patient's individual characteristics and generate reasonable and high-quality time-series data through personalized modeling. By repeatedly training and imputing the time-series data imputation model, a multi-stage time-series data imputation model is generated, which can learn the relationships between different features and achieve effective imputation of short time series data. This invention enables personalized modeling and solves the problem of medical data imputation under short time series conditions, resulting in a high-quality time-series data imputation model and imputed medical time-series data. This provides comprehensive medical data support for subsequent medical data processing, data analysis, disease detection, and medical decision-making. Attached Figure Description

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

[0018] Figure 1 This is a flowchart of the method for automatically filling missing values ​​in medical time series data in an embodiment of the present invention;

[0019] Figure 2 This is a schematic diagram of the multi-stage generation framework in an embodiment of the present invention;

[0020] Figure 3 This is a flowchart illustrating the process of filling medical time-series data in an embodiment of the present invention;

[0021] Figure 4 This is the algorithm for filling medical time-series data in this embodiment of the invention;

[0022] Figure 5 This is a schematic diagram of the automatic filling device for missing values ​​in medical time series data in an embodiment of the present invention;

[0023] Figure 6 This is a schematic diagram of a computer device in an embodiment of the present invention. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0025] Figure 1 The flowchart of the automatic filling method for missing values ​​in medical time series data in this embodiment of the invention includes:

[0026] Step 101: Obtain the original medical time series data as the current medical time series data;

[0027] Step 102: Repeat the following steps until the iteration termination condition is met, and output the current medical time series data: Train the time series data imputation model with the current medical time series data to obtain the trained time series data imputation model; use the trained time series data imputation model to fill the missing values ​​in the current medical time series data to obtain the imputed medical time series data; if the iteration termination condition is not met, use the imputed medical time series data as the current medical time series data.

[0028] The time-series data imputation model includes: a first generator for capturing the individual characteristics of the current medical time-series data and obtaining a first output matrix; a second generator for learning the time information in the first output matrix and obtaining a second output matrix; a first discriminator for judging whether the second output matrix is ​​real from the dimension of individual characteristics; and a second discriminator for judging whether the second output matrix is ​​real by combining the time information.

[0029] In practice, the time-series data imputation model is a new medical time-series data imputation model "T2GAN" based on generative adversarial networks, which learns from the dimensions of individual characteristics and time.

[0030] In one embodiment, obtaining raw medical time-series data includes:

[0031] Obtain raw medical time-series data that characterize the features of the target;

[0032] The original medical time-series data is preprocessed to obtain the medical time-series data to be filled. The preprocessing includes removing outliers and cleaning the data.

[0033] In practice, target features include heart rate, respiratory rate, systolic blood pressure, diastolic blood pressure, and blood oxygen saturation. After removing outliers, null values ​​can be used to replace them; data cleaning can remove irrelevant and duplicate data.

[0034] Step 102 above can be collectively referred to as a multi-stage generation framework. The principle of the multi-stage generation framework is as follows: Figure 2 As shown.

[0035] In one embodiment, training a time-series data imputation model using current medical time-series data to obtain a trained time-series data imputation model includes:

[0036] The current medical time series data, the condition matrix, and the first mask matrix are input into the first generator to obtain the first output matrix;

[0037] The first output matrix, the timestamp vector, and the second mask matrix are input into the second generator to obtain the second output matrix. The second mask matrix is ​​a matrix that is scrambled from the first mask matrix.

[0038] Input the second output matrix and the timestamp vector into the first discriminator to output the first estimated mask matrix;

[0039] The second output matrix is ​​input into the second discriminator, which outputs the second estimated mask matrix.

[0040] The first output matrix, the second output matrix, the first estimation mask matrix, and the second estimation mask matrix are used to calculate the loss function of the time series data imputation model.

[0041] In practice, the first generator G1 is composed of a multilayer perceptron (MLP). The condition matrix H can be the maximum and minimum values ​​of the corresponding features, or it can be the individual conditions of a specific sample. The generator G1 can capture the individual features in the sample and achieve the goal of personalized modeling.

[0042] The current medical time series data X, during the initial training, is the original medical time series data X, which can be defined as n timestamp vectors T = (t1, t2, ... t... n-1 The observed sample X = {x0, x1, ... x2} containing d features d}∈R n×d x i Let x be an n-dimensional column vector of the i-th feature. ij Let be the i-th feature value of the sample observed at time j.

[0043] Condition matrix H = {h0, h1, ... h d}∈R 2xd h i For the 2D column vector of the i-th feature, specifically:

[0044]

[0045] Where, x j Let maxx be an n-dimensional column vector representing the j-th feature. j θ represents the maximum value of the column vector. 0j and θ 1j These represent the maximum and minimum values ​​of the corresponding feature j, respectively, during initialization. For a mask matrix M ∈ R... n×d , specifically:

[0046]

[0047] In one embodiment, the current medical time-series data, a condition matrix, and a first mask matrix are input into a first generator to obtain a first output matrix, including:

[0048] The current medical time series data, the condition matrix, and the first mask matrix are concatenated and input into the first generator to obtain the first intermediate output matrix. The first intermediate output matrix has the same dimension as the current medical time series data; it can be represented as X′=G1(X,H,M).

[0049] The first intermediate output matrix is ​​processed using the following formula to obtain the first output matrix:

[0050]

[0051] in, X is the first output matrix, X′ is the first intermediate output matrix, X is the current medical time series data, M is the first mask matrix, and ⊙ is the logical operator.

[0052] In practice, the second generator G2 is composed of a temporal convolutional network (TCN), which further processes the output of generator G1. By combining the second mask matrix RM and the timestamp vector T, a matrix with the same dimensions as the original time series matrix is ​​generated. The second generator G2 can learn the temporal information in the samples and model them from the time dimension, T = (t1, t2, ... t... n-1 );

[0053] In one embodiment, the first output matrix, the timestamp vector, and the second mask matrix are input into the second generator to obtain the second output matrix, including:

[0054] The first output matrix, timestamp vector, and second mask matrix are concatenated column-wise and then input into the second generator to obtain the second intermediate output matrix. This second intermediate output matrix has the same dimension as the current medical time-series data; it can be represented as follows:

[0055] The second intermediate output matrix is ​​processed using the following formula to obtain the second output matrix:

[0056] X2 = X⊙M + X1⊙(1-M)

[0057] Where X2 is the second output matrix, X1 is the second intermediate output matrix, X is the current medical time series data, M is the first mask matrix, and ⊙ is the logical operator.

[0058] In practice, the first discriminator D1 is composed of a multilayer perceptron (MLP), with the same components as G1, and judges whether the generated matrix is ​​"real" from the dimension of individual features. It takes the matrix generated by G2 and the condition matrix H as input to obtain the first estimated mask matrix M1, and compares it with the mask matrix M corresponding to the original time series X, providing feedback to update the parameters of the first generator G1.

[0059] The second discriminator D2 is composed of a temporal convolutional network (TCN), with the same specific components as G2. It can determine whether the generated matrix is ​​"real" by combining time information. It takes the matrix generated by G2 and the timestamp T as input to obtain an estimated mask matrix M2. Then, the mask matrix M is compared to obtain feedback on the authenticity, which is used to update the model parameters of the generator G2.

[0060] In one embodiment, the second output matrix and the timestamp vector are input into the first discriminator, and the first estimated mask matrix is ​​output, including:

[0061] The second output matrix and the timestamp vector are concatenated and then input into the first discriminator to output the first estimated mask matrix M1; the first estimated mask matrix is ​​a (n+2)×d matrix; it can be represented as M1=D1(H,X2);

[0062] The second output matrix and timestamp vector are input into the second discriminator to output the second estimated mask matrix. This includes: concatenating the second output matrix and timestamp vector into columns and inputting them into the second discriminator to output the second estimated mask matrix M2. M2 is an n×(d+1) matrix, which can be represented as M2=D2(T,X2).

[0063] In this embodiment of the invention, the time-series data imputation model involves five loss functions: loss functions generated by G1 and G2 (LossG1 and LossG2), loss functions generated by D1 and D2 (LossD1 and LossD2), and their average loss (Avg LossD3), where AvgLossD3 serves as the loss function for updating the parameters of D1 and D2. LossG1 and LossG2 are mask reconstruction losses, while LossD1 and LossD2 use binary cross-entropy loss.

[0064] The specific definitions are as follows:

[0065]

[0066] Where ∑M is the total number of elements with a value of 1 in the first mask matrix M.

[0067]

[0068]

[0069]

[0070] M is the first mask matrix, X′ is the first intermediate output matrix, X is the current medical time series data, X1 is the second intermediate output matrix, and M... ij M1 ij M2 ij , respectively, are the elements in the i-th row and j-th column of the first mask matrix, the first estimated mask matrix, and the second estimated mask matrix; d is the number of features of the current medical time series data; n is the number of elements in the timestamp vector; and ∑M is the total number of elements with a value of 1 in the first mask matrix M.

[0071] Therefore, the loss function of the first generator is expressed as Loss. G1 =LossG1+LossD1,

[0072] The loss function of the second generator is denoted as Loss. G2 =LossG2+LossD2,

[0073] The loss function of the first discriminator is expressed as:

[0074] The loss function of the second discriminator is expressed as:

[0075] In the T2GAN time-series data imputation model, the first and second generators take the patient's individual characteristics as additional inputs. The first generator learns these characteristics, and the first discriminator uses them to determine the authenticity of the generated data. The second generator and second discriminator each take temporal information as additional inputs. The second generator learns the temporal dimension information, and the second discriminator uses this information to determine the authenticity of the generated data. Thus, the entire model can perform personalized modeling on the patient's time-series data, generating reasonable and high-quality time-series data.

[0076] The multi-stage generative framework guides and controls the training of the T2GAN model and the filling of medical time-series data. For details of the filling process, see [link to documentation]. Figure 3 In one embodiment, the missing values ​​in the current medical time series data are filled in using a trained time series data filling model to obtain filled medical time series data, including:

[0077] The current medical time series data is input into the trained time series data to populate the model and obtain the intermediate matrix;

[0078] Obtain the current number of features for the target feature;

[0079] Obtain the first mask matrix of the current medical time series data;

[0080] For each element in the first mask matrix, if the number of columns of the element is not the same as the current number of features, set the element to 1 to obtain the processing matrix corresponding to the first mask matrix.

[0081] Based on the current medical time series data, intermediate matrix, and processing matrix, obtain the filling data;

[0082] Fill the missing values ​​in the current medical time series data with the fill data to obtain the filled medical time series data;

[0083] Decrease the current number of features by 1, where the iteration terminates when the current number of features is 0.

[0084] The specific algorithm for the above steps can be found in [link to algorithm]. Figure 4Each time the time series data is filled, the time series data filling model fills in the Nth feature of the current medical time series data. The value of N decreases by 1 after each filling operation. Each time the Nth feature of the current medical time series data is filled, let the current medical time series data be represented as X = {x0, x1, ... x...} d}∈R n×d x i Let x be an n-dimensional column vector of the i-th feature, then it is equivalent to x N The missing values ​​contained therein are filled in.

[0085] Subtract 1 from N, then check if N is 0. If N is 0, it means all features have been filled, and the output is medical time-series data without missing values; if N is not 0, retrain the model using all partially filled samples (updated current medical time-series data), then fill in the missing features again, and return to the frame (e.g., ...). Figure 3 The loop shown is shown in the diagram.

[0086] In each iteration of the framework, the model can progressively learn the relationships between different features. By generating values ​​for missing features using other features in a step-by-step manner, it can solve the problem of filling in short time series.

[0087] In summary, the method proposed in this embodiment of the invention obtains original medical time-series data as current medical time-series data; repeats the following steps until the iteration termination condition is met, and outputs the current medical time-series data: trains a time-series data imputation model using the current medical time-series data to obtain the trained time-series data imputation model; uses the trained time-series data imputation model to fill the missing values ​​in the current medical time-series data to obtain the imputed medical time-series data; if the iteration termination condition is not met, uses the imputed medical time-series data as the current medical time-series data; wherein, the time-series data imputation model includes: a first generator, used to capture the individual characteristics of the current medical time-series data to obtain a first output matrix; a second generator, used to learn the time information in the first output matrix to obtain a second output matrix; a first discriminator, used to determine whether the second output matrix is ​​real from the dimension of individual characteristics; and a second discriminator, used to determine whether the second output matrix is ​​real by combining the time information. Through the above steps, a T2GAN model composed of two generators and two discriminators is adopted. The first generator and the first discriminator take the patient's individual characteristics as input, which can capture the patient's individual characteristics and generate reasonable and high-quality time-series data through personalized modeling. By repeatedly training and imputing the time-series data imputation model, a multi-stage time-series data imputation model is generated, which can learn the relationships between different features and achieve effective imputation of short time series data. This invention enables personalized modeling and solves the problem of medical data imputation under short time series conditions, resulting in a high-quality time-series data imputation model and imputed medical time-series data. This provides comprehensive medical data support for subsequent medical data processing, data analysis, disease detection, and medical decision-making.

[0088] This invention also proposes an automatic filling device for missing values ​​in medical time series data. Its principle is similar to that of the automatic filling method for missing values ​​in medical time series data, and will not be described in detail here.

[0089] Figure 5 This is a schematic diagram of an automatic filling device for missing values ​​in medical time-series data in an embodiment of the present invention, comprising:

[0090] The original medical time series data acquisition module 501 is used to acquire the original medical time series data as the current medical time series data.

[0091] The missing value imputation module 502 is used to repeatedly execute the following steps until the iteration termination condition is met, and output the current medical time series data: train the time series data imputation model with the current medical time series data to obtain the trained time series data imputation model; use the trained time series data imputation model to fill the missing values ​​in the current medical time series data to obtain the imputed medical time series data; if the iteration termination condition is not met, use the imputed medical time series data as the current medical time series data.

[0092] The time-series data imputation model includes: a first generator for capturing the individual characteristics of the current medical time-series data and obtaining a first output matrix; a second generator for learning the time information in the first output matrix and obtaining a second output matrix; a first discriminator for judging whether the second output matrix is ​​real from the dimension of individual characteristics; and a second discriminator for judging whether the second output matrix is ​​real by combining the time information.

[0093] In one embodiment, the original medical time-series data acquisition module is specifically used for:

[0094] Obtain raw medical time-series data that characterize the features of the target;

[0095] The original medical time-series data is preprocessed to obtain the medical time-series data to be filled. The preprocessing includes removing outliers and cleaning the data.

[0096] In one embodiment, the missing value filling module is specifically used for:

[0097] The current medical time series data, the condition matrix, and the first mask matrix are input into the first generator to obtain the first output matrix;

[0098] The first output matrix, the timestamp vector, and the second mask matrix are input into the second generator to obtain the second output matrix. The second mask matrix is ​​a matrix that is scrambled from the first mask matrix.

[0099] Input the second output matrix and the timestamp vector into the first discriminator to output the first estimated mask matrix;

[0100] The second output matrix is ​​input into the second discriminator, which outputs the second estimated mask matrix.

[0101] The first output matrix, the second output matrix, the first estimation mask matrix, and the second estimation mask matrix are used to calculate the loss function of the time series data imputation model.

[0102] In one embodiment, the missing value filling module is specifically used for:

[0103] The current medical time series data, the condition matrix, and the first mask matrix are concatenated and then input into the first generator to obtain the first intermediate output matrix. The first intermediate output matrix has the same dimension as the current medical time series data.

[0104] The first intermediate output matrix is ​​processed using the following formula to obtain the first output matrix:

[0105]

[0106] in, X is the first output matrix, X′ is the first intermediate output matrix, X is the current medical time series data, M is the first mask matrix, and ⊙ is the logical operator.

[0107] In one embodiment, the missing value filling module is specifically used for:

[0108] The first output matrix, the timestamp vector, and the second mask matrix are concatenated column-wise and then input into the second generator to obtain the second intermediate output matrix. The second intermediate output matrix has the same dimension as the current medical time series data.

[0109] The second intermediate output matrix is ​​processed using the following formula to obtain the second output matrix:

[0110] X2 = X⊙M + X1⊙(1-M)

[0111] Where X2 is the second output matrix, X1 is the second intermediate output matrix, X is the current medical time series data, M is the first mask matrix, and ⊙ is the logical operator.

[0112] In one embodiment, the missing value filling module is specifically used for:

[0113] The second output matrix and the timestamp vector are concatenated and then input into the first discriminator to output the first estimated mask matrix.

[0114] The second output matrix and timestamp vector are input into the second discriminator to output the second estimated mask matrix, including: concatenating the second output matrix and timestamp vector column by column and inputting them into the second discriminator to output the second estimated mask matrix.

[0115] In one embodiment, the loss function for training the time-series data-filled model using current medical time-series data includes:

[0116] The loss function of the first generator is denoted as Loss. G1 =LossG1+LossD1,

[0117] The loss function of the second generator is denoted as Loss. G2 =LossG2+LossD2

[0118] The loss function of the first discriminator is expressed as:

[0119] The loss function of the second discriminator is expressed as:

[0120] in,

[0121]

[0122]

[0123]

[0124] M is the first mask matrix, X′ is the first intermediate output matrix, X is the current medical time series data, X1 is the second intermediate output matrix, and M... ij M1 ij M2 ij , respectively, are the elements in the i-th row and j-th column of the first mask matrix, the first estimated mask matrix, and the second estimated mask matrix; d is the number of features of the current medical time series data; n is the number of elements in the timestamp vector; and ∑M is the total number of elements with a value of 1 in the first mask matrix M.

[0125] In one embodiment, the missing value filling module is specifically used for:

[0126] The current medical time series data is input into the trained time series data to populate the model and obtain the intermediate matrix;

[0127] Obtain the current number of features for the target feature;

[0128] Obtain the first mask matrix of the current medical time series data;

[0129] For each element in the first mask matrix, if the number of columns of the element is not the same as the current number of features, set the element to 1 to obtain the processing matrix corresponding to the first mask matrix.

[0130] Based on the current medical time series data, intermediate matrix, and processing matrix, obtain the filling data;

[0131] Fill the missing values ​​in the current medical time series data with the fill data to obtain the filled medical time series data;

[0132] Decrease the current number of features by 1, where the iteration terminates when the current number of features is 0.

[0133] In summary, in the apparatus proposed in this embodiment of the invention, the original medical time-series data is obtained as the current medical time-series data; the following steps are repeated until the iteration termination condition is met, and the current medical time-series data is output: a time-series data filling model is trained using the current medical time-series data to obtain the trained time-series data filling model; the missing values ​​in the current medical time-series data are filled using the trained time-series data filling model to obtain the filled medical time-series data; if the iteration termination condition is not met, the filled medical time-series data is used as the current medical time-series data; wherein, the time-series data filling model includes: a first generator, used to capture the individual characteristics of the current medical time-series data to obtain a first output matrix; a second generator, used to learn the time information in the first output matrix to obtain a second output matrix; a first discriminator, used to determine whether the second output matrix is ​​real from the dimension of individual characteristics; and a second discriminator, used to determine whether the second output matrix is ​​real by combining the time information. Through the above steps, a T2GAN model composed of two generators and two discriminators is adopted. The first generator and the first discriminator take the patient's individual characteristics as input, which can capture the patient's individual characteristics and generate reasonable and high-quality time-series data through personalized modeling. By repeatedly training and imputing the time-series data imputation model, a multi-stage time-series data imputation model is generated, which can learn the relationships between different features and achieve effective imputation of short time series data. This invention enables personalized modeling and solves the problem of medical data imputation under short time series conditions, resulting in a high-quality time-series data imputation model and imputed medical time-series data. This provides comprehensive medical data support for subsequent medical data processing, data analysis, disease detection, and medical decision-making.

[0134] This invention also provides a computer device. Figure 6 This is a schematic diagram of a computer device in an embodiment of the present invention. The computer device 600 includes a memory 610, a processor 620, and a computer program 630 stored in the memory 610 and executable on the processor 620. When the processor 620 executes the computer program 630, it implements the above-mentioned method for automatically filling missing values ​​in medical time series data.

[0135] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for automatically filling missing values ​​in medical time-series data.

[0136] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described method for automatically filling missing values ​​in medical time-series data.

[0137] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0138] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0139] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0140] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0141] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A medical time-series data missing value automatic filling method, characterized in that, include: Obtain the original medical time series data as the current medical time series data; Repeat the following steps until the iteration termination condition is met, and output the current medical time series data: train the time series data imputation model with the current medical time series data to obtain the trained time series data imputation model; use the trained time series data imputation model to fill the missing values ​​in the current medical time series data to obtain the imputed medical time series data; If the iteration termination condition is not met, the padded medical time series data is used as the current medical time series data; The time-series data imputation model includes: a first generator for capturing the individual characteristics of the current medical time-series data and obtaining a first output matrix; a second generator for learning the time information in the first output matrix and obtaining a second output matrix; a first discriminator for judging whether the second output matrix is ​​real from the dimension of individual characteristics; and a second discriminator for judging whether the second output matrix is ​​real by combining the time information. The process of training a time-series data imputation model using current medical time-series data to obtain the trained model includes: inputting the current medical time-series data, a condition matrix, and a first mask matrix into a first generator to obtain a first output matrix; inputting the first output matrix, a timestamp vector, and a second mask matrix into a second generator to obtain a second output matrix, wherein the second mask matrix is ​​a scrambled version of the first mask matrix; inputting the second output matrix and the timestamp vector into a first discriminator to output a first estimated mask matrix; and inputting the second output matrix into a second discriminator to output a second estimated mask matrix. The first output matrix, the second output matrix, the first estimated mask matrix, and the second estimated mask matrix are used to calculate the loss function of the time-series data imputation model.

2. The method of claim 1, wherein, Obtain raw medical time-series data, including: Obtain raw medical time-series data that characterize the features of the target; The original medical time-series data is preprocessed to obtain the medical time-series data to be filled. The preprocessing includes removing outliers and cleaning the data.

3. The method of claim 1, wherein, The current medical time series data, the condition matrix, and the first mask matrix are input into the first generator to obtain the first output matrix, including: The current medical time series data, the condition matrix, and the first mask matrix are concatenated and then input into the first generator to obtain the first intermediate output matrix. The first intermediate output matrix has the same dimension as the current medical time series data. The first intermediate output matrix is ​​processed using the following formula to obtain the first output matrix: in, This is the first output matrix. This is the first intermediate output matrix. This is current medical time-series data. This is the first mask matrix. These are logical operators.

4. The method as described in claim 1, characterized in that, The first output matrix, the timestamp vector, and the second mask matrix are input into the second generator to obtain the second output matrix, which includes: The first output matrix, the timestamp vector, and the second mask matrix are concatenated column-wise and then input into the second generator to obtain the second intermediate output matrix. The second intermediate output matrix has the same dimension as the current medical time series data. The second intermediate output matrix is ​​processed using the following formula to obtain the second output matrix: in, This is the second output matrix. This is the second intermediate output matrix. This is current medical time-series data. This is the first mask matrix. These are logical operators.

5. The method as described in claim 1, characterized in that, The second output matrix and timestamp vector are input into the first discriminator, which outputs the first estimated mask matrix, including: The second output matrix and the timestamp vector are concatenated and then input into the first discriminator to output the first estimated mask matrix. The second output matrix and timestamp vector are input into the second discriminator to output the second estimated mask matrix, including: concatenating the second output matrix and timestamp vector column by column and inputting them into the second discriminator to output the second estimated mask matrix.

6. The method as described in claim 1, characterized in that, The trained time-series data is used to impute missing values ​​in the current medical time-series data, resulting in imputed medical time-series data, including: The current medical time series data is input into the trained time series data to populate the model and obtain the intermediate matrix; Obtain the current number of features for the target feature; Obtain the first mask matrix of the current medical time series data; For each element in the first mask matrix, if the number of columns of the element is not the same as the current number of features, set the element to 1 to obtain the processing matrix corresponding to the first mask matrix. Based on the current medical time series data, intermediate matrix, and processing matrix, obtain the filling data; Fill the missing values ​​in the current medical time series data with the fill data to obtain the filled medical time series data; Decrease the current number of features by 1, where the iteration terminates when the current number of features is 0.

7. An automatic filling device for missing values ​​in medical time-series data, characterized in that, include: The original medical time-series data acquisition module is used to acquire the original medical time-series data as the current medical time-series data; The missing value imputation module is used to repeatedly execute the following steps until the iteration termination condition is met, and output the current medical time series data: train the time series data imputation model with the current medical time series data to obtain the trained time series data imputation model; use the trained time series data imputation model to fill the missing values ​​in the current medical time series data to obtain the imputed medical time series data; If the iteration termination condition is not met, the padded medical time series data is used as the current medical time series data; The time-series data imputation model includes: a first generator for capturing the individual characteristics of the current medical time-series data and obtaining a first output matrix; a second generator for learning the time information in the first output matrix and obtaining a second output matrix; a first discriminator for judging whether the second output matrix is ​​real from the dimension of individual characteristics; and a second discriminator for judging whether the second output matrix is ​​real by combining the time information. The process of training a time-series data imputation model using current medical time-series data to obtain the trained model includes: inputting the current medical time-series data, a condition matrix, and a first mask matrix into a first generator to obtain a first output matrix; inputting the first output matrix, a timestamp vector, and a second mask matrix into a second generator to obtain a second output matrix, wherein the second mask matrix is ​​a scrambled version of the first mask matrix; inputting the second output matrix and the timestamp vector into a first discriminator to output a first estimated mask matrix; and inputting the second output matrix into a second discriminator to output a second estimated mask matrix. The first output matrix, the second output matrix, the first estimated mask matrix, and the second estimated mask matrix are used to calculate the loss function of the time-series data imputation model.

8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Integrated energy system data compensation method based on time sequence condition generative adversarial network

    CN114022311A

  • Multi-modal medical missing data completion method and device based on data relevance mining

    CN116795826A