Artificial intelligence driven data quality automatic detection method and system

By using an AI-driven automatic data quality detection method, field-level semantic vectors are formed by using field name vectors and value vectors. Combined with a self-attention mechanism and a multi-task prediction network, this method solves the problems of isolated field processing and lack of semantic understanding in traditional methods, and achieves effective detection and adaptive anomaly judgment across fields.

CN123157703APending Publication Date: 2026-11-24CHINA UNICOM (JIANGXI) IND INTERNET CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611654785.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-26
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing data quality detection methods lack rule generalization ability and cannot understand field semantics, resulting in poor consistency of detection results and failure to capture cascading anomalies across fields.

Method used

An AI-driven automatic data quality detection method is adopted, which forms field-level semantic vectors through field name vectors and value vectors, uses a self-attention mechanism to capture sequential logic and contextual information, and combines a multi-task prediction network and field relationship graphs for anomaly detection.

Benefits of technology

It achieves accurate differentiation of data quality and effective detection of cross-field anomalies, and can adaptively adjust anomaly judgment to adapt to changes in data distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123157703A_ABST
    Figure CN123157703A_ABST
Patent Text Reader

Abstract

This invention provides an AI-driven automatic data quality detection method and system. The method includes: extracting data records from a data table to be detected to obtain field name vectors and field value vectors, and then obtaining field-level semantic vectors; assigning positional encoding to the field-level semantic vectors and obtaining associated semantic vectors using a self-attention mechanism; inputting the associated semantic vectors into several final anomaly analysis branches to obtain a multi-dimensional anomaly probability set; constructing a field relationship graph, and adjusting the multi-dimensional anomaly probability set into a corrected anomaly probability set based on the field relationship graph; obtaining data anomaly scores corresponding to the data records based on the several corrected anomaly probability sets, and determining whether data anomalies exist based on the data anomaly scores. Through the above methods, accurate differentiation of the business meaning of field values ​​is achieved; cross-field associated semantic vectors are obtained; cross-dimensional cascading anomalies can be captured; and effective detection of cross-field coupled anomalies is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to an artificial intelligence-driven automatic data quality detection method and system. Background Technology

[0002] As enterprises deepen their digital transformation, data has become a core production factor. However, data quality issues severely restrict the accuracy of data analysis and decision-making.

[0003] Traditional data quality inspection methods mainly rely on manually written fixed rules, such as non-empty checks, value range verification, regular expression format matching, and uniqueness constraints. These rules are predefined by business experts and then scanned and verified by ETL tools or data quality management platforms.

[0004] However, fixed rules can only detect predefined explicit anomalies, and are completely ineffective for implicit, context-dependent, and cross-field coupled anomalies, resulting in a high false negative rate. During the detection process, each field is viewed in isolation, making it impossible to understand the business meaning of the fields, and the rules cannot automatically identify their equivalence, leading to failure in consistency judgment. Issues such as completeness, accuracy, consistency, and timeliness are usually detected separately by independent rule modules, making it difficult to capture cascading anomalies across dimensions. Summary of the Invention

[0005] To address the shortcomings of existing technologies, the present invention aims to provide an artificial intelligence-driven automatic data quality detection method and system, thereby resolving the technical problems in existing data quality detection technologies, such as poor rule generalization ability, lack of field semantic understanding, and fragmented quality dimensions. To achieve the above objectives, firstly, this application provides an artificial intelligence-driven automatic data quality detection method, comprising the following steps: Extract data records from the data table to be tested, obtain several field name vectors and several field value vectors corresponding to the data records, and obtain field-level semantic vectors through the field name vectors and field value vectors; Based on the field order, positional encoding is assigned to several field-level semantic vectors to obtain stage semantic vectors. Based on the self-attention mechanism, the stage semantic vectors are converted into related semantic vectors. The associated semantic vector is input into a multi-task final prediction network that includes several final anomaly analysis branches to obtain a multi-dimensional set of anomaly probabilities corresponding to the associated semantic vector. The final anomaly analysis branches correspond to a preset quality dimension. Select the field names in the data table to be detected as nodes, and assign a multidimensional anomaly probability set to the nodes. Combine several nodes into a field relationship graph through field correlation, and adjust the multidimensional anomaly probability set into a corrected anomaly probability set based on the field relationship graph. Data anomaly scores are obtained based on several modified anomaly probability sets and corresponding to data records. A dynamic anomaly threshold is constructed based on the historical score set. The data anomaly scores are compared with the dynamic anomaly threshold to determine whether there are data anomalies.

