An intelligent collection and load accounting method and system for agricultural non-point source pollution

By combining LSTM interpolation models and concentration-flow regression models, sampling frequency is dynamically planned, solving the problems of resource waste and data accuracy in agricultural non-point source pollution monitoring, and achieving accurate pollution load accounting.

CN123155751APending Publication Date: 2026-11-24CHINA NAT ENVIRONMENTAL MONITORING CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611362026.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-03
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing technologies are difficult to dynamically adapt to the spatiotemporal variation characteristics of pollution concentration in agricultural non-point source pollution monitoring, resulting in wasted sampling resources and decreased data accuracy. In particular, pollution peaks are easily missed or data redundancy is caused during rainfall and runoff processes.

Method used

An intelligent data acquisition method based on an LSTM interpolation model is adopted. By combining a time and concentration change rate model, the sampling frequency is dynamically planned. The sampling data is optimized through an LSTM interpolation model and a concentration and flow regression model to construct an accurate pollution load accounting system.

Benefits of technology

It enables the accurate capture of pollution peaks under limited sampling resources, reducing resource waste, improving data quality, and enhancing the accuracy and efficiency of agricultural non-point source pollution load accounting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123155751A_ABST
    Figure CN123155751A_ABST
Patent Text Reader

Abstract

The application discloses an intelligent collection and load calculation method and system for agricultural non-point source pollution, and relates to the technical field of watershed water environment monitoring. The intelligent collection and load calculation method for agricultural non-point source pollution comprises the following steps: collecting rainfall runoff intelligently according to a sampling frequency based on dynamic planning of the sampling frequency at this sampling period, and obtaining monitoring sample data; inputting the monitoring sample data into a pre-constructed LSTM interpolation model, and outputting optimized sampling sample data; constructing a concentration and flow regression model based on the optimized sampling sample data; collecting runoff time series data, inputting runoff data at each moment in the runoff time series data into the concentration and flow regression model, and obtaining pollution concentration at the corresponding moment; and calculating agricultural non-point source pollution load based on the pollution concentration. The application can reduce waste of sampling resources, avoid missing sampling of pollution peaks, improve sample data quality, and thus improve the accuracy of agricultural non-point source pollution load calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of watershed water environment monitoring technology, and in particular to an intelligent method and system for collecting and calculating the load of agricultural non-point source pollution. Background Technology

[0002] Agricultural non-point source pollution has become a significant source of water pollution in river basins, and accurate calculation of its load is crucial for developing pollution control strategies. However, existing technologies still have many shortcomings in pollution monitoring sampling and load calculation.

[0003] Traditional sampling methods often employ fixed time intervals or empirical sampling strategies, making it difficult to dynamically adapt to the spatiotemporal variations in pollution concentrations. In rainfall-driven runoff pollution processes, pollutant concentrations typically exhibit nonlinear dynamic characteristics; especially in the initial stages of rainfall, pollutants such as nitrogen and phosphorus in the surface and soil are rapidly released with runoff, and concentration peaks often occur within a short period. Existing fixed-frequency sampling methods are prone to missing peak concentration data due to excessively large sampling intervals; or maintaining high-frequency sampling during the pollution decay phase leads to data redundancy and wasted sampling resources.

[0004] In addition, the limited number of sampling bottles in rainfall-runoff events makes it difficult to maintain high-frequency sampling throughout the entire process. This problem is particularly prominent in areas with heavy pollution and long rainfall durations, making it difficult to determine the optimal sampling time based on human experience. Although pooled sampling can reduce the risk of missing peak concentrations to some extent, the mixed samples lose information on the dynamic changes in the pollution process, making it difficult to match the spatiotemporal evolution of pollution, which also leads to a decrease in the accuracy of agricultural non-point source pollution load accounting.

[0005] After obtaining discrete sampling data, it is necessary to build a model based on the sample data to complete the load calculation. Existing schemes lack interpolation constraint methods that combine runoff physics, and are also susceptible to interference from abnormal samples, making it difficult to establish a concentration and flow regression model that closely matches the actual pollution process.

[0006] Therefore, how to construct an intelligent sampling method that can dynamically adapt to changes in pollution concentration and accurately capture key sampling opportunities, and how to construct a concentration and flow regression model that fits the actual pollution process based on the sampled data, has become a technical bottleneck that urgently needs to be solved to improve the accuracy of agricultural non-point source pollution load accounting. Summary of the Invention

[0007] The purpose of this application is to provide an intelligent method and system for collecting and calculating agricultural non-point source pollution, which can reduce the waste of sampling resources, avoid missing pollution peaks, improve the quality of sample data, and thus improve the accuracy of agricultural non-point source pollution load calculation.

[0008] To achieve the above objectives, this application provides an intelligent method for collecting and calculating agricultural non-point source pollution, comprising the following steps: S1: Dynamically planning the sampling frequency based on the current sampling period, and intelligently collecting rainfall runoff according to the sampling frequency to obtain monitoring sample data; S2: Inputting the monitoring sample data into a pre-constructed LSTM interpolation model, and the LSTM interpolation model outputs optimized sampling sample data; S3: Constructing a concentration-flow regression model based on the optimized sampling sample data; S4: Collecting time-series data of runoff in the study area as it changes over time, inputting the runoff data at each moment in the time-series data into the concentration-flow regression model to obtain the pollution concentration at the corresponding moment; and calculating the agricultural non-point source pollution load based on the pollution concentration.

[0009] As described above, the sub-steps of step S1 are as follows: S11: Using the current sampling period as a reference, perform period matching to obtain historical time series pollution concentration data that matches the current sampling period, and construct a time-concentration change rate model based on the historical time series pollution concentration data; S12: Determine the sampling time length based on the time-concentration change rate model, and divide the sampling time length into intervals to obtain multiple time intervals; S13: Calculate the sampling frequency of each time interval using multiple time intervals and the time-concentration change rate model; S14: Determine the sampling timing based on the sampling frequency of each time interval, and intelligently collect rainfall runoff at the sampling timing to obtain discrete runoff samples and runoff volume data; detect pollutants in the discrete runoff samples to obtain the measured pollution concentration, and use the sampling timing and the measured pollution concentration and runoff volume data under that sampling timing as monitoring sample data.

