A water environment pollutant flux simulation method, electronic device and storage medium

By fitting and optimizing the boundary condition data of the initial SWMM model, using the LSTM model and particle swarm algorithm, the accuracy and efficiency of water environment pollutant flux simulation are improved, and the problems of water quality data discretization and model parameter uncertainty are solved.

CN116108747BActive Publication Date: 2025-08-08HEBEI SAILHERO ENVIRONMENTAL PROTECTION HIGH TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310098328.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-10
Publication Date
2025-08-08
Estimated Expiration
2043-02-10

AI Technical Summary

Technical Problem

In the prior art, the simulation accuracy of water environment pollutant flux is low, mainly due to the discretization of water quality monitoring data and the uncertainty of SWMM model parameters.

Method used

By obtaining the basic data of the target area, establishing the initial SWMM model, and fitting the initial boundary condition data, using the long and short-term memory network LSTM model to predict more boundary condition data, and optimizing the model parameters with the particle swarm optimization algorithm to determine the final SWMM model.

Benefits of technology

The accuracy of pollutant flux simulation of water environment pollutant flux is improved, the problem of water quality data is solved, and the efficiency of model parameter rate is ensured, and it is suitable for pollutant flux simulation of various water environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116108747B_ABST
    Figure CN116108747B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, electronic device, and storage medium for simulating pollutant fluxes in a water environment. The method comprises: obtaining basic data for a target area, wherein the basic data includes initial boundary condition data; establishing an initial stormwater flood management model (SWMM) based on the basic data; fitting the initial boundary condition data in the basic data to obtain fitted boundary condition data, wherein the fitted boundary condition data has a larger data volume than the initial boundary condition data and can closely approximate the actual boundary condition data; updating the initial boundary condition data in the initial SWMM model with the fitted boundary condition data to obtain an updated SWMM model; and iteratively optimizing and calibrating the SWMM model using a particle swarm algorithm to determine model parameters in the updated SWMM model, thereby obtaining a final SWMM model for the target area. The present invention can solve the problem of discretization of online water quality monitoring data, thereby improving the accuracy of water environment pollutant flux simulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pollutant flux prediction, and in particular to a method, device, electronic equipment and storage medium for simulating pollutant flux in a water environment. Background Art

[0002] Water pollutant fluxes are the result of a multimodal fusion of water quality monitoring data and synchronized flow monitoring data at different time scales. Flux accounting can be used to clarify pollution responsibilities between administrative regions, accurately support ecological regional compensation, and provide data support for water ecological health and risk assessment, water ecological restoration, and sustainable utilization.

[0003] Research on water pollutant fluxes at home and abroad primarily focuses on monitoring and calculating watershed sections. Existing technologies, to save on operational costs, typically reduce monitoring frequency, for example extending monitoring intervals from four hours to 24 hours or longer. This results in discrete monitoring data, which is relatively continuous. Furthermore, because Storm Water Management Models (SWMM) contain numerous parameters, each of which often exhibits uncertainty, the model typically requires water quality monitoring data from one or more sections as input. Errors in these inputs complicate the parameter calibration process, reducing the accuracy of water pollutant flux simulations. Summary of the Invention

[0004] The embodiments of the present invention provide a method, device, terminal and storage medium for simulating the flux of pollutants in a water environment to solve the problem of low accuracy in simulating the flux of pollutants in a water environment.

[0005] In a first aspect, an embodiment of the present invention provides a method for simulating the flux of pollutants in a water environment, comprising:

[0006] Acquire basic data of the target area, wherein the basic data includes initial boundary condition data;

[0007] Establish the initial stormwater flood management model SWMM model based on basic data;

[0008] Fitting the initial boundary condition data in the basic data to obtain fitted boundary condition data, wherein the amount of the fitted boundary condition data is greater than the amount of the initial boundary condition data;

[0009] The initial boundary condition data in the initial SWMM model is updated with the fitted boundary condition data to obtain an updated SWMM model;

[0010] The model parameters in the updated SWMM model are determined to obtain the final SWMM model of the target area.

[0011] In a possible implementation, fitting the initial boundary condition data in the basic data to obtain fitted boundary condition data includes:

[0012] The initial boundary conditions are input into the pre-trained long short-term memory network (LSTM) model to obtain the fitted boundary condition data.

[0013] In one possible implementation, a long short-term memory network (LSTM) model is trained with a training data set that includes initial boundary condition data for a historical period.

[0014] In a possible implementation, the initial boundary condition data includes: rainfall data, evaporation data, and discrete water quality data;

[0015] The fitted boundary condition data include: rainfall data, evaporation data and fitted discrete water quality data.

[0016] In one possible implementation, determining model parameters in the updated SWMM model to obtain a final SWMM model of the target area includes:

[0017] Based on the particle swarm optimization algorithm and the measured values of pollutant fluxes, the model parameters in the updated SWMM model are determined, and the final SWMM model of the target area is obtained.

[0018] In one possible implementation, the model parameters in the updated SWMM model are determined based on the particle swarm optimization algorithm and the measured values of pollutant fluxes to obtain the final SWMM model of the target area, including:

[0019] Generate a particle swarm in the model parameter solution space, where each particle represents a possible solution of the model parameters;

