Abnormal data detection method and device, electronic device and storage medium
Through the abnormal data detection method, the trend change training model of multiple data dimensions is used to identify and display abnormal data in health files, solving the problem of difficult data comparison in the existing technology, and improving the accuracy of diagnosis and decision support.
Patent Information
- Application Number
- CN202111233498.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-22
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-10-22
AI Technical Summary
Data in existing health records are expressed in text form, making it difficult for doctors to view and compare the data, and is not conducive to auxiliary diagnosis.
The anomaly data detection method is used to obtain the data to be detected in multiple data dimensions, and use a pre-built anomaly detection model to train the model to identify changes in data trends, determine whether the data contains abnormal data, and display the abnormal data.
It improves the accuracy of abnormal data detection, facilitates relevant personnel to compare abnormal data, provides decision support, and enhances the visual display and comparison capabilities of data.
Smart Images

Figure CN113990512B_ABST
Abstract
Description
Background Art
[0002] With the rapid development of Internet technology, Internet applications have penetrated into all walks of life. For example, in the medical and health scenario, the health records in Internet hospitals are important information content for customers and an important basis for doctors to make correct consultations. At present, most of the data in health records are displayed in text form and expressed in linear form. Health data in this form is not conducive to doctors viewing and comparing data. In addition, it also brings inconvenience in scenarios where data comparison is needed to assist in diagnosis.
[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0004] The purpose of the present disclosure is to provide an abnormal data detection method, an abnormal data detection device, an electronic device and a computer-readable storage medium, thereby at least to a certain extent overcoming the problem that the accuracy of data anomaly detection is low and it is not conducive to auxiliary decision-making based on abnormal data.
[0005] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present invention.
[0006] According to a first aspect of the present disclosure, there is provided a method for detecting abnormal data, comprising: obtaining data to be detected; the data to be detected includes multiple data dimensions; obtaining a pre-built abnormality detection model; the abnormality detection model is obtained by training trend changes between training data of multiple different data dimensions; the data to be detected is input into the abnormality detection model to determine whether the data to be detected contains abnormal data, so as to display the abnormal data.
[0007] In an exemplary embodiment of the present disclosure, in response to a data selection operation on a data selection page, detection parameters corresponding to the data selection operation are obtained; corresponding detection parameter values are obtained from initial user data based on the detection parameters; and multiple data dimensions are generated based on multiple detection parameters and their corresponding detection parameter values to obtain data to be detected.
[0008] In an exemplary embodiment of the present disclosure, an anomaly detection model is trained by the following steps: obtaining initial training data; the initial training data includes multiple data dimensions; filling missing data for data values of each data dimension in the initial training data to obtain filled training data; determining a data difference set corresponding to multiple data dimensions in the filled training data; and training the initial model according to the data difference set to obtain an anomaly detection model.
[0009] In an exemplary embodiment of the present disclosure, missing data is filled in the data values of each data dimension in the initial training data to obtain filled training data, including: determining the missing training data based on the initial training data, determining reference filled training data corresponding to the missing training data; and performing missing data filling processing on the missing training data according to the reference filled training data to obtain filled training data.
[0010] In an exemplary embodiment of the present disclosure, a data difference set corresponding to multiple data dimensions in the filled training data is determined, including: performing dimension combination processing on the filled training data based on the data dimensions to obtain combined dimension data; performing matrix transformation processing on the combined dimension data to obtain matrix transformation data; determining the column data variance corresponding to each column data in the matrix transformation data; and determining the data difference set based on the multiple column data variances.
[0011] In an exemplary embodiment of the present disclosure, an initial model is trained according to a data difference set to obtain an anomaly detection model, including: inputting the data difference set into the initial model, and the initial model determining training anomalies corresponding to the filled training data based on the data difference set; determining model parameters and trend change metrics of the initial model; determining anomaly classification accuracy corresponding to the training anomalies based on the trend change metrics; training the initial model by adjusting the model parameters and the trend change metrics to obtain an anomaly detection model; the anomaly classification accuracy of the anomaly detection model is greater than a classification accuracy threshold.
[0012] In an exemplary embodiment of the present disclosure, displaying abnormal data includes: generating an initial comparison chart based on the data to be detected; determining abnormal data information corresponding to the abnormal data; the abnormal data information includes row and column information; adding abnormal display annotations of the abnormal data in the initial comparison chart based on the row and column information to generate a target comparison chart, and displaying the abnormal data through the target comparison chart.
[0013] According to a second aspect of the present disclosure, there is provided an abnormal data detection device, comprising: a data acquisition module, used to acquire data to be detected; the data to be detected includes multiple data dimensions; a model acquisition module, used to acquire a pre-built abnormality detection model; the abnormality detection model is obtained by training trend changes between training data of multiple different data dimensions; and an abnormality detection module, used to input the data to be detected into the abnormality detection model, determine whether the data to be detected contains abnormal data, and display the abnormal data.
[0014] In an exemplary embodiment of the present disclosure, the abnormal data detection device also includes a data generation module, which is used to obtain detection parameters corresponding to the data selection operation in response to the data selection operation on the data selection page; obtain corresponding detection parameter values from the initial user data according to the detection parameters; and generate multiple data dimensions based on multiple detection parameters and their corresponding detection parameter values to obtain data to be detected.
[0015] In an exemplary embodiment of the present disclosure, the abnormal data detection device also includes a model training module, which is used to obtain initial training data; the initial training data includes multiple data dimensions; the missing data is filled in the data values of each data dimension in the initial training data to obtain filled training data; the data difference set corresponding to the multiple data dimensions in the filled training data is determined; the initial model is trained according to the data difference set to obtain an abnormal detection model.
[0016] In an exemplary embodiment of the present disclosure, the model training module includes a data filling unit, which is used to determine missing training data based on initial training data, determine reference filling training data corresponding to the missing training data; and perform missing data filling processing on the missing training data according to the reference filling training data to obtain filled training data.
[0017] In an exemplary embodiment of the present disclosure, the model training module includes a difference determination unit, which is used to perform dimension combination processing on the filling training data based on the data dimension to obtain combined dimension data; perform matrix transformation processing on the combined dimension data to obtain matrix transformation data; determine the column data variance corresponding to each column data in the matrix transformation data; and determine a data difference set based on multiple column data variances.
[0018] In an exemplary embodiment of the present disclosure, the model training module includes a model training unit, which is used to input a data difference set into an initial model, and the initial model determines the training outliers corresponding to the filled training data based on the data difference set; determines the model parameters and trend change measurement values of the initial model; determines the anomaly classification accuracy corresponding to the training outliers based on the trend change measurement values; trains the initial model by adjusting the model parameters and the trend change measurement values to obtain an anomaly detection model; the anomaly classification accuracy of the anomaly detection model is greater than the classification accuracy threshold.
[0019] In an exemplary embodiment of the present disclosure, the abnormal data detection device also includes a comparison chart generation module, which is used to generate an initial comparison chart based on the data to be detected; determine the abnormal data information corresponding to the abnormal data; the abnormal data information includes row and column information; add abnormal display annotations of the abnormal data in the initial comparison chart based on the row and column information to generate a target comparison chart, and display the abnormal data through the target comparison chart.
[0020] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the abnormal data detection method according to any one of the above items is implemented.
[0021] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the abnormal data detection method according to any one of the above items is implemented.
[0022] The technical solution provided by the present disclosure may have the following beneficial effects:
[0023] The abnormal data detection method in the exemplary embodiment of the present disclosure obtains the data to be detected; the data to be detected includes multiple data dimensions; a pre-built abnormality detection model is obtained; the abnormality detection model is obtained by training the trend changes between training data of multiple different data dimensions; the data to be detected is input into the abnormality detection model to determine whether the data to be detected contains abnormal data to display the abnormal data. On the one hand, the abnormality detection model is obtained by learning the trend changes between different data dimensions, and the detection results obtained by abnormal data detection by the abnormality detection model are more accurate. On the other hand, the determined abnormal data is displayed to facilitate relevant personnel to compare the abnormal data with other data to provide decision support based on the comparison results.
[0024] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0026] Figure 1 A flowchart of an abnormal data detection method according to an exemplary embodiment of the present disclosure is schematically shown;
[0027] Figure 2 A model training flow chart of an anomaly detection model according to an exemplary embodiment of the present disclosure is schematically shown;
[0028] Figure 3 A flowchart of performing data filling processing on initial training data to obtain filled training data according to an exemplary embodiment of the present disclosure is schematically shown;
[0029] Figure 4 A flowchart of determining a data difference set according to an exemplary embodiment of the present disclosure is schematically shown;
[0030] Figure 5 A flowchart of displaying abnormal data through a target comparison chart according to an exemplary embodiment of the present disclosure is schematically shown;
[0031] Figure 6 A block diagram schematically shows an abnormal data detection device according to an exemplary embodiment of the present disclosure;
[0032] Figure 7 A block diagram schematically shows an electronic device according to an exemplary embodiment of the present disclosure;
[0033] Figure 8 A schematic diagram of a computer-readable storage medium according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0034] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0035] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known structures, methods, devices, implementations, materials or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.
[0036] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or these functional entities or parts of functional entities may be implemented in one or more software hardened modules, or these functional entities may be implemented in different networks and / or processor devices and / or microcontroller devices.
[0037] Currently, most of the data in health records are displayed in text form and expressed in linear form. This form of representation of health data is not conducive to doctors viewing and comparing the data. In addition, it also brings inconvenience in scenarios where data comparison is needed to assist in diagnosis.
[0038] Based on this, in this example embodiment, firstly, an abnormal data detection method is provided. The abnormal data detection method of the present disclosure can be implemented by using a server, or by using a terminal device. The terminal described in the present disclosure may include mobile terminals such as mobile phones, tablet computers, laptop computers, PDAs, and personal digital assistants (PDAs), as well as fixed terminals such as desktop computers. Figure 1 The following is a schematic diagram showing the process of abnormal data detection method according to some embodiments of the present disclosure. Figure 1 , the abnormal data detection method may include the following steps:
[0039] Step S110, obtaining data to be detected; the data to be detected includes multiple data dimensions.
[0040] In some exemplary embodiments of the present disclosure, the data to be detected may be data that changes dynamically over time. The data to be detected is detected to determine whether it contains abnormal data. The data to be detected may include multiple data dimensions, and there is a certain correlation between the specific data values corresponding to different data dimensions, such as a positive correlation or negative correlation between data in different data dimensions.
[0041] For example, in a medical and health scenario, the data to be tested can be the health data of a certain user, that is, the data obtained after a health check of the user's physical indicators. The health data can include the user's weight, blood sugar, blood lipids, blood pressure, heart rate, pulse, blood oxygen saturation, red blood cells, white blood cells and other data related to health indicators. A hospital can store the health data of all patients in a medical database. If you want to obtain the health data of a certain user in a certain period of time, you can select the corresponding health data as the data to be tested based on the patient ID.
[0042] In other scenarios, the data to be detected may also be data corresponding to the scenario, for example, the data to be detected may be operating indicator data of a processor, etc. This disclosure will take health data as an example to explain the process of abnormal data detection in detail.
[0043] Step S120, obtaining a pre-built anomaly detection model; the anomaly detection model is obtained by training trend changes between training data of multiple different data dimensions.
[0044] In some exemplary embodiments of the present disclosure, the anomaly detection model may be a data analysis model for determining whether the data to be detected contains abnormal data and determining the abnormal data. Data dimensions may be used to express the specific meaning of training data. Taking health data as an example, blood sugar data and blood pressure data may be data of different data dimensions. Training fill data may be data used to train anomaly detection models. Training fill data may be data obtained after data cleaning (such as data filling processing). Trend changes may reflect changes in data values between multiple different data dimensions in training data.
[0045] Before performing anomaly detection on the data to be detected, an anomaly detection model can be pre-built. Since the anomaly detection model is trained based on the trend changes between multiple data dimensions in the training fill data, the anomaly detection model can learn the correlation characteristics between the trend changes of data values in different data dimensions.
[0046] Step S130, inputting the data to be detected into the anomaly detection model to determine whether the data to be detected contains abnormal data, so as to display the abnormal data.
[0047] In some exemplary embodiments of the present disclosure, abnormal data may be data with abnormal conditions in the data to be detected. When a specific data value in a data dimension does not conform to the overall change trend between multiple data dimensions, the data may be considered abnormal data.
[0048] After obtaining the data to be detected and the anomaly detection model, the data to be detected can be input into the anomaly detection model so that the anomaly detection model can perform anomaly detection on the data to be detected based on the learned correlation characteristics of the trend changes between the data values of different data dimensions, and determine the abnormal data in the data to be detected. After determining the abnormal data, the data to be detected can be displayed as a whole. In addition, in order to distinguish between normal data and abnormal data in the data to be detected, the abnormal data and normal data can be displayed separately so that relevant personnel can make corresponding decisions based on the specially marked abnormal data.
[0049] According to the abnormal data detection method in this example embodiment, on the one hand, the abnormal detection model is trained by learning the trend changes between different data dimensions, and the detection results obtained by abnormal data detection by the abnormal detection model are more accurate. On the other hand, the determined abnormal data is displayed to facilitate relevant personnel to compare the abnormal data with other data, so as to provide decision support based on the comparison results.
[0050] The abnormal data detection method in this example embodiment will be further described below.
[0051] In an exemplary embodiment of the present disclosure, in response to a data selection operation on a data selection page, detection parameters corresponding to the data selection operation are obtained; corresponding detection parameter values are obtained from initial user data based on the detection parameters; and multiple data dimensions are generated based on multiple detection parameters and their corresponding detection parameter values to obtain data to be detected.
[0052] The data selection page may be an operation page for receiving a data selection operation of a user. The data selection operation may be an operation process of a user detecting a parameter. The detection parameter may be a parameter to be detected selected by a user from a plurality of parameters. The initial user data may be original data stored in a database. The detection parameter value may be a specific data value corresponding to the detection parameter.
[0053] When performing anomaly detection on certain data, you can first select the parameters to be detected through the data selection page. The user can perform data selection operations on the data selection page to determine the detection parameters for data detection. After determining the detection parameters, you can select an observation time period, obtain the detection parameter values corresponding to the detection parameters in the observation time period from the initial user data, and generate the data to be detected based on the detection parameters and the corresponding detection parameter values for anomaly detection.
[0054] Taking the medical and health scenario as an example, when observing a patient's health data, medical staff can select the vital signs data they want to test through the health record page. For example, medical staff can select parameters such as "blood sugar" and "blood pressure" from the health data, and obtain the parameter values of these parameters, and generate the data to be tested based on these parameters and parameter values.
[0055] In an exemplary embodiment of the present disclosure, an anomaly detection model is trained by the following steps: obtaining initial training data; the initial training data includes multiple data dimensions; filling missing data for data values of each data dimension in the initial training data to obtain filled training data; determining a data difference set corresponding to multiple data dimensions in the filled training data; and training the initial model according to the data difference set to obtain an anomaly detection model.
[0056] The initial training data may be data used for model training of the anomaly detection model, and the initial training data may be data that has not been cleaned. Missing data filling may be a process of filling specific data values in existing data locations when data values of a certain data dimension are missing. The data difference set may be a set of data differences corresponding to all data dimensions in the filled training data.
[0057] refer to Figure 2 , Figure 2The model training flow chart of the anomaly detection model according to the exemplary embodiment of the present disclosure is schematically shown. In step S210, initial training data is obtained; the initial training data includes multiple data dimensions. Before training the anomaly detection model, the initial training data can be obtained first. Since the initial training data can be the original health data directly obtained from the database, the initial training data may have problems such as missing data. Therefore, the initial training data can be cleaned (such as data filling processing).
[0058] In step S220, missing data is filled in the data values of each data dimension in the initial training data to obtain filled training data. When there is missing data in the initial training data, the initial training data can be processed for data filling. For example, taking the data of the three data dimensions of "blood sugar", "blood lipids" and "blood pressure" in the initial training data as an example, the time interval of the initial training data is one week. If the data value on Tuesday in the "blood sugar" dimension is missing, the missing data needs to be filled. Specifically, the data values corresponding to Monday and Wednesday in the "blood sugar" dimension can be obtained, and the average of these two data values can be calculated, and the calculated average value can be filled into the missing position. According to the above filling method, all missing positions in the initial training data can be filled with data to obtain filled training data.
[0059] In step S230, a data difference set corresponding to multiple data dimensions in the filling training data is determined. After the filling data is obtained, a data difference set consisting of the data difference corresponding to each data dimension in the filling training data can be determined.
[0060] In step S240, the initial model is trained according to the data difference set to obtain an anomaly detection model. After the data difference set is determined, the initial model can be trained with the data difference set, so that the characteristics of the trend changes of the differences between different dimensions can be learned during the model training process, so as to obtain the anomaly detection model based on the characteristic training. If the anomaly detection model is not used for data anomaly detection, the abnormal data detection process may rely on unprocessed data sets such as [blood sugar 1, blood lipid 2, white blood cell 3] and [blood sugar 2, blood lipid 3, white blood cell 4]. At this time, three features are needed to judge the abnormal situation. If the anomaly detection model is used, only one feature (i.e., data difference) is needed to determine whether there is abnormal data in the data to be detected.
[0061] In an exemplary embodiment of the present disclosure, missing training data is determined based on initial training data, and reference filling training data corresponding to the missing training data is determined; the missing training data is filled with missing data according to the reference filling training data to obtain filled training data.
[0062] The missing training data may be data in which certain data record points in the initial training data are missing specific data values. The reference filling training data may be reference data that can be used to fill in the missing training data. The missing data filling process may be a process of filling in the missing training data.
[0063] refer to Figure 3 , Figure 3 A flowchart of performing data filling processing on initial training data to obtain filled training data according to an exemplary embodiment of the present disclosure is schematically shown.
[0064] In step S310, the missing training data is determined based on the initial training data, and the reference filling training data corresponding to the missing training data is obtained. Since there may be missing data in the initial training data directly obtained, the missing data can be determined as missing training data. For example, if the data of the seven days of the week in the "blood sugar" dimension are missing on Tuesday and Saturday, they can be determined as missing training data. After determining the missing training data, the corresponding reference filling training data can be determined. For example, the reference filling training data can be the two most adjacent data of the missing training data. The reference filling training data corresponding to the missing data on Tuesday can be the data values corresponding to Monday and Wednesday in the "blood sugar" dimension. In addition, the reference filling training data can also be all data with data values within the data record range, that is, the reference filling training data corresponding to the missing data on Tuesday can be the data values corresponding to the record points on Monday, Wednesday, Thursday, Friday, and Sunday in the "blood sugar" dimension.
[0065] In step S320, the missing training data is filled with missing data according to the reference filling training data to obtain the filled training data. After the reference filling training data is determined, the missing training data can be filled with missing data according to the reference filling training data. For example, the reference filling training data can be averaged and the average value obtained is used as the data value written when the missing data filling process is performed.
[0066] In an exemplary embodiment of the present disclosure, dimension combination processing is performed on the filled training data based on the data dimension to obtain combined dimension data; matrix transformation processing is performed on the combined dimension data to obtain matrix transformation data; the column data variance corresponding to each column data in the matrix transformation data is determined; and a data difference value set is determined based on multiple column data variances.
[0067] Among them, the dimension combination processing can be a processing process of combining data of multiple data dimensions. The combined dimension data can be interrelated data dimensions obtained by combining two or more data dimensions during data filling processing. The matrix conversion processing can be a processing process of converting the row and column information of the determined filling training data into a corresponding matrix form. The matrix conversion data can be a matrix obtained after performing matrix conversion processing on the filling training data. The column data variance can be the data variance determined based on all data in a column in the matrix conversion data.
[0068] refer to Figure 4 , Figure 4 The flowchart of determining a data difference set according to an exemplary embodiment of the present disclosure is schematically shown. In step S410, the data of each data dimension is traversed, and multiple data dimensions are combined to obtain a combined dimension. The data to be detected may contain data of multiple data dimensions. When performing data cleaning, the data of all data dimensions can be traversed first, and different data dimensions can be combined, such as combining data dimensions in pairs to form corresponding combined dimension data. Specifically, when forming combined dimensional data, the specific time point of the data record can be used as the x-axis of the coordinate axis, and each data dimension can be used as the y-axis of the coordinate axis. For example, the data of the "blood pressure" dimension of a certain user for seven days in a week can be [120, 125, 128, 131, 125, 130, 125]; the data of the "blood sugar" dimension for seven days in a week can be [6.1, 6.3, 6.5, 6.6, 6.3, 6.5, 6.6]; the data of the "blood lipid" dimension for seven days in a week can be []; the data of the "white blood cell" dimension for seven days in a week can be [9.1, 9.2, 9.5, 9.3, 9.5, 9.8, 9.4].
[0069] In some other exemplary embodiments of the present disclosure, the number of combined dimensions can also be determined according to specific needs. For example, the combined data dimensions can be 3, 4, 5, etc. The present disclosure does not impose any special limitation on the number of data dimensions to be combined. The use of any number of data dimension combinations to generate combined dimension data falls within the scope of protection of the present disclosure.
[0070] In step S420, matrix conversion processing is performed on the combined dimension data to obtain matrix conversion data. After obtaining the combined dimension data, matrix conversion processing can be performed on the combined dimension data to obtain corresponding matrix conversion data. Taking the data of the three dimensions of blood sugar, blood lipids, and white blood cells for seven days in a week as an example, the matrix conversion data obtained is shown in Formula 1:
[0071] (Formula 1)
[0072] In step S430, the column data variance corresponding to each column data in the matrix conversion data is determined. After obtaining the matrix conversion data, the variance of each matrix column can be calculated to obtain the difference data of blood sugar, blood lipids and white blood cells. First, the column data variance of the first column data is calculated. The column data variance of the first column data is: (|6.1-6.3|)²+(|6.3-9.1|)² =0.04+7.84=7.88; the column data variance of the second column data is: (|6.3-6.5|)²+(|6.5-9.2|)² =0.04+7.29=7.33; and so on to calculate the difference of all column data of the three dimensions for 7 days.
[0073] In step S440, a data difference set is determined according to the multiple column data variances. After the column data variance of each column data corresponding to the combined dimensional data is obtained, a data difference set can be generated according to the obtained multiple column data variances.
[0074] In an exemplary embodiment of the present disclosure, a data difference set is input into an initial model, and the initial model determines training outliers corresponding to the filled training data based on the data difference set; model parameters and trend change metrics of the initial model are determined; anomaly classification accuracy corresponding to the training outliers is determined based on the trend change metrics; the initial model is trained by adjusting the model parameters and trend change metrics to obtain an anomaly detection model; the anomaly classification accuracy of the anomaly detection model is greater than a classification accuracy threshold.
[0075] The training anomaly value uses the initial model to determine the data value with anomalies in the training data during the model training process. The trend change measurement value can be a boundary value used to determine whether the training data is normal data or abnormal data by measuring the trend change characteristics. The model parameter can be a parameter corresponding to the initial model. The anomaly classification accuracy can be the accuracy of correctly classifying the abnormal data in the verification data. The classification accuracy threshold can be a value compared with the anomaly classification accuracy.
[0076] The data difference set is input into the initial model, and the initial model can use the logistic regression algorithm for model training. The initial model learns the variance characteristics of the column data in the training filling data, and returns the value of the abnormal data based on the learned characteristics. For example, the trend change metric value can be determined as 0.5, that is, a return value of 0.5 or more is determined to be abnormal, and a return value of 0.5 or less is determined to be normal. The present disclosure can use 0.5 as the initial metric value to determine the accuracy of the abnormal classification of the model for abnormal data when 0.5 is used as the boundary. If the accuracy of the abnormal classification is too low, the boundary value is adjusted until the accuracy reaches more than 90%, and the model at this time is determined as the final anomaly detection model for use in data anomaly detection.
[0077] In some other embodiments of the present disclosure, other algorithms may also be used for model training during the model training process, and the present disclosure does not impose any special limitation on the specific algorithm used for model training.
[0078] In an exemplary embodiment of the present disclosure, an initial comparison chart is generated based on the data to be detected; abnormal data information corresponding to the abnormal data is determined; the abnormal data information includes row and column information; abnormal display annotations of the abnormal data are added to the initial comparison chart based on the row and column information to generate a target comparison chart, and the abnormal data is displayed through the target comparison chart.
[0079] Among them, the initial comparison chart can be a visual display form of the data to be detected, and the data changes of the data to be detected can be more intuitively seen through the initial comparison chart. Abnormal data information can be relevant information contained in the abnormal data. For example, the abnormal data information can include specific data values, row and column information, etc. of the abnormal data. The row and column information can be the row information and column information corresponding to the abnormal data. The row information can represent the data dimension information, and the column information can represent the data recording point information. The abnormal display annotation can be an annotation used to distinguish abnormal data from other normal data. The target comparison chart can be a comparison chart containing abnormal display annotations.
[0080] refer to Figure 5 , Figure 5 The flowchart of displaying abnormal data through a target comparison chart according to an exemplary embodiment of the present disclosure is schematically shown. In step S510, an initial comparison chart is generated according to the data to be detected. After selecting the data to be detected, an initial comparison chart corresponding to the data to be detected can be generated. For example, the data recording points of the data to be detected can be used as the x-axis unit, and the specific parameters can be used as the y-axis unit. Points are plotted in the coordinate axis to generate an initial comparison chart.
[0081] In step S520, abnormal data information corresponding to the abnormal data is determined; the abnormal data information includes row and column information. After the abnormal data is determined by the abnormal detection model, the row and column information corresponding to the abnormal data can be determined, such as the data record point and parameter meaning corresponding to the abnormal data.
[0082] In step S530, abnormal display annotations of abnormal data are added to the initial comparison chart according to the row and column information to generate a target comparison chart, and the abnormal data is displayed through the target comparison chart. After obtaining the row and column information, abnormal data annotations corresponding to the abnormal data are added to the initial comparison chart according to the row and column information to generate a target comparison chart. For example, the abnormal data annotation can be a red annotation or other annotation form. Displaying abnormal data through a target comparison chart can assist observers in determining whether there are possible problems and make corresponding decisions. For example, in a medical and health scenario, when there are abnormal data in the user's pending health data, the abnormal data can be marked in the target comparison chart. Medical staff can determine whether there are possible problems and whether the patient's condition is improving by checking the abnormal data annotations, so as to formulate the next treatment plan.
[0083] In summary, the abnormal data detection method disclosed in the present invention obtains the data to be detected; the data to be detected includes multiple data dimensions; a pre-built anomaly detection model is obtained; the anomaly detection model is obtained by training the trend changes between training data of multiple different data dimensions; the data to be detected is input into the anomaly detection model to determine whether the data to be detected contains abnormal data to display the abnormal data. On the one hand, the anomaly detection model is obtained by learning the trend changes between different data dimensions, and the detection results obtained by abnormal data detection by the anomaly detection model are more accurate. On the other hand, the determined abnormal data is displayed to facilitate relevant personnel to compare the abnormal data with other data to provide decision support based on the comparison results. On the other hand, through the data cleaning step, the training data is filled with data, so that the obtained anomaly detection model can be made more robust.
[0084] It should be noted that, although the steps of the method of the present invention are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0085] In addition, in this exemplary embodiment, an abnormal data detection device is also provided. Figure 6 The abnormal data detection device 600 may include: a data acquisition module 610, a model acquisition module 620 and an abnormality detection module 630.
[0086] Specifically, the data acquisition module 610 is used to acquire the data to be detected; the data to be detected includes multiple data dimensions; the model acquisition module 620 is used to acquire a pre-built anomaly detection model; the anomaly detection model is obtained by training the trend changes between training data of multiple different data dimensions; the anomaly detection module 630 is used to input the data to be detected into the anomaly detection model to determine whether the data to be detected contains abnormal data, so as to display the abnormal data.
[0087] In an exemplary embodiment of the present disclosure, the abnormal data detection device also includes a data generation module, which is used to obtain detection parameters corresponding to the data selection operation in response to the data selection operation on the data selection page; obtain corresponding detection parameter values from the initial user data according to the detection parameters; and generate multiple data dimensions based on multiple detection parameters and their corresponding detection parameter values to obtain data to be detected.
[0088] In an exemplary embodiment of the present disclosure, the abnormal data detection device also includes a model training module, which is used to obtain initial training data; the initial training data includes multiple data dimensions; the missing data is filled in the data values of each data dimension in the initial training data to obtain filled training data; the data difference set corresponding to the multiple data dimensions in the filled training data is determined; the initial model is trained according to the data difference set to obtain an abnormal detection model.
[0089] In an exemplary embodiment of the present disclosure, the model training module includes a data filling unit, which is used to determine missing training data based on initial training data, determine reference filling training data corresponding to the missing training data; and perform missing data filling processing on the missing training data according to the reference filling training data to obtain filled training data.
[0090] In an exemplary embodiment of the present disclosure, the model training module includes a difference determination unit, which is used to perform dimension combination processing on the filling training data based on the data dimension to obtain combined dimension data; perform matrix transformation processing on the combined dimension data to obtain matrix transformation data; determine the column data variance corresponding to each column data in the matrix transformation data; and determine a data difference set based on multiple column data variances.
[0091] In an exemplary embodiment of the present disclosure, the model training module includes a model training unit, which is used to input a data difference set into an initial model, and the initial model determines the training outliers corresponding to the filled training data based on the data difference set; determines the model parameters and trend change measurement values of the initial model; determines the anomaly classification accuracy corresponding to the training outliers based on the trend change measurement values; trains the initial model by adjusting the model parameters and the trend change measurement values to obtain an anomaly detection model; the anomaly classification accuracy of the anomaly detection model is greater than the classification accuracy threshold.
[0092] In an exemplary embodiment of the present disclosure, the abnormal data detection device also includes a comparison chart generation module, which is used to generate an initial comparison chart based on the data to be detected; determine the abnormal data information corresponding to the abnormal data; the abnormal data information includes row and column information; add abnormal display annotations of the abnormal data in the initial comparison chart based on the row and column information to generate a target comparison chart, and display the abnormal data through the target comparison chart.
[0093] The specific details of the virtual modules of the above-mentioned abnormal data detection devices have been described in detail in the corresponding abnormal data detection methods, so they will not be repeated here.
[0094] It should be noted that although several modules or units of the abnormal data detection device are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.
[0095] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0096] Those skilled in the art will appreciate that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware embodiments, complete software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0097] Reference below Figure 7 An electronic device 700 according to such an embodiment of the present invention is described. Figure 7 The electronic device 700 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0098] like Figure 7 As shown, the electronic device 700 is in the form of a general computing device. The components of the electronic device 700 may include but are not limited to: the at least one processing unit 710, the at least one storage unit 720, a bus 730 connecting different system components (including the storage unit 720 and the processing unit 710), and a display unit 740.
[0099] The storage unit stores program codes, which can be executed by the processing unit 710, so that the processing unit 710 executes the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification.
[0100] The storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 721 and / or a cache memory unit 722 , and may further include a read-only memory unit (ROM) 723 .
[0101] The storage unit 720 may include a program / utility 724 having a set (at least one) of program modules 725, such program modules 725 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include an implementation of a network environment.
[0102] Bus 730 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0103] The electronic device 700 may also communicate with one or more external devices 770 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 700, and / or communicate with any device that enables the electronic device 700 to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication may be performed through an input / output (I / O) interface 750. In addition, the electronic device 700 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 760. As shown, the network adapter 760 communicates with other modules of the electronic device 700 through a bus 730. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0104] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.
[0105] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.
[0106] refer to Figure 8 As shown, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0107] The program product may be any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0108] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0109] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0110] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0111] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0112] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0113] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for detecting abnormal data, characterized in that: include: Acquire data to be detected; the data to be detected includes multiple data dimensions, and there is a correlation relationship between data values corresponding to the multiple data dimensions; Obtaining a pre-built anomaly detection model; the anomaly detection model is obtained by training trend changes between training data of multiple different data dimensions; the training data is obtained by data cleaning processing; Inputting the data to be detected into an anomaly detection model to determine whether the data to be detected contains abnormal data, so as to display the abnormal data; The anomaly detection model is trained by the following steps: Acquire initial training data; the initial training data includes multiple data dimensions; Filling missing data for data values of each of the data dimensions in the initial training data to obtain filled training data; Determine a data difference set corresponding to a plurality of the data dimensions in the filled training data; The initial model is trained according to the data difference set to obtain the anomaly detection model.
2. The method according to claim 1, characterized in that: The method further comprises: In response to a data selection operation on a data selection page, obtaining a detection parameter corresponding to the data selection operation; Acquiring corresponding detection parameter values from initial user data according to the detection parameters; A plurality of data dimensions are generated based on the plurality of detection parameters and the respective corresponding detection parameter values to obtain the data to be detected.
3. The method according to claim 1, characterized in that The step of filling missing data for the data values of each of the data dimensions in the initial training data to obtain filled training data includes: Determine missing training data based on the initial training data, and determine reference filling training data corresponding to the missing training data; The missing training data is processed by filling in missing data according to the reference filling training data to obtain the filled training data.
4. The method according to claim 1, characterized in that: The determining of a data difference set corresponding to a plurality of the data dimensions in the filling training data comprises: Performing dimension combination processing on the filled training data based on the data dimension to obtain combined dimension data; Performing matrix conversion processing on the combined dimensional data to obtain matrix conversion data; Determine the column data variance corresponding to each column data in the matrix conversion data; The data difference value set is determined according to a plurality of the column data variances.
5. The method according to claim 1, characterized in that The training of the initial model according to the data difference set to obtain the anomaly detection model includes: Inputting the data difference set into the initial model, and allowing the initial model to determine the training outlier values corresponding to the filled training data according to the data difference set; Determining model parameters and trend change measurement values of the initial model; Determining the anomaly classification accuracy corresponding to the training anomaly value based on the trend change metric value; The initial model is trained by adjusting the model parameters and the trend change metric value to obtain the anomaly detection model; the anomaly classification accuracy of the anomaly detection model is greater than a classification accuracy threshold.
6. The method according to claim 5, characterized in that After determining whether the data to be detected contains abnormal data, the method further includes: Generate an initial comparison chart according to the data to be detected; Determine abnormal data information corresponding to the abnormal data; the abnormal data information includes row and column information; An abnormal display mark of the abnormal data is added to the initial comparison chart according to the row and column information to generate a target comparison chart, and the abnormal data is displayed through the target comparison chart.
7. An abnormal data detection device, characterized in that: include: A data acquisition module, used to acquire data to be detected; the data to be detected includes multiple data dimensions, and there is a correlation relationship between data values corresponding to the multiple data dimensions; A model acquisition module is used to acquire a pre-built anomaly detection model; the anomaly detection model is obtained by training the trend changes between training data of multiple different data dimensions; The training data is obtained through data cleaning; An anomaly detection module, used for inputting the data to be detected into an anomaly detection model to determine whether the data to be detected contains abnormal data; The model acquisition module is further used to acquire initial training data; the initial training data includes multiple data dimensions; Filling missing data for data values of each of the data dimensions in the initial training data to obtain filled training data; Determine a data difference set corresponding to a plurality of the data dimensions in the filled training data; The initial model is trained according to the data difference set to obtain the anomaly detection model.
8. An electronic device, characterized in that: include: processor; as well as A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the abnormal data detection method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the abnormal data detection method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Abnormity detection method and device for petroleum pipeline signal, equipment and readable medium
CN109800627A
Fault prediction method for adaptive threshold of refrigeration equipment based on multi-algorithm fusion
CN110689075A