[0010] As described above, the sub-steps for constructing the time-concentration change rate model based on historical time-series pollution concentration data are as follows: S111: Extract at least ten pairs of historical data from the historical time-series pollution concentration data. Each pair of historical data includes: the historical time and the corresponding measured historical pollution concentration; S112: Construct an initial time-concentration fitting model using a cubic polynomial, and solve for the fitting coefficients of the initial time-concentration fitting model based on historical data; S113: Substitute the fitting coefficients of the initial time-concentration fitting model into the initial time-concentration fitting model to obtain the time-concentration fitting model; S114: Differentiate the time-concentration fitting model to obtain the time-concentration change rate model; where the expression for the time-concentration change rate model is: ;in, To follow the time of this rainfall process The rate of change of pollution concentration; To follow the time of this rainfall process The simulated pollution concentration changes.

[0011] As above, the sub-steps of step S12 are as follows: S121: Set the pollution concentration change rate threshold, substitute the pollution concentration change rate threshold into the time and concentration change rate model for back-calculation and solution, and obtain the sampling start time and sampling end time. The sampling time length is determined by the sampling start time and sampling end time; S122: Divide the sampling time length into multiple time intervals.

[0012] As described above, the sub-steps of step S13 are as follows: S131: For each time interval, perform definite integral processing on the time and concentration change rate model to obtain the cumulative change in pollution concentration corresponding to each time interval; S132: Based on the cumulative change in pollution concentration corresponding to each time interval, calculate the total cumulative change within the sampling time length; S133: According to the proportion of the cumulative change in pollution concentration corresponding to each time interval to the total cumulative change within the sampling time length, and combined with the preset total number of sampling bottles, allocate the sampling quantity to each time interval; S134: Calculate the sampling frequency of each time interval using the sampling quantity and time interval of each time interval.

[0013] As above, among which, the first The expression for the sampling frequency of each time interval is: ;in, For the first Sampling frequency for each time interval , The total number of time intervals. for The total number of time points corresponding to each time interval; For the first Number of samples per time interval; For the first The time interval of each time interval ; For the first The starting point of a time interval; For the first The endpoint of a time interval.

[0014] As described above, the sub-steps for pre-constructing the LSTM interpolation model are as follows: S21: Set physical constraints; where the physical constraints include: mass conservation constraints and concentration change rate constraints; S22: Construct training samples based on historical sampling data, and divide the training samples into a first training set and a second training set according to a preset sample division ratio; S23: Construct an interpolation model framework based on a long short-term memory network, and set an initial loss function for the interpolation model framework; S24: Train the interpolation model framework using the first training set to obtain the initial interpolation model; S25: Superimpose the mass conservation constraints and concentration change rate constraints onto the initial loss function to obtain the optimized loss function; S26: Use the second training set and the optimized loss function to iteratively train the initial interpolation model to obtain the LSTM interpolation model.

[0015] As described above, step S3 includes the following sub-steps: S31: Constructing an initial concentration-flow regression model using a cubic polynomial; S32: Using optimized sample data, fitting the initial concentration-flow regression model using the least squares method to obtain the values ​​of the fitting coefficients to be solved in the initial concentration-flow regression model; substituting the values ​​of the fitting coefficients back into the initial concentration-flow regression model to obtain the concentration-flow regression model; wherein, the expression for the concentration-flow regression model is: ;in, The pollution concentration output by the model; This refers to runoff; All are the fitting coefficients of the concentration-flow regression model.

[0016] As above, the sub-steps of step S4 are as follows: S41: Collect time series data of runoff in the study area as a function of time, input the runoff data at each time point in the time series data into the concentration and flow regression model to obtain the pollution concentration at the corresponding time point, and combine the runoff data and pollution concentration at the same time point into a data pair; S42: Based on the data pair, use the discrete summation algorithm to calculate the agricultural non-point source pollution load.

[0017] This application also provides an intelligent system for collecting and calculating agricultural non-point source pollution, including a memory, an input device, an output device, and a processor. The memory stores computer program instructions, as well as monitoring sample data, period matching rules, LSTM interpolation models, optimized sampling sample data, fitting coefficients of concentration-flow regression models, runoff time-series data, and daily runoff statistics. The input device receives historical time-series pollution concentration data and runoff monitoring data. The output device outputs sampling timing and agricultural non-point source pollution load. The processor calls the computer program instructions stored in the memory to execute the aforementioned intelligent system for collecting and calculating agricultural non-point source pollution.

[0018] The beneficial effects achieved by this application are as follows: (1) This application enables adaptive dynamic sampling of rainfall runoff, making reasonable use of limited sampling hardware resources. Specifically, it constructs a time-concentration change rate model based on historical time-series pollution concentration data matching the current sampling period, divides time intervals according to the severity of pollution concentration changes, allocates the number of samples and calculates the sampling frequency based on the cumulative change in pollution concentration in each time interval. The sampling frequency is increased during periods of severe pollution concentration changes and decreased during periods of moderate concentration changes. Under the hardware constraint of a limited number of sampling bottles, this effectively avoids the risk of missing pollution peaks during rainfall and reduces invalid sampling during periods of moderate change, fully exploring the pollution information carried by the limited sampled samples.

[0019] (2) This application introduces dual physical constraints to carry out interpolation processing, reducing the calculation error of subsequent modeling. Specifically, the loss function of the LSTM interpolation model is set with both mass conservation constraint term and concentration change rate constraint term, so that the optimized sampling sample output by interpolation not only fits the actual measured monitoring sample data, but also conforms to the real physical evolution law of runoff pollution, suppresses the concentration mutation phenomenon that is impossible to occur in reality in the model output, reduces the data distortion caused by simple statistical interpolation, and provides a high-quality data foundation for the construction of subsequent concentration and flow regression models.