[0020] The particle swarm is iterated, and the optimal solution of the particle swarm is obtained in each iteration. When the Nash coefficient of the pollutant flux simulation value corresponding to the optimal solution of the particle swarm and the measured value of the pollutant flux meets the model accuracy requirements, the final SWMM model of the target area is obtained, among which the optimal solution of the particle swarm includes the global optimal solution and the individual optimal solution.

[0021] In one possible implementation, the particle swarm is iterated, and the optimal solution of the particle swarm is obtained in each iteration. When the Nash coefficient of the pollutant flux simulation value corresponding to the optimal solution of the particle swarm and the measured pollutant flux value meets the model accuracy requirements, the final SWMM model of the target area is obtained, including:

[0022] Initialize the particle swarm;

[0023] Substitute each particle in the particle swarm into its corresponding parameter;

[0024] The updated SWMM model is simulated to obtain pollutant flux simulation values;

[0025] Calculating the Nash coefficient between the measured pollutant flux value and the simulated pollutant flux value according to the Nash coefficient algorithm;

[0026] When the Nash coefficient meets the model accuracy requirements, the iteration is stopped and the final SWMM model of the target area is obtained;

[0027] When the Nash coefficient does not meet the model accuracy requirements, the position of each particle in the particle swarm corresponding to the pollutant flux simulation value used to calculate the Nash coefficient is updated according to the global optimal solution and the individual optimal solution, and the process jumps to the step of substituting each particle in the particle swarm into its corresponding parameter.

[0028] In a second aspect, an embodiment of the present invention provides a water environment pollutant flux simulation device, comprising:

[0029] An acquisition module is used to acquire basic data of the target area, wherein the basic data includes initial boundary condition data;

[0030] Construction module, used to build the initial storm flood management model SWMM model based on basic data;

[0031] A fitting module is used to fit the initial boundary condition data in the basic data to obtain fitted boundary condition data, wherein the amount of the fitted boundary condition data is greater than the amount of the initial boundary condition data;

[0032] The construction module is further used to update the initial boundary condition data in the initial SWMM model to the fitted boundary condition data to obtain an updated SWMM model;

[0033] The optimization module is used to determine the model parameters in the updated SWMM model to obtain the final SWMM model of the target area.

[0034] In a third aspect, an embodiment of the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method described in the first aspect or any possible implementation of the first aspect are implemented.

[0035] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the method described in the first aspect or any possible implementation of the first aspect.

[0036] The embodiment of the present invention provides a method, device, terminal and storage medium for simulating the flux of pollutants in a water environment. The method comprises: obtaining basic data of a target area, wherein the basic data includes initial boundary condition data; establishing an initial stormwater and flood management model (SWMM) model based on the basic data; fitting the initial boundary condition data in the basic data to obtain fitted boundary condition data, wherein the amount of fitted boundary condition data is greater than that of the initial boundary condition data, and the fitted boundary condition data can better approximate the actual boundary condition data; predicting and increasing data with a high degree of discreteness in the water quality data by fitting, thereby solving the data discretization problem caused by the reduction of the acquisition frequency; updating the initial boundary condition data in the initial SWMM model to the fitted boundary condition data to obtain an updated SWMM model; determining the model parameters in the updated SWMM model to obtain a final SWMM model of the target area, and selecting the optimal final SWMM model by determining the model parameters. The present invention solves the problem of discretization of online water quality monitoring data and improves the accuracy of water environment pollutant flux simulation. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0038] Figure 1 This is a flow chart of a method for simulating the flux of pollutants in a water environment provided by an embodiment of the present invention;

[0039] Figure 2 This is a flow chart of a method for simulating the flux of pollutants in a water environment provided by an embodiment of the present invention;

[0040] Figure 3 This is a structural block diagram of a water environment pollutant flux simulation device provided by an embodiment of the present invention;

[0041] Figure 4 is a schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0042] In the following description, specific details such as particular system structures and techniques are provided for purposes of illustration, not limitation, to facilitate a thorough understanding of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.

[0043] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below with reference to the accompanying drawings.

[0044] Figure 1 This is a flow chart of a method for simulating the flux of pollutants in a water environment provided by an embodiment of the present invention. Figure 1 As shown:

[0045] Step 101: Acquire basic data of the target area, wherein the basic data includes initial boundary condition data.

[0046] In this embodiment, the target area can be any river basin, or any street waterlogging area, etc., and is not limited here. The types of basic data included in different target areas can also vary. For example, when the target area is a river basin, the basic data may include three categories: hydrological data, underlying surface data, and boundary data; when the target area is a street waterlogging area, the basic data may include four categories: hydrological data, pipe network data, underlying surface data, and boundary data.

