A water conservancy data cleaning, tracing and preprocessing method and system

By establishing a lineage index and a dynamic discrimination threshold for water conservancy data cleaning, the problem of insufficient discrimination standards in multi-source water conservancy data processing was solved, thereby improving the accuracy and business applicability of the data and enhancing the ability to trace and continuously improve abnormal data.

CN123178799APending Publication Date: 2026-11-27ZHONGSHUI SANLI DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611686784.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-29
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies for cleaning and preprocessing multi-source water conservancy data suffer from several shortcomings: insufficient adaptability of discrimination criteria to data changes, difficulty in balancing effective data retention and business verification, and difficulty in tracing the source of anomalies for continuous improvement of data processing.

Method used

By establishing a lineage index between the data identifier and data source and processing link of water conservancy data, the noise discrimination weight and dynamic discrimination threshold of different noise types are determined, hierarchical cleaning is carried out, and business preprocessing is performed through configurable arithmetic rules and custom code rules. Cleaning and rule execution records are recorded to achieve source tracing, locate the abnormal data generation link and implement source suppression, and update the discrimination criteria to adapt to data changes.

Benefits of technology

It improved the accuracy and business applicability of multi-source water conservancy data processing, reduced the accidental deletion of valid data, enhanced the traceability of abnormal data, and improved the continuous governance capability of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178799A_ABST
    Figure CN123178799A_ABST
Patent Text Reader

Abstract

The application discloses a water conservancy data cleaning, tracing and preprocessing method and system, relates to the technical field of water conservancy data processing, obtains multi-source water conservancy data and data source information, and establishes a blood index; determines noise discrimination weights and dynamic discrimination thresholds according to data characteristics, data source types and update frequencies, performs hierarchical repair or rejection, retains and marks data that is on the discrimination boundary and has not been confirmed as incorrect, performs business preprocessing through configurable arithmetic rules and self-defined code rules arranged according to a dependency relationship; associates cleaning records, rule versions and execution records to the blood index, locates abnormal production links and implements source suppression; and updates the noise discrimination weights and the dynamic discrimination thresholds according to the cleaning results, rule processing results and tracing processing results, for subsequent cleaning, so that the application can adapt to multi-source data differences and changes, reduce effective data misdeletion and repeated generation of the same abnormality, and improve the accuracy, business applicability and traceability of data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of water conservancy data processing technology, and in particular to a method and system for cleaning, tracing, and preprocessing water conservancy data. Background Technology

[0002] With the development of water conservancy informatization and the construction of digital twin river basins, monitoring data such as water level, rainfall, flow, and water quality, as well as management data from water conservancy business systems, are constantly being collected, providing data support for applications such as hydrological analysis, flood forecasting, and engineering scheduling. This data originates from different monitoring equipment, business databases, and data exchange interfaces, resulting in differences in data format, collection cycle, update frequency, and quality. Problems such as missing, duplicate, and abnormal values ​​are prone to occur during collection, transmission, and conversion. Therefore, before water conservancy data enters the business analysis and calculation stage, data cleaning and preprocessing are necessary to improve the accuracy, consistency, and usability of the data.

[0003] Existing water resources data processing technologies typically employ preset rules or statistical thresholds to identify missing values, duplicate values, out-of-range values, and outliers. Data cleaning is then performed through methods such as imputation, correction, or removal. Rule engines are used for unit conversion, threshold verification, and hydrological operational calculations. However, the noise characteristics and data distribution of different data sources vary with operational status, making it difficult for fixed discrimination parameters to continuously adapt to data changes. This can easily lead to misjudgments or missed detections, and directly removing outlier data may result in the loss of marginal, valid information. In terms of operational preprocessing, configurable rules have limited expressive power for complex hydrological calculations and multi-site correlation verification, while code-based rules require high levels of programming skills and a suitable operating environment. Furthermore, there is a lack of effective correlation between data cleaning, operational rule processing, and anomaly tracing. Processing records and rule versions are difficult to correlate with the flow path of outlier data, making it difficult to accurately locate the anomaly generation point. The processing results are also difficult to use for subsequent discrimination parameter adjustments, leading to the recurrence of similar data quality problems.

[0004] Therefore, in the cleaning and preprocessing of multi-source water conservancy data, the lack of adaptability of the discrimination criteria to data changes, the difficulty in balancing effective data retention and business verification, and the difficulty in tracing the source of anomalies and using them to continuously improve data processing have become urgent problems to be solved. Summary of the Invention

[0005] This application provides a method and system for cleaning, tracing, and preprocessing water conservancy data, aiming to solve the problems in the existing technology for cleaning and preprocessing multi-source water conservancy data, such as insufficient adaptability of the discrimination criteria to data changes, difficulty in balancing effective data retention and business verification, and difficulty in tracing the source of anomalies and using them for continuous improvement of data processing.

[0006] Firstly, a method for cleaning, tracing, and preprocessing water conservancy data, the method comprising: Acquire multi-source water conservancy data and corresponding data source information, and establish a lineage index between the data identifier of the water conservancy data and the data source and processing link; Based on the data characteristics of the water conservancy data and the data source type and update frequency in the data source information, noise discrimination weights and dynamic discrimination thresholds corresponding to different noise types are determined; wherein, the data characteristics include the missing rate, mean drift, fluctuation, outlier degree and repetition of the water conservancy data, and the statistical range of the above indicators is consistent with the statistical range of the corresponding feature reference baseline. The feature reference baseline is established based on the historical quality qualified data of the data source to which the water conservancy data belongs, and the applicable fields, units and time windows of the feature reference baseline are recorded; Based on the noise discrimination weight and dynamic discrimination threshold, the water conservancy data is graded and cleaned to obtain the cleaning result; wherein, the graded cleaning includes repairing or removing data according to the degree of anomaly, and retaining and marking data that is at the discrimination boundary but has not yet been confirmed as erroneous; According to the preset rule chain, the data that was not removed from the cleaning result is subjected to business preprocessing to obtain the rule processing result; wherein, the preset rule chain includes configurable arithmetic rules and custom code rules arranged according to dependencies; Based on the data identifier, the processing records of hierarchical cleaning, as well as the rule versions and execution records of business preprocessing, are associated with the lineage index to obtain traceability information; Based on the source tracing information, locate the point where abnormal data is generated in the cleaning result and the rule processing result, and perform source suppression processing on the point of generation to obtain the source tracing processing result; Based on the cleaning results, the rule processing results, and the source tracing results, the noise discrimination weight and dynamic discrimination threshold are updated for subsequent graded cleaning of water conservancy data.

[0007] Optionally, in the above scheme, determining the noise discrimination weights and dynamic discrimination thresholds corresponding to different noise types based on the data characteristics of the water conservancy data and the data source type and update frequency in the data source information includes: Based on the missing data, distribution variations, and duplication of the water conservancy data, feature extraction is performed to obtain noise feature indicators; The basic weights of each noise type are determined based on the data source type, and the weight adjustment amount of each noise type is obtained based on the relationship between the noise characteristic index and the corresponding characteristic reference baseline. The weight adjustment amount is scaled according to the update frequency and combined with the corresponding basic weight to obtain the noise discrimination weight; Based on the noise discrimination weight, the noise sub-scores corresponding to missing values, outliers and duplicate values ​​in each water conservancy data are weighted to obtain the comprehensive noise score of each water conservancy data. Based on the distribution of the comprehensive noise score, a dynamic discrimination threshold for the graded cleaning is obtained.

[0008] Optionally, in the above scheme, before performing graded cleaning based on the noise discrimination weights and dynamic discrimination thresholds, the method further includes: Based on the threshold boundary corresponding to the data source type, the dynamic discrimination threshold is limited to obtain the candidate discrimination threshold; Based on the noise discrimination weight and the candidate discrimination threshold, noise discrimination is performed on historical verification samples with known labels to obtain sample discrimination results; Based on the correspondence between the sample discrimination results and the known labels, the recall rate of abnormal samples and the false alarm rate of normal samples are obtained. Based on the comparison results of the abnormal sample recall rate and normal sample false alarm rate with the preset verification conditions, the effective weights and effective thresholds for the graded cleaning are determined; wherein, when the preset verification conditions are met, the noise discrimination weights and candidate discrimination thresholds of the current round are used, and when the preset verification conditions are not met, the weights and thresholds of the previous round are used.

[0009] Optionally, in the above scheme, the step of performing graded cleaning of the water conservancy data based on the noise discrimination weight and dynamic discrimination threshold to obtain the cleaning result includes: Based on the noise discrimination weights, the comprehensive noise score of each piece of water conservancy data is determined; Anomaly classification results are obtained based on the relationship between the comprehensive noise score and the hierarchical threshold determined by the dynamic discrimination threshold; Based on the anomaly classification results, slightly abnormal data are repaired based on adjacent or homologous data, and moderately abnormal data are repaired based on a prediction model to obtain repaired data. The confidence level of the repair data corresponding to the prediction model is evaluated, and the repair data with a repair confidence level lower than a preset lower limit is marked as data to be reviewed, thus obtaining the repair evaluation result. Based on the anomaly classification results and the repair evaluation results, normal data and repaired data are retained, severely abnormal data are marked and removed, and data that is at the discrimination boundary and has not yet been confirmed as an error is retained and marked, resulting in a cleaning result that includes processed data, pending review markers, and processing records.

