Data detection method and device, equipment, storage medium and program product

By extracting and matching data features, it solves the problem of the impact of upstream data warehouse data problems on downstream systems, improves the accuracy and efficiency of data processing, and achieves accurate detection of upstream data.

CN118760725APending Publication Date: 2024-10-11CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410830607.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Data problems in the upstream data warehouse can easily affect the accuracy and timeliness of data processing in the downstream system. It is difficult to effectively monitor and detect these problems with existing technology.

Method used

By extracting the data characteristics of the target data, determine its data fingerprint, and conduct matching judgments based on preset conditions and historical data fingerprints to determine whether there are abnormalities in the data, thereby improving the accuracy and efficiency of data detection.

Benefits of technology

It achieves accurate detection of data provided by the upstream data warehouse, improves the accuracy and timeliness of data processing in downstream systems, and improves data detection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760725A_ABST
    Figure CN118760725A_ABST
Patent Text Reader

Abstract

The invention provides a data detection method and device, equipment, a storage medium and a program product. Relates to the technical field of data processing. The method comprises the steps that when an upstream data warehouse provides target data for a downstream system, data features of the target data are extracted, and data fingerprints of the target data are determined according to the data features of the target data; judging whether the data fingerprint of the target data meets a preset condition or not; when the data fingerprint of the target data does not meet the preset condition, judging that the target data is abnormal; when the data fingerprint of the target data meets a preset condition, whether the data fingerprint of the target data is matched with a historical data fingerprint is judged, and the historical data fingerprint is obtained according to data of an upstream data warehouse; if not, determining that the target data is abnormal; if yes, determining that the target data is normal. According to the scheme, the problem that if the data in the upstream data warehouse goes wrong, the accuracy and timeliness of data processing of the downstream system are easily affected is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of resource management technology, and in particular to a data detection method, device, equipment, storage medium and program product. Background Art

[0002] With the advent of the big data era, data warehouses have become the core foundation for data analysis in banks, Internet companies and other enterprises.

[0003] A data warehouse can integrate data obtained from different sources into a unified data store and provide the required data to downstream systems.

[0004] If there are problems with the data in the upstream data warehouse, it will easily affect the accuracy and timeliness of data processing in the downstream system. Summary of the invention

[0005] The present application provides a data detection method, apparatus, device, storage medium and program product to solve the problem that if there is a problem with the data in the upstream data warehouse, it is easy to affect the accuracy and timeliness of data processing in the downstream system.

[0006] In a first aspect, the present application provides a data detection method, comprising:

[0007] When the upstream data warehouse provides the target data to the downstream system, the data features of the target data are extracted, and the data fingerprint of the target data is determined according to the data features of the target data;

[0008] Determine whether the data fingerprint of the target data meets a preset condition;

[0009] When the data fingerprint of the target data does not meet the preset condition, it is determined that the target data is abnormal;

[0010] When the data fingerprint of the target data meets the preset conditions, it is determined whether the data fingerprint of the target data matches the historical data fingerprint; wherein the historical data fingerprint is obtained based on the data of the upstream data warehouse;

[0011] If there is no match, it is determined that the target data is abnormal; if there is a match, it is determined that the target data is normal.

[0012] In a possible design, before determining whether the data fingerprint of the target data meets a preset condition, the method further includes:

[0013] Obtaining preset conditions corresponding to each data type of the upstream data warehouse;

[0014] The determining whether the data fingerprint of the target data meets a preset condition includes:

[0015] Acquire a preset condition corresponding to the target data according to the data type of the target data;

[0016] Determine whether the data fingerprint of the target data meets the preset condition corresponding to the target data.

[0017] In a possible design, before determining whether the data fingerprint of the target data matches the historical data fingerprint, the method further includes:

[0018] Obtaining the data type of the upstream data warehouse and the data fingerprint of the historical data corresponding to each data type;

[0019] The determining whether the data fingerprint of the target data matches the data fingerprint of the historical data includes:

[0020] Determine the historical data fingerprint corresponding to the target data according to the data type of the target data;

[0021] Determine whether the data fingerprint of the target data matches the historical data fingerprint corresponding to the target data.

[0022] In a possible design, the determining whether the data fingerprint of the target data meets a preset condition includes:

[0023] A rule-based matching algorithm determines whether the data fingerprint of the target data meets a preset condition;

[0024] The determining whether the data fingerprint of the target data matches the historical data fingerprint includes:

[0025] A statistical matching algorithm is used to determine whether the data fingerprint of the target data matches the historical data fingerprint.

[0026] In a possible design, the determining whether the data fingerprint of the target data matches the historical data fingerprint includes:

[0027] Using the historical data fingerprint to train a preset model, the preset model includes at least one of the following: a tree model, a support vector machine model, and a logistic regression model;

[0028] The trained preset model is used to determine whether the data fingerprint of the target data matches the historical data fingerprint.

[0029] In a possible design, the using the historical data fingerprint to train the preset model includes:

[0030] Creating a corresponding feature extraction task according to the data type of the upstream data warehouse;

[0031] For each data type, all tables corresponding to the data type are obtained, data features corresponding to the data type are extracted according to a preset template, and historical data fingerprints corresponding to the data type are obtained according to the data features corresponding to the data type;

[0032] Perform feature engineering on the historical data fingerprint corresponding to each data type;

[0033] The processed historical data fingerprint is used to train the preset model.

[0034] In a possible design, the preset condition includes at least one of the following:

[0035] The data volume of the target data does not exceed the set data volume, the fields in the target data do not exceed the combination value of the set fields, the field type of the target data does not change, and the change in the overall data volume of the target data does not exceed the set change amount.

[0036] In a second aspect, the present application provides a data detection device, comprising:

[0037] A processing module, used for extracting data features of the target data when the upstream data warehouse provides the target data to the downstream system, and determining the data fingerprint of the target data according to the data features of the target data;

[0038] A first judgment module is used to judge whether the data fingerprint of the target data meets the preset conditions; when the data fingerprint of the target data does not meet the preset conditions, it is judged that the target data is abnormal;

[0039] The second judgment module is used to judge whether the data fingerprint of the target data matches the historical data fingerprint when the data fingerprint of the target data meets the preset conditions; if they do not match, it is judged that the target data is abnormal; if they match, it is judged that the target data is normal; wherein, the historical data fingerprint is obtained based on the data of the upstream data warehouse.

[0040] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the data detection method described in the first aspect and various possible designs of the first aspect.

[0041] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the data detection method described in the first aspect and various possible designs of the first aspect is implemented.

[0042] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the data detection method described in the first aspect and various possible designs of the first aspect.

[0043] The data detection method, device, equipment, storage medium and program product provided by the present application, when the upstream data warehouse provides target data to the downstream system, extracts the data features of the target data, determines the data fingerprint of the target data according to the data features of the target data; judges whether the data fingerprint of the target data meets the preset conditions; when the data fingerprint of the target data does not meet the preset conditions, judges that the target data is abnormal; when the data fingerprint of the target data meets the preset conditions, judges whether the data fingerprint of the target data matches the historical data fingerprint, wherein the historical data fingerprint is obtained based on the data of the upstream data warehouse; if they do not match, judges that the target data is abnormal; if they match, judges that the target data is normal. Since a simple detection is first performed on whether the data is abnormal through preset conditions, and then further judgment is made through the data fingerprint, it is possible to achieve accurate detection of the data provided by the upstream data warehouse, improve the accuracy and timeliness of data processing of the downstream system, and improve the detection efficiency of the data in the upstream data warehouse. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0045] Figure 1 This is an application scenario diagram of the data detection method applicable to the embodiment of the present application;

[0046] Figure 2 The process of the data detection method provided in the embodiment of the present application Figure 1 ;

[0047] Figure 3 The process of the data detection method provided in the embodiment of the present application Figure 2 ;