[0006] Furthermore, the step of obtaining the vector of several field names and the vector of several field values ​​corresponding to the data record includes: Extract several field names from the data table to be tested, and extract several field values ​​corresponding to the field names from the data records. Perform word embedding encoding on the field names to obtain field name vectors. Obtain the data type corresponding to the field value, determine the value encoding method based on the data type, and convert the field value into a field value vector using the value encoding method.

[0007] Furthermore, the step of converting the stage semantic vector into an associated semantic vector based on the self-attention mechanism includes: The first-stage semantic vector is selected as the baseline semantic vector, and all stage semantic vectors are selected as reference semantic vectors. The baseline semantic vector is projected into a query vector, and the reference semantic vector is projected into a key vector and a value vector. Attention weights are obtained through the query vector and key vector, and associated semantic vectors are obtained based on the attention weights and value vectors.

[0008] Furthermore, the preset quality dimensions are completeness, accuracy, consistency, or timeliness.

[0009] Furthermore, the step of inputting the associated semantic vector into a multi-task final prediction network including several final anomaly analysis branches to obtain a multi-dimensional anomaly probability set corresponding to the associated semantic vector includes: An initial shared underlying network and several initial anomaly analysis branches connected to the initial shared underlying network are constructed to form a multi-task initial prediction network. The training semantic vector is input into the initial shared underlying network to obtain the training feature vector. The training feature vector is then input into several initial anomaly analysis branches to obtain several training anomaly probabilities. Branch loss functions are constructed based on training anomaly probabilities and real anomaly labels. Several branch loss functions are aggregated into a total loss function based on uncertainty dynamic weighting. The network parameters of the initial shared underlying network and several initial anomaly analysis branches are optimized through the total loss function to obtain the final shared underlying network and several final anomaly analysis branches, and a multi-task final prediction network is formed. The associated semantic vectors are input into the multi-task final prediction network to obtain a multi-dimensional set of anomaly probabilities.

[0010] Furthermore, the expression for the branch loss function is: , in, Indicates the relationship with the first The branch loss function corresponding to each initial anomaly analysis branch This represents the total number of training feature vectors. Indicates the relationship with the first In the initial anomaly analysis branch, the first The true anomaly labels corresponding to each training feature vector, and The value can be 0 or 1. Indicates the relationship with the first In the initial anomaly analysis branch, the first The training anomaly probability corresponding to each training feature vector. Represents the logarithmic function. Indicates the abnormal weight coefficient; The expression for the total loss function is: , in, Represents the total loss function. This indicates the total number of initial anomaly analysis branches. Indicates the relationship with the first Uncertain dynamic parameters corresponding to each initial anomaly analysis branch.

[0011] Furthermore, the step of combining several nodes into a field relationship graph based on field relevance includes: Get the field value vector corresponding to the field name, and obtain the correlation coefficient between the two nodes based on the field value vector; The correlation coefficient is compared with the correlation threshold. If the correlation coefficient is greater than the correlation threshold, a correlation edge is constructed between the two nodes, and the correlation coefficient is selected as the edge weight corresponding to the correlation edge to form a field relationship graph.

[0012] Furthermore, the step of adjusting the multidimensional anomaly probability set to a corrected anomaly probability set based on the field relationship graph includes: One of its nodes is selected as the baseline node, and the nodes with associated edges with the baseline node are selected as reference nodes. The multidimensional anomaly probability set corresponding to the baseline node is selected as the baseline node feature, and the multidimensional anomaly probability set corresponding to the reference node is selected as the reference node feature. Adjacency transit features are obtained based on edge weights and reference node features. Aggregate transit features are obtained through all adjacency transit features. The baseline node features and aggregate transit features are combined into a corrected anomaly probability set.

[0013] Furthermore, the formula for obtaining the anomaly probability set is revised as follows: , in, Indicates the first The set of corrected anomaly probabilities corresponding to each node as the baseline node. This represents the corrected weight matrix. Indicates the correction bias term. Indicates the first The characteristics of the reference node when each node is a reference node. Indicates the first The aggregated transfer characteristics corresponding to each node as the base node. Represents a non-linear activation function. This indicates a vector concatenation operation.