[0010] Optionally, in the above scheme, the step of associating the hierarchical cleaning processing records and the rule versions and execution records of business preprocessing with the lineage index according to the data identifier to obtain traceability information includes: Based on the processing actions of the water conservancy data in the graded cleaning, record the values ​​before and after processing, processing parameters and the corresponding model or rule version to obtain the cleaning processing record; Based on the rule execution status of the water conservancy data in the business preprocessing, record the rule version, execution order, parameters, values ​​before and after processing, and execution anomalies to obtain the rule execution record; Based on the data identifier, the cleaning process record and the rule execution record are associated with the corresponding processing node in the lineage index to obtain traceability information for reverse retrieval of data flow path and processing process.

[0011] Optionally, in the above scheme, the step of performing business preprocessing on the data not removed from the cleaning result according to the preset rule chain to obtain the rule processing result includes: Based on the configured conditional expressions, arithmetic expressions, and processing actions, configurable arithmetic rules are obtained, and custom code rules are obtained based on the loaded code file or code text. Based on the data dependency relationship between the configurable arithmetic rules and the custom code rules, a directed acyclic rule link is obtained with rules as nodes and data dependency relationships as connections. Based on the directed acyclic rule chain, rules with data dependencies are scheduled sequentially, and rules without data dependencies are scheduled in parallel to obtain the execution results of each rule node; wherein, subsequent rule nodes with data dependencies use the execution results of the preceding rule nodes as input; The rule processing result is obtained based on the execution result of the output node in the directed acyclic rule link.

[0012] Optionally, in the above scheme, the execution of the custom code rule includes: Based on preset resource limits and access permissions, a restricted execution environment corresponding to the custom code rule is established; The custom code rules are executed in the restricted execution environment, and resource consumption and execution time are monitored to obtain execution monitoring results; Based on the execution monitoring results, the execution process that triggers preset resource limits or execution timeout conditions is interrupted and the exception is recorded. The execution output of the normally completed execution process is obtained to get the code execution result. According to the preset output structure requirements, the execution output in the code execution result is verified to obtain the output verification result; Based on the code execution result and the output verification result, the execution output that passes the verification is determined as the processing output of the corresponding rule node, and execution exceptions and output verification exceptions are recorded to obtain the rule node execution result and execution record used to form the rule processing result and to carry out exception tracing.

[0013] Optionally, in the above scheme, the step of locating the generation point of abnormal data in the cleaning result and the rule processing result based on the source tracing information, and performing source suppression processing on the generation point to obtain the source tracing processing result, includes: Based on the data identifier of the abnormal data, the source tracing information is retrieved in reverse to obtain the data flow path and corresponding processing nodes of the abnormal data; Based on the running status, version information, configuration records, and processing records of the processing nodes, the abnormality generation process and the corresponding abnormality cause are obtained; Based on the anomaly generation process and the anomaly cause, determine the source suppression strategy targeting the data source, transmission batch, data conversion configuration, or business processing rules; The corresponding processing is executed according to the source suppression strategy, and the abnormal situation of the data source or processing link involved in the abnormal generation link is monitored in subsequent batches to obtain the source tracing processing result including the abnormal location result, the suppression execution status and the suppression effect.

[0014] Optionally, in the above scheme, updating the noise discrimination weight and dynamic discrimination threshold based on the cleaning result, the rule processing result, and the source tracing processing result includes: Based on the quality qualified data or the data confirmed to be correctly repaired in the cleaning results, the historical statistical features are smoothly updated to obtain the updated feature reference baseline. Based on the cleaning results, the rule processing results, and the source tracing results, the confirmed misjudged samples, missed samples, and corresponding labels are collected to obtain the updated historical verification sample library; Based on the updated feature reference baseline, the misjudgment and omission of each noise type, and the suppression effect in the source tracing processing results, the noise discrimination weights of each noise type are adjusted to obtain the updated noise discrimination weights. Based on the updated noise discrimination weights and the currently effective dynamic discrimination threshold, the updated historical verification sample library is discriminated to obtain sample discrimination results; Based on the comparison between the sample discrimination results and the corresponding labels, the recall rate of abnormal samples and the false alarm rate of normal samples are obtained. Based on the abnormal sample recall rate and the normal sample false alarm rate, the threshold calculation parameters are adjusted to obtain the updated dynamic discrimination threshold for subsequent water conservancy data classification and cleaning.

[0015] Secondly, a water conservancy data cleaning, tracing, and preprocessing system, the system comprising: The data access module is used to acquire multi-source water conservancy data and corresponding data source information, and to establish a lineage index between the data identifier of the water conservancy data and the data source and processing link; The discrimination parameter determination module is used to determine the noise discrimination weight and dynamic discrimination threshold corresponding to different noise types based on the data characteristics of the water conservancy data and the data source type and update frequency in the data source information. The data characteristics include the missing rate, mean drift, fluctuation, outlier degree and repetition of the water conservancy data. The statistical range of the above indicators is consistent with the statistical range of the corresponding feature reference baseline. The feature reference baseline is established based on the historical quality qualified data of the data source to which the water conservancy data belongs, and the applicable fields, units and time windows of the feature reference baseline are recorded. The graded cleaning module is used to perform graded cleaning on the water conservancy data according to the noise discrimination weight and dynamic discrimination threshold to obtain cleaning results; wherein, the graded cleaning includes repairing or removing data according to the degree of anomaly, and retaining and marking data that is at the discrimination boundary but has not yet been confirmed as erroneous; The rule processing module is used to perform business preprocessing on the data that was not removed from the cleaning result according to the preset rule chain, so as to obtain the rule processing result; wherein, the preset rule chain includes configurable arithmetic rules and custom code rules arranged according to the dependency relationship; The traceability information association module is used to associate the processing records of hierarchical cleaning and the rule versions and execution records of business preprocessing with the lineage index according to the data identifier to obtain traceability information; The source tracing module is used to locate the generation point of abnormal data in the cleaning result and the rule processing result based on the source tracing information, and to perform source suppression processing on the generation point to obtain the source tracing processing result; The feedback update module is used to update the noise discrimination weight and dynamic discrimination threshold based on the cleaning results, the rule processing results and the source tracing processing results, so that the graded cleaning module can perform graded cleaning on subsequent water conservancy data.

[0016] Compared with the prior art, this application has at least the following beneficial effects: Based on further analysis and research of existing technical problems, this application recognizes the following issues in the cleaning and preprocessing of multi-source water conservancy data: insufficient adaptability of discrimination criteria to data changes, difficulty in balancing effective data retention and business verification, and difficulty in tracing the source of anomalies for continuous data processing improvement. This application addresses these issues by establishing a lineage index between water conservancy data identifiers and data sources and processing chains, ensuring the traceability of sources and processing procedures during the cleaning and preprocessing of multi-source water conservancy data. Furthermore, it determines noise discrimination weights and dynamic discrimination thresholds based on the data characteristics, data source types, and update frequency of the water conservancy data, enabling noise discrimination to adapt to quality differences and data changes across different data sources. This allows for repair or removal based on the degree of anomaly, while retaining and marking data at the discrimination boundary that has not yet been confirmed as erroneous. This reduces the impact of noise while minimizing the reduction of effective data. Accidental deletion is addressed by orchestrating configurable arithmetic rules and custom code rules based on dependencies. This allows for business preprocessing of data that was not removed after cleaning, connecting general data cleaning with water conservancy business processes of varying complexity. Furthermore, cleaning processing records, rule versions, and execution records are linked to the lineage index, enabling anomaly localization to cover data sources, cleaning, and business preprocessing stages. This facilitates source suppression and reduces the recurrence of similar anomalies. Cleaning results, rule processing results, and source tracing results are fed back to update noise discrimination weights and dynamic discrimination thresholds, ensuring that subsequent cleaning standards are continuously adjusted based on actual processing conditions. This improves the adaptability of fixed discrimination standards, the risk of losing effective information during anomaly data handling, and the disconnect between cleaning, business processing, and source governance. Ultimately, this enhances the accuracy, business applicability, and continuous governance capabilities of multi-source water conservancy data processing. Attached Figure Description

[0017] Figure 1 A schematic flowchart of a water conservancy data cleaning, tracing, and preprocessing method provided in one embodiment of this application; Figure 2 This is a schematic diagram illustrating the feedback relationship and update content of the cleaning results, rule processing results, and source tracing processing results provided in one embodiment of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0019] This application applies to the processing of water conservancy monitoring data and water conservancy operational data. Water conservancy monitoring data includes water level, rainfall, flow, and water quality monitoring data, while water conservancy operational data includes records in operational databases and data received through data exchange interfaces. Different data sources differ in field structure, time representation, collection period, and data quality. The data processing process needs to simultaneously preserve data content, source information, and processing procedures, enabling data cleaning, operational preprocessing, and anomaly tracing to be carried out around the same data object.

[0020] The data features described in this application are used to characterize the missing, distributional variations, and duplication of water conservancy data; noise discrimination weights are used to characterize the contribution of different noise types to the comprehensive discrimination results; dynamic discrimination thresholds are used to distinguish between normal and abnormal data and serve as the basis for determining the boundaries of abnormal stratification. Noise discrimination weights are not used to directly calculate a weighted average of operational measurements from different stations, and dynamic discrimination thresholds are not equivalent to the upper limit of the measurement range of operational indicators such as water level and flow. Graded cleaning selects whether to retain, repair, or remove data based on the degree of data quality anomalies, while operational preprocessing performs verification, transformation, or labeling based on water conservancy operational relationships.

[0021] like Figure 1 As shown, multi-source water conservancy data and corresponding data source information are acquired, and a lineage index is established between the data identifier and the data source and processing chain of the water conservancy data. Data source information includes data source identifier, data source type, and update frequency, and may also include collection period, batch information, and equipment or site information. Data source type is used to distinguish between sensor time-series data sources, business database data sources, and interface or file exchange data sources, etc.; update frequency is used to characterize the data update status within the corresponding time scale.