[0020] (3) The concentration and flow regression model of this application can be adapted to two types of accounting scenarios, reducing the threshold for the implementation of non-point source pollution assessment in small and medium watersheds. Specifically, the concentration and flow regression model based on the cubic polynomial form constructed by optimizing the sampling sample can accurately depict the nonlinear relationship between flow and pollution concentration during the runoff process. It can support high-frequency time-series runoff input to complete the refined load accounting of a single rainfall event, and can also use publicly available daily runoff statistics to carry out long-term load accumulation calculations without the need for continuous high-frequency water quality monitoring. This facilitates the assessment of agricultural non-point source pollution in small and medium watersheds with limited monitoring conditions, and supports the implementation of watershed pollution control work. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0022] Figure 1 A schematic diagram of one embodiment of an intelligent data collection and load accounting system for agricultural non-point source pollution; Figure 2 A flowchart of one embodiment of an intelligent method for collecting and calculating agricultural non-point source pollution. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] like Figure 1 As shown, this application provides an intelligent collection and load calculation system for agricultural non-point source pollution, including a memory 1, an input device 2, an output device 3, and a processor 4.

[0025] Among them, memory 1 is used to store computer program instructions, as well as monitoring sample data, period matching judgment rules, LSTM interpolation model, optimized sampling sample data, fitting coefficients of concentration and flow regression model, runoff time series data, and daily runoff statistics.

[0026] Input device 2 is used to receive historical time series pollution concentration data and runoff monitoring data.

[0027] Output device 3 is used to output the sampling timing and agricultural non-point source pollution load.

[0028] Processor 4 calls the computer program instructions stored in memory 1 to execute the following intelligent collection and load calculation method for agricultural non-point source pollution.

[0029] Specifically, the runoff monitoring data consists of raw measured runoff data collected by field monitoring equipment. The runoff monitoring data is then time-aligned, anomaly removed, and organized according to the sampling time to form a chronological sequence of data, which is the runoff time series data. The runoff monitoring data is then integrated and accumulated by natural day to calculate the total daily runoff for each natural day. The dataset is composed of each natural day and its corresponding total daily runoff to obtain the daily runoff statistics.

[0030] like Figure 2 As shown, this application provides an intelligent method for collecting and calculating the load of agricultural non-point source pollution, including the following steps: S1: Based on the dynamic planning of the sampling frequency during this sampling period, intelligent collection of rainfall runoff is carried out according to the sampling frequency to obtain monitoring sample data.

[0031] Furthermore, the sub-steps of step S1 are as follows: S11: Using the current sampling period as a reference, perform period matching to obtain historical time series pollution concentration data that matches the current sampling period, and construct a time-concentration change rate model based on the historical time series pollution concentration data.

[0032] Furthermore, according to the preset period matching judgment rules, the current sampling period is used as a reference for period matching to obtain historical time series pollution concentration data that matches the current sampling period. The preset period matching judgment rules include multiple environmental condition judgments, and each environmental condition judgment is configured with an independent difference measurement calculation method and a difference allowable threshold range.

[0033] The environmental criteria included various farmland environmental conditions in the study area at the time of the rainfall event, including but not limited to crop phenological stages, field management practices, and seasonal meteorological background conditions. Crop phenological stages included but not limited to sowing, seedling, growth, maturity, and harvest periods. Field management practices included but not limited to fertilizer type and timing, tillage, and irrigation. Seasonal meteorological background conditions included but not limited to the season in which the rainfall occurred, temperature, and rainfall range.

[0034] The quantitative calculation method for the difference measurement corresponding to each environmental condition criterion can be determined according to the crop type, farmland underlying surface conditions and data availability in the study area. As long as it can quantify the degree of deviation between historical rainfall events and the current rainfall event in the corresponding environmental conditions, it is acceptable. For example, but not limited to the direct difference method and the relative deviation method, can be used.

[0035] Preferably, when the environmental condition criterion is the crop phenological stage, the corresponding difference quantification calculation method adopts the direct difference method, and the corresponding criterion difference degree is the difference between the cumulative growth temperature of crops in historical rainfall events and the cumulative growth temperature of crops in the current rainfall event. The specific expression is: Criterion difference degree = cumulative growth temperature of crops in historical rainfall events - cumulative growth temperature of crops in the current rainfall event.

[0036] When the environmental condition criterion is field cultivation management measures (such as fertilization, irrigation, etc.), the corresponding metric for difference is calculated using the direct difference method. The corresponding criterion difference is the time interval difference between the critical measure time of historical rainfall events and the critical measure time of the current rainfall event. The specific expression is: Criterion difference = Critical measure time of historical rainfall events - Critical measure time of the current rainfall event.

[0037] When the environmental condition criterion is the seasonal meteorological background condition, the corresponding difference quantification calculation method adopts the direct difference method. The corresponding criterion difference degree is the difference between the regional average rainfall during the historical rainfall event period and the regional average rainfall during the current rainfall event period. The specific expression is: Criterion difference degree = Regional average rainfall during the historical rainfall event period - Regional average rainfall during the current rainfall event period.

[0038] The allowable threshold range for the degree of difference corresponding to each environmental condition criterion is determined comprehensively based on the crop type, farmland surface conditions, and local meteorological conditions of the study area. Preferably, when the environmental condition criterion is the crop phenological stage, the corresponding allowable threshold range for degree of difference is [-150℃·d, +150℃·d]; when the environmental condition criterion is field cultivation management measures, the corresponding allowable threshold range for degree of difference is [-7d, +7d]; and when the environmental condition criterion is seasonal meteorological background conditions, the corresponding allowable threshold range for degree of difference is [-10mm, +10mm].

[0039] Specifically, in the preset period matching judgment rules, period matching does not refer to mechanical calendar alignment according to Gregorian calendar year, month, and quarter.