[0014] Secondly, embodiments of this application provide an AI-driven automatic data quality detection system, applied to the AI-driven automatic data quality detection method described in the first aspect above, the system comprising: The extraction module is used to extract data records from the data table to be detected, obtain several field name vectors and several field value vectors corresponding to the data records, and obtain field-level semantic vectors through the field name vectors and field value vectors. The query module is used to assign positional codes to several field-level semantic vectors based on field order in order to obtain stage semantic vectors, and to convert stage semantic vectors into related semantic vectors based on a self-attention mechanism. The analysis module is used to input the associated semantic vector into a multi-task final prediction network that includes several final anomaly analysis branches, in order to obtain a multi-dimensional set of anomaly probabilities corresponding to the associated semantic vector. The final anomaly analysis branches correspond to a preset quality dimension. The identification module is used to select the field names in the data table to be detected as nodes, assign a multi-dimensional anomaly probability set to the nodes, combine several nodes into a field relationship graph through field correlation, and adjust the multi-dimensional anomaly probability set into a corrected anomaly probability set based on the field relationship graph. The execution module is used to obtain the data anomaly score corresponding to the data record based on several modified anomaly probability sets, construct a dynamic anomaly threshold based on the historical score set, and compare the data anomaly score with the dynamic anomaly threshold to determine whether there is a data anomaly.

[0015] Thirdly, embodiments of this application provide a computer, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the artificial intelligence-driven automatic data quality detection method as described in the first aspect above.

[0016] Fourthly, embodiments of this application provide a storage medium storing a computer program thereon, which, when executed by a processor, implements the artificial intelligence-driven automatic data quality detection method as described in the first aspect above.

[0017] Compared with existing technologies, the advantages of this invention are as follows: By introducing field name vectors and combining them with field value vectors to form field-level semantic vectors, the same field value can obtain differentiated semantic representations under different field names, avoiding encoding confusion caused by similar field value forms, achieving accurate differentiation of the business meaning of field values, and overcoming the shortcomings of isolated field processing and lack of semantic understanding in traditional rule-based methods; through the introduction of positional encoding, the order information of field-level semantic vectors in records is preserved, enabling the self-attention mechanism to capture business dependencies with sequential logic, and through the fully connected interaction of the self-attention mechanism, the semantic vectors at each stage are integrated with the same data. The contextual information of other fields in the record forms a cross-field related semantic vector; by setting several final anomaly analysis branches corresponding to preset quality dimensions, parallel anomaly probability prediction of the same related semantic vector on multiple quality dimensions is realized, which can capture cross-dimensional cascading anomalies; further, the multi-dimensional anomaly probability set is synchronously corrected by constructing a field relationship graph based on field correlation, so that the anomaly probability of each field not only depends on its own features, but also integrates the anomaly information of other fields with strong correlation with it, realizing effective detection of cross-field coupled anomalies; by setting a dynamic anomaly threshold, the anomaly judgment is adaptively adjusted, which can adapt to changes in data distribution. Attached Figure Description

[0018] Figure 1 This is a flowchart of the AI-driven automatic data quality detection method in the first embodiment of the present invention; Figure 2 This is a structural block diagram of the AI-driven automatic data quality detection system in the second embodiment of the present invention; The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation

[0019] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.

[0020] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0022] Please see Figure 1 The first embodiment of the present invention provides an artificial intelligence-driven automatic data quality detection method, which includes the following steps: S10: Extract data records from the data table to be detected, obtain several field name vectors and several field value vectors corresponding to the data records, and obtain field-level semantic vectors through the field name vectors and field value vectors; Step S10 includes: S110: Extract several field names from the data table to be detected, and extract several field values ​​corresponding to the field names from the data records. Perform word embedding encoding on the field names to obtain the field name vector. Taking the product inventory table as an example, the data table to be tested includes three field names: product ID, product name, and inventory quantity. One of the data records in the data table to be tested includes three field values: P01 (corresponding to product ID), wireless mouse (corresponding to product name), and 120 (corresponding to inventory quantity). The field names are encoded by word embedding through a pre-trained word embedding model to obtain the field name vector.

[0023] S120: Obtain the data type corresponding to the field value, determine the value encoding method based on the data type, and convert the field value into a field value vector through the value encoding method; Specifically, the data types include character type, numeric type, and missing type. When the data type is character type, the field value is segmented to obtain a segmented feature sequence containing several segment values. The segmented feature sequence is input into a sequence encoding network (Transformer) to extract semantic features to form a field value vector. When the data type is numeric type, the field value is input into a numeric encoding network (single or multi-layer fully connected layer + ReLU) to map it into a field value vector. When the data type is missing type, a preset missing vector is selected as the field value vector.

[0024] After obtaining the field name vector and field value vector, the two are concatenated into a field-level semantic vector through either gated fusion (calculating the mixed weights of the field name vector and field value vector in each dimension through a learnable gated network, and performing a weighted sum of the field name vector and field value vector based on the mixed weights) or cross-attention mechanism fusion (converting the field name vector into a query vector, the field value vector into a key vector and a value vector, and interacting through multi-head attention). In this embodiment, the two are concatenated into a field-level semantic vector through gated fusion.