[0022] Multi-source access can be achieved through relational database channels, message subscription channels, interface receiving channels, and offline file channels. Relational database channels use Java Database Connectivity (JDBC) or Open Database Connectivity (ODBC) to incrementally extract data based on business primary keys or time fields, and support full initialization. Message subscription channels subscribe to message topics such as Kafka and Pulsar to receive real-time data. Interface receiving channels receive data through timed polling or Webhook event pushes. Offline file channels monitor FTP, SFTP, or object storage directories, parsing CSV, Excel, and text files. Each channel is configured with a collection period, timeout conditions, and retry policies, and the data source identifier and data source type are registered. Real-time data can be organized into current batches by time window, and offline data can be organized by receiving batches for unified batch feature statistics.

[0023] The received data is adapted and converted into a unified intermediate format. Numerical, time, and string fields undergo type conversion, unifying time to a standard timezone timestamp, character encoding to UTF-8, and numerical precision and units. Field mapping converts source fields to standard business fields, while recording mapping operator identifiers and versions. For deterministic duplicate records identified by the business primary key and collection time window, the latest record is retained according to a preset priority, and conflicting and deduplicated records are saved. Encoding normalization of enumerated values, units, and units ensures that data from different sources has a consistent representation basis.

[0024] Standardized data is written to a standard table or standard event stream, and a data identifier is generated for each data entry. The lineage index records the data identifier, data source identifier, data source type, batch number, acquisition time, processing node sequence, node operator version, and configuration snapshot. The processing node sequence can include the acquisition channel, parsing, field mapping, deduplication, encoding normalization, and target storage. The lineage index is stored as structured records, enabling data identifiers to retrieve corresponding sources and nodes. Subsequent cleaning and rule execution records are then associated with the corresponding nodes. For access anomalies such as invalid formats, failed field mapping, and deduplication conflicts, anomaly tags are generated and associated with the source data; access anomaly records that cannot enter numerical calculations are still retained for anomaly tracing.

[0025] The objects of initial deduplication and subsequent duplicate noise detection can be different. Initial deduplication prioritizes eliminating duplicate records that can be directly identified by the business primary key and time window. Subsequent detection can identify residual approximate duplicates. When using the number of duplicates before deduplication to represent the duplication status of the current batch, the corresponding number should be read from the deduplication log, and the original total number of records within the same statistical range should be used as the denominator. When using data after deduplication to detect residual duplicates, the amount of data after deduplication should be used as the denominator. The two statistical methods should be stored separately, and the numerator before deduplication and the denominator after deduplication should not be mixed.

[0026] Based on the data characteristics, data source types, and update frequencies of water conservancy data, noise discrimination weights and dynamic discrimination thresholds corresponding to different noise types are determined. Within the same batch, data with the same data source or comparable business fields, the same units of measurement, and compatible time scales are prioritized for statistical analysis; incomparable fields such as water level and rainfall are not directly combined to calculate the mean. First, basic weights are obtained based on the data source type. Then, the weights are adjusted according to the changes in current data characteristics relative to the feature reference baseline, and scaling is performed in conjunction with the update frequency. Subsequently, a comprehensive noise score is formed based on the record-level noise sub-scores, and the dynamic discrimination threshold is determined based on the score distribution.

[0027] Based on noise discrimination weights and dynamic discrimination thresholds, water conservancy data is graded and cleaned to obtain cleaning results. Minor anomalies are repaired using adjacent or same-source data, moderate anomalies are repaired using predictive models, and severe anomalies are marked and removed. For data at the discrimination boundary that has not yet been confirmed as erroneous, the data is retained and marked as pending traceability. The removal refers to excluding data from the dataset entering downstream operations; anomaly records, source identifiers, and processing logs can still be stored in the anomaly record area to avoid destroying traceability evidence during the removal process.

[0028] The cleaning results include the processed data and the labels and processing records associated with the processed or removed data. Normal data, repaired data, and retained marginal data constitute the unremoved data; removed data retains retrieval entries through anomaly records and processing records. Data with insufficient confidence in predicting repair is marked as pending verification. The verification mark does not disappear upon entering subsequent verification; data cannot be used as confirmed correct training samples or baseline update samples simply because it has been repaired.

[0029] Based on the preset rule chain, data not removed from the cleaning results undergoes business preprocessing to obtain the rule processing result. The preset rule chain includes configurable arithmetic rules and custom code rules, which are arranged according to data dependencies. Configurable arithmetic rules are used to express condition comparisons, unit conversions, cumulative statistics, and multi-field operations; custom code rules are used to express complex hydrological formulas, multi-site linkage verification, and cross-business calculations. Each rule has a rule identifier and version, and the rule version and parameters corresponding to the current rule chain are used during execution.

[0030] Business preprocessing can include secondary validation, data transformation, or anomaly marking. For example, even after general noise cleaning, single-site data may still not conform to cross-site business relationships; relevant code rules can be used to validate data from multiple sites within the same time window. Units used in the access phase uniformly address differences in source formats, while unit conversions in the business preprocessing phase are performed according to the units required by specific business rules. Execution records should indicate both input and output units to prevent duplicate conversions. Rule processing results include business processing outputs, hit or validation flags, and statuses such as execution failure and output validation anomalies.

[0031] Based on data identifiers, the processing records of hierarchical cleaning, along with the rule versions and execution records of business preprocessing, are linked to the lineage index to obtain traceability information. The cleaning phase records processing actions, repair methods, parameters, values ​​before and after processing, time, and model version; the rule phase records rule identifiers and versions, execution order, parameter snapshots, hit rates, values ​​before and after transformation, and exception logs. A correspondence is maintained between processed data and processing records; even if data values ​​are modified, the modification process can still be traced back through the original data identifiers and processing node associations.

[0032] Based on the source tracing information, the generation points of abnormal data in the cleaning and rule processing results are located, and source suppression processing is performed on the generation points to obtain the source tracing processing results. The anomaly retrieval entry points include missing, outlier, and duplicate records found in the hierarchical cleaning, as well as business anomalies found in rule verification and errors newly introduced by rule execution. The node inputs and outputs, running status, version, configuration, and batch context are read backwards along the processing chain to distinguish between anomalies already existing in the source data and anomalies introduced by the processing nodes, and a location record is formed with corresponding source, cause, and evidence.

[0033] Source suppression measures may include correcting data collection configurations, intercepting erroneous batches, isolating or reducing the usage priority of defective data sources, correcting field mapping configurations, and revising error rules or scripts. The data source usage priority and the noise discrimination weights for missing, outlier, and duplicate values ​​are different concepts and are configured and recorded separately. After suppression is implemented, the anomaly rate changes of the relevant data sources or links are continuously monitored to obtain the suppression execution status and suppression effect, which, together with the anomaly localization results, form the source tracing processing results.

[0034] Based on the cleaning results, rule-based processing results, and source tracing results, the noise discrimination weights and dynamic discrimination thresholds are updated for subsequent graded cleaning of water conservancy data. Feedback updates are based on the data from the completed round of processing, updating the configuration for subsequent batches or time windows to prevent the results of the current round, before source tracing is completed, from being used repeatedly as confirmed conclusions. Figure 2 As shown, the cleaning results, rule processing results, and source tracing results enter the feedback data aggregation stage, and the updated content is returned to the discrimination parameter determination process, and is applied to the hierarchical cleaning and business preprocessing according to the updated object.

[0035] Through the above processing, the noise discrimination weight and dynamic discrimination threshold are adjusted according to the data source information and data characteristics, so that changes in different data sources and distributions can affect anomaly discrimination; by hierarchical repair, removal and marginal data retention, the information loss caused by unified deletion is reduced; the business verification after cleaning is completed through a dual-mode rule link, and the evidence of cleaning and rule execution is included in the lineage index, so that anomalies can be traced back to the corresponding source or processing link; furthermore, the source suppression and processing results are fed back to the subsequent discrimination process, thereby taking into account the water conservancy data quality, business applicability and continuous governance needs.

[0036] When determining noise discrimination weights and dynamic discrimination thresholds, missing rate, mean shift, fluctuation, outlier degree, and repetition can be extracted for the current batch. The statistical range of each indicator is consistent with the statistical range of the feature reference baseline. The feature reference baseline is established based on historical quality-compliant data from the same data source, and the applicable fields, units, and time windows are recorded.

[0037] The expression for calculating the missing rate is:

[0038] in, The missing rate, The number of missing objects. This refers to the total number of objects within the same statistical scope. When conducting statistics at the record granularity level... This represents the number of records containing missing fields. This represents the total number of records; when performing statistics at the field unit level, The number of missing cells in the field. This represents the total number of fields to be collected. For a specific field, statistics can also be calculated based on the percentage of missing records for that field in the current batch. The statistical granularity remains consistent between the current batch and the historical baseline within the same data source.

[0039] Mean shift is used to characterize the deviation of the current batch mean from the historical mean, and its calculation expression is:

[0040] in, This is the average value of the current batch. This is the historical baseline mean. The historical baseline standard deviation A positive zero-prevention constant is added to the denominator to prevent calculations from being impossible when the historical standard deviation is zero. The zero-prevention constant is set in conjunction with the data numerical scale and does not replace the historical standard deviation under normal conditions. The mean and standard deviation are calculated based on samples with valid values. Identified fault codes and unresolved fields are not directly used as valid measurements in the calculation.

[0041] The fluctuation is expressed as the ratio of the current batch standard deviation to the historical baseline standard deviation, calculated as follows:

[0042] in, This represents the standard deviation of the current batch. The ratio described above describes the change in the scale of fluctuation; the ratio is 1 when the baseline matches the current fluctuation. For data sources with a historical baseline standard deviation of zero or too small, a preset minimum effective standard deviation is used for protection, or this indicator is used only after a sufficiently valid historical sample is formed to avoid bringing unusable denominators into the calculation.

[0043] For one-dimensional data, the adjusted Z-score based on the median and median absolute deviation is used to characterize the degree of outlier, and the calculation expression is:

[0044] in, For the first The value of the corresponding field in each record. This represents the median of the current statistical sample. This is the median of the absolute deviations of the relative medians of each sample. (Take...) The percentage of records exceeding the preset outlier reference level, or the highest percentage in the batch. This serves as a representation of the degree of outlierness in a batch. When the value is zero, denominator protection is implemented, and division by zero is not performed directly. For multidimensional data composed of multiple related fields, Mahalanobis distance can be used to measure the deviation of records from the multidimensional distribution center, and the calculation result can be used for the corresponding outlier sub-scores.

[0045] The expression for calculating repetition is:

[0046] in, For repeatability, The number of duplicate records identified according to the preset duplicate detection criteria. This represents the total number of records within the corresponding statistical range. Duplicate detection can be performed based on business primary keys, time windows, and the similarity of field content, and the used detection criteria will be retained in the statistical results.

[0047] The noise discrimination weights for missing values, outliers, and duplicate values ​​are represented as follows:

[0048] in, , and These are the noise discrimination weights for missing values, outliers, and duplicate values, respectively. The base weights are obtained from the data source type profile table. ,in For example, a sensor time-series data source can be set with a relatively high base weight for outliers, while a business database table data source can be set with a relatively high base weight for duplicate values. The base weights must satisfy the following:

[0049] The weight adjustment is calculated based on the relationship between the current batch noise characteristic index and the characteristic reference baseline. One calculation method is as follows:

[0050]

[0051]

[0052] in, , and This represents the weighting adjustment for the three types of noise; , and This serves as a baseline for the missing rate, outlier ratio, and duplication rate of the corresponding data source. This represents the percentage of outliers in the current batch. to This is a configurable adjustment factor. (The above...) The standard deviation ratio is used, and the basic weights and relevant adjustment coefficients are configured with the same ratio caliber to avoid mistakenly treating a ratio of 1 as a ratio of 0. Each coefficient is configured in conjunction with the numerical range of the corresponding indicator to prevent a single indicator from dominating the weight adjustment simply because its numerical scale is large.

[0053] Combined with update frequency Scaling the weight adjustment over time. One expression for the frequency factor is:

[0054] in, Frequency factor For frequency reference value, The sensitivity coefficient for the frequency factor. It is a natural constant. Segmented scaling can also be used based on frequency levels. The frequency factor controls the scaling degree of the adjustment amount as the update frequency changes; it does not directly identify whether the fluctuation is persistent. In high-frequency data processing, combining sliding window statistics and smooth updates of the feature reference baseline reduces the impact of single-batch random fluctuations. The persistent distribution offset is reflected in the features of the continuous window, and then participates in weight synthesis via the frequency factor.

[0055] One expression for weight composition is:

[0056] Perform normalization again:

[0057] in, For the amplitude limiting function, and For the weight boundary, before and after normalization This represents the value of the same weight variable at different computational stages. Normalization uses non-negative, summed, and non-zero composite weights. If the weight boundaries are also used as the final weight constraints, the boundaries must be verified after normalization. Out-of-limit components are fixed to their corresponding boundaries, and the remaining weights are redistributed among the remaining components until non-negativity, a sum of 1, and boundary constraints are simultaneously satisfied. The preset boundaries should allow for the existence of weight vectors that satisfy the above conditions.

[0058] Noise sub-scores were determined for each water resources data point. Missing sub-scores were calculated using the proportion of missing fields or missing data markers; outlier sub-scores were calculated using the corrected absolute Z-score or Mahalanobis distance after scaling; and duplicate sub-scores were calculated using the similarity to the identified duplicate record set. Sub-scores were mapped to comparable score ranges and then weighted. The same sub-score calculation and scaling methods were used for the current data and historical validation samples.

[0059] The formula for calculating the overall noise score is:

[0060] in, For the first The overall noise score of the water conservancy data. , and These are the sub-scores for missing, outlier, and duplicate records, respectively. The higher the overall noise score, the higher the degree of data quality abnormality assessed according to the current weights.

[0061] The dynamic discrimination threshold is determined based on the current batch's overall noise score distribution. One expression is:

[0062] in, To dynamically determine the threshold, and These are the mean and standard deviation of the overall noise score for the current batch, respectively. In this formula... The coefficients for the threshold are calculated and configured or adjusted according to the data source type and update frequency, and are stored and used separately from the sensitivity coefficients in the frequency factor expression. Another approach is to use quantile thresholds.

[0063] in, Let be the quantile function of the overall noise score distribution. This is the expected anomaly ratio configured based on the data source profile. The expected anomaly ratio is used to select the discrimination point and does not imply that a fixed proportion of data must be forcibly removed in each batch. Candidate thresholds should also be subject to boundary constraints and backtesting with historical validation samples.

[0064] In other implementations, information entropy, sliding window statistics, or Bayesian adaptive estimation can be used to obtain weights for different noise types. When using alternative calculation methods, the correspondence between noise features, data source information, weights, record scores, and dynamic discrimination thresholds is still maintained, and the corresponding calculation configurations and versions are retained for cleaning and source tracing purposes.

[0065] Through the above processing, batch-level data features are used to determine weights and thresholds, and record-level noise sub-scores are used to identify anomalies in specific data, so that data source type, update frequency, and distribution changes can jointly affect the cleaning standard; at the same time, by unifying statistical caliber and scoring scale, the weighting relationship between different noise types is interpretable, providing a consistent basis for subsequent stratified processing.

[0066] Before the candidate noise discrimination weights and dynamic discrimination thresholds are applied to the hierarchical cleaning process, threshold boundary constraints and backtesting with historical validation samples are set. The threshold boundaries are configured according to the data source type. ,in and These are the allowed lower and upper boundaries, respectively. When the dynamic discrimination threshold obtained by the algorithm is lower than the lower boundary, the lower boundary is used; when it is higher than the upper boundary, the upper boundary is used; and when it falls within the interval, the calculated value is retained, resulting in a candidate discrimination threshold. The threshold boundaries are used to limit excessive shifts in the discrimination standard caused by overall data batch distortion and do not replace the physical range verification in water conservancy business rules.

[0067] The historical verification sample library stores confirmed abnormal and normal samples. Labels can come from manually reviewed anomaly records with identified causes, and confirmed historical data. The sample library is categorized or filtered according to applicable data source type, fields, and units of measurement to avoid using incomparable samples to evaluate the current configuration. Candidate noise discrimination weights and candidate discrimination thresholds work together on the samples. Sub-score calculation uses the same feature definitions and scaling methods as the current batch to obtain the sample discrimination results.

[0068] The recall rate of anomalous samples is calculated based on the sample discrimination results and known labels, expressed as follows:

[0069] in, For outlier sample recall, This represents the number of correctly identified outlier samples. This represents the number of unidentified anomalous samples. The false positive rate for normal samples is calculated as the proportion of normal samples judged as anomalous to the total number of normal samples, and should not be confused with the recall rate for anomalous samples. The sample library should contain both normal and anomalous samples that can be used to calculate the corresponding indicators; if the sample is insufficient, backtesting results that cannot be calculated should not be interpreted as valid.

[0070] The preset validation conditions include an outlier recall rate not lower than a preset lower limit. Furthermore, the false positive rate of normal samples should not exceed a preset upper limit. When both conditions are met, the noise discrimination weights and candidate discrimination thresholds of this round are used as the effective configuration; if either condition is not met, the candidate configurations of this round are rejected, the weights and thresholds effective in the previous round are restored, and the rollback time, candidate version, restored version, and reason are recorded. Weights and thresholds are saved and restored in pairs to avoid changing the unverified discrimination relationship by using new weights with old thresholds.

[0071] When the initial run lacks the configuration from the previous round, the weights and thresholds pre-configured in the data source profile and validated with initial samples are used as the initial configuration. For new data sources lacking sufficient historical samples, the initial profile applicable to similar data sources can be inherited, and updated gradually after confirmed samples are generated. When the threshold boundaries themselves need adjustment, the adjustment basis and effective version are also saved to avoid directly widening the boundaries to accommodate current abnormal batches.

[0072] By limiting the range of candidate threshold variation through threshold boundary constraints, and then checking the recall and false alarm rates using samples with known labels, the candidate weights and thresholds undergo quality verification before being used for actual cleaning. When the candidate configuration does not meet the conditions, the effective configuration is restored in pairs, which helps to reduce abnormal missed detections and false alarms of normal data caused by distribution distortion, and maintains the stability of continuous batch processing.

[0073] In graded noise cleaning, anomaly classification results are generated based on the relationship between the overall noise score and the stratification threshold. The stratification thresholds include progressively increasing thresholds. , and This is used to distinguish between normal or marginal data, minor anomalies, moderate anomalies, and severe anomalies. Hierarchical thresholds can be derived from dynamic thresholds or configured in conjunction with business fault tolerance requirements under the constraints of dynamic thresholds. For example:

[0074] in, This is a layered proportional coefficient; ensure it during configuration. ; For higher than The thresholds for severe anomalies are determined. The criteria for determining the three thresholds are consistent with the scale of the current comprehensive noise score and are simultaneously saved in the configuration record. The hierarchical relationship is as follows: when At that time, it corresponds to normal or edge data; when At that time, it corresponds to a minor abnormality; when At that time, it corresponds to a moderate anomaly; when At that time, a serious anomaly was observed.

[0075] The discrimination boundary refers to the area near the dividing line between normal and abnormal data. Edge data can be identified through a pre-configured boundary proximity range, which corresponds to the scoring scale and business fault tolerance requirements and is determined before execution. Data located near the boundary and for which there is no confirmed error evidence is retained and marked as pending traceability; data whose errors have been confirmed by error codes, parsing failures, or explicit business constraints are not directly retained as valid edge data simply because they are close to the discrimination boundary. In practice, the edge retention mark and the anomaly degree mark are recorded together to avoid interpreting "not yet confirmed as error" as "already confirmed as correct".

[0076] Minor anomalies can be corrected using interpolation, mode imputation, or source mean repair, depending on the type of the anomaly field. For continuous numerical fields with valid adjacent time points, linear interpolation or time series interpolation is used; for categorical or discrete fields, the mode within the same statistical range is used; for source numerical fields with sufficient normal samples, the mean of normal samples from the same data source and the same field is used, or data from source sites with compatible dimensions, business meanings, and time ranges are used. The repair operation record includes the field being repaired, the reference sample range, and the method used, ensuring traceability of the repaired values.

[0077] Moderate anomalies are corrected using predictive models. Mean regression can estimate the corrected value based on the statistical relationship between preceding and following data windows; K-nearest neighbor regression can retrieve nearest neighbor samples in the relevant feature space and estimate the target field based on these samples; random forest prediction can input relevant features of the target field into a trained model to obtain the predicted value of the target field. The data used for prediction should match the site, time period, field meaning, and unit of the target data. When subsequent time-point data is not yet available in streaming processing, historical windows that have already been reached can be used, or the correction of preceding and following data can be performed after the corresponding window is complete. Data that has not yet been acquired should not be used as actual input.

[0078] The repair confidence level is evaluated based on the historical validation performance of the prediction model, the matching between the reference sample and the object to be repaired, and the deviation between the repair result and available observations. The confidence level evaluation caliber is saved in association with the model version, and different types of models are not forced to use the same undefined score. When the repair confidence level is lower than the preset lower limit, the repair value and the pending review label are saved together and entered into the manual review queue; when the confidence level meets the conditions, the corresponding repair result is retained. Manual review can combine source records, adjacent time point data, and business information to confirm the repair, modify the repair value, or reject the repair result, and write the conclusion back to the data label.

[0079] Severe anomalies are marked as anomalies and removed from the downstream dataset. The original record, reason, and time of removal are retained in the anomaly record. Normal data is directly retained. Repaired data retains the correlation between the original and repaired values. Marginal data retains the original value and the traceability marker. Data awaiting review in the cleaning results can continue to be validated according to business rules, but the uncertainty marker is not automatically removed before the review conclusion is formed, nor is it used as a reference baseline for updating features of confirmed correct data. Marginal data can be retained, modified, or deleted after manual traceability. The manual conclusion is also written back to the label and included in the feedback.

[0080] Without altering the hierarchical fault tolerance and evidence preservation relationships, other repair methods include K-nearest neighbor imputation, multiple imputation, random forest prediction repair, or deep generative model-based repair. The input conditions, training data, and model versions for each method are recorded separately, and the acceptance of the repair results is determined by the corresponding quality evaluation and review mechanisms.

[0081] The anomaly level is determined by comprehensive noise score, and local data repair, predictive repair, or removal is selected according to the level to match the processing intensity with the degree of anomaly. By retaining normal data, marginal data, and repair records, the situation of uniform deletion of effective information is reduced. The obtained repair value and the confirmed correct repair status are distinguished by confidence assessment and pending verification mark, providing a clearer basis for data quality for subsequent business preprocessing and feedback learning.

[0082] When generating traceability information, data identifiers serve as the entry point for linking records across different processing stages. The resulting lineage index records the data source and the sequential relationship between nodes, supplementing node-level processing evidence during cleaning and business preprocessing. One data identifier can correspond to multiple ordered processing records; when rules are executed in parallel, the dependencies between nodes and the data used by each branch are recorded to prevent parallel relationships from being incorrectly represented as a single sequential relationship.

[0083] The data cleaning process log includes data identifiers, action types, repair methods and parameters, values ​​before and after processing, processing time, and model or rule version. Action types include retention, repair, removal, and pending review. For repair actions, the pre-processing value is used to check for existing anomalies, and the post-processing value is used to check if the repair introduced new problems. For removal actions, the reason for removal and related anomaly records are recorded. For retention actions, the difference between normal retention and marginal retention is recorded. If necessary, a snapshot of the weights, thresholds, and hierarchical parameter configurations effective in the current round is also saved to explain the processing basis at that time.

[0084] Rule execution logs include rule identifier, rule version, rule set version, execution order, parameter snapshot, hit status, values ​​before and after conversion, and exception logs. Each rule change generates a new version; already executed data is associated with the version actually used at the time, and historical version information is not overwritten by current rule updates. Custom code rules record the version identifier of the code file or text to easily determine the specific execution content; rules that run normally but fail business validation are marked separately from script timeouts, resource limits exceeding limits, or unqualified output structures.

[0085] By associating the cleaning processing records and rule execution records with the corresponding processing nodes in the lineage index, it is possible to retrieve the source, collection path, cleaning action, and business rule execution process by data identifier, or to retrieve affected data in reverse order by node or version. When target data is modified, the values ​​before and after processing, as well as the modification actions, are saved, thus distinguishing between original input, repair output, and business transformation output, rather than replacing the complete historical process with the current value.

[0086] By associating and saving data content, node relationships, cleaning actions, and rule versions, anomaly localization can examine the actual inputs, outputs, and execution conditions of each process. This supports tracing data collection and transmission issues, as well as tracing and repairing issues introduced by business rules. It can also quantify missing rates, anomaly rates, cleaning ratios, and the number of source problems, providing a record basis for processing result verification and data quality auditing.

[0087] When performing business preprocessing based on preset rule chains, two types of rule definitions are first formed. Configurable arithmetic rules consist of conditional expressions, arithmetic expressions, and processing actions. Operations personnel can select fields, comparison conditions, operation relationships, and processing methods through the configuration interface. The system converts the configuration into structured rule records and registers the rule identifier and version. Structured rules can be saved in structured formats such as JSON for loading by the rule interpretation and execution component, without requiring separate program code to be written for each simple rule.

[0088] Configurable arithmetic rules enable unit conversion, value range comparison, fault code identification, cumulative rainfall statistics, flow calculation based on configured relationships, and multi-field arithmetic operations. For invalid error codes such as 9999 or -9999 (as defined by the system), the meaning of the error code should be confirmed according to the field and data source conventions; the same value should not be uniformly considered an error in all fields. Cumulative rainfall rules should clearly specify whether the input data represents periodic rainfall or cumulative rainfall, and record the statistics window; flow calculation rules should use the calculation relationships and parameters already provided by the business, and should not replace actual hydrological relationships with undefined formulas.

[0089] Custom code rules are formed by uploading script files or entering code text. These rules are used to implement complex hydrological calculations that are difficult to describe using structured arithmetic expressions, multi-site sensor data linkage verification, or multi-service related processing. Each code rule registers input fields, output fields, applicable units, rule identifier, version, and parameters. For services such as runoff generation calculations, the business formulas and parameters required for rule execution are provided by specific business configurations or code content; this application does not assume hydrological calculation formulas unrelated to the water conservancy object.

[0090] A directed acyclic rule chain is constructed based on the data dependencies between the two types of rules. Rule nodes register the fields they need to read and the fields they need to generate. Subsequent nodes establish dependency connections when using the output of their predecessor nodes; nodes that do not need to read each other's output can be executed in parallel. After orchestration, the completeness of dependencies and the existence of cycles are checked. Links with circular dependencies or missing necessary inputs are not scheduled as executable links. The two types of rules can alternate in the same link; it is not required that all arithmetic rules be executed before the code rules are executed.

[0091] For example, an arithmetic verification rule and a custom code rule can be treated as two parallel branches. Another code rule can be configured to depend on the outputs of both branches, and subsequent arithmetic transformation rules can be configured to depend on one of the code branches. This orchestration creates a hybrid serial and parallel execution relationship: subsequent nodes execute after all necessary inputs are ready, while nodes that are independent of each other execute within concurrency limits. Rule names are used to identify the business processing objects and do not affect the establishment of the execution order based on actual data dependencies.

[0092] The scheduler schedules nodes according to the topology of the rule links. The starting node reads the data that was not removed from the cleaning results, and subsequent nodes obtain the output of the preceding node through intermediate results. Intermediate results of parallel branches are saved separately for each corresponding node. For rules with actual write dependencies or output conflicts for the same field, the order of operations or their respective output fields should be clearly defined during orchestration; dependencies should not be ignored simply because nodes are located in different branches. For rules involving multiple data points, such as cumulative statistics and multi-site verification, the execution record is associated with the actual data identifiers and time windows involved in the calculation, so that the output can be traced back to the input range involved in the calculation.

[0093] The execution results of rule nodes are differentiated into processing outputs and running status. When business validation finds data that does not meet business conditions, the corresponding data can be retained and a business exception flag can be added. When code execution fails or necessary output is unavailable, the execution failure status is recorded, and null values ​​or ungenerated results are not passed to dependent nodes as normal business results. Data related to failed nodes is recorded for traceability, and other branches without dependencies can continue execution. The processing outputs and execution statuses of the rule chain output nodes are aggregated to form the rule processing result.