[0040] When performing period matching, for each historical rainfall-runoff data point, the criterion difference degree is calculated according to the difference quantification calculation method corresponding to each environmental condition criterion. When the criterion difference degree of each environmental condition criterion of the historical rainfall event is within the allowable difference threshold range corresponding to that environmental condition criterion, the time series pollution concentration data in that historical rainfall-runoff data point is selected as the historical time series pollution concentration data. If the criterion difference degree of any environmental condition criterion is outside the allowable difference threshold range corresponding to that environmental condition criterion, the historical rainfall-runoff data point is excluded and does not participate in the subsequent model fitting.

[0041] The specific content of the historical rainfall-runoff data is determined based on the configured environmental condition criteria and modeling requirements, including but not limited to: time-series pollution concentration data, cumulative crop growth temperature during historical rainfall events, key timings of historical rainfall events, and regional average rainfall during the historical rainfall event periods. Key timings of historical rainfall events include, but are not limited to: fertilization and irrigation times.

[0042] Historical time series pollution concentration data includes, but is not limited to: multiple sets of historical data pairs, each set of historical data pairs including: historical time, and the measured historical pollution concentration corresponding to that historical time.

[0043] The technical purpose of setting the period matching judgment rule in this application is that the release and output patterns of non-point source pollutants from farmland are highly dependent on crop growth status, field agricultural activities, and rainfall characteristics. Only historical rainfall events whose criterion difference degree corresponding to the environmental condition criteria meets the constraints of the allowable threshold range of each difference degree can effectively characterize the pollutant change trend of the current rainfall event, ensuring that the subsequent time and concentration change rate model has reference value for the current rainfall sampling planning. For example, if the rainfall event to be monitored occurs in farmland after spring sowing and fertilization, multiple historical rainfall runoff data in the study area in which the criterion difference degree of each environmental condition criterion meets the corresponding allowable threshold range of difference degree are obtained, and historical time series pollution concentration data are extracted from them.

[0044] Furthermore, the sub-steps for constructing a time-concentration change rate model based on historical time-series pollution concentration data are as follows: S111: Extract at least ten pairs of historical data from historical time series pollution concentration data. Each pair of historical data includes: historical time and the measured historical pollution concentration corresponding to that historical time.

[0045] Specifically, the number of historical data pairs extracted can be determined comprehensively based on the total amount of historical monitoring data available in the study area and the noise level of the monitoring data; it only needs to meet the requirement of being able to complete a cubic polynomial fitting solution and ensuring the stability of the time and concentration fitting model obtained. This application preferably extracts at least ten sets of historical data pairs, which can reduce the risk of fitting distortion caused by noise and improve the robustness of the model.

[0046] S112: Construct an initial time-concentration fitting model using a cubic polynomial, and solve for the fitting coefficients of the initial time-concentration fitting model based on historical data.

[0047] Specifically, the initial time and concentration fitting model is only determined to be in the form of a polynomial equation, and its fitting coefficients are unknowns.

[0048] Furthermore, the expression for the fitting coefficients of the initial time versus concentration fitting model is as follows: ; in, To follow the historical time Changes in historical pollution concentrations; represents the fitting coefficient.

[0049] Specifically, for a given set of historical data pairs, a unique set of fixed fitting coefficients can be obtained. When the input historical data changes, the obtained fitting coefficients are calculated. It will change accordingly.

[0050] S113: Substitute the fitting coefficients of the initial time-concentration fitting model into the initial time-concentration fitting model to obtain the time-concentration fitting model.

[0051] Furthermore, the expression for the time-concentration fitting model is as follows: ; in, To follow the time of this rainfall process The simulated pollution concentration changes; represents the fitting coefficient.

[0052] S114: Differentiate the time-concentration fitting model to obtain the time-concentration change rate model.

[0053] Furthermore, the expression for the time versus concentration change rate model is as follows: ; in, To follow the time of this rainfall process The rate of change of pollution concentration; To follow the time of this rainfall process The simulated pollution concentration changes.

[0054] Specifically, This is used to characterize the rate of change of simulated pollution concentration per unit time during this rainfall event. This is an expression for first-order differentiation. Because... This is a constant term and will not appear again after differentiation. In the expression, the expression for the time versus concentration change rate model can also be: .

[0055] S12: Determine the sampling time length based on the time and concentration change rate model, and divide the sampling time length into intervals to obtain multiple time intervals.

[0056] Furthermore, the sub-steps of step S12 are as follows: S121: Set a pollution concentration change rate threshold, substitute this pollution concentration change rate threshold into the time and concentration change rate model for back-calculation and solution, and obtain the sampling start time and sampling end time. The sampling time length is determined by the sampling start time and sampling end time.

[0057] Furthermore, the sub-steps of step S121 are as follows: S1211: Set a threshold for the rate of change of pollution concentration, substitute this threshold into the time and concentration change rate model for back-calculation and solve to obtain multiple candidate time solutions.

[0058] Specifically, the pollution concentration change rate threshold is selected based on the type of pollutant to be monitored, historical experience in non-point source pollution monitoring, and preset monitoring accuracy requirements. Different pollution concentration change rate thresholds are configured for different pollutants. It is a positive number greater than 0. As a preferred embodiment, when the pollutant to be monitored is total phosphorus, the pollutant concentration change rate threshold is preferably 0.5 mg / (L·h); when the pollutant to be monitored is total nitrogen, the pollutant concentration change rate threshold is preferably 2 mg / (L·h).

[0059] Furthermore, the established pollution concentration change rate threshold is substituted into the time and concentration change rate model for back-calculation and solution. The back-calculation and solution formula is as follows: ; in, To follow the time of this rainfall process The absolute value of the rate of change of the pollution concentration.