[0025] S20: Assign positional encoding to several field-level semantic vectors based on field order to obtain stage semantic vectors, and convert stage semantic vectors into related semantic vectors based on self-attention mechanism; By assigning positional encoding, the permutations and other transformations of the self-attention mechanism can be avoided, and business dependencies with sequential logic can be captured.

[0026] Step S20 includes: S210: Select its first-stage semantic vector as the baseline semantic vector, and select all stage semantic vectors as reference semantic vectors. S220: Project the baseline semantic vector into a query vector, and project the reference semantic vector into a key vector and a value vector. Obtain attention weights through the query vector and key vectors, and obtain related semantic vectors based on the attention weights and value vectors. Understandably, by querying the weight matrix, key weight matrix, and value weight matrix, the corresponding vectors can be projected into query vector, key vector, and value vector, respectively. The formula for obtaining the attention weights is: , in, Indicates the first The semantic vector of the first stage is the baseline semantic vector, and the semantic vector of the second stage is the base semantic vector. When the semantic vector at each stage is the reference semantic vector, the attention weights between the two are... Indicates the first The query vector corresponding to the semantic vector at each stage is the base semantic vector. Indicates the first Each stage semantic vector is the key vector corresponding to the reference semantic vector. Indicates the transpose operator. Indicates the scaling factor. This represents the normalization function. Intuitively, it weights and fuses the attention weights and their corresponding value vectors into a semantic vector.

[0027] S30: Input the associated semantic vector into a multi-task final prediction network that includes several final anomaly analysis branches to obtain a multi-dimensional anomaly probability set corresponding to the associated semantic vector. The final anomaly analysis branches correspond to a preset quality dimension. The preset quality dimensions are completeness, accuracy, consistency, or timeliness. In this embodiment, the multi-task final prediction network includes four final anomaly analysis branches, which correspond to the completeness, accuracy, consistency, and timeliness dimensions, respectively. Intuitively, the completeness dimension corresponds to data integrity issues (e.g., an empty shipping address field in an order table), the accuracy dimension corresponds to data value errors (e.g., an age of 350 years, exceeding the normal range), the consistency dimension corresponds to data logic conflicts (e.g., an order date later than the shipping date in an order), and the timeliness dimension corresponds to data expiration issues (e.g., a contract in a customer contract table has expired but is still marked as effective).

[0028] Step S30 includes: S310: Construct an initial shared underlying network and several initial anomaly analysis branches connected to the initial shared underlying network to form a multi-task initial prediction network. Input the training semantic vector into the initial shared underlying network to obtain training feature vectors. Input the training feature vectors into several initial anomaly analysis branches to obtain several training anomaly probabilities. The method for obtaining training semantic vectors is the same as that for obtaining associated semantic vectors, which are obtained from previous data tables and will not be elaborated here. The initial shared underlying network includes pooling layers and a connected underlying multilayer perceptron (composed of fully connected layers, ReLU activation function, and Dropout). The training semantic vectors are input into the pooling layers to obtain global aggregation information, and the global aggregation information is input into the underlying multilayer perceptron to extract cross-field training feature vectors.

[0029] The training feature vectors are input into several initial anomaly analysis branches. Each initial anomaly analysis branch outputs a corresponding original scoring vector through an independent fully connected layer. The original scoring vectors are then mapped to training anomaly probabilities. The formula for obtaining the original scoring vector is: , in, Indicates the relationship with the first The original scoring vectors corresponding to the initial anomaly analysis branches. Indicates the relationship with the first The weight mapping matrix corresponding to each initial anomaly analysis branch Indicates the relationship with the first The bias terms corresponding to each initial anomaly analysis branch. Represents the training feature vector; The formula for obtaining the training anomaly probability is: , in, Indicates the relationship with the first The training anomaly probabilities corresponding to each initial anomaly analysis branch. This represents an exponential function. Understandably, The value is .

[0030] S320: Based on the training anomaly probability and the real anomaly label, construct the branch loss function, and aggregate several branch loss functions into a total loss function based on uncertainty dynamic weighting. Optimize the network parameters of the initial shared underlying network and several initial anomaly analysis branches through the total loss function to obtain the final shared underlying network and several final anomaly analysis branches, and form a multi-task final prediction network. The expression for the branch loss function is: , in, Indicates the relationship with the first The branch loss function corresponding to each initial anomaly analysis branch This represents the total number of training feature vectors. Indicates the relationship with the first In the initial anomaly analysis branch, the first The true anomaly labels corresponding to each training feature vector, and The value can be 0 (abnormal) or 1 (normal). Indicates the relationship with the first In the initial anomaly analysis branch, the first The training anomaly probability corresponding to each training feature vector. Represents the logarithmic function. Indicates the abnormal weight coefficient; The expression for the total loss function is: , in, Represents the total loss function. This indicates the total number of initial anomaly analysis branches. Indicates the relationship with the first The uncertainty dynamic parameters corresponding to each initial anomaly analysis branch. In the total loss function, the weights of the branch loss function are... If the data for a certain task is noisy and difficult to learn, then As the gradient increases, the weight of the loss function in that branch decreases to prevent large gradients from dominating model updates for that task. As a regularization penalty term, it forces the model to prevent the uncertainty from increasing indefinitely. During iterative training using the total loss function, it optimizes the network parameters while simultaneously adjusting... .