[0047] Among them, hydrological data may include but are not limited to one or more of rainfall data, evaporation data, impermeable roughness coefficient, permeable roughness coefficient, impermeable depression water storage, permeable depression water storage, minimum infiltration rate, maximum infiltration rate, attenuation constant and drainage time. Pipeline network data may include but are not limited to one or more of data such as the length, diameter, and elevation value of the beginning and end of the drainage pipe in the detection area. For example, it may also include data such as the depth and elevation of rainwater wells or inspection wells. If double-layer drainage is considered, that is, the street is also counted as a drainage channel, then the width, elevation and other data of the street may also be included. In addition, it may also include basic data and operation modes of some local drainage facilities such as pumping stations and sluices. The underlying surface data may include land use type and topographic data, etc. The land use type and topographic data can be used to calculate the sub-catchment impermeability, determine the soil infiltration rate and sub-catchment slope and other parameters. In addition, if the target area includes buildings, the underlying surface data can also include data such as the number, distribution, and impermeability of buildings; boundary data refers to the boundary of the drainage outlet, that is, the boundary of the drainage outlet where the downstream drainage end is connected to the river or other water body, which can be data such as tide level or river water level.

[0048] In addition, basic data can also include parameters related to water quality pollutants, such as the maximum accumulation of pollutants, growth coefficient, growth index, scour coefficient and scour index.

[0049] Step 102: Establish an initial stormwater flood management model SWMM model based on basic data.

[0050] In this embodiment, the stormwater flood management model is a dynamic precipitation-runoff simulation model, primarily used to simulate the water quantity and quality of a single precipitation event or a long-term event in a city. It can also simulate the water environment of a specific river. Using basic data from any target area, this embodiment can simulate the water environment of that target area over a period of time, thereby simulating the pollutant flux in that target area's water environment.

[0051] Step 103: fitting the initial boundary condition data in the basic data to obtain fitted boundary condition data, wherein the amount of the fitted boundary condition data is greater than the amount of the initial boundary condition data.

[0052] In the present embodiment, initial boundary condition data refers to the basic data collected, the original boundary condition data without fitting. Boundary condition data is the key input quantity for carrying out SWMM model flux simulation, and plays a major influencing role on the whole simulation process and prediction result. However, the instantaneous water quality monitoring data based on nitrogen and phosphorus are derived from the water quality online monitoring system, wherein the total phosphorus and total nitrogen online monitors usually adopt the chemical method principle, need to regularly replace chemical reagents and maintenance, especially under the high frequency operation state, the operation and maintenance cost is higher, that is, boundary condition data often need a large amount of cost when collecting. In order to make the SWMM model more accurate and complete during the data acquisition initial stage, a higher data acquisition frequency will be maintained, such as once every 2 hours or once every 4 hours. After the data collected can ensure that the SWMM model is accurate and completely simulates the water environment pollutant flux at any moment, in order to save cost, the acquisition frequency will be reduced, and the acquisition frequency will be reduced to once every 24 hours, or even longer, so that the boundary condition data at this moment become discretized. Because the SWMM model contains many parameters, and each parameter often exhibits uncertainty, the model usually requires boundary condition data of one or more sections as input. If the data at this time contains errors, then the accuracy of the flux simulation of the SWMM model will inevitably be affected. To this end, it is possible to fit the data collected less frequently and predict detailed data that approximates the actual boundary conditions, thereby increasing the originally small amount of boundary condition data and ensuring the accuracy of the flux simulation of the SWMM model.

[0053] For example, after reducing the acquisition frequency, basic data acquisition is performed once every 24 hours. The first initial boundary condition data can be recorded as X1, and the second initial boundary condition data can be recorded as X2. That is, the two initial boundary condition data are 24 hours apart. Through fitting calculation, according to the pre-set prediction frequency, the data if the actual acquisition is performed between the two initial boundary condition data is predicted. For example, the prediction frequency can be set to once every 4 hours. Then, the boundary condition data after fitting are: X1, X2 (1) , X (2) , X(3) , X (4) , X (5) , X2; where X (1) , X (2) , X (3) , X (4) , X (5) The fitted data.

[0054] Step 104: Update the initial boundary condition data in the initial SWMM model to the fitted boundary condition data to obtain an updated SWMM model.

[0055] In this example, the discretization degree of the fitted boundary condition data is reduced, and the probability of error decreases as the amount of data increases. Therefore, the initial SWMM model is also updated after the boundary condition data is updated to obtain the updated SWMM model. On the one hand, the updated boundary condition data represents the collection of new basic data, which can better simulate the current state. On the other hand, the fitted boundary condition data has a low discretization degree and low error rate, which can ensure more accurate flux simulation results of the SWMM model.

[0056] Step 105: Determine the model parameters in the updated SWMM model to obtain the final SWMM model of the target area.

[0057] In this embodiment, the SWMM model after updating the boundary condition data may not be the optimal model for the current pollutant flux simulation. Therefore, the updated SWMM model needs to be optimized. When the model parameters meet the preset accuracy, it proves that the current SWMM model can accurately reflect the pollutant flux simulation results of the target area. In this case, the SWMM model at this time can be used as the final SWMM model for the target area.

[0058] The embodiment of the present invention obtains basic data of the target area, wherein the basic data includes initial boundary condition data; on the one hand, an initial storm flood management model SWMM model is established based on the basic data; on the other hand, the initial boundary condition data in the basic data is fitted to obtain fitted boundary condition data, wherein the data volume of the fitted boundary condition data is greater than the data volume of the initial boundary condition data; through fitting, the data with a high degree of discreteness in the water quality data can be predicted and increased, solving the data discretization problem caused by the reduction of acquisition frequency; the initial boundary condition data in the initial SWMM model is updated to the fitted boundary condition data to obtain an updated SWMM model; the model parameters in the updated SWMM model are determined to obtain the final SWMM model of the target area, and the optimal final SWMM model can be selected by determining the model parameters. The present invention solves the problem of discretization of water quality online monitoring data and improves the simulation accuracy of water environment pollutant flux; in addition, this embodiment can be applied to pollutant fluxes of various water environments, including but not limited to different typical sections in the basin, and has wider practicality.