[0060] Specifically, because pollution concentrations both increase and decrease during rainfall, Since the value can be positive or negative, an absolute value is needed to characterize the drastic change in pollution concentration. A root-finding operation is performed on the inverse solution formula to obtain multiple candidate time solutions; these candidate time solutions are the time variables obtained from the inverse solution formula. The solution is that each candidate time solution corresponds to a moment in the rainfall process.

[0061] S1212: Screen multiple candidate time solutions. Discard candidate time solutions with imaginary roots, times shorter than the start time of the rainfall or times longer than the end time of the rainfall as invalid candidate time solutions. Keep candidate time solutions with real numbers and times within the time range of the rainfall process as valid candidate time solutions.

[0062] S1213: Sort all valid candidate time solutions in chronological order; among the sorted valid candidate time solutions, The first time the pollution concentration change rate threshold has been reached The corresponding time is taken as the sampling start time; Finally, it fell back to the pollution concentration change rate threshold. The corresponding time is taken as the sampling end time.

[0063] S1214: The sampling time length is calculated by subtracting the sampling start time from the sampling end time.

[0064] S122: Divide the sampling time length into multiple time intervals.

[0065] Specifically, the total number of time intervals and the time interval between each time interval are determined based on the degree of change in pollution concentration and the preset monitoring accuracy requirements; the preferred total number of time intervals in this application is 5 to 10.

[0066] Furthermore, the sampling time length can be divided into multiple time intervals in either an equal or unequal manner.

[0067] The equal division is defined as: the sampling time length is evenly distributed into multiple time intervals, and the time intervals of each time interval are equal.

[0068] Unequal division is defined as: a pre-set interval division threshold. ,Will Interval division threshold The comparison is performed when the time segment X within the sampling time length satisfies... > The pollution concentration in time segment X was determined to change drastically, and a time interval was configured. When the time segment X within the sampling time length satisfies The pollution concentration in time segment X was determined to be relatively stable, and a time interval was configured accordingly. ,in, .

[0069] Specifically, the interval division threshold The specific value can be selected according to the type of pollutant to be monitored and the preset monitoring accuracy requirements, and the threshold for interval division. Greater than or equal to the pollution concentration change rate threshold As a preferred embodiment, when the pollutant to be monitored is total phosphorus, the set interval division threshold is... The preferred value is 0.8 mg / (L·h); when the pollutant to be monitored is total nitrogen, the set interval division threshold is... The preferred concentration is 3 mg / (L·h).

[0070] Furthermore, the first The expression for each time interval is: ;in, For the first The starting point of a time interval; For the first The endpoint of a time interval; , The total number of time intervals. for The total number of time points corresponding to each time interval.

[0071] Specifically, time nodes include the start and end points of each time interval.

[0072] S13: Calculate the sampling frequency for each time interval using multiple time intervals and a time-concentration change rate model.

[0073] Furthermore, the sub-steps of step S13 are as follows: S131: For each time interval, perform definite integral processing on the time and concentration change rate model to obtain the cumulative change in pollution concentration for each time interval.

[0074] Furthermore, the first The expression for the cumulative change in pollution concentration corresponding to each time interval is: ; in, For the first The cumulative change in pollution concentration corresponding to each time interval For the first The time interval of each time interval ; For the first The starting point of a time interval; For the first The endpoint of a time interval; , The total number of time intervals. for The total number of time points corresponding to each time interval; To follow the time of this rainfall process The rate of change in pollution concentration. .

[0075] S132: Calculate the total cumulative change in pollution concentration over the sampling period based on the cumulative change in pollution concentration corresponding to each time interval.

[0076] Furthermore, the total cumulative change over the sampling time period is: ; in, This represents the total cumulative change over the sampling time period. For the first The cumulative change in pollution concentration corresponding to each time interval , The total number of time intervals. for The total number of time points corresponding to each time interval.

[0077] S133: Based on the proportion of the cumulative change in pollution concentration in each time interval to the total cumulative change in the sampling time, and combined with the preset total number of sampling bottles, allocate the number of samples for each time interval.

[0078] Furthermore, the first The expression for the number of samples in each time interval is: ; in, For the first Number of samples per time interval; This represents the total cumulative change over the sampling time period. For the first The cumulative change in pollution concentration corresponding to each time interval , The total number of time intervals. for The total number of time points corresponding to each time interval; This represents the total number of sampling bottles.

[0079] Specifically, the total number of sampling bottles The total number of sampling bottles is determined by a combination of three factors: available sampling bottle hardware resources at the sampling site, sampling time duration, and required monitoring accuracy. The lower the tolerance threshold for monitoring results, the greater the number of sampling bottles required. The more; when the number of sampling bottle hardware available for use on-site is insufficient, the total number of sampling bottles configured will be increased. The number should be reduced accordingly. Preferably, the total number of sampling bottles should be reduced. The value range is 12 to 48, and it is further optimized. =24.

[0080] S134: Calculate the sampling frequency of each time interval using the number of samples and the time interval for each time interval.

[0081] Furthermore, the first The expression for the sampling frequency of each time interval is: ; in, For the first Sampling frequency for each time interval , The total number of time intervals. for The total number of time points corresponding to each time interval; For the first Number of samples per time interval; For the first The time interval of each time interval ; For the first The starting point of a time interval; For the first The endpoint of a time interval.

[0082] S14: Based on the sampling frequency of each time interval, the sampling timing is determined. At the sampling timing, rainfall runoff is intelligently collected to obtain discrete runoff samples and runoff volume data. Pollutant detection is performed on the discrete runoff samples to obtain the measured pollution concentration. The sampling timing and the measured pollution concentration and runoff volume data at that sampling timing are used as monitoring sample data.

[0083] Furthermore, as one embodiment, the method for determining the sampling timing based on the sampling frequency of each time interval is as follows: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] Sampling frequency of each time interval Taking the reciprocal, we get the first... Sampling interval within each time interval , ; with the first The starting point of each time interval As the starting time, according to the sampling interval time By recursively calculating backwards, multiple discrete moments are generated, and all discrete moments are taken as the first... The sampling timings corresponding to each sampling operation within a time interval; all sampling timings are within the corresponding time intervals. Within the time frame.