[0094] By unifying the rule chain orchestration, the configurability of configurable arithmetic rules is combined with the expressive power of custom code rules, enabling the same data processing flow to complete simple verification and complex water conservancy business calculations. By controlling input transmission, serial execution and parallel scheduling through dependency relationships, unnecessary serial waiting is reduced, and the rule processing results and abnormal states have clear node sources.

[0095] Custom code rules run in a restricted execution environment. This restricted execution environment can employ a sandbox with independent resource quotas and access control, configuring processor time, memory usage, and execution timeout limits. Access permissions include a file system read-only whitelist, default blocking of network access, and a whitelist of callable function libraries. Data required by business rules is provided by a controlled input interface; scripts do not bypass data access and lineage records through arbitrary file or network access.

[0096] When loading custom code rules, the code version, input data, and execution parameters are associated with the currently executing task. During execution, processor time, memory usage, and execution duration are monitored to generate execution monitoring results. If an infinite loop, timeout, or resource usage reaches its limit, the corresponding execution process is interrupted, the execution exception is captured, and the corresponding resources are released. Requests to access unauthorized files, networks, or function libraries are rejected by the restricted execution environment, and the corresponding permission exceptions are logged. Monitoring and control are implemented for specific rule execution tasks to prevent a single abnormal script from continuously consuming data collection service resources.

[0097] The code execution result includes the execution output when it completes normally, or the error status and logs when it ends abnormally. Execution processes that are interrupted or terminated abnormally do not have acceptable normal output, and non-existent output cannot be validated. For the output of normally completed execution, the field types, field lengths, and numerical ranges are validated according to the output structure requirements registered in the rules, and the existence of required fields is checked. The output structure validation checks whether the interface result is usable, and records are separate from whether the hydrological business rules determine that the data is normal.

[0098] When output validation passes, the output is executed as the processing output of the corresponding rule node, for use by subsequent dependent nodes or output nodes. When validation fails, the output validation exception is associated with and saved along with the input data identifier, code version, parameters, and runtime logs. Whether it's execution timeout, resource overrun, permission exception, or output validation failure, all result in a rule node execution result and execution record, used for summarizing rule processing results and tracing exceptions. Exception handling allows the main access service to continue receiving other data; it does not mean that the dependent links of failed rules can still be marked as successful.

[0099] By restricting the resources and access objects that the code can use in the restricted execution environment, and interrupting the corresponding task when execution times out or resource limits are exceeded, the impact of infinite loops and abnormal code on the data acquisition process can be reduced. By verifying the output structure and leaving anomaly logs, unusable output is prevented from being treated as normal data and processed. At the same time, it provides a basis for distinguishing between data anomalies and code execution anomalies in the future.

[0100] In anomaly tracing, the data identifier of the abnormal data or the associated data identifier in the rule execution record is used as the entry point to reverse-retrieve the corresponding processing node and data flow path. For anomalies identified through hierarchical cleaning, the data before cleaning and the access node are retrieved; for anomalies discovered during business verification, the input, output, and verification conditions of the corresponding rule node are checked first, and then the process is traced back along the input source; for script execution anomalies, the code version, parameters, restricted execution environment, and execution logs are checked. All of the above different entry points use the same lineage relationship and are not limited to anomalies at the data collection device end.

[0101] The reverse path can trace back from the business processing output through rule nodes, cleaning nodes, target storage, encoding normalization, deduplication, field mapping, parsing, and collection channels to the data source terminal. When the path has branches or multiple inputs, the relevant branches involved in the abnormal output are retrieved one by one according to the actual dependency relationship, and the sites, batches, and data sources involved are recorded. The node version and configuration use a snapshot at the time of data processing, and do not replace historical configurations with current configurations.

[0102] The location of the anomaly can be determined by analyzing the pre- and post-processing values, running status, configuration, and batch context of each node along the path. For example, if the original received record is normal but the business field is incorrect after field mapping, and there is an inconsistency in the field correspondence between the corresponding versions, the field mapping node can be identified as the problematic link; if the original record of the data source has a fault code agreed upon by the device, and the acquisition node can correctly parse the record, the problem can be located in the acquisition device or the source data; if the received batch has missing numbers, duplicate sequence numbers, or time misalignments, and the transmission logs can correspond to the corresponding faults, the relevant transmission batch can be located; if the rule input structure and values ​​are normal, but a specific rule version produces incorrect units, incorrect field structure, or abnormal output after execution, and there is support from configuration or execution logs, the problem can be located in the rule configuration or code logic.

[0103] The presence of a node in the path only indicates that data passed through that node; the mere presence of that node does not necessarily indicate an anomaly. When the problem can be confirmed based on changes before and after processing and operational records, the stage where the anomaly occurred and its cause should be recorded. If evidence is insufficient, the suspicious stage, missing evidence, and pending review status should be recorded, avoiding presenting multiple possible causes as a single, definitive source. For data where rules execute normally but business validation fails, it should also be determined whether the error is due to incorrect rule condition configuration or a genuine business inconsistency between inputs, avoiding confusion between rule-detected anomalies and rule-generated anomalies.

[0104] The location results are categorized into types such as data acquisition device failure, field mapping configuration errors, lost or misplaced transmission batches, source database table quality issues, rule configuration errors, and custom code logic defects, and the frequency of each type of problem is statistically analyzed. Data acquisition device failures can be further divided into abnormal values, transmission interruptions, and range out-of-bounds errors. The structured traceability report includes a list of abnormal data, data flow path, source link, suspected or confirmed causes, evidence log, and recommended measures. The confirmation status in the report corresponds to the sufficiency of the evidence.

[0105] Determine the source suppression strategy based on the stage and cause of the anomaly. For data collection configuration issues, correct the collection cycle, fields, units, or device configurations; batches identified as erroneous can be frozen and prevented from entering downstream processes; data sources with persistent defects can be isolated or have their usage priority reduced; field mapping issues should be corrected according to mapping configurations; rule or script issues should be revised according to rule versions. For issues with insufficient evidence, revocable marking or isolation can be implemented first, followed by review, without automatically rewriting undetermined core business logic. Record the scope of each measure, execution time, associated anomalies, and execution status.

[0106] After source suppression, monitor the anomaly rate, recurrence frequency, and rule failures in subsequent data within a comparable batch or time window compared to before suppression. The monitoring scope is limited to the data source, device, configuration version, or link affected by the measures, avoiding substituting system-wide data volume changes for the corresponding source governance effect. The source tracing results compile anomaly location, measure implementation, and effect monitoring information before proceeding. Figure 2 The feedback process is shown.

[0107] Anomaly tracing can also be achieved through data genealogy diagrams, end-to-end tracing markers, or query log parsing. When using data genealogy diagrams, nodes and edges represent data or processing objects and their generation and transformation relationships, respectively. When using end-to-end tracing markers, the access, transformation, cleaning, and rule execution events are linked together. When using query log parsing, the source and processing relationships are reconstructed based on query and transformation logs. All alternative methods must retain the correspondence between the abnormal data and relevant processing evidence to support source localization and subsequent suppression.

[0108] By retrieving abnormal data along the actual processing path and locating it by combining the values ​​before and after node processing, version configuration, and operational evidence, problems in collection, transmission, mapping, and rule processing can be identified separately. Based on the location results, corresponding suppression measures can be implemented and subsequent abnormal changes can be monitored, which can reduce the repeated entry of the same problem into the cleaning process and provide governance results with source and execution status for feedback updates.

[0109] like Figure 2 As shown, the feedback updates aggregate the cleaning results, rule processing results, and source tracing results. The cleaning result feedback includes the number and percentage of various anomalies, the number of anomalies at each level from minor to severe, successful and failed repairs, the number of anomalies removed, the number of anomalies retained at the edge, changes in distribution before and after repair, and the distribution of repair confidence. It also includes manually verified misjudgments, omissions, and correction labels. The rule processing result feedback includes rule hit and conversion statistics, rule execution failure records, version changes, and changes in the distribution of preprocessed data or the business validation pass rate. The source tracing result feedback includes the source type, the problematic stage, the involved parties, the suppression measures, the execution status, changes in the anomaly rate, and the frequency of problem occurrence.

[0110] The feature reference baseline is updated based on the quality compliance data or confirmed correct repair data from the cleaning results. The updated data includes historical averages. Historical standard deviation Missing rate reference Outlier ratio reference and repeatability reference The baseline is updated smoothly using a sliding window or exponentially weighted moving average method, allowing recent data to gradually influence the baseline. Data awaiting review and repair, unconfirmed marginal data, severely outlier data, and processed outputs with confirmed errors are not directly included in the baseline as quality-compliant samples.

[0111] Changes in data distribution caused by rule processing should be interpreted in conjunction with the semantics of the rules. Changes in numerical scale due to unit conversion should first be resolved by reverting to a comparable, unified scale or using a baseline with the corresponding units before comparing with historical features. Cumulative statistical outputs and original instantaneous observations belong to different objects and should not be directly mixed to update the same baseline. Cross-site validation pass rates can serve as a reference for business consistency, but normal rule execution or successful validation itself does not replace manual confirmation or quality labels with identified causes.

[0112] The historical verification sample library is updated based on manually confirmed misjudgments, omissions, and newly identified anomalous samples. Sample records retain the original data or features required for reproducible discrimination, corresponding labels, sources, and confirmation criteria, while maintaining applicable data sources and field ranges. Expired or invalid samples are deleted to control the sample library size and category distribution, preventing insufficient anomalous samples that could render backtesting ineffective. When rule version changes render label criteria invalid, the corresponding samples are re-examined, and unverified labels from the old rules are not permanently inherited.