[0059] In some embodiments, fitting the initial boundary condition data in the basic data in step 103 to obtain fitted boundary condition data may include:

[0060] The initial boundary conditions are input into the pre-trained long short-term memory network (LSTM) model to obtain the fitted boundary condition data.

[0061] In this embodiment, a long-short-term memory (LSTM) model can perform data prediction. The pre-trained LSTM model includes all historical sequences for the current target area. This historical sequence, combined with the current input data, can predict data within a specific time period. For example, after inputting an initial boundary condition, further boundary condition data subsequent to that initial condition can be predicted. This allows at least two fitted boundary condition data to be obtained from at least one initial boundary condition data, ensuring that pollutant flux simulation accuracy is maintained while reducing the acquisition frequency.

[0062] In some embodiments, the long short-term memory network (LSTM) model in step 103 is trained with a training data set, which may include initial boundary condition data of a historical period.

[0063] In this embodiment, the initial boundary condition data of the historical period can enable the long short-term memory network LSTM model to perform historical memory, and can accurately predict the data that may appear at the next moment of the input data when performing data fitting.

[0064] In a specific embodiment, the water quality data can be fitted in the following manner:

[0065] In the discretization problem of online water quality monitoring data, the initial monitoring frequency of the online water quality monitoring system is high. For example, if j water quality monitoring data are obtained every day, the historical water quality monitoring data sequence obtained within i days is as follows:

[0066]

[0067] In order to save operation and maintenance costs in the subsequent long-term operation, the monitoring frequency is reduced. For example, only one water quality monitoring data is obtained every day. Then the discrete water quality monitoring data sequence obtained in the subsequent k days is as follows:

[0068]

[0069] Consider using the initial boundary condition data of the historical period for LSTM model training and fitting the discrete water quality monitoring data to improve the accuracy of the model input.

[0070] The LSTM model training input is:

[0071]

[0072] The LSTM model training output is:

[0073]

[0074] in and are the rainfall and evaporation data series for the same period, among which, , The final fitted water quality data obtained using the LSTM model is as follows:

[0075] .

[0076] In addition, the trained LSTM model has three main stages: the forget stage, the selective memory stage, and the output stage. When data is input, it will calculate and output the data for the next stage through the forget stage, the selective memory stage, and the output stage. Specifically,

[0077] Forgetting stage: In this stage, the input data passed from the previous node is selectively forgotten to prevent the input data from the previous stage from affecting the current input data.

[0078] Selective memory stage: This stage selectively "memorizes" the data input at the current moment; that is, important data is remembered emphatically, and unimportant data is remembered in small amounts or not at all; in this stage, the input data is calculated in the forgetting stage.

[0079] Output stage: This stage is used to decide what will be used as the output of the current state, that is, to determine what the next hidden state data will be after the current input data. The output data of the current state is calculated jointly by the forget stage and the selective memory stage.

[0080] In some embodiments, the initial boundary condition data in steps 101 to 104 may include: rainfall data, evaporation data, and discrete water quality data;

[0081] The fitted boundary data conditions may include: rainfall data, evaporation data, and fitted discrete water quality data.

[0082] In this embodiment, rainfall data can include rainfall amount, rainfall duration, and rainfall time; evaporation data can include evaporation time and average evaporation rate; and discrete water quality data can be divided into physical monitoring indicators such as water temperature, color, transparency, turbidity, odor, suspended solids, and visible matter; chemical water quality indicators such as pH, alkalinity, and hardness; and concentrations of chloride ions, ammonium ions, nitrate ions, nitrite ions, potassium ions, calcium ions, magnesium ions, sodium ions, total salt content, and general organic matter. Rainfall data, evaporation data, and discrete water quality data are the primary basis for reflecting pollutant flux in the water environment. These three types of data can be used to simulate pollutant flux in any region.

[0083] This embodiment can fit the discrete water quality data in the initial boundary condition data through a pre-trained LSTM model, combined with the rainfall data and evaporation data, and output the fitted discrete water quality data. Only the discrete water quality data in the fitted boundary condition data is updated, and other data remains unchanged, achieving the technical effect of reducing the discretization degree of water quality monitoring data and improving the accuracy of pollutant flux simulation.

[0084] In some embodiments, determining the model parameters in the updated SWMM model in step 105 to obtain the final SWMM model of the target area may include:

[0085] Based on the particle swarm optimization algorithm and the measured values of pollutant fluxes, the model parameters in the updated SWMM model are determined, and the final SWMM model of the target area is obtained.