[0031] S330: Input the associated semantic vector into the multi-task final prediction network to obtain a multi-dimensional set of anomaly probabilities; Understandably, the multidimensional anomaly probability set includes several actual anomaly probabilities corresponding to the final anomaly analysis branch. The method for obtaining the actual anomaly probabilities is the same as the method for obtaining the training anomaly probabilities, and will not be elaborated here. By constructing an initial shared underlying network and several initial anomaly analysis branches, and using training semantic vectors for multi-task joint training, and employing uncertainty dynamic weighting to aggregate the loss functions of each branch into a total loss function for optimization, the model can automatically balance the training difficulty of each quality dimension task, avoiding one task from dominating the model update direction due to excessive noise, thus improving the stability of multi-task learning and the final prediction accuracy.

[0032] S40: Select the field names in the data table to be detected as nodes, and assign a multidimensional anomaly probability set to the nodes. Combine several nodes into a field relationship graph through field correlation, and adjust the multidimensional anomaly probability set into a corrected anomaly probability set based on the field relationship graph. Step S40 includes: S410: Obtain the field value vector corresponding to the field name, and obtain the correlation coefficient between the two nodes based on the field value vector; Understandably, since field name vectors correspond to field value vectors, field value vectors can be mapped to field names. Furthermore, because there are multiple data records in the data table to be tested, one field name corresponds to the field value vectors of multiple data records. The formula for obtaining the correlation coefficient is: , in, Indicates the first The node and the first The correlation coefficient between nodes Indicates the first The data record is related to the first A vector of field values ​​corresponding to each node. This indicates that among all data records, the one with the first... The mean of the vector of field values ​​corresponding to each node. Indicates the first The data record is related to the first A vector of field values ​​corresponding to each node. This indicates that among all data records, the one with the first... The mean of the vector of field values ​​corresponding to each node. This represents the total number of data records. In some embodiments, the correlation coefficient can also be obtained through cosine similarity.

[0033] S420: Compare the correlation coefficient with the correlation threshold. If the correlation coefficient is greater than the correlation threshold, construct a correlation edge between the two nodes and select the correlation coefficient as the edge weight corresponding to the correlation edge to form a field relationship graph. In this embodiment, the association threshold is 0.7.

[0034] S430: Select one of its nodes as the base node, select the nodes with associated edges with the base node as reference nodes, select the multidimensional anomaly probability set corresponding to the base node as the base node feature, and select the multidimensional anomaly probability set corresponding to the reference node as the reference node feature. S440: Obtain adjacency transit features based on edge weights and reference node features, obtain aggregate transit features through all adjacency transit features, and combine the baseline node features and aggregate transit features into a corrected anomaly probability set. The formula for obtaining the adjacency transitive feature is: , in, Indicates the first The node is the reference node, and the node is the first node. The adjacency propagation characteristics when each node is the reference node. Indicates the first The node is the reference node, and the node is the first node. Edge weights when each node is the base node. Indicates the first Reference node characteristics when each node is a reference node This represents the transfer weight matrix. This indicates the propagation bias term; understandably, both the reference node features and the baseline node features are multidimensional sets of anomaly probabilities, differing only in their representation.

[0035] After obtaining the adjacency transit features, the graph attention coefficients between the baseline node and the reference node are obtained, and the graph attention coefficients are normalized into graph attention weights. The formula for obtaining the graph attention coefficient is: , in, Indicates the first The node is the reference node, and the node is the first node. The graph attention coefficients corresponding to each node as the baseline node. This represents the graph attention weight coefficient. Indicates the transpose operator. This indicates a shared linear transformation weight matrix. Indicates the first The characteristics of the reference node when each node is a reference node. Indicates the first The characteristics of the reference node when each node is a reference node. This represents a vector concatenation operation. This represents the linear rectification activation function.

[0036] The formula for obtaining aggregated transitive features is: , in, Indicates the first The aggregated transfer characteristics corresponding to each node as the base node. Indicates the first The node is the reference node, and the node is the first node. The graph attention weights corresponding to each node as the baseline node. Indicates the total number of reference nodes; The corrected formula for obtaining the anomaly probability set is as follows: , in, Indicates the first The set of corrected anomaly probabilities corresponding to each node as the baseline node. This represents the corrected weight matrix. Indicates the correction bias term. This represents a non-linear activation function.