[0113] The noise discrimination weights are adjusted based on the false positives and false negatives for each noise type. If the false negative rate for a certain type of noise is high, the corresponding discrimination weight can be increased; if the false positives or false negatives for a certain type of noise are high, the corresponding discrimination weight can be decreased. One expression for incremental adjustment is:

[0114] in, To learn step length, The error signal is statistically obtained based on the misjudgments and omissions corresponding to the noise type. A positive signal indicates an increase in the weight of that type, and a negative signal indicates a decrease in the weight of that type. The adjustment magnitude is jointly controlled by the learning step size, weight boundaries, and normalization constraints. After adjustment, each component is checked to be non-negative, sum to 1, and satisfy the applicable final boundary constraints to avoid weight imbalance caused by multiple rounds of incremental adjustments.

[0115] Source tracing results are used to distinguish the sources of error. For example, if it is confirmed that an incorrect unit conversion rule has caused a large amount of normal data to be judged as anomalous, the corresponding rule should be revised and the affected labels corrected first; the rule problem should not be masked simply by reducing the weight of outliers. If it is confirmed that anomalies persist in a certain data source and source suppression has not achieved the expected effect, then subsequent anomalies of the corresponding source should be used as reference features for weight calculation. The updated feature reference baseline, misjudgment and missed judgment statistics, and suppression effect work together to determine subsequent parameters, rather than adjusting all data sources simultaneously without distinction.

[0116] The updated noise discrimination weights and the currently effective dynamic discrimination thresholds are used to discriminate against the updated historical validation sample library. The results are then compared with the sample labels to obtain the recall rate of abnormal samples and the false positive rate of normal samples. The thresholds are adjusted based on these two indicators to calculate the coefficients. or quantile parameter This yields candidate update thresholds. Generally, lowering the threshold for judging anomalies based on the upper bound of the score will increase sensitivity, but may also increase false alarms. Therefore, the update direction should be selected by combining both indicators and the threshold boundary, rather than pursuing only a single indicator.

[0117] Threshold updates still adhere to the reasonable range and candidate configuration validation requirements corresponding to the data source. Candidate weights and thresholds are saved and validated as a single configuration version. If the conditions are met, it is used in subsequent batches; if the conditions are not met, the existing configuration is maintained or restored. Threshold range adjustments are required. In practice, the boundary configuration will be updated separately based on continuous feedback and verification results; tiered thresholds , and Synchronous checks and continuous increments are performed to prevent the original hierarchical relationship from becoming invalid after the dynamic judgment threshold is updated.

[0118] Figure 2 Other updates implemented in conjunction with the feedback mentioned above are also shown. The data source profile updates the underlying weight vector based on long-term feedback. Update frequency reference value Threshold ranges and feature reference baselines are established to ensure that new data sources of the same type inherit applicable initial parameters. Profile updates save versions and applicable scope, preventing the direct generalization of features from a short-term fault batch to all data sources of the same type.

[0119] The predictive repair model is updated using data that has been confirmed to be correctly repaired. For the K-nearest neighbor method, the nearest neighbor sample library can be updated; for predictive models such as random forest, retraining or incremental updates can be triggered based on newly added valid samples and model capabilities, and the model version and repair confidence evaluation parameters can be updated. Repair values ​​that are only predicted by the model itself and have not yet been confirmed are not directly used as true labels for repeated training, in order to reduce the gradual accumulation of incorrect repairs.

[0120] The rules and source tracing are linked for updates, generating correction suggestions based on identified rule configuration errors or code logic defects, or triggering rule version revisions when the corrections are clearly defined. Revised rules enter subsequent business preprocessing, while older versions and historical execution records are retained. Monitoring data on the source suppression effect is returned to the feedback data aggregation stage, enabling... Figure 2 The features reference baseline, weights, thresholds and hierarchical parameters, historical validation sample library, data source profile, prediction and repair model and rule version form an interrelated update content.

[0121] By updating the baseline and sample library with qualified or confirmed data, and adjusting weights and thresholds based on false positives, false negatives, business processing, and source suppression results, subsequent cleaning can adapt to changes in data quality and business status. At the same time, it distinguishes between rule failures, real data anomalies, and statistical distribution changes, reducing the risk of absorbing erroneous feedback as normal baselines, and improving the consistency of subsequent repairs and business processing through continuous maintenance of models, profiles, and rule versions.

[0122] This application also provides a water conservancy data cleaning, tracing, and preprocessing system. The system includes a data access module, a discrimination parameter determination module, a hierarchical cleaning module, a rule processing module, a tracing information association module, a tracing processing module, and a feedback update module. Each module can be implemented as a program component within the same data processing device, or deployed as a mutually communicating processing service depending on the data scale. The modules exchange water conservancy data, data identifiers, processing results, and version information, using a unified data identifier to associate the processing process. The system's business execution relationships are... Figure 1 Correspondence, feedback relationship and Figure 2 correspond.

[0123] The data access module connects to different acquisition channels to obtain multi-source water conservancy data and data source information, performs format and field adaptation, generates data identifiers, and establishes a lineage index. The data access module provides the water conservancy data and data source information used for discrimination to the discrimination parameter determination module, and simultaneously provides the access node, version, configuration, and access anomaly records to the source information association module, providing a source basis for subsequent processing.

[0124] The discrimination parameter determination module reads the data characteristics, data source type, and update frequency of the water conservancy data, determines the noise discrimination weight and dynamic discrimination threshold, and provides the current effective configuration to the graded cleaning module. The module saves the configuration version and its correspondence with the data source, field, and batch; when backtesting with historical verification samples, it completes the verification of candidate configurations before they take effect and writes the adoption or rollback result to the processing log.

[0125] The tiered cleaning module determines the degree of data anomaly based on noise discrimination weights and dynamic discrimination thresholds, and then performs retention, repair, or removal, generating edge retention and pending verification marks. The tiered cleaning module provides the rule processing module with the data that has not been removed and its corresponding quality tags, the source information association module with processing records, and the feedback update module with cleaning statistics and confirmed sample information. Removed data is retained through anomaly records for source tracing but is not included in normal business calculations.

[0126] The rule processing module loads configurable arithmetic rules, custom code rules, and dependencies. It performs secondary validation, transformation, and marking according to the preset rule chain, and outputs the rule processing results. The rule processing module provides a restricted execution environment for the code rules and sends the rule version, input / output, hit status, and execution exceptions to the source information association module. Rule processing statistics and business validation results are provided to the feedback update module.

[0127] The source tracing information association module uses data identifiers as the basis for association, linking cleaning records, rule versions, and execution records to the lineage index formed by the access process to obtain source tracing information. This module stores data flow relationships and node evidence, providing the source tracing processing module with search results by data, node, and version, enabling the source tracing processing module to obtain the complete relevant path of the abnormal data.

[0128] The source tracing module receives abnormal entry points generated by hierarchical cleaning or rule processing, locates the link where the abnormality occurred based on the source tracing information, forms a record of the cause and evidence, and implements corresponding source suppression measures for confirmed problems. The module continuously monitors the affected data sources or links, and collects the abnormality location, execution status, and suppression effect into source tracing results, which are sent to the feedback update module; results involving rule revisions are also provided to the rule processing module.

[0129] The feedback update module receives the cleaning results, rule processing results, and source tracing results. It maintains the feature reference baseline, historical validation samples, and updated configurations, and adjusts the noise discrimination weights and dynamic discrimination thresholds based on misclassification, missed classification, and suppression effectiveness. The validated configuration is returned to the discrimination parameter determination module and used by the hierarchical cleaning module to process subsequent data. The prediction and repair model update results are provided to the hierarchical cleaning module, and the rule revision results are provided to the rule processing module. Each update result has a version and scope of effect, and historical processing records continue to be associated with the original execution version.

[0130] Through the division of labor and data transmission of the above modules, access, dynamic discrimination, hierarchical cleaning, business rule processing, evidence association and anomaly tracing are established on the basis of common data identifiers and version records. This enables the system to output cleaned and business-verified data while retaining the processing basis required for anomaly location. The feedback update module applies the cleaning and source governance results to subsequent processing, which is conducive to continuously adapting to the quality changes of multi-source water conservancy data and reducing the cost of repeatedly processing similar anomalies.

[0131] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. A method for cleaning, tracing, and preprocessing water conservancy data, characterized in that, The method includes: Acquire multi-source water conservancy data and corresponding data source information, and establish a lineage index between the data identifier of the water conservancy data and the data source and processing link; Based on the data characteristics of the water conservancy data and the data source type and update frequency in the data source information, noise discrimination weights and dynamic discrimination thresholds corresponding to different noise types are determined; wherein, the data characteristics include the missing rate, mean drift, fluctuation, outlier degree and repetition of the water conservancy data, and the statistical range of the above indicators is consistent with the statistical range of the corresponding feature reference baseline. The feature reference baseline is established based on the historical quality qualified data of the data source to which the water conservancy data belongs, and the applicable fields, units and time windows of the feature reference baseline are recorded; Based on the noise discrimination weight and dynamic discrimination threshold, the water conservancy data is graded and cleaned to obtain the cleaning result; wherein, the graded cleaning includes repairing or removing data according to the degree of anomaly, and retaining and marking data that is at the discrimination boundary but has not yet been confirmed as erroneous; According to the preset rule chain, the data that was not removed from the cleaning result is subjected to business preprocessing to obtain the rule processing result; wherein, the preset rule chain includes configurable arithmetic rules and custom code rules arranged according to dependencies; Based on the data identifier, the processing records of hierarchical cleaning, as well as the rule versions and execution records of business preprocessing, are associated with the lineage index to obtain traceability information; Based on the source tracing information, locate the point where abnormal data is generated in the cleaning result and the rule processing result, and perform source suppression processing on the point of generation to obtain the source tracing processing result; Based on the cleaning results, the rule processing results, and the source tracing results, the noise discrimination weight and dynamic discrimination threshold are updated for subsequent graded cleaning of water conservancy data.

