Data quality control method and device for crowd queue research data
By using the BERT model to identify variable types and combining rules with the intelligent quality control operator library in the cohort study data, the accuracy and logic problems of the quality control of the cohort study data are solved, and the improvement of data quality and adaptive quality control are achieved, which is suitable for Promotion in different regions.
Patent Information
- Application Number
- CN202410568545.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-09
- Publication Date
- 2024-08-23
AI Technical Summary
It is difficult to effectively perform quality control of population cohort study data with existing technology. In particular, while ensuring the accuracy, completeness and timeliness of data, there is a lack of data quality control methods that adapt to the characteristics of cohort studies.
Using a method that includes queue data acquisition, basic data quality control, variable type identification and advanced data quality control, the BERT model automatically identifies variable types, and combines rules and intelligent quality control operator libraries to perform data quality control and detect data quality. Completeness, uniqueness, accuracy and logic issues.
It realizes automated and intelligent verification of cohort study data, improves data quality, adapts to the characteristics of cohort studies, supports a variety of quality control operators and statistical methods, and is suitable for promotion in different regions.
Smart Images

Figure CN118538341A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a data quality control method and device for population cohort research data. Background Art
[0002] Cohort study is an important observational medical research method that aims to collect detailed information about the occurrence, development and outcome of a disease by exposing some suspicious factors, conducting continuous follow-up, and finally analyzing whether there is a causal relationship and the degree of association between these factors and the target outcome. Cohort study has a wide range of application value in the fields of medicine, public health and epidemiology, and is of great significance for revealing the mechanism of disease occurrence and prevention and control. At present, my country has carried out a number of large-scale cohort studies, such as the China Chronic Disease Prospective Research Project and the Taizhou Population Health Follow-up Survey.
[0003] The data quality of population cohort studies is very important. If the data quality is not high, it may lead to inaccurate results or even misleading conclusions. In addition, if the research results are based on low-quality data, then these results may not be generalized to other populations or situations, and thus cannot provide a reliable basis for public health decision-making. Therefore, in order to ensure the accuracy, completeness and reliability of cohort study data, it is necessary to take a series of data quality control measures to verify the data. At present, there are relatively few methods for data quality control of population cohorts, and most of them are mainly applicable to medical information data rather than cohort study data. There are still many shortcomings as follows: (1) Unlike medical information data in a broad sense, the collection of cohort study data is an active process, which requires higher accuracy, completeness and timeliness of the data. The current universal medical data quality control methods do not fully consider these factors and are difficult to meet these requirements.
[0004] (2) Cohort study data have certain characteristics, such as long-term, dynamic, causal, etc., and there is currently a lack of data quality control methods that are adapted to the characteristics of cohort studies, such as follow-up and timely quality control. (3) There is a lack of a complete set of quality control methods for accuracy and logic for specific cohort study data types. Summary of the invention
[0005] The purpose of the present invention is to provide a data quality control method and device for population cohort study data to solve the problems raised in the above background technology.
[0006] To achieve the above-mentioned object of the invention, one aspect of the present invention provides a data quality control method for population cohort study data, comprising the following steps:
[0007] Step S1, cohort data acquisition, i.e., acquiring data from a cohort data source, wherein the cohort data fields include the unique identification code of the survey subject, collection time, variable name, variable code, whether it is a follow-up variable, whether it is a key variable, result, and result unit;
[0008] Step S2, basic data quality control, that is, performing necessary data quality control on the queue data, troubleshooting integrity and uniqueness issues, including integrity check and uniqueness check, and obtaining basic data quality control results;
[0009] Step S3, returning the basic data quality control results, that is, returning the basic data quality control results, including the survey subject's unique identification code, collection time, variable name, variable code and question type;
[0010] Step S4, variable type identification, constructing a queue variable type identification model based on BERT (Bidirectional Encoder Representation from Transformers) for automatically identifying queue variable types, wherein the queue variable types include: time variables, categorical variables, numerical variables, storage path variables, and text variables, and then returning the variable type identification result, including variable name, variable code, and variable type;
[0011] Step S5, advanced data quality control, that is, further perform data quality control on the queue data to identify accuracy and logic problems, select any quality control operator from the rule queue quality control operator library and the intelligent queue quality control operator library for configuration, fill in the configuration items respectively, and calculate to obtain the advanced data quality control results;
[0012] Step S6, the high-level data quality control result is returned, and the high-level data quality control result is returned, including the patient's unique identification code, acquisition time, variable name, variable code, operator ID, operator name, and problem type. The problem type includes error and exception.
[0013] Further, the queue data field in step S1, wherein:
[0014] The unique identification code of the survey subject includes, but is not limited to, a resident ID card, a medical insurance card number, an EMPI (Enterprise Master Patient Index), and other identifiers that can uniquely represent the survey subject;
[0015] The collection time is used to indicate the collection time of variable data, including but not limited to questionnaire collection time and sample collection time;
[0016] The variable name is the specific name of the queue collection item and is unique;
[0017] The variable code is the code corresponding to the specific name of the queue collection item, which is automatically generated according to the variable name and is unique;
[0018] The follow-up variable is whether the cohort collection item has a follow-up attribute;
[0019] The key variable is whether the cohort collection items are the content that must be collected in the cohort study;
[0020] The results are the data collection results of the cohort collection project;
[0021] The result unit is the unit corresponding to the queue collection item result.
[0022] Furthermore, in the integrity check of the basic data quality control in step S2, for each variable, if data with null values is found through traversal, the problem type returned is common missing; for each survey object, if not all key variables have results and are not null, the problem type returned is key missing; for the uniqueness check, for each variable, if data with exactly the same collection time and results is found through traversal, the problem type returned is duplicate.
[0023] Furthermore, the BERT-based queue variable type identification method in the variable type identification in step S4 includes model construction and model identification, wherein:
[0024] Model building includes the following steps:
[0025] Step S401, labeling data variable types, that is, obtaining multiple cohort research and medical disease data sets, labeling each field of the collected data as one of the five cohort variable types, and forming five groups of field data.
[0026] Step S402, training data set generation, for each group of variable data, randomly obtain a field each time, and randomly specify the data of order i (i = 1, 2, ... n, where n is the length of the variable data) as the beginning, merge the data behind it, separate it with ";" and convert it into a string, until the string length reaches 512 (if it does not reach, terminate), then truncate it to form a training text X. 1 training text X, and the group of variable types as sample labels Y (time type variables are 1, classification variables are 2, numerical variables are 3, storage path variables are 4, and text variables are 5), together constitute a training sample. Repeat the above steps, for 5 groups of field data, each group generates 10,000 training samples as a training data set.
[0027] Step S403, model training and storage, that is, using the training data set to fine-tune the BERT classification model, and store the trained model structure to form a queue variable type recognition model. The model input text length is 512, and the output is one of the five queue variable types.
[0028] Model identification includes the following steps:
[0029] Step S411, single variable prediction sample generation, for a single variable, randomly specify the data of order i (i = 1, 2, ... n, where n is the length of the variable data) as the beginning, merge the subsequent data, separate them with ";" and convert them into a string, until the string length reaches 512 (if not, terminate), then truncate to form 1 prediction sample. Repeat the above steps 7 times to generate the prediction sample set of the variable.
[0030] Step S412, single variable type identification, that is, the prediction sample set of the variable is sequentially input into the saved queue variable type identification model to obtain 7 prediction labels, and the prediction label with the most occurrences is taken as the identification type of the variable data. If there are multiple prediction labels with the most occurrences, the one with the highest ranking is selected as the identification result in the following priority order: 1, 2, 3, 4, 5.
[0031] Step S413, multiple variable type identification, repeating steps S411 and S412, identifying each queue variable, and returning the identification result;
[0032] Step S414, multiple variable type confirmation, manually confirm the recognition result of step S413, correct the recognition result found to be incorrect by manual verification, and finally generate the variable type recognition result, including variable name, variable code, and recognized variable type.
[0033] Furthermore, the queue variable type, wherein:
[0034] Time variables store data in time format, including date of birth and sample collection time;
[0035] Categorical variables store categorical data represented by categories, including gender, city, and education level;
[0036] Numeric variables store numeric data in formats including integer and floating point. The data include height, weight, systolic blood pressure, and diastolic blood pressure.
[0037] The storage path variable is used to point to the computer storage path of files related to the cohort study, including pictures, audio, video, biological sample library, and genetic data;
[0038] Text type variables are used to store other variables that do not conform to the above four types.
[0039] Furthermore, the rule queue quality control operator library includes expression operators, regular matching operators, and set range operators, among which:
[0040] The expression operator is used to store numerical variables and time variables; the configuration items include: action variables, constraint variables, and expressions; if the action variable and constraint variable data are not within the constraint range of the expression, the quality control conditions are not met, and the problem type returned for the action variable data is an error.
[0041] (1) Action variable: represents the quality control object of this operator, an existing queue variable, of type string. If this operator is selected, this input item cannot be empty. The name or code of the quality control object variable should be entered, and the English letters of the variable should be suffixed in English brackets. For example, "OGTT fasting blood glucose (y)" is used as the input, and systolic blood pressure is used as the quality control action variable.
[0042] (2) Constraint variable: represents one or more existing queue variables used to constrain the action variable. The type is string and this input item can be empty. When there is only one constraint variable, its filling method is the same as the action variable, such as filling in "OGTT 2-hour blood glucose (x1)" as one constraint variable; when there are multiple constraint variables, use English commas, i.e. "," to separate them, such as filling in "OGTT 2-hour blood glucose (x1), OGTT blood glucose increase value (x1)" as two constraint variables.
[0043] (3) Expression: It represents a mathematical expression defined by arithmetic operations on the acting variables, or acting variables and constrained variables, including equations and inequalities. The type is string, and this input item is not allowed to be empty. Among them, the addition, subtraction, multiplication, and division of arithmetic operations are represented by "+", "-", "*", and " / ", respectively, and equal to, greater than, less than, greater than or equal to, and less than or equal to are represented by "=", ">", "<", ">=", and "<=", respectively. For time-type variables, arithmetic operations are not supported, but 5 comparison symbols including equal to, greater than, less than, greater than or equal to, and less than or equal to are supported; for numerical-type variables, both are supported. At the same time, the acting variables and constrained variables in the expression need to be consistent and cannot contain both time-type variables and numerical-type variables. Single expressions and multiple expressions are supported. When entering a single expression, only 1 equation or inequality needs to be entered, such as "y<x1" to represent that the fasting blood glucose of OGTT is less than the blood glucose at 2 hours of OGTT; when entering multiple expressions, multiple equations or inequalities can be entered, separated by the English comma ",", such as "y<x1,y>3.9" which means that the fasting blood glucose of OGTT is less than the blood glucose at 2 hours of OGTT and the fasting blood glucose of OGTT is greater than 3.9. This expression will calculate the acting variables and constrained variable data of each survey object, find the acting variables and data that do not meet the expression constraints and return them.
[0044] The regular matching operator is used to store path variables and text-type variables; the configuration items include: acting variables, regular expressions, and return types; if the regular expression has a return when acting on variable data, it does not meet the quality control conditions, and the problem type of the acting variable data returned is an error. Among them:
[0045] (1) Acting variable: It represents the object of quality control of this operator, an existing queue variable, and the type is string. If this operator is selected, this input item is not allowed to be empty, and the name or code of the quality control object variable should be entered, such as "email address" as the input.
[0046] (2) Regular expression: It represents a regular expression used to match the content in the acting variable, and the type is string. If this operator is selected, this input item is not allowed to be empty, and 1 regular expression should be entered, such as "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(.[a-zA-Z0-9_-]+)+" as the input for the email address.
[0047] (3) Return type: The type is boolean, and 0 or 1 is filled. 1 means that if the regular expression cannot match the content in the acting variable data, it indicates that there is a quality control problem with the data, and the acting variable and data are returned; 0 means that if the regular expression can match the content in the acting variable data, it indicates that there is a quality control problem with the data, and the acting variable and data are returned.
[0048] The collection range operator is used to store categorical variables; the configuration items include: action variables, collection range; if the collection range is applied to the variable data and there is a return, it does not meet the quality control conditions, and the problem type of the returned action variable data is an error.
[0049] in:
[0050] (1) Action variable: represents the quality control object of the operator, an existing queue variable, of string type. If this operator is selected, this input item cannot be empty, and the name or code of the quality control object variable, such as "gender", should be entered as input.
[0051] (2) Set range: indicates the value range of the action variable data, and the type is a string. Enter one or more characters. When there are multiple characters, use English commas "," to separate them. For example, "Unknown gender, male, female, unspecified gender" is used as input to limit the value range of the gender variable. If the action variable data is not within the set range, it means that the data has quality control problems, and the action variable and data are returned.
[0052] Furthermore, the intelligent queue quality control operator library mainly targets numerical variables and follow-up variables, and intelligently discovers outliers based on statistical methods, including univariate outlier detection operators, bivariate outlier detection operators, and follow-up timeliness detection operators, a total of three quality control operators, among which:
[0053] The single variable outlier detection operator is used for numerical variables and detects a single variable. The configuration items include: action variable, detection method, and method parameters. If the method parameters are brought into the detection method and the action variable data is calculated and returned, it does not meet the quality control conditions, and the problem type of the action variable data returned is abnormal. Among them:
[0054] (1) Action variable: represents the quality control object of the operator, an existing numeric queue variable, of string type. If this operator is selected, this input item cannot be empty, and the name or code of the quality control object variable should be entered.
[0055] (2) Detection method: indicates the calculation method used to detect abnormal values of the action variable. The type is optional and the options include: standard deviation method and deviation method. The calculation steps of the standard deviation method are: Assume that x i is the detection value, is the mean value of the action variable, S is the standard deviation of the action variable, and α is the input method parameter. If The detected value is an abnormal value and is returned. Calculation steps of the deviation method: Assume that x i is the detection value, is the mean value of the effect variable, is the average deviation of the action variable, α is the input method parameter, if it satisfies Then the detected value is an abnormal value and is returned.
[0056] (3) Method parameter: represents the α corresponding to the calculation step in (2), the type is floating point type, the value range is 1-10, and the default value is 3.
[0057] The bivariate outlier detection operator is used for numerical variables to detect two variables; the configuration items include: action variables, auxiliary variables, detection methods, and method parameters; if the method parameters are brought into the detection method and the action variable data is calculated and returned, it does not meet the quality control conditions, and the problem type of the action variable data returned is abnormal. Among them:
[0058] (1) Action variable: represents the quality control object of the operator, an existing numeric queue variable, of string type. If this operator is selected, this input item cannot be empty, and the name or code of the quality control object variable should be entered.
[0059] (2) Auxiliary variable: represents a variable used to assist the action variable in outlier detection. It is an existing numeric or categorical queue variable of string type. If this operator is selected, this input item cannot be empty. The name or code of the quality control object variable should be entered.
[0060] (3) Detection method: indicates the calculation method used to detect abnormal values of the action variable. The type is selective, and the options include: standard deviation method, deviation method, and regression method. When the auxiliary variable is a categorical variable, the standard deviation method and deviation method can be selected. Calculation steps: Assume that x i is the detection value, and the category number of the corresponding auxiliary variable is j. is the average value of the effect variable in class j, S j is the standard deviation of the action variable in class j, α is the input method parameter, if The detected value is an abnormal value and is returned. Calculation steps of the deviation method: Assume that x i is the detection value, and the category number of the corresponding auxiliary variable is j. is the average value of the effect variable in class j, is the average deviation of the action variable in class j, α is the input method parameter, if The test value is an outlier and is returned. When the auxiliary variable type is a numerical variable, the regression method can be selected. Method steps: Use the auxiliary variable as the independent variable and the action variable as the dependent variable, use RANSAC regression (random sampling consistency regression) to fit a linear regression, input the test value into the regression, and if the predicted value is outside the 95% confidence interval, the test value is an outlier and is returned.
[0061] (4) Method parameter: represents the α corresponding to the calculation step in (3), the type is floating point type, the value range is 1-10, and the default value is 3.
[0062] The follow-up timeliness detection operator is used for follow-up variables, covering all variable types, to check whether there are omissions in the follow-up data collection; the configuration items include: effect variables; through the follow-up time anomaly detection algorithm, intelligently check whether there are omissions in the follow-up of the investigator. If the follow-up time anomaly detection algorithm calculates and returns an abnormality for an investigator's effect variable, it does not meet the quality control conditions, and the problem type of the returned effect variable data is abnormal. Among them:
[0063] (1) Action variable: represents the quality control object of the operator, an existing numeric queue variable, of string type. If this operator is selected, this input item cannot be empty, and the name or code of the quality control object variable should be entered.
[0064] (2) The calculation steps of the follow-up time anomaly detection algorithm are as follows: First, the unique identification code of the survey subject is used as the group to obtain m groups, each group is represented by i (i = 1,...m); then the collection time of the effect variable data of each group is arranged from small to large, and the jth (j = 1, 2..) follow-up is determined, and the interval d between the collection time of this follow-up and the collection time of the next follow-up is calculated. ij ; Finally, for the jth (j=1,2..) follow-up, calculate the average interval days of group m and the standard deviation of the interval days S j , if there is a j-th follow-up of a certain survey subject This means that the subject had abnormalities in the j+1th follow-up.
[0065] Another aspect of the present invention provides a data quality control device for population cohort research data, comprising a cohort data acquisition module, a basic data quality control module, a basic data quality control result return module, a variable type identification module, an advanced data quality control module, and an advanced data quality control result return module, wherein:
[0066] A cohort data acquisition module is used to acquire data from a cohort data source. The cohort data fields include a unique identification code of the survey subject, collection time, variable name, variable code, whether it is a follow-up variable, whether it is a key variable, result, and result unit;
[0067] The basic data quality control module is used to perform necessary data quality control on the queue data, troubleshoot integrity and uniqueness issues, including integrity check and uniqueness check, and obtain basic data quality control results;
[0068] The basic data quality control result return module is used to return the basic data quality control results, including the unique identification code of the survey object, collection time, variable name, variable code and question type;
[0069] The variable type identification module is used to build a BERT-based queue variable type identification model for automatically identifying queue variable types, including time variables, categorical variables, numerical variables, storage path variables, and text variables, and then return the variable type identification result, including variable name, variable code, and variable type;
[0070] The advanced data quality control module is used to further perform data quality control on the queue data, identify accuracy and logic problems, select any quality control operator from the rule queue quality control operator library and the intelligent queue quality control operator library for configuration, fill in the configuration items respectively, and calculate the advanced data quality control results;
[0071] The advanced data quality control result return module is used to return the results of advanced data quality control, including the patient's unique identification code, collection time, variable name, variable code, operator ID, operator name, and question type.
[0072] Compared with the prior art, the present system and method have the following advantages:
[0073] The present invention provides a quality control method suitable for population cohort study data, which performs automated intelligent verification on the collected cohort data, checks and discovers problems with the integrity, uniqueness, accuracy and logic of the cohort data, thereby promoting the improvement of the quality of the cohort data. First, it not only supports rule-based quality control operators, covering complex logic strategies such as calculation expressions and regular expressions, but also supports a variety of intelligent cohort data quality control operators, and automatically discovers problem data from the data based on inferential statistical methods; secondly, it adapts to the characteristics of cohort study data, and can perform intelligent quality control on follow-up variables and discover problems with timeliness of follow-up; thirdly, a BERT-based cohort variable type identification method is designed to automatically identify the data type of the cohort variable. In short, this method performs data quality control independently of the cohort data source, and the method is diverse and practical, which is convenient for promotion and use in different regions. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 The figure is a flow chart of a data quality control method for population cohort study data.
[0075] Figure 2 Flowchart of the construction and identification method of the BERT-based cohort variable type identification model. DETAILED DESCRIPTION
[0076] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0077] like Figure 1 The figure shows a flow chart of a data quality control method for population cohort research data. In this specific implementation case, taking the diabetes population cohort data as an example, some fields are used as the original data source to implement the above method.
[0078] Step S1, cohort data acquisition: obtain data from the cohort data source, including fields: survey subject unique identification code, collection time, variable name, variable code, whether it is a follow-up variable, whether it is a key variable, result, and result unit. Among them:
[0079] (1) Unique identification code of the survey subject: including but not limited to resident ID card number, medical insurance card number, EMPI, etc., which can uniquely identify the survey subject.
[0080] (2) Collection time: used to indicate the collection time of variable data, including but not limited to questionnaire collection time, sample collection time, etc.
[0081] (3) Variable name: The specific name of the queue collection item, which is unique.
[0082] (4) Variable code: The code corresponding to the specific name of the queue collection item is automatically generated based on the variable name and is unique.
[0083] (5) Follow-up variable: whether the cohort collection item has follow-up attributes.
[0084] (6) Whether it is a key variable: whether the queue collection item is content that must be collected.
[0085] (7) Results: Data collection results of the cohort collection project.
[0086] (8) Result unit: the unit corresponding to the results of the cohort collection project.
[0087] By collecting the diabetes cohort data, the diabetes cohort variable information was obtained, totaling 15 variables, as shown in Table 1; the diabetes cohort data table was obtained, including the fields of the survey subject unique identification code, collection time, variable name, variable code, result and result unit, as shown in Table 2.
[0088] Table 1 Variable information of diabetes cohort
[0089]
[0090]
[0091] Table 2 Diabetes cohort data
[0092]
[0093]
[0094] Step S2, basic data quality control, performs necessary data quality control on the queue data, checks for integrity and uniqueness issues, including integrity check and uniqueness check, and obtains basic data quality control results.
[0095] (1) Integrity check: For each variable, if data with null values is found, the question type returned is normal missing; for each survey object, if all key variables do not have results and are not null, the question type returned is key missing.
[0096] (2) Uniqueness check: For each variable, if data with the same collection time and results are found, the problem type is returned as duplicate.
[0097] Step S3, the basic data quality control results are returned, including the unique identification code of the survey object, collection time, variable name, variable code and question type. Some basic data quality control results are shown in Table 3:
[0098] Table 3 Quality control results of some basic data
[0099]
[0100] Step S4, variable type identification. A BERT-based cohort variable type identification method is constructed to automatically identify five types of cohort variables, and to distinguish all cohort variables into: time variables, categorical variables, numerical variables, storage path variables, and text variables. The variable type identification results are returned, including variable name, variable code, and variable type. The diabetes cohort variables are identified by the constructed BERT-based cohort variable type identification method, and the identification results are obtained, as shown in Table 4.
[0101] Table 4 Variable type identification results of diabetes cohort
[0102]
[0103] Among them, the five queue variable types include:
[0104] (1) Time variables: including data stored in time format such as time and date, such as date of birth, sample collection time, etc.
[0105] (2) Categorical variables: including categorical data expressed in categories, such as gender, city, education level, etc.
[0106] (3) Numerical variables: including numerical data stored in integer or floating point types that can be used for arithmetic operations, such as height, weight, systolic blood pressure, diastolic blood pressure, etc.
[0107] (4) Storage path variables: including but not limited to computer storage paths used to point to files such as images, audio, video, biological sample libraries, and genetic data related to the cohort study.
[0108] (5) Text variables: Other variables that do not meet the above four types (1)-(4) are text variables.
[0109] like Figure 2 As shown in the figure, it is a flowchart of the construction and identification method of the queue variable type identification model based on BERT. The specific steps are as follows:
[0110] First, the model is constructed. It includes the following steps:
[0111] Step S401, labeling data variable types. Obtain multiple cohort research and medical disease data, label each field of the collected data as the above five cohort variable types, and form five groups of field data;
[0112] Step S402, training data set generation. For each set of variable data, randomly obtain a field each time, and randomly specify the data of order i (i = 1, 2, ... n, where n is the length of the variable data) as the beginning, merge the data behind it, separate it with ";" and convert it into a string, until the string length reaches 512 (if it does not reach, terminate), then truncate it to form a training text X. 1 training text X, and the group of variable types as sample labels Y (time type variables are 1, classification variables are 2, numerical variables are 3, storage path variables are 4, and text type variables are 5), together constitute a training sample. Repeat the above steps, for 5 sets of field data, each group generates 10,000 training samples as a training data set.
[0113] Step S403, model training and saving. Use the training data set to fine-tune the BERT classification model, and store the trained model structure to form a queue variable type recognition model. The model input text length is 512, and the output is one of the five categories (including 1, 2, 3, 4, 5).
[0114] Then the model identification is carried out, which includes the following steps:
[0115] Step S411, single variable prediction sample generation. For a single variable, randomly specify the data in order i (i = 1, 2, ... n, where n is the length of the variable data) as the beginning, merge the subsequent data, separate them with ";" and convert them into a string, until the string length reaches 512 (if not, terminate), then truncate to form 1 prediction sample. Repeat the above steps 7 times to generate the prediction sample set of the variable.
[0116] Step S412, single variable type identification. The prediction sample set of the variable is input into the queue variable type identification model in sequence to obtain 7 prediction labels, and the prediction label with the most occurrences is taken as the identification type of the variable data. If there are multiple prediction labels with the most occurrences, the one with the highest ranking is selected as the identification result in the following priority order: 1, 2, 3, 4, 5.
[0117] Step S413, multiple variable type identification. Repeat the above steps S411 and S412 to identify each queue variable and return the identification result.
[0118] Step S414, multiple variable type confirmation: manually confirm the recognition result of step S413, and correct the recognition result found to be incorrect by manual verification. Finally, generate the variable type recognition result, including variable name, variable code, and recognition variable type (including 1, 2, 3, 4, 5).
[0119] Step S5, advanced data quality control. Further perform data quality control on the cohort data to identify accuracy and logic problems, select any quality control operators from the rule cohort quality control operator library and the intelligent cohort quality control operator library for configuration, fill in the configuration items respectively, and calculate the advanced data quality control results. Among them, the rule cohort quality control operator library includes three quality control operators: expression operator, regular matching operator, and set range operator; the intelligent cohort quality control operator library mainly targets numerical variables and follow-up variables, and intelligently discovers outliers based on statistical methods, including univariate outlier detection operator, bivariate outlier detection operator, and follow-up timeliness detection operator, a total of three quality control operators. Perform advanced data quality control on the diabetes cohort variables, and select appropriate quality control operators for each variable, as shown in Tables 5-10. Tables 5-10 store the configuration contents of the expression operator, regular matching operator, set range operator, univariate outlier detection operator, bivariate outlier detection operator, and follow-up timeliness detection operator, respectively.
[0120] Table 5 Expression operator configuration table
[0121]
[0122]
[0123] Table 6 Regular matching operator configuration table
[0124]
[0125] Table 7 Collection range operator configuration table
[0126]
[0127] Table 8 Univariate outlier detection operator configuration table
[0128] Configuration ID Role variables Detection Methods Method Parameters 1 age Standard Deviation Method 3 2 height Standard Deviation Method 3 3 weight deviation method 2
[0129] Table 9 Bivariate outlier detection operator configuration table
[0130]
[0131]
[0132] Table 10 Follow-up timeliness detection operator configuration table
[0133] Configuration ID Role variables 1 OGTT fasting blood glucose 2 OGTT 2-hour blood glucose
[0134] The rule queue quality control operator library includes expression operators, regular matching operators, and set range operators. Expression operators are used for numeric variables and time variables. The operator configuration items include: action variables, related variables, and expressions. If the action variable and constraint variable data are not within the constraint range in the expression, the quality control conditions are not met, and the problem type returned for the action variable data is an error. Among them:
[0135] (1) Action variable: represents the quality control object of this operator, an existing queue variable, of type string. If this operator is selected, this input item cannot be empty. The name or code of the quality control object variable should be entered, and the English letters of the variable should be suffixed in English brackets. For example, "OGTT fasting blood glucose (y)" is used as input to use systolic blood pressure as the quality control action variable.
[0136] (2) Constraint variable: represents one or more existing queue variables used to constrain the action variable. The type is string and this input item can be empty. When there is only one constraint variable, its filling method is the same as the action variable, such as filling in "OGTT 2-hour blood glucose (x1)" as one constraint variable; when there are multiple constraint variables, use English commas, i.e. "," to separate them, such as filling in "OGTT 2-hour blood glucose (x1), OGTT blood glucose increase value (x1)" as two constraint variables.
[0137] (3) Expression: It represents a mathematical expression defined by four arithmetic operations on the acting variables, or acting variables and constrained variables, including equations and inequalities. The type is string, and this input item is not allowed to be empty. Among them, the addition, subtraction, multiplication, and division of the four arithmetic operations are represented by "+", "-", "*", and " / ", respectively, and equal to, greater than, less than, greater than or equal to, and less than or equal to are represented by "=", ">", "<", ">=", and "<=", respectively. For time-type variables, four arithmetic operations are not supported, but five comparison symbols of equal to, greater than, less than, greater than or equal to, and less than or equal to are supported; for numerical variables, both are supported. At the same time, the acting variables and constrained variables in the expression need to be consistent and cannot contain both time-type variables and numerical variables. Single expressions and multiple expressions are supported. When entering a single expression, only 1 equation or inequality needs to be entered, such as "y<x1" to represent that the fasting blood glucose of OGTT is less than the blood glucose at 2 hours of OGTT; when entering multiple expressions, multiple equations or inequalities can be entered, separated by the English comma ",", such as "y<x1,y>3.9" indicating that the fasting blood glucose of OGTT is less than the blood glucose at 2 hours of OGTT and the fasting blood glucose of OGTT is greater than 3.9. This expression will calculate the acting variables and constrained variable data of each survey object, find the acting variables and data that do not meet the expression constraints and return them.
[0138] The regular matching operator is applicable to storage path variables and text variables. The configuration items of this operator include: acting variable, regular expression, and return type. If the regular expression has a return when acting on variable data, it does not meet the quality control conditions, and the problem type of the acting variable data returned is an error. Among them:
[0139] (1) Acting variable: It represents the object of quality control of this operator, an existing queue variable, and the type is string. If this operator is selected, this input item is not allowed to be empty, and the name or code of the quality control object variable should be entered, such as "email address" as the input.
[0140] (2) Regular expression: It represents the regular expression used to match the content in the acting variable, and the type is string. If this operator is selected, this input item is not allowed to be empty, and 1 regular expression should be entered, such as "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(.[a-zA-Z0-9_-]+)+" as the input for the email address.
[0141] (3) Return type: The type is boolean, and 0 or 1 is filled. 1 means that if the regular expression cannot match the content in the acting variable data, it indicates that there is a quality control problem with the data, and the acting variable and data are returned; 0 means that if the regular expression can match the content in the acting variable data, it indicates that there is a quality control problem with the data, and the acting variable and data are returned.
[0142] The collection range operator is applicable to categorical variables. The operator configuration items include: action variable, collection range. If the collection range is applied to the variable data and there is a return, it does not meet the quality control conditions, and the problem type of the returned action variable data is an error. Among them:
[0143] (1) Action variable: represents the quality control object of the operator, an existing queue variable, of string type. If this operator is selected, this input item cannot be empty, and the name or code of the quality control object variable, such as "gender", should be entered as input.
[0144] (2) Set range: indicates the value range of the action variable data, and the type is a string. Enter one or more characters. When there are multiple characters, use English commas "," to separate them. For example, "Unknown gender, male, female, unspecified gender" is used as input to limit the value range of the gender variable. If the action variable data is not within the set range, it means that the data has quality control problems, and the action variable and data are returned.
[0145] The intelligent queue quality control operator library includes three quality control operators: univariate outlier detection operator, bivariate outlier detection operator, and follow-up timeliness detection operator.
[0146] The single variable outlier detection operator is applicable to numerical variables and detects a single variable. The configuration items include: action variable, detection method, and method parameters. If the method parameters are brought into the detection method and the action variable data is calculated and returned, it does not meet the quality control conditions, and the problem type of the action variable data returned is abnormal. Among them:
[0147] (1) Action variable: represents the quality control object of the operator, an existing numeric queue variable, of string type. If this operator is selected, this input item cannot be empty, and the name or code of the quality control object variable should be entered.
[0148] (2) Detection method: indicates the calculation method used to detect abnormal values of the action variable. The type is optional and the options include: standard deviation method and deviation method. The calculation steps of the standard deviation method are: Assume that x i is the detection value, is the mean value of the action variable, S is the standard deviation of the action variable, and α is the input method parameter. If The detected value is an abnormal value and is returned. Calculation steps of the deviation method: Assume that x i is the detection value, is the mean value of the effect variable, is the average deviation of the action variable, α is the input method parameter, if it satisfies Then the detected value is an abnormal value and is returned.
[0149] (3) Method parameter: represents the α corresponding to the calculation step in (2), the type is floating point type, the value range is 1-10, and the default value is 3.
[0150] The bivariate outlier detection operator is applicable to numerical variables and detects two variables. The configuration items include: action variables, auxiliary variables, detection methods, and method parameters. If the method parameters are brought into the detection method and the action variable data is calculated and returned, it does not meet the quality control conditions, and the problem type of the action variable data returned is abnormal. Among them:
[0151] (1) Action variable: represents the quality control object of the operator, an existing numeric queue variable, of string type. If this operator is selected, this input item cannot be empty, and the name or code of the quality control object variable should be entered.
[0152] (2) Auxiliary variable: represents a variable used to assist the action variable in outlier detection. It is an existing numeric or categorical queue variable of string type. If this operator is selected, this input item cannot be empty. The name or code of the quality control object variable should be entered.
[0153] (3) Detection method: indicates the calculation method used to detect abnormal values of the action variable. The type is selective, and the options include: standard deviation method, deviation method, and regression method. When the auxiliary variable is a categorical variable, the standard deviation method and deviation method can be selected. Calculation steps: Assume that x i is the detection value, and the category number of the corresponding auxiliary variable is j. is the average value of the effect variable in class j, S j is the standard deviation of the action variable in class j, α is the input method parameter, if The detected value is an abnormal value and is returned. Calculation steps of the deviation method: Assume that x i is the detection value, and the category number of the corresponding auxiliary variable is j. is the average value of the effect variable in class j, is the average deviation of the action variable in class j, α is the input method parameter, if The test value is an outlier and is returned. When the auxiliary variable type is a numerical variable, the regression method can be selected. Method steps: Use the auxiliary variable as the independent variable and the action variable as the dependent variable, use RANSAC regression (random sampling consistency regression) to fit a linear regression, input the test value into the regression, and if the predicted value is outside the 95% confidence interval, the test value is an outlier and is returned.
[0154] (4) Method parameter: represents the α corresponding to the calculation step in (3), the type is floating point type, the value range is 1-10, and the default value is 3.
[0155] The follow-up timeliness detection operator is applicable to follow-up variables, covering all variable types, to check whether there are omissions in the collection of follow-up data. Configuration items include: action variables. Through the follow-up time anomaly detection algorithm, intelligent verification is performed to check whether there are omissions in the follow-up of the investigator. If the algorithm calculates and returns an abnormality for the action variable of an investigator, it does not meet the quality control conditions, and the problem type of the action variable data returned is abnormal. Among them:
[0156] (1) Action variable: represents the quality control object of the operator, an existing numeric queue variable, of string type. If this operator is selected, this input item cannot be empty, and the name or code of the quality control object variable should be entered.
[0157] (2) The calculation steps of the follow-up time anomaly detection algorithm are as follows: First, the unique identification code of the survey subject is used as the group to obtain m groups, each group is represented by i (i = 1,...m); then the collection time of the effect variable data of each group is arranged from small to large, and the jth (j = 1, 2..) follow-up is determined, and the interval d between the collection time of this follow-up and the collection time of the next follow-up is calculated. ij ; Finally, for the jth (j=1,2..) follow-up, calculate the average interval days of group m and the standard deviation of the interval days S j , if there is a j-th follow-up of a certain survey subject This means that the subject had abnormalities in the j+1th follow-up.
[0158] Step S6, the high-level data quality control result is returned. The high-level data quality control result is returned, including the patient unique identification code, acquisition time, variable name, variable code, operator ID, operator name, and problem type (error, exception), as shown in Table 11.
[0159] Table 11 Some advanced data quality control results
[0160]
[0161]
[0162] In order to adapt to the characteristics of cohort study data and monitor data quality, the present invention provides a quality control method suitable for population cohort study data, which performs automated intelligent verification of collected cohort data, checks and discovers problems with the integrity, uniqueness, accuracy, and logic of cohort data, thereby promoting the improvement of cohort data quality. Its advantages are: first, it not only supports rule-based quality control operators, covering complex logic strategies such as calculation expressions and regular expressions, but also supports a variety of intelligent cohort data quality control operators, and automatically discovers problematic data from data based on inferential statistical methods;
[0163] Secondly, it adapts to the characteristics of cohort study data, can perform intelligent quality control on follow-up variables, and discover timeliness issues of follow-up; thirdly, a BERT-based cohort variable type recognition method is designed to automatically identify the data type of cohort variables. In short, this method is independent of the cohort data source for data quality control, and the method is diverse and practical, which is easy to promote and use in different regions.
[0164] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A data quality control method for population cohort study data, characterized in that: The following steps are involved: Step S1, cohort data acquisition, i.e., acquiring data from a cohort data source, wherein the cohort data fields include the unique identification code of the survey subject, collection time, variable name, variable code, whether it is a follow-up variable, whether it is a key variable, result, and result unit; Step S2, basic data quality control, that is, performing necessary data quality control on the queue data, troubleshooting integrity and uniqueness issues, including integrity check and uniqueness check, and obtaining basic data quality control results; Step S3, returning the basic data quality control results, that is, returning the basic data quality control results, including the survey subject's unique identification code, collection time, variable name, variable code and question type; Step S4, variable type identification, building a BERT-based queue variable type identification model for automatically identifying queue variable types, the queue variable types include: time variables, categorical variables, numerical variables, storage path variables and text variables, and then returning the variable type identification result, including variable name, variable code, and variable type; Step S5, advanced data quality control, that is, further perform data quality control on the queue data to identify accuracy and logic problems, select any quality control operator from the rule queue quality control operator library and the intelligent queue quality control operator library for configuration, fill in the configuration items respectively, and calculate to obtain the advanced data quality control results; Step S6, the high-level data quality control result is returned, and the high-level data quality control result is returned, including the patient's unique identification code, collection time, variable name, variable code, operator ID, operator name, and question type.
2. A data quality control method for population cohort study data according to claim 1, characterized in that: The queue data field in step S1, wherein: The unique identification code of the survey subject, including resident ID card number, medical insurance card number, and EMPI; The collection time is used to indicate the collection time of variable data, including questionnaire collection time and sample collection time; The variable name is the specific name of the queue collection item and is unique; The variable code is the code corresponding to the specific name of the queue collection item, which is automatically generated according to the variable name and is unique; The variable of whether to follow up is whether the cohort collection item has a follow-up attribute; The key variable is whether the cohort collection items are the content that must be collected in the cohort study; The results are the data collection results of the cohort collection project; The result unit is the unit corresponding to the queue collection item result.
3. A data quality control method for population cohort study data according to claim 1, characterized in that: In the integrity check of the basic data quality control in step S2, for each variable, if data with null values is found through traversal, the problem type returned is common missing; for each survey object, if not all key variables have results and are not null, the problem type returned is key missing; for the uniqueness check, for each variable, if data with exactly the same collection time and results is found through traversal, the problem type returned is duplicate.
4. A data quality control method for population cohort study data according to claim 1, characterized in that: The BERT-based queue variable type identification method in the variable type identification in step S4 includes model construction and model identification, wherein: Model building includes the following steps: Step S401, labeling data variable types, i.e., obtaining multiple cohort research and medical disease datasets, labeling each field of the collected data as one of the five cohort variable types, and forming five groups of field data; Step S402, generating a training data set, that is, each group of variable data constitutes a training sample, and each of the five groups of field data generates 10,000 training samples as a training data set; Step S403, model training and storage, that is, using the training data set to perform model fine-tuning training on the BERT classification model, and storing the trained model structure to form a queue variable type recognition model; Model identification includes the following steps: Step S411, generating a single variable prediction sample, generating a prediction sample set of the variable from a single variable; Step S412, single variable type identification, that is, the prediction sample set of the variable is sequentially input into the saved queue variable type identification model to obtain 7 prediction labels, and the prediction label with the largest number of occurrences is taken as the identification type of the variable data; Step S413, multiple variable type identification, repeating steps S411 and S412, identifying each queue variable, and returning the identification result; Step S414, multiple variable type confirmation, manually confirm the recognition result of step S413, correct the recognition result found to be incorrect by manual verification, and finally generate the variable type recognition result, including variable name, variable code, and recognized variable type.
5. A data quality control method for population cohort study data according to claim 1, characterized in that: The queue variable type, where: Time variables store data in time format, including date of birth and sample collection time; Categorical variables store categorical data represented by categories, including gender, city, and education level; Numeric variables store numeric data in formats including integer and floating point. The data include height, weight, systolic blood pressure, and diastolic blood pressure. The storage path variable is used to point to the computer storage path of files related to the cohort study, including pictures, audio, video, biological sample library, and genetic data; Text type variables are used to store other variables that do not conform to the above four types.
6. A data quality control method for population cohort study data according to claim 1, characterized in that: The rule queue quality control operator library includes expression operators, regular matching operators, and set range operators, among which: The expression operator is used to store numeric variables and time variables. The configuration items include: action variables, constraint variables, and expressions. If the action variable and constraint variable data are not within the constraint range of the expression, the quality control conditions are not met, and the problem type returned for the action variable data is error. The regular matching operator is used to store path variables and text variables. The configuration items include: action variables, regular expressions, and return types. If the regular expression is applied to variable data and returns a result, the quality control condition is not met, and the problem type of the action variable data is returned as an error. The collection range operator is used to store categorical variables; the configuration items include: action variables, collection range; if the collection range is applied to the variable data and there is a return, it does not meet the quality control conditions, and the problem type of the returned action variable data is an error.
7. A data quality control method for population cohort study data according to claim 1, characterized in that: The intelligent queue quality control operator library mainly targets numerical variables and follow-up variables, and intelligently discovers outliers based on statistical methods. It includes three quality control operators: univariate outlier detection operator, bivariate outlier detection operator, and follow-up timeliness detection operator. Among them: The single variable outlier detection operator is used for numerical variables and detects a single variable. The configuration items include: action variable, detection method, and method parameters. If the method parameters are brought into the detection method and the action variable data is calculated and returned, it does not meet the quality control conditions, and the problem type of the action variable data returned is abnormal. The bivariate outlier detection operator is used for numerical variables to detect two variables. The configuration items include: action variables, auxiliary variables, detection methods, and method parameters. If the method parameters are brought into the detection method and the action variable data is calculated and returned, it does not meet the quality control conditions, and the problem type of the action variable data returned is abnormal. The follow-up timeliness detection operator is used for follow-up variables, covering all variable types, to check whether there are omissions in the collection of follow-up data; the configuration items include: effect variables; through the follow-up time anomaly detection algorithm, intelligent verification is performed to check whether there are omissions in the follow-up of the investigator. If the follow-up time anomaly detection algorithm returns an anomaly in the calculation of an investigator's effect variable, it does not meet the quality control conditions, and the problem type of the returned effect variable data is abnormal.
8. A data quality control device for population cohort study data, characterized in that: It includes queue data acquisition module, basic data quality control module, basic data quality control result return module, variable type identification module, advanced data quality control module, and advanced data quality control result return module, among which: A cohort data acquisition module is used to acquire data from a cohort data source. The cohort data fields include a unique identification code of the survey subject, collection time, variable name, variable code, whether it is a follow-up variable, whether it is a key variable, result, and result unit; The basic data quality control module is used to perform necessary data quality control on the queue data, troubleshoot integrity and uniqueness issues, including integrity check and uniqueness check, and obtain basic data quality control results; The basic data quality control result return module is used to return the basic data quality control results, including the unique identification code of the survey object, collection time, variable name, variable code and question type; The variable type identification module is used to build a BERT-based queue variable type identification model for automatically identifying queue variable types, including time variables, categorical variables, numerical variables, storage path variables, and text variables, and then return the variable type identification result, including variable name, variable code, and variable type; The advanced data quality control module is used to further perform data quality control on the queue data, identify accuracy and logic problems, select any quality control operator from the rule queue quality control operator library and the intelligent queue quality control operator library for configuration, fill in the configuration items respectively, and calculate the advanced data quality control results; The advanced data quality control result return module is used to return the results of advanced data quality control, including the patient's unique identification code, collection time, variable name, variable code, operator ID, operator name, and question type.