[0048] Figure 4 The process of the data detection method provided in the embodiment of the present application Figure 3 ;

[0049] Figure 5 A schematic diagram of the structure of a data detection device provided in an embodiment of the present application;

[0050] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0051] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0052] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0053] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.

[0054] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0055] Terminology explanation:

[0056] Data fingerprint: Extract the data features of a batch of data to form features that are different from other data batches, and use this feature as the data fingerprint of the data batch.

[0057] With the development of information technology, the amount of data generated by banks, Internet companies and other enterprises in the course of operation is very huge and is expanding day by day, and data warehouses are increasingly widely used. Upstream data warehouses can store a large amount of data and provide the required data for downstream systems. Therefore, if there is a problem with the data provided by the upstream data warehouse, it will be reflected in the downstream system immediately.

[0058] Currently, it is difficult to monitor the data provided by the upstream data warehouse. If the downstream system receives a large amount of data from the upstream data warehouse, there is no way to manually check them one by one. The data provided by the upstream data warehouse may have the following problems: the table providing increments becomes the table providing full data, the original date type fields are provided as other fields, a field in a table is missing numbers, the values ​​in an upstream table are obviously wrong (for example, the code value appears NA), etc.

[0059] In some embodiments, when the business discovers data quality problems, it can check which upstream table and which data has problems. However, since this anomaly is an abnormal phenomenon of the internal data of the upstream data warehouse, the specific problem cannot be confirmed. Therefore, it is difficult to detect with a simple verification script, and the efficiency is low.

[0060] In response to the above technical problems, the present application proposes the following technical concept: before the downstream system receives data, the data fingerprint of the target data is extracted, and it is first determined whether the data fingerprint of the target data meets the preset conditions. If so, it is then determined whether the data fingerprint of the target data matches the historical data fingerprint, thereby realizing the detection of the data provided by the upstream data warehouse and improving the accuracy and timeliness of data processing in the downstream system.

[0061] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0062] Figure 1 FIG. 1 is an application scenario diagram of the data detection method applicable to the embodiment of the present application. Figure 1 As shown, the application scenario includes: an upstream data warehouse 101, a downstream system 102 and a server 103. The upstream data warehouse 101 can integrate data obtained from different sources into a unified data storage and provide the downstream system 102 with required data.

[0063] The server 103 obtains the historical data fingerprint in advance based on the data of the upstream data warehouse. When the upstream data warehouse 101 provides the target data for the downstream system 102, the server 103 extracts the data features of the target data, determines the data fingerprint of the target data based on the data features of the target data, and then first determines whether the data fingerprint of the target data meets the preset conditions. When the data fingerprint of the target data does not meet the preset conditions, it is determined that there is an abnormality in the target data. When the data fingerprint of the target data meets the preset conditions, it is determined whether the data fingerprint of the target data matches the historical data fingerprint. If the data fingerprint of the target data does not match the historical data fingerprint, it is determined that there is an abnormality in the target data. If the data fingerprint of the target data matches the historical data fingerprint, it is determined that there is no abnormality in the target data.

[0064] Then, the server 103 can notify the downstream system 102 of the judgment result. When the judgment result indicates that there is an abnormality in the target data, the downstream system 102 will temporarily not receive the target data or will not further process the target data. When the judgment result indicates that there is no abnormality in the target data, the downstream system 102 will receive the target data or process the target data.

[0065] based on Figure 1 In the application scenario shown, an embodiment of the present application also provides a data detection method. Figure 2 The process of the data detection method provided in the embodiment of the present application Figure 1 .like Figure 2 As shown, the data detection method includes:

[0066] S201. When the upstream data warehouse provides target data to the downstream system, data features of the target data are extracted, and a data fingerprint of the target data is determined according to the data features of the target data.

[0067] The execution subject of the method of this embodiment may be Figure 1 The server shown in .