[0086] In this embodiment, the particle swarm optimization (PSO) algorithm is an effective tool for solving combinatorial optimization problems and dynamic optimization problems, and it can optimize and iterate the updated SWMM model. In the SWMM model parameter calibration problem, it is necessary to select and optimize parameters related to hydrological runoff and water quality pollutants. For example, hydrological runoff parameters include the impermeable roughness coefficient, permeable roughness coefficient, impermeable depression water storage, permeable depression water storage, minimum infiltration rate, maximum infiltration rate, decay constant, and drainage time, as well as water quality pollutant parameters including maximum accumulation, growth coefficient, growth index, scour coefficient, and scour index. Due to the large amount of data involved, the calibration speed will be reduced. However, the particle swarm optimization algorithm can improve the calibration speed and solve the problem of low efficiency in SWMM model parameter calibration.

[0087] When the particle swarm optimization algorithm is used for iteration, the corresponding pollutant flux simulation value and the pollutant flux measured value will be calculated after each iteration. When the obtained model parameters meet the accuracy requirements, the current SWMM model can be output as the final SWMM model of the target area, among which the pollutant flux measured value can be calculated based on the basic data.

[0088] In some embodiments, the above-mentioned method of determining the model parameters in the updated SWMM model based on the particle swarm optimization algorithm and the measured pollutant flux values to obtain the final SWMM model of the target area includes:

[0089] Step 1: Generate a particle swarm in the model parameter solution space, where each particle represents a possible solution to the model parameters;

[0090] Step 2: Iterate the particle swarm and obtain the optimal solution of the particle swarm in each iteration. When the Nash coefficient of the pollutant flux simulation value corresponding to the optimal solution of the particle swarm and the measured value of the pollutant flux meets the model accuracy requirements, the final SWMM model of the target area is obtained.

[0091] In this embodiment, the particle swarm optimization algorithm may specifically include: since a model corresponds to at least one solution, a particle swarm can be generated in the model parameter solution space according to the approximate range of the solution; since the particle swarm algorithm uses a population-based search method like the evolutionary algorithm, it can simultaneously search more areas in the solution space of the objective function to be optimized, and can save the memory of its historical optimal position and the optimal position of all particles during the calculation process; in each evolutionary generation, the information of the particles is combined to adjust the speed component on each dimension, which is then used to calculate the new particle position. The particles continuously change their states in the multidimensional search space until they reach an equilibrium or optimal state, or exceed the calculation limit; therefore, the parameter solution can be represented by particles, and each particle represents a possible solution for a parameter; through iteration, the Nash coefficient of the pollutant flux simulation value corresponding to the optimal solution of the particle swarm after each iteration is calculated, and it is determined whether the current Nash coefficient meets the model accuracy requirements;

[0092] For example, the Nash coefficient (NSE) is calculated as:

[0093]

[0094] Among them, MF is the measured value of pollutant flux, SF is the simulated value of pollutant flux, and n is the length of the measured data sequence; when the Nash coefficient meets the model accuracy requirements, it proves that the current SWMM model meets the model accuracy requirements, that is, the current SWMM model can be used as the final SWMM model for the target area.

[0095] In some embodiments, in the above-mentioned step 2, the particle swarm is iterated, and each iteration obtains the particle swarm optimal solution. When the Nash coefficient of the pollutant flux simulation value and the pollutant flux measured value corresponding to the particle swarm optimal solution meets the model accuracy requirement, obtaining the final SWMM model of the target area may include:

[0096] Initialize the particle swarm;

[0097] Substitute each particle in the particle swarm into its corresponding parameter;

[0098] Simulating the updated SWMM model to obtain the pollutant flux simulation value;

[0099] Calculating the Nash coefficient between the measured pollutant flux value and the simulated pollutant flux value according to the Nash coefficient algorithm;

[0100] When the Nash coefficient meets the model accuracy requirements, the iteration is stopped and the final SWMM model of the target area is obtained;

[0101] When the Nash coefficient does not meet the model accuracy requirements, the position of each particle in the particle swarm corresponding to the pollutant flux simulation value used to calculate the Nash coefficient is updated according to the global optimal solution and the individual optimal solution, and the process jumps to the step of substituting each particle in the particle swarm into its corresponding parameter.

[0102] In this embodiment, the particle swarm initialization can randomly initialize the position and velocity, and then define the fitness function to calculate the individual fitness, the purpose of which is to select the individual optimal solution and the global optimal solution of the particle swarm; after substituting each particle into its corresponding parameter, the iteration begins, and the SWMM model after the boundary conditions are updated is updated according to the iteration, and the pollutant simulation flux therein is updated. When the calculated Nash coefficient meets the model accuracy requirement, the iteration is stopped and the current SWMM model is output, which is also the final SWMM model of the target area;

[0103] When the Nash coefficient does not meet the model accuracy requirements, the corresponding particle swarm will update the position of each particle according to the historical global optimal solution and the historical individual optimal solution, and jump back to the step of substituting the corresponding parameters for each particle in the particle swarm, starting a new iteration until the pollutant flux simulation value corresponding to the particle swarm meets the model accuracy requirements and stops the iteration.

[0104] Specifically, in each iteration, the local optimal position of all particles The position of the optimal Nash coefficient in is defined as the global optimal position . The particle velocity is updated as follows:

[0105]

[0106] in and are two independent random sequences. and is the acceleration coefficient, which represents the acceleration weight for each particle to converge to the local optimal position and the global optimal position. In addition, is the inertia weight that weighs the global and local search capabilities and is defined as:

[0107]

[0108] in is the total number of iterations. Then, the current position of each particle is updated as follows:

[0109]

[0110] If the Nash coefficient of the particle's new position is better, the local optimal position will be updated;

[0111] Finally, the global optimal position after iteration represents the optimal model parameters.

[0112] The following is an example of an implementation to illustrate the above-mentioned method for simulating the flux of pollutants in a water environment. Figure 2 :

[0113] In this embodiment, the SWMM model is used as the flux simulation basis, and the SWMM model is improved by the LSTM model and the PSO model parameter optimization algorithm to obtain the final SWMM model of the target area, which may specifically include:

[0114] Obtain basic data of the target area and then build an initial SWMM model based on the basic data;

[0115] Since water quality data becomes discretized in subsequent monitoring, in order not to affect the simulation accuracy of the SWMM model, the three types of data used for pollutant flux fitting, namely rainfall data, evaporation data, and discrete water quality data, can be input into the LSTM model. After fitting the LSTM model, more data can be predicted and then output according to the three types of data, namely rainfall data, evaporation data, and discrete water quality data, so that the degree of data discretization is reduced.

[0116] The initial SWMM model updates the initial boundary condition data, namely rainfall data, evaporation data, and discrete water quality data, based on the data output by the LSTM model, and then applies the PSO model parameter optimization algorithm for optimization iteration;

[0117] The PSO model parameter optimization algorithm can improve the efficiency of parameter calibration. When performing operations, it will first initialize the internal particle swarm. At this time, one particle represents a possible solution to the model parameters; then it starts the iterative operation, and substitutes each particle into the corresponding model. The SWMM model performs model simulation updates based on the substituted particles and calculates the current pollutant flux simulation value; and calculates the pollutant flux measured value based on the basic data to calculate the model accuracy of the current SWMM model based on the Nash coefficient. If the model accuracy of the current SWMM model meets the requirements, that is, the optimal solution of the particle swarm meets the accuracy requirements, the PSO model will stop iterating and output the current SWMM model as the final model of the target area; if the model accuracy of the current SWMM model does not meet the requirements, that is, the optimal solution of the particle swarm does not meet the accuracy requirements, the PSO model will update the position of each particle in the particle swarm according to the global optimal solution and the local optimal solution, and jump to the step of substituting each particle into the corresponding model to restart the iteration.

[0118] In summary, the embodiment of the present invention obtains basic data of the target area, wherein the basic data includes initial boundary condition data; on the one hand, an initial storm flood management model SWMM model is established based on the basic data; on the other hand, the initial boundary condition data in the basic data is fitted according to a pre-trained LSTM model, and the boundary condition data therein is predicted to obtain fitted boundary condition data, wherein the data volume of the fitted boundary condition data is greater than the data volume of the initial boundary condition data, and can well approximate the actual boundary condition data; through fitting, data with a high degree of discreteness in the water quality data can be predicted and increased, and operation and maintenance costs can be saved by reducing, for example, solving the existing section monitoring frequency. For cost saving, the acquisition frequency is adjusted from once every 4 hours to once a day, which causes data discretization problems and ensures that the input accuracy of the model boundary conditions is not significantly affected; then the initial boundary condition data in the initial SWMM model is updated to the fitted boundary condition data to obtain an updated SWMM model; the model parameters in the updated SWMM model are determined according to the particle swarm optimization algorithm to obtain the final SWMM model of the target area, and the model parameters are quickly and efficiently determined by the intelligent algorithm to select the optimal final SWMM model, thereby solving the problem of low efficiency in model parameter calibration. The present invention solves the problem of discretization of online water quality monitoring data, solves the problem of low efficiency of model parameter calibration by determining model parameters, and improves the accuracy of water environment pollutant flux simulation; in addition, this embodiment can be applied to pollutant fluxes in various water environments, including but not limited to different typical sections within the basin, and has wider practicality.

[0119] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0120] The following are device embodiments of the present invention. For details not fully described therein, reference may be made to the corresponding method embodiments described above.

[0121] Figure 3 The following is a schematic diagram showing the structure of a water environment pollutant flux simulation device provided by an embodiment of the present invention. For ease of explanation, only the parts related to the embodiment of the present invention are shown, which are described in detail as follows:

[0122] like Figure 3 As shown, a water environment pollutant flux simulation value device 3 includes:

[0123] An acquisition module 31 is used to acquire basic data of a target area, wherein the basic data includes initial boundary condition data;

[0124] A construction module 32 is used to establish an initial storm flood management model SWMM model based on basic data;

[0125] A fitting module 33 is used to fit the initial boundary condition data in the basic data to obtain fitted boundary condition data, wherein the amount of the fitted boundary condition data is greater than the amount of the initial boundary condition data;

[0126] The construction module 31 is further used to update the initial boundary condition data in the initial SWMM model to the fitted boundary condition data to obtain an updated SWMM model;

[0127] The optimization module 34 is used to determine the model parameters in the updated SWMM model to obtain the final SWMM model of the target area.

[0128] In some embodiments, the fitting module 33 may include: inputting the initial boundary conditions into a pre-trained long short-term memory network (LSTM) model to obtain fitted boundary condition data.

