Water quality trend prediction system based on big data
By constructing the concentration sequence offset module and flow rate ratio analysis, the problem of insufficient dynamic modeling of water quality trend prediction in the prior art is solved, and efficient prediction of water quality trends and accurate identification of potential risks are achieved.
Patent Information
- Application Number
- CN202510554349.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-04-29
AI Technical Summary
The existing water quality trend prediction technology is difficult to model continuity dynamically during concentration propagation, lacks the correlation of the difference value of the concentration sequence within the time span, and it is difficult to reflect the response structure of water quality trends to hydrodynamic factors such as flow velocity in complex environments, resulting in prediction delays, misjudgment or missing key trend stages, reducing regulation efficiency and early warning reliability.
By constructing the concentration sequence offset module, a continuous time series of pollutant concentrations in each section in the water transport path is obtained, an error sliding window is established and the sliding difference is accumulated, the time window with the error level below the threshold is selected, the concentration conduction stability period is identified, and the concentration decreasing rate ratio is calculated in combination with the flow rate sensor to generate a concentration decay ratio change sequence, and a downstream predicted concentration trend curve is constructed.
It has improved the ability to identify the dynamic conduction path of pollution signals, enhanced the multi-stage prediction capability and scheduling strategy support effect for complex water quality fluctuations, and improved the early warning accuracy of potential risk signals.
Smart Images