[0068] In this embodiment, when the upstream data warehouse provides target data to the downstream system, the downstream system detects the target data before receiving the target data.

[0069] The target data may include multiple data, for example, a batch of data or multiple batches of data provided by an upstream data warehouse to a downstream system. Typically, a batch of data has its own unique data features, which are distinguished from other batches of data.

[0070] Therefore, in this step, the data features of the target data are first extracted, and then the data fingerprint of the target data is determined according to the data features of the target data.

[0071] Optionally, the internal connection of the target data can be analyzed to extract data features, which may include, for example, numerical features, type features, binary features, text features, time features, etc. Numerical features are a common type of data features, including integers and real numbers, such as a person's age, height, weight, etc.; categorical features have discrete values ​​and are usually unnecessary, such as a person's blood type (A, B, AB, O), etc., which are categorical features; binary features have only two possible values, such as whether to do something is a binary feature; text features represent text data, such as a person's name is a text feature; time features represent time, such as a person's date of birth is a time feature.

[0072] Then, unique features that are different from other batches of data are obtained based on the data features of the target data, such as data features that can uniquely identify the target data, as the data fingerprint of the target data.

[0073] S202: Determine whether the data fingerprint of the target data meets a preset condition.

[0074] Optionally, the preset conditions can be determined based on the specific data type, and may include, for example, at least one of the following: the target data does not contain null values, the target data volume does not exceed the set data volume, the fields in the target data do not exceed the combined value of the set fields, the field type of the target data does not change, and the change in the overall data volume of the target data does not exceed the set change amount.

[0075] Among them, the data volume of the target data does not exceed the set data volume, which can be understood as the total amount of this batch of data corresponding to the target data does not exceed the set data volume, and the set data volume can be determined based on actual conditions; the fields in the target data do not exceed the combined value of the set fields, which can also be understood as the total amount of fields in the target data does not exceed the set number, and the set fields or the set number can be determined based on actual conditions; the overall data volume of the target data does not change significantly, and the degree of change can be determined, for example, based on the fluctuations of historical data, and can be mainly for numerical data.

[0076] In this step, the detection process can be simplified by judging whether the target data has anomalies through preset conditions. However, the preset conditions can only detect simple and common errors. The effect is poor for anomaly detection that is close to normal data, for example, a small amount of data errors in a field of a table.

[0077] It can be understood that if the data fingerprint of the target data meets the preset conditions, the target data may be abnormal, and if the data fingerprint of the target data does not meet the preset conditions, it can be determined that the target data is abnormal.

[0078] Therefore, when the data fingerprint of the target data does not meet the preset condition, step S203 is executed, and when the data fingerprint of the target data meets the preset condition, step S204 is executed.

[0079] Optionally, before determining whether the data fingerprint of the target data meets the preset conditions, the data type of the upstream data warehouse is obtained, and the preset conditions corresponding to each data type are set, that is, each data type has a corresponding preset condition. Accordingly, determining whether the data fingerprint of the target data meets the preset conditions may include: obtaining the preset conditions corresponding to the target data according to the data type of the target data, and determining whether the data fingerprint of the target data meets the preset conditions corresponding to the target data. This embodiment can perform different simple data anomaly detection for different data types, thereby improving detection accuracy and detection efficiency.

[0080] S203: Determine whether the target data is abnormal.

[0081] S204: Determine whether the data fingerprint of the target data matches the historical data fingerprint.

[0082] In this step, the historical data fingerprint is obtained in advance based on the data of the upstream data warehouse. When the data fingerprint of the target data meets the preset conditions, it is determined whether the data fingerprint of the target data matches the historical data fingerprint.

[0083] If the data fingerprint of the target data matches the historical data fingerprint, step S205 is executed; if the data fingerprint of the target data does not match the historical data fingerprint, step S203 is executed.

