River basin agricultural phosphorus source prevention and control measure optimization layout method, device, equipment and medium
By constructing a simulator to optimize watershed agricultural phosphorus source control measures, and combining rainfall, fertilizer application, and land use data, the problem of unstable treatment effects and high costs caused by fixed parameters in watershed non-point source pollution control was solved, achieving refined treatment and cost control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-24
- Publication Date
- 2026-04-07
AI Technical Summary
Existing watershed non-point source pollution control measures are designed with fixed parameters, which cannot adapt to dynamic changes in rainfall, fertilizer application, and land use, resulting in unstable control effects and high costs.
By constructing a simulator and combining rainfall, fertilizer application, and land use data, the parameters of the control measures are optimized. The objective function is solved using a Bayesian optimization algorithm to accurately predict the phosphorus load distribution and determine the optimal treatment plan.
It achieves stability of treatment effects and reasonable cost in dynamic pollution environments, accurately locates pollution hotspots, reduces waste of redundant facilities, and improves the level of precision in treatment.
Smart Images

Figure CN121810448A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pollution control technology, specifically to methods, devices, equipment, and media for optimizing the deployment of phosphorus source control measures in watershed agriculture. Background Technology
[0002] In related technologies, watershed non-point source pollution control often adopts a static and singular engineering deployment model, such as designing ecological ditches, buffer zones, or wetlands based on fixed control parameters (e.g., average annual rainfall or land use type). However, watershed non-point source pollution is affected by factors such as rainfall, fertilization, and dynamic changes in land use (e.g., differences in fertilization between crop growing and non-growing seasons). Relying solely on fixed parameters for pollution control cannot guarantee the effectiveness of the control measures and is also not conducive to controlling control costs. Summary of the Invention
[0003] This invention provides a method, apparatus, equipment, and medium for optimizing the layout of phosphorus source control measures in watershed agriculture, in order to solve the problems in related technologies where ecological ditches, buffer zones, or wetlands are designed with fixed control measures parameters, which cannot guarantee the treatment effect and are not conducive to controlling treatment costs.
[0004] In a first aspect, the present invention provides a method for optimizing the deployment of phosphorus source control measures in watershed agriculture. The method includes: acquiring rainfall data, fertilizer application data, land use data, random noise data, and constraint data of control measure parameters for a target area during a target time period; solving a pre-constructed objective function using the rainfall data, fertilizer application data, land use data, random noise data, and constraint data of control measure parameters to obtain target control measure parameters. The objective function is constructed with the goal of minimizing the sum of total phosphorus load and control measure costs within the target area. The total phosphorus load is determined based on phosphorus load distribution data for the target area. The phosphorus load distribution data is predicted by a pre-constructed simulator based on rainfall data, fertilizer application data, land use data, random noise data, and control measure parameters. The control measure costs are determined based on the control measure parameters.
[0005] The present invention provides an optimized deployment method for watershed agricultural phosphorus source control measures. By incorporating dynamic change data of rainfall, fertilizer application, and land use, and relying on a pre-constructed simulator to accurately predict phosphorus load distribution under different scenarios, this method completely overcomes the limitations of related technologies that cannot respond to dynamic changes in watershed pollution. It allows the obtained target control measure parameters to flexibly adapt to different time-frequency scenarios, effectively avoiding the problem of control measures failing in dynamic pollution environments due to fixed parameters in related technologies, thus fundamentally ensuring the stability of the control effect. Simultaneously, by constructing an objective function with the minimum sum of total phosphorus load and control cost as the core, and solving it in conjunction with the constraint data of control measure parameters, this method avoids the waste of redundant facilities caused by blindly deploying single projects in existing technologies. It also determines the optimal parameters by accurately matching pollution control needs, achieving on-demand control and significantly improving the rationality of cost control. Furthermore, the phosphorus load distribution data output by the simulator can more accurately locate pollution hotspots, allowing the target control measure parameters to be implemented in a targeted manner, replacing the extensive deployment of traditional technologies and further realizing refined control. Ultimately, while ensuring stable and reliable control effects, it maximizes the reduction of comprehensive control costs.
[0006] In one optional implementation, the simulator is constructed through the following steps: acquiring time-series data of rainfall, fertilizer application, land use, seasonal indicators, and phosphorus load distribution in a preset area; performing spatiotemporal alignment processing on the time-series data of rainfall, fertilizer application, land use, seasonal indicators, and phosphorus load distribution to obtain processed target spatiotemporal data; constructing training set data based on the target spatiotemporal data; training a preset adversarial network based on the training set data until the model converges to obtain the simulator. The preset adversarial network includes a generator and a discriminator. The generator is used to output simulated phosphorus load distribution data based on conditional information, including rainfall data, fertilizer application data, land use data, seasonal indicators, and random noise data. The discriminator is used to determine whether the simulated phosphorus load distribution data output by the generator is real based on the conditional information.
[0007] In one optional implementation, the step of solving a pre-constructed objective function using rainfall data, fertilizer application data, land use data, random noise data, and constraint data of control measures parameters to obtain target control measure parameters includes: inputting rainfall data, fertilizer application data, land use data, random noise data, and multiple control measure parameters into a pre-constructed simulator so that the simulator outputs phosphorus load distribution data under different control measure parameters; determining the total phosphorus load corresponding to each control measure parameter based on the phosphorus load distribution data of each control measure parameter; and iteratively solving the objective function using a preset optimization algorithm based on the total phosphorus load of multiple control measure parameters until convergence to obtain the target control measure parameters.
[0008] In one alternative implementation, the preset optimization algorithm includes a Bayesian optimization algorithm, a genetic algorithm, or a particle swarm optimization algorithm.
[0009] In an optional implementation, the method further includes: determining a phosphorus source control measure deployment scheme based on target control measure parameters.
[0010] In one alternative implementation, the objective function is:
[0011] in, This represents the sum of total phosphorus load and the cost of remediation measures. Indicates the parameters of the control measures. and Indicates the weighting coefficient. This represents phosphorus load distribution data. Indicates total phosphorus load. This indicates the cost of governance measures.
[0012] Secondly, the present invention provides a device for optimizing the deployment of phosphorus source control measures in watershed agriculture. The device includes: an acquisition module for acquiring rainfall data, fertilizer application data, land use data, random noise data, and constraint data of control measure parameters for a target area during a target time period; and a solution module for solving a pre-constructed objective function using the rainfall data, fertilizer application data, land use data, random noise data, and constraint data of control measure parameters to obtain target control measure parameters. The objective function is constructed with the goal of minimizing the sum of total phosphorus load and control measure costs within the target area. The total phosphorus load is determined based on phosphorus load distribution data for the target area. The phosphorus load distribution data is predicted by a pre-constructed simulator based on rainfall data, fertilizer application data, land use data, random noise data, and control measure parameters. The control measure costs are determined based on the control measure parameters.
[0013] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the optimized deployment method for watershed agricultural phosphorus source control measures as described in the first aspect or any corresponding embodiment.
[0014] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the optimized deployment method for watershed agricultural phosphorus source control measures as described in the first aspect or any corresponding embodiment.
[0015] Fifthly, the present invention provides a computer program product, including computer instructions, which are used to cause a computer to execute the method for optimizing the layout of phosphorus source control measures in watershed agriculture as described in the first aspect or any corresponding embodiment. Attached Figure Description
[0016] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of an application scenario according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the first process of the optimized deployment method for phosphorus source control measures in watershed agriculture according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the second process of the optimized deployment method for phosphorus source control measures in watershed agriculture according to an embodiment of the present invention; Figure 4 This is a structural block diagram of a watershed agriculture phosphorus source control measure optimization deployment device according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.
[0020] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0021] As an optional application scenario of this invention, the specific application environment architecture or specific hardware architecture on which the optimized deployment method for phosphorus source control measures in watershed agriculture depends is described here. For example... Figure 1 As shown, the architecture system may include at least one terminal device and at least one server. Figure 1 The system is illustrated in the example, which includes a computer 101, a mobile terminal 102, and a server 103, and the terminal devices such as the computer 101 and the mobile terminal 102 are connected to the server 103 through a network 110.
[0022] Specifically, the terminal device can be a smartphone, tablet, laptop, PDA, desktop computer, game console, smart TV, smart wearable device, in-vehicle terminal, VR (Virtual Reality) device, AR (Augmented Reality) device, etc. Server 103 can be a standalone physical server, a server cluster, a distributed system, or a cloud server providing cloud services. Network 110 can be a wired or wireless network, examples of which include, but are not limited to, the Internet, corporate intranet, local area network, wide area network, mobile communication network, and combinations thereof.
[0023] In related technologies, watershed non-point source pollution control often adopts a static, single engineering deployment model, such as designing ecological ditches, buffer zones, or wetlands based on fixed control parameters (e.g., average annual rainfall or land use type). However, watershed non-point source pollution is affected by factors such as rainfall, fertilizer application, and dynamic changes in land use (e.g., differences in fertilization between crop growing and non-growing seasons). Relying solely on fixed parameters for pollution control cannot guarantee the effectiveness of the measures and is also detrimental to controlling control costs. Specific drawbacks include: Performance issues: Static deployment measures cannot adapt to the phosphorus load impact brought by rainfall events with different return periods (such as rainstorms that occur once every 5 or 10 years), causing the project to fail under extreme weather conditions.
[0024] Functional limitations: Existing models are mostly calibrated based on historical data, making it difficult to simulate the dynamic impacts of future climate change or human activities, resulting in unstable efficiency of governance solutions.
[0025] Cost issues: Over-reliance on engineering measures and lack of optimization may lead to waste of resources, such as deploying redundant facilities in low-risk areas.
[0026] Technical bottleneck: Traditional numerical simulation methods (such as SWAT models) are computationally intensive and time-consuming, and cannot quickly generate a large number of scenarios to support dynamic optimization.
[0027] The root cause of the above problems lies in the fact that existing technologies do not fully consider the "time-frequency" characteristics (i.e., time dynamics and frequency characteristics), such as the impact of the recurrence period of rainfall events and seasonal variations on phosphorus migration.
[0028] In view of this, the embodiments of this application provide a method for optimizing the deployment of phosphorus source control measures in watershed agriculture, which can be applied to a server to achieve the optimized deployment of phosphorus source control measures in watershed agriculture. The method provided in this application incorporates dynamic data on rainfall, fertilization, and land use, and relies on a pre-built simulator to accurately predict phosphorus load distribution under different scenarios. This completely overcomes the limitations of related technologies that cannot respond to dynamic changes in watershed pollution. The method allows the obtained target control measures parameters to flexibly adapt to different time-frequency scenarios, effectively avoiding the problem of control measures failing in dynamic pollution environments due to fixed parameters, thus fundamentally ensuring the stability of the control effect. Simultaneously, by constructing an objective function with the minimum sum of total phosphorus load and control cost as the core, and solving it in conjunction with the constraint data of control measure parameters, it avoids the waste of redundant facilities caused by blindly deploying single projects in existing technologies. Furthermore, it determines the optimal parameters by accurately matching pollution control needs, achieving on-demand control and significantly improving the rationality of cost control. The phosphorus load distribution data output by the simulator can more accurately locate pollution hotspots, allowing the target control measures parameters to be implemented in a targeted manner, replacing the extensive deployment of traditional technologies and further realizing refined control. Ultimately, while ensuring stable and reliable control effects, it maximizes the reduction of comprehensive control costs.
[0029] According to an embodiment of the present invention, an embodiment of a method for optimizing the deployment of phosphorus source control measures in watershed agriculture is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0030] This embodiment provides a method for optimizing the deployment of phosphorus source control measures in watershed agriculture, which can be used in the aforementioned server. Figure 2 This is a flowchart of a method for optimizing the deployment of phosphorus source control measures in watershed agriculture according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: Step S201: Obtain rainfall data, fertilizer application data, land use data, random noise data, and constraint data of control measures parameters for the target area during the target time period.
[0031] For example, the target area refers to a specific watershed that needs to carry out agricultural phosphorus source control, such as the watershed area covered by a certain river; the target time period refers to the specific time range corresponding to the control, such as one hydrological year or the complete crop growth cycle, which needs to cover the growing season and non-growing season; rainfall data refers to the rainfall intensity and distribution data (unit mm) of different return periods (such as once a year, once a five-year return period) within the target time period, reflecting the time frequency characteristics of rainfall; fertilizer application data is the agricultural fertilizer application amount (unit kg / ha) in stages (growing season and non-growing season) within the target time period, reflecting the temporal dynamic differences of fertilization; land use data: spatial distribution and dynamic update data of land types such as farmland, forest land, and urban areas within the target area, mostly in classification coding format; random noise data is a random vector that follows a normal distribution N (0,1), used to introduce randomness into phosphorus load simulation and ensure data diversity; constraint data of control measure parameters: value range restrictions for various control measures (such as buffer zone width 5-20m, fertilizer reduction ratio 10-30%), clarifying the boundary of parameter optimization. In this application embodiment, the parameters of the control measures may include, but are not limited to, the buffer zone width B (m), the density of ecological ditches D (km / km²), the wetland area W (ha), and the fertilizer reduction ratio P (%).
[0032] Step S202: Solve the pre-constructed objective function using rainfall data, fertilizer application data, land use data, random noise data, and constraint data of the control measures parameters to obtain the target control measures parameters. The objective function is constructed with the goal of minimizing the sum of total phosphorus load and control measures cost within the target area. The total phosphorus load is determined based on the phosphorus load distribution data of the target area. The phosphorus load distribution data is predicted by the pre-constructed simulator based on rainfall data, fertilizer application data, land use data, random noise data, and control measures parameters. The control measures cost is determined based on the control measures parameters.
[0033] For example, the objective function is constructed with the goal of minimizing the sum of total phosphorus load and remediation cost within the target area. The total phosphorus load is determined based on phosphorus load distribution data of the target area. This phosphorus load distribution data is predicted by a pre-built simulator based on rainfall data, fertilizer application data, land use data, random noise data, and control measure parameters. The cost of the remediation measures is determined based on the control measure parameters. In this embodiment, the objective is to minimize the total phosphorus load plus the remediation cost. Data such as rainfall and fertilizer application, along with control measure parameters, are used as constraints. The simulator predicts the phosphorus load distribution and calculates the cost. After solving the objective function, the optimal control measure parameters are obtained. Specifically, a Bayesian optimization algorithm can be used to solve the objective function.
[0034] The optimized deployment method for watershed agricultural phosphorus source control measures provided in this embodiment incorporates dynamic data on rainfall, fertilizer application, and land use, and relies on a pre-built simulator to accurately predict phosphorus load distribution under different scenarios. This completely overcomes the limitations of related technologies that cannot respond to dynamic changes in watershed pollution. The solved target control measure parameters can be flexibly adapted to different time-frequency scenarios, effectively avoiding the problem of control measures failing in dynamic pollution environments due to fixed parameters in related technologies, and fundamentally ensuring the stability of the control effect. At the same time, the objective function is constructed with minimizing the sum of total phosphorus load and control cost as the core, and solved in combination with the constraint data of control measure parameters. This avoids the waste of redundant facilities caused by blind deployment of single projects in existing technologies, and can determine the optimal parameters by accurately matching pollution control needs, achieving on-demand control and significantly improving the rationality of cost control. Furthermore, the phosphorus load distribution data output by the simulator can more accurately locate pollution hotspots, allowing the target control measure parameters to be implemented in a targeted manner, replacing the extensive deployment of traditional technologies, and further realizing refined control. Ultimately, while ensuring stable and reliable control effects, it maximizes the reduction of comprehensive control costs.
[0035] This embodiment provides a method for optimizing the deployment of phosphorus source control measures in watershed agriculture, which can be used in the aforementioned server. Figure 3 This is a flowchart of a method for optimizing the deployment of phosphorus source control measures in watershed agriculture according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps: Step S301: Obtain rainfall data, fertilizer application data, land use data, random noise data, and constraint data for control measures parameters for the target area during the target time period. For details, please refer to [link to relevant documentation]. Figure 2 Step S201 of the illustrated embodiment will not be described again here.
[0036] Step S302: Solve the pre-constructed objective function using rainfall data, fertilizer application data, land use data, random noise data, and constraint data of the control measures parameters to obtain the target control measures parameters. The objective function is constructed with the goal of minimizing the sum of the total phosphorus load and the cost of the control measures within the target area. The total phosphorus load is determined based on the phosphorus load distribution data of the target area. The phosphorus load distribution data is predicted by the pre-constructed simulator based on rainfall data, fertilizer application data, land use data, random noise data, and control measures parameters. The cost of the control measures is determined based on the control measures parameters.
[0037] Specifically, step S302 includes: Step S3021: Input rainfall data, fertilizer application data, land use data, random noise data, and multiple control measure parameters into the pre-built simulator so that the simulator outputs phosphorus load distribution data under different control measure parameters.
[0038] For example, data such as rainfall, fertilizer application, land use, and random noise, along with multiple sets of different control measures parameters, are input into a pre-built simulator, which then outputs the watershed phosphorus load distribution corresponding to each set of control measures parameters.
[0039] In some alternative implementations, the above simulator is constructed through the following steps: Step a1: Obtain time-series data on rainfall, fertilizer application, land use, seasonal indicators, and phosphorus load distribution for the preset area.
[0040] For example, in this embodiment of the application, five types of key data that change over time within a designated treatment area are collected, covering pollution driving factors, temporal characteristics, and pollution results, providing basic data support for subsequent training of phosphorus load simulators and optimization of control measures. The preset area is a specific watershed where agricultural phosphorus source control treatment is planned, such as the complete watershed area covered by a river, which is the spatial boundary for data collection. Rainfall time-series data refers to rainfall data recorded in a time series within the preset area, such as records by ten-day period, by month, or by rainfall event, including rainfall intensity with different return periods, and corely reflecting the temporal dynamics and intensity differences in the time-frequency characteristics of rainfall. Fertilizer application time-series data refers to agricultural fertilization data recorded in a time series within the preset area, such as records by crop growing season, non-growing season, and by fertilization node, reflecting the differences in fertilization intensity at different time stages, and is the core source data of phosphorus pollution. Seasonal indicator data is binary or categorical data used to distinguish time stages, such as growing season = 1, non-growing season = 0, directly related to the impact of fertilizer application and rainfall on phosphorus loss, and is the core identifier reflecting the time stage differences in time-frequency characteristics. Phosphorus load distribution time series data refers to the spatial distribution data of phosphorus load recorded in a time series within a preset area, such as the total phosphorus content of a 100m×100m grid. It includes both the total phosphorus load changes at different times and the spatial migration of pollution hotspots, and is the core data reflecting the pollution results.
[0041] Step a2 involves performing spatiotemporal alignment processing on the time-series data of rainfall, fertilizer application, land use, seasonal indicators, and phosphorus load distribution to obtain the processed target spatiotemporal data.
[0042] For example, in the embodiments of this application, the specific content of the spatiotemporal alignment processing is not limited, as long as it is reasonable.
[0043] Step a3: Construct training set data based on the target spatiotemporal data.
[0044] Step a4: Train the preset adversarial network based on the training set data until the model converges to obtain the simulator. The preset adversarial network includes a generator and a discriminator. The generator is used to output simulated phosphorus load distribution data based on conditional information, including rainfall data, fertilizer application data, land use data, seasonal indicator data, and random noise data. The discriminator is used to determine whether the simulated phosphorus load distribution data output by the generator is real based on the conditional information.
[0045] For example, the pre-defined adversarial network may include, but is not limited to, a generative adversarial network (GAN). In this embodiment, the pre-defined adversarial network is trained using training data, and the final generator can produce a phosphorus load spatial distribution map that is sufficiently realistic. The loss function is shown in the following equation:
[0046] in, The total loss function of the conditional generative adversarial network is the core objective of the "adversarial game" between the discriminator (D) and the generator (G), and its numerical change reflects the training equilibrium state of the two. This represents the actual phosphorus load data; Represents actual phosphorus load data The probability distribution of the real data, that is, the probability pattern of the occurrence of the real data in all possible phosphorus load distribution scenarios; To obtain actual phosphorus load data The expected value (statistical average) represents the average result calculated after traversing all real data samples, and is used to quantify the overall recognition effect of the discriminator on real data. The conditional information, namely the key data driving changes in phosphorus load, includes time-frequency characteristic data such as rainfall, fertilizer application, land use, and seasonal indicators, and is the core input condition for the generator and discriminator. This represents the output of the discriminator (probability value, 0-1), indicating "under the condition..." (e.g., under a specific return period of rainfall and growing season) the discriminator determines the true data. "Probability of the true phosphorus load distribution" - the closer it is to 1, the more accurate the discriminator's identification. This represents a random noise vector that follows a normal distribution N(0,1) with a dimension of 100. It is used to introduce randomness into the generator to ensure that the generated phosphorus load data is diverse. Represents random noise The probability distribution defines the generation rules of the noise vector; To handle random noise The mathematical expectation of represents the average result calculated after traversing all random noise samples, and is used to quantify the overall recognition effect of the discriminator on the generated data. The output of the generator, i.e., "under the condition..." Below, input random noise The simulated phosphorus load spatial distribution map generated later is the object that the discriminator uses to identify "false data"; The output of the discriminator (probability value, 0-1) represents "under the condition..." Next, the discriminator judges the simulated data output by the generator. "Probability of the true phosphorus load distribution" means that the closer the value is to 0, the more accurately the discriminator identifies false data. The generator needs to optimize this value to be close to 1.
[0047] Step S3022: Determine the total phosphorus load corresponding to each parameter based on the phosphorus load distribution data of each control measure parameter.
[0048] For example, in this embodiment of the application, the total phosphorus load corresponding to the set of parameters can be obtained by summing up the phosphorus load of the entire watershed based on the phosphorus load spatial distribution data corresponding to each set of control measures parameters.
[0049] Step S3023: Based on the total phosphorus load of multiple control measures parameters, the objective function is iteratively solved using a preset optimization algorithm until convergence, thereby obtaining the target control measures parameters.
[0050] For example, the preset optimization algorithm includes Bayesian optimization, genetic algorithm, or particle swarm optimization. The objective function is:
[0051] in, This represents the sum of total phosphorus load and the cost of remediation measures. Indicates the parameters of the control measures. and Indicates the weighting coefficient. This represents phosphorus load distribution data. Indicates total phosphorus load. This indicates the cost of governance measures.
[0052] Bayesian optimization models the objective function using a Gaussian process and selects the next evaluation point based on the acquisition function (such as the expected improvement in EI). It iterative updates continue until convergence, outputting the optimal combination of governance measures. And predict the phosphorus load reduction rate. Specifically, the "baseline total phosphorus load without control measures" is first obtained through the generator under the same time-frequency scenario, and then the "total phosphorus load after taking a certain set of control measures" is obtained. The difference between the two is divided by the baseline total phosphorus load, and the resulting ratio is the predicted phosphorus load reduction rate of the set of measures.
[0053] Step S303: Determine the phosphorus source control measure deployment scheme based on the target control measure parameters.
[0054] For example, by taking the target control measures parameters (such as buffer zone width, ditch density, etc.) as the core, and combining them with phosphorus load distribution data to locate pollution hotspots, and adapting them to the time and frequency characteristics such as rainfall and seasons, the parameters are transformed into specific spatial deployment locations, project scales and time period implementation requirements, forming a feasible phosphorus source control measures deployment plan.
[0055] The following specific embodiments illustrate the optimized deployment method for phosphorus source control measures in watershed agriculture provided in this application.
[0056] Example: This application discloses a method for dynamically deploying watershed phosphorus control measures based on a computer program. Its core is to generate pollution scenarios through GAN and combine them with optimization algorithms to find the best measures.
[0057] Input layer: conditional information (rainfall, fertilizer application, land use map, etc.) and random noise.
[0058] Processing layer: Step 1: Train the contamination scenario generator (GAN). Step 2: Use a generator to find the best governance solution (Bayesian optimization). Output layer: Optimal combination of treatment measures and prediction of phosphorus load reduction effect.
[0059] The specific steps include: Step 1: Build and train the "contamination scenario generator".
[0060] Objective: To learn the spatial distribution pattern of phosphorus load in a watershed and generate a realistic phosphorus load distribution map as a rapid simulator.
[0061] enter: 1. A random noise vector z ~ N(0,1) (with a dimension of 100, used to introduce randomness). 2. Conditional information (cc) includes rainfall (RR) (mm), fertilizer application rate (FF) (kg / ha), land use map (LL) (classification code), and seasonal indicator (SS) (growing season = 1, non-growing season = 0), etc. This conditional information is embedded through a convolutional layer.
[0062] Output: Generated phosphorus load spatial distribution map G(z,c) (resolution consistent with the real data, such as 100m×100m grid).
[0063] Discriminator (D) input: Real phosphorus load data Xreal (from monitoring or simulation) or generated data G(z,c).
[0064] Discriminator (D) output: Determines whether the input data is "real" or "generated".
[0065] Training process: The conditional GAN (cGAN) architecture is adopted. The generator (G) and discriminator (D) are trained through a mini-maximum game. Finally, the generator can produce a phosphorus load spatial distribution map that is realistic enough to fool people.
[0066] Alternative steps: 1. The generator can be replaced by a variational autoencoder (VAE), but the data generated by GAN is clearer and more diverse; 2. Conditional information can be expanded to include temperature, soil type, etc., but this will increase computational complexity.
[0067] Taking a specific watershed as an example, the input conditions are: rainfall (return period 1-10 years), fertilizer application rate (150 kg / ha during the growing season, 50 kg / ha during the non-growing season), and land use (farmland, forest, urban areas). After training, the generator outputs a phosphorus load distribution map. It displays a comparison between the actual and generated phosphorus load distributions, including spatial hotspots (such as downstream areas of farmland). The correlation coefficient between the generated data and the actual data is above 0.85, demonstrating the effectiveness of the generator.
[0068] Step 2, optimization of governance solutions, aims to use the trained generator as a fast simulator to optimize the deployment of governance measures.
[0069] Input: 1. A trained generator G; 2. Governance measures as new conditions c′, including buffer zone width B (m), ecological ditch density D (km / km²), wetland area W (ha), and fertilizer reduction ratio P (%).
[0070] Optimization Process: 1. Using the Bayesian optimization algorithm, a target function is constructed to minimize total phosphorus load and cost. 2. Bayesian optimization models the target function using a Gaussian process and selects the next evaluation point based on the acquisition function (as expected to improve EI), iteratively updating until convergence. Output: Optimal combination of governance measures c′ And predict the phosphorus load reduction rate.
[0071] Alternative steps: 1. The optimization algorithm can be replaced by genetic algorithm or particle swarm optimization, but Bayesian optimization is more efficient in low-dimensional space.
[0072] 2. Constraints (such as maximum cost limits) can be added to the objective function and handled using the Lagrange multiplier method.
[0073] Example application: In the same watershed, the scope of management measures was set as follows: buffer zone width 5-20m, fertilizer reduction 10-30%. After 200 iterations of optimization, the optimal solution was obtained: buffer zone 15m, fertilizer reduction 20%, predicted phosphorus load reduction 35%, and cost reduction 20%.
[0074] The method provided in this application, through its time-frequency characteristics (such as return period rainfall and seasonal dynamics), allows the solution to adapt to different hydrological conditions throughout the year, avoiding engineering failure. For example, buffer zones are prioritized during the growing season, while wetlands are emphasized during the non-growing season, increasing the average phosphorus load reduction rate by more than 25% (based on simulation data). A generator is used to quickly generate scenarios, replacing traditional simulations and reducing computation time by 70% (from several days to hours). Furthermore, optimized algorithms avoid over-deployment, and the expected cost reduction is 15-30%. The solution remains highly efficient under various hydrological and meteorological scenarios (such as extreme rainfall events), demonstrating resilient governance. Test data shows that under a 10-year return period rainfall, phosphorus load fluctuations are less than 10%, while static methods show fluctuations exceeding 50%. The high-resolution phosphorus load map generated by GAN can identify pollution hotspots, enabling precise spatial deployment and improving governance efficiency.
[0075] This embodiment also provides a device for optimizing the deployment of phosphorus source control measures in watershed agriculture. This device is used to implement the above embodiments and preferred embodiments, and will not be repeated for details already described. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0076] This embodiment provides an optimized deployment device for phosphorus source control measures in watershed agriculture, such as... Figure 4 As shown, it includes: The acquisition module 401 is used to acquire rainfall data, fertilizer application data, land use data, random noise data, and constraint data of control measures parameters for the target area during the target time period. The solver module 402 is used to solve a pre-constructed objective function using rainfall data, fertilizer application data, land use data, random noise data, and constraint data of control measures parameters to obtain the target control measures parameters. The objective function is constructed with the goal of minimizing the sum of total phosphorus load and control measures cost within the target area. The total phosphorus load is determined based on the phosphorus load distribution data of the target area. The phosphorus load distribution data is predicted by a pre-constructed simulator based on rainfall data, fertilizer application data, land use data, random noise data, and control measures parameters. The control measures cost is determined based on the control measures parameters.
[0077] In some alternative implementations, the simulator is constructed through the following steps: Acquire time-series data of rainfall, fertilizer application, land use, seasonal indicators, and phosphorus load distribution for the preset area; The time-series data of rainfall, fertilizer application, land use, seasonal indicators, and phosphorus load distribution are spatiotemporally aligned to obtain the processed target spatiotemporal data. Training set data is constructed based on the target spatiotemporal data; The pre-defined adversarial network is trained based on the training set data until the model converges, resulting in a simulator. The pre-defined adversarial network includes a generator and a discriminator. The generator is used to output simulated phosphorus load distribution data based on conditional information, including rainfall data, fertilizer application data, land use data, seasonal indicator data, and random noise data. The discriminator is used to determine whether the simulated phosphorus load distribution data output by the generator is real based on the conditional information.
[0078] In some optional implementations, the solver module 402 includes: The first determination submodule is used to input rainfall data, fertilizer application data, land use data, random noise data, and multiple control measure parameters into a pre-built simulator so that the simulator outputs phosphorus load distribution data under different control measure parameters. The second determination submodule is used to determine the total phosphorus load corresponding to each parameter based on the phosphorus load distribution data of each control measure parameter; The solution submodule is used to iteratively solve the objective function based on the total phosphorus load of multiple control measures parameters using a preset optimization algorithm until convergence, thereby obtaining the target control measures parameters.
[0079] In some alternative implementations, the preset optimization algorithm includes a Bayesian optimization algorithm, a genetic algorithm, or a particle swarm optimization algorithm.
[0080] In some alternative embodiments, the above-described apparatus further includes: The determination module is used to determine the phosphorus source control measure deployment scheme based on the target control measure parameters.
[0081] In some alternative implementations, the objective function is:
[0082] in, This represents the sum of total phosphorus load and the cost of remediation measures. Indicates the parameters of the control measures. and Indicates the weighting coefficient. This represents phosphorus load distribution data. Indicates total phosphorus load. This indicates the cost of governance measures.
[0083] The watershed agriculture phosphorus source control measure optimization deployment device provided in this embodiment of the invention can execute the watershed agriculture phosphorus source control measure optimization deployment method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method. Further functional descriptions of the above modules and units are the same as in the corresponding embodiments described above, and will not be repeated here.
[0084] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0085] The following is a detailed reference. Figure 5 The diagram illustrates a structural schematic suitable for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from memory 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the electronic device. The processor 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0086] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.
[0087] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a memory 508, or installed from a ROM 502. When the computer program is executed by the processor 501, it performs the functions defined in the optimized deployment method for watershed agricultural phosphorus source control measures according to embodiments of the present invention.
[0088] Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.
[0089] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the optimized deployment method for watershed agricultural phosphorus source control measures shown in the above embodiments is implemented.
[0090] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0091] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for optimizing the layout of phosphorus source control measures in watershed agriculture, characterized in that, The method includes: Acquire rainfall data, fertilizer application data, land use data, random noise data, and constraint data of control measures parameters for the target area during the target time period; The objective function is solved using the rainfall data, fertilizer application data, land use data, random noise data, and constraint data of the control measures parameters to obtain the target control measures parameters. The objective function is constructed with the goal of minimizing the sum of the total phosphorus load and the cost of the control measures within the target area. The total phosphorus load is determined based on the phosphorus load distribution data of the target area. The phosphorus load distribution data is predicted by a pre-built simulator based on the rainfall data, fertilizer application data, land use data, random noise data, and control measures parameters. The cost of the control measures is determined based on the control measures parameters.
2. The method according to claim 1, characterized in that, The simulator is constructed through the following steps: Acquire time-series data of rainfall, fertilizer application, land use, seasonal indicators, and phosphorus load distribution for the preset area; The time-series data of rainfall, fertilizer application, land use, seasonal indicators, and phosphorus load distribution are spatiotemporally aligned to obtain the processed target spatiotemporal data. Training set data is constructed based on the target spatiotemporal data; The preset adversarial network is trained based on the training set data until the model converges to obtain the simulator. The preset adversarial network includes a generator and a discriminator. The generator is used to output simulated phosphorus load distribution data based on conditional information, including rainfall data, fertilizer application data, land use data, seasonal indicator data, and random noise data. The discriminator is used to determine whether the simulated phosphorus load distribution data output by the generator is real based on the conditional information.
3. The method according to claim 1 or 2, characterized in that, The steps of solving a pre-constructed objective function using the rainfall data, fertilizer application data, land use data, random noise data, and constraint data of the control measures parameters to obtain the target control measures parameters include: The rainfall data, fertilizer application data, land use data, random noise data, and multiple control measure parameters are input into the pre-built simulator so that the simulator outputs phosphorus load distribution data under different control measure parameters. The total phosphorus load corresponding to each parameter is determined based on the phosphorus load distribution data of each control measure parameter; Based on the total phosphorus load of multiple control measures parameters, the objective function is iteratively solved using a preset optimization algorithm until convergence, thereby obtaining the target control measures parameters.
4. The method according to claim 3, characterized in that, The preset optimization algorithm includes Bayesian optimization algorithm, genetic algorithm or particle swarm optimization algorithm.
5. The method according to claim 1, characterized in that, The method further includes: The phosphorus source control measure deployment scheme is determined based on the target control measure parameters.
6. The method according to claim 1, characterized in that, The objective function is: in, This represents the sum of total phosphorus load and the cost of remediation measures. Indicates the parameters of the control measures. and Indicates the weighting coefficient. This represents phosphorus load distribution data. Indicates total phosphorus load. This indicates the cost of governance measures.
7. A device for optimizing the deployment of phosphorus source control measures in watershed agriculture, characterized in that, The device includes: The acquisition module is used to acquire rainfall data, fertilizer application data, land use data, random noise data, and constraint data of control measures parameters for the target area during the target time period. The solution module is used to solve a pre-constructed objective function using the rainfall data, fertilizer application data, land use data, random noise data, and constraint data of the control measures parameters to obtain the target control measures parameters. The objective function is constructed with the goal of minimizing the sum of the total phosphorus load and the cost of the control measures within the target area. The total phosphorus load is determined based on the phosphorus load distribution data of the target area. The phosphorus load distribution data is predicted by a pre-constructed simulator based on the rainfall data, fertilizer application data, land use data, random noise data, and control measures parameters. The cost of the control measures is determined based on the control measures parameters.
8. An electronic device, characterized in that, include: The system includes a memory and a processor, which are interconnected. The memory stores computer instructions, and the processor executes the computer instructions to perform the optimized deployment method for watershed agricultural phosphorus source control measures as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the method for optimizing the layout of watershed agricultural phosphorus source control measures as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, The method includes computer instructions for causing a computer to execute the optimized deployment method for watershed agricultural phosphorus source control measures as described in any one of claims 1 to 6.