A multi-source hydrological information data anomaly detection and information discrimination method
By constructing a dynamic sliding window and multi-dimensional analysis, the problem of distinguishing between sensor failures and natural extreme events in multi-source hydrological intelligence data during the flood rise phase was solved, enabling the detection and identification of multi-source consistency drift and improving the accuracy and reliability of data detection.
Patent Information
- Application Number
- CN202611593678.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-15
- Publication Date
- 2026-11-20
AI Technical Summary
Existing technologies struggle to effectively distinguish between sensor malfunctions and extreme natural hydrological events in multi-source hydrological intelligence data during the flood rise phase, leading to frequent false alarms or missed alarms. Furthermore, systematic consistency drift among multi-source sensor data is difficult to detect and identify.
By constructing a dynamic sliding window, rainfall intensity and water level slope are extracted. Combined with ratio distortion judgment, cumulative regression residual monotonic trend analysis, physical response sequence verification, and dual water level comparison, the anomaly type is comprehensively determined.
It enables specialized detection and identification of multi-source consistency drift, improving the accuracy of anomaly detection and the reliability of information identification in multi-source hydrological intelligence data during the flood rise phase.
Smart Images

Figure CN123138683A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data analysis technology, specifically to a method for anomaly detection and information identification in multi-source hydrological intelligence data. Background Technology
[0002] In multi-source hydrological intelligence data during the initial rise of floods, data such as rainfall intensity, first water level, and second water level are collected by different sensors, and their temporal characteristics are interrelated and have a physical causal relationship. However, when anomalies appear in the data, it may be due to sensor malfunction or a true reflection of extreme natural hydrological events. Simultaneously, there is redundancy and coupling between data from multiple sensors; one anomaly may be masked by the trend of other normal data, making it difficult to detect systematic consistency drift between multi-source sensors. Existing technologies have the following drawbacks: First, existing anomaly detection methods struggle to effectively distinguish whether anomalies are caused by independent sensor malfunctions or by extreme natural hydrological events, especially during the initial rise of floods, where both can manifest as drastic changes in water level slope, leading to frequent false alarms or missed alarms. Second, when consistency drift occurs in sensor data, its changing trend is easily masked by similar trends from other normal sensors, making it impossible to identify and separate in a timely manner. Furthermore, it cannot achieve specialized detection and identification of multi-source consistency drift, making it difficult to guarantee the reliability of multi-source data fusion.
[0003] Therefore, a method for detecting and identifying anomalies in multi-source hydrological information data is needed. This method involves constructing a dynamic sliding window to extract rainfall intensity and water level slope, combining ratio distortion judgment, cumulative regression residual monotonic trend analysis, physical response sequence verification, and dual water level comparison to comprehensively determine the anomaly type. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a method for anomaly detection and information identification in multi-source hydrological information data. This method solves the problem of how to effectively distinguish between sensor data and natural extreme hydrological events in multi-source hydrological information data during the rising phase of floods, and achieves the detection and identification of multi-source consistency drift.
[0005] To achieve the above objectives, the present invention is implemented through the following technical solution: a method for anomaly detection and information identification of multi-source hydrological information data, comprising the following steps: reconstructing rainfall intensity data, first water level data and second water level data acquired by multi-source sensors into equally spaced data, and then extracting rainfall intensity, first water level slope and second water level slope through adjacent time difference and local weighted regression.
[0006] A sliding window is constructed based on the first zero-crossing hysteresis of the autocorrelation of rainfall intensity, and the rainfall intensity sequence and the first water level slope sequence are extracted from the sliding window.
[0007] Calculate the ratio of rainfall intensity to the slope of the first water level within the sliding window, and determine the response distortion flag of the current ratio based on the real-time sorting boundary.
[0008] The rainfall intensity sequence and the first water level slope sequence within the sliding window are accumulated respectively, and a forced linear regression through the origin is performed to calculate the regression residuals. The drift trend indicator is obtained based on the sign of the first difference of the regression residuals.
[0009] Based on the response distortion indicator and drift trend indicator, the physical response order indicated by the maximum lag direction of the cross-correlation function between rainfall intensity and the first water level slope within the sliding window is determined, and the two water levels reflected by the first water level slope and the second water level slope within the sliding window are judged to be consistent, thus determining the data detection and identification results.
[0010] Compared with existing technologies, this invention has the following beneficial effects: By reconstructing multi-source sensor data into equally spaced sequences and extracting the rate of change, this invention uses autocorrelation to adaptively construct a sliding window, and combines ratio distortion indicators, cumulative regression residual drift trend indicators, physical response order indicated by cross-correlation functions, and dual water level determination, it can systematically identify the root causes of data anomalies from multiple dimensions: when response distortion is accompanied by a monotonic drift trend, it is identified as multi-source abnormal drift; when response distortion occurs and the physical response order is not valid, it is identified as independent sensor failure; when response distortion occurs but the physical response order is valid and the dual water levels are consistent, it is identified as a natural extreme hydrological event. This effectively distinguishes between sensor failures and real extreme events. At the same time, the introduction of dual water level determination serves as a key basis for distinguishing between multi-source consistent drift and natural extreme hydrological events or multi-source inconsistent water level anomalies, thereby decoupling the root causes of anomalies from multiple dimensions. This achieves specialized detection and identification of multi-source consistent drift, improving the accuracy of anomaly detection and the reliability of information identification in multi-source hydrological intelligence data during the flood rise phase. Attached Figure Description
[0011] Figure 1 This is a schematic diagram of the module connections for the multi-source hydrological information data anomaly detection and information identification method of the present invention;
[0012] Figure 2 This is a flowchart illustrating the process of determining the response distortion flag of the current ratio in the multi-source hydrological information data anomaly detection and information identification method of the present invention.
[0013] Figure 3 This is a flowchart illustrating the process of determining drift trend indicators in the multi-source hydrological information data anomaly detection and information identification method of the present invention. Detailed Implementation
[0014] The present invention will now be described in detail with reference to the accompanying drawings and embodiments. Please refer to the accompanying drawings. Figure 1The present invention provides a technical solution: a method for anomaly detection and information identification of multi-source hydrological information data, comprising the following steps: S1, reconstructing the rainfall intensity data, first water level data and second water level data obtained by multi-source sensors into equally spaced data, and then extracting the rainfall intensity, first water level slope and second water level slope through adjacent time difference and local weighted regression.
[0015] Considering the differences in sampling frequency, start-up time, clock drift, and data reporting mechanism among the three types of sensors—radar rain gauges, ultrasonic time-of-flight flow meters, and pressure level gauges—the original rainfall intensity data, first water level data, and second water level data naturally exhibit misalignment and non-equidistant intervals on the time axis. Directly using these raw data for subsequent differential slope calculations, ratio calculations, or correlation analyses will result in false phase differences and amplitude errors due to inconsistent time bases. This can lead to misinterpreting time alignment issues as sensor malfunctions or abnormal hydrological events. Furthermore, the flood rise phase is short and volatile; an excessively large resampling interval will lose crucial details, while an excessively small interval will amplify noise and introduce invalid interpolation points. Therefore, an adaptive method is needed to determine the resampling interval. The specific process for reconstructing equidistant data is as follows: S101, receiving rainfall intensity data output from the radar rain gauge, first water level data output from the ultrasonic level gauge, and second water level data output from the pressure level gauge, respectively. Each data point contains the data value recorded by its respective sensor and its corresponding original timestamp. To avoid interference from extreme outliers, local median filtering is performed on the rainfall intensity data, the first water level data, and the second water level data. Five data points are taken in front of and behind each data point to form a filtering window. When there are fewer than five valid data points in the filtering window, the window is expanded to one side until it contains three valid data points. The median of all data values in the filtering window is taken to replace the original data value of the center point, thus obtaining the filtered rainfall intensity data, the first water level data, and the second water level data.
[0016] S102. Align the timestamps in the filtered rainfall intensity data, first water level data, and second water level data. If there are multiple data points in the same second, take the arithmetic mean of all data values in the same second as the representative value of one second.
[0017] S103. Extract the timestamps of all valid data points from the aligned rainfall intensity data, first water level data, and second water level data respectively. Calculate the time interval between all adjacent timestamps and take the minimum value among all time intervals as the candidate resampling interval. If the candidate resampling interval is less than 0.1 seconds, set the target resampling interval to 0.1 seconds; otherwise, use the candidate resampling interval as the target resampling interval. Regenerate a unified time axis based on the target resampling interval. The start time of the unified time axis is the earliest valid timestamp among the rainfall intensity data, first water level data, and second water level data, and the end time is the latest valid timestamp.
[0018] S104. On a unified time axis, perform linear interpolation resampling to obtain equal interval data sequences of rainfall intensity, first water level, and second water level. The equal interval data sequences of rainfall intensity, first water level, and second water level share the same time point and equal time interval.
[0019] For example, the method for determining the start of flood rise is as follows: continuously monitor rainfall intensity values, and when the rainfall intensity is greater than 0.01 mm / h² for three consecutive moments for the first time, mark the first of these three moments as the start of flood rise; if the rainfall intensity is less than 0.005 mm / h² for six consecutive moments in the subsequent monitoring process, then the flood rise process is determined to have ended.
[0020] This embodiment utilizes local median filtering, arithmetic averaging within the same second, linear interpolation to fill missing points, and the greatest common divisor (GCD) as the resampling interval to ultimately generate three equally spaced data sequences sharing the same time point and equal time intervals. This eliminates spurious phase differences and amplitude distortions caused by inconsistent time bases between multi-source data, preventing misinterpretation of time alignment errors as sensor malfunctions or extreme natural hydrological events. Using the GCD of all time intervals as the resampling target interval ensures that the resampled time axis retains the location information of all true sampling points in the original data (each original observation time falls exactly on the resampled time axis). Simultaneously, it avoids over-smoothing or information loss that may occur with fixed-interval interpolation, thus guaranteeing the accurate extraction of the physical causal relationship between rainfall intensity and water level slope during the flood rise phase.
[0021] Considering that during the flood rise phase, the absolute values of rainfall intensity and water level do not directly reflect the dynamic characteristics of the hydrological process, what truly has physical significance is the change in rainfall intensity per unit time and the rate of water level rise. Furthermore, there is a causal relationship between rainfall intensity and water level slope, where rainfall precedes water level rise. Therefore, it is necessary to transform the equally spaced data sequence into a rate of change sequence to highlight the dynamic characteristics. However, simply calculating the slope by differencing adjacent time points amplifies the residual random noise in the equally spaced data, causing severe fluctuations in the original rate of change sequence. If these noisy sequences are directly used for subsequent ratio calculations, correlation analysis, and trend judgment, a large number of false distortion indicators and drift trends will be introduced. Simultaneously, the rate of change signal during the flood rise phase is non-stationary. Global low-pass filtering smooths out abrupt changes at the start and end of the rise, while locally weighted regression can eliminate random noise while preserving local trend changes. Therefore, the process of extracting rainfall intensity, first water level slope, and second water level slope is as follows: S105, calculate the rainfall intensity difference for each pair of adjacent moments from the rainfall intensity equally spaced data sequence and divide the rainfall intensity difference by the corresponding time interval to obtain the original rainfall intensity change rate sequence; calculate the first water level difference for each pair of adjacent moments from the first water level equally spaced data sequence and divide the first water level difference by the corresponding time interval to obtain the original first water level slope sequence; calculate the second water level difference for each pair of adjacent moments from the second water level equally spaced data sequence and divide the second water level difference by the corresponding time interval to obtain the original second water level slope sequence.
[0022] S106. Perform local weighted regression smoothing on the original rainfall intensity change rate sequence, the original first water level slope sequence, and the original second water level slope sequence. For each sequence, take ten data points forward from the current time to form a regression window. If there are fewer than ten data points in the regression window, take all available points. Assign weight values to the data points in the regression window, and the weight values decrease as the time distance between the data points and the current time increases. The weight function is a cubic function. Fit a linear regression model. Use the first derivative of the linear regression model at the current time as the smoothed output value. Iterate through all time points in turn to obtain the rainfall intensity, the first water level slope, and the second water level slope.
[0023] The formula for the cubic function is: ,in Let i be the weight of the i-th data point within the window. For the current moment, Let i be the time of the i-th data point within the window. For half the width of the window, when Time weight is reset to 0.
[0024] It should be noted that in locally weighted regression, the weights decrease as the time distance between the data point and the current moment increases. This allows points near the current moment to contribute more to the fitting result, thus more accurately estimating the true rate of change at the current moment. Using a linear regression model and taking its first derivative at the current moment as the output essentially estimates the slope within a local window. This directly corresponds to the physical definition of the rate of change and does not produce a phase shift.
[0025] This embodiment obtains the original rate of change sequence by dividing the difference between adjacent time points by the time interval, and then performs local weighted regression smoothing. This effectively suppresses residual random noise and minor fluctuations in equally spaced data while preserving the local abrupt changes in the rate of change sequence during the flood initiation phase. This results in smooth and physically accurate rainfall intensity, first water level slope, and second water level slope. Furthermore, by using the current time point as the center, decreasing weights with distance, fitting a linear regression model, and extracting the first derivative, the output rate of change is not only smooth but also maintains consistency with the original difference sequence in local trends, without phase shift.
[0026] S2. Construct a sliding window based on the first zero-crossing hysteresis of the autocorrelation of rainfall intensity, and extract the rainfall intensity sequence and the first water level slope sequence from the sliding window.
[0027] Considering the temporal correlation of rainfall intensity sequences during the flood rise phase—meaning current rainfall intensity changes are often related to patterns observed in the preceding period—and that the lag length at which the autocorrelation function first changes from positive to negative represents the effective memory length of the sequence, exceeding this length results in a negative correlation between current and past values. This length is ideally suited as the width of a sliding window, ensuring the window contains sufficient data points to reflect historical trends without including outdated information contrary to the current trend due to excessive window length. Furthermore, the flood rise process is uncertain, with varying rise rates and durations across different flood events. A fixed-length window cannot accommodate all situations; therefore, the window length needs to be adaptively determined based on the inherent characteristics of the rainfall intensity data. Specifically, the process is as follows: S201. From the extracted rainfall intensity data, all rainfall intensity data points from the start of the flood rise to the current moment are selected to construct a historical rainfall intensity sequence.
[0028] S202. Calculate the autocorrelation value (Pearson correlation coefficient) between the historical rainfall intensity sequence and the sequence after its own translational lag length. Start from zero lag length and gradually increase the lag length. The first lag length after the found autocorrelation value changes from positive to negative is used as the window length.
[0029] S203. If the autocorrelation value of the historical rainfall intensity sequence is always positive and never becomes negative, then the window length is equal to a set multiple of the length of the historical rainfall intensity sequence and then rounded down, and the window length is limited to not less than the set value.
[0030] S204. If the length of the historical sequence of rainfall intensity is less than the set value, then the window length shall be equal to the length of the historical sequence of rainfall intensity.
[0031] S205. Construct a sliding window with a window length, so that the sliding window covers the time interval corresponding to the number of data points corresponding to the window length from the current time backward.
[0032] S206. Within the sliding window, extract rainfall intensity data points corresponding to the time intervals of the sliding window in chronological order to form a rainfall intensity sequence. Simultaneously, extract first water level slope data points corresponding to the time intervals of the sliding window according to the same time intervals to form a first water level slope sequence.
[0033] The historical rainfall intensity sequence refers to the sequence of all rainfall intensity data points extracted in step S106, arranged in chronological order from the start of the flood surge to the current moment. This sequence is obtained by extracting all data points from the start of the flood surge to the current moment from the stored rainfall intensity data during each detection.
[0034] The lag length refers to the number of sampling points shifted backward from the historical rainfall intensity sequence when calculating autocorrelation. It is obtained by incrementing integers from zero. A lag of zero indicates alignment with the sequence itself, with an autocorrelation value of one. A longer lag results in less overlap between aligned sampling points. The lag length from positive to negative indicates the effective memory duration of the sequence, measured in the number of sampling intervals.
[0035] The autocorrelation value (Pearson correlation coefficient) is the Pearson correlation coefficient calculated between a historical rainfall intensity series and a series after its own translation and lag. The value ranges from -1 to +1. It is obtained by calculating the correlation coefficient pairwise between the original and translated series within the overlapping interval. A positive value indicates that the two series change in the same direction (positive correlation), while a negative value indicates that they change in opposite directions (negative correlation). An absolute value close to one indicates a strong correlation, and close to zero indicates a weak correlation.
[0036] The longer the window is, the longer the historical time range it covers; the shorter the window is, the more it focuses on recent changes.
[0037] The set factor refers to the calculation coefficient for the window length, which is half the length of the historical rainfall intensity series, when the autocorrelation is always positive. This is obtained through manual preset. The meaning of half the value is that using half the length of the historical series as the window can retain the recent main trend while discarding earlier data that may no longer be relevant.
[0038] The setting value of three means that the window length is guaranteed to be no less than three, which is obtained through manual preset.
[0039] This embodiment utilizes the first zero-crossing lag of the autocorrelation of the rainfall intensity sequence as the window length to adaptively determine a sliding window size that matches the dynamic characteristics of the current flood rise process. This ensures that the rainfall intensity sequence and the first water level slope sequence extracted within the window precisely encompass the data from the current moment back to the critical point where the rainfall intensity autocorrelation turns from positive to negative. This guarantees that the data within the window has a consistent trend direction and avoids the inclusion of irrelevant historical data with a trend opposite to the current one.
[0040] S3. Calculate the ratio of rainfall intensity to the slope of the first water level within the sliding window, and determine the response distortion flag of the current ratio in conjunction with the real-time sorting boundary.
[0041] During the initial rise of a flood, there should be a normal physical ratio range between rainfall intensity and the slope of the first water level: changes in rainfall intensity cause the water level to respond at a certain rate, and this ratio usually remains within a certain upper and lower limit within a window. However, when sensors malfunction or extreme hydrological events occur, the ratio at the current moment will deviate significantly from the normal range within the historical window, appearing to be below the lower limit or above the upper limit.
[0042] To detect this deviation in real time, a dynamic reference boundary needs to be established. This boundary is determined by the actual distribution of all historical ratios within the window, rather than using a fixed threshold, because the rainfall intensity and water level response characteristics of different floods vary greatly. Furthermore, when a current ratio is found to exceed the boundary, by inserting it into the ratio sequence and comparing its relationship with the original minimum and maximum values, the direction of distortion can be further distinguished as either downward distortion (abnormally small ratio) or upward distortion (abnormally large ratio). Figure 2 As shown, the process of determining the response distortion flag of the current ratio is as follows: S301, in the rainfall intensity sequence and the first water level slope sequence, the ratio of the rainfall intensity value and the first water level slope value at the same time is calculated to obtain the ratio sequence.
[0043] S302. Use the minimum value in the ratio sequence as the lower limit of the window and the maximum value as the upper limit of the window.
[0044] S303. If the current ratio is less than the lower limit of the window, the response distortion flag is lower distortion; if the current ratio is greater than the upper limit of the window, the response distortion flag is upper distortion; and after the determination is completed, the current ratio is inserted into the ratio sequence, and the lower limit and upper limit of the window are updated for use in subsequent time steps.
[0045] S304. If the current ratio is not less than the lower limit of the window and not greater than the upper limit of the window, then the distortion flag is set to no distortion.
[0046] The lower limit of the window refers to the minimum value of all values in the ratio sequence, representing the minimum normal level of the ratio of rainfall intensity to the first water level slope within the historical period of the current sliding window; any current ratio below this lower limit is considered an abnormal lower distortion.
[0047] The upper limit of the window refers to the maximum value of all values in the ratio sequence, representing the maximum normal level of the ratio of rainfall intensity to the first water level slope within the historical period of the current sliding window; any current ratio higher than this upper limit is considered an abnormal distortion.
[0048] This embodiment calculates a sequence of ratios between rainfall intensity and the first water level slope at the same moment within a sliding window. Using the minimum value of this sequence as the lower limit of the window and the maximum value as the upper limit, it establishes a dynamic and adaptive normal ratio range for the current flood rise process, avoiding the problem of using fixed thresholds failing to adapt to the differences in flood characteristics across different events. Based on this, comparing the current ratio with the upper and lower limits of the window accurately determines whether the current ratio has been distorted. Furthermore, by inserting the current ratio into the sequence and determining whether it becomes a new minimum or maximum value, it clarifies whether the distortion direction is downward or upward, revealing whether the proportional relationship between rainfall intensity and water level slope is within the normal range. This provides a crucial first-level discriminant for subsequently differentiating between multi-source anomaly drift, independent sensor malfunctions, extreme natural hydrological events, and multi-source water level inconsistencies.
[0049] S4. Accumulate the rainfall intensity sequence and the first water level slope sequence within the sliding window, and perform a forced linear regression through the origin. Calculate the regression residuals and obtain the drift trend indicator based on the sign of the first difference of the regression residuals.
[0050] Considering that in addition to the instantaneous ratio relationship, there is also a long-term integral cumulative relationship between rainfall intensity and the slope of the first water level: changes in rainfall intensity accumulate into the total rainfall increment, while the slope of the water level accumulates into the total rise in water level. Under normal circumstances, the two should be directly proportional and the proportionality constant should be stable. However, when the sensor experiences systematic drift or when natural hydrological processes malfunction, the cumulative rise in water level will continuously deviate from the cumulative rainfall value. This deviation will manifest as a monotonically increasing or monotonically decreasing trend in the regression residuals.
[0051] To detect this cumulative drift, the rate of change sequence within the window needs to be accumulated to recover the integral, and then a linear regression is forced through the origin (because physically, water levels should not rise when there is no rainfall, i.e., zero rainfall corresponds to zero water level rise). The resulting regression residual represents the deviation of the cumulative water level from the ideal linear relationship at each time point. Further, by taking the first difference of the residual sequence and observing whether its signs are consistent, it can be determined whether this deviation is monotonically increasing (positive drift), monotonically decreasing (negative drift), or random fluctuation (no monotonicity), thus providing a crucial basis for distinguishing between multi-source abnormal drift and independent sensor malfunctions.
[0052] like Figure 3 As shown, the process of the drift trend indicator is as follows: S401, set the first cumulative rainfall value and the first cumulative water level rise value to zero. Starting from the second moment, the cumulative rainfall value of the previous moment plus the product of the rainfall intensity value of the previous moment and the time interval between the two moments is taken as the cumulative rainfall value of the current moment.
[0053] S402. Simultaneously, the cumulative water level rise value of the previous moment is added to the product of the first water level slope value of the previous moment and the same time interval, and the result is taken as the cumulative water level rise value of the current moment. After traversing all moments, the cumulative rainfall sequence and the cumulative water level sequence are obtained.
[0054] S403. The sum of the products of the cumulative water level sequence and the cumulative rainfall sequence, divided by the sum of the squares of the cumulative rainfall sequence, is used as the proportionality constant.
[0055] S404. The result of subtracting the proportional constant from the cumulative water level and multiplying it by the cumulative rainfall is used as the regression residual for each time point.
[0056] S405. Subtract the residual from the previous time step from the residual of the next time step and use the result as the first-order difference to obtain the difference sequence.
[0057] S406. If all differences in the difference sequence are positive, the drift trend flag is set to monotonically increasing. If all differences are negative, the drift trend flag is set to monotonically decreasing. If both positive and negative values exist in the difference sequence, the drift trend flag is set to no monotonicity.
[0058] The sum of the products of the cumulative water level series and the cumulative rainfall series is obtained by multiplying the value of each moment in the cumulative water level series with the value of the same moment in the cumulative rainfall series, and then adding all the product results together. This sum reflects the covariance between the cumulative water level and the cumulative rainfall (without subtracting the mean).
[0059] The sum of squares of a cumulative rainfall sequence is the sum of the squares of the values at each time point in the sequence, reflecting the energy (or dispersion) of the cumulative rainfall sequence itself.
[0060] The proportionality constant is the quotient obtained by dividing the sum of products by the sum of squares, which is the slope of the forced linear regression through the origin. It represents the theoretical cumulative water level rise corresponding to a unit of cumulative rainfall and represents the average conversion coefficient between rainfall intensity changes and water level response.
[0061] The proportionality constant multiplied by the cumulative rainfall is the theoretical cumulative water level value obtained by multiplying the proportionality constant by the value at the same moment in the cumulative rainfall sequence. It represents the amount of cumulative water level rise that the cumulative rainfall should produce under an ideal linear relationship.
[0062] By accumulating the rainfall intensity sequence and the first water level slope sequence within the sliding window, this embodiment restores the instantaneous rate of change to physically meaningful cumulative rainfall and cumulative water level rise values, enabling the establishment of a forced linear regression model that passes through the origin. The regression residuals reflect the deviation between the actual cumulative water level and the theoretical linear water level at each moment, while the first difference of the residuals reveals the direction of this deviation over time. When all differences are positive, it indicates that the cumulative water level is continuously deviating positively from the theoretical value (the drift trend is monotonically increasing); when all differences are negative, it indicates a continuous negative deviation (monotonically decreasing); when positive and negative differences are mixed, it indicates random fluctuation (no monotonicity).
[0063] S5. Based on the response distortion indicator and drift trend indicator, combined with whether the physical response order indicated by the maximum lag direction of the cross-correlation function between rainfall intensity and the first water level slope within the sliding window is valid, and whether the two water levels reflected by the first water level slope and the second water level slope within the sliding window are consistent, the data detection and identification results are determined.
[0064] During the initial rise of a flood, changes in rainfall intensity should precede changes in water level slope; that is, rainfall intensity changes precede water level rise, with a positive time lag between the two. To verify whether this physical response order holds true in the current data, a time-delay cross-correlation analysis of the two sequences is required to find the offset that maximizes their correlation. If the offset corresponding to the maximum correlation coefficient is positive, it indicates that shifting the first water level slope sequence backward (i.e., assuming that water level changes lag behind rainfall intensity changes) results in the highest correlation, thus confirming that rainfall intensity changes precede water level changes. If the offset corresponding to the maximum correlation coefficient is negative or zero, it indicates that the physical causal relationship does not hold, and there may be sensor malfunction or data anomalies. The offset value is limited to half the sequence length because offsets exceeding this range would result in excessively short overlap intervals, making the statistical results unreliable. Furthermore, rounding down is used to handle cases where the sequence length is odd.
[0065] The process for determining whether the physical response sequence is valid is as follows: S501, take the rainfall intensity sequence as the preceding sequence and the first water level slope sequence as the following sequence.
[0066] S502. For each possible offset, the offset value is any integer between half the negative sequence length rounded down and half the positive sequence length rounded down. Shift the successor sequence backward by offset times on the time axis and calculate the Pearson correlation coefficient between the shifted successor sequence and the predecessor sequence in the overlapping time interval.
[0067] S503. After traversing all offsets, if the offset corresponding to the largest Pearson correlation coefficient is positive, then the physical response order is determined to be valid, i.e., the change in rainfall intensity precedes the change in the first water level slope. Otherwise, the physical response order is determined to be invalid.
[0068] Positive offset indicates that the subsequent sequence moves backward (i.e., the water level change is assumed to lag behind the rainfall intensity change), negative offset indicates that it moves forward (i.e., the water level change leads), and zero indicates misalignment; the larger the absolute value of the offset, the longer the assumed lag or lead time, and the unit is the number of sampling intervals.
[0069] The overlapping time interval refers to the continuous segment of time that is jointly covered by the predecessor sequence and the moved successor sequence on the time axis. It is obtained as follows: when the offset is positive, the first k moments of the predecessor sequence do not correspond to the last k moments of the moved successor sequence; the overlapping interval is from the (k+1)th moment of the predecessor sequence to the end of the sequence and from the 1st moment to the Lkth moment of the moved successor sequence. The same logic applies when the offset is negative. The length of the overlapping interval is equal to the sequence length minus the absolute value of the offset.
[0070] This embodiment calculates the Pearson correlation coefficient between the rainfall intensity sequence and the first water level slope sequence at different offsets, and identifies the offset direction corresponding to the maximum correlation coefficient. This quantitatively verifies whether the change in rainfall intensity truly precedes the change in the first water level slope, thus confirming or disproving the physical response sequence. If the physical response sequence is valid, it indicates that the data is causally consistent, and can be further combined with other indicators to distinguish between natural extreme hydrological events or multi-source consistency drift. If the physical response sequence is invalid, it indicates a temporal inversion between the changes in rainfall intensity and water level, which is often a strong signal of independent sensor failure (such as time synchronization errors or abnormal response delays).
[0071] During the initial rise of a flood, multiple water level sensors are typically deployed to enhance reliability. However, these sensors may differ due to factors such as installation location, measurement principle, and environmental interference. If the data from two water level sensors are consistent, their ratio of water level slopes should fluctuate within a stable range; if they are inconsistent, the ratio will exhibit dispersion or extreme values. To quantify this consistency, it is necessary to statistically analyze the distribution of the ratio of the first to the second water level slope within a sliding window. The median is used as a robust estimator of central tendency because it is insensitive to outliers; the absolute median difference is also robust as a measure of dispersion. By checking whether the absolute value of the difference between each ratio and the median does not exceed the absolute median difference, it can be determined whether all ratios are closely clustered around the median, thus determining whether the two water level measurements are consistent.
[0072] It should be noted that the absolute median is defined as the median of the absolute values of the deviations.
[0073] The process for determining the two water levels is as follows: S504, calculate the quotient of the slope value of the first water level divided by the slope value of the second water level at each time step, and arrange them in ascending order of value to obtain the sorted quotient sequence.
[0074] S505. Arrange the absolute values of the differences between each ratio in the quotient sequence and the median of the quotient sequence in ascending order, and take the middle value as the absolute median difference. If the sequence length is even, take the average of the two middle values as the absolute median difference.
[0075] S506. Compare the absolute value of the difference between each ratio and the median with the absolute median difference. If the absolute value of the difference between all ratios and the median is less than or equal to the absolute median difference, then they are considered to be consistent; otherwise, they are considered to be inconsistent.
[0076] This embodiment calculates the ratio of the first water level slope to the second water level slope at each time step, and obtains the median and absolute median difference after sorting the comparison value sequence. This effectively resists the interference of a few outlier ratios on the judgment results because the median and absolute median difference are statistical measures based on sorting and are not easily affected by extreme values. If the absolute value of the difference between all ratios and the median does not exceed the absolute median difference, it indicates that the slope ratios measured by the two water level sensors are highly consistent; otherwise, it indicates that there is inconsistency, that is, at least one sensor is malfunctioning.
[0077] Considering that anomalies in multi-source hydrological intelligence data during the flood rise phase may originate from various underlying causes, including consistency drift across multiple sensors, independent failure of a single sensor, extreme natural hydrological events, and measurement inconsistencies among multiple water level sensors, these causes cannot be distinguished by a single feature alone. It is necessary to combine and infer the previously calculated response distortion indicator, drift trend indicator, physical response sequence indicator, and dual-water level indicator. Specifically, the process for determining the data detection and screening results is as follows: S507, when the response distortion indicator is upper or lower distortion and the drift trend indicator is not non-monotonic, and the dual-water level indicators are inconsistent, it is determined to be a multi-source anomaly drift.
[0078] S508. When the response distortion flag is upper or lower distortion and the drift trend flag is not non-monotonic, and the two water levels are consistent, and the physical response sequence is valid, no abnormal result is output. The sliding window moves forward one time point and records the verification mark. When the two water levels are consistent and the physical sequence is valid, the distortion and drift may be caused by natural extreme hydrological events, but this needs to be verified at multiple subsequent time points to confirm. Therefore, no alarm is triggered, only a mark is made.
[0079] S509. When the response distortion flag is not distortion-free, the drift trend flag is non-monotonic, and the physical response sequence is invalid, the data detection and identification result shall be determined as an independent sensor fault anomaly.
[0080] S510. When the response distortion indicator is not without distortion, the drift trend indicator is without monotonicity, the physical response sequence is valid, and the two water levels are consistent, the data detection and identification results are determined to be a natural extreme hydrological event.
[0081] S511. When the response distortion indicator is not without distortion, the drift trend indicator is without monotonicity, the physical response sequence is valid, and the two water levels are inconsistent, the data detection and identification results are determined to be multi-source water level inconsistency anomaly.
[0082] S512. When the response distortion flag is no distortion, no abnormal result is output, and the sliding window moves forward one moment.
[0083] This embodiment uses a logical combination of response distortion flags, drift trend flags, physical response sequence flags, and dual water level flags to classify a single anomaly detection result into four types of anomalies with clear physical interpretability: multi-source anomaly drift, independent sensor failure anomaly, natural extreme hydrological events, and multi-source water level inconsistency anomaly. This solves the core bottleneck of existing technologies that cannot distinguish between sensor failures and extreme hydrological events. Simultaneously, when the response distortion flag is distortion-free, it can automatically slide a window and continuously monitor, achieving real-time dynamic tracking of the flood rise process. The final output data detection and discrimination results can provide accurate classification basis for subsequent hydrological forecasting, sensor calibration, and alarm decision-making.
[0084] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, in the form of a computer program product.
[0085] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0086] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0087] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0088] Finally, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for anomaly detection and information identification in multi-source hydrological information data, characterized in that, Includes the following steps: The rainfall intensity data, first water level data and second water level data acquired by multi-source sensors are reconstructed into equally spaced data, and then the rainfall intensity, first water level slope and second water level slope are extracted by difference between adjacent time points and local weighted regression. A sliding window is constructed based on the first zero-crossing hysteresis of the autocorrelation of rainfall intensity, and the rainfall intensity sequence and the first water level slope sequence are extracted from the sliding window. Calculate the ratio of rainfall intensity to the slope of the first water level within the sliding window, and determine the response distortion flag of the current ratio based on the real-time sorting boundary; The rainfall intensity sequence and the first water level slope sequence within the sliding window are accumulated respectively, and a forced linear regression through the origin is performed to calculate the regression residuals. The drift trend indicator is obtained based on the sign of the first difference of the regression residuals. Based on the response distortion indicator and drift trend indicator, the physical response order indicated by the maximum lag direction of the cross-correlation function between rainfall intensity and the first water level slope within the sliding window is determined, and the two water levels reflected by the first water level slope and the second water level slope within the sliding window are judged to be consistent, thus determining the data detection and identification results.
2. The method for anomaly detection and information identification of multi-source hydrological information data according to claim 1, characterized in that, The process of reconstructing data into equally spaced data is as follows: Local median filtering was applied to the rainfall intensity data, the first water level data, and the second water level data respectively. After time stamp unification and numerical processing, the aligned rainfall intensity data, the first water level data, and the second water level data were obtained. The timestamps of all valid data points are extracted from the aligned rainfall intensity data, first water level data, and second water level data respectively. The resampling target interval is determined, and a unified time axis is regenerated based on the resampling target interval. Linear interpolation resampling is performed on a unified time axis to obtain equal-interval data sequences of rainfall intensity, first water level, and second water level.
3. The method for anomaly detection and information identification of multi-source hydrological information data according to claim 2, characterized in that, The process of extracting rainfall intensity, first water level slope, and second water level slope is as follows: For the equal-interval data sequences of rainfall intensity, the equal-interval data sequences of the first water level and the equal-interval data sequences of the second water level, the original rainfall intensity change rate sequence, the original first water level slope sequence and the original second water level slope sequence are obtained by differentiating adjacent time points and dividing by the time interval, respectively. Local weighted regression smoothing was performed on the original rainfall intensity change rate sequence, the original first water level slope sequence, and the original second water level slope sequence, respectively. A sliding window centered on the current time, a cubic function distance decay weight, and the first derivative of the center point of a linear regression were used to obtain the rainfall intensity, the first water level slope, and the second water level slope.
4. The method for anomaly detection and information identification of multi-source hydrological information data according to claim 1, characterized in that, The process of constructing a sliding window and extracting the rainfall intensity sequence and the first water level slope sequence from within the sliding window is as follows: From the extracted rainfall intensity data, all rainfall intensity data points from the start of the flood rise to the current moment are used to construct a historical rainfall intensity sequence. Calculate the autocorrelation value between the historical rainfall intensity sequence and the sequence after its own translational lag length. Starting from zero lag length, gradually increase the lag length. The first lag length at which the found autocorrelation value changes from positive to negative is used as the window length. If the autocorrelation value of the historical rainfall intensity series is always positive and never becomes negative, then the window length is equal to a set multiple of the length of the historical rainfall intensity series and rounded down, while ensuring that the window length is not less than the set value. If the length of the historical rainfall intensity sequence is less than the set value, then the window length is equal to the length of the historical rainfall intensity sequence. Construct a sliding window based on the window length, so that the sliding window covers the time interval of the number of data points corresponding to the window length going back from the current time. Within the sliding window, rainfall intensity data points corresponding to the time interval of the sliding window are extracted in chronological order to form a rainfall intensity sequence; at the same time, first water level slope data points corresponding to the time interval of the sliding window are extracted according to the same time interval to form a first water level slope sequence.
5. The method for anomaly detection and information identification of multi-source hydrological information data according to claim 1, characterized in that, The process of determining the response distortion flag of the current ratio is as follows: In the rainfall intensity sequence and the first water level slope sequence, the ratio of the rainfall intensity value and the first water level slope value at the same time is calculated to obtain the ratio sequence; Use the minimum value in the ratio sequence as the lower bound of the window and the maximum value as the upper bound of the window; If the current ratio in the ratio sequence is less than the lower limit of the window, the response distortion flag is lower distortion; If the current ratio is greater than the upper limit of the window, the response distortion flag is upper distortion; Furthermore, after the determination is completed, the current ratio is inserted into the ratio sequence, and the lower and upper limits of the window are updated; If the current ratio is not less than the lower limit of the window and not greater than the upper limit of the window, then the distortion flag is set to no distortion.
6. The method for anomaly detection and information identification of multi-source hydrological information data according to claim 1, characterized in that, The process of obtaining the regression residuals is as follows: Set both the first cumulative rainfall value and the first cumulative water level rise value to zero. Starting from the second moment, use the rectangular integral method to calculate the cumulative rainfall value at the current moment. The cumulative water level rise value of the previous moment is added to the product of the first water level slope value of the previous moment and the same time interval, and the result is taken as the cumulative water level rise value of the current moment. After traversing all moments, the cumulative rainfall sequence and the cumulative water level sequence are obtained. The sum of the products of the cumulative water level series and the cumulative rainfall series, divided by the sum of the squares of the cumulative rainfall series, is used as the proportionality constant. The cumulative water level minus the proportionality constant multiplied by the cumulative rainfall is used as the regression residual for each time point.
7. The method for anomaly detection and information identification of multi-source hydrological information data according to claim 6, characterized in that, The process of obtaining drift trend indicators is as follows: The result of subtracting the residual from the previous time step from the residual at the next time step is taken as the first-order difference, and the difference sequence is obtained. If all differences in the difference sequence are positive, the drift trend flag is set to monotonically increasing; if all differences are negative, the drift trend flag is set to monotonically decreasing; if both positive and negative values exist in the difference sequence, the drift trend flag is set to non-monotonic.
8. The method for anomaly detection and information identification of multi-source hydrological information data according to claim 1, characterized in that, The process for determining whether the physical response order holds true is as follows: The rainfall intensity sequence was used as the precursor sequence, and the first water level slope sequence was used as the successor sequence. For each possible offset, shift the successor sequence backward by offset time points on the time axis, and calculate the Pearson correlation coefficient between the shifted successor sequence and the predecessor sequence in the overlapping time interval. After traversing all offsets, if the offset corresponding to the largest Pearson correlation coefficient is positive, then the physical response order is determined to be valid. Otherwise, the physical response order is deemed invalid.
9. The method for anomaly detection and information identification of multi-source hydrological information data according to claim 1, characterized in that, The process for determining whether the two water levels are consistent is as follows: Calculate the quotient of the first water level slope value divided by the second water level slope value at each time step, and arrange them in ascending order of value to obtain the sorted quotient sequence. Arrange the absolute values of the differences between each ratio in the quotient sequence and the median of the quotient sequence in ascending order, and take the middle value as the absolute median difference; The absolute value of the difference between each ratio and the median is compared with the absolute median difference. If the absolute value of the difference between all ratios and the median is less than or equal to the absolute median difference, they are considered to be consistent; otherwise, they are considered to be inconsistent.
10. The method for anomaly detection and information identification of multi-source hydrological information data according to claim 1, characterized in that, The process for determining the data detection and screening results is as follows: When the response distortion indicator is upper or lower distortion and the drift trend indicator is not non-monotonic, and the two water levels are inconsistent, it is determined to be multi-source abnormal drift. When the response distortion flag is upper or lower distortion and the drift trend flag is not non-monotonic, and the two water levels are consistent, and the physical response order is valid, no abnormal results are output, the sliding window moves forward one moment, and the flag to be reviewed is recorded. When the response distortion flag is not distortion-free, the drift trend flag is non-monotonic, and the physical response sequence is invalid, it is determined to be an independent sensor fault. When the response distortion indicator is not without distortion, the drift trend indicator is without monotonicity, the physical response sequence is valid, and the two water levels are consistent, it is determined to be a natural extreme hydrological event. When the response distortion indicator is not without distortion, the drift trend indicator is without monotonicity, the physical response sequence is valid, and the two water levels are inconsistent, it is determined to be a multi-source water level inconsistency anomaly. When the distortion flag is set to no distortion, no abnormal results are output, and the sliding window moves forward one time.