[0084] Optionally, before determining whether the data fingerprint of the target data matches the historical data fingerprint, the data type of the upstream database and the data fingerprint of the historical data corresponding to each data type are obtained. Accordingly, determining whether the data fingerprint of the target data matches the historical data fingerprint includes: determining the historical data fingerprint corresponding to the target data according to the data type of the target data, and determining whether the data fingerprint of the target data matches the historical data fingerprint corresponding to the target data. In this embodiment, matching detection of different data fingerprints is performed for different data types, thereby reducing the amount of data required to be detected during the matching detection process and improving detection efficiency.

[0085] In actual applications, since the target data includes multiple data, the data fingerprint of the target data includes the data features of each data in the target data. The data features of each data in the target data can be matched with the data features in the historical data fingerprint. If the number of matches exceeds the preset number, that is, the matching degree exceeds a certain threshold, step S205 can be executed. If the number of matches is lower than the preset number, that is, the matching degree is lower than a certain threshold, step S203 can be executed, where the preset number can be determined according to actual conditions.

[0086] In some embodiments, data feature extraction operations may be performed on part or all of the data in the upstream data warehouse. For example, data feature extraction operations may be performed on all data that need to be provided to the downstream system, and then data fingerprints are obtained based on the extracted data features to obtain historical data fingerprints.

[0087] Optionally, a rule-based matching algorithm can be used to determine whether the data fingerprint of the target data meets preset conditions, and a statistical matching algorithm can be used to determine whether the data fingerprint of the target data matches the historical data fingerprint. The rule-based matching algorithm can determine whether the data fingerprint of the target data is abnormal according to preset conditions, and the statistical matching algorithm can include variance, standard deviation, mean, etc. to determine whether the data fingerprint of the target data matches the historical data fingerprint.

[0088] Optionally, the preset model can be pre-trained by historical data fingerprints, and then the trained model is used to determine whether the data fingerprint of the target data matches the historical data fingerprint. The preset model includes: a single model or multiple fusion models such as a tree model, a support vector machine model (SVM), and a random regression model. The tree model can include, for example, LGBM, xgboost, and random forest. The type of the preset model can be determined according to actual conditions, and is not limited to the tree model, the support vector machine model, and the random regression model.

[0089] S205: Determine whether the target data is normal.

[0090] The data detection method provided in this embodiment extracts data features of the target data when the upstream data warehouse provides target data to the downstream system, determines the data fingerprint of the target data based on the data features of the target data, first determines whether the data fingerprint of the target data meets the preset conditions, and then determines whether there is an abnormality in the target data through simple detection. After the target data passes the simple detection, it determines whether the data fingerprint of the target data matches the historical data fingerprint, and further detects the target data, thereby achieving accurate detection of the data provided by the upstream data warehouse and improving the accuracy and timeliness of data processing in the downstream system.

[0091] Figure 3 The process of the data detection method provided in the embodiment of the present application Figure 2 .like Figure 3 As shown, the data detection method comprises the following steps:

[0092] S301. Obtain data types from the upstream data warehouse and set preset conditions corresponding to each data type.

[0093] In this step, a corresponding preset condition is set for each data type, wherein the preset condition corresponding to each data type can be set according to actual conditions.

[0094] S302: extract historical data features of historical data corresponding to each data type, and obtain historical data fingerprints of each data type according to the historical data features of each data type.

[0095] In this step, each data type contains certain historical data, so the historical data fingerprint of each data type can be determined according to the historical data features of the historical data corresponding to each data type.

[0096] Optionally, the historical data may be part of the data in the upstream data warehouse, such as data within a period of time.

[0097] S303: When the upstream data warehouse provides target data to the downstream system, data features of the target data are extracted, and data fingerprints of the target data are determined according to the data features of the target data.

[0098] For the specific implementation method of this step, refer to Figure 2 Step S201 in will not be repeated here.

[0099] S304: Obtain preset conditions corresponding to the target data according to the data type of the target data, and determine whether the data fingerprint of the target data satisfies the preset conditions corresponding to the target data.