[0129] In some embodiments, the fitting module 33 may include: a long short-term memory network (LSTM) model trained with a training data set, wherein the training data set includes initial boundary condition data of a historical period.

[0130] In some embodiments, the initial boundary condition data in the acquisition module 31 may include rainfall data, evaporation data, and discrete water quality data;

[0131] The fitted boundary condition data include: rainfall data, evaporation data and fitted discrete water quality data.

[0132] In some embodiments, the optimization module 34 may include: determining model parameters in the updated SWMM model based on a particle swarm optimization algorithm and measured pollutant flux values to obtain a final SWMM model of the target area.

[0133] In some embodiments, the optimization module 34 specifically includes:

[0134] Generate a particle swarm in the model parameter solution space, where each particle represents a possible solution of the model parameters;

[0135] The particle swarm is iterated, and the optimal solution of the particle swarm is obtained in each iteration. When the Nash coefficient of the pollutant flux simulation value corresponding to the optimal solution of the particle swarm and the measured value of the pollutant flux meets the model accuracy requirements, the final SWMM model of the target area is obtained, among which the particle optimal solution includes the global optimal solution and the individual optimal solution.

[0136] In some embodiments, the optimization module 34 specifically includes:

[0137] Initialize the particle swarm;

[0138] Substitute each particle in the particle swarm into its corresponding parameter;

[0139] The updated SWMM model is simulated to obtain pollutant flux simulation values;

[0140] According to the Nash coefficient algorithm, the Nash coefficients of the measured pollutant flux and the simulated pollutant flux are calculated;

[0141] When the Nash coefficient meets the model accuracy requirements, the iteration is stopped and the final SWMM model of the target area is obtained;

[0142] When the Nash coefficient does not meet the model accuracy requirements, the position of each particle in the particle swarm corresponding to the pollutant flux simulation value used to calculate the Nash coefficient is updated according to the global optimal solution and the individual optimal solution, and the process jumps to the step of substituting each particle in the particle swarm into its corresponding parameter.

[0143] The embodiment of the present invention obtains basic data of the target area and establishes an initial storm water flood management model SWMM model according to the basic data; and fits the initial boundary condition data in the basic data according to a pre-trained LSTM model, predicts the boundary condition data therein, to obtain fitted boundary condition data, wherein the data volume of the fitted boundary condition data is greater than the data volume of the initial boundary condition data; through fitting, the data with a high degree of dispersion in the water quality data can be predicted and increased, and the fitted water quality data can better approximate the actual boundary condition data, solving the data discretization problem caused by the increase in acquisition frequency; then the initial boundary condition data in the initial SWMM model is updated to the fitted boundary condition data to obtain an updated SWMM model; the model parameters in the updated SWMM model are determined according to the particle swarm optimization algorithm to obtain the final SWMM model of the target area, and the optimal final SWMM model can be selected by determining the model parameters, solving the problem of low efficiency in model parameter calibration. The present invention solves the problem of discretization of online water quality monitoring data, solves the problem of low efficiency of model parameter calibration by determining model parameters, and improves the accuracy of water environment pollutant flux simulation; in addition, this embodiment can be applied to pollutant fluxes in various water environments, including but not limited to different typical sections within the basin, and has wider practicality.

[0144] Figure 4 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 4 As shown, the terminal 4 of this embodiment includes: a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40. When the processor 40 executes the computer program 42, the steps in each of the above-mentioned embodiments of the method for simulating the flux of pollutants in a water environment are implemented, for example Figure 1Alternatively, when the processor 40 executes the computer program 42, the functions of the modules in the above-mentioned device embodiments are realized, for example, Figure 3 The functions of the modules 31 to 34 are shown.

[0145] Exemplarily, the computer program 42 may be divided into one or more modules, which are stored in the memory 41 and executed by the processor 40 to implement the present invention. The one or more modules may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program 42 in the terminal 4. For example, the computer program 42 may be divided into Figure 3 Modules 31 to 34 are shown.

[0146] The terminal 4 can be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal 4 can include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will understand that Figure 4 It is only an example of terminal 4 and does not constitute a limitation on terminal 4. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.

[0147] The processor 40 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0148] The memory 41 may be an internal storage unit of the terminal 4, such as a hard drive or memory of the terminal 4. The memory 41 may also be an external storage device of the terminal 4, such as a plug-in hard drive, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Furthermore, the memory 41 may include both the internal storage unit of the terminal 4 and an external storage device. The memory 41 is used to store the computer program and other programs and data required by the terminal. The memory 41 may also be used to temporarily store data that has been output or is about to be output.

[0149] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0150] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0151] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0152] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical functional division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of devices or units, and can be electrical, mechanical, or other forms.

[0153] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0154] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0155] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention can implement all or part of the processes in the above-mentioned embodiment method by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned water environment pollutant flux simulation method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, 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. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable media does not include electrical carrier signals and telecommunication signals.