Figure CN120470334A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water quality analysis, and in particular to a water quality trend prediction system based on big data. Background Art
[0002] Water quality analysis and prediction models, as a crucial non-engineering measure to ensure water safety, have long been a hot research area within the industry. Currently, mainstream water quality analysis and prediction technologies include mathematical statistics, numerical simulation, and deep learning. While mathematical statistics are simple in principle and easy to implement, their accuracy is limited due to the nonlinear nature of water quality changes. Numerical simulations, based on hydrodynamics and the principles of conservation of matter, construct water quality models to analyze the migration, transformation, and degradation of pollutants within water bodies. While these models offer high accuracy, they are computationally intensive and require extensive field data for calibration and validation. Deep learning methods, by learning from historical data to establish a mapping between environmental variables and pollutant concentrations, can address complex nonlinear problems. However, these methods suffer from relatively poor interpretability and reduced accuracy for extreme scenarios beyond historical experience. To address sudden water pollution incidents, in-depth research is needed on prediction algorithms that offer high timeliness, stability, and relatively high accuracy. In engineering applications, these algorithms can automatically calibrate model parameters based on real-time data collected from monitoring points, such as water depth, flow velocity, and pollutant concentrations. This allows for dynamic prediction of water pollution incidents and provides technical support for decision-making.
[0003] The technical field of water quality analysis includes the detection and analysis of physical, chemical and biological indicators in water bodies, aiming to evaluate the status of water quality and its changing trends. The core content is to collect water samples and conduct quantitative or qualitative analysis of their components to determine whether there are harmful substances in the water body and whether the water body meets the corresponding usage standards. Indicators covered by water quality analysis usually include pH value, dissolved oxygen, turbidity, conductivity, ammonia nitrogen, total phosphorus, total nitrogen, heavy metals, etc. Depending on the detection method, it can be subdivided into specific methods such as optical analysis, electrochemical analysis, and chromatographic analysis. Water quality analysis is widely used in multiple scenarios such as environmental monitoring, water resources management, and water treatment projects. It is a basic technical link in environmental protection and public health protection.
[0004] Among them, the water quality trend prediction system based on big data refers to a technical solution that uses historical water quality data and related environmental data, combined with data modeling and predictive analysis methods, to analyze and judge water quality change trends. By collecting water quality monitoring data from nodes such as water sources, water transfer channels, reservoirs, and supporting regulation facilities along the route, a water quality database containing time series, geographical location, and monitoring indicators is established. Subsequently, based on the changing patterns of various pollutant indicators in the water, multivariate statistical analysis and time series modeling methods are used to process the monitoring data, thereby completing the analysis and prediction of water quality trends for key sections and key nodes. Based on historical monitoring data, combined with the characteristics of the water diversion process and regional environmental factors, trend modeling and dynamic deduction of key water quality parameters are carried out.
[0005] Existing water quality trend forecasting processes, based on static parameter detection, struggle to model the continuous dynamics of concentration propagation. They also lack the ability to assess the correlation between differences in concentration series over time, creating blind spots in addressing sudden changes in water quality and identifying response periods. Single-metric assessment approaches are often used, ignoring the structural evolutionary relationships between multiple variables. This results in insufficient trend analysis in complex environments. Monitoring data often focuses on numerical variations in their own values, lacking a dynamic correlation and matching mechanism with hydraulic transport characteristics. This makes it difficult to capture the response structure of water quality trends to hydrodynamic factors such as flow velocity. Traditional forecasting models primarily focus on time extension and lack trend direction delineation. This results in a lack of logical support for prediction curves, making it difficult to effectively identify trend inflection points or reversals. With multiple sections and complex nodes in water diversion routes, existing approaches struggle to construct a complete concentration transmission chain and lack the ability to segment trend analysis and locate multiple time-lag intervals. In applications where risk identification demands intensify, this type of technical model can easily lead to forecast delays, misjudgments, or omissions of key trend stages, reducing regulatory efficiency and warning reliability. Summary of the Invention
[0006] The purpose of the present invention is to solve the shortcomings of the existing technology and propose a water quality trend prediction system based on big data.
[0007] In order to achieve the above objectives, the present invention adopts the following technical solutions: The water quality trend prediction system based on big data includes:
[0008] The concentration sequence migration module obtains the continuous time series of pollutant concentrations at each section in the water transmission path, obtains the difference series between the offset concentration value and the upstream concentration value and performs error calculation, establishes an error sliding window and accumulates the difference during the sliding process of the error sliding window, statistically matches the error index, and establishes a concentration trend migration sample set;
[0009] The matching similarity extraction module selects all time window positions whose error levels are lower than the concentration difference recognition threshold according to the concentration trend offset sample set, extracts overlapping areas according to the frequency of occurrence in the time period, and obtains the concentration conduction stable time period;
[0010] The hysteresis interval derivation module identifies an offset value range based on the offset step sequence in the concentration conduction stable time period, matches the corresponding offset value interval with the concentration conduction time window, analyzes the probabilistic conduction time range, and obtains a stable time lag offset interval;
[0011] The ratio trend construction module obtains the concentration values and spatial spacing of each sampling point in the water transmission path, calculates the concentration decrease rate per unit distance, combines the flow sensor readings, calculates the ratio of the concentration decrease rate per unit distance to the flow velocity value, records the direction of ratio change, identifies the continuous change section, and generates a concentration attenuation ratio change sequence.
[0012] As a further solution of the present invention, the concentration trend offset sample set includes time offset parameters, error accumulation characteristics, and concentration difference window index; the concentration conduction stable time period includes time period grouping number, frequency sorting result, and overlapping interval label; the stable time lag offset interval includes offset value interval range, probabilistic response interval, and cumulative frequency statistical result; the concentration attenuation ratio change sequence includes concentration decrease ratio sequence, ratio change direction identifier, and continuous trend segment number.
[0013] As a further solution of the present invention, the concentration sequence offset module includes:
[0014] The concentration difference generation submodule sets the time offset step based on the continuous time series of pollutant concentrations at each section in the water transmission path, performs a step-by-step reverse sliding operation on the downstream concentration series, obtains the difference series between the downstream offset concentration value and the upstream concentration value in the same time window at each time offset step, and obtains the concentration difference series corresponding to all offset steps after sequence synchronization.
[0015] The error sliding window construction submodule is based on the concentration difference sequence, the difference item at each position, sets the time window length, divides the difference sequence into sub-segments according to the time window, and uses the formula:
[0016] ;
[0017] Calculate the average deviation value of each time window position , construct a time sliding window with a fixed window length, cover the error value sequence with a window, and obtain the error sliding window sequence, where, Representative In the window The upstream and downstream concentration difference at the moment, and Represents the downstream and upstream in In the window The concentration value at the moment, is the path response factor at that moment, is the time step size at that moment, is the total number of time steps in the window;
[0018] The matching error accumulation submodule performs an accumulation operation on the error sliding window sequence based on the error sliding window sequence. According to the total amount of error at each sliding window position, the cumulative sliding window error of all time offset steps is compared with the error baseline value, the minimum cumulative error value is selected, and the corresponding time offset step is marked. The corresponding concentration sequence, error value sequence and time index are organized according to the offset step to establish a concentration trend offset sample set.
[0019] As a further solution of the present invention, the matching similarity extraction module includes:
[0020] The error screening submodule screens the positions of all time window positions whose error levels are lower than the concentration difference recognition threshold based on the concentration trend offset sample set, extracts the sequence number and time period information corresponding to each time window at different time steps, and obtains a sequence time mapping set;
[0021] The time grouping submodule groups all time periods according to the start and end boundaries of the time period based on the sequence time mapping set, counts the frequency of each time period in all sequence numbers, and sorts the time periods according to their repetition to obtain a frequency-sorted time set;
[0022] The overlap extraction submodule compares the time periods with each other based on the frequency sorted time set to determine whether there is a boundary intersection. If there is an intersection, the intersection interval range of the corresponding time period is recorded, and all the intersection intervals are integrated to establish a concentration conduction stable time period.
[0023] As a further solution of the present invention, the hysteresis interval derivation module includes:
[0024] The step frequency statistics submodule counts the occurrence frequency of each offset step in all time periods based on the offset step sequence in the concentration conduction stable time period, obtains the total number of occurrences corresponding to each step value, and numbers and aligns the frequencies of all offset steps to generate a step frequency distribution set;
[0025] The hysteresis interval identification submodule sorts all offset step values by frequency based on the step frequency distribution set, gradually accumulates the frequency values of the previous items in the sorting, calculates the cumulative frequency and compares it with the set time lag threshold using the formula:
[0026] ;
[0027] Determine all step sets that satisfy the cumulative frequency greater than the threshold , generating a hysteresis offset value interval, where Indicates the The offset step value, Indicates the The frequency of occurrence of steps, Indicates the The frequency of occurrence of steps, is the total number of step types, represents the time lag threshold;
[0028] The response mapping matching submodule extracts the corresponding concentration conduction time window position according to the hysteresis offset value interval, analyzes the mapping relationship between each offset value and the upstream and downstream concentration sequence corresponding to the time period, determines the duration of the corresponding response of the upstream concentration change in the downstream concentration sequence, integrates all response time period ranges, and establishes a stable time lag offset interval.
[0029] As a further solution of the present invention, the ratio trend building module includes:
[0030] The decline rate calculation submodule obtains the concentration values and spatial spacing of each sampling point in the water transmission path, calculates the concentration decline rate per unit distance between adjacent sampling points in sequence, and records the concentration changes and corresponding spatial intervals of each pair of sampling points in different time periods to obtain a decline rate sequence;
[0031] The ratio generation submodule uses the formula:
[0032] ;
[0033] Calculate the Ratio of concentration to flow rate under time period , summarize the ratio direction change information and generate the concentration flow rate ratio sequence, where, is the concentration decrease rate per unit distance in the corresponding section, is the spacing between sampling points of the corresponding segment, is the flow velocity reading for the corresponding section, is the flow flux of the corresponding sampling area, is the time interval span of the corresponding sampling segment, is the sampling frequency of the flow velocity in the corresponding section;
[0034] The trend extraction submodule analyzes the continuous change direction in the ratio sequence based on the concentration-flow-rate ratio sequence, identifies continuous segments with consistent directions as change segments within the trend segment, numbers each segment, locates the start and end positions, and marks the change direction, and establishes a concentration attenuation ratio change sequence.
[0035] As a further solution of the present invention, the system further includes a trend data output module;
[0036] The trend data output module extracts the overlapping time range of the stable time lag offset interval and the concentration attenuation ratio change sequence based on the two, and determines whether there is a trend increasing segment within the range. If so, it is marked as a potential transmission interval for future fluctuations, and the concentration values within each prediction window are recursively extended to construct a downstream predicted concentration trend curve;
[0037] The downstream predicted concentration trend curve includes an overlapping time range, a trend increasing segment label, a potential conduction interval range, and a predicted concentration curve.
[0038] As a further solution of the present invention, the trend data output module includes:
[0039] The interval intersection submodule compares the time periods of the stable time lag offset interval and the concentration attenuation ratio change sequence, identifies the intersection area of their respective start and end times, extracts the continuous time period information of the overlapping part, and establishes a time overlap segment set;
[0040] The trend identification submodule determines whether there is a continuous increasing segment in the direction of the ratio change in each time period based on the time overlap segment set, performs segmented judgment on the direction of the ratio, extracts and numbers the increasing trend segments of the ratio, and establishes a predicted trend segment set;
[0041] The concentration recursive submodule performs time-by-time extension processing on the downstream concentration value in each trend increasing segment according to the predicted trend segment set, performs concentration deduction processing in chronological order according to the current concentration value and the increasing trend of the ratio, and draws the downstream predicted concentration trend curve.
[0042] Compared with the prior art, the advantages and positive effects of the present invention are:
[0043] The present invention, by constructing a time difference sliding mechanism between upstream and downstream concentration series, can capture the temporal offset patterns in water quality conduction characteristics without relying on a fixed sampling frequency, expanding the ability to identify the dynamic conduction paths of pollution signals. The coupled analysis of the difference error sliding window and the time step improves the distinguishability of concentration response periods, providing a stronger statistical basis for stable conduction intervals. The frequency of the offset step series is aggregated to form a hysteresis interval, locating high-probability concentration response areas in spatial and temporal multidimensional scenarios, and enhancing the ability to predict the impact range of pollution changes. The construction of the ratio of concentration decline rate to flow velocity dynamically couples the material migration trend with the hydrodynamic factor, so that the attenuation trend is no longer limited to a single spatial function relationship, but can reflect the concentration evolution trajectory under flow characteristics. The identification of the change direction of the ratio trend enables the trend series to extract adaptive change segments, providing a structured basis for the critical judgment of trend enhancement and decline. Finally, by extracting the trend-increasing segments in overlapping time periods and extending the concentration values, a multidimensional condition screening system for trend prediction is established, improving the accuracy of early warning of potential risk signals, effectively enhancing the multi-segment prediction capability and scheduling strategy support for complex water quality fluctuations. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 is a system flow chart of the present invention;
[0045] Figure 2 This is a flow chart of the concentration sequence offset module of the present invention;
[0046] Figure 3 This is the flowchart of the matching similarity extraction module of the present invention;
[0047] Figure 4 This is a flow chart of the hysteresis interval derivation module of the present invention;
[0048] Figure 5 A flow chart of the ratio trend module of the present invention is constructed;
[0049] Figure 6 This is a flow chart of the trend data output module of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0051] In the description of the present invention, it should be understood that the terms "length," "width," "up," "down," "front," "back," "left," "right," "vertical," "horizontal," "top," "bottom," "inside," "outside," and the like, indicating positions or relationships, are based on the positions or relationships shown in the accompanying drawings and are intended only to facilitate the description of the present invention and simplify the description. They do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limiting the present invention. Furthermore, in the description of the present invention, "plurality" means two or more, unless otherwise expressly and specifically defined.
[0052] See also Figure 1 , the water quality trend prediction system based on big data includes:
[0053] The concentration sequence offset module obtains the continuous time series of pollutant concentrations at each section in the water transmission path, sets the time offset step, performs a step-by-step reverse sliding operation on the downstream concentration series, obtains the difference series between the offset concentration value and the upstream concentration value in the same time window, calculates the error of the difference series, establishes an error sliding window based on the time position of the error value, accumulates the difference during the sliding process of the error sliding window, calculates the matching error index, and establishes a concentration trend offset sample set;
[0054] The matching similarity extraction module uses the concentration trend offset sample set to screen all time window positions with an error level lower than the concentration difference recognition threshold, extracts the sequence number and time period of the corresponding window at each time step, groups and clusters the time periods, and extracts overlapping areas by sorting the frequency of occurrence within the time period to obtain the concentration conduction stable time period;
[0055] The hysteresis interval derivation module counts the occurrence frequency of each step based on the offset step sequence in the stable concentration conduction time period, identifies the offset value range whose cumulative occurrence frequency exceeds the time lag threshold, matches the corresponding offset value interval with the concentration conduction time window, analyzes the probabilistic conduction time range of the downstream response to the upstream concentration change, and obtains the stable time lag offset interval;
[0056] The ratio trend construction module obtains the concentration values and spatial spacing of each sampling point in the water transmission path, calculates the concentration decrease rate per unit distance between each pair of sampling points, combines the flow velocity sensor readings corresponding to each cycle, calculates the ratio of the concentration decrease rate per unit distance to the flow velocity value in each time period, records the direction of ratio change in all time periods, identifies the continuous change segments within the trend segment, and generates a concentration attenuation ratio change sequence;
[0057] The trend data output module extracts the overlapping time range of the stable time lag offset interval and the concentration attenuation ratio change sequence, and determines whether there is a trend increasing segment within the range. If so, it is marked as a potential transmission interval for future fluctuations, and the concentration values in each prediction window are recursively extended to construct the downstream predicted concentration trend curve.
[0058] The concentration trend offset sample set includes time offset parameters, error accumulation characteristics, and concentration difference window index. The concentration conduction stable time period includes the time period grouping number, frequency sorting result, and overlapping interval label. The stable time lag offset interval includes the offset value interval range, probabilistic response interval, and cumulative frequency statistical results. The concentration attenuation ratio change sequence includes the concentration decrease ratio sequence, ratio change direction identifier, and continuous trend segment number. The downstream predicted concentration trend curve includes the overlapping time range, trend increasing segment label, potential conduction interval range, and predicted concentration curve.
[0059] See also Figure 2 , the concentration sequence offset module includes:
[0060] The concentration difference generation submodule sets the time offset step based on the continuous time series of pollutant concentrations at each section in the water transmission path, performs a step-by-step reverse sliding operation on the downstream concentration series, obtains the difference series between the downstream offset concentration value and the upstream concentration value in the same time window at each time offset step, and obtains the concentration difference series corresponding to all offset steps after sequence synchronization.
[0061] Based on the continuous time series of pollutant concentrations at each section in the water transmission path, the water transmission path must first be gridded and segmented, a concentration monitoring point is set up at each section, and time series data is recorded. For example, assume that three sections A, B, and C are set up in a certain basin, at 0km, 5km, and 10km respectively. The monitoring time series length is 24 hours, and the pollutant concentration value is recorded once every hour. After obtaining the sequence, the time offset step is set to 1 hour, which means that each time the downstream sequence slides forward by 1 time unit, during the sliding process, the downstream concentration value under each offset step is synchronously aligned to form a comparison set of upstream and downstream concentrations under the same time window. For example, for offset step 1, the concentration at point C in the second hour The value will be compared with the concentration value at point B in the first hour, and on this basis, it will slide gradually to construct a set of concentration difference values corresponding to multiple offset steps. The difference is calculated by directly taking the algebraic difference of the concentrations of the two sections. For example, if the concentration at point B in the first hour is 2.3 mg / L and the concentration at point C in the second hour is 2.9 mg / L, then the difference under this offset step is 0.6 mg / L. And so on to form a complete difference sequence. During the processing, it is necessary to pay attention to the time alignment and length uniformity of the data. For example, if the downstream data lacks data at a certain moment, the position should be excluded from the calculation to ensure that no error is introduced. Finally, the sliding generation is completed under all offset steps, and the concentration difference sequence corresponding to each offset step is obtained to form a concentration difference sequence.
[0062] The error sliding window construction submodule is based on the concentration difference sequence. Based on the difference item at each position, the time window length is set, and the difference sequence is divided into sub-segments according to the time window. The formula is:
[0063] ;
[0064] Calculate the average deviation value of each time window position , construct a time sliding window with a fixed window length, cover the error value sequence with a window, and obtain the error sliding window sequence, where, Representative In the window The upstream and downstream concentration difference at the moment, and Represents the downstream and upstream in In the window The concentration value at the moment, is the path response factor at that moment, is the time step size at that moment, is the total number of time steps in the window;
[0065] The time step scale refers to the actual time interval corresponding to each time step during the discretization calculation process. It determines the time granularity of each simulation step during model execution and has a significant impact on the stability and accuracy of the model results. In models based on actual monitoring data, the time step scale is often directly determined by the data sampling frequency. For example, if data is collected once per second, the time step scale is one second; if data is collected once per minute, the time step scale is one minute to ensure that the time step is consistent with the observation.
[0066] According to the concentration difference sequence, the sliding window length is set to 3 hours, and the difference sequence is segmented. Each sub-segment contains the difference items of 3 adjacent time points. For example, the first sliding window covers the difference from the 1st to the 3rd hour, the second sliding window covers the difference from the 2nd to the 4th hour, and so on. In each sliding window, the difference sequence is extracted. , downstream concentration , upstream concentration , path response factor and time step scale , respectively obtain the corresponding values of these parameters. The setting of the path response factor value is based on the water flow velocity change rate between sections and the degree of transmission lag reflection. Specifically, this value comes from the normalized weighted result of the velocity change coefficient and the section reaction delay time in the hydrodynamic monitoring data. Assuming that during the 3-hour monitoring period, the flow velocity of the BC section is 1.2m / s in the first hour, drops to 0.95m / s in the second hour, and rises to 1.1m / s in the third hour, and the corresponding pollutant transmission delay time per hour is 20 minutes, 30 minutes, and 25 minutes respectively. According to the above indicators, the proportional relationship between the water flow fluctuation rate and the lag time is calculated and combined with the time normalization and standardization processing, the path response factors of the 1st, 2nd, and 3rd hours are 0.8, 0.6, and 0.7 respectively. The time step scale is set to one hour, that is, , the concentration values are 、 , and so on, substitute the data in Table 1 below to perform specific calculations:
[0067] Table 1 Error sliding window parameter table
[0068]
[0069] Substituting into the formula:
[0070] ;
[0071] The calculation is as follows:
[0072] ;
[0073] ;
[0074] ;
[0075] ;
[0076] ;
[0077] ;
[0078] ;
[0079] The result shows that the average error at this sliding window position is 0.94 mg / L, which is recorded as an item in the error value sequence. The error values of all sliding window positions are constructed accordingly to obtain the error sliding window sequence.
[0080] The calculation logic of the formula is to comprehensively evaluate the impact of upstream and downstream concentration changes and path characteristics on the error in each time window. Indicates in The first The upstream and downstream concentration difference at the time is used as the direct basis for error assessment; secondly, the The square root of the product of the upstream and downstream concentrations reflects the trend of coordinated changes in concentration. If the two rise or fall synchronously, the product is larger and the square root result increases, reflecting the convergence in the transportation process. represents the ratio of the path response factor to the time step size, which is used to quantify the time-varying impact of path transport conditions, where Characterizes the degree to which the pathway responds to concentration at that moment, It reflects the time span of that moment. The larger the ratio of the two, the more intense the path response and the larger the error correction amplitude. The entire formula comprehensively reflects the average error level formed by the concentration difference under each offset step after considering the path factors and transport changes by adding and subtracting the difference term, the coordinated change term and the path response term, and finding the absolute value, and then summing and averaging them within the window, thereby providing a quantitative basis for subsequent sliding window matching and error judgment.
[0081] The matching error accumulation submodule accumulates error terms based on the error sliding window sequence. Based on the total error at each sliding window position, it compares the cumulative error of the sliding window in all time offset steps with the error baseline value, selects the minimum cumulative error value, marks the corresponding time offset step, organizes the corresponding concentration sequence, error value sequence and time index according to the offset step, and establishes a concentration trend offset sample set.
[0082] Based on the error sliding window sequence, the sum of the error values within the sliding window range corresponding to each offset step is calculated one by one. For example, in offset step 1, the sliding window range is from the 1st to the 5th time point, and the corresponding error values are [0.94, 0.82, 1.01, 0.90, 0.95], with a cumulative error of 5.62 mg / L. This value is compared with the set error benchmark value. The benchmark value is set according to the stable fluctuation range of historical pollutants. Assuming that the benchmark is set to 6.0 mg / L based on the average annual fluctuation value of the measured data, offset step 1 is a valid sample. The other offset steps are evaluated in sequence, and all offset steps with cumulative errors less than 6.0 mg / L are screened out. The corresponding concentration sequence fragments, error value sequence fragments, and offset step numbers are recorded together to construct a concentration trend offset sample. Each sample structure is {offset step number, concentration difference vector, error cumulative value}. The sample set is organized in a two-dimensional structure to form a concentration trend offset sample set.
[0083] See also Figure 3 , the matching similarity extraction module includes:
[0084] The error screening submodule, based on the concentration trend offset sample set, screens all time window positions where the error level is lower than the concentration difference recognition threshold, extracts the sequence number and time period information corresponding to each time window at different time steps, and obtains the sequence time mapping set;
[0085] Based on the concentration trend offset sample set, the positions in all time window positions with error levels lower than the concentration difference recognition threshold are screened. This operation first requires traversing each time window in the sample set and extracting the error value of the window at each offset step to determine whether it is less than the recognition threshold of 0.12 mg / L (the setting is based on the average fluctuation range of the standard deviation σ value of the concentration change of pollutants (such as ammonia nitrogen and total phosphorus) in the nearshore area in multiple measured sections. The 1σ range of the ammonia nitrogen concentration fluctuation in a typical section in the past 24 hours is usually no more than 0.10 mg / L. If the 95% confidence level is used as the limit, the concentration change range is ±1.96σ, and the corresponding value is 0.196 mg / L. Combined with the on-site background noise and error control requirements, 0.12 mg / L is selected as the offset judgment standard for eliminating disturbance-type concentration anomalies. This value fluctuates with the background pollution level of the river, the water flow velocity of the section, and the span of the sample time window. In sections with high flow velocity and low concentration, the threshold will tend to decrease, and in areas with low flow velocity and high background concentration, it will appropriately rise. Therefore, 0.12 mg / L is reasonable as the judgment benchmark value under the background of medium water quality fluctuations). If the error value is 0.08 mg / L, it is determined to be a sample item that meets the conditions, and then the index number of the time window and the start and end points of its corresponding time period are recorded. For example, the start time is the 15th minute and the end time is the 45th minute, and the corresponding time period is [15, 45]. For different time steps, such as 5 minutes and 10 minutes, the index number of the time window is recorded. Or in the case of 15 minutes, the time period needs to be projected onto these time scales and numbered to form an index relationship. The time period [15, 45] can be expressed as the interval [10, 50] at a step of 10 minutes. In practice, the following data records may be obtained: window number W1, corresponding error value 0.08 mg / L, time period [15, 45], step type 10 minutes, corresponding sequence number S3, and sequence numbers S1 to S5 are generated at different step sizes. To ensure the integrity of the results, a mapping matrix between time periods and sequence numbers needs to be constructed, where rows represent time periods, columns represent sequence numbers at different time steps, and corresponding cells are error values. When filtering, the matrix is traversed and the corresponding row and column labels are extracted for cells that meet the conditions, that is, A set of sequence numbers and time period information that meet all threshold requirements can be obtained. This set is the sequence time mapping set. To ensure accurate screening, the concentration difference recognition threshold needs to be explained. Its value can be based on the stable concentration fluctuation range of similar water bodies in historical measurements. By counting the concentration differences at a 95% confidence level in the sample, the calculated result is ±0.12 mg / L, so this value is set as the recognition threshold. If the error value in the sample exceeds the ±0.12 mg / L interval, it is considered as an unstable segment and is eliminated. For example, the following concentration difference value set {0.05, 0.08, 0.13, 0.07, 0.15} is screened, only 0.05, 0.08, and 0.07 are retained, and the rest are eliminated, thereby obtaining the sequence time mapping set.
[0086] The time grouping submodule groups all time periods according to the start and end boundaries of the time period based on the sequence time mapping set, counts the frequency of each time period in all sequence numbers, and sorts the time periods according to their repetition to obtain a frequency-sorted time set;
[0087] Based on the sequence time mapping set, all time periods are grouped according to the start and end boundaries of the time period. During the operation, the time period set needs to be sorted from small to large according to the start time, and then it is determined whether there is time overlap or continuity between adjacent time periods. If two time periods are adjacent, for example, time period A is [10, 30] and time period B is [30, 50], they can be regarded as the same group and classified into a combination segment [10, 50]. Then the combination segment is counted in the frequency statistics. If a certain time period appears in 3 different sequence numbers, its frequency is recorded as 3. According to this logic, all combination segments are counted. Perform frequency statistics to form a mapping relationship between time periods and their frequencies. For example, if the time period [20, 40] appears in sequence numbers S2, S3, and S4, the frequency is 3. If [50, 70] only appears in S1, the frequency is 1. After all statistics are completed, all time period combinations are sorted in descending order according to the frequency value. For example, the segment with a frequency of 5 is prioritized, and the segment with a frequency of 3 is ranked next, forming an ordered frequency-sorted time period set. To supplement the frequency information of each time period, the following table lists a set of simulated data, listing the time period, frequency, and coverage sequence number respectively:
[0088] Table 2 Frequency sorting time period table
[0089] Time period (minutes) Frequency (times) Override sequence number [10,40] 4 S1, S2, S3, S4 [20,50] 3 S2, S3, S4 [30,60] 2 S1, S3 [45,75] 1 S2
[0090] As shown in Table 2, by grouping and counting the sequence time mapping set, we can obtain the frequency of each time period in multiple sequences. Among them, the [10, 40] segment has the highest frequency, which is 4 times. This segment is extracted first in the subsequent sorting, thereby obtaining the frequency-sorted time set.
[0091] The overlap extraction submodule compares the time periods with each other based on the frequency sorted time set to determine whether there is a boundary intersection. If there is an intersection, the intersection interval range of the corresponding time period is recorded, and all the intersection intervals are integrated to establish the concentration conduction stable time period.
[0092] According to the frequency sorting time set, the top sorted time periods are compared with each other to determine whether there is a boundary intersection. The specific judgment method is to check whether the start time of time period A is earlier than the end time of time period B, and whether the end time of A is later than the start time of B. If both meet the conditions, there is an overlapping interval. It is necessary to calculate the intersection part and record its start and end boundaries. For example, if time period A is [10, 40] and B is [30, 60], then its intersection is [30, 40]. The intersection can be deduced by the following formula: starting point = max(A start, B start) = 30, end point = min(A end, B end) = 40, so the intersection interval is [30, 40]. Then the intersection area The intervals are recorded and added to the overlapping interval set. If there are continuous overlaps in multiple time periods, the interval merging operation is further performed to form a stable segment. For example, [10, 40] overlaps with [30, 60] to form [30, 40], which then overlaps with [35, 55] to obtain [35, 40]. The final stable conduction segment is [35, 40]. Finally, all the intersections are merged to obtain a non-repeating time interval set, which is the time period set with stable conduction characteristics in the concentration time series, that is, the concentration conduction stable time period. This stable segment reflects the period when the concentration change between multiple offset steps and multiple sample segments remains small and highly repeatable, and can be used as a time reference benchmark for subsequent pollutant transport mechanism or trend modeling.
[0093] See also Figure 4 , the lag interval derivation module includes:
[0094] The step frequency statistics submodule counts the occurrence frequency of each offset step in all time periods based on the offset step sequence in the concentration conduction stable time period, obtains the total number of occurrences corresponding to each step value, and numbers and aligns the frequencies of all offset steps to generate a step frequency distribution set;
[0095] Based on the offset step sequence in the concentration conduction stable time period, the offset step recorded in each stable time period is first counted segment by segment. For example, there are 5 concentration conduction stable time periods, namely [120, 130], [150, 165], [180, 190], [200, 215] and [230, 240]. The offset step sequences recorded in these segments are as follows: [3, 4, 4, 5, 6], [4, 5, 6, 6, 7], [3, 3, 4 , 5], [4,5,6,6], [3,4,5], all the offset step lengths that appear are summarized and counted to form the offset step length and frequency comparison data, and the number of occurrences is normalized to obtain the frequency value; for example, offset step length 3 appears 5 times, step length 4 appears 6 times, step length 5 appears 6 times, step length 6 appears 5 times, step length 7 appears 1 time, and the total number of occurrences is 23 times, so the frequency of step length 3 is 5 / 23≈0.217, and so on, to obtain the frequencies of other step lengths, see Table 3.
[0096] Table 3 Step length frequency distribution
[0097] Offset step Occurrences frequency 3 5 0.217 4 6 0.261 5 6 0.261 6 5 0.217 7 1 0.043
[0098] Table 3 summarizes the statistical counts and frequencies of different offset step sizes across all stable time periods. All frequency values are normalized to satisfy the condition of summing to 1. This submodule does not involve threshold setting, so there is no need to introduce a decision interval or calculate external parameters. The result is the step size frequency distribution set, which will serve as the input parameter for the next analysis step.
[0099] The hysteresis interval identification submodule is based on the step frequency distribution set. It sorts all offset step values by frequency, gradually accumulates the frequency values of the previous items, calculates the cumulative frequency and compares it with the set time lag threshold using the formula:
[0100] ;
[0101] Determine all step sets that satisfy the cumulative frequency greater than the threshold , generating a hysteresis offset value interval, where Indicates the The offset step value, Indicates the The frequency of occurrence of steps, express , is the total number of step types, represents the time lag threshold;
[0102] According to the step frequency distribution set, the frequency values in Table 1 are arranged in ascending order according to the offset step, and the cumulative frequency judgment operation is performed. Specifically, the frequency is accumulated starting from step 3 until the cumulative frequency reaches or exceeds the time lag threshold for the first time. Here, the time lag threshold is 0.75 as an example. The threshold is set to extract the interval range with the largest cumulative impact to reflect the time lag response; the value is set based on the cumulative frequency statistics of all offset steps in the early stage of the concentration conduction stability period. By analyzing the cumulative frequency change trend of the interval corresponding to the step with the smallest concentration difference and stable error distribution, the error value is selected when the cumulative frequency accounts for 75% of the total frequency. The difference shows a rapid downward trend and remains stable below 0.02, indicating that this frequency accounts for the majority of the contribution to the concentration transmission path. Therefore, τ = 0.75 is determined to be a reasonable threshold for this system. The specific setting of the time lag threshold τ depends on three key parameters: first, the magnitude of the concentration difference series before and after the lag interval, specifically, the rate of decrease in the concentration fluctuation amplitude exceeding 50%; second, the rate of decrease in the sum of squared errors (SSE) slows down when the cumulative frequency reaches 75%, with a decrease ratio of less than 5%; and third, the response amplitude of the path response factor decreases before and after the threshold, with the first 75% of frequencies contributing at least 90% to the system response. Through the interactive analysis of these three parameters, τ = 0.75 is determined to be a reasonable limit for the transmission lag response within the system. Furthermore, this value fluctuates with concentration time series, path length, and sampling steps. In particular, when path length increases or the concentration rate of change accelerates, the τ value generally shows an upward trend. In short paths or slowly changing systems, the τ value tends to be closer to the lower limit of 0.70. Based on comprehensive model testing results, the τ value fluctuates between [0.70, 0.80] and defaults to 0.75. However, this value can be adjusted appropriately when the step size exceeds 30 groups or the measurement period exceeds 100 time steps. The current value is based on the conductive structure characteristics when the number of sequence groups is 5 and the offset step size is 23 groups; it is calculated according to the formula:
[0103] Item 1 (step 3): cumulative frequency = 0.217;
[0104] Item 2 (step 4): cumulative frequency = 0.217 + 0.261 = 0.478;
[0105] Item 3 (step 5): cumulative frequency = 0.478 + 0.261 = 0.739;
[0106] Item 4 (step 6): cumulative frequency = 0.739 + 0.217 = 0.956;
[0107] When the cumulative frequency reaches the fourth item, it exceeds 0.75. Therefore, step lengths 3 to 6 are selected as the interval that meets the conditions. In other words, the offset value interval [3, 6] is extracted as the hysteresis offset value interval. This interval will be used to map the concentration conduction time window in the subsequent process, indicating that the offset step within this interval is the delay factor that dominates the conduction process. This result shows that the offset step is concentrated between [3, 6] and has a dominant effect on the system response.
[0108] The operation logic of the formula is to determine which interval in the offset step set has the dominant contribution to concentration conduction by gradually accumulating the frequency values. The frequency of the operator for each step size The purpose of accumulation is to obtain the cumulative value of all step frequencies before the current offset step position, which reflects the overall impact intensity within the step range; the denominator part It is the sum of all step frequencies, that is, the normalized reference amount, so that the cumulative frequency value becomes a relative proportion, varying between 0 and 1; this ratio is related to the hysteresis threshold The essence of the comparison is to determine whether a certain offset step range has cumulatively reached the acceptable delay interpretation threshold of the system. Therefore, the formula as a whole establishes a screening and judgment relationship between the step frequency distribution and the threshold by summing and forming a ratio, maintaining the monotonicity and physical interpretability of the judgment criteria, and ensuring that the results are stable and reliable.
[0109] The response mapping matching submodule extracts the corresponding concentration conduction time window position based on the hysteresis offset value interval, analyzes the mapping relationship between each offset value and the upstream and downstream concentration series corresponding to the time period, determines the duration of the corresponding response of the upstream concentration change in the downstream concentration series, integrates all response time period ranges, and establishes a stable time lag offset interval;
[0110] Based on the hysteresis offset value interval, obtain all time intervals with a step size of 3 to 6. For example, if the time position with an offset step size of 3 in time period 1 is 125-127, the time position with an offset step size of 4 in time period 2 is 152-155, the time position with an offset step size of 5 in time period 3 is 182-186, and the time position with an offset step size of 6 in time period 4 is 205-208, record these time positions and compare them with the upstream and downstream concentration change sequences to determine whether the peak position of the upstream concentration change (such as the upstream concentration changes at t=120, 150, 180, and 200 seconds) is related to the downstream concentration response. The degree of delay between the start and end times of the response is determined. If the upstream concentration changes at t=120 and the downstream response detects a corresponding increase at t=125, the conduction delay is considered to be 5 seconds. After repeating this operation in each sample, multiple groups of concentration response delay times are obtained. By integrating and summarizing the delay time values, it can be summarized that the common conduction time range is [5, 8] seconds. This range will be linked to the corresponding lag offset value interval [3, 6] to establish a stable time lag offset interval as the time indicator of concentration response conduction, indicating that there is a unified conduction logic within the identified offset interval, and a statistically significant delay effect can be effectively characterized.
[0111] See also Figure 5 , the ratio trend building module includes:
[0112] The decline rate calculation submodule obtains the concentration values and spatial spacing of each sampling point in the water transmission path, calculates the concentration decline rate per unit distance between adjacent sampling points in sequence, and records the concentration changes and corresponding spatial intervals of each pair of sampling points in different time periods to obtain a decline rate sequence;
[0113] To obtain the concentration values and spatial spacing of the sampling points in each section of the water transmission route, it is first necessary to arrange multiple sampling points along the water transmission route. For example, set sampling points A, B, and C at the starting point, middle section, and end. Assume that the distance between A and B is 80 meters, and the distance between B and C is 120 meters. At time t1, the sampling concentrations of points A, B, and C are 8.6 mg / L, 7.2 mg / L, and 6.1 mg / L, respectively. After recording their spatial spacing, the concentration change of adjacent sampling points is calculated. The concentration change between AB is 8.6-7.2=1.4 mg / L, corresponding to a single The concentration decrease rate between the two sampling points is 1.4÷80=0.0175mg / L·m⁻¹, and the decrease rate between the two sampling points is 7.2−6.1=1.1mg / L, so the decrease rate is 1.1÷120=0.0092mg / L·m⁻¹. Further extending this to multiple time periods, the concentration values are collected at t2 and t3 and the calculation is repeated to form a data set containing the concentration decrease rate between each pair of sampling points in different time periods. All the decrease rate information is recorded and the time series is marked to form a concentration decay data table for each pair of sampling points in each time period, as shown in the following table:
[0114] Table 4 Concentration decrease rate per unit distance at sampling points
[0115]
[0116] As shown in Table 4, the decreasing rate of each pair of sampling points is based on the same formula Perform operations, where is the concentration at the sampling point, is the distance between two sampling points. The decline rate data can be used as the basis for constructing subsequent ratios to obtain the decline rate series.
[0117] The ratio generation submodule uses the formula:
[0118] ;
[0119] Calculate the Ratio of concentration to flow rate under time period , summarize the ratio direction change information and generate the concentration flow rate ratio sequence, where, is the concentration decrease rate per unit distance in the corresponding section, is the spacing between sampling points of the corresponding segment, is the flow velocity reading for the corresponding section, is the flow flux of the corresponding sampling area, is the time interval span of the corresponding sampling segment, is the sampling frequency of the flow velocity in the corresponding section;
[0120] The flow flux in the sampling area is set based on the flow variation characteristics determined by the combined flow velocity and cross-sectional area of the fluid in the sampling area. The flux size is dynamically adjusted with the channel cross-sectional size and flow velocity fluctuations, and is usually used to reflect the contribution of the local area to the overall flow intensity. The sampling time interval span is set based on the typical response time range during fluid transmission, which is determined by balancing the sampling frequency and data stability. The span value varies with the data acquisition cycle, fluid change rate and model synchronization requirements, and is used to ensure the representativeness and completeness of the sampling results in each time period. The flow velocity sampling frequency is set based on the dynamic characteristics of flow velocity changes and the response capability of the sensor. The frequency directly affects the accuracy of capturing flow details. Its value is adjusted with the flow velocity fluctuation amplitude, data timeliness requirements and equipment sampling performance to ensure a reasonable match between sampling density and system load.
[0121] After obtaining the decline rate sequence, pair the flow velocity sensor readings in each time period and collect the flow velocity information corresponding to the sampling section. For example, at time t1, the flow velocity corresponding to the AB section is 0.42 m / s and that of the BC section is 0.39 m / s. Record the flow velocity readings and decline rate values in the same time period, and calculate the ratio using the formula.
[0122] Taking t1 and AB segment as an example, it is known that mg / L·m⁻¹, m, m / s, m³ / s (corresponding to the flow rate in the measurement area), s (single-cycle time span), (sampling frequency), then bring it into the formula and calculate as follows:
[0123] ;
[0124] Continue to perform similar calculations for the remaining time periods and sampling segments to obtain multiple ratio results, construct a complete ratio change sequence, and record the ratio increase and decrease trends of each time period. For example, from t1 to t2, the ratio increases from 0.0486 to 0.0532, which indicates a growth trend. The trend direction of each segment is uniformly marked as +1 (increasing) or −1 (decreasing) to establish a concentration-flow rate ratio sequence.
[0125] The operational logic of the formula is to integrate multi-dimensional physical quantities to measure the sensitivity of concentration attenuation to flow velocity disturbance in the water transmission path, among which the decline rate Indicates the concentration loss per unit distance, multiplied by the distance It reflects the total actual concentration change during the time period. The numerator of the ratio is used to quantify the attenuation amplitude, while the denominator is composed of the flow rate value. , flow flux , sampling time span , sampling frequency Joint construction, Reflects the direct impact of fluid movement, By taking the square root of the regional flow, the stretching effect of the sharp difference in flow between different measuring intervals is alleviated. Indicates the length of time for data collection at a unit sampling point. The larger the ratio, the longer the data coverage time, which increases the stability of the system, but also reduces the sensitivity of the instantaneous concentration response. Therefore, it is used as an adjustment item for subtraction correction. The denominator is combined as a whole to form a dynamic flow rate disturbance factor of concentration change, which is used to balance the attenuation amplification or weakening caused by flow rate changes, thereby making the ratio Comprehensively reflect the changing trend of concentration decrease under current hydraulic conditions.
[0126] The trend extraction submodule analyzes the continuous change direction in the ratio sequence based on the concentration-flow rate ratio sequence, identifies the continuous segments with consistent directions as the change segments within the trend segment, numbers each segment, locates the start and end points, and marks the change direction, and establishes a concentration attenuation ratio change sequence;
[0127] After obtaining the concentration-velocity ratio sequence, the trend of the ratio is analyzed along the time axis. For example, if the corresponding ratio directions are +1, +1, and −1 for time periods t1, t2, and t3, respectively, indicating an upward trend from t1 to t2 and a downward trend from t2 to t3, then time periods with consistent directions are identified as continuous trend segments, and a continuous trend segment information set is constructed. During the identification process, a minimum continuous duration of two sampling cycles is set. If a segment with the same direction is less than two cycles, it is not included in the trend segment statistics. If the conditions are met, the segment is marked as a trend segment. For example, if t1 and t2 are rising segments, t2 and t3 are not counted, and if t4 to t6 are falling segments, they are recorded as falling trend segments. After extracting trends for all time periods and assigning them numbers, all trend segments are finally sequenced and arranged by time period to obtain a concentration decay ratio change sequence. The formula is beneficial in that, by introducing multi-parameter coupling terms such as velocity flux, sampling frequency, and time span, the concentration gradient changes under nonlinear velocity perturbations are standardized, improving the stability of the ratio sequence for continuous trend identification.
[0128] See also Figure 6 , the trend data output module includes:
[0129] The interval intersection submodule compares the time periods of the stable time lag offset interval and the concentration attenuation ratio change sequence, identifies the intersection area of their respective start and end times, extracts the continuous time period information of the overlapping part, and establishes a time overlap segment set;
[0130] According to the stable time-lag offset interval and the concentration attenuation ratio change sequence, the two types of time periods are subjected to time intersection processing. First, each segment in the stable time-lag offset interval is represented as a pair structure of start and end timestamps, such as {t1, t2}. In the concentration attenuation ratio change sequence, the start and end times of each trend segment are represented by a trend segment structure. The comparison method adopts a double-pointer traversal strategy, and the offset interval and the ratio trend interval are arranged in ascending time order. The coincidence relationship of their respective start and end times is compared pair by pair. If t1^A≤t2^B and t2^A≥t1^B are satisfied, it is marked as a coincidence segment. If there is For partial intersections, the timestamp range of the intersection segment is reconstructed and stored. In the actual scenario, assuming the offset interval is {8:00, 10:30} and the ratio segment is {9:00, 11:00}, the intersection of the two is {9:00, 10:30}, and this intersection segment is extracted for subsequent judgment; if multiple overlapping segments exist, they are numbered and recorded separately to prepare data for subsequent trend identification. The timestamp index needs to be maintained during each matching process to establish an accurate time overlap mapping relationship. In the actual sample, the concentration and ratio data collected from the monitoring system are grouped every 5 minutes, and the table records them as follows:
[0131] Table 5 Schematic diagram of time overlap sections
[0132]
[0133] As shown in Table 5, the time-overlapping segments can be directly constructed by comparing the time ranges, and the constructed time-overlapping segment set serves as the input basis for the subsequent trend increment identification.
[0134] The trend identification submodule determines whether there is a continuous increasing segment in the direction of the ratio change in each time period based on the time overlap segment set, performs segmented judgment on the direction of the ratio, extracts and numbers the increasing trend segments of the ratio value, and establishes a predicted trend segment set;
[0135] According to the set of time overlapping segments, determine whether there is a continuous increasing ratio segment in each overlapping segment. The specific operation steps are to first extract the concentration and flow rate ratio sequence in each time period, and construct the corresponding time index according to the sampling frequency. In this embodiment, the sampling frequency is once every 5 minutes, and the corresponding time period length is 1 hour, which should contain 12 groups of data. Construct the ratio sequence B={0.78, 0.81, 0.86, 0.89, 0.85, 0.87, 0.90, 0.94, 0.91, 0.92, 0.95, 0.98}, calculate the difference between two adjacent values, and determine the continuous positive value segment Length, if there is a continuous increasing segment with a length greater than 3, it is considered that there is a trend increasing segment, and the marking process is continued. During the execution process, a slight increase judgment threshold ε should be set for the increase judgment operation to avoid misjudging the increase caused by small fluctuations. The setting basis of this threshold is the difference between the flow rate acquisition accuracy and the concentration change stability in the actual water delivery path. Specifically, in this embodiment, the flow rate sampling accuracy is 0.01m / s, and the concentration change is often affected by background noise and sensor response error in the range of less than 0.005mg / L. Therefore, it is necessary to set a threshold that is higher than the basic error term but lower than the mutation critical value. The threshold of the value is used for slight increase recognition, and finally ε=0.02 is set. Its value is between the concentration sampling resolution (0.005mg / L) and the upper limit of the typical fluctuation (0.03mg / L). It can produce interval adaptation ability through the difference of concentration baseline level in different concentration regions. For example, in the medium concentration range of 0.3~0.7mg / L, the slight increase of 0.02mg / L or more can represent the trend change, and the value below this is treated as background fluctuation. Therefore, the ε value is determined by the sampling interval Δt, the flow rate stability interval σv and the concentration sampling stability interval σc. Its change trend varies with the sampling accuracy and concentration. The distribution of degree differences fluctuates. In this example, the 1st to 4th groups of data constitute an increasing trend segment, the 5th group's decline is not included, and the 6th to 8th groups form an increasing segment again. These segments are numbered separately to obtain the numbering sequence S1={1-4}, S2={6-8}. Finally, these continuous segments are connected with the original time index mapping relationship to generate a predicted trend segment set. During the evaluation process, it is also necessary to set the minimum length threshold of the increasing trend segment based on the total segment length, for example, set it to 15 minutes. If it is lower than this value, the segment is eliminated to avoid misjudgment of short-term disturbances. After this process, a set of predicted trend segments that meet all the conditions can be obtained.
[0136] The concentration recursive submodule performs time-by-time extension processing on the downstream concentration value in each trend increasing segment according to the predicted trend segment set, and performs concentration deduction processing in chronological order according to the increasing trend of the current concentration value and the ratio, and draws the downstream predicted concentration trend curve;
[0137] Based on the predicted trend segment set, the downstream concentration value in each trend increasing segment is extended time by time. The specific operation steps are as follows: first, the starting concentration value C0 in the trend segment and the corresponding ratio change rate r are extracted, and the concentration value C1 at the next moment is calculated according to the current sampling time interval Δt. Then, the complete trend sequence is constructed recursively. In the actual sample, if the starting concentration is 0.42 mg / L, Δt is 5 minutes, and r is 0.008 mg / L·min⁻¹, the first step concentration is C1=0.42+0.008×5=0.46 mg / L, the second step is 0.46+0.008×5=0.50mg / L, and so on, until the end of the complete trend segment, all calculated concentration values are generated into a trend sequence according to the time index, and the start and end times are recorded to construct the downstream predicted concentration trend curve. At the same time, to ensure data stability, it should be judged whether the ratio is within a reasonable growth range during the extension process. Generally, the maximum concentration growth rate threshold is set to 0.01mg / L·min⁻¹. If it exceeds this value, the recursion is interrupted to avoid excessive amplification of the fluctuation segment, and finally a complete downstream predicted concentration trend curve is drawn.
[0138] The above are merely preferred embodiments of the present invention and do not limit the present invention in any other form. Any technician familiar with the profession may use the technical content disclosed above to change or modify it into an equivalent embodiment with equivalent changes and apply it to other fields. However, any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.
Claims
1. The water quality trend prediction system based on big data is characterized by: The system comprises: The concentration sequence migration module obtains the continuous time series of pollutant concentrations at each section in the water transmission path, obtains the difference series between the offset concentration value and the upstream concentration value and performs error calculation, establishes an error sliding window and accumulates the difference during the sliding process of the error sliding window, statistically matches the error index, and establishes a concentration trend migration sample set; The matching similarity extraction module selects all time window positions whose error levels are lower than the concentration difference recognition threshold according to the concentration trend offset sample set, extracts overlapping areas according to the frequency of occurrence in the time period, and obtains the concentration conduction stable time period; The hysteresis interval derivation module identifies an offset value range based on the offset step sequence in the concentration conduction stable time period, matches the corresponding offset value interval with the concentration conduction time window, analyzes the probabilistic conduction time range, and obtains a stable time lag offset interval; The ratio trend construction module obtains the concentration values and spatial spacing of each sampling point in the water transmission path, calculates the concentration decrease rate per unit distance, combines the flow sensor readings, calculates the ratio of the concentration decrease rate per unit distance to the flow velocity value, records the direction of ratio change, identifies the continuous change section, and generates a concentration attenuation ratio change sequence.
2. The water quality trend prediction system based on big data according to claim 1 is characterized in that: The concentration trend offset sample set includes time offset parameters, error accumulation characteristics, and concentration difference window index; the concentration conduction stable time period includes time period grouping number, frequency sorting result, and overlapping interval label; the stable time lag offset interval includes offset value interval range, probabilistic response interval, and cumulative frequency statistical result; the concentration attenuation ratio change sequence includes concentration decrease ratio sequence, ratio change direction identifier, and continuous trend segment number.
3. The water quality trend prediction system based on big data according to claim 1 is characterized in that: The concentration sequence offset module includes: The concentration difference generation submodule sets the time offset step based on the continuous time series of pollutant concentrations at each section in the water transmission path, performs a step-by-step reverse sliding operation on the downstream concentration series, obtains the difference series between the downstream offset concentration value and the upstream concentration value in the same time window at each time offset step, and obtains the concentration difference series corresponding to all offset steps after sequence synchronization. The error sliding window construction submodule is based on the concentration difference sequence, the difference item at each position, sets the time window length, divides the difference sequence into sub-segments according to the time window, and uses the formula: ; Calculate the average deviation value of each time window position , construct a time sliding window with a fixed window length, cover the error value sequence with a window, and obtain the error sliding window sequence, where, Representative In the window The upstream and downstream concentration difference at the moment, and Represents the downstream and upstream in In the window The concentration value at the moment, is the path response factor at that moment, is the time step size at that moment, is the total number of time steps in the window; The matching error accumulation submodule performs an accumulation operation on the error sliding window sequence based on the error sliding window sequence. According to the total amount of error at each sliding window position, the cumulative sliding window error of all time offset steps is compared with the error baseline value, the minimum cumulative error value is selected, and the corresponding time offset step is marked. The corresponding concentration sequence, error value sequence and time index are organized according to the offset step to establish a concentration trend offset sample set.
4. The water quality trend prediction system based on big data according to claim 1 is characterized in that: The matching similarity extraction module includes: The error screening submodule screens the positions of all time window positions whose error levels are lower than the concentration difference recognition threshold based on the concentration trend offset sample set, extracts the sequence number and time period information corresponding to each time window at different time steps, and obtains a sequence time mapping set; The time grouping submodule groups all time periods according to the start and end boundaries of the time period based on the sequence time mapping set, counts the frequency of each time period in all sequence numbers, and sorts the time periods according to their repetition to obtain a frequency-sorted time set; The overlap extraction submodule compares the time periods with each other based on the frequency sorted time set to determine whether there is a boundary intersection. If there is an intersection, the intersection interval range of the corresponding time period is recorded, and all the intersection intervals are integrated to establish a concentration conduction stable time period.
5. The water quality trend prediction system based on big data according to claim 1 is characterized in that: The hysteresis interval derivation module includes: The step frequency statistics submodule counts the occurrence frequency of each offset step in all time periods based on the offset step sequence in the concentration conduction stable time period, obtains the total number of occurrences corresponding to each step value, and numbers and aligns the frequencies of all offset steps to generate a step frequency distribution set; The hysteresis interval identification submodule sorts all offset step values by frequency based on the step frequency distribution set, gradually accumulates the frequency values of the previous items in the sorting, calculates the cumulative frequency and compares it with the set time lag threshold using the formula: ; Determine all step sets that satisfy the cumulative frequency greater than the threshold , generating a hysteresis offset value interval, where Indicates the The offset step value, Indicates the The frequency of occurrence of steps, Indicates the The frequency of occurrence of steps, is the total number of step types, represents the time lag threshold; The response mapping matching submodule extracts the corresponding concentration conduction time window position according to the lag offset value interval, analyzes the mapping relationship between each offset value and the upstream and downstream concentration sequence corresponding to the time period, determines the duration of the corresponding response of the upstream concentration change in the downstream concentration sequence, integrates all response time period ranges, and establishes a stable lag offset interval.
6. The water quality trend prediction system based on big data according to claim 1 is characterized in that: The ratio trend building module includes: The decline rate calculation submodule obtains the concentration values and spatial spacing of each sampling point in the water transmission path, calculates the concentration decline rate per unit distance between adjacent sampling points in sequence, and records the concentration changes and corresponding spatial intervals of each pair of sampling points in different time periods to obtain a decline rate sequence; The ratio generation submodule uses the formula: ; Calculate the Ratio of concentration to flow rate under time period , summarize the ratio direction change information and generate the concentration flow rate ratio sequence, where, is the concentration decrease rate per unit distance in the corresponding section, is the spacing between sampling points of the corresponding segment, is the flow velocity reading for the corresponding section, is the flow flux of the corresponding sampling area, is the time interval span of the corresponding sampling segment, is the sampling frequency of the flow velocity in the corresponding section; The trend extraction submodule analyzes the continuous change direction in the ratio sequence based on the concentration-flow-rate ratio sequence, identifies continuous segments with consistent directions as change segments within the trend segment, numbers each segment, locates the start and end positions, and marks the change direction, and establishes a concentration attenuation ratio change sequence.
7. The water quality trend prediction system based on big data according to claim 1 is characterized in that: The system also includes a trend data output module; The trend data output module extracts the overlapping time range of the stable time lag offset interval and the concentration attenuation ratio change sequence based on the two, and determines whether there is a trend increasing segment within the range. If so, it is marked as a potential transmission interval for future fluctuations, and the concentration values within each prediction window are recursively extended to construct a downstream predicted concentration trend curve; The downstream predicted concentration trend curve includes an overlapping time range, a trend increasing segment label, a potential conduction interval range, and a predicted concentration curve.
8. The water quality trend prediction system based on big data according to claim 7 is characterized in that: The trend data output module includes: The interval intersection submodule compares the time periods of the stable time lag offset interval and the concentration attenuation ratio change sequence, identifies the intersection area of their respective start and end times, extracts the continuous time period information of the overlapping part, and establishes a time overlap segment set; The trend identification submodule determines whether there is a continuous increasing segment in the direction of the ratio change in each time period based on the time overlap segment set, performs segmented judgment on the direction of the ratio, extracts and numbers the increasing trend segments of the ratio, and establishes a predicted trend segment set; The concentration recursive submodule performs time-by-time extension processing on the downstream concentration value in each trend increasing segment according to the predicted trend segment set, performs concentration deduction processing in chronological order according to the current concentration value and the increasing trend of the ratio, and draws the downstream predicted concentration trend curve.
Citation Information
Patent Citations
River water quality real-time monitoring platform
CN118052450A
Method and system for evaluating water quality change trend
CN118247673A
Groundwater pollution real-time monitoring method and system
CN119574822A
Artificial intelligence river water quality pollutant spatial form monitoring system and method
CN119809144A
Method for analyzing suspended substance, system for analyzing suspended substance, method for analyzing suspended sand concentration, and system for analyzing suspended sand concentration
JP2010261719A
Cited By
Treatment device and method for aquaculture tail water
CN121005468A
Support system and method based on water ecological environment problem discovery and promotion solution
CN121436350A
Valve test nitrogen multi-working-condition data mapping method and system
CN121477747A
Abnormity detection system for building drainage pipe network
CN121658980A
A building drainage network anomaly detection system
CN121658980B