[0100] In this step, each data type has a corresponding preset condition, and the target data has a corresponding preset condition. Specifically, the data type of the target data is obtained, the preset condition corresponding to the data type of the target data is found, and it is determined whether the data fingerprint of the target data meets the preset condition corresponding to the target data.

[0101] If the data fingerprint of the target data does not satisfy the preset condition corresponding to the target data, step S305 is executed; if the data fingerprint of the target data satisfies the preset condition corresponding to the target data, step S306 is executed.

[0102] S305: Determine whether the target data is abnormal.

[0103] S306: Determine the historical data fingerprint corresponding to the target data according to the data type of the target data.

[0104] In this step, each data type contains corresponding historical data, and each data type has a corresponding historical data fingerprint. Therefore, the historical data fingerprint corresponding to the target data can be determined according to the data type of the target data.

[0105] S307 , determining whether the data fingerprint of the target data matches the historical data corresponding to the target data.

[0106] When the data fingerprint of the target data matches the historical data corresponding to the target data, step S308 is executed; when the data fingerprint of the target data does not match the historical data corresponding to the target data, step S305 is executed.

[0107] S308: Determine whether the target data is normal.

[0108] The data detection method provided in this embodiment performs different simple data anomaly detections and different matching detections on different data types, thereby improving the detection accuracy and reducing the amount of data required to be detected during the matching detection process.

[0109] Based on the above embodiments, the present application provides the following embodiments for the training process of the preset model:

[0110] Figure 4 The process of the data detection method provided in the embodiment of the present application Figure 2 .like Figure 4 As shown, the data detection method comprises the following steps:

[0111] S401. Create a corresponding feature extraction task according to the data type of the upstream data warehouse.

[0112] Among them, the feature extraction task corresponding to each data type is used to extract the data features of the historical numbers corresponding to this data type.

[0113] S402. For each data type, obtain all tables corresponding to the data type, extract data features corresponding to the data type according to a preset template, and obtain a historical data fingerprint corresponding to the data type according to the data features corresponding to the data type.

[0114] In this step, each data type has a corresponding table, which is used to record data, and each data type has a corresponding preset template, which is used to record the data features required for the corresponding data type, so that the corresponding data features can be extracted from all tables corresponding to the data type according to the preset template, and then the historical data fingerprint corresponding to each data type can be obtained according to the data features corresponding to each data type.

[0115] S403: Perform feature engineering processing on the historical data fingerprint corresponding to each data type.

[0116] Feature Engineering is the process of converting raw data into features that better express the essence of the problem, so that applying these features to the prediction model can improve the model prediction accuracy for unseen data.

[0117] Optionally, feature engineering processing may include missing value deletion (90%) and missing value filling. The filling method may include, for example:

[0118] For categorical features: fill in the mode; for numerical features: fill in the mean, and the numerical features can be normalized.

[0119] S404: Use the processed historical data fingerprint to train the preset model.

[0120] In this step, the preset model is trained using the processed historical data fingerprint so that the preset model can learn the characteristics of the historical data fingerprint and can match and calculate the data fingerprint of the target data with the historical data fingerprint.

[0121] The data detection method provided in this embodiment trains a preset model through the historical data fingerprint of each data type, so that it can determine whether the data fingerprint of the target data matches the historical data fingerprint through the trained model, thereby improving the detection efficiency of data anomalies.

[0122] Figure 5 This is a schematic diagram of the structure of the data detection device provided in the embodiment of the present application. Figure 5 As shown, the data detection device includes: a processing module 11, a first judgment module 12 and a second judgment module 13;

[0123] Wherein, the processing module 11 is used to extract the data features of the target data when the upstream data warehouse provides the target data to the downstream system, and determine the data fingerprint of the target data according to the data features of the target data;

[0124] The first judgment module 12 is used to judge whether the data fingerprint of the target data meets the preset conditions; when the data fingerprint of the target data does not meet the preset conditions, it is judged that the target data is abnormal;