[0156] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. A method for simulating the flux of pollutants in a water environment, characterized in that: include: Acquiring basic data of the target area, wherein the basic data includes initial boundary condition data; Establishing an initial stormwater flood management SWMM model based on the basic data; Fitting the initial boundary condition data in the basic data to obtain fitted boundary condition data, wherein the amount of the fitted boundary condition data is greater than the amount of the initial boundary condition data; Updating the initial boundary condition data in the initial stormwater flood management SWMM model to the fitted boundary condition data to obtain an updated SWMM model; Determining model parameters in the updated SWMM model to obtain a final SWMM model of the target area; The step of determining the model parameters in the updated SWMM model to obtain the final SWMM model of the target area includes: Determining model parameters in an updated SWMM model based on a particle swarm optimization algorithm and measured pollutant flux values to obtain a final SWMM model of the target area; The method of determining the model parameters in the updated SWMM model based on the particle swarm optimization algorithm and the measured values of the pollutant flux to obtain the final SWMM model of the target area includes: generating a particle swarm in the model parameter solution space, wherein each particle represents a possible solution to the parameters of the model; Iterate the particle swarm, and obtain the particle swarm optimal solution in each iteration. When the Nash coefficient of the pollutant flux simulation value corresponding to the particle swarm optimal solution and the pollutant flux measured value meets the model accuracy requirement, obtain the final SWMM model of the target area, wherein the particle swarm optimal solution includes a global optimal solution and an individual optimal solution; The particle swarm is iterated to obtain the particle swarm optimal solution in each iteration. When the Nash coefficient of the pollutant flux simulation value corresponding to the particle swarm optimal solution and the pollutant flux measured value meets the model accuracy requirement, the final SWMM model of the target area is obtained, including: Initializing the particle swarm; Substitute each particle in the particle swarm into its corresponding parameter; simulating the updated SWMM model to obtain the pollutant flux simulation value; Calculating the Nash coefficient between the measured pollutant flux value and the simulated pollutant flux value according to the Nash coefficient algorithm; When the Nash coefficient meets the model accuracy requirement, the iteration is stopped to obtain the final SWMM model of the target area; When the Nash coefficient does not meet the model accuracy requirements, the position of each particle in the particle swarm corresponding to the pollutant flux simulation value used to calculate the Nash coefficient is updated according to the global optimal solution and the individual optimal solution, and the process jumps to the step of substituting each particle in the particle swarm into its corresponding parameter.

2. A method for simulating the flux of pollutants in a water environment according to claim 1, characterized in that: The fitting of the initial boundary condition data in the basic data to obtain fitted boundary condition data includes: The initial boundary conditions are input into a pre-trained long short-term memory network (LSTM) model to obtain fitted boundary condition data.

3. A method for simulating the flux of pollutants in a water environment according to claim 2, characterized in that: The long short-term memory network (LSTM) model is trained with a training data set, which includes initial boundary condition data of a historical period.

4. A method for simulating the flux of pollutants in a water environment according to any one of claims 1 to 3, characterized in that: The initial boundary condition data include: rainfall data, evaporation data and discrete water quality data; The fitted boundary condition data includes: the rainfall data, the evaporation data and the fitted discrete water quality data.

5. A water environment pollutant flux simulation device, characterized in that: include: An acquisition module, configured to acquire basic data of a target area, wherein the basic data includes initial boundary condition data; A construction module is used to establish an initial storm flood management SWMM model based on the basic data; a fitting module, configured to fit the initial boundary condition data in the basic data to obtain fitted boundary condition data, wherein the amount of the fitted boundary condition data is greater than the amount of the initial boundary condition data; The construction module is further configured to update the initial boundary condition data in the initial stormwater flood management SWMM model to the fitted boundary condition data to obtain an updated SWMM model; an optimization module for determining model parameters in the updated SWMM model to obtain a final SWMM model of the target area; The optimization module is specifically used to: Determining model parameters in an updated SWMM model based on a particle swarm optimization algorithm and measured pollutant flux values to obtain a final SWMM model of the target area; The optimization module is specifically used to: generating a particle swarm in the model parameter solution space, wherein each particle represents a possible solution to the parameters of the model; Iterate the particle swarm, and obtain the particle swarm optimal solution in each iteration. When the Nash coefficient of the pollutant flux simulation value corresponding to the particle swarm optimal solution and the pollutant flux measured value meets the model accuracy requirement, obtain the final SWMM model of the target area, wherein the particle swarm optimal solution includes a global optimal solution and an individual optimal solution; The optimization module is specifically used to: Initializing the particle swarm; Substitute each particle in the particle swarm into its corresponding parameter; simulating the updated SWMM model to obtain the pollutant flux simulation value; Calculating the Nash coefficient between the measured pollutant flux value and the simulated pollutant flux value according to the Nash coefficient algorithm; When the Nash coefficient meets the model accuracy requirement, the iteration is stopped to obtain the final SWMM model of the target area; When the Nash coefficient does not meet the model accuracy requirements, the position of each particle in the particle swarm corresponding to the pollutant flux simulation value used to calculate the Nash coefficient is updated according to the global optimal solution and the individual optimal solution, and the process jumps to the step of substituting each particle in the particle swarm into its corresponding parameter.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method for simulating the flux of pollutants in a water environment as described in any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for simulating the flux of pollutants in a water environment as described in any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Pre-selected water quality monitoring network multi-objective optimized deployment method for some monitoring points

    CN107908889A

  • Calculation method for simulating river channel water quality parameters based on SWMM model

    CN112434443A