[0037] S50: Obtain the data anomaly score corresponding to the data record based on several modified anomaly probability sets, construct a dynamic anomaly threshold based on historical scores, and compare the data anomaly score with the dynamic anomaly threshold to determine whether there is a data anomaly. Specifically, for any data record, there are several field values, each field value corresponds to a set of corrected anomaly probabilities, the set of corrected anomaly probabilities includes several anomaly probabilities, the maximum value among the several anomaly probabilities is selected as the field anomaly score, and the maximum value among the several field anomaly scores is selected as the data anomaly score.

[0038] Maintaining a sliding window, several historical ratings are combined into a historical rating set. Assuming the sliding window size is 500, each time an anomaly rating is acquired and anomaly detection is performed, this anomaly rating is added to the historical rating set as the last historical rating, and the first historical rating is removed from the set. Furthermore, within the historical rating set, the mean and standard deviation of several historical ratings are obtained. This is then analyzed using the mean rating plus a sensitivity coefficient. A dynamic anomaly threshold is formed using the standard deviation of the scoring, with a sensitivity coefficient of 2 or 3. If the anomaly score is greater than the dynamic anomaly threshold, a data anomaly is determined to exist; if the anomaly score is less than the dynamic threshold, no data anomaly is determined to exist.

[0039] By introducing field name vectors and combining them with field value vectors to form field-level semantic vectors, the same field value can obtain differentiated semantic representations under different field names. This avoids encoding confusion caused by similar field value forms, achieves accurate differentiation of the business meaning of field values, and overcomes the shortcomings of isolated field processing and lack of semantic understanding in traditional rule-based methods. Through the introduction of positional encoding, the order information of the field-level semantic vectors in the record is preserved, enabling the self-attention mechanism to capture business dependencies with sequential logic. Through the fully connected interaction of the self-attention mechanism, the semantic vectors at each stage are integrated with the context of other fields in the same data record. The text information forms a cross-field related semantic vector; by setting several final anomaly analysis branches corresponding to preset quality dimensions, parallel anomaly probability prediction of the same related semantic vector on multiple quality dimensions is realized, which can capture cross-dimensional cascading anomalies; further, the multi-dimensional anomaly probability set is synchronously corrected by constructing a field relationship graph based on field correlation, so that the anomaly probability of each field not only depends on its own features, but also integrates the anomaly information of other fields with strong correlation with it, realizing effective detection of cross-field coupled anomalies; by setting a dynamic anomaly threshold, the anomaly judgment is adaptively adjusted, which can adapt to changes in data distribution.