[0125] The second judgment module 13 is used to judge whether the data fingerprint of the target data matches the historical data fingerprint when the data fingerprint of the target data meets the preset conditions; if they do not match, it is judged that the target data is abnormal; if they match, it is judged that the target data is normal; wherein the historical data fingerprint is obtained based on the data of the upstream data warehouse.

[0126] In some embodiments, the data detection device further includes: an acquisition module 14, the acquisition module 14 is used to acquire the data type of the upstream data warehouse and set the preset conditions corresponding to each data type;

[0127] Accordingly, the first judgment module 12 is used to judge whether the data fingerprint of the target data meets the preset conditions, including:

[0128] Acquire a preset condition corresponding to the target data according to the data type of the target data; and determine whether the data fingerprint of the target data satisfies the preset condition corresponding to the target data.

[0129] In some embodiments, the acquisition module 14 is further used to obtain data fingerprints of historical data corresponding to each data type;

[0130] Accordingly, the second judgment module 13 is used to judge whether the data fingerprint of the target data matches the data fingerprint of the historical data, including:

[0131] Determine the historical data fingerprint corresponding to the target data according to the data type of the target data; and determine whether the data fingerprint of the target data matches the historical data fingerprint corresponding to the target data.

[0132] In some embodiments, the first judgment module 12 is used to judge whether the data fingerprint of the target data meets the preset conditions.

[0133] The method comprises: determining whether the data fingerprint of the target data meets a preset condition based on a rule-based matching algorithm;

[0134] The second judgment module 13 is used to judge whether the data fingerprint of the target data matches the historical data fingerprint, including:

[0135] A statistical matching algorithm is used to determine whether the data fingerprint of the target data matches the historical data fingerprint.

[0136] In some embodiments, the second judgment module 13 is used to judge whether the data fingerprint of the target data matches the historical data fingerprint, including:

[0137] The historical data fingerprint is used to train a preset model, where the preset model includes at least one of the following: a tree model, a support vector machine model, and a logistic regression model; and the trained preset model is used to determine whether the data fingerprint of the target data matches the historical data fingerprint.

[0138] In some embodiments, the second judgment module 13 is used to train a preset model using the historical data fingerprint, including:

[0139] Creating a corresponding feature extraction task according to the data type of the upstream data warehouse;

[0140] For each data type, all tables corresponding to the data type are obtained, data features corresponding to the data type are extracted according to a preset template, and historical data fingerprints corresponding to the data type are obtained according to the data features corresponding to the data type;

[0141] Perform feature engineering on the historical data fingerprint corresponding to each data type;

[0142] The processed historical data fingerprint is used to train the preset model.

[0143] In some embodiments, the preset condition includes at least one of the following:

[0144] The data volume of the target data does not exceed the set data volume, the fields in the target data do not exceed the combination value of the set fields, the field type of the target data does not change, and the change in the overall data volume of the target data does not exceed the set change amount.

[0145] The data detection device provided in the embodiment of the present application can be used to execute the technical solution of the data detection method in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0146] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the second processing module 13 can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The function of the second processing module 13. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0147] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 As shown, the electronic device may include: a transceiver 121 , a processor 122 , and a memory 123 .

[0148] The processor 122 executes the computer execution instructions stored in the memory, so that the processor 122 executes the scheme in the above embodiment. The processor 122 can be a general-purpose processor, including a central processing unit CPU, a network processor (network processor, NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0149] The memory 123 is connected to the processor 122 via a system bus and completes communication between them. The memory 123 is used to store computer program instructions.

[0150] The transceiver 121 may be used to obtain tasks to be executed and configuration information of the tasks to be executed.

[0151] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory.

[0152] The electronic device provided in the embodiment of the present application may be the terminal device of the above embodiment.

[0153] An embodiment of the present application also provides a chip for running instructions, which is used to execute the technical solution of the data detection method in the above embodiment.

[0154] An embodiment of the present application further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the technical solution of the data detection method of the above embodiment.

[0155] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, it can implement the technical solution of the data detection method in the above embodiment.

