Method, device, equipment and storage medium for processing missing values in medical time series data
By dividing medical timing data into variable sets of different periods and types, an autoregressive model is constructed to fill missing values, which solves the problem of failing to make full use of relevant timing variable information in the existing technology, improves the efficiency and quality of data filling, and supports clinical decision-making.
Patent Information
- Application Number
- CN202210082206.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-24
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2042-01-24
AI Technical Summary
Existing medical timing data processing methods fail to make full use of the effective information of relevant timing variables when filling missing values, resulting in low filling efficiency and ineffective support for clinical decision-making.
The variables related to the time sequence variables to be filled are divided into equal periods, equal proportion periods, unequal periods and non-time sequence variables sets, data matching and pre-transformation are performed, and an autoregressive model is constructed to fill missing values, and the correlation of multiple time sequence variables is used to fill.
It improves the efficiency and quality of medical timing data filling, promotes clinical decision-making support based on timing data, and improves the quality of medical services.
Smart Images

Figure CN114550909B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method, device, equipment and storage medium for processing missing values of medical time series data. Background Art
[0002] Time series data is an important type of data in the field of medical research. Common medical time series data includes vital sign monitoring data obtained in the intensive care unit, in-vivo drug concentration data during the drug metabolism process, health data obtained in real time by wearable devices, etc. Medical time series data can provide continuous information on the changes in the human health status and is a valuable data resource in the field of medical clinical decision support. The construction of many clinical decision support models depends on complete time series data information to perform real-time prediction on the clinical prognosis of patients, thereby improving the efficiency of clinical decision-making. However, during the data collection process in real medical scenarios, due to reasons such as imperfect data collection specifications, data collection capacity limitations, or data transmission errors, time series data often has problems of missing values and breakpoints. This seriously hinders the efficiency of constructing a clinical decision support model based on time series data to assist clinical decision-making.
[0003] Currently, the common processing methods for medical time series data include two categories: deletion and filling. The deletion method will cause the loss of data information and cannot maximize the utilization value of the data. The commonly used time series data filling method often constructs a statistical model or a machine learning model based on the data of a single time series variable itself to fill the missing values of the time series data. This filling method often fails to utilize the effective information of other time series variables jointly recorded with the missing time series variable, so the effectiveness of data filling is limited to a certain extent. Summary of the Invention
[0004] The embodiments of the present application provide a method, device, equipment and storage medium for processing missing values of medical time series data. To provide a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary part is not a general review, nor is it intended to identify key / important constituent elements or delineate the protection scope of these embodiments. Its sole purpose is to present some concepts in a simple form as a prelude to the subsequent detailed description.
[0005] In a first aspect, the embodiments of the present application provide a method for processing missing values of medical time series data, including:
[0006] Obtain the time series variable to be filled and the variable that has a strong correlation with the time series variable to be filled;
[0007] Divide the variables related to the time series variable to be filled into a set of time series variables with equal periods, a set of time series variables with equal-proportion periods, a set of time series variables with unequal periods, and a set of non-time series variables;
[0008] Perform data matching on the set of time series variables and the set of non-time series variables with equal periods to obtain the first set of covariates and the fourth set of covariates respectively. Perform pre-transformations on the set of time series variables with equal-proportion periods and the set of time series variables with unequal periods to obtain the second set of covariates and the third set of covariates respectively;
[0009] Construct a missing value filling model based on the time series variables to be filled, the first set of covariates, the second set of covariates, the third set of covariates, the fourth set of covariates, and the autoregressive model to obtain the constructed missing value filling model;
[0010] Input the time series variables to be filled into the missing value filling model to obtain the missing values of the time series variables to be filled.
[0011] In one embodiment, dividing the variables related to the time series variables to be filled into a set of time series variables with equal periods, a set of time series variables with equal-proportion periods, a set of time series variables with unequal periods, and a set of non-time series variables includes:
[0012] Divide the variables related to the time series variables to be filled into a set of time series variables and a set of non-time series variables;
[0013] Compare whether the time series characteristics of each time series variable in the set of time series variables are consistent with the time series variables to be filled;
[0014] If the time series period of the time series variable in the set of time series variables is the same as that of the time series variable to be filled, classify the time series variable into the set of time series variables with equal periods;
[0015] If the time series period of the time series variable in the set of time series variables is proportional to that of the time series variable to be filled, and the time series period of the time series variable to be filled is an integer multiple of the time series variable in the set of time series variables, classify the time series variable into the set of time series variables with equal periods;
[0016] If the time series period of the time series variable in the set of time series variables is proportional to that of the time series variable to be filled, and the time series period of the time series variable in the set of time series variables is an integer multiple of the time series variable to be filled, classify the time series variable into the set of time series variables with equal-proportion periods;
[0017] If the time series period of the time series variable in the set of time series variables is not the same as that of the time series variable to be filled and is not proportional, classify the time series variable into the set of time series variables with unequal periods.
[0018] In one embodiment, performing data matching on the set of time series variables with equal periods and the set of non-time series variables to obtain the first set of covariates and the fourth set of covariates respectively includes:
[0019] Using the identification code and timestamp of the recorded values as matching keys, one-to-one matching is performed between the time-series variables in the set of equi-periodic time-series variables and the time-series variables to be filled, obtaining the first set of covariates after matching;
[0020] Using the identification code of the recorded values as the matching key, one-to-one matching is performed between the variables in the set of non-time-series variables and the time-series variables to be filled, obtaining the fourth set of covariates after matching.
[0021] In one embodiment, pre-transformations are performed on the set of time-series variables with equal-proportion periods and the set of time-series variables with unequal periods, respectively obtaining the second set of covariates and the third set of covariates, including:
[0022] Taking the time-series period of the time-series variable to be filled as the base point, pre-transforming the time-series variables in the set of time-series variables with equal-proportion periods, obtaining the second set of covariates;
[0023] Taking the identification code of the time-series variable to be filled as the base point, pre-transforming the time-series variables in the set of time-series variables with unequal periods, obtaining the third set of covariates.
[0024] In one embodiment, a missing value filling model is constructed according to the time-series variable to be filled, the first set of covariates, the second set of covariates, the third set of covariates, the fourth set of covariates, and the autoregressive model, obtaining the constructed missing value filling model, including:
[0025] Determine the number of autoregressive terms according to the time-series variable to be filled, and obtain the autoregressive terms according to the number of autoregressive terms;
[0026] Taking the autoregressive model as the basic model and the autoregressive terms as the basic terms of the model;
[0027] Adding each variable in the first set of covariates, the second set of covariates, the third set of covariates, and the fourth set of covariates as covariates to the model, and adding the white noise term to the model, obtaining the constructed missing value filling model.
[0028] In one embodiment, the constructed missing value filling model is as follows:
[0029]
[0030] Among them, Y it is the value of the time-series variable Y to be filled at the timestamp t of the i-th personal health record, ∈ t is the white noise term, is the autoregressive term, is the term of the first set of covariates, is the second covariate term, is the third covariate term, is the fourth covariate term; T is the time sequence period, and α, β, γ, θ, and δ are all regression coefficients, and A ki(t-j*T) is the k-th variable A in the first covariate set k is the value at the time stamp of (t - j*T) in the i-th personal health record, and B mi(t-j*T) is the m-th variable B in the second covariate set m is the value at the time stamp of (t - j*T) in the i-th personal health record, and C qi is the q-th variable C in the third covariate set q is the value in the i-th personal health record, and E ri is the r-th variable E in the fourth covariate set r is the value in the i-th personal health record.
[0031] In one embodiment, it further includes:
[0032] Adding a regression coefficient penalty term to the loss function of the model to filter out covariates with low correlation;
[0033] Using the least angle regression iteration algorithm to obtain the optimal solution of the model parameters.
[0034] In a second aspect, an embodiment of the present application provides a missing value processing device for medical time series data, including:
[0035] An acquisition module, configured to acquire the time series variable to be filled, and variables related to the time series variable to be filled;
[0036] A classification module, configured to classify the variables related to the time series variable to be filled into an equally periodic time series variable set, an equally proportional periodic time series variable set, an unequally periodic time series variable set, and a non-time series variable set;
[0037] A data processing module, configured to perform data matching on the equally periodic time series variable set and the non-time series variable set to respectively obtain a first covariate set and a fourth covariate set, and perform pre-transformation on the equally proportional periodic time series variable set and the unequally periodic time series variable set to respectively obtain a second covariate set and a third covariate set;
[0038] A model training module, configured to construct a missing value filling model according to the time series variable to be filled, the first covariate set, the second covariate set, the third covariate set, the fourth covariate set, and an autoregressive model, and obtain the constructed missing value filling model;
[0039] A filling module, configured to input the time series variable to be filled into the missing value filling model to obtain the missing value of the time series variable to be filled.
[0040] In a third aspect, an embodiment of the present application provides a missing value processing device for medical time series data, including a processor and a memory storing program instructions. The processor is configured to execute the missing value processing method for medical time series data provided in the above embodiment when executing the program instructions.
[0041] In a fourth aspect, an embodiment of the present application provides a computer-readable medium, on which computer-readable instructions are stored. The computer-readable instructions are executed by a processor to implement a missing value processing method for medical time series data provided in the above embodiment.
[0042] The technical solutions provided by the embodiments of the present application may include the following beneficial effects:
[0043] According to the missing value processing method for time series data provided by the embodiment of the present application, the missing values of individual medical time series data are filled based on relevant time series variable data, so as to improve the problems of low filling efficiency of existing medical time series data and inability to make full use of relevant time series variable information, effectively improve the efficiency and quality of filling time series data in the medical field, promote the development of auxiliary clinical decision-making applications based on medical time series data, and improve the quality of medical services.
[0044] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present invention and used together with the specification to explain the principles of the present invention.
[0046] Figure 1 is a schematic flowchart of a method for processing missing values of medical time series data shown according to an exemplary embodiment;
[0047] Figure 2 is a schematic diagram of a method for processing missing values of medical time series data shown according to an exemplary embodiment;
[0048] Figure 3 is a schematic diagram of a device for processing missing values of medical time series data shown according to an exemplary embodiment;
[0049] Figure 4 is a schematic structural diagram of a device for processing missing values of medical time series data shown according to an exemplary embodiment;
[0050] Figure 5 is a schematic structural diagram of a device for processing missing values of medical time series data shown according to an exemplary embodiment;
[0051] Figure 6Schematic diagram of a computer storage medium shown according to an exemplary embodiment. Detailed implementation manners
[0052] The following description and the drawings fully disclose specific implementation manners of the present invention, enabling those skilled in the art to practice them.
[0053] It should be clear that the described embodiments are only a part of the embodiments of the present invention, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.
[0054] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present invention. On the contrary, they are merely examples of systems and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0055] Since time series data often has problems such as missing values and breakpoints, this seriously hinders the efficiency of constructing a clinical decision support model based on time series data to assist clinical decisions. Currently, the common processing methods for medical time series data include two categories: deletion and filling. The deletion method will cause loss of data information and cannot maximize the utilization value of the data. The commonly used time series data filling methods often construct statistical models or machine learning models based on the data of a single time series variable itself to fill the missing values of the time series data. Since the collection of time series data often includes multiple time series variables, and there is a strong correlation between time series variables, and the existing time series data filling methods often fail to utilize the effective information of other time series variables jointly recorded with the missing time series variables, the effectiveness of data filling is limited to a certain extent.
[0056] Based on this, the embodiments of the present application provide a method for processing missing values of medical time series data, which fills the missing values of a single medical time series data based on the data of related time series variables, so as to improve the problems of low filling efficiency of existing medical time series data and inability to fully utilize the information of related time series variables. The method for processing missing values of medical time series data provided by the embodiments of the present application will be introduced in detail below with reference to the drawings. See Figure 1 , and the method specifically includes the following steps.
[0057] In a first aspect, the embodiments of the present application provide a method for processing missing values of medical time series data, including:
[0058] S101 Obtain the time series variable to be filled and the variables related to the time series variable to be filled.
[0059] In a possible implementation, given a medical dataset D, the dataset D contains a time-series variable Y to be filled and several other variables. The dataset D contains N personal health records, each record has a unique identification code, and the time-series variable values of each personal health record are a series of numerically-valued data with timestamp markings.
[0060] In the dataset D, variables that have a strong correlation with the time-series variable Y to be filled are screened out to form a dataset D', obtaining a set of variables that are correlated with the time-series variable Y to be filled.
[0061] S102 classifies the variables related to the time-series variable to be filled into a set of time-series variables with equal periods, a set of time-series variables with equal-proportion periods, a set of time-series variables with unequal periods, and a set of non-time-series variables.
[0062] In a possible implementation, first, the variables that have a strong correlation with the time-series variable to be filled are classified into a set of time-series variables and a set of non-time-series variables. For example, all variables in the dataset D' can be divided into a set of time-series variables D1 and a set of non-time-series variables D2.
[0063] Further, it is compared whether the time-series characteristics of each time-series variable in the set of time-series variables are consistent with the time-series variable to be filled. For example, for each time-series variable V in the set of time-series variables D1 and the time-series variable Y to be filled, the time-series characteristics of each variable are extracted, that is, the time-series period intervals of each variable. For each time-series variable V in D1, the consistency of the time-series characteristics of V and the time-series variable Y to be filled is compared.
[0064] Further, if the time-series period of the time-series variable in the set of time-series variables is the same as that of the time-series variable to be filled, the time-series variable is classified into the set of time-series variables with equal periods.
[0065] If the time-series period of the time-series variable in the set of time-series variables is proportional to that of the time-series variable to be filled, and the time-series period of the time-series variable to be filled is an integer multiple of the time-series variable in the set of time-series variables, the time-series variable is classified into the set of time-series variables with equal periods. For example, the time-series period interval of the time-series variable V is 1 minute, and the time-series period interval of the time-series variable Y to be filled is 1 hour. The time-series period interval of the time-series variable Y is 60 times that of the time-series variable V, then the variable V is an equal-period time-series variable of the variable Y.
[0066] If the time series variables in the set of time series variables are proportional to the time series period of the time series variable to be filled, and the time series period of the time series variables in the set of time series variables is an integer multiple of the time series period of the time series variable to be filled, then the time series variables are classified into the set of time series variables with equal proportional periods. For example, the time series interval of time series variable V is 1 hour, the time series interval of the time series variable Y to be filled is 1 minute, and the time series interval of variable V is 60 times that of variable Y, then variable V is the time series variable with an equal proportional period of variable Y.
[0067] If the time series variables in the set of time series variables are not the same as the time series period of the time series variable to be filled and are not proportional, then the time series variables are classified into the set of time series variables with unequal periods.
[0068] S103 performs data matching on the set of time series variables with equal periods and the set of non-time series variables to obtain the first set of covariates and the fourth set of covariates respectively, and performs pre-transformations on the set of time series variables with equal proportional periods and the set of time series variables with unequal periods to obtain the second set of covariates and the third set of covariates respectively.
[0069] In a possible implementation, using the identification code and timestamp of the recorded value as the matching keys, the time series variables in the set of time series variables with equal periods are matched one-to-one with the time series variable to be filled to obtain the first set of covariates after matching.
[0070] Specifically, for each time series variable V in the set of time series variables with equal periods, using the unique identification code and timestamp of the personal health record as the matching keys, the recorded value of time series variable V is matched one-to-one with the recorded value of time series variable Y to obtain variable A containing the matching information. After all variables are matched, the first set of covariates S A ={A1, A2, …, A K}.
[0071] Furthermore, perform a pre-transformation on the time series variables with equal proportional periods. The time series variables in the set of time series variables with equal proportional periods are pre-transformed based on the time series period of the time series variable to be filled to obtain the second set of covariates.
[0072] Specifically, for each time series variable V in the set of time series variables with equal proportional periods, based on the time series period of variable Y, perform a pre-transformation on variable V to obtain variable B. The time series variable obtained after the pre-transformation is the time series variable with an equal period of variable Y. For the time series set T Y of the time series variable Y to be filled, for each timestamp t in it, the algorithm for pre-transforming variable V is:
[0073]
[0074] where B tThe variable value of the variable V pre-transformed into the variable B at the time stamp t, where t1 (t1 ∈ T V ) and t2 (t2 ∈ T V ) are respectively the two time stamps in the time series set T of the time series variable V V that are closest to the time stamp t, V t1 is the recorded value of the time series variable V at the time stamp t1, and V t2 is the recorded value of the time series variable V at the time stamp t2. After pre-transforming all variables, the second covariate set S B ={B1, B2, …, B M}.
[0075] Furthermore, for time series variables with unequal periods, pre-transform them. For the time series variables in the set of time series variables with unequal periods, pre-transform them with the identification code of the time series variable to be filled as the base point, and obtain the third covariate set.
[0076] Specifically, for each time series variable V in the set of time series variables with unequal periods, pre-transform the variable V with the identification code of the time series variable Y to be filled as the base point. For each unique identification code of the health record of the variable Y, use the comprehensive index method to pre-transform the variable V, and the formula is as follows:
[0077]
[0078] where C i is the variable value corresponding to the unique identification code of the i-th personal health record when the variable V is pre-transformed into the variable C, f(t) is the time series curve of the variable V changing with time t, AUC(f(t)) is the area under the time series curve of f(t), and f’(t) is the slope of the fitting line of the time series curve of f(t). After pre-transforming all variables, the third covariate set S C ={C1, C2, …, C Q}.
[0079] Furthermore, perform data matching on non-time series variables. Using the identification code of the recorded value as the matching key, match the variables in the non-time series variable set with the time series variable to be filled one by one, and obtain the fourth covariate set after matching.
[0080] Specifically, for each non-time series variable V in the non-time series variable set, using the unique identification code of the personal health record as the matching key, match the non-time series variable V with the recorded value of the time series variable Y to be filled one by one, and obtain the variable E containing the matching information. After matching all variables, the fourth covariate set S E ={E1, E2, …, E R}.
[0081] S104 constructs a missing value filling model based on the time series variable to be filled, the first set of covariates, the second set of covariates, the third set of covariates, the fourth set of covariates, and the autoregressive model, and obtains the constructed missing value filling model.
[0082] In a possible implementation, the number of autoregressive terms is determined according to the time series variable to be filled, and the autoregressive terms are obtained according to the number of autoregressive terms; the autoregressive model is used as the basic model, and the autoregressive terms are used as the basic terms of the model; each variable in the first set of covariates, the second set of covariates, the third set of covariates, and the fourth set of covariates is added to the model as a covariate, and a white noise term is added to the model to obtain the constructed missing value filling model.
[0083] Specifically, for the time series variable Y to be filled, its stationarity is identified based on its scatter plot, autocorrelation function plot, and partial autocorrelation function plot, and the non-stationary time series variable Y to be filled is smoothed to determine the number of its autoregressive terms p. The autoregressive terms are obtained according to the determined number of autoregressive terms p. The autoregressive terms are as follows:
[0084]
[0085] where, Y i(t-j*T) is the value of the time series variable Y of the i-th personal health record at the time stamp (t - j*T), T is the time series period interval, and α is the autoregressive term coefficient.
[0086] Furthermore, the autoregressive model is used as the basic model, and the autoregressive terms are used as the basic terms of the model; each variable in the first set of covariates, the second set of covariates, the third set of covariates, and the fourth set of covariates is added to the model as a covariate, and a white noise term is added to the model to obtain the constructed missing value filling model.
[0087] In one embodiment, the constructed missing value filling model is as follows:
[0088]
[0089] where, Y it is the value of the time series variable Y to be filled of the i-th personal health record at the time stamp t, ∈ t is the white noise term, is the autoregressive term, is the first set of covariate terms, is the second covariate term, is the third covariate term, is the fourth covariate term; T is the time series period, and α, β, γ, θ, δ are all regression coefficients, A ki(*T) is the k-th variable A in the first set of covariates kThe value at the time stamp of (t - j*T) in the i-th personal health record, B mi(t-j*T) Is the m-th variable B in the second set of covariates m The value at the time stamp of (t - j*T) in the i-th personal health record, C qi Is the q-th variable C in the third set of covariates q The value in the i-th personal health record, E ri Is the r-th variable E in the fourth set of covariates r The value in the i-th personal health record.
[0090] Furthermore, it also includes: adding a regression coefficient penalty term to the loss function of the model to filter out covariates with low correlation. The basic form of the regression coefficient penalty term is as follows:
[0091] λ(∑|α|+∑|β|+∑|γ|+∑|θ|+∑|δ|)
[0092] Where λ is the penalty parameter.
[0093] In a possible implementation, the least angle regression iterative algorithm is used to obtain the optimal solution of the model parameters, thereby obtaining the missing value filling model.
[0094] S105 Input the time series variable to be filled into the missing value filling model to obtain the missing value of the time series variable to be filled.
[0095] Specifically, for the missing value of the time series variable Y to be filled at a certain time stamp t, according to the obtained time series data missing value filling model, input the corresponding variable values, and the filling value of the missing value of the time series variable Y at the time stamp t can be obtained.
[0096] To facilitate understanding of the method for processing missing values of medical time series data provided in the embodiments of the present application, the following is combined with the attached Figure 2 For illustration. As Figure 2 Shown, the method includes the following steps.
[0097] Obtain a medical data set, screen the time series variable to be filled and the variables related to the time series variable to be filled from it, extract the time series characteristics of the relevant variables, and compare the consistency of the time series characteristics of the relevant variables and the time series variable to be filled.
[0098] If the time series variables in the time series variable set have the same time series period as the time series variable to be filled, then classify the time series variables into the set of time series variables with equal periods.
[0099] If the time series variables in the set of time series variables are proportional to the time series period of the time series variable to be filled, and the time series period of the time series variable to be filled is an integer multiple of the time series variables in the set of time series variables, then the time series variables are classified into the set of time series variables with equal periods.
[0100] If the time series variables in the set of time series variables are proportional to the time series period of the time series variable to be filled, and the time series period of the time series variables in the set of time series variables is an integer multiple of the time series variable to be filled, then the time series variables are classified into the set of time series variables with equal proportional periods.
[0101] If the time series variables in the set of time series variables are not the same as and not proportional to the time series period of the time series variable to be filled, then the time series variables are classified into the set of time series variables with unequal periods.
[0102] Further, data matching is performed on the set of time series variables with equal periods and the set of non-time series variables to respectively obtain the first set of covariates S A and the fourth set of covariates S E , pre-transformations are performed on the set of time series variables with equal proportional periods and the set of time series variables with unequal periods to respectively obtain the second set of covariates S B and the third set of covariates S C .
[0103] Further, the number of autoregressive terms is determined according to the time series variable to be filled, and autoregressive terms are obtained according to the number of autoregressive terms; the autoregressive model is used as the basic model, and the autoregressive terms are used as the basic terms of the model; each variable in the first set of covariates, the second set of covariates, the third set of covariates, and the fourth set of covariates is used as a covariate and added to the model, and a white noise term is added to the model. A regression coefficient penalty term is added to the loss function of the model to filter out covariates with low correlation, and the least angle regression iterative algorithm is used to obtain the optimal solution of the model parameters, thereby obtaining a time series data missing value filling model.
[0104] According to the method for processing missing values of time series data provided by the embodiments of the present application, the missing values of single medical time series data are filled based on relevant time series variable data, so as to improve the problems of low efficiency of filling existing medical time series data and inability to make full use of relevant time series variable information, effectively improve the efficiency and quality of filling time series data in the medical field, promote the development of auxiliary clinical decision-making applications based on medical time series data, and improve the quality of medical services.
[0105] The embodiments of the present application also provide a device for processing missing values of medical time series data, as Figure 3As shown in the figure, it includes an input module: used for inputting the medical time series data to be filled and its related variable data; a time series data filling module: used for filling the missing medical time series data based on the input medical time series data to be filled and its related variable data; an output module: used for outputting the complete medical time series data with missing values filled.
[0106] An embodiment of the present application also provides a device for processing missing values of medical time series data. This device is used to execute the method for processing missing values of medical time series data in the above embodiment, as Figure 4 shown in the figure. This device includes:
[0107] An acquisition module 401, used for acquiring the time series variables to be filled and the variables related to the time series variables to be filled;
[0108] A classification module 402, used for classifying the variables related to the time series variables to be filled into a set of time series variables with equal periods, a set of time series variables with equal ratio periods, a set of time series variables with unequal periods, and a set of non-time series variables;
[0109] A data processing module 403, used for performing data matching on the set of time series variables with equal periods and the set of non-time series variables, respectively obtaining a first set of covariates and a fourth set of covariates, and performing pre-transformations on the set of time series variables with equal ratio periods and the set of time series variables with unequal periods, respectively obtaining a second set of covariates and a third set of covariates;
[0110] A model training module 404, used for constructing a missing value filling model according to the time series variables to be filled, the first set of covariates, the second set of covariates, the third set of covariates, the fourth set of covariates, and an autoregressive model, obtaining the constructed missing value filling model;
[0111] A filling module 405, used for inputting the time series variables to be filled into the missing value filling model to obtain the missing values of the time series variables to be filled.
[0112] It should be noted that when the device for processing missing values of medical time series data provided in the above embodiment executes the method for processing missing values of medical time series data, only the above-mentioned division of each functional module is used for illustration. In actual application, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for processing missing values of medical time series data provided in the above embodiment and the embodiment of the method for processing missing values of medical time series data belong to the same concept. The implementation process is detailed in the method embodiment and will not be elaborated here.
[0113] The embodiment of the present application further provides an electronic device corresponding to the method for processing missing values of medical time-series data provided in the foregoing embodiment, so as to execute the method for processing missing values of medical time-series data.
[0114] Please refer to Figure 5 , which shows a schematic diagram of an electronic device provided in some embodiments of the present application. As Figure 5 shown, the electronic device includes: a processor 500, a memory 501, a bus 502, and a communication interface 503. The processor 500, the communication interface 503, and the memory 501 are connected through the bus 502; a computer program that can run on the processor 500 is stored in the memory 501, and when the processor 500 runs the computer program, it executes the method for processing missing values of medical time-series data provided in any one of the foregoing embodiments of the present application.
[0115] Among them, the memory 501 may include a high-speed random access memory (RAM: Random Access Memory), and may also include a non-volatile memory, such as at least one disk memory. Through at least one communication interface 503 (which can be wired or wireless), a communication connection between the system network element and at least one other network element can be realized, and the Internet, a wide area network, a local area network, a metropolitan area network, etc. can be used.
[0116] The bus 502 may be an ISA bus, a PCI bus, an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. Among them, the memory 501 is used to store a program. After receiving an execution instruction, the processor 500 executes the program. The method for processing missing values of medical time-series data disclosed in any one of the foregoing embodiments of the present application can be applied to the processor 500 or implemented by the processor 500.
[0117] The processor 500 may be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of the processor 500 or instructions in the form of software. The above-mentioned processor 500 may be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute each method, step, and logic block diagram disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by a combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 501, and the processor 500 reads the information in the memory 501 and combines its hardware to complete the steps of the above method.
[0118] The electronic device provided by the embodiments of the present application and the method for processing missing values of medical time-series data provided by the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run, or implemented by them.
[0119] The embodiments of the present application also provide a computer-readable storage medium corresponding to the method for processing missing values of medical time-series data provided in the foregoing embodiments. Please refer to Figure 6 , which shows that the computer-readable storage medium is an optical disc 600, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it will execute the method for processing missing values of medical time-series data provided in any of the foregoing embodiments.
[0120] It should be noted that examples of computer-readable storage media may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, or other optical and magnetic storage media, which will not be elaborated here one by one.
[0121] The computer-readable storage medium provided by the above embodiments of the present application and the method for processing missing values of medical time series data provided by the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.
[0122] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0123] The above embodiments only represent several implementation manners of the present invention, and the description thereof is relatively specific and detailed, but it should not be understood as a limitation on the scope of the patent for the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention should be subject to the appended claims.
Claims
1. A method for processing missing values in medical time series data, characterized in that, Including: Obtain the time-series variable to be filled and the variables related to the time-series variable to be filled; Divide the variables related to the time-series variable to be filled into a set of time-series variables with equal periods, a set of time-series variables with equal-proportion periods, a set of time-series variables with unequal periods, and a set of non-time-series variables; Perform data matching on the set of time-series variables with equal periods and the set of non-time-series variables to obtain a first set of covariates and a fourth set of covariates respectively, including: using the identification code and timestamp of the recorded value as matching keys, performing one-to-one matching between the time-series variables in the set of time-series variables with equal periods and the time-series variable to be filled to obtain the first set of covariates after matching; using the identification code of the recorded value as the matching key, performing one-to-one matching between the variables in the set of non-time-series variables and the time-series variable to be filled to obtain the fourth set of covariates after matching; perform pre-transformations on the set of time-series variables with equal-proportion periods and the set of time-series variables with unequal periods to obtain a second set of covariates and a third set of covariates respectively; including: performing pre-transformations on the time-series variables in the set of time-series variables with equal-proportion periods with the time-series period of the time-series variable to be filled as the base point to obtain the second set of covariates; performing pre-transformations on the time-series variables in the set of time-series variables with unequal periods with the identification code of the time-series variable to be filled as the base point to obtain the third set of covariates; Construct a missing value filling model according to the time-series variable to be filled, the first set of covariates, the second set of covariates, the third set of covariates, the fourth set of covariates, and the autoregressive model to obtain the constructed missing value filling model; including: determining the number of autoregressive terms according to the time-series variable to be filled, and obtaining autoregressive terms according to the number of autoregressive terms; using the autoregressive model as the basic model and the autoregressive terms as the basic terms of the model; adding each variable in the first set of covariates, the second set of covariates, the third set of covariates, and the fourth set of covariates as covariates to the model, and adding a white noise term to the model to obtain the constructed missing value filling model; Input the time-series variable to be filled into the missing value filling model to obtain the missing value of the time-series variable to be filled.
2. The method according to claim 1, characterized in that, Dividing the variables related to the time-series variable to be filled into a set of time-series variables with equal periods, a set of time-series variables with equal-proportion periods, a set of time-series variables with unequal periods, and a set of non-time-series variables, including: Dividing the variables related to the time-series variable to be filled into a set of time-series variables and a set of non-time-series variables; Compare whether the time-series characteristics of each time-series variable in the set of time-series variables are the same as those of the time-series variable to be filled; If the time-series period of the time-series variable in the set of time-series variables is the same as that of the time-series variable to be filled, classify the time-series variable into the set of time-series variables with equal periods; If the time-series periods of the time-series variables in the set of time-series variables are proportional to those of the time-series variable to be filled, and the time-series period of the time-series variable to be filled is an integer multiple of the time-series variables in the set of time-series variables, classify the time-series variable into the set of time-series variables with equal periods; If the time series variables in the set of time series variables are proportional to the time series period of the time series variable to be filled, and the time series period of the time series variables in the set of time series variables is an integer multiple of the time series period of the time series variable to be filled, then the time series variables are classified into the set of time series variables with equal proportional periods; If the time series variables in the set of time series variables are not the same as and not proportional to the time series period of the time series variable to be filled, then the time series variables are classified into the set of time series variables with unequal periods.
3. The method according to claim 1, wherein The constructed missing value filling model is as follows: where p represents the number of autoregressive terms, and Y it is the value of the time series variable Y to be filled at the timestamp t for the i-th personal health record, ∈ t is the white noise term, is the autoregressive term, is the first set of covariate terms, is the second covariate term, is the third covariate term, is the fourth covariate term; T is the time series period, and α, β, γ, θ, δ are all regression coefficients. A ki(t-j*T) is the k-th variable A in the first set of covariates A k at the timestamp (t - j*T) in the i-th personal health record, B mi(t-j*T) is the m-th variable B in the second set of covariates B m at the timestamp (t - j*T) in the i-th personal health record, C qi is the q-th variable C in the third set of covariates C q in the i-th personal health record, E ri is the r-th variable E in the fourth set of covariates E r in the i-th personal health record.
4. The method according to claim 3, wherein It also includes: Adding a regression coefficient penalty term to the loss function of the model to filter out covariates with low correlation; Using the least angle regression iterative algorithm to obtain the optimal solution of the model parameters.
5. A missing value processing device for medical time series data, characterized in that, It includes: An acquisition module, used to acquire the time series variable to be filled and the variables related to the time series variable to be filled; A classification module, used to classify the variables related to the time series variable to be filled into a set of time series variables with equal periods, a set of time series variables with equal proportional periods, a set of time series variables with unequal periods, and a set of non-time series variables; A data processing module, used to perform data matching on the set of time series variables with equal periods and the set of non-time series variables, respectively obtaining a first set of covariates and a fourth set of covariates, including: using the identification code and timestamp of the recorded value as the matching keys, performing one-to-one matching on the time series variables in the set of time series variables with equal periods and the time series variable to be filled to obtain the first set of covariates after matching; using the identification code of the recorded value as the matching key, performing one-to-one matching on the variables in the set of non-time series variables and the time series variable to be filled to obtain the fourth set of covariates after matching; performing pre-transformations on the set of time series variables with equal proportional periods and the set of time series variables with unequal periods, respectively obtaining a second set of covariates and a third set of covariates, including: performing a pre-transformation on the time series variables in the set of time series variables with equal proportional periods with the time series period of the time series variable to be filled as the base point to obtain the second set of covariates; performing a pre-transformation on the time series variables in the set of time series variables with unequal periods with the identification code of the time series variable to be filled as the base point to obtain the third set of covariates; A model training module, used to construct a missing value filling model according to the time series variable to be filled, the first set of covariates, the second set of covariates, the third set of covariates, the fourth set of covariates, and the autoregressive model, obtaining the constructed missing value filling model, including: determining the number of autoregressive terms according to the time series variable to be filled, and obtaining autoregressive terms according to the number of autoregressive terms; using the autoregressive model as the basic model and the autoregressive terms as the basic terms of the model; adding each variable in the first set of covariates, the second set of covariates, the third set of covariates, and the fourth set of covariates as covariates to the model, and adding a white noise term to the model to obtain the constructed missing value filling model; A filling module, used to input the time series variable to be filled into the missing value filling model to obtain the missing value of the time series variable to be filled.
6. A device for processing missing values in medical time series data, characterized in that, It includes a processor and a memory storing program instructions, and the processor is configured to execute the method for processing missing values of medical time-series data according to any one of claims 1 to 4 when executing the program instructions.
7. A computer-readable medium, characterized in that, Computer-readable instructions are stored thereon, and the computer-readable instructions are executed by a processor to implement a method for processing missing values of medical time-series data according to any one of claims 1 to 4.
Citation Information
Patent Citations
Method and device for filling missing data
CN109726503A
Method for acquiring consecutive missing values, data analysis device, terminal, and storage medium
WO2020010677A1