[0040] Please see Figure 2 The second embodiment of the present invention provides an artificial intelligence-driven automatic data quality detection system. This system is applied to the artificial intelligence-driven automatic data quality detection method described in the above embodiments, and will not be repeated hereafter. As used below, the terms "module," "unit," "subunit," etc., can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0041] The system includes: Extraction module 10 is used to extract data records from the data table to be detected, obtain several field name vectors and several field value vectors corresponding to the data records, and obtain field-level semantic vectors through field name vectors and field value vectors; The extraction module 10 includes: The first unit is used to extract several field names from the data table to be detected, extract several field values ​​corresponding to several field names from the data records, and perform word embedding encoding on the field names to obtain field name vectors. The second unit is used to obtain the data type corresponding to the field value, determine the value encoding method based on the data type, and convert the field value into a field value vector through the value encoding method; The query module 20 is used to assign positional encoding to several field-level semantic vectors based on the field order in order to obtain stage semantic vectors, and to convert stage semantic vectors into related semantic vectors based on a self-attention mechanism. The query module 20 includes: The third unit is used to select its first-stage semantic vector as the baseline semantic vector and to select all stage semantic vectors as reference semantic vectors. The fourth unit is used to project the baseline semantic vector into a query vector and the reference semantic vector into a key vector and a value vector. Attention weights are obtained through the query vector and key vector, and related semantic vectors are obtained based on the attention weights and value vectors. Analysis module 30 is used to input the associated semantic vector into a multi-task final prediction network that includes several final anomaly analysis branches, in order to obtain a multi-dimensional anomaly probability set corresponding to the associated semantic vector, and the final anomaly analysis branches correspond to a preset quality dimension. The analysis module 30 includes: The fifth unit is used to construct an initial shared underlying network and several initial anomaly analysis branches connected to the initial shared underlying network to form a multi-task initial prediction network. The training semantic vector is input into the initial shared underlying network to obtain the training feature vector, and the training feature vector is input into several initial anomaly analysis branches to obtain several training anomaly probabilities. The sixth unit is used to construct branch loss functions based on training anomaly probabilities and real anomaly labels. Based on uncertainty dynamic weighting, several branch loss functions are aggregated into a total loss function. The total loss function is used to optimize the network parameters of the initial shared underlying network and several initial anomaly analysis branches to obtain the final shared underlying network and several final anomaly analysis branches, and form a multi-task final prediction network. The seventh unit is used to input the associated semantic vector into the multi-task final prediction network to obtain a multi-dimensional set of anomaly probabilities. The identification module 40 is used to select the field names in the data table to be detected as nodes, assign a multi-dimensional anomaly probability set to the nodes, combine several nodes into a field relationship graph through field correlation, and adjust the multi-dimensional anomaly probability set into a corrected anomaly probability set based on the field relationship graph. The identification module 40 includes: Unit 8 is used to obtain the field value vector corresponding to the field name, and to obtain the correlation coefficient between two nodes based on the field value vector; The ninth unit is used to compare the correlation coefficient with the correlation threshold. If the correlation coefficient is greater than the correlation threshold, a correlation edge is constructed between the two nodes, and the correlation coefficient is selected as the edge weight corresponding to the correlation edge to form a field relationship graph. The tenth unit is used to select one of its nodes as the base node, select the nodes with associated edges with the base node as reference nodes, select the multidimensional anomaly probability set corresponding to the base node as the base node feature, and select the multidimensional anomaly probability set corresponding to the reference node as the reference node feature. The eleventh unit is used to obtain adjacency transit features based on edge weights and reference node features, obtain aggregate transit features through all adjacency transit features, and combine the baseline node features and aggregate transit features into a corrected anomaly probability set. The execution module 50 is used to obtain the data anomaly score corresponding to the data record based on several modified anomaly probability sets, construct a dynamic anomaly threshold based on the historical score set, and compare the data anomaly score with the dynamic anomaly threshold to determine whether there is a data anomaly.

[0042] The present invention also provides a computer, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the artificial intelligence-driven automatic data quality detection method as described in the above technical solutions.

[0043] The present invention also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the artificial intelligence-driven automatic data quality detection method as described in the above technical solutions.

[0044] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0045] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.

Claims

1. An artificial intelligence driven data quality automatic detection method, characterized in that, Includes the following steps: Extract data records from the data table to be tested, obtain several field name vectors and several field value vectors corresponding to the data records, and obtain field-level semantic vectors through the field name vectors and field value vectors; Based on the field order, positional encoding is assigned to several field-level semantic vectors to obtain stage semantic vectors, and the stage semantic vectors are converted into related semantic vectors based on the self-attention mechanism. The associated semantic vector is input into a multi-task final prediction network that includes several final anomaly analysis branches to obtain a multi-dimensional set of anomaly probabilities corresponding to the associated semantic vector. The final anomaly analysis branches correspond to a preset quality dimension. Select the field names in the data table to be detected as nodes, and assign a multidimensional anomaly probability set to the nodes. Combine several nodes into a field relationship graph through field correlation, and adjust the multidimensional anomaly probability set into a corrected anomaly probability set based on the field relationship graph. Data anomaly scores are obtained based on several modified anomaly probability sets and corresponding to data records. A dynamic anomaly threshold is constructed based on the historical score set. The data anomaly scores are compared with the dynamic anomaly threshold to determine whether there are data anomalies. 2.The artificial intelligence driven data quality automatic detection method of claim 1, wherein, The steps for obtaining the vector of several field names and the vector of several field values ​​corresponding to the data record include: Extract several field names from the data table to be tested, and extract several field values ​​corresponding to the field names from the data records. Perform word embedding encoding on the field names to obtain field name vectors. Obtain the data type corresponding to the field value, determine the value encoding method based on the data type, and convert the field value into a field value vector using the value encoding method. 3.The artificial intelligence driven data quality automatic detection method of claim 1, wherein, The steps for converting stage semantic vectors into associated semantic vectors based on the self-attention mechanism include: The first-stage semantic vector is selected as the baseline semantic vector, and all stage semantic vectors are selected as reference semantic vectors. The baseline semantic vector is projected into a query vector, and the reference semantic vector is projected into a key vector and a value vector. Attention weights are obtained through the query vector and key vector, and associated semantic vectors are obtained based on the attention weights and value vectors. 4.The artificial intelligence driven data quality automatic detection method of claim 1, wherein, The preset quality dimensions are completeness, accuracy, consistency, or timeliness. 5.The artificial intelligence driven data quality automatic detection method of claim 1, wherein, The step of inputting the associated semantic vector into a multi-task final prediction network that includes several final anomaly analysis branches to obtain a multi-dimensional anomaly probability set corresponding to the associated semantic vector includes: An initial shared underlying network and several initial anomaly analysis branches connected to the initial shared underlying network are constructed to form a multi-task initial prediction network. The training semantic vector is input into the initial shared underlying network to obtain the training feature vector. The training feature vector is then input into several initial anomaly analysis branches to obtain several training anomaly probabilities. Branch loss functions are constructed based on training anomaly probabilities and real anomaly labels. Several branch loss functions are aggregated into a total loss function based on uncertainty dynamic weighting. The network parameters of the initial shared underlying network and several initial anomaly analysis branches are optimized through the total loss function to obtain the final shared underlying network and several final anomaly analysis branches, and a multi-task final prediction network is formed. The associated semantic vectors are input into the multi-task final prediction network to obtain a multi-dimensional set of anomaly probabilities. 6.The artificial intelligence driven data quality automatic detection method of claim 5, wherein, The expression for the branch loss function is: , in, Indicates the relationship with the first The branch loss function corresponding to each initial anomaly analysis branch This represents the total number of training feature vectors. Indicates the relationship with the first In the initial anomaly analysis branch, the first The true anomaly labels corresponding to each training feature vector, and The value can be 0 or 1. Indicates the relationship with the first In the initial anomaly analysis branch, the first The training anomaly probability corresponding to each training feature vector. Represents the logarithmic function. Indicates the abnormal weight coefficient; The expression for the total loss function is: , in, Represents the total loss function. This indicates the total number of initial anomaly analysis branches. Indicates the relationship with the first Uncertain dynamic parameters corresponding to each initial anomaly analysis branch.