[0084] Specifically, intelligent collection of rainfall runoff based on sampling timing can further improve the controllability of sampling time and sampling accuracy.

[0085] As one example, an automatic sampler is controlled at the sampling time to intelligently collect rainfall runoff, thereby obtaining discrete runoff samples and runoff volume data.

[0086] Furthermore, the specific method for obtaining the measured pollution concentration by detecting pollutants in discrete runoff samples can be determined according to the type of pollutant to be detected and the monitoring specifications. For example, at least one of spectrophotometry, flow injection analysis, and ion chromatography can be used to obtain the measured pollution concentration. This application does not make any specific limitations on this.

[0087] S2: Input the monitoring sample data into the pre-built LSTM interpolation model, and the LSTM interpolation model outputs optimized sample data.

[0088] Specifically, using the LSTM interpolation model to interpolate the monitoring sample data can yield continuous and optimized sampling sample data that conforms to physical laws.

[0089] The LSTM interpolation model is constructed using the existing Long Short-Term Memory (LSTM) network framework and is trained using an optimized loss function that includes a regression loss term, a mass conservation constraint term, and a concentration change rate constraint term.

[0090] Furthermore, as an example, the sub-step of pre-constructing the LSTM interpolation model is as follows: S21: Set physical constraints; among which, physical constraints include: mass conservation constraints and concentration change rate constraints.

[0091] Furthermore, the expression for the mass conservation constraint term is: ; in, This is a mass conservation constraint term; The time step number. , Output the total number of time steps for the interpolated time series; For the initial interpolation model in the th The runoff output at each time step; For the initial interpolation model in the th The pollution concentration output at each time step; The time interval between adjacent time steps; For the initial interpolation model in the th Measured runoff at each time step; For the initial interpolation model in the th The measured pollution concentration at each time step.

[0092] Furthermore, the expression for the concentration change rate constraint term is: ; in, This is a constraint term based on the rate of change of concentration. This represents the highest historical rate of concentration change.

[0093] Specifically, the water quality data were obtained from statistical analysis of measured time-series water quality data from multiple historical rainfall and runoff events in the study area. Specifically, this involves: determining the absolute value of the rate of change of pollutant concentration between adjacent sampling times in historical measured samples, and then performing quantile statistics. , It is used to characterize the maximum rate of change of pollutant concentration per unit time during real rainfall runoff, and to constrain the model output to avoid concentration abrupt changes that are impossible in reality.

[0094] S22: Construct training samples based on historical sampling data, and divide the training samples into a first training set and a second training set according to a preset sample division ratio.

[0095] Specifically, the preset sample division ratio is selected based on the total amount and richness of data in the study area. In this application, the preferred ratio is: first training set: second training set = 7:3.

[0096] Historical sampling data can be pre-collected historical rainfall event sampling data, or historical time series pollution concentration data that matches the current sampling period according to the period matching judgment rules; among them, historical sampling data includes, but is not limited to, time series monitoring data of runoff and pollution concentration collected synchronously under multiple historical rainfall and runoff events in the study area.

[0097] S23: Construct an interpolation model framework based on a Long Short-Term Memory (LSTM) network and set an initial loss function for the interpolation model framework.

[0098] Furthermore, the initial loss function is the mean squared error (MSE), and the expression for the initial loss function of the interpolation model framework is as follows: ; in, This is the initial loss function for the interpolation model framework; For the first The measured pollution concentration values ​​corresponding to the training samples used in the loss calculation; For the interpolation model framework, the first The model outputs a predicted pollution concentration value by using training samples that participate in the loss calculation. , This represents the total number of training samples.

[0099] S24: Train the interpolation model framework using the first training set to obtain the initial interpolation model.

[0100] Specifically, the first training set is input into the interpolation model framework, the initial loss function is used as the loss evaluation criterion, and the existing neural network training method is adopted. The trainable weight parameters inside the interpolation model framework (such as the input weights, forget gate weights, output weights and fully connected layer weights of LSTM units) are iteratively updated through the backpropagation algorithm until the model training converges, and the initial interpolation model is obtained.

[0101] S25: The mass conservation constraint and the concentration change rate constraint are superimposed on the initial loss function to obtain the optimized loss function.

[0102] Furthermore, the expression for optimizing the loss function is as follows: ; in, To optimize the loss function; This is the initial loss function for the interpolation model framework; This is a mass conservation constraint term; This is a constraint term for the rate of change of concentration.

[0103] S26: Using the second training set and an optimized loss function, the initial interpolation model is iteratively trained to obtain the LSTM interpolation model.

[0104] Specifically, the second training set is input into the initial interpolation model, and the optimized loss function is used as the basis for loss evaluation. The existing neural network training method is adopted, and the trainable weight parameters inside the initial interpolation model are iteratively updated through the backpropagation algorithm until the model training converges, thus obtaining the final LSTM interpolation model, and saving all trainable parameters of the model.

[0105] S3: Construct a concentration-flow regression model based on optimized sample data.

[0106] Furthermore, the sub-steps of step S3 are as follows: S31: The initial concentration and flow regression model is constructed using a cubic polynomial.

[0107] Furthermore, the expression for the initial concentration versus flow regression model is as follows: ; in, The pollution concentration output by the model; This refers to runoff; These are all the fitting coefficients to be solved in the initial concentration and flow regression model.

[0108] S32: Using optimized sample data, the least squares method is used to fit and solve the initial concentration and flow regression model to obtain the values ​​of the fitting coefficients to be solved in the initial concentration and flow regression model; the values ​​of the fitting coefficients to be solved are substituted back into the initial concentration and flow regression model to obtain the concentration and flow regression model.

[0109] Specifically, the optimized sampling data includes multiple sampling times and the measured pollution concentration and runoff data at each sampling time; the measured pollution concentration at each sampling time is used as... The value is used as the runoff data at the sampling time. Substituting the value of into the initial concentration and flow rate regression model, we obtain the solution. The value of ,Will Substituting back into the initial concentration and flow rate regression model, we obtain the concentration and flow rate regression model.