2. The method according to claim 1, characterized in that, The step of determining the noise discrimination weights and dynamic discrimination thresholds corresponding to different noise types based on the data characteristics of the water conservancy data and the data source type and update frequency in the data source information includes: Based on the missing data, distribution variations, and duplication of the water conservancy data, feature extraction is performed to obtain noise feature indicators; The basic weights of each noise type are determined based on the data source type, and the weight adjustment amount of each noise type is obtained based on the relationship between the noise characteristic index and the corresponding characteristic reference baseline. The weight adjustment amount is scaled according to the update frequency and combined with the corresponding basic weight to obtain the noise discrimination weight; Based on the noise discrimination weight, the noise sub-scores corresponding to missing values, outliers and duplicate values ​​in each water conservancy data are weighted to obtain the comprehensive noise score of each water conservancy data. Based on the distribution of the comprehensive noise score, a dynamic discrimination threshold for the graded cleaning is obtained.

3. The method according to claim 2, characterized in that, Before performing graded cleaning based on the noise discrimination weights and dynamic discrimination thresholds, the process also includes: Based on the threshold boundary corresponding to the data source type, the dynamic discrimination threshold is limited to obtain the candidate discrimination threshold; Based on the noise discrimination weight and the candidate discrimination threshold, noise discrimination is performed on historical verification samples with known labels to obtain sample discrimination results; Based on the correspondence between the sample discrimination results and the known labels, the recall rate of abnormal samples and the false alarm rate of normal samples are obtained. Based on the comparison results of the abnormal sample recall rate and normal sample false alarm rate with the preset verification conditions, the effective weights and effective thresholds for the graded cleaning are determined; wherein, when the preset verification conditions are met, the noise discrimination weights and candidate discrimination thresholds of the current round are used, and when the preset verification conditions are not met, the weights and thresholds of the previous round are used.

4. The method according to claim 2, characterized in that, The step of performing graded cleaning on the water conservancy data based on the noise discrimination weight and dynamic discrimination threshold to obtain cleaning results includes: Based on the noise discrimination weights, the comprehensive noise score of each piece of water conservancy data is determined; Anomaly classification results are obtained based on the relationship between the comprehensive noise score and the hierarchical threshold determined by the dynamic discrimination threshold; Based on the anomaly classification results, slightly abnormal data are repaired based on adjacent or homologous data, and moderately abnormal data are repaired based on a prediction model to obtain repaired data. The confidence level of the repair data corresponding to the prediction model is evaluated, and the repair data with a repair confidence level lower than a preset lower limit is marked as data to be reviewed, thus obtaining the repair evaluation result. Based on the anomaly classification results and the repair evaluation results, normal data and repaired data are retained, severely abnormal data are marked and removed, and data that is at the discrimination boundary and has not yet been confirmed as an error is retained and marked, resulting in a cleaning result that includes processed data, pending review markers, and processing records.

5. The method according to claim 1, characterized in that, The process involves associating the hierarchical cleaning records, business preprocessing rule versions, and execution records with the lineage index based on the data identifier to obtain traceability information, including: Based on the processing actions of the water conservancy data in the graded cleaning, record the values ​​before and after processing, processing parameters and the corresponding model or rule version to obtain the cleaning processing record; Based on the rule execution status of the water conservancy data in the business preprocessing, record the rule version, execution order, parameters, values ​​before and after processing, and execution anomalies to obtain the rule execution record; Based on the data identifier, the cleaning process record and the rule execution record are associated with the corresponding processing node in the lineage index to obtain traceability information for reverse retrieval of data flow path and processing process.

6. The method according to claim 1, characterized in that, The step of performing business preprocessing on the data not removed from the cleaning result according to the preset rule chain to obtain the rule processing result includes: Based on the configured conditional expressions, arithmetic expressions, and processing actions, configurable arithmetic rules are obtained, and custom code rules are obtained based on the loaded code file or code text. Based on the data dependency relationship between the configurable arithmetic rules and the custom code rules, a directed acyclic rule link is obtained with rules as nodes and data dependency relationships as connections. Based on the directed acyclic rule chain, rules with data dependencies are scheduled sequentially, and rules without data dependencies are scheduled in parallel to obtain the execution results of each rule node; wherein, subsequent rule nodes with data dependencies use the execution results of the preceding rule nodes as input; The rule processing result is obtained based on the execution result of the output node in the directed acyclic rule link.

7. The method according to claim 6, characterized in that, The execution of the custom code rules includes: Based on preset resource limits and access permissions, a restricted execution environment corresponding to the custom code rule is established; The custom code rules are executed in the restricted execution environment, and resource consumption and execution time are monitored to obtain execution monitoring results; Based on the execution monitoring results, the execution process that triggers preset resource limits or execution timeout conditions is interrupted and the exception is recorded. The execution output of the normally completed execution process is obtained to get the code execution result. According to the preset output structure requirements, the execution output in the code execution result is verified to obtain the output verification result; Based on the code execution result and the output verification result, the execution output that passes the verification is determined as the processing output of the corresponding rule node, and execution exceptions and output verification exceptions are recorded to obtain the rule node execution result and execution record used to form the rule processing result and to carry out exception tracing.

8. The method according to claim 1, characterized in that, The step of locating the source of abnormal data in the cleaning results and rule processing results based on the source tracing information, and performing source suppression processing on the source tracing process to obtain the source tracing results includes: Based on the data identifier of the abnormal data, the source tracing information is retrieved in reverse to obtain the data flow path and corresponding processing nodes of the abnormal data; Based on the running status, version information, configuration records, and processing records of the processing nodes, the abnormality generation process and the corresponding abnormality cause are obtained; Based on the anomaly generation process and the anomaly cause, determine the source suppression strategy targeting the data source, transmission batch, data conversion configuration, or business processing rules; The corresponding processing is executed according to the source suppression strategy, and the abnormal situation of the data source or processing link involved in the abnormal generation link is monitored in subsequent batches to obtain the source tracing processing result including the abnormal location result, the suppression execution status and the suppression effect.

9. The method according to claim 1, characterized in that, The step of updating the noise discrimination weight and dynamic discrimination threshold based on the cleaning result, the rule processing result, and the source tracing result includes: Based on the quality qualified data or the data confirmed to be correctly repaired in the cleaning results, the historical statistical features are smoothly updated to obtain the updated feature reference baseline. Based on the cleaning results, the rule processing results, and the source tracing results, the confirmed misjudged samples, missed samples, and their corresponding labels are collected to obtain the updated historical verification sample library; Based on the updated feature reference baseline, the misjudgment and omission of each noise type, and the suppression effect in the source tracing processing results, the noise discrimination weights of each noise type are adjusted to obtain the updated noise discrimination weights. Based on the updated noise discrimination weights and the currently effective dynamic discrimination thresholds, the updated historical verification sample library is discriminated to obtain sample discrimination results; Based on the comparison between the sample discrimination results and the corresponding labels, the recall rate of abnormal samples and the false alarm rate of normal samples are obtained. Based on the abnormal sample recall rate and the normal sample false alarm rate, the threshold calculation parameters are adjusted to obtain the updated dynamic discrimination threshold for subsequent water conservancy data classification and cleaning.

10. A water conservancy data cleaning, tracing, and preprocessing system, characterized in that, The system includes: The data access module is used to acquire multi-source water conservancy data and corresponding data source information, and to establish a lineage index between the data identifier of the water conservancy data and the data source and processing link; The discrimination parameter determination module is used to determine the noise discrimination weight and dynamic discrimination threshold corresponding to different noise types based on the data characteristics of the water conservancy data and the data source type and update frequency in the data source information. The data characteristics include the missing rate, mean drift, fluctuation, outlier degree and repetition of the water conservancy data. The statistical range of the above indicators is consistent with the statistical range of the corresponding feature reference baseline. The feature reference baseline is established based on the historical quality qualified data of the data source to which the water conservancy data belongs, and the applicable fields, units and time windows of the feature reference baseline are recorded. The graded cleaning module is used to perform graded cleaning on the water conservancy data according to the noise discrimination weight and dynamic discrimination threshold to obtain cleaning results; wherein, the graded cleaning includes repairing or removing data according to the degree of anomaly, and retaining and marking data that is at the discrimination boundary but has not yet been confirmed as erroneous; The rule processing module is used to perform business preprocessing on the data that was not removed from the cleaning result according to the preset rule chain, so as to obtain the rule processing result; wherein, the preset rule chain includes configurable arithmetic rules and custom code rules arranged according to the dependency relationship; The traceability information association module is used to associate the processing records of hierarchical cleaning and the rule versions and execution records of business preprocessing with the lineage index according to the data identifier to obtain traceability information; The source tracing module is used to locate the generation point of abnormal data in the cleaning result and the rule processing result based on the source tracing information, and to perform source suppression processing on the generation point to obtain the source tracing processing result; The feedback update module is used to update the noise discrimination weight and dynamic discrimination threshold based on the cleaning results, the rule processing results and the source tracing processing results, so that the graded cleaning module can perform graded cleaning on subsequent water conservancy data.