7. The AI-driven automatic data quality detection method according to claim 1, characterized in that, The step of combining several nodes into a field relationship graph based on field correlation includes: Get the field value vector corresponding to the field name, and obtain the correlation coefficient between the two nodes based on the field value vector; The correlation coefficient is compared with the correlation threshold. If the correlation coefficient is greater than the correlation threshold, a correlation edge is constructed between the two nodes, and the correlation coefficient is selected as the edge weight corresponding to the correlation edge to form a field relationship graph.

8. The AI-driven automatic data quality detection method according to claim 7, characterized in that, The step of adjusting the multidimensional anomaly probability set into a corrected anomaly probability set based on the field relationship graph includes: One of its nodes is selected as the baseline node, and the nodes with associated edges with the baseline node are selected as reference nodes. The multidimensional anomaly probability set corresponding to the baseline node is selected as the baseline node feature, and the multidimensional anomaly probability set corresponding to the reference node is selected as the reference node feature. Adjacency transit features are obtained based on edge weights and reference node features. Aggregate transit features are obtained through all adjacency transit features. The baseline node features and aggregate transit features are combined into a corrected anomaly probability set.

9. The AI-driven automatic data quality detection method according to claim 8, characterized in that, The corrected formula for obtaining the anomaly probability set is as follows: , in, Indicates the first The set of corrected anomaly probabilities corresponding to each node as the baseline node. This represents the corrected weight matrix. Indicates the correction bias term. Indicates the first The characteristics of the reference node when each node is the reference node. Indicates the first The aggregated transfer features corresponding to each node as the base node. Represents a non-linear activation function. This indicates a vector concatenation operation.

10. An AI-driven automatic data quality detection system, applied to the AI-driven automatic data quality detection method as described in any one of claims 1 to 9, characterized in that, The system includes: The extraction module is used to extract data records from the data table to be detected, obtain several field name vectors and several field value vectors corresponding to the data records, and obtain field-level semantic vectors through the field name vectors and field value vectors. The query module is used to assign positional codes to several field-level semantic vectors based on field order in order to obtain stage semantic vectors, and to convert stage semantic vectors into related semantic vectors based on a self-attention mechanism. The analysis module is used to input the associated semantic vector into a multi-task final prediction network that includes several final anomaly analysis branches, in order to obtain a multi-dimensional set of anomaly probabilities corresponding to the associated semantic vector. The final anomaly analysis branches correspond to a preset quality dimension. The identification module is used to select the field names in the data table to be detected as nodes, assign a multi-dimensional anomaly probability set to the nodes, combine several nodes into a field relationship graph through field correlation, and adjust the multi-dimensional anomaly probability set into a corrected anomaly probability set based on the field relationship graph. The execution module is used to obtain the data anomaly score corresponding to the data record based on several modified anomaly probability sets, construct a dynamic anomaly threshold based on the historical score set, and compare the data anomaly score with the dynamic anomaly threshold to determine whether there is a data anomaly.