[0156] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0157] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.

[0158] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0159] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.

[0160] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.

[0161] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.

[0162] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0163] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0164] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a main control device.

[0165] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0166] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A data detection method, characterized in that: include: When the upstream data warehouse provides the target data to the downstream system, the data features of the target data are extracted, and the data fingerprint of the target data is determined according to the data features of the target data; Determine whether the data fingerprint of the target data meets a preset condition; When the data fingerprint of the target data does not meet the preset condition, it is determined that the target data is abnormal; When the data fingerprint of the target data meets the preset conditions, it is determined whether the data fingerprint of the target data matches the historical data fingerprint; wherein the historical data fingerprint is obtained based on the data of the upstream data warehouse; If there is no match, it is determined that the target data is abnormal; if there is a match, it is determined that the target data is normal.

2. The method according to claim 1, characterized in that Before determining whether the data fingerprint of the target data meets a preset condition, the method further includes: Obtaining data types of the upstream data warehouse and setting preset conditions corresponding to each data type; The determining whether the data fingerprint of the target data meets a preset condition includes: Acquire a preset condition corresponding to the target data according to the data type of the target data; Determine whether the data fingerprint of the target data meets the preset condition corresponding to the target data.

3. The method according to claim 2, characterized in that Before determining whether the data fingerprint of the target data matches the historical data fingerprint, the method further includes: Obtaining data fingerprints of historical data corresponding to each data type of the upstream data warehouse; The determining whether the data fingerprint of the target data matches the data fingerprint of the historical data includes: Determine the historical data fingerprint corresponding to the target data according to the data type of the target data; Determine whether the data fingerprint of the target data matches the historical data fingerprint corresponding to the target data.

4. The method according to any one of claims 1 to 3, characterized in that: The determining whether the data fingerprint of the target data meets a preset condition includes: A rule-based matching algorithm determines whether the data fingerprint of the target data meets a preset condition; The determining whether the data fingerprint of the target data matches the historical data fingerprint includes: A statistical matching algorithm is used to determine whether the data fingerprint of the target data matches the historical data fingerprint.

5. The method according to claim 3, characterized in that: The determining whether the data fingerprint of the target data matches the historical data fingerprint includes: Using the historical data fingerprint to train a preset model, the preset model includes at least one of the following: a tree model, a support vector machine model, and a logistic regression model; The trained preset model is used to determine whether the data fingerprint of the target data matches the historical data fingerprint.

6. The method according to claim 5, characterized in that The using the historical data fingerprint to train the preset model includes: Creating a corresponding feature extraction task according to the data type of the upstream data warehouse; For each data type, all tables corresponding to the data type are obtained, data features corresponding to the data type are extracted according to a preset template, and historical data fingerprints corresponding to the data type are obtained according to the data features corresponding to the data type; Perform feature engineering on the historical data fingerprint corresponding to each data type; The processed historical data fingerprint is used to train the preset model.

7. The method according to any one of claims 1 to 3, characterized in that: The preset condition includes at least one of the following: The data volume of the target data does not exceed the set data volume, the fields in the target data do not exceed the combined value of the set fields, the field type of the target data does not change, and the change in the overall data volume of the target data does not exceed the set change amount.

8. A data detection device, characterized in that: include: A processing module, used for extracting data features of the target data when the upstream data warehouse provides the target data to the downstream system, and determining the data fingerprint of the target data according to the data features of the target data; A first judgment module is used to judge whether the data fingerprint of the target data meets the preset conditions; when the data fingerprint of the target data does not meet the preset conditions, it is judged that the target data is abnormal; A second judgment module is used to judge whether the data fingerprint of the target data matches the historical data fingerprint when the data fingerprint of the target data meets the preset conditions; if they do not match, it is determined that the target data is abnormal; If there is a match, the target data is determined to be normal; wherein the historical data fingerprint is obtained based on the data of the upstream data warehouse.

9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.

11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.