[0110] Furthermore, the expression for the concentration-flow regression model is as follows: ; in, The pollution concentration output by the model; This refers to runoff; All are the fitting coefficients of the concentration-flow regression model.

[0111] S4: Collect time-series data of runoff in the study area as a function of time, input the runoff data at each time point in the time-series data into the concentration-flow regression model to obtain the pollution concentration at the corresponding time point; calculate the agricultural non-point source pollution load based on the pollution concentration.

[0112] Furthermore, as one embodiment, the sub-step of step S4 is as follows: S41: Collect time-series data of runoff in the study area as it changes over time. Input the runoff data at each time point in the time-series data into the concentration and flow regression model to obtain the pollution concentration at the corresponding time point. Combine the runoff data and pollution concentration at the same time point into a data pair.

[0113] S42: Based on data pairs, the discrete summation algorithm is used to calculate the agricultural non-point source pollution load.

[0114] Furthermore, based on data pairs, the expression for calculating agricultural non-point source pollution load using the discrete summation algorithm is as follows: ; in, Agricultural non-point source pollution load for a single rainfall event; This is the unit conversion factor; The first in the time series data of runoff The pollution concentration at a given time is calculated using a concentration-flow regression model based on the runoff data at that time. The first in the time series data of runoff Runoff data at any given time; The time interval between adjacent data pairs in the runoff time series data. , For the first time, For the first time, , This represents the total number of moments in the runoff time series data. This represents the total number of time intervals between adjacent data pairs in the runoff time series data, i.e., the total number of summation terms.

[0115] Specifically, The calibration constant is determined based on the conversion relationship between the units of flow, concentration, and pollution load used in watershed hydrological monitoring, and is preferably adapted to the conventional hydrological unit system of small and medium-sized watersheds.

[0116] Furthermore, as another embodiment, the sub-step of step S4 is as follows: S41': Obtain daily runoff statistics for the study area sorted by collection date. Each daily runoff statistics report includes the daily runoff volume.

[0117] S42': Input the daily runoff flow rate into the concentration and flow rate regression model to obtain the corresponding pollution concentration for that day.

[0118] S43': Based on the pollution concentration of the day, call the pre-built daily-scale pollution load calculation algorithm to calculate the daily agricultural non-point source pollution load.

[0119] Furthermore, the expression for the pre-constructed daily-scale pollution load calculation algorithm is as follows: ; in, This represents the daily agricultural non-point source pollution load. This is the unit conversion factor; The pollution concentration is calculated from the daily runoff flow using a concentration-flow regression model. This refers to daily runoff volume; The duration of the day.

[0120] S44': Sort and sum the daily agricultural non-point source pollution loads according to the collection date to obtain the agricultural non-point source pollution load.

[0121] The beneficial effects achieved by this application are as follows: (1) This application enables adaptive dynamic sampling of rainfall runoff, making reasonable use of limited sampling hardware resources. Specifically, it constructs a time-concentration change rate model based on historical time-series pollution concentration data matching the current sampling period, divides time intervals according to the severity of pollution concentration changes, allocates the number of samples and calculates the sampling frequency based on the cumulative change in pollution concentration in each time interval. The sampling frequency is increased during periods of severe pollution concentration changes and decreased during periods of moderate concentration changes. Under the hardware constraint of a limited number of sampling bottles, this effectively avoids the risk of missing pollution peaks during rainfall and reduces invalid sampling during periods of moderate change, fully exploring the pollution information carried by the limited sampled samples.

[0122] (2) This application introduces dual physical constraints to carry out interpolation processing, reducing the calculation error of subsequent modeling. Specifically, the loss function of the LSTM interpolation model is set with both mass conservation constraint term and concentration change rate constraint term, so that the optimized sampling sample output by interpolation not only fits the actual measured monitoring sample data, but also conforms to the real physical evolution law of runoff pollution, suppresses the concentration mutation phenomenon that is impossible to occur in reality in the model output, reduces the data distortion caused by simple statistical interpolation, and provides a high-quality data foundation for the construction of subsequent concentration and flow regression models.

[0123] (3) The concentration and flow regression model of this application can be adapted to two types of accounting scenarios, reducing the threshold for the implementation of non-point source pollution assessment in small and medium watersheds. Specifically, the concentration and flow regression model based on the cubic polynomial form constructed by optimizing the sampling sample can accurately depict the nonlinear relationship between flow and pollution concentration during the runoff process. It can support high-frequency time-series runoff input to complete the refined load accounting of a single rainfall event, and can also use publicly available daily runoff statistics to carry out long-term load accumulation calculations without the need for continuous high-frequency water quality monitoring. This facilitates the assessment of agricultural non-point source pollution in small and medium watersheds with limited monitoring conditions, and supports the implementation of watershed pollution control work.

[0124] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the scope of protection of this application is intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application. Obviously, those skilled in the art can make various alterations and variations to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of protection of this application and its equivalents, this application also intends to include these modifications and variations.

Claims

1. A method for intelligent collection and load calculation of agricultural non-point source pollution, characterized in that, Includes the following steps: S1: Based on the dynamic planning of the sampling frequency during this sampling period, intelligent collection of rainfall runoff is carried out according to the sampling frequency to obtain monitoring sample data; S2: Input the monitoring sample data into the pre-built LSTM interpolation model, and the LSTM interpolation model outputs optimized sample data; S3: Construct a concentration-flow regression model based on optimized sample data; S4: Collect time-series data of runoff in the study area as a function of time, input the runoff data at each time point in the time-series data into the concentration-flow regression model to obtain the pollution concentration at the corresponding time point; calculate the agricultural non-point source pollution load based on the pollution concentration.

