Runoff process-oriented watershed water quality variable frequency sampling method and device
By combining LSTM and NRCS-CN models to predict runoff processes and using the Kalman filter algorithm to dynamically adjust the sampling frequency and time point, the problem of data loss caused by fixed sampling frequency in watershed water quality monitoring is solved, and efficient and accurate water quality change monitoring is achieved.
Patent Information
- Application Number
- CN202510556375.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-04-29
AI Technical Summary
Existing technologies cannot flexibly adjust sampling frequency in watershed water quality monitoring, resulting in missing key data. Furthermore, traditional methods cannot collect water samples reasonably at different stages of runoff, making it difficult to fully reflect dynamic changes in water quality.
A watershed water quality frequency conversion sampling method oriented towards runoff processes is adopted. By combining a long short-term memory network model and a natural resource conservation service curve number model, runoff forecast data is predicted. The ensemble Kalman filter algorithm is used to assimilate hydrological observation data, and the sampling time point and frequency are dynamically set.
It improves the efficiency and accuracy of water sampling, can dynamically respond to changes in water quality during runoff, avoids invalid sampling, and ensures sample collection during critical periods.
Smart Images

Figure CN120102828B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of hydrological and water environment monitoring, and in particular to a frequency-variable sampling method and device for watershed water quality in a runoff process. Background Art
[0002] In the fields of environmental monitoring, hydrology, and water resources, accurate monitoring of river basin water quality is of great significance. Especially during heavy rainfall during the flood season, river basin water quality (such as total phosphorus (TP) and total nitrogen (TN)) exhibits dramatic dynamic changes during different stages of the runoff process (e.g., rising and falling phases), influenced by rainfall intensity and pre-existing underlying surface conditions. Therefore, efficient methods for monitoring river basin water quality changes are needed to accurately reflect these changes.
[0003] However, existing technologies for monitoring watershed water quality often rely on traditional fixed-frequency sampling or flow-proportional sampling. Traditional fixed-frequency sampling (with a fixed sampling time) is unable to flexibly adjust to the rapid changes in water quality during runoff, often resulting in significant loss of critical data. Flow-proportional sampling, however, limits the maximum number of samples per rainfall period due to the uncertainty of the runoff process and the number of bottles in the automatic sampler (typically 24). This makes it difficult to rationally collect water samples at different critical stages of the runoff, making it difficult to fully reflect the dynamic changes in water quality during the precipitation-runoff process. Therefore, to improve the efficiency of water sampling, accurate and timely forecasts of the precipitation-runoff process are necessary. However, because conceptual precipitation-runoff models require extensive observational data to determine parameters and reduce uncertainty, physical process models have limitations in predicting real-time flood runoff processes.
[0004] Therefore, when water quality changes rapidly during runoff, how to improve the efficiency of water sample collection and the accuracy of collected samples in reflecting water quality changes is a technical problem that needs to be solved at present. Summary of the Invention
[0005] The present application provides a variable-frequency sampling method and device for water quality in a watershed during runoff, which can solve the technical problems that need to be solved in the prior art, such as how to improve the efficiency of water sample collection and the accuracy of the collected samples in reflecting the changes in water quality when the water quality changes rapidly during runoff.
[0006] This application provides a variable frequency sampling method for water quality in a watershed for runoff processes, including:
[0007] Obtain historical runoff observation data, precipitation data and current hydrological observation data of the basin to be monitored;
[0008] predict runoff forecast data during the entire precipitation period by a preset runoff prediction model, in combination with the hydrological observation data at the current moment and the precipitation data; the runoff prediction model is obtained by coupling a long short-term memory network model and a natural resources conservation service curve number model;
[0009] assimilate the hydrological observation data at the current moment into the runoff forecast data by a ensemble Kalman filtering algorithm;
[0010] determine sampling time points of the runoff forecast data corresponding to different runoff stages during the precipitation period by a piecewise sampling method, in combination with the assimilated runoff forecast data;
[0011] when the water level of the to-be-monitored watershed reaches a preset trigger water level, sample the to-be-monitored watershed according to the sampling time points to obtain sampling data, and calculate water quality indexes and confidence intervals of the entire runoff process according to the sampling data; wherein the preset trigger water level is determined and obtained according to the historical runoff observation data.
[0012] Compared with the prior art, the embodiments of the present application have the following beneficial effects: when facing or about to face the runoff process during the precipitation period, the long short-term memory network model and the natural resources conservation service curve number model with fewer calculation parameters are used to predict the runoff forecast data during the entire precipitation period, and then a small amount of actually collected water level observation data is used to assimilate the runoff forecast data according to the collected water level observation data, thereby improving the prediction accuracy of the runoff forecast data. Further, when the water level of the to-be-monitored watershed reaches the preset trigger water level, the dynamic change of the water level during the entire precipitation period can be obtained according to the accurately predicted runoff forecast data, so that the sampling frequency and the sampling time points at different time periods during the precipitation period can be reasonably and dynamically set according to the accurate water level change, thereby avoiding ineffective sampling operations, improving the sampling efficiency, and enabling the collected samples to more accurately reflect the change of the water quality during the runoff process.
[0013] Further, the prediction of the runoff forecast data during the entire precipitation period by the preset runoff prediction model, in combination with the hydrological observation data at the current moment and the precipitation data, comprises:
[0014] The precipitation data comprises historical precipitation intensity data and precipitation forecast data corresponding to the entire precipitation period.
[0015] According to the historical precipitation intensity data, a unit line flow function under a preset precipitation intensity is obtained, and according to the unit line flow function under the preset precipitation intensity, a unit line flow function under an arbitrary precipitation intensity is determined.
[0016] The hydrological observation data and the precipitation forecast data are input into a preset long short-term memory network model to obtain a net rainfall.
[0017] The net rainfall is input into a preset natural resource protection service curve model, and combined with the unit line stream function under any precipitation intensity to predict the runoff forecast data.
[0018] Compared with the existing technology, the above embodiment has the following beneficial effects: the long short-term memory network model (LSTM) is good at capturing the long-term dependencies of time series, while the natural resource conservation service curve model (NRCS-CN) has the advantages of fewer parameters and wider applicability. Combining the two solves the problems of high parameter uncertainty and high computing power requirements of traditional conceptual models, thereby improving computing efficiency; through the input of precipitation forecast data and historical intensity data, the entire runoff prediction model can dynamically respond to real-time precipitation changes, overcome the dependence of pure physical models on a large amount of measured data, improve the flexibility of prediction, and at the same time achieve the complementarity of multi-time scale information to ensure the accuracy of the prediction results.
[0019] Furthermore, the obtaining of a unit line stream function at a preset precipitation intensity based on the historical precipitation intensity data, and determining a unit line stream function at any precipitation intensity based on the unit line stream function at the preset precipitation intensity, includes:
[0020] The steps for obtaining the unit line stream function under any precipitation intensity are specifically as follows:
[0021]
[0022]
[0023]
[0024] in, Represents any precipitation intensity The unit line stream function under ; Represents the preset precipitation intensity The unit line stream function under ; Represents the calculation of any precipitation intensity using the unit line stream function under the preset precipitation intensity The time variable mapping function required when the unit line stream function is below; and Respectively represent Peak value and peak time; and represents the power function coefficient obtained by power function fitting; and represents the power function exponent obtained by power function fitting; The catchment area of the preset node in the watershed to be monitored; For in time Time, by the intensity of precipitation caused by the cumulative runoff; is a time variable.
[0025] Compared with the prior art, the above-mentioned embodiments have the following beneficial effects: due to the limited amount of actual observation data, the unit line flow function under any precipitation intensity cannot be fitted by historical data, therefore, the unit line flow function under a small amount of known precipitation intensity is fitted by a small amount of historical data, and then the unit line flow function under any precipitation intensity is determined according to the unit line flow function under a small amount of known precipitation intensity, thereby effectively solving the problem that the pure physical model depends on a large amount of measured data, and reducing the required computing power demand for data fitting.
[0026] Further, the net rainfall is input into a preset natural resource conservation service curve number model, and the unit line flow function under any precipitation intensity is combined to predict the runoff prediction data, including:
[0027] According to the net rainfall, the curve number value corresponding to the precipitation period of the runoff prediction data is calculated;
[0028] According to the curve number value, the potential maximum retention amount of precipitation is calculated, and the cumulative effective precipitation amount is calculated according to the maximum retention amount;
[0029] According to the cumulative effective precipitation amount, the effective precipitation intensity function with time as a variable is determined;
[0030] According to the effective precipitation intensity function and the unit line flow function under any precipitation intensity, the runoff prediction data is obtained by convolution integration.
[0031] Compared with the prior art, the above-mentioned embodiments have the following beneficial effects: the precipitation prediction data is processed by LSTM to obtain the net rainfall in the entire rainfall period in advance, the net rainfall is used as an intermediate variable, the output of the subsequent NRCS-CN model can be corrected in combination with the predicted data in advance, the problem that the NRCS-CN model is sensitive to the initial conditions is alleviated, thereby the effective precipitation intensity changing with time is accurately estimated; when the accurate effective precipitation intensity function is known, the unit line flow function under any precipitation intensity is combined to obtain the accurate runoff prediction data by convolution integration.
[0032] Further, the calculation formula of the runoff prediction data specifically includes:
[0033]
[0034]
[0035]
[0036]
[0037]
[0038] wherein, is a curve value; is a precipitation amount; is a net rainfall amount; is a watershed initial interception ratio of a watershed to be monitored; represents a cumulative effective precipitation amount is a time variable derivation; is an effective precipitation intensity function with time as a variable; is a cumulative precipitation amount in precipitation forecast data; is an initial interception amount; is a potential maximum retention amount of precipitation, which is obtained according to is direct runoff forecast data; is base flow data; is runoff forecast data; is a catchment area of a preset node of a watershed to be monitored; is a convolution integral process, wherein is a unit line flow function; is a time variable.
[0039] Compared with the prior art, the above-mentioned embodiment has the following beneficial effects: when performing final runoff forecast data calculation, by considering direct runoff and base flow, the composition of runoff can be more accurately simulated, which helps to consider more comprehensive pollutant sources such as surface runoff and groundwater when collecting samples subsequently, thereby improving the accuracy of sampling results; further, by convolution calculation, the process of precipitation and runoff conversion is dynamically simulated, and the accuracy of prediction results is improved.
[0040] Further, the hydrological observation data at the current time is assimilated into the runoff forecast data by using the ensemble Kalman filtering algorithm, including:
[0041] If there is new runoff observation data in the hydrological observation data at the current time, the state variable set at the current time is updated according to the runoff observation data and the state variable set at the last time; wherein the state variable set at the initial time is generated by using the Monte Carlo method with the curve value as the initial state variable;
[0042] The average value of the updated state variable set is calculated, and the runoff forecast data after assimilation is obtained according to the average value.
[0043] Compared with the prior art, the above-mentioned embodiment has the following beneficial effects: since the data used for predicting the runoff prediction data is mainly the prediction data given by the weather forecast and the data that can be currently observed, the subsequent sampling frequency cannot be completely determined by the prediction result due to the data fluctuation and the model accuracy problem, and the runoff process is generally a non-steady process. In order to further improve the accuracy of the previously obtained runoff prediction data, when in the runoff process, the previously predicted runoff prediction data in the entire rainfall period is corrected according to the real-time observed runoff observation data, so that the subsequent sampling frequency is dynamically adjusted in the runoff process, and the accuracy of the real-time sample collection result is ensured.
[0044] Further, the updating of the state variable set of the current moment according to the runoff observation data and the state variable set of the last moment comprises:
[0045] predicting a runoff prediction data set of the current moment according to the state variable set of the last moment;
[0046] assimilating the runoff observation data to the runoff prediction data set of the current moment to obtain a runoff analysis value set of the current moment;
[0047] taking the minimum error between the runoff prediction data set of the current moment and the runoff analysis value set of the current moment as an optimization target, and estimating the state variable set of the current moment.
[0048] Compared with the prior art, the above-mentioned embodiment has the following beneficial effects: when new runoff observation data is obtained, the state variable set is iteratively updated according to the currently newly obtained runoff observation data, so that the runoff prediction data output by the NRCS-CN model in the previous sequence is gradually accurate, and the overall runoff prediction model has self-adaptive updating capability and can more effectively adapt to the rapid change in the runoff process.
[0049] Further, the determination of the sampling time points of the runoff prediction data corresponding to the different runoff stages in the corresponding rainfall period by the segmented sampling method and the assimilated runoff prediction data comprises:
[0050] substituting the assimilated runoff prediction data into a preset river flow-water level relationship to obtain a water level change function; wherein the preset river flow-water level relationship is obtained by fitting the historical runoff observation data;
[0051] taking the first derivative of the water level change function to obtain a first derivative solution, and dividing the time period in the corresponding rainfall period of the runoff prediction data according to the first derivative solution to obtain a plurality of different runoff stages;
[0052] According to a preset rule, a number of sampling points corresponding to each runoff stage is determined, and sampling time points corresponding to the number of sampling points are randomly set in the runoff stage.
[0053] Compared with the prior art, the above embodiment has the following beneficial effects: based on the water level change function of the post-assimilation runoff prediction, a first-order derivative is derived, time periods are divided according to the first-order derivative solution, sampling is increased in a steep runoff rising / falling period and reduced in a gentle period, and sampling efficiency is improved; important information can be avoided to be missed by traditional fixed-frequency sampling by ensuring that samples are collected in a key period of rapid water quality change (such as before and after a peak); and finally, the sampling start condition is triggered by setting the water level, and invalid sampling in a low water level period is avoided.
[0054] Another embodiment of the present application also provides a variable-frequency sampling device for a runoff process of a watershed, comprising a data acquisition module, a runoff prediction data prediction module, a data assimilation module, a sampling time point confirmation module, and a sampling module.
[0055] The data acquisition module is configured to acquire historical runoff observation data, precipitation data, and current hydrological observation data of a to-be-monitored watershed.
[0056] The runoff prediction data prediction module is configured to predict runoff prediction data during the entire precipitation period by a preset runoff prediction model in combination with the current hydrological observation data and the precipitation data; and the runoff prediction model is obtained by coupling a long short-term memory network model and a natural resources conservation service curve number model.
[0057] The data assimilation module is configured to assimilate the current hydrological observation data into the runoff prediction data by an ensemble Kalman filter algorithm.
[0058] The sampling time point confirmation module is configured to determine sampling time points of a plurality of different runoff stages in the precipitation period corresponding to the assimilated runoff prediction data by a piecewise sampling method.
[0059] The sampling module is configured to sample the to-be-monitored watershed according to the sampling time points when a water level of the to-be-monitored watershed reaches a preset trigger water level, to acquire sampling data, and to calculate water quality indexes and confidence intervals of the entire runoff process according to the sampling data; and the preset trigger water level is determined and acquired according to the historical runoff observation data.
[0060] Further, the prediction of the runoff prediction data during the entire precipitation period by the preset runoff prediction model in combination with the current hydrological observation data and the precipitation data comprises:
[0061] The precipitation data includes historical precipitation intensity data and corresponding precipitation forecast data during the entire precipitation period.
[0062] According to the historical precipitation intensity data, a unit line flow function under a preset precipitation intensity is obtained, and according to the unit line flow function under the preset precipitation intensity, a unit line flow function under an arbitrary precipitation intensity is determined.
[0063] The hydrological observation data and the precipitation forecast data are input into a preset long short-term memory network model to obtain net rainfall.
[0064] The net rainfall is input into a preset natural resource protection service curve number model, and the unit line flow function under the arbitrary precipitation intensity is combined to predict the runoff forecast data. BRIEF DESCRIPTION OF DRAWINGS
[0065] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0066] Figure 1 A flowchart of a watershed water quality variable frequency sampling method for runoff process provided in some embodiments of the present application;
[0067] Figure 2 A structural diagram of a watershed water quality variable frequency sampling system for runoff process provided in some embodiments of the present application;
[0068] Figure 3 A structural diagram of a long short-term memory network model provided in some embodiments of the present application;
[0069] Figure 4 A result diagram of a long short-term memory network model provided in some embodiments of the present application;
[0070] Figure 5 A flowchart of an ensemble Kalman filtering algorithm provided in some embodiments of the present application;
[0071] Figure 6A A single-peak 4-section sampling time site diagram provided in some embodiments of the present application;
[0072] Figure 6B A double-peak 6-section sampling time site diagram provided in some embodiments of the present application;
[0073] Figure 7A terminal structure diagram in a runoff process-oriented watershed water quality variable-frequency sampling system provided in some embodiments of the present application;
[0074] Figure 8 A terminal control chip diagram in a runoff process-oriented watershed water quality variable-frequency sampling system provided in some embodiments of the present application;
[0075] Figure 9 A structure diagram of a runoff process-oriented watershed water quality variable-frequency sampling device provided in some embodiments of the present application. DETAILED DESCRIPTION
[0076] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative work fall within the scope of protection of the present application.
[0077] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms “include” and “have” and any variations thereof in the specification and claims of the present application and the above description of drawings are intended to cover non-exclusive inclusion.
[0078] In the description of the embodiments of the present application, the technical terms “first”, “second”, etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of “a plurality of” is two or more, unless otherwise explicitly and specifically limited.
[0079] Reference herein to “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearance of the phrase in various places in the specification does not necessarily all refer to the same embodiment, nor is it necessarily independent or alternative embodiments to other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0080] In the description of the embodiments of the present application, the term "and / or" is only to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects are in an "or" relationship.
[0081] In the description of the embodiments of the present application, the term "a plurality of" refers to two or more (including two), and similarly, "a plurality of groups" refers to two or more groups (including two groups), and "a plurality of pieces" refers to two or more pieces (including two pieces).
[0082] In the description of the embodiments of the present application, unless otherwise explicitly specified and limited, the technical terms "mounting", "connection", "connection", "fixing" and the like should be understood in a broad sense, for example, it can be fixedly connected, or it can be detachably connected, or it can be integrated; it can be mechanical connection, or it can be electrical connection; it can be directly connected, or it can be indirectly connected through an intermediate medium; it can be the internal communication of two elements or the interaction relationship between two elements. For ordinary skilled in the art, the specific meaning of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0083] The prior art often uses traditional fixed-frequency sampling method or flow proportional sampling method to monitor the water quality of the basin. Among them, the traditional fixed-frequency sampling method (fixed sampling time) cannot make flexible adjustment according to the rapid change of water quality in the runoff process due to the fixed sampling frequency, often resulting in a large number of missing key data. And the flow proportional sampling method limits the maximum sampling number during each precipitation period due to the uncertainty of the runoff process and the number of bottles (usually 24) of the automatic sampler, which cannot reasonably collect water samples in different key stages of the runoff, and it is difficult to fully reflect the dynamic change of water quality in the precipitation runoff process. Therefore, in order to improve the efficiency of water sample collection, it is necessary to accurately and timely predict the precipitation runoff process, but due to the need for a large amount of observation data for the conceptual model precipitation-runoff model to determine to reduce the uncertainty of the parameters, the physical process model has limitations in real-time flood runoff process prediction.
[0084] Please refer to Figure 1 To solve the technical problems of low water sample collection efficiency and low accuracy of collected sample results when the water quality changes rapidly in the runoff process in the prior art, the present application provides a variable-frequency sampling method for basin water quality facing the runoff process, which comprises S101-S105.
[0085] Reference Figure 2For the runoff process-oriented watershed water quality variable frequency sampling system carrying the runoff process-oriented watershed water quality variable frequency sampling method in the embodiments of the present application, the cloud, the edge and the terminal are included, and the cloud-edge collaborative mode is adopted; wherein the cloud carries the preset runoff prediction model and the data assimilation process in the embodiments of the present application; the edge carries out real-time segmented sampling collection time point dynamic planning according to the assimilated runoff prediction data; the terminal is used for carrying out variable frequency sampling according to the real-time planning collection time point of the edge, carrying out sampling or carrying out fixed frequency sampling according to the sampling instruction issued by the user, and simultaneously monitoring and collecting the hydrological observation data of the monitored watershed.
[0086] Further, by Figure 2 It can be seen that when the runoff process-oriented watershed water quality variable frequency sampling method proposed in the embodiments of the present application obtains the sampling time point, the terminal will only collect samples according to the sampling time point when the water level reaches the trigger. At other times, such as during non-rainfall period, if the time reaches the system preset fixed frequency monitoring time (such as 8:00 am every Monday), the terminal automatically carries out fixed frequency water sample collection; or temporarily receives the sample collection instruction sent by the cloud and transmitted by the edge, then immediately executes the sample collection operation. The sample collected by the terminal each time will be stored in the terminal.
[0087] Further, as Figure 1 shown, the present application includes S101 to S105 in the runoff process-oriented watershed water quality variable frequency sampling method provided by the embodiments, which are specifically:
[0088] S101: Obtain the historical runoff observation data, precipitation data and current time hydrological observation data of the monitored watershed.
[0089] Further, in some embodiments of the present application, the hydrological observation data includes but is not limited to: the underlying surface information of the previous monitoring watershed, such as the surface soil moisture; the real-time monitored runoff observation data in the runoff process; the real-time data of the river level, precipitation, temperature, soil moisture, etc. of the preset section (such as the more critical section determined by historical data or the section artificially determined) in the monitored watershed.
[0090] Further, in some embodiments of the present application, the historical runoff observation data is the data of the historical period collected by the terminal; the precipitation data includes precipitation prediction data and historical precipitation intensity data, wherein the historical precipitation intensity data can be obtained by terminal collection or other data platform, etc. The precipitation prediction data can be obtained by weather prediction model, etc. The data is the precipitation prediction data in the precipitation period corresponding to the current runoff prediction data, including but not limited to precipitation amount (mm), precipitation intensity (mm / h), etc. ), the precipitation duration (D), the average precipitation intensity (ARI) and the maximum precipitation intensity (MRI), the average air temperature (T), the minimum air temperature (T min ) and the maximum air temperature (T max ).
[0091] S102: predicting runoff forecast data during the entire precipitation period by combining the hydrological observation data at the current moment and the precipitation data through a preset runoff prediction model; the runoff prediction model is obtained by coupling a long short-term memory network model and a natural resources conservation service curve number model.
[0092] Further, in some embodiments of the present application, the preset runoff prediction model (long short-term memory network model-curve number runoff prediction model, LSTM-CN) is a comprehensive model coupling a long short-term memory network model (Long Short-Term Memory, LSTM) and a natural resources conservation service curve number model (Curve Number Method developed by the Natural Resources Conservation Service of the U.S. Department of Agriculture, NRCS-CN).
[0093] Further, in some embodiments of the present application, the runoff forecast data during the entire precipitation period is predicted by combining the hydrological observation data at the current moment and the precipitation data through a preset runoff prediction model, including:
[0094] The precipitation data includes historical precipitation intensity data and corresponding precipitation forecast data during the entire precipitation period.
[0095] According to the historical precipitation intensity data, a unit line flow function under a preset precipitation intensity is obtained, and according to the unit line flow function under the preset precipitation intensity, a unit line flow function under any precipitation intensity is determined.
[0096] The hydrological observation data and the precipitation forecast data are input into a preset long short-term memory network model to obtain net rainfall.
[0097] The net rainfall is input into a preset natural resources conservation service curve number model, and the runoff forecast data is predicted by combining the unit line flow function under any precipitation intensity.
[0098] The long short-term memory network model (LSTM) excels at capturing long-term dependencies in time series, while the Natural Resource Conservation Service Curve Number model (NRCS-CN) has the advantages of fewer parameters and wider applicability. Combining the two solves the problems of high parameter uncertainty and high computing power requirements in traditional conceptual models, thereby improving computational efficiency. By inputting precipitation forecast data and historical intensity data, the entire runoff prediction model can dynamically respond to real-time precipitation changes, overcoming the pure physical model's reliance on large amounts of measured data, improving prediction flexibility, and achieving the complementarity of information at multiple time scales to ensure the accuracy of the prediction results.
[0099] Furthermore, in some embodiments of the present application, obtaining a unit line stream function under a preset precipitation intensity based on the historical precipitation intensity data includes:
[0100] First, based on the historical precipitation intensity data of the preset section in the river channel of the monitored basin (such as the preset precipitation intensity , the unit is ), determine the above-mentioned preset precipitation intensities Unit line stream function corresponding to the instantaneous unit line (IUH) .
[0101] Furthermore, in some embodiments of the present application, determining the unit line stream function under any precipitation intensity according to the unit line stream function under the preset precipitation intensity includes:
[0102] First, the runoff process S curve of the preset node (i.e., preset section) of the watershed to be monitored is determined using the following formula:
[0103] (1)
[0104] in, Represents time When the precipitation intensity The cumulative runoff caused by The values are obtained by calculating the above formula; Represents precipitation intensity The unit stream function corresponding to IUH is used to describe the precipitation intensity. In time The impact on runoff; Represents the catchment area of the preset node in the watershed to be monitored.
[0105] It can be understood that the preset precipitation intensity can be calculated by formula (1) Next .
[0106] Then according to the above constructed Peak and peak time , the power function is fitted to the following relationship to obtain the exponent of the power function and , and the coefficient of the power function and :
[0107] (2)
[0108] (3)
[0109] It can be understood that the above formulas (2) and (3) can obtain and under any rainfall intensity .
[0110] Finally, for any unknown IUH, its According to the power index relationship and the principle of conservation of mass, using the known reference IUH and S curve to calculate the unit line flow function under any rainfall intensity by the following formula:
[0111]
[0112]
[0113]
[0114] In the above formula, represent the time variable mapping function required when using the unit line flow function under the preset rainfall intensity to calculate the unit line flow function under any rainfall intensity , that is, if the formula needs to be used to determine , the time variables of the two need to be mapped by ; is obtained by formula (1), that is .
[0115] As can be seen from the above embodiment, since the actual observation data volume is limited, the unit line flow function under any rainfall intensity cannot be fitted by historical data, therefore, the unit line flow function under a small amount of known rainfall intensity is fitted by a small amount of historical data, and then the unit line flow function under any rainfall intensity is determined according to the unit line flow function under a small amount of known rainfall intensity, thereby effectively solving the problem of pure physical model relying on a large amount of measured data, and reducing the algorithm demand required for data fitting.
[0116] Further, the LSTM model used in some embodiments of the present application is obtained by training through the following process:
[0117]
[0118] Table 1
[0119] By Figure 2 The cloud automatically collects precipitation forecast data in the monitored river basin, then receives hydrological observation data collected by the terminal, inputs the above data into the preset LSTM, and outputs the net rainfall. As shown in Table 1, the input and output data of the LSTM model are shown. Figure 3
[0120] Further, referring to Figure 3 , the internal input of the preset LSTM model cell unit includes the input variable at time , the output variable at time and the memory cell variable at time , the LSTM model includes an input gate, a forget gate, a candidate gate and an output gate, and the calculation formulas of each part are as follows:
[0121] Input gate :
[0122] Forget gate
[0123] Candidate gate :
[0124] Memory cell variable :
[0125] Output gate :
[0126] Output variable :
[0127] Output information :
[0128] wherein represents a sigmoid activation function, which is also a logistic function; is a hyperbolic tangent function; weight matrices , , , and and bias vectors 、 、 、 and determined by gradient descent algorithm and backpropagation through error algorithm; is a pointwise multiplication operator; denotes element-wise (corresponding element) multiplication of vectors, i.e. Hadamard product.
[0129] Further, according to the LSTM model shown in Figure 3 , the correlation between input variables and output variables is analyzed by training data, the correlation between variables is quantified by Pearson correlation coefficient (PCC) and Maximal Information Coefficient (MIC), and the input variables are rearranged according to their correlation. Using K-fold cross-validation and random search method, this process is repeated by iteratively adjusting the value of n, n represents the number of selected input variables (n = 1 to 8, as shown in Table 1), to determine the optimal model hyperparameters corresponding to the optimal n input variables (as shown in Figure 4 ).
[0130] The model training and output data are linearly normalized, and the prediction results are inversely normalized before output.
[0131]
[0132] wherein, is the data after forward normalization, is the original data, and are the maximum and minimum values in the original data, respectively.
[0133] The model training uses 80% of the data, and the validation uses 20% of the data. The adaptive moment estimation (ADAM) optimization algorithm is used to find the best hyperparameter combination, and finally the LSTM model result shown in Figure 4 is obtained.
[0134] Further, when the trained LSTM model is obtained, the hydrological observation data and the precipitation forecast data are input into the preset long short-term memory network model to obtain the net rainfall.
[0135] Further, in some embodiments of the present application, the net rainfall is input into the preset natural resource protection service curve number model, combined with the unit line flow function under any rainfall intensity, to predict the runoff forecast data, including:
[0136] According to the net rainfall, a curve number value corresponding to a rainfall period of the runoff prediction data is calculated;
[0137] According to the curve number value, a potential maximum retention amount of rainfall is calculated, and a cumulative effective rainfall amount is calculated according to the maximum retention amount;
[0138] An effective rainfall intensity function with respect to time is determined according to the cumulative effective rainfall amount;
[0139] According to the effective rainfall intensity function and the unit line flow function under the arbitrary rainfall intensity, the runoff prediction data is obtained through convolution integration.
[0140] The precipitation prediction data is processed by the LSTM to obtain the net rainfall in the entire rainfall period in advance. The net rainfall serves as an intermediate variable, which can be combined with the data predicted in advance to correct the output of the NRCS-CN model in the subsequent period, thereby alleviating the problem that the NRCS-CN model is sensitive to initial conditions, so as to accurately estimate the effective rainfall intensity changing with time. When the accurate effective rainfall intensity function is known, the accurate runoff prediction data can be obtained through convolution integration in combination with the unit line flow function under the arbitrary rainfall intensity.
[0141] Further, in some embodiments of the present application, the process of obtaining the runoff prediction data by the NRCS-CN model is specifically as follows:
[0142] First, according to the net rainfall output by the trained LSTM , and the rainfall amount obtained from the weather forecast , the curve number (Curve Number) value of the rainfall period corresponding to the runoff prediction data to be predicted is calculated by the following formula.
[0143]
[0144] , wherein, is the curve number value; is the rainfall amount; is the net rainfall; is the initial retention ratio of the basin to be monitored.
[0145] Then, the effective rainfall intensity changing with time is calculated by the following formula :
[0146]
[0147] , wherein, represents the derivative of the cumulative effective rainfall amount with respect to the time variable ; is the effective rainfall intensity function with respect to time.
[0148] Furthermore, the above The calculation formula Calculated using the following formula:
[0149]
[0150] in, is the accumulated precipitation in the precipitation forecast data, which is obtained through weather forecast; is the potential maximum retention of precipitation; is the initial retention amount, and the formula Calculate and obtain, To pass Calculate and obtain.
[0151] When you get the function Then, the direct runoff forecast is calculated by convolution integral , specifically:
[0152]
[0153] in, is the convolution integration process, is the unit stream function, and the above-mentioned calculated precipitation intensity is Sure, The catchment area of the preset node in the watershed to be monitored.
[0154] Finally, the base stream data and Add together to obtain runoff forecast data, specifically:
[0155]
[0156] in, It is direct runoff forecast data; is the base flow data, base flow Estimated using the Straight-Line Method based on historical runoff data; For runoff forecast data.
[0157] The evaluation index of the above LSTM-CN model is (Nash coefficient, the result is as follows Figure 4 As shown on the right), the calculation formula is as follows:
[0158]
[0159] in, is the length of the time series, an average value of runoff observation data collected by the terminal; an average value of runoff observation data collected by the terminal; runoff prediction data output by the LSTM-CN model at the moment L; an average value of runoff observation data collected by the terminal; runoff observation data at the moment L.
[0160] As can be seen from the above embodiments, when calculating the final runoff prediction data, the application can more accurately simulate the runoff composition by considering the direct runoff and the base flow, which helps to consider more comprehensive pollutant sources such as surface runoff and groundwater when collecting samples subsequently, thereby improving the accuracy of the sampling results. Further, through convolution calculation, the process of precipitation and runoff conversion is dynamically simulated, and the accuracy of the prediction results is improved.
[0161] S103: assimilate the hydrological observation data at the moment L to the runoff prediction data by using the ensemble Kalman filtering algorithm.
[0162] Further, in some embodiments of the application, the assimilation of the hydrological observation data at the moment L to the runoff prediction data by using the ensemble Kalman filtering algorithm comprises:
[0163] If there is new runoff observation data in the hydrological observation data at the moment L, then update the state variable set at the moment L according to the runoff observation data and the state variable set at the last moment; wherein the state variable set at the initial moment is generated by using the Monte Carlo method with the curve value as the initial state variable.
[0164] Calculate the average value of the updated state variable set, and obtain the assimilated runoff prediction data according to the average value.
[0165] Since the data used for predicting the runoff prediction data is mainly the prediction data given by the weather forecast and the data that can be observed at the moment, it is impossible to completely determine the subsequent sampling frequency depending on the prediction result due to data fluctuations and model accuracy problems, and the runoff process is generally a non-steady-state process. In order to further improve the accuracy of the previously obtained runoff prediction data, when in the runoff process, the previously predicted runoff prediction data in the entire rainfall period is corrected according to the real-time observed runoff observation data, so as to dynamically adjust the subsequent sampling frequency in the runoff process, and ensure the accuracy of the real-time sample collection result.
[0166] Further, in some embodiments of the application, the update of the state variable set at the moment L according to the runoff observation data and the state variable set at the last moment comprises:
[0167] predict the runoff prediction data set at the moment L according to the state variable set at the last moment;
[0168] Assimilating the runoff observation data into the runoff forecast data set at the current moment to obtain a runoff analysis value set at the current moment;
[0169] The state variable set at the current moment is estimated by taking minimizing the error between the runoff forecast data set at the current moment and the runoff analysis value set at the current moment as an optimization goal.
[0170] When new runoff observation data is obtained, the state variable set is iteratively updated according to the latest runoff observation data, so that the runoff forecast data output by the NRCS-CN model in the previous sequence gradually becomes more accurate. At the same time, the overall runoff prediction model has the ability to adaptively update and more effectively adapt to the rapid changes in the runoff process.
[0171] Specifically, refer to Figure 5 The Ensemble Kalman filter (EnKF) algorithm flow diagram shown in the figure is as follows: After (next with right Simplified representation), first the current output Corresponding The value is used as the initial state variable, and further combined with the The value is added to the initial state error (obeying the normal distribution with a mean of 0 , that is, Gaussian white noise), and randomly generated using the Monte Carlo method Collections . It can be understood as Randomly add noise to the value , and Monte Carlo method is used to add random noise Select from the values value, forming Collections .
[0172] After obtaining the initial or updated state variables, the runoff forecast data set is calculated using the following formula, that is, each Corresponding runoff forecast data:
[0173]
[0174] Among them, the superscript Represents the predicted value obtained by the LSTM-CN model, that is, Corresponding runoff forecast data; superscript Represents updated data; subscript Representative a set of state variables; as representing the first a set of state variables runoff forecast data at the time instant; a set of state variables a set of state variables a set of state variables updated at the time instant; is an LSTM-CN model operator; is a model error.
[0175] When the cloud receives new runoff observation data transmitted by the terminal at the current time instant , the predicted runoff forecast data at the current time instant is assimilated through the following formula, specifically:
[0176]
[0177] In the formula, is the assimilated runoff observation data at the time instant is the runoff forecast data at the time instant is the Kalman gain matrix at the time instant is the runoff observation data at the time instant is the runoff forecast data at the time instant is the Kalman gain matrix at the time instant is the runoff observation data at the time instant is the runoff forecast data at the time instant is the Kalman gain matrix at the time instant is the runoff observation data at the time instant is an observation operator, and since the assimilated data is runoff, it is a unit matrix; is Gaussian white noise with an expectation of 0. It should be noted that Figure 5 the variable symbol represents the state variable under all sets. .
[0178] After the assimilation is completed, the state variable set at the current time instant needs to be determined, that is, the state variable set at the previous time instant needs to be updated, and the specific method is:
[0179] The Particle Swarm Optimization (PSO) algorithm is adopted to estimate the value of the state variable with the minimum error between and as the target, to obtain the optimal value at the current time instant , that is, .
[0180] When the state variable Afterwards, take indivual The average value is used as the optimal estimate and substituted into the LSTM-CN model to obtain the next moment The runoff forecast data is the runoff forecast data after assimilation. When new runoff observation data appears at a subsequent time, repeat the above steps.
[0181] S104: Determine sampling time points of the runoff forecast data corresponding to different runoff stages during a precipitation period by combining the assimilated runoff forecast data with a segmented sampling method.
[0182] Furthermore, in some embodiments of the present application, the segmented sampling method is combined with the assimilated runoff forecast data to determine the sampling time points of the runoff forecast data corresponding to several different runoff stages during the precipitation period, including:
[0183] Substituting the assimilated runoff forecast data into a preset river flow-water-level relationship to obtain a water level variation function; wherein the preset river flow-water-level relationship is obtained by fitting the historical runoff observation data;
[0184] Calculating a first-order derivative of the water level change function to obtain a first-order derivative solution result, and dividing the time period within the precipitation period corresponding to the runoff forecast data according to the first-order derivative solution result to obtain a number of different runoff stages;
[0185] The number of sampling points corresponding to each runoff stage is determined according to a preset rule, and sampling time and position points corresponding to the number of sampling points are randomly set within the runoff stage.
[0186] Based on the water level change function of the assimilated runoff forecast, the first-order derivative is derived and the time period is divided according to the solution of the first-order derivative. According to the divided time period, sampling is increased during the steep rise / fall period of runoff, and sampling is reduced during the flat period to improve sampling efficiency. It can also ensure that samples are collected during key periods when water quality changes drastically (such as before and after the peak) to avoid the loss of important information with traditional fixed-frequency sampling. Finally, the sampling start condition is set by triggering the water level to avoid invalid sampling during low water level periods.
[0187] Furthermore, in some embodiments of the present application, the assimilated runoff forecast data is substituted into a preset river flow-water-level relationship to obtain a water level change function, specifically:
[0188] When the cloud obtains the assimilated runoff forecast data After that, the data is transmitted to the edge end, and the edge end determines the water level change function of the water level over time based on the data. The specific formula is:
[0189]
[0190] wherein, is the reference water level of the node section, fitting coefficient 、 is obtained according to the historical runoff observation data of the preset node; is the assimilated runoff prediction data, i.e. . is actually a data sequence in time sequence, so the water level at each time point in the runoff process can be determined through the above formula. Further, the water level-time sequence is fitted through a polynomial function to obtain a continuous water level change function . As shown in Figure 6A or Figure 6B , they are all water level change functions under different conditions obtained according to corresponding curves.
[0191] Further, in some embodiments of the present application, a first derivative of the water level change function is obtained, and a time period in a rainfall period corresponding to the runoff prediction data is divided according to the first derivative solution to obtain several different runoff stages, specifically:
[0192] First, a preset trigger water level is determined, specifically: according to the historical runoff observation data of the river channel of the basin, the corresponding water level of the 95% quantile of the flow is taken as the rainfall runoff field secondary trigger water level height (i.e. the preset trigger water level). The trigger water level is used to determine the start time and the end time , and the time interval represents the variable frequency sampling time interval during the rainfall period, such as the interval shown in Figure 6A or Figure 6B .
[0193] After the interval is known, the in the interval is differentiated, and the first derivative reflects the rate of change of the water level. Whenever the sign of the derivative changes (i.e. from positive to negative or from negative to positive), it corresponds to an inflection point or extreme point in the water level process. Assuming is the number of times the first derivative sign changes, referring to the single-peak curve diagram shown in Figure 6A , in which , according to experience, if , it is usually divided into four stages (rising section, falling section, tail section 1, tail section 2, as shown in Figure 6A ). Referring to the double-peak curve diagram shown in Figure 6B , , if , can usually be divided into 6 stages to reflect its more complex dynamic process (main peak rising section, main peak section, secondary peak rising section, secondary peak descending section, tail section 1, tail section 2, such as Figure 6B Other segmentation conditions are set and adjusted accordingly based on the historical average water level process line of the basin section. Non-uniform sampling, i.e., random sampling, is performed within each segment to facilitate the subsequent estimation of the segment mean, the mean during the precipitation period, and the confidence interval.
[0194] Furthermore, in some embodiments of the present application, the number of sampling points corresponding to each time period is determined according to a preset rule, and the sampling time points corresponding to the number of sampling points are randomly set within the time period, specifically:
[0195] Assuming that the terminal-controlled automatic water sample collection device can collect a maximum of 24 water samples, Figure 6A The single peak four-stage runoff shows a rapid rise (time - ,in (time of first change of the first-order derivative sign) can be set to more intensive acquisition, such as 10 points. To the end point of the precipitation period , we can get the end point of the descending segment and the end point of the last segment 1 The number of random sampling points in the descending segment, tail segment 1, and tail segment 2 are 6, 4, and 4 respectively.
[0196] For example Figure 6B The numbers of random sampling time points for the main peak rising section, main peak section, secondary peak rising section, secondary peak falling section, tail section 1, and tail section 2 are 6, 4, 4, 4, 3, and 3 respectively. The water level in the main peak rising section changes dramatically (time - ,in is the time when the sign of the first-order derivative changes for the first time). Main peak time - ,in It is the time when the sign of the first-order derivative changes for the second time. - , It is the time when the sign of the first-order derivative changes for the third time. The end point of the secondary peak decline segment The water level and The water level is the same, that is . Bisection time To the end point of the precipitation period , we can get the end point of the last segment 1 .
[0197] S105: When the water level of the monitored basin reaches a preset trigger water level, the monitored basin is sampled according to the sampling time point to obtain sampling data, and the water quality index and confidence interval of the entire runoff process are calculated based on the sampling data; wherein, the preset trigger water level is determined and obtained based on the historical runoff observation data.
[0198] Furthermore, in some embodiments of the present application, after a sample is collected through a terminal, the sampled data is processed through the following process:
[0199] For the changes in the water quality of key water samples during the entire precipitation period, as well as the average value and confidence interval, the water quality conditions at different stages (such as total nitrogen, total phosphorus and other pollution content) are effectively captured based on the water quality information of different segmented sampling methods, and the average value of the entire precipitation period is estimated using the following formula of the segmented sampling method , standard deviation and 95% confidence interval :
[0200]
[0201]
[0202]
[0203]
[0204] Where, Indicates the number of segments in a session (e.g. Figure 6A the number of segments in ); is the total duration of the precipitation event (e.g. Figure 6A in ); It is The duration of each segment; It is Segment mean; yes variance of the segment mean; It is The number of samples in the stratum; It is Layer Observation values of each sample, such as the content of total nitrogen, nitrate nitrogen, ammonia nitrogen, total phosphorus, soluble total phosphate, soluble orthophosphate, COD (Chemical Oxygen Demand) in water samples; is the variance of the mean during the precipitation period; the confidence interval of the event mean concentration The confidence level of the student T score is 95% (i.e., the significance level ) of the critical value ( ) calculated.
[0205] Furthermore, in some embodiments of the present application, the specific architecture of the terminal is as follows: Figure 7 As shown, specifically: an embedded water sample automatic collection controller (Micro Controller Unit, MCU) based on the STM32 ARM processor, combined with a pumping unit, a water sample storage device and a high-frequency sensor. The system has the characteristics of automatic sampling, low energy consumption, and strong weather tolerance, and can meet the needs of variable frequency collection of river water samples during precipitation. The control unit integrates an STM32 microcontroller, which is responsible for data collection and storage, water sample device control, data reporting, and command transmission and reception to ensure the stable operation and controllability of the system. The terminal can be connected to the cloud, and can accept water sampling instructions issued by the user to perform unconventional sampling. The terminal uses a photovoltaic and lithium battery power supply system to ensure that the system can run for a long time under unattended conditions. As Figure 8 The STM32 control chip system shown is designed and equipped with communication interfaces, including a 4G network module, UART (Universal Asynchronous Receiver / Transmitter) communication with the automatic water sampling device, and USB serial port communication, supporting field data download and cloud data reporting. Specifically, the STM32 control chip model that can be used is the STM32F407ZGT6. The 4G network module function is implemented through pins 124 and 129 of the STM32 control chip; the edge UART communication function is implemented through pins 34 and 35 of the STM32 control chip; the sensor UART to RS485 communication function is implemented through pins 101 and 102 of the STM32 control chip; the water sampling device control communication function is implemented through pins 69 and 70 of the STM32 control chip; and pin 33 of the STM32 control chip is electrically connected to the lithium battery power module for power supply.
[0206] Furthermore, in some embodiments of the present application, an STM32 embedded system controls the automatic water sampling equipment based on the segmented sampling time and location information of the precipitation runoff process, performing variable-frequency water sampling. The water sample bottles are time-stamped and stored in a constant-temperature (4°C ± 2°C) refrigerated storage within the water sampling device. During non-precipitation periods, regular low-frequency sampling (once every 1-2 weeks) is employed. Furthermore, the terminal is equipped with high-frequency sensors (with a 15-minute sampling frequency) to measure water level, precipitation, air temperature, soil moisture, water temperature, pH, electrical conductivity (EC), and water turbidity. The terminal's real-time observational data, including water level, precipitation, and soil moisture, is uploaded to the cloud and serves as forecast data and assimilated data for the cloud-based model.
[0207] In summary, it can be seen that the variable frequency sampling method for water quality in a watershed for runoff processes provided by this application has the following beneficial effects: when facing or about to face a runoff process during a precipitation period, the runoff forecast data for the entire precipitation period is predicted by using a long-short-term memory network model and a natural resource protection service curve model with fewer calculation parameters. Then, a small amount of actual collected water level observation data is used to assimilate the runoff forecast data based on the collected water level observation data, thereby improving the prediction accuracy of the runoff forecast data. Furthermore, when the water level of the monitored watershed reaches the preset trigger water level, the dynamic changes in the water level during the entire precipitation period can be obtained based on the accurately predicted runoff forecast data, so that the sampling frequency and sampling time and location of different time periods during the precipitation period can be reasonably and dynamically set according to the accurate water level changes, avoiding invalid sampling operations, improving sampling efficiency, and at the same time, making the collected samples more accurately reflect the changes in water quality during the runoff process. The variable frequency sampling method for water quality in a watershed for runoff processes provided in this application can be applied to a variable frequency sampling system for watershed water quality in a watershed for runoff processes that adopts a cloud-edge-end architecture. Through the close collaboration of the cloud-edge-end architecture, the system can collect, process and transmit hydrological, precipitation, soil moisture and other information of key sections of the watershed in real time, and use the ensemble Kalman filter algorithm to assimilate the runoff observation data of the terminal, timely correct the errors in the runoff forecast data, and improve the forecast accuracy.
[0208] like Figure 9 As shown, based on the above-mentioned method embodiment, the embodiment of the present application provides a corresponding device embodiment, specifically a basin water quality variable frequency sampling device for runoff process, including: a data acquisition module 201, a runoff forecast data prediction module 202, a data assimilation module 203, a sampling time point confirmation module 204 and a sampling module 205.
[0209] Further, in some embodiments of the present application, the data acquisition module 201 is configured to acquire historical runoff observation data, precipitation data and hydrological observation data of a to-be-monitored watershed at a current time; the runoff prediction data prediction module 202 is configured to predict runoff prediction data during the entire precipitation period by a preset runoff prediction model in combination with the hydrological observation data at the current time and the precipitation data; the runoff prediction model is obtained by coupling a long short-term memory network model and a natural resources conservation service curve number model; the data assimilation module 203 is configured to assimilate the hydrological observation data at the current time to the runoff prediction data by an ensemble Kalman filter algorithm; the sampling time point confirmation module 204 is configured to determine sampling time points of the runoff prediction data corresponding to different runoff stages in the precipitation period by a piecewise sampling method in combination with the assimilated runoff prediction data; the sampling module 205 is configured to sample the to-be-monitored watershed according to the sampling time points when a water level of the to-be-monitored watershed reaches a preset trigger water level, to obtain sampling data, and to calculate water quality indexes and confidence intervals of the entire runoff process according to the sampling data; wherein the preset trigger water level is determined and obtained according to the historical runoff observation data.
[0210] Further, in some embodiments of the present application, the runoff prediction data during the entire precipitation period is predicted by a preset runoff prediction model in combination with the hydrological observation data at the current time and the precipitation data, including: the precipitation data includes historical precipitation intensity data and precipitation prediction data corresponding to the entire precipitation period; a unit line flow function under a preset precipitation intensity is obtained according to the historical precipitation intensity data, and a unit line flow function under an arbitrary precipitation intensity is determined according to the unit line flow function under the preset precipitation intensity; the hydrological observation data and the precipitation prediction data are input into a preset long short-term memory network model to obtain net rainfall; the net rainfall is input into a preset natural resources conservation service curve number model to predict the runoff prediction data in combination with the unit line flow function under the arbitrary precipitation intensity.
[0211] Further, in some embodiments of the present application, the unit line flow function under the preset precipitation intensity is obtained according to the historical precipitation intensity data, and the unit line flow function under the arbitrary precipitation intensity is determined according to the unit line flow function under the preset precipitation intensity, including:
[0212] The step of obtaining the unit line flow function under the arbitrary precipitation intensity is specifically:
[0213]
[0214]
[0215]
[0216] wherein, represents the unit hydrograph function under an arbitrary rainfall intensity; represents the unit hydrograph function under a preset rainfall intensity; represents a time variable mapping function required when the unit hydrograph function under an arbitrary rainfall intensity is calculated using the unit hydrograph function under a preset rainfall intensity; and respectively represent a peak value and a peak time; and represent a power function coefficient obtained through power function fitting; represents an area of a catchment area of a preset node of a to-be-monitored watershed; represents a cumulative runoff caused by a rainfall intensity at a time ; is a time variable.
[0217] Further, in some embodiments of the present application, the method further comprises: calculating a curve number value corresponding to a rainfall period of the runoff prediction data according to the net rainfall; calculating a potential maximum retention amount of the rainfall according to the curve number value, and calculating a cumulative effective rainfall amount according to the maximum retention amount; determining an effective rainfall intensity function with a time variable according to the cumulative effective rainfall amount; and obtaining the runoff prediction data through convolution integration according to the effective rainfall intensity function and the unit hydrograph function under the arbitrary rainfall intensity.
[0218] Further, in some embodiments of the present application, the calculation formula of the runoff prediction data specifically comprises:
[0219]
[0220]
[0221]
[0222]
[0223]
[0224] wherein, is a curve number value; is the precipitation; is the net rainfall; is the initial interception ratio of the watershed to be monitored; Represents the cumulative effective precipitation For time variables Derivative; is the effective precipitation intensity function with time as the variable; is the accumulated precipitation in the precipitation forecast data; is the initial retention amount; is the potential maximum retention of precipitation, according to Calculation acquisition; It is direct runoff forecast data; is the base flow data; For runoff forecast data; The catchment area of the preset node in the watershed to be monitored; is the convolution integral process, where is the unit stream function.
[0225] Furthermore, in some embodiments of the present application, the assimilation of the hydrological observation data at the current moment into the runoff forecast data through the ensemble Kalman filter algorithm includes: if there is new runoff observation data in the hydrological observation data at the current moment, updating the state variable set at the current moment based on the runoff observation data and the state variable set at the previous moment; wherein, the state variable set at the initial moment is generated by using the Monte Carlo method by taking the curve value as the initial state variable; calculating the average value of the updated state variable set, and obtaining the assimilated runoff forecast data based on the average value.
[0226] Furthermore, in some embodiments of the present application, the updating of the state variable set at the current moment based on the runoff observation data and the state variable set at the previous moment includes: predicting the runoff forecast data set at the current moment based on the state variable set at the previous moment; assimilating the runoff observation data into the runoff forecast data set at the current moment to obtain the runoff analysis value set at the current moment; and estimating the state variable set at the current moment with the minimum error between the runoff forecast data set at the current moment and the runoff analysis value set at the current moment as the optimization goal.
[0227] Further, in some embodiments of the present application, the sampling time points of the runoff prediction data corresponding to different runoff stages during the precipitation period are determined by the piecewise sampling method and the assimilated runoff prediction data, including: substituting the assimilated runoff prediction data into a preset river flow-water level relationship to obtain a water level change function; wherein the preset river flow-water level relationship is obtained by fitting the historical runoff observation data; the first derivative of the water level change function is obtained, and the time period of the runoff prediction data during the precipitation period is divided according to the first derivative solution, and a plurality of different runoff stages are obtained; the sampling points corresponding to each runoff stage are determined according to a preset rule, and the sampling time points corresponding to the sampling points are randomly set in the runoff stage.
[0228] It can be understood that the above-mentioned device embodiment is corresponding to the method embodiment of the present application, which can realize the runoff process-oriented watershed water quality variable frequency sampling method provided by any one of the above-mentioned method embodiments of the present application.
[0229] As can be seen from the above, the runoff process-oriented watershed water quality variable frequency sampling device provided by the present application has the following beneficial effects: when facing or about to face the runoff process during the precipitation period, the runoff prediction data during the entire precipitation period is predicted by the long short-term memory network model and the natural resource protection service curve number model with fewer calculation parameters, and then the runoff prediction data is assimilated according to the collected water level observation data by using a small amount of actually collected water level observation data, thereby improving the prediction accuracy of the runoff prediction data. Further, when the water level of the to-be-monitored watershed reaches the preset trigger water level, the dynamic change of the water level during the entire precipitation period can be obtained according to the accurately predicted runoff prediction data, so that the sampling frequency and the sampling time points of different time periods during the precipitation period can be reasonably and dynamically set according to the accurate water level change, thereby avoiding ineffective sampling operations, improving the sampling efficiency, and making the collected samples more accurately reflect the change of water quality during the runoff process. The runoff process-oriented watershed water quality variable frequency sampling device provided by the present application can be applied to a runoff process-oriented watershed water quality variable frequency sampling system using a cloud edge end architecture. Through the close cooperation of the cloud edge end architecture, the system can collect, process and transmit hydrological, precipitation, soil moisture and other information of key sections of the watershed in real time, assimilate the terminal runoff observation data by using the ensemble Kalman filter algorithm, correct the error of the runoff prediction data in time, and improve the prediction accuracy.
[0230] It should be noted that the apparatus embodiments described above are merely illustrative, and part or all of the modules thereof can be selected to achieve the purposes of the embodiments of the present application according to actual needs. In addition, in the apparatus embodiments provided in the present application, the connection relationship between the modules indicates that there is a communication connection between them, which can be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement it without creative labor.
[0231] On the basis of the above-mentioned embodiment of the runoff process-oriented watershed water quality variable-frequency sampling method, another embodiment of the present application provides a terminal device, which comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the runoff process-oriented watershed water quality variable-frequency sampling method of any one embodiment of the present application is realized.
[0232] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present application. The one or more modules can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the terminal device.
[0233] The terminal device can be a desktop computer, a notebook computer, a palm computer, a cloud server, and other computing devices. The terminal device can include, but is not limited to, a processor and a memory.
[0234] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and connects all parts of the terminal device through various interfaces and lines.
[0235] On the basis of the above method embodiment, another embodiment of the present application provides a computer readable storage medium, including a stored computer program, wherein the computer program controls the device where the computer readable storage medium is located to execute the runoff process-oriented variable-frequency sampling method of the watershed water quality described in any one of the above method embodiments of the present application when running.
[0236] The modules / units integrated in the device / terminal equipment, if realized in the form of software function units and sold or used as independent products, can be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. When the processor executes the computer program, the steps of the above-mentioned various method embodiments can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.
Claims
1. A variable frequency sampling method for water quality of a watershed oriented to a runoff process, characterized in that, The method comprises the following steps: acquiring historical runoff observation data, precipitation data and current hydrological observation data of a to-be-monitored watershed; predicting runoff forecast data during the entire precipitation period by a preset runoff prediction model in combination with the current hydrological observation data and the precipitation data; the runoff prediction model is obtained by coupling a long short-term memory network model and a natural resources conservation service curve number model; assimilating the current hydrological observation data into the runoff forecast data by an ensemble Kalman filter algorithm; determining sampling time points of the runoff forecast data corresponding to different runoff stages during the precipitation period by a piecewise sampling method in combination with the assimilated runoff forecast data; when the water level of the to-be-monitored watershed reaches a preset trigger water level, sampling the to-be-monitored watershed according to the sampling time points to acquire sampling data, and calculating water quality indexes and confidence intervals of the entire runoff process according to the sampling data; wherein the preset trigger water level is determined and acquired according to the historical runoff observation data; the step of predicting the runoff forecast data during the entire precipitation period by the preset runoff prediction model in combination with the current hydrological observation data and the precipitation data comprises the following steps: wherein the precipitation data comprises historical precipitation intensity data and precipitation forecast data corresponding to the entire precipitation period; acquiring a unit line flow function under a preset precipitation intensity according to the historical precipitation intensity data, and determining a unit line flow function under an arbitrary precipitation intensity according to the unit line flow function under the preset precipitation intensity; inputting the hydrological observation data and the precipitation forecast data into a preset long short-term memory network model to acquire net rainfall; inputting the net rainfall into a preset natural resources conservation service curve number model, combining the unit line flow function under the arbitrary precipitation intensity, and predicting the runoff forecast data; the step of inputting the net rainfall into the preset natural resources conservation service curve number model, combining the unit line flow function under the arbitrary precipitation intensity, and predicting the runoff forecast data comprises the following steps: calculating a curve number value corresponding to the precipitation period of the runoff forecast data according to the net rainfall; calculating a potential maximum retention amount of precipitation according to the curve number value, and calculating a cumulative effective precipitation amount according to the maximum retention amount; determining an effective precipitation intensity function with time as a variable according to the cumulative effective precipitation amount; obtaining the runoff forecast data by convolution integration according to the effective precipitation intensity function and the unit line flow function under the arbitrary precipitation intensity.
2. The variable frequency sampling method of water quality in a catchment area oriented to runoff process according to claim 1, characterized in that, the step of acquiring the unit line flow function under the preset precipitation intensity according to the historical precipitation intensity data, and determining the unit line flow function under the arbitrary precipitation intensity according to the unit line flow function under the preset precipitation intensity comprises the following steps: the step of acquiring the unit line flow function under the arbitrary precipitation intensity comprises the following steps: wherein, represents the unit hydrograph function under an arbitrary rainfall intensity; represents the unit hydrograph function under a preset rainfall intensity; represents a time variable mapping function required when the unit hydrograph function under an arbitrary rainfall intensity is calculated using the unit hydrograph function under a preset rainfall intensity; and respectively represent a peak value and a peak time of ; and represent power function coefficients obtained through power function fitting; and represent power function exponents obtained through power function fitting; is an area of a catchment basin of a preset node to be monitored; is a cumulative runoff caused by a rainfall intensity at a time ; is a time variable. 3. The variable frequency sampling method of water quality in a catchment area oriented to runoff process according to claim 1, characterized in that, the calculation formula of the runoff forecast data comprises the following formula: in, is the curve value; is the precipitation; is the net rainfall; is the initial interception ratio of the watershed to be monitored; Represents the cumulative effective precipitation For time variables Derivative; is the effective precipitation intensity function with time as the variable; is the accumulated precipitation in the precipitation forecast data; is the initial retention amount; is the potential maximum retention of precipitation, according to Calculation acquisition; It is direct runoff forecast data; is the base flow data; For runoff forecast data; The catchment area of the preset node in the watershed to be monitored; is the convolution integral process, where is the unit stream function.
4. The variable frequency sampling method of water quality in a catchment area oriented to runoff process according to claim 1, characterized in that, the step of assimilating the current hydrological observation data into the runoff forecast data by the ensemble Kalman filter algorithm comprises the following steps: If there is new runoff observation data in the current time hydrological observation data, the state variable set of the current time is updated according to the runoff observation data and the state variable set of the last time; wherein, the state variable set of the initial time is generated by using Monte Carlo method by taking the curve value as the initial state variable; The average value of the updated state variable set is calculated, and the assimilated runoff forecast data is obtained according to the average value.
5. A variable frequency sampling method for catchment water quality oriented to runoff processes according to claim 4, characterized in that, The state variable set of the current time is updated according to the runoff observation data and the state variable set of the last time, including: According to the state variable set of the last time, the runoff forecast data set of the current time is predicted; The runoff observation data is assimilated to the runoff forecast data set of the current time to obtain the runoff analysis value set of the current time; The state variable set of the current time is estimated with the minimum error between the runoff forecast data set of the current time and the runoff analysis value set of the current time as the optimization target.
6. The variable frequency sampling method of water quality in a catchment area oriented to runoff process according to claim 1, characterized in that, The sampling time point of the runoff forecast data corresponding to the several different runoff stages in the precipitation period is determined by the piecewise sampling method combined with the assimilated runoff forecast data, including: The assimilated runoff forecast data is substituted into the preset river flow-water level relationship to obtain the water level change function; wherein, the preset river flow-water level relationship is obtained by fitting the historical runoff observation data; The first order derivative of the water level change function is solved to obtain the first order derivative solution, and the time period in the precipitation period corresponding to the runoff forecast data is divided according to the first order derivative solution to obtain several different runoff stages; The sampling points corresponding to each runoff stage are determined according to the preset rule, and the sampling time points corresponding to the sampling points are randomly set in the runoff stage.
7. A variable frequency sampling device for water quality of a catchment area oriented to a runoff process, characterized in that, Including: Data acquisition module, runoff forecast data prediction module, data assimilation module, sampling time point confirmation module and sampling module; Wherein, the data acquisition module is used to acquire the historical runoff observation data, precipitation data and current time hydrological observation data of the monitored river basin; The runoff forecast data prediction module is used to predict the runoff forecast data of the entire precipitation period by combining the current time hydrological observation data and the precipitation data through the preset runoff prediction model; the runoff prediction model is obtained by coupling long short-term memory network model and natural resources conservation service curve number model; The data assimilation module is used to assimilate the current time hydrological observation data to the runoff forecast data by ensemble Kalman filter algorithm; The sampling time point confirmation module is used to determine the sampling time point of the runoff forecast data corresponding to several different runoff stages in the precipitation period by the piecewise sampling method combined with the assimilated runoff forecast data; The sampling time point confirmation module is used to determine the sampling time point of the runoff forecast data corresponding to several different runoff stages in the precipitation period by the piecewise sampling method combined with the assimilated runoff forecast data; The sampling module is configured to sample the to-be-monitored watershed according to the sampling time point when a water level of the to-be-monitored watershed reaches a preset trigger water level, to obtain sampling data, and to calculate water quality indexes and confidence intervals of an entire runoff process according to the sampling data, wherein the preset trigger water level is determined according to the historical runoff observation data; The runoff prediction model is used to predict runoff forecast data during the entire rainfall period by combining the hydrological observation data and the rainfall data at the current time, including: The rainfall data includes historical rainfall intensity data and corresponding rainfall forecast data during the entire rainfall period; According to the historical rainfall intensity data, a unit line flow function under a preset rainfall intensity is obtained, and a unit line flow function under any rainfall intensity is determined according to the unit line flow function under the preset rainfall intensity; The hydrological observation data and the rainfall forecast data are input into a preset long short-term memory network model to obtain net rainfall; The net rainfall is input into a preset natural resource protection service curve number model, and the runoff forecast data is predicted by combining the unit line flow function under any rainfall intensity; The net rainfall is input into a preset natural resource protection service curve number model, and the runoff forecast data is predicted by combining the unit line flow function under any rainfall intensity, including: According to the net rainfall, a curve number value during a rainfall period corresponding to the runoff forecast data is calculated; According to the curve number value, a potential maximum retention amount of rainfall is calculated, and a cumulative effective rainfall amount is calculated according to the maximum retention amount; An effective rainfall intensity function with time as a variable is determined according to the cumulative effective rainfall amount; According to the effective rainfall intensity function and the unit line flow function under any rainfall intensity, the runoff forecast data is obtained by convolution integration.
Citation Information
Patent Citations
Water quality analysis system in water conservancy project
CN118707061A