2. The intelligent data collection and load calculation method for agricultural non-point source pollution according to claim 1, characterized in that, The sub-steps of step S1 are: S11: Using the current sampling period as a reference, perform period matching to obtain historical time series pollution concentration data that matches the current sampling period, and construct a time-concentration change rate model based on the historical time series pollution concentration data; S12: Determine the sampling time length based on the time and concentration change rate model, and divide the sampling time length into intervals to obtain multiple time intervals; S13: Calculate the sampling frequency for each time interval using multiple time intervals and a time-concentration change rate model; S14: Based on the sampling frequency of each time interval, the sampling timing is determined. At the sampling timing, rainfall runoff is intelligently collected to obtain discrete runoff samples and runoff volume data. Pollutant detection is performed on the discrete runoff samples to obtain the measured pollution concentration. The sampling timing and the measured pollution concentration and runoff volume data at that sampling timing are used as monitoring sample data.

3. The intelligent data collection and load calculation method for agricultural non-point source pollution according to claim 2, characterized in that, The sub-steps for constructing a time-concentration change rate model based on historical time-series pollution concentration data are as follows: S111: Extract at least ten pairs of historical data from historical time series pollution concentration data. Each pair of historical data includes: historical time and the measured historical pollution concentration corresponding to that historical time. S112: The initial time and concentration fitting model is constructed using a cubic polynomial, and the fitting coefficients of the initial time and concentration fitting model are solved based on historical data. S113: Substitute the fitting coefficients of the initial time and concentration fitting model into the initial time and concentration fitting model to obtain the time and concentration fitting model; S114: Differentiate the time-concentration fitting model to obtain the time-concentration change rate model; The expression for the time versus concentration change rate model is as follows: ; in, To follow the time of this rainfall process The rate of change of pollution concentration; To follow the time of this rainfall process The simulated pollution concentration changes.

4. The intelligent data collection and load calculation method for agricultural non-point source pollution according to claim 2, characterized in that, The sub-steps of step S12 are as follows: S121: Set a pollution concentration change rate threshold, substitute the pollution concentration change rate threshold into the time and concentration change rate model for back-calculation and solution, and obtain the sampling start time and sampling end time. The sampling time length is determined by the sampling start time and sampling end time. S122: Divide the sampling time into multiple time intervals.

5. The intelligent collection and load calculation method for agricultural non-point source pollution according to claim 2, characterized in that, The sub-steps of step S13 are as follows: S131: For each time interval, perform definite integral processing on the time and concentration change rate model to obtain the cumulative change in pollution concentration for each time interval; S132: Calculate the total cumulative change in pollution concentration over the sampling time period based on the cumulative change in pollution concentration corresponding to each time interval; S133: Based on the proportion of the cumulative change in pollution concentration in each time interval to the total cumulative change in the sampling time, and combined with the preset total number of sampling bottles, allocate the number of samples for each time interval. S134: Calculate the sampling frequency of each time interval using the number of samples and the time interval for each time interval.

6. The intelligent data collection and load calculation method for agricultural non-point source pollution according to claim 2 or 5, characterized in that, No. The expression for the sampling frequency of each time interval is: ; in, For the first Sampling frequency for each time interval , The total number of time intervals. for The total number of time points corresponding to each time interval; For the first Number of samples per time interval; For the first The time interval of each time interval ; For the first The starting point of a time interval; For the first The endpoint of a time interval.

7. The intelligent data collection and load calculation method for agricultural non-point source pollution according to claim 1, characterized in that, The sub-steps for pre-building the LSTM interpolation model are as follows: S21: Set physical constraints; among which, physical constraints include: mass conservation constraints and concentration change rate constraints; S22: Construct training samples based on historical sampling data, and divide the training samples into the first training set and the second training set according to the preset sample division ratio; S23: Construct an interpolation model framework based on a long short-term memory network, and set an initial loss function for the interpolation model framework; S24: Train the interpolation model framework using the first training set to obtain the initial interpolation model; S25: The mass conservation constraint and the concentration change rate constraint are superimposed on the initial loss function to obtain the optimized loss function; S26: Using the second training set and an optimized loss function, the initial interpolation model is iteratively trained to obtain the LSTM interpolation model.

8. The intelligent collection and load calculation method for agricultural non-point source pollution according to claim 1, characterized in that, The sub-steps of step S3 are as follows: S31: A regression model of initial concentration and flow rate is constructed using a cubic polynomial. S32: Using optimized sample data, the least squares method is used to fit and solve the initial concentration and flow regression model to obtain the values ​​of the fitting coefficients to be solved in the initial concentration and flow regression model; the values ​​of the fitting coefficients to be solved are substituted back into the initial concentration and flow regression model to obtain the concentration and flow regression model. The expression for the concentration-flow regression model is as follows: ; in, The pollution concentration output by the model; This refers to runoff; All are the fitting coefficients of the concentration-flow regression model.

9. The intelligent collection and load calculation method for agricultural non-point source pollution according to claim 1, characterized in that, The sub-steps of step S4 are as follows: S41: Collect time-series data of runoff in the study area as it changes over time, input the runoff data at each time point in the time-series data into the concentration and flow regression model to obtain the pollution concentration at the corresponding time point, and combine the runoff data and pollution concentration at the same time point into a data pair. S42: Based on data pairs, the discrete summation algorithm is used to calculate the agricultural non-point source pollution load.

10. An intelligent system for collecting and calculating agricultural non-point source pollution, characterized in that, This includes memory, input devices, output devices, and processors; The memory is used to store computer program instructions, as well as monitoring sample data, period matching judgment rules, LSTM interpolation models, optimized sampling sample data, fitting coefficients of concentration and flow regression models, runoff time series data, and daily runoff statistics. Input devices are used to receive historical time-series pollution concentration data and runoff monitoring data. Output device, used to output sampling timing and agricultural non-point source pollution load; The processor calls computer program instructions stored in the memory to execute the intelligent collection and load calculation method for agricultural non-point source pollution as described in any one of claims 1-9.