A river network water quality simulation method and system based on a cloud platform
By building a river network water quality simulation system on a cloud platform, and combining hydrodynamic models and water quality monitoring data, accurate simulation and visualization of river network water quality are achieved. This solves the problem of insufficient accuracy of initial conditions in existing technologies, improves the intelligence and visualization level of water quality monitoring and early warning, and is applicable to various water environment management scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2026-03-20
AI Technical Summary
Existing methods for simulating river network water quality lack precision in determining initial simulation conditions and cannot effectively capture spatiotemporal coupling characteristics, resulting in systematic deviations in the initial concentration field setting.
Based on the cloud platform, a river network hydrodynamic model is constructed. Combined with water quality monitoring data and water level and flow data, the K-means clustering algorithm is used to divide the water quality into groups, an uncalibrated preliminary coupled model is constructed, and the initial water quality field is determined. The model parameters are optimized using the Nash efficiency coefficient, and the data of the subdivided river segments is formed by adaptive cutting. Combined with the flow velocity information, the pollutant particle animation is rendered to realize the simulation of pollutant diffusion.
It enables accurate modeling and real-time tracking of pollutant diffusion processes in complex aquatic environments, improving the intelligence and visualization of water quality monitoring and early warning. It supports concurrent access by multiple users, reduces system deployment costs and maintenance difficulty, and is suitable for scenarios such as urban black and odorous water body treatment and emergency water pollution event simulation.
Smart Images

Figure CN120850849B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of water quality simulation, in particular to a river network water quality simulation method and system based on a cloud platform. BACKGROUND
[0002] River network water quality simulation is a technology for predicting and analyzing the changes of water quality in river networks through mathematical models and calculation methods. When constructing a river network water quality model, it is necessary to first extract the river network and construct its topological structure based on GIS hydrological analysis, establish the topological relationship between pollution sources and the river network, calculate the pollution source strength, and initialize the river network flow. In the simulation operation stage, the in-order traversal form of the depth-first algorithm is used to traverse the river network, realize water quality simulation operation, and calculate the pollutant concentration of the calculation unit and the pollutant concentration of the upstream calculation unit, which conforms to the one-dimensional dynamics relationship. In the model verification link, the accuracy of the model is verified by comparing with the measured water quality data, such as TP and NH3-N data, and the results show that the model has good simulation capability for NH3-N and slightly lower simulation accuracy for TP, but the overall simulation effect is good.
[0003] The existing water quality simulation method generally has the problem of insufficient accuracy in determining the initial simulation conditions. The traditional method usually adopts a single spatial interpolation technique, such as simple distance weighting method or Kriging interpolation method, which only considers the spatial distance relationship between monitoring stations and ignores the time characteristics of water flow. In the river network system, it takes a certain time for pollutants to be transported from upstream to downstream, and the pollution condition at a certain moment in the upstream will affect the water quality condition in the downstream after a delay. The traditional interpolation method cannot effectively capture this spatio-temporal coupling feature, resulting in systematic deviation in the setting of the initial concentration field. SUMMARY
[0004] Therefore, it is necessary to provide a river network water quality simulation method and system based on a cloud platform to solve at least one of the above technical problems.
[0005] To achieve the above purpose, a river network water quality simulation method based on a cloud platform comprises the following steps:
[0006] Step S1: Obtain river network basic data, river section data, river terrain data, water quality monitoring data and water level flow data, construct a river water dynamic model according to the river network basic data, river terrain data and river section data, determine the water quality group classification according to the river water dynamic model combined with the water quality monitoring data and the water level flow data, and construct a preliminary coupled model;
[0007] Step S2: Determine the water quality initial field of the preliminary coupled model according to the water quality monitoring data to obtain a water quality initial concentration field model;
[0008] Step S3: Perform model calibration and accuracy evaluation on the initial water quality concentration field model based on the Nash efficiency coefficient to obtain the hydrodynamic-water quality coupled model; based on the water quality calibration results of each section of the hydrodynamic-water quality coupled model, perform adaptive segmentation processing on the river segment between the upstream and downstream sections to form subdivided river segment data;
[0009] Step S4: Based on the subdivided river segment data, perform linear interpolation of water quality component concentrations for each river segment, and render and color-code the values of each water quality component in each sub-river segment according to the preset color band mapping table to obtain the river segment rendering data.
[0010] Step S5: Based on the river section rendering data and the flow velocity in the hydrodynamic-water quality coupling model, perform pollutant particle animation rendering to obtain the water quality diffusion simulation rendering results.
[0011] The present invention also provides a cloud-based river network water quality simulation system for executing the above-described cloud-based river network water quality simulation method, wherein the cloud-based river network water quality simulation system comprises:
[0012] The river network modeling module is used to acquire basic river network data, river cross-section data, river topography data, water quality monitoring data, and water level and flow data. Based on the basic river network data, river topography data, and river cross-section data, a river network hydrodynamic model is constructed. Based on the river network hydrodynamic model and combined with water quality monitoring data and water level and flow data, the water quality component categories are determined, and an uncalibrated preliminary coupled model is constructed.
[0013] The initial water quality field module is used to determine the initial water quality field of the preliminary coupled model based on water quality monitoring data, so as to obtain the initial concentration field model of water quality.
[0014] The model calibration and segmentation module is used to calibrate and evaluate the accuracy of the initial water quality concentration field model based on the Nash efficiency coefficient, resulting in a hydrodynamic-water quality coupled model. Based on the water quality calibration results of each section of the hydrodynamic-water quality coupled model, the river segment between the upstream and downstream sections is adaptively segmented to form subdivided river segment data.
[0015] The rendering color determination module is used to perform linear interpolation of water quality component concentrations in each river segment based on the subdivided river segment data, and to render and determine the values of each water quality component in each sub-river segment according to the preset color band mapping table, so as to obtain the river segment rendering data.
[0016] The diffusion simulation module is used to perform pollutant particle animation rendering based on the river section rendering data and the flow velocity in the hydrodynamic-water quality coupling model, so as to obtain the water quality diffusion simulation rendering results.
[0017] This invention, based on a cloud platform architecture, constructs a complete dynamic simulation and visualization system for river network water quality. This system enables precise modeling, real-time tracking, and three-dimensional dynamic representation of pollutant diffusion processes in complex aquatic environments, significantly improving the intelligence and visualization level of water quality monitoring and early warning. The method uses rendered river segment data as a foundation, integrating hydrodynamic-water quality coupling model information. Starting from the river network centerline and sub-segment divisions, it gradually constructs basic flow field data containing velocity vectors and water quality concentrations. This data not only ensures the spatial continuity and temporal synchronization of simulation accuracy but also lays the physical foundation for subsequent particle-level pollutant behavior modeling. Based on this, by deploying particle emission sources at key locations such as the river cross-section and centerline, the spatial distribution simulation of the initial state of pollutants is achieved. The direct link between emission point density and pollutant concentration ensures that the particle generation process conforms to the actual concentration differences of pollution sources while guaranteeing the rationality of simulation resource allocation. Furthermore, the particle attribute settings reflect the refined approach of object-oriented modeling. Each particle is assigned a unique identifier, pollutant attributes, lifecycle, and other elements, giving it an independent trajectory and evolutionary logic during subsequent simulations, enhancing the system's adaptability to complex water quality change scenarios. Combined with the real-time updated two-dimensional velocity vector in the hydrodynamic model, each particle is dynamically assigned its velocity and direction of motion, achieving realistic simulation of particle flow trajectories within the water body, maintaining high accuracy, particularly in river network confluence areas and tributary areas with frequently changing flow directions. The frame-by-frame update mechanism for particle positions allows the system to capture the transport path and diffusion range of pollutants in real time. During the simulation, it automatically records the historical trajectory of each particle, facilitating in-depth research such as pollution retrospection and diffusion pattern analysis. In terms of visualization, the system fully leverages the advantages of WebGL technology and the high-performance computing power of the cloud platform. By mapping the particle's trajectory to a real-time dynamic rendering layer, the pollutant diffusion process is clearly displayed in animation form on the map. The color, size, and concentration of particles directly correspond to each other, intuitively reflecting the intensity and trend of pollution. It also supports various interactive methods such as user-defined timeline browsing, flow rate switching, and concentration level adjustment, significantly improving users' perception of pollution diffusion phenomena and enhancing analytical efficiency. This simulation method is also widely applicable to various scenarios such as urban black and odorous water body treatment, emergency water pollution event simulation, and water environment trend prediction, demonstrating good scalability and engineering practical value. More importantly, the implementation of this method relies on a cloud platform deployment architecture, enabling remote network access for model building, data processing, simulation execution, and rendering, supporting concurrent access by multiple users and unified display across multiple terminals, greatly reducing system deployment costs and maintenance difficulty. Through integration with GIS platforms, online monitoring data platforms, and water management scheduling systems, it also enables the linkage and comparison of pollutant diffusion simulations with actual observation data, providing water managers with a scientific auxiliary decision-making tool.In the event of a sudden pollution incident, the simulation process can be quickly initialized based on current water quality data to predict the scope of pollution diffusion and high-risk areas, thereby enabling the early deployment of emergency measures and reducing water environment risks. Overall, this method, by constructing a water quality particle diffusion modeling process oriented towards river network structures in a cloud platform environment, bridges the key link from static water quality data to dynamic pollution diffusion representation. It not only achieves high-precision simulation and high-efficiency visualization but also organically integrates physical models, particle systems, and big data analysis technologies, promoting the intelligent development of water environment information management. It is particularly suitable for water systems that need to handle complex scenarios involving large areas, multiple river sections, and multiple pollution sources, helping to improve the scientific, forward-looking, and controllable nature of watershed management. Attached Figure Description
[0018] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0019] Figure 1 This is a schematic diagram of the steps of a cloud platform-based river network water quality simulation method according to the present invention;
[0020] Figure 2 for Figure 1 A detailed flowchart of step S1;
[0021] Figure 3 for Figure 1 A detailed flowchart of step S3. Detailed Implementation
[0022] The technical method of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0023] Furthermore, the accompanying drawings are merely illustrative of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor methods and / or microcontroller methods.
[0024] It should be understood that although the terms "first," "second," etc., may be used herein to describe various units, these units should not be limited by these terms. These terms are used merely to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0025] To achieve the above objectives, please refer to Figures 1 to 3 This invention provides a cloud-based method for simulating river network water quality, the method comprising the following steps:
[0026] Step S1: Obtain basic river network data, river cross-section data, river topography data, water quality monitoring data, and water level and flow data. Construct a river network hydrodynamic model based on the basic river network data, river topography data, and river cross-section data. Determine the water quality component categories based on the river network hydrodynamic model combined with water quality monitoring data and water level and flow data. Construct an uncalibrated preliminary coupled model.
[0027] In this embodiment of the invention, under a cloud platform environment, basic river network data, river cross-section data, river topographic data, water quality monitoring data, and water level and flow rate data are automatically collected via IoT device interfaces. The basic river network data includes river node topology, river names, and the relationship between main and tributary rivers; the river cross-section data includes the cross-sectional shape of each river channel, such as width, depth, and slope; the river topographic data mainly refers to the elevation information of the river channel and its surrounding area, obtained by integrating UAV mapping data with a Geographic Information System (GIS); the water quality monitoring data includes time series data of water quality parameters such as ammonia nitrogen, total phosphorus, dissolved oxygen, and chemical oxygen demand at multiple monitoring sections; and the water level and flow rate data are obtained from water level gauges and flow meters deployed at each section. Based on the above data, a river network hydrodynamic model is constructed using a one-dimensional hydrodynamic modeling tool (such as MIKE 11 or HEC-RAS), considering river boundary conditions, water level boundaries, flow continuity, and energy equations. Subsequently, by coupling the constructed hydrodynamic model with the monitored water quality data, water level and flow data, the K-means clustering algorithm was used to divide the water quality monitoring data into multiple "water quality groups", each group representing a water quality type, such as severely polluted, moderately polluted, good water quality, etc. Finally, an uncalibrated preliminary coupled model was constructed in the coupled framework as the basis for subsequent water quality simulation and calibration.
[0028] Step S2: Based on the water quality monitoring data, the initial water quality field of the preliminary coupled model is determined to obtain the initial water quality concentration field model;
[0029] In this embodiment of the invention, the preliminary coupled model constructed in step S1 requires initial water quality field determination to simulate the water quality state at the starting time. This process runs as a containerized computing task on a cloud platform. First, a specified starting time (e.g., 00:00 on June 1, 2024) is selected, and the measured water quality component values of each monitoring section at that time point are extracted from the water quality monitoring data, such as ammonia nitrogen concentration of 2.1 mg / L and total phosphorus of 0.14 mg / L. Due to the limited number of water quality monitoring sections, a spatial interpolation algorithm (such as the inverse distance weighting method) is used to interpolate and expand the entire river network to form a complete two-dimensional or one-dimensional initial water quality distribution map. This distribution map is represented in the model as the "initial water quality concentration field model," which represents the water quality parameter values at each point in the entire river system at the starting time, and is used as the initial input conditions for the hydrodynamic water quality model. The processing results are stored in the distributed object storage of the cloud platform, supporting multiple simulation calls.
[0030] Step S3: Perform model calibration and accuracy evaluation on the initial water quality concentration field model based on the Nash efficiency coefficient to obtain the hydrodynamic-water quality coupled model; based on the water quality calibration results of each section of the hydrodynamic-water quality coupled model, perform adaptive segmentation processing on the river segment between the upstream and downstream sections to form subdivided river segment data;
[0031] To improve the accuracy of the simulation results, this embodiment of the invention requires model calibration of the initial water quality concentration field model in step S2. An optimization method based on the Nash efficiency coefficient is used, running on a distributed task scheduling system on a cloud platform. The Nash efficiency coefficient is a statistical indicator that measures the degree of fit between simulated and measured values; a value closer to 1 indicates a more accurate model. Specifically, a particle swarm optimization algorithm is used to iteratively adjust model parameters (such as diffusion coefficient and water quality reaction coefficient), and the Nash efficiency coefficient between the simulated output and the measured water quality data is continuously calculated. Finally, the parameter group with the highest efficiency coefficient is selected as the model calibration result. After calibration, by comparing the water quality simulation errors between upstream and downstream sections, and considering the river length and pollutant diffusion characteristics, the original river section is adaptively segmented. For example, river sections with drastic error changes are subdivided into 500-meter segments, while those with slow changes are retained as 1000-meter segments. This operation generates "subdivided river section data," which is used to improve rendering accuracy and computational resolution.
[0032] Step S4: Based on the subdivided river segment data, perform linear interpolation of water quality component concentrations for each river segment, and render and color-code the values of each water quality component in each sub-river segment according to the preset color band mapping table to obtain the river segment rendering data.
[0033] This invention, based on the subdivided river segment data in step S3, performs linear interpolation processing on the water quality component concentrations of each subdivided river segment. Specifically, based on the existing water quality component concentrations at both ends of each river segment, linear interpolation is used to calculate the concentration values at each interpolation point within the river segment. For example, if the ammonia nitrogen concentration at the starting point of a river segment is 1.5 mg / L and the ending point is 2.0 mg / L, the concentration at intermediate points increases linearly with distance from the starting point. Subsequently, each component concentration value is rendered using a preset color mapping table. For example, ammonia nitrogen concentrations below 1 mg / L are blue, 1-2 mg / L are green, 2-4 mg / L are yellow, and above 4 mg / L are red, thus visually representing different pollution levels. This rendering operation is performed by the graphics computing module in the cloud platform and supports the WebGL standard. The output is a JSON-formatted river segment rendering data file, which contains the coordinate and color information of each sub-river segment for easy front-end display.
[0034] Step S5: Based on the river section rendering data and the flow velocity in the hydrodynamic-water quality coupling model, perform pollutant particle animation rendering to obtain the water quality diffusion simulation rendering results.
[0035] After obtaining the rendered data of the river section, this embodiment of the invention further performs animation simulation processing on the pollutant diffusion behavior in the river section to enhance the intuitiveness of the simulation system and the user interaction experience. This step relies on the flow velocity information in the hydrodynamic-water quality coupling model in step S3, and represents the migration process of pollutant particles in the water body in the form of particle animation. Specifically, the processing method adopts a particle system simulation algorithm based on streamline tracking, taking each high pollutant concentration area as a particle source point, and combining the local flow velocity (e.g., 0.6 meters per second) and flow direction in the river section to calculate the movement path of particles in the time series, simulating the diffusion and dilution process. Particle rendering is accelerated by GPU, and the particle color is kept consistent with the pollution level according to the preset color in the rendered data. The final output is an interactive water quality diffusion simulation animation effect. This animation result can be embedded in the front-end web interface of the cloud platform for users to view dynamically, rewind time, and conduct pollution source tracing analysis.
[0036] Preferably, step S1 includes the following steps:
[0037] Step S11: Obtain basic river network data, river cross-section data, river topography data, water quality monitoring data, and water level and flow data;
[0038] This invention, based on cloud platform access capabilities, uses standardized data access interfaces to acquire river network-related data from local water conservancy information systems and ecological environment monitoring systems. The basic river network data includes river name, start and end coordinates, administrative affiliation, and water body type. River cross-sectional data is obtained through ADCP or cross-sectional monitoring measurement results, including river width, water depth, and cross-sectional morphology. River topographic data is acquired by UAV aerial surveying combined with DEM elevation data, forming a three-dimensional surface model of the river with geographic coordinates. Water quality monitoring data comes from fixed automatic water quality stations and manual sampling and testing, with typical indicators including chemical oxygen demand (COD), ammonia nitrogen, and total phosphorus. Water level and flow rate data are collected by real-time hydrological monitoring equipment, including time-series water level, flow velocity, and flow rate data at monitoring points. This data is uploaded to the unified data storage module of the cloud platform and tagged with timestamps and spatial coordinates for easy subsequent model retrieval and correlation analysis.
[0039] Step S12: Extract the coordinates of the river centerline and the topological connection relationship of the river network based on the basic data of the river network, establish the river network node numbering system, and obtain standardized river network topological structure data;
[0040] In this embodiment of the invention, a geographic information processing engine is invoked in the cloud platform data analysis module to perform spatial analysis on the basic river network data obtained in step S11. River centerlines are drawn using the river's start and end coordinates, and B-spline interpolation smoothing algorithm is used to extract the coordinates of the centerline nodes. Then, by analyzing the intersection relationships between rivers, a directed graph-like topological connection structure is constructed, forming a node-edge graph structure model. Simultaneously, a unique number is assigned to each node, forming a standardized river network node numbering system. This number is used for establishing node equations and data association in subsequent models. The standardized river network topology data is stored in the cloud platform database in GeoJSON format and supports dynamic retrieval and visualization.
[0041] Step S13: Determine the geometric parameters of each section based on the river cross-section data, evaluate the slope and roughness of each river segment based on the river topography data, and associate the geometric parameters and slope and roughness with the corresponding river network nodes in the standardized river network topology data to obtain river network structure data containing hydraulic geometry information.
[0042] In this embodiment of the invention, the river cross-section analysis module of the cloud platform is called to extract the location coordinates, width, water depth and morphological curve of each cross-section in its respective river segment from the cross-section data, and to calculate the hydraulic radius and wetted perimeter and other geometric parameters of each cross-section according to the standard hydraulic calculation method. Combined with the river topographic data, the slope of the river segment is calculated by the elevation difference and length at both ends of the cross-section, and the Manning roughness coefficient is estimated by using the riverbed material type and roughness grade table. Finally, the above geometric parameters, slope and roughness are merged into a standardized topology structure according to the river segment number, and each edge (i.e., river segment) is bound to its hydraulic geometric information, thereby forming river network structure data containing geometric and physical parameters, which is convenient for subsequent hydrodynamic equation modeling and calling.
[0043] Step S14: Based on the river network structure data and water level and flow data, construct the hydrodynamic equation set, establish a continuity equation for each river network node, establish a momentum equation for each river segment, embed the boundary condition data into the equation set, and obtain the river network hydrodynamic mathematical model.
[0044] This invention, based on the river network structure data obtained in step S13, utilizes the hydrodynamic modeling module of a cloud platform to construct a one-dimensional unsteady flow hydrodynamic mathematical model. A mass continuity equation is established at each river network node to describe the flow relationship between the inflow and outflow nodes. A momentum equation is constructed on each river segment (i.e., topological edge) to describe the interactions of kinetic energy, gravity, and frictional resistance in the water flow. Measured water level and flow rate data are used as model boundary conditions; time-varying flow boundaries are used for inflows, while fixed water levels or water level-flow relationship boundaries are set for outflows. Boundaries for intermediate nodes are derived from those of upstream nodes. The constructed river network hydrodynamic mathematical model is stored symbolically in the platform's modeling module, supporting subsequent numerical solutions.
[0045] Step S15: Perform numerical discretization on the river network hydrodynamic mathematical model, convert the continuity equation and momentum equation into a system of algebraic equations, set the time step and spatial step, establish the solution matrix, and obtain a computable river network hydrodynamic model.
[0046] In the numerical solution stage of this invention, the finite difference method is used to discretize the continuity and momentum equations in step S14 spatially and temporally. The spatial step size is set to one node every 50 meters, and the time step size is set to 10 seconds. Stability is controlled according to the Courant condition. A solution matrix is constructed for the discretized equations, and the flow velocity and water level time series are solved using either an explicit MacCormack scheme or an implicit Preissmann scheme. The solution range is set to 24 hours, and the output is at minute-level resolution. Finally, the runnable hydrodynamic model is deployed to a high-performance computing node on a cloud platform. Users can input boundary conditions for different time periods through a web interface to achieve dynamic simulation and result visualization analysis.
[0047] Step S16: Determine the water quality component categories based on the river network hydrodynamic model combined with water quality monitoring data and water level and flow data, thereby constructing an uncalibrated preliminary coupled model.
[0048] In this embodiment of the invention, after obtaining the river network hydrodynamic model, the water quality modeling module in the cloud platform is invoked to combine and analyze the hydrodynamic model with the water quality monitoring data collected in step S11. Cluster analysis methods (such as K-means) are used to cluster the water quality data of different cross-sections within the same time period. The monitoring cross-sections are divided into several water quality groups based on water quality characteristic indicators such as COD, NH3-N, TP, and DO, for example, Class I clean water, Class II lightly polluted water, and Class III heavily polluted water. Then, based on flow velocity and direction information, each water quality category is mapped to the river section area, forming a preliminary water quality spatial distribution map. Combining the flow velocity and diffusion parameters of the hydrodynamic model, an uncalibrated water quality migration and diffusion model is established based on this map, forming a preliminary hydrodynamic-water quality coupling model. The model format is a set of control equations with adjustable parameters, used for subsequent calibration and accuracy optimization.
[0049] Preferably, step S16 includes the following steps:
[0050] Step S161: Based on the water quality monitoring data, the detection frequency and value range of water quality indicators at each monitoring station are statistically analyzed, and water quality indicators with a detection frequency higher than the preset threshold are selected to obtain a list of target water quality components.
[0051] In this embodiment of the invention, the water quality monitoring data obtained in step S11 is retrieved from the data analysis module of the cloud platform. The historical records of each water quality monitoring station are extracted according to the station. Statistical analysis is performed on various indicators (such as COD, NH3-N, TP, DO, nitrate, heavy metals, etc.). SQL statistical scripts are used to calculate the detection frequency of each indicator at each station. A preset threshold is set for an indicator to appear more than 40 times in a single station within a year. Indicators with a frequency higher than this threshold are selected as target analysis components to ensure that the selected components have sufficient data support. At the same time, the concentration range, mean, maximum value, and standard deviation of each component are statistically analyzed to identify key pollutants with large concentration fluctuations. Finally, a list of target water quality components is generated on the cloud platform for subsequent component migration and reaction analysis.
[0052] Step S162: Analyze the component transport characteristics based on the target water quality component list and water level and flow rate data, calculate the actual time for pollutants to be transported from the upstream station to the downstream station, identify the conservation and reactivity characteristics of each component by analyzing the correlation between upstream and downstream concentrations at different times, determine the degradation coefficient of each component, and obtain the water quality component parameter table.
[0053] This invention extracts upstream and downstream monitoring data for each indicator in the target water quality component list, and calculates the actual water body movement time of pollutants from upstream to downstream by combining water level and flow rate data. This time is obtained by dividing the distance by the average flow velocity. Subsequently, the concentration change trends of the target components upstream and downstream are compared within the same transmission time window. The Pearson correlation coefficient is used to analyze the correlation between the concentrations at different times. If the correlation is high, it is initially judged as a conservative component, such as conductivity or nitrate. If the correlation is weak and the downstream concentration decreases significantly, it is judged as a non-conservative component, such as COD or ammonia nitrogen. First-order decay fitting is performed on the non-conservative components, and the degradation coefficient is back-calculated using the least squares method to obtain the degradation rate of the target components. Finally, a water quality component parameter table containing information such as component name, conservatism classification, degradation coefficient, and fluctuation characteristics is generated as the data basis for constructing the transmission equation.
[0054] Step S163: Extract the flow velocity and water depth calculation results of each river segment based on the river network hydrodynamic model, calculate the Reynolds number and Peclet number of each river segment, determine the flow regime type based on the Reynolds number, evaluate the dominant mechanism of diffusion and transport based on the Peclet number, and obtain the hydraulic transport characteristic data of the river segment.
[0055] This invention, based on a completed river network hydrodynamic model, utilizes a cloud platform simulation results database to extract the time-averaged flow velocity and water depth for each river segment. The Reynolds number and Peclay number for each segment are then calculated. The Reynolds number is used to determine the flow regime; its value is determined by flow velocity, water depth, and hydrodynamic viscosity. A value less than 2000 indicates laminar flow, a value greater than 4000 indicates turbulent flow, and the intermediate region is considered transitional flow. The Peclay number measures the dominance of convection and diffusion; its value is roughly estimated from flow velocity, river width, and longitudinal diffusion coefficient. A value greater than 10 indicates that convection is dominant, while a value less than 1 indicates that diffusion is dominant. These values determine whether different river segments are dominated by mixing or lateral movement. The resulting data is organized in the format of "river segment number - Reynolds number - Peclay number - flow regime type - dominant mechanism," serving as an important reference for subsequent diffusion coefficient setting and transport model selection.
[0056] Step S164: Based on the hydraulic transport characteristic data of the river section and the water quality component parameter table, the diffusion parameters are determined. The longitudinal diffusion coefficient and the transverse diffusion coefficient are calculated for each river section, and the diffusion coefficient values are corrected according to the geometric characteristics of the river section. The diffusion parameters are associated with the corresponding river sections to obtain the river section diffusion parameter database.
[0057] Based on the hydraulic transport characteristics of each river segment in step S163, and combined with standard hydraulic empirical formulas such as the Fischer formula or Elder formula, the longitudinal diffusion coefficient (describing the mixing capacity of pollutants along the water flow direction) and the transverse diffusion coefficient (describing the transverse diffusion capacity of pollutants) are calculated respectively. The longitudinal diffusion coefficient generally depends on the flow velocity, water depth, and river channel curvature, while the transverse diffusion coefficient is closely related to the river width and sidewall roughness. Considering the geometric differences of the river segments, a cross-sectional shape correction factor is used to adjust the basic diffusion value. For example, for irregular cross-sections, a shape coefficient is used to adjust the diffusion coefficient by 10%-30%. Finally, the longitudinal and transverse diffusion coefficients and correction values of each river segment are associated with their unique numbers to construct a river segment diffusion parameter database. This database is stored in a cloud platform database and supports automatic retrieval for subsequent pollutant migration modeling.
[0058] Step S165: Establish convection-diffusion transport equations for each water quality component based on the river section diffusion parameter database. Use the flow velocity calculation results of the hydrodynamic model as the convection term coefficient, the river section diffusion parameters as the diffusion term coefficient, and the water quality component degradation coefficient as the reaction term coefficient to obtain the water quality transport equation set.
[0059] In this embodiment of the invention, the diffusion parameter database constructed in step S164 is utilized. The platform automatically establishes convection-diffusion-reaction transport equations for each target water quality component in each river segment. The coefficients of the convection term are taken from the average flow velocity of the river segment in step S15, the coefficients of the diffusion term are taken from the longitudinal and transverse diffusion coefficients of the corresponding river segment, and the reaction term uses the degradation coefficients calculated in step S162. The transport equations are a set of first-order partial differential equations, which are discretized in time and space. Each component is independently modeled in each river segment and can be expanded into a multi-factor reaction module that considers the effects of temperature and dissolved oxygen. Finally, a water quality transport equation set consisting of multiple transport equations is formed. Each set of equations is organized in units of "component-river segment-time step" and can be automatically calculated in parallel, which is convenient for deployment on the distributed computing nodes of the cloud platform for subsequent solution.
[0060] Step S166: Establish a data transmission interface for hydrodynamic calculation and water quality calculation based on the water quality transport equation set and the river network hydrodynamic model, set a time synchronization mechanism for coupled calculation, and obtain an uncalibrated preliminary coupled model.
[0061] This invention establishes a unified input-output mechanism between a hydrodynamic model and a water quality model by constructing a data transfer interface between them. This mechanism connects water level and velocity data with pollutant concentrations. At each time step, the hydrodynamic module outputs velocity and water depth as input to the water quality module, which in turn returns feedback on the impact of pollutant concentrations. The coupling interface is based on a modular design framework, using a shared memory mechanism or file interface to transfer data. A time synchronization strategy is set to ensure data consistency between the two modules at each simulation step, with a default time synchronization step size of 60 seconds. The final, uncalibrated preliminary coupled model possesses end-to-end simulation capabilities, enabling dynamic simulation of the temporal and spatial migration of pollutants throughout the river network, laying the foundation for subsequent model calibration and predictive analysis.
[0062] Preferably, step S2 includes the following steps:
[0063] Step S21: Identify the spatial coordinates of each monitoring station based on the water quality monitoring data, spatially match the monitoring station coordinates with the preliminary coupling model, determine the upstream and downstream monitoring station intervals of each river network water quality section, and obtain the section-station spatial relationship data.
[0064] Step S22: Calculate the straight-line distance between each river network section and the two upstream and downstream monitoring stations based on the cross-section-station spatial relationship data, and use the inverse distance weighted interpolation method to perform spatial interpolation calculation of the initial concentration of water quality components for each river network section to obtain the initial concentration distribution data;
[0065] The specific formula for the inverse distance weighted interpolation method is as follows:
[0066]
[0067] In the formula, WQDM n WQUP represents the initial concentration of the nth component in the river cross-section water quality. n Let D be the initial concentration of the nth component at the upstream water quality monitoring station of the river section. up D is the distance from the upstream station to the river cross-section. down WQDOWN represents the distance from the downstream station to the river cross-section. n The initial concentration of the nth component at the downstream water quality monitoring station of the river section;
[0068] Step S23: Perform time correction processing on the initial concentration distribution data to obtain the initial corrected concentration data;
[0069] The specific formula for time correction is as follows:
[0070]
[0071] WQDMF n =WQDMn +CV n *D C ;
[0072] In the formula, CV n WQ is the initial concentration correction factor for the nth component. nm Let WQ be the monitored concentration of the nth component at time m at the upstream station, and t be the time it takes for the water from the upstream station to reach the downstream station. n(m+t) D represents the monitored concentration of the nth component when the water flows from the upstream station at time m to the downstream station. C For the preset distance coefficient, WQDMF n WQDM represents the initial corrected concentration of the nth component in the river cross-section water quality. n The initial concentration of the nth component in the river cross-section water quality;
[0073] Step S24: Perform concentration rationality verification based on the initial corrected concentration data, check whether the concentration gradient between adjacent sections exceeds the preset threshold, smooth the sections with abnormal gradients, and obtain the initial concentration field model of water quality.
[0074] In this embodiment of the invention, a river network water quality simulation method based on a cloud platform first extracts the geographical location information of all monitoring stations, including latitude and longitude coordinates and the name of the river they are located in, based on water quality monitoring data obtained from the data resource management module connected to the cloud platform. Then, combined with a pre-constructed coupling model containing the cross-section number, geographical location, and adjacency relationships of each river segment, a spatial matching algorithm is used to geographically match each water quality monitoring station with the river segment cross-section in the coupling model. The spatial matching process is mainly based on GIS spatial analysis technology to determine the river segment to which each monitoring station belongs and its upstream and downstream relationships in the river network model. Taking a typical river network of a city in Zhejiang Province as an example, monitoring station A is located at the starting point of a section of the main river, and station B is located at the end of that section. By calculating the straight-line distance between all cross-sections in the model and stations A and B, it is confirmed that all cross-sections within the river segment are within the interval between station A and station B. Finally, the system outputs a set of "cross-section-station" spatial relationship data, which provides key spatial structure information for subsequent concentration interpolation and time correction. After acquiring the cross-section-site spatial relationship data, this embodiment uses the inverse distance weighted interpolation method to spatially interpolate the initial concentrations of water quality components at each cross-section in the river network model. This method assumes that monitoring stations closer to the cross-section have a greater impact on the water quality concentration, therefore using the reciprocal of the distance as a weighting coefficient. Specifically, the concentration values of the nth water quality component at the upstream and downstream monitoring stations corresponding to the cross-section are extracted, along with the straight-line distances from the cross-section to the two stations. Taking river cross-section C as an example, the ammonia nitrogen concentration at upstream monitoring station A is 1.8 mg / L, and the ammonia nitrogen concentration at downstream station B is 1.2 mg / L. Cross-section C is 200 meters from station A and 300 meters from station B. According to the weighting calculation rules, the concentrations at stations A and B are multiplied by their respective weights and summed to obtain the initial ammonia nitrogen concentration at cross-section C. The entire calculation process is completed by the numerical processing module on the cloud platform, which batch-outputs the initial concentration values of each water quality component corresponding to all cross-sections, ultimately forming initial concentration distribution data, providing a basis for subsequent time correction. To further improve the timeliness and accuracy of the initial concentration distribution, this embodiment performs time correction processing on the initial concentration distribution data obtained in step S22 based on the dynamic characteristics reflecting the movement of pollutants with water flow. First, historical concentration data at multiple time points of upstream stations are extracted from the monitoring database, and the time delay of pollutants from upstream to downstream is calculated in combination with river flow velocity data. Taking a practical example, assuming that the time for water flow from upstream station A to reach section C is 6 hours, the concentration value at station A at time T is compared with the concentration value at time T+6 to determine the concentration change trend of this component within that time period. Then, the average is calculated over all available time periods to obtain the time correction coefficient for the nth water quality component. This correction coefficient is multiplied by a preset distance adjustment coefficient (e.g., D_C = 0.2, used to adjust the spatial scale of concentration changes in different river sections), and the result is added back to the initial interpolated concentration to form the initial corrected concentration.This process is primarily implemented through a time-series data analysis module built on the cloud platform, enabling the adjustment of the initial concentration to the time response of fluctuations in actual upstream emissions. After time correction, the obtained initial corrected concentration data undergoes a rationality check to ensure the stability and accuracy of the simulation results. In this embodiment, the system first constructs an adjacent cross-section comparison matrix in the river network model and calculates the concentration gradient of all adjacent cross-sections on each water quality component. The gradient value is defined as the concentration difference between two cross-sections divided by the distance between them. If the gradient of a certain cross-section and its neighboring cross-sections on a certain component exceeds a set threshold (e.g., the ammonia nitrogen concentration gradient threshold is set to 0.02 mg / L / m), the system identifies it as an outlier. Subsequently, the outlier cross-section is smoothed using a moving average method, that is, the average concentration of the two cross-sections upstream and downstream is used to replace the initial concentration of the cross-section, or a three-point weighted average method is used for correction. This process is automatically executed by the quality control module of the cloud platform to ensure that the generated initial water quality concentration field model is spatially continuous and smooth, providing reliable initial conditions for subsequent water quality transport simulations.
[0075] Preferably, step S3 includes the following steps:
[0076] Step S31: Perform trial calculations based on the initial water quality concentration field model, select measured water quality information from historical periods as the verification benchmark, run the model to calculate the predicted water quality concentration values of each river network section in the same period, pair the predicted values with the measured values according to the time series, and obtain a simulation-measured data comparison table.
[0077] In this embodiment of the invention, after constructing the initial water quality concentration field model and verifying its rationality, the model is tested using a water quality simulation system mounted on a cloud platform. In this embodiment, historical water quality monitoring data from a key river network within the past three months is selected as the verification benchmark, including daily average monitoring data for multiple water quality components such as ammonia nitrogen, total phosphorus, and dissolved oxygen. The system retrieves the river network hydrodynamic boundary conditions for the same historical period and sets the simulation starting conditions in conjunction with the initial concentration field model. The water quality simulation module is then run to obtain the simulated concentration time series results for each water quality component at each cross-section during the corresponding time period. Subsequently, the system automatically matches and organizes the simulation output results with the measured monitoring data for the same time period according to cross-section and time dimensions, forming a complete simulation-measured data comparison table. This table is then structured and stored in the cloud database for subsequent error analysis and calibration.
[0078] Step S32: Calculate the root mean square error and the standard deviation of the measured data according to the simulation-measured data comparison table, and compare the root mean square error value with 0.5 times the standard deviation to obtain the error evaluation result;
[0079] Based on the aforementioned simulated-measured data comparison table, this embodiment of the invention calculates the root mean square error (RMSE) and standard deviation of measured values for each water quality component at each cross-section. In this embodiment, an error assessment module written in Python reads the simulated and measured value sequences. For each cross-section and each component at each time point, the error is squared, averaged, and then squared to obtain the RMSE. Simultaneously, the standard deviation of the measured sequence for that component is calculated, and the system automatically multiplies the standard deviation by 0.5 to form a dynamic threshold. The RMSE of all components at all cross-sections is compared with this threshold. If the error value is less than half the standard deviation, the simulation result for that component at that cross-section is considered to have a small error. Finally, an error evaluation result table is generated in the cloud platform, marking the cross-sections and components that passed or failed the threshold judgment.
[0080] Step S33: Calculate the Nash efficiency coefficient based on the simulation-measured data comparison table, calculate the average value of the measured values, calculate the sum of squares of the differences between the predicted and measured values and the sum of squares of the differences between the measured values and the average value of the measured values, and obtain the efficiency coefficient evaluation results.
[0081] This invention, based on an error evaluation table, further calls the system's built-in Nash efficiency coefficient evaluation function to calculate the efficiency coefficient for each set of simulated-measured data pairs. In this embodiment, the system first extracts the time series of measured values according to the cross-section number and calculates its average value. Then, it sums the squares of the differences between the simulated and measured values, and sums the squares of the differences between the measured values and the measured mean. The efficiency coefficient is the ratio of the difference between the former and the latter. The system calculates the efficiency coefficient for all cross-sections and all components and outputs it uniformly, forming an efficiency coefficient evaluation table. This efficiency coefficient is used to measure the degree of fit between the simulation results and the measured data; the closer the value is to 1, the better the fit. Taking the river network of the main urban area of a prefecture-level city in Nanjing as an example, the efficiency coefficients of ammonia nitrogen and dissolved oxygen at multiple water quality cross-sections exceed 0.8, indicating that the model has strong predictive ability.
[0082] Step S34: Perform comprehensive accuracy judgment processing based on the error evaluation results and efficiency coefficient evaluation results. When the root mean square error value is less than 0.5 times the standard deviation of the measured value, the average value of the Nash efficiency coefficients of each water quality component is greater than 0.7, and the lowest Nash efficiency coefficient is not less than 0.6, the accuracy is judged to be qualified, and an accuracy qualified mark is obtained.
[0083] Based on the aforementioned root mean square error (RMSE) evaluation results and Nash efficiency coefficient evaluation table, this embodiment of the invention executes a comprehensive accuracy judgment algorithm in the cloud. In this embodiment, the system's judgment logic is set as follows: if the RMSE of any component is less than 0.5 times the standard deviation, the average efficiency coefficient of all components is greater than 0.7, and the lowest efficiency coefficient of a single component is not lower than 0.6, then the model is judged as "accurate." After each judgment, the system generates an "accuracy qualified identifier," including the model version number, applicable region, evaluation period, and judgment result, and marks it in the corresponding model parameter configuration. If the judgment fails, the system can prompt for readjustment of the initial concentration or boundary conditions and provide key anomaly section information for further analysis. This judgment process relies on the computing power of the cloud platform and can complete the evaluation of dozens of sections and hundreds of data sequences within 2 minutes.
[0084] Step S35: Based on the accuracy qualification mark, confirm that the initial concentration field model of water quality has been calibrated. Solidify the calibrated parameters into the model. Perform complete time series water quality concentration calculations on all river network sections. Extract the water quality component concentration values of each section at different times. Organize them according to the section number and time order to obtain a hydrodynamic water quality coupling model containing the water quality calibration results of each section.
[0085] Based on the generated "accuracy qualification mark," the system confirms that the currently constructed initial water quality concentration field model has been calibrated. In this embodiment, the cloud platform solidifies the model parameters, including river network structure parameters, cross-sectional locations, boundary conditions, water quality diffusion coefficients, and other information, and stores them in the model parameter database. Subsequently, the system automatically runs the hydrodynamic and water quality coupling module to perform complete time-series water quality simulation calculations on all cross-sections of the entire river network, extracting predicted values of components such as ammonia nitrogen and total phosphorus at hourly time resolution. All prediction results are structured and stored according to cross-section number and time order, forming a three-dimensional dataset of cross-section-time-component. The final hydrodynamic and water quality coupling model can be used for subsequent pollution source tracing analysis, emergency response, or ecological regulation strategy formulation.
[0086] Step S36: Based on the water quality calibration results of each section of the hydrodynamic-water quality coupling model, adaptive segmentation processing is performed on the river segment between the upstream and downstream sections to form subdivided river segment data.
[0087] This invention, based on the model calibration and time-series calculation of water quality concentration, further optimizes the river network structure through adaptive subdivision. In this embodiment, the system uses an adaptive segmentation algorithm to divide the original upstream and downstream river segments into finer-grained sub-segments based on the gradient of water quality concentration changes between adjacent cross-sections, the flow response delay from upstream to downstream, and the model's accuracy requirements. The segmentation rules include: adding cross-section cutting points to areas where concentration changes exceed a set threshold, and refining the simulation granularity of river segments where the flow residence time exceeds a specified duration (e.g., 2 hours). The system extracts the start and end cross-sections, length, and hydraulic parameters of each subdivided river segment into independent data objects, forming a subdivided river segment dataset. This processing significantly improves the model's response accuracy and simulation timeliness to local pollution processes, providing data support for further high spatiotemporal resolution pollutant migration prediction.
[0088] Preferably, step S36 includes the following steps:
[0089] Step S361: Calculate the straight-line distance between two adjacent sections based on the water quality calibration results of each section in the hydrodynamic-water quality coupling model, and use it as the basic length of the river section;
[0090] In this embodiment of the invention, after calibrating the hydrodynamic-water-quality coupling model and obtaining time-series data of water quality concentration at each river network cross-section, the spatial coordinate information of each cross-section in the model is first extracted, including the latitude, longitude, or projected coordinates of the cross-section. By calling the geographic information computing service module on the cloud platform, spatial distance measurement is performed on each pair of adjacent cross-sections, and the Euclidean distance is calculated using the formula for the straight-line distance between two points. This distance is defined as the "basic length of the river segment". In practical applications, for example, in a river network in City A, the calculated straight-line distance between cross-sections numbered D12 and D13 is 376 meters, meaning the basic length of this river segment is 376 meters. This calculation serves as the basis for subsequent spacing settings and river segment division.
[0091] Step S362: Establish a grading standard for cutting spacing based on the basic length of the river section, and obtain standard cutting spacing data;
[0092] This embodiment of the invention, based on the basic length of each river segment calculated in step S361, loads a preset cutting spacing classification standard into the cloud platform via a parameter mapping module. The standard is divided into four levels according to the river segment length range: less than 50 meters, 50 to 500 meters, 500 to 5000 meters, and greater than 5000 meters, corresponding to cutting spacings of 5-10 meters, 25-100 meters, 300-1000 meters, and 1000-2000 meters, respectively. For example, for the aforementioned river segment with a length of 376 meters, the system automatically matches it to the second level, setting the standard cutting spacing to 50 meters. This setting considers the balance between simulation accuracy and computational overhead; within the limits of cloud computing resources, a smaller spacing is preferentially selected to improve spatial resolution. Finally, the standard cutting spacing data is output and written into the model database as intermediate data.
[0093] Step S363: Perform river curvature correction processing based on standard cutting spacing data, extract the geometric shape data of each river segment, calculate the curvature coefficient of the river segment, and determine the high curvature river segment when the curvature coefficient exceeds the preset threshold. Reduce the cutting spacing of the high curvature river segment to 50%-70% of the standard spacing to obtain the corrected cutting spacing data. The specific formula for calculating the river segment curvature coefficient is: curvature coefficient = actual length of river segment / straight distance of river segment.
[0094] In this embodiment of the invention, after obtaining the initial standard cutting spacing, to consider the complexity of the river channel morphology, the system calls the spatial analysis service in the cloud platform to extract and process the geometry of each river segment. Specifically, by analyzing the centerline vector data of the river segment, the actual length of each segment is extracted, and a "curvature coefficient" is calculated based on the straight-line distance calculated in S361. This coefficient is defined as the ratio of the actual length to the straight-line distance. For example, if the actual centerline length of a river segment is 750 meters and the straight-line distance from the starting point to the ending point is 500 meters, then its curvature coefficient is 1.5. The system sets a high curvature threshold of 1.3, therefore this river segment is identified as a "high curvature river segment." Subsequently, the system automatically adjusts the originally matched standard cutting spacing to a value between 50% and 70%. In this example, the original spacing was 300 meters, so it is adjusted to 150 to 210 meters, and finally set to 180 meters, obtaining the corrected cutting spacing data.
[0095] Step S364: Based on the corrected cutting spacing data, each river segment is cut at equal intervals. Starting from the upstream section, the cutting points are located along the river centerline according to the determined cutting spacing, generating the coordinate information of each cutting point, forming several sub-river segments separated by the cutting points, and obtaining subdivided river segment data.
[0096] In this embodiment of the invention, after obtaining the corrected cutting spacing data, the system activates the automated river segment subdivision module. Starting from the upstream section of each river segment, it locates cutting points at equal intervals along the river centerline according to a set interval. This process is implemented using a spatial linear interpolation algorithm on a cloud platform. The system divides the vector centerline data equally according to the set interval, calculates and generates the two-dimensional coordinates (e.g., X and Y values in a Gaussian projection coordinate system) of each cutting point. Taking the high-curvature river segment from the previous step as an example, its set interval is 180 meters, and its total length is 750 meters, ultimately generating 4 cutting points and dividing it into 5 sub-segments. The system packages the coordinates of each cutting point and its corresponding river segment number into GeoJSON format and uploads it to the river network water quality simulation model database for subsequent parameter binding and refined water quality distribution simulation of each sub-segment. The final subdivided river segment data achieves automatic adjustment of spatial granularity, effectively supporting refined water quality simulation.
[0097] Of particular importance is that step S362 specifically includes:
[0098] Based on the basic length of the river section, a grading standard for cutting spacing is established. When the river section length is less than 50 meters, the cutting spacing is set at 5-10 meters; when the river section length is 50-500 meters, the cutting spacing is set at 25-100 meters; when the river section length is 500-5000 meters, the cutting spacing is set at 300-1000 meters; and when the river section length is greater than 5000 meters, the cutting spacing is set at 1000-2000 meters, thus obtaining standard cutting spacing data.
[0099] Preferably, step S4 includes the following steps:
[0100] Step S41: Extract the starting and ending coordinates of each sub-segment based on the subdivided river segment data, calculate the center point coordinates of each sub-segment as the representative position of the river segment, identify the upstream and downstream cross-sectional position relationship of each sub-segment, establish the spatial correspondence between the sub-segment and the cross-section, and obtain the river segment-cross-section association data.
[0101] In this embodiment of the invention, after acquiring subdivided river segment data, the cloud platform uses a spatial analysis module to extract the starting and ending coordinates of each sub-segment. It then calculates the midpoint coordinates of these two points to obtain the center point coordinates of the sub-segment, which serve as the representative spatial location of that river segment. Next, based on the spatial order of the starting and ending points of the sub-segment relative to the cross-section positions, the platform automatically identifies the upstream and downstream cross-sections corresponding to each sub-segment and records their cross-section numbers, thus establishing a binding relationship between the sub-segment and the cross-section. For example, if a sub-segment starts 100 meters downstream of cross-section D12 and ends 50 meters upstream of cross-section D13, its upstream and downstream cross-sections are identified as D12 and D13. The system establishes a spatial index table in the database, consisting of "sub-segment number - upstream cross-section number - downstream cross-section number - center point coordinates," forming "river segment-cross-section association data" to provide location support for subsequent water quality interpolation.
[0102] Step S42: Calculate the distance from the center point of each sub-river segment to the upstream and downstream cross-sections based on the river segment-section correlation data. Use the reciprocal of the distance as the weight factor and normalize the weight factor so that the sum of the upstream and downstream weights equals 1 to obtain the river segment interpolation weight data.
[0103] In this embodiment of the invention, after obtaining the spatial relationship between each sub-river segment and its upstream and downstream sections, the system calculates the river-side path distance between the center point of each sub-river segment and its corresponding upstream and downstream sections. This distance is obtained through a centerline path measurement tool, taking into account the influence of river channel meandering. For example, the distance from the center point of a certain sub-river segment to the upstream section D12 is 120 meters, and to the downstream section D13 is 80 meters, for a total distance of 200 meters. Subsequently, the system uses the reciprocal of the distance as the initial weight, i.e., the initial weight for the upstream is 1 / 120, and for the downstream it is 1 / 80. To eliminate the influence of orders of magnitude, the system normalizes the two weights, making their sum equal to 1, i.e., the final weights are 0.4 (upstream) and 0.6 (downstream), respectively. This result is the "river segment interpolation weight data," which the system stores in the interpolation calculation cache table to provide accurate weight factors for the next interpolation step.
[0104] Step S43: Based on the interpolation weight data of the river section, perform interpolation calculation on the concentration of water quality components in each sub-river section, and perform interpolation calculation on all water quality components one by one to obtain the water quality concentration distribution data of the river section.
[0105] The specific formula for calculating the water quality component concentration interpolation is as follows:
[0106]
[0107] In the formula, C i Let C be the concentration value of the i-th sub-river segment. up C represents the concentration value at the upstream section. down The concentration value at the downstream section, d i Let be the distance from the i-th sub-river segment to the upstream section, and D be the total distance between the upstream and downstream sections;
[0108] This invention reads the interpolation weight data of the river segment and the concentration values of upstream and downstream sections, and performs interpolation calculations for each component according to a preset list of water quality components (such as dissolved oxygen, ammonia nitrogen, permanganate index, etc.). The interpolation method is linear interpolation, using the ratio of the distance from the center point of the sub-segment to the upstream section to the total distance between upstream and downstream as a weighting factor, multiplying it by the concentration difference between upstream and downstream, and adding the upstream concentration value to obtain the component concentration of the current sub-segment. For example, the dissolved oxygen at section D12 is 7.8 mg / L, and at section D13 it is 6.2 mg / L. If the center point of this sub-segment is 120 meters from the upstream section and the total length is 200 meters, the interpolation result is 7.8 plus 120 divided by 200 multiplied by (6.2 minus 7.8), calculating the dissolved oxygen of this sub-segment to be 6.96 mg / L. The system performs this interpolation operation on all sub-segments and all components, forming "river segment water quality concentration distribution data", and archives it in the model output table according to the sub-segment number for evaluation and rendering.
[0109] Step S44: Based on the water quality concentration distribution data of the river section, perform water quality grade assessment based on surface water quality standards and specifications to obtain the water quality grade data of the river section;
[0110] This invention utilizes the grading rules in the National Surface Water Environmental Quality Standard to determine the grade of various water quality components in each sub-river segment. Taking dissolved oxygen as an example, a concentration greater than 5 mg / L is classified as Class I, 3 to 5 mg / L as Class II, 2 to 3 mg / L as Class III, and less than 2 mg / L as Class V (worst). For example, the dissolved oxygen concentration of 6.96 mg / L calculated in step S43 corresponds to Class I. The system matches the standard grade to all water quality components in each sub-river segment and, considering the grade of each component, determines the overall water quality grade of the sub-river segment as the worst grade. Finally, the data "Sub-river segment number - component name - component concentration value - component grade" is compiled into "river segment water quality grade data" and used as the basis for the next step of color rendering.
[0111] Step S45: Render and color-determine the values of each water quality component in each sub-river section according to the preset color mapping table to obtain the river section rendering data.
[0112] In this embodiment of the invention, after acquiring the water quality grade data of a sub-river segment, a preset color band mapping table is loaded. The color band defines the RGBA color values corresponding to each water quality grade, such as blue (R0, G0, B255, A255) for Class I and red (R255, G0, B0, A255) for Class V. If the concentration value of a certain sub-river segment is between two grade thresholds, for example, 4.2 mg / L (between Class II and Class III), the system calculates its relative position ratio within that range. For example, if 4.2 falls within the range of 3 to 5, the ratio is 0.6. The system extracts the R, G, B, and A values of Class II and Class III colors and performs linear interpolation according to the ratio. For example, the R value is (RⅢ-RⅡ)×0.6+RⅡ, and the other components are calculated similarly to obtain the "precise color data" of this sub-river segment. The system then checks the color variation of adjacent sub-river segments. By comparing the differences in R, G, and B values between adjacent sub-river segments, if the difference in a certain group exceeds a set threshold (e.g., 30), Gaussian smoothing or linear transition processing is performed to avoid color jumps, generating "optimized color data." Finally, the system organizes the information of each sub-river segment, such as its number, center point coordinates, water quality concentration value, water quality level, and RGBA color value, into a structured table, establishing a complete river segment rendering attribute table. This table is then exported as JSON or Shapefile format for the front-end map rendering module to load and display, forming the final river segment rendering data.
[0113] Of particular importance, step S45 includes the following steps:
[0114] The water quality level data of the river section is processed by color interpolation according to the preset color band mapping table. When the water quality concentration value of the sub-river section is between two level thresholds, the relative position ratio of the concentration value between the two thresholds is calculated. The R, G, B, and A component values of the colors corresponding to the two adjacent levels are extracted respectively. Linear interpolation is performed on each color component according to the relative position ratio to obtain the accurate color value corresponding to the concentration, thus obtaining the accurate color data of the river section.
[0115] In this embodiment of the invention, a color-coded mapping table is preset in the water quality visualization module of the cloud platform. The table divides pollutant concentrations into several levels according to national or industry water quality standards. For example, taking ammonia nitrogen as an example, concentration thresholds are set to 0.5, 1.0, 1.5, 2.0, and 3.0 mg / L, corresponding to water quality levels I to V, and respectively configured with color values such as blue, cyan, green, orange, and red. When a specific pollutant concentration value for a certain sub-river segment is obtained, it is first determined which two levels' concentration thresholds it falls between. For example, 1.2 mg / L falls between 1.0 and 1.5, then its concentration within that level is calculated. The ratio of the interval is the relative position ratio (e.g., 0.4); then, the RGBA color values corresponding to concentration levels 1.0 and 1.5 are extracted from the color band mapping table, and the four color components (red, green, blue, and transparency) are extracted respectively. Linear interpolation calculation is performed according to the ratio. For example, the red component is the starting value plus the difference multiplied by the ratio. The results of R, G, B, and A are calculated in sequence to finally obtain the accurate color value corresponding to the concentration. This method ensures the continuity and accuracy of the water quality concentration value in color representation. The output data is called "accurate color data of the river section" and is used for subsequent rendering and optimization operations.
[0116] The color rationality is checked based on the precise color data of the river section. The color transition between adjacent sub-river sections is checked to see if it is natural. The difference in color components between adjacent river sections is calculated. When the color jump is too large, smoothing is performed to obtain optimized color data.
[0117] In this embodiment of the invention, after generating accurate color data for all sub-river segments, the system activates a color transition analysis module to detect the difference in RGBA color values between adjacent sub-river segments, paying particular attention to jump values in the R, G, and B color channels. For example, if a river segment is dark red and its downstream adjacent river segment abruptly changes to cyan, it indicates an anomaly in the intermediate concentration transition. To verify the naturalness of the transition, the system iterates through each pair of adjacent river segments, calculates the difference amplitude of each of the R, G, and B channels, and sets a color smoothing threshold. For example, a difference greater than 50 in any channel is considered a jump point. If an excessive jump is detected, the system re-smooths the color of the intermediate sub-river segments, using a moving average or bidirectional linear interpolation algorithm to adjust the transition color. That is, it refers to the concentration and color values of the preceding and following river segments to correct the transition of the current river segment, making its color change more gradual. After processing, it can avoid color discontinuity caused by small fluctuations in values, improve the aesthetics and coherence of the rendered image, and output the optimized color value data as "optimized color data".
[0118] Based on the optimized color data, a river segment rendering attribute table is generated. The number, center point coordinates, water quality concentration value, water quality level, and RGBA color value of each sub-river segment are organized into a structured data table. A complete rendering attribute record is established for each sub-river segment to obtain the river segment rendering data.
[0119] After color smoothing, the system organizes the complete visualization information of each sub-river segment into a structured attribute table and establishes a "river segment rendering data table" data structure in the database. The fields include sub-river segment number, center point coordinates (extracted from the sub-river segment geometry provided by the GIS system), pollutant concentration value, water quality level (classified according to the color band mapping table), and optimized RGBA color value. This attribute table serves as one of the core data sources of the cloud platform visualization subsystem, supporting the front-end rendering module to quickly query and load the graphic drawing attributes of the sub-river segment. It also provides basic rendering reference information for subsequent modules such as particle rendering, timeline control, and water quality animation generation. In practical applications, such as an online water quality monitoring project for a city's river network, a new rendering attribute table is generated every 10 minutes, which can reflect the changes in the pollution status of each section of the river network in real time, realizing "visible water quality early warning." This rendering data can also be used by regulatory units as a visual basis for analyzing water quality evolution trends.
[0120] Preferably, step S5 includes the following steps:
[0121] Step S51: Extract the centerline coordinates and water quality concentration values of each sub-segment based on the river segment rendering data. Combine the flow velocity in the hydrodynamic-water quality coupling model to associate the corresponding flow velocity vector and concentration value for each sub-segment to obtain the basic data of the river segment flow field.
[0122] In this embodiment of the invention, under a cloud platform environment, the centerline information of each sub-segment is first read from the river segment rendering data. This centerline is generated from GIS water system data and represents the mainstream path of water flow, usually consisting of a series of continuous coordinate points. Then, the water quality concentration value of the sub-segment is extracted, and the concentration value comes from the simulation results of the water quality model. At the same time, the flow velocity data of each sub-segment in the established two-dimensional hydrodynamic-water quality coupling model is called. The flow velocity data is in vector form and contains magnitude and direction information. The centerline coordinates, water quality concentration, and flow velocity vector are bound on a sub-segment basis, and the coordinate system and time reference are unified to form a structured "basic data of river segment flow field". This dataset is used to guide the simulation of particle emission and motion path and is the core supporting data for the simulation of water quality diffusion particle animation.
[0123] Step S52: Based on the basic data of the river flow field, the particle emission source is deployed and processed. The coordinates of the particle emission points are generated at preset intervals on each river section and centerline. The pollutant concentration value at each emission point is calculated, and the particle generation density coefficient at that point is determined according to the concentration value to obtain the particle emission source distribution data.
[0124] Based on the basic data of the river flow field obtained in step S51, this embodiment of the invention deploys particle emission points along the centerline of each sub-river segment. The spacing between emission points can be set according to the actual application, for example, it is often set to 10 meters in the simulation of small river networks in urban areas. Several emission coordinate points will be generated at equal intervals along each centerline according to the length of the river segment. Subsequently, for each emission point, the water quality concentration value at its location is obtained through linear interpolation or sampling matching, and the corresponding flow velocity vector is read. In order to simulate the dynamic density effect of pollutant diffusion with concentration, a "particle generation density coefficient" is calculated for each emission point. This coefficient is proportional to the pollutant concentration. A threshold can be set to control the maximum density to prevent too many particles in high-concentration areas from causing rendering pressure. Finally, "particle emission source distribution data" containing emission point coordinates, corresponding concentration values, and density coefficients is output. This data determines the subsequent particle quantity and distribution state.
[0125] Step S53: Based on the particle emission source distribution data, generate a corresponding number of particles per unit time for each emission source according to its generation density coefficient, and assign a unique identifier, initial position coordinates, lifetime and pollutant concentration attribute to each particle to obtain the initial attribute data of the particles;
[0126] In this embodiment of the invention, the particle emission source distribution data generated in step S52 is read. Within the time step set by the system (e.g., every 0.1 seconds), the number of particles to be generated at each emission point is determined according to the density coefficient of each emission point. For example, an emission point with a density coefficient of 0.8 generates 8 particles per unit time. A unique identifier is assigned to each particle (which can be a combination of emission point number + timestamp + sequence number), and the coordinates of the emission point are used as the initial position of the particle, the pollutant concentration value is used as the concentration attribute of the particle, and the life cycle of each particle is set, for example, 60 seconds, indicating that the particle will be cleared by the system after 60 seconds. All generated particle information is organized into a particle attribute table, with fields including particle ID, initial position, concentration, life cycle, etc., forming "particle initial attribute data", which is used to drive the subsequent particle motion simulation process.
[0127] Step S54: Based on the initial particle attribute data and the two-dimensional velocity vector in the hydrodynamic-water quality coupling model, the particle motion parameters are assigned, and each particle is given real-time velocity and direction to obtain particle motion control data;
[0128] In this embodiment of the invention, the initial coordinates of the particles are obtained from the initial attribute data of the particles, and the sub-river segment in which the particles are located is matched according to the coordinates. The two-dimensional velocity vector corresponding to the position in the hydrodynamic coupling model is read. This vector represents the direction and magnitude of the water flow in the two-dimensional plane per unit time. The system uses this velocity vector as the driving force for the particle's motion, and assigns the particle the velocity value and motion direction vector at the current time point. If necessary, a small perturbation factor can be added to simulate the randomness of diffusion (e.g., adding a perturbation quantity that follows a normal distribution). Finally, a motion control record is established for each particle, including its current velocity vector, the direction to be updated in the next time step, whether it flows with the fluid or has some stagnant behavior, etc., generating "particle motion control data" as the basis for frame-by-frame path calculation.
[0129] Step S55: Calculate and update the position of each particle frame by frame based on the particle motion control data, record the motion trajectory path of each particle, and obtain particle trajectory data;
[0130] In this embodiment of the invention, particle motion simulation is performed in a time-step manner. The system reads the velocity vector of the current particle every frame (e.g., every 0.1 seconds) and updates the particle's two-dimensional coordinates based on this vector. That is, the velocity direction is multiplied by the time step and added to the current position to obtain a new coordinate value. The path of each particle is continuously updated during its life cycle until the end of the life cycle, when it is marked as "expired" and removed from the trajectory record. The trajectory record uses the particle ID as the primary key and stores the coordinate position of each time point, which can form a two-dimensional coordinate trajectory sequence. To improve efficiency, the system uses a spatial index structure (e.g., a quadtree) to quickly retrieve particle positions. The particle trajectory data is not only used for subsequent animation rendering, but also for scientific research scenarios such as pollutant diffusion path analysis and hotspot area identification.
[0131] Step S56: Perform pollutant particle animation rendering based on particle trajectory data to obtain water quality diffusion simulation rendering results.
[0132] This embodiment of the invention calls the WebGL rendering module of the OpenLayers map engine, using the particle trajectory data in step S55 as a dynamic rendering source. Each particle is drawn onto the river network vector layer based on its position in the current frame, and its color and size are set according to pollutant concentration. For example, high-concentration particles can be drawn as large red semi-transparent circles, while low-concentration particles are drawn as smaller light blue circles. The animation refreshes and displays each frame according to the real-time position of the particles, forming a simulated flow effect. Users can replay the diffusion process at different time periods using a timeline control. Furthermore, the system provides map interaction functionality, allowing users to click on river sections to view indicators such as the average particle concentration and movement speed at the current moment, achieving dynamic visualization analysis. The final generated rendering animation can be embedded into the river network water quality monitoring screen, scheduling platform, or cloud portal as a "water quality diffusion simulation rendering result" to assist in management and decision-making.
[0133] Preferably, step S56 includes the following steps:
[0134] Step S561: Identify the particles that arrive at the river network branching nodes and confluence nodes based on the particle trajectory data, allocate the paths of the particles at the branching nodes according to the flow ratio of each tributary, and perform merging processing on the particles at the confluence nodes to obtain the node-processed trajectory data.
[0135] Based on the particle trajectory data generated in step S55, this embodiment of the invention utilizes river network structure data (including the connection relationship of river segments, topological information of branching nodes and confluence nodes) to perform node identification processing on the particle paths. First, it determines whether each particle has reached a node position in the river network based on its position sequence (hit detection is performed through the node buffer range, such as setting a spatial tolerance of 5 meters to identify whether the particle has entered the node range). For particles identified as having reached branching nodes, combined with the branch flow distribution ratio of the node output by the hydrodynamic model (e.g., 60% for the main channel, 25% for tributary A, and 15% for tributary B), a weighted random function is used to assign a new path direction to the particles, simulating the influence of actual water flow on the direction of pollutant diffusion. For confluence nodes (merging multiple upstream river segments), particles from different paths are merged into the same trajectory sequence according to time, unifying their motion state and eliminating overlapping parts, resulting in node-processed trajectory data that considers the characteristics of network nodes. This data can more realistically reflect the actual path process of pollutant flow and distribution in complex river networks.
[0136] Step S562: Determine the display size and transparency of particles based on the trajectory data after node processing. Particles with higher concentrations are displayed larger and less transparent. Assign corresponding color attributes to particles according to the color information in the river section rendering data to obtain particle rendering attribute data.
[0137] Based on the trajectory data obtained after node processing in step S561, this embodiment of the invention further enhances the visual expressiveness of pollutant particles in the animation by calculating the visual parameters of each particle in the visualization attribute calculation module of the cloud platform. This includes assigning values to particle display size, transparency, and color attributes. The particle display size is linearly mapped to the pollutant concentration value it carries; for example, the particle diameter corresponding to the lowest concentration is 2 pixels, and the highest concentration can reach 8 pixels. Transparency is set inversely proportional to concentration; the higher the concentration, the less transparent the particle. For example, the opacity is 90% at the highest concentration and 30% at the lowest concentration. The color attribute is assigned according to the pollutant color standard of the river section rendering data extracted in step S45. For example, according to the water quality classification standard, the concentration is divided into five categories: excellent, good, lightly polluted, moderately polluted, and heavily polluted, which are mapped to five colors: blue, cyan, green, orange, and red, respectively. Finally, a set of rendering attributes for each particle in each frame is formed, i.e., particle rendering attribute data, which is used to guide subsequent animation rendering operations.
[0138] Step S563: Perform particle animation rendering processing based on the particle rendering attribute data using the OpenLayers framework to obtain pollutant particle animation;
[0139] Based on the particle rendering attribute data calculated in step S562, this embodiment of the invention uses the OpenLayers open-source geographic information visualization framework for particle animation rendering in the cloud platform front-end rendering module. The OpenLayers framework supports multi-level, multi-projection map rendering and dynamic layer control, and can treat particles as point features in vector layers. During the rendering process, the system refreshes 30 frames per second, reading the position information of particles and their corresponding rendering attributes such as color, size, and transparency frame by frame, and rendering them as dynamic point objects in the Canvas. It also supports trail drawing to display the afterimage effect of particle movement paths. To improve performance, a layer grouping mechanism is used to batch render a large number of particles to avoid frame rate drops. The final generated pollutant particle animation can clearly show the diffusion, diversion, merging, and concentration changes of pollutants in the river network, enhancing the visual understanding of the dynamic process of water quality evolution.
[0140] Step S564: Perform time-axis synchronization control processing on the pollutant particle animation, establish the time correspondence between the particle animation and the river section rendering data, and obtain the water quality diffusion simulation rendering results.
[0141] To achieve synchronized display of particle animation and overall river network water quality rendering, this invention requires time-axis synchronization control processing of the pollutant particle animation in step S563 and the river section rendering data generated in step S45. Specifically, a unified time-axis data structure is constructed in the time-series control module of the cloud platform, where each time node (e.g., one second) corresponds to a particle animation frame and a water quality rendering image. A binding mechanism is used to map the particle data frames to the river section concentration distribution image frames one-to-one. During playback, the display status of the particle animation and the river section base map is updated synchronously based on the user's time selection or automatic playback progress. Furthermore, to enhance the user experience, controls such as a time-axis slider, playback control buttons, and speed adjustment can be provided on the front-end page, allowing users to customize the browsing time period or observe the pollution diffusion at any given moment. The final result is a water quality diffusion simulation rendering under synchronized control, which can fully display the dynamic diffusion and evolution of pollutants in the river network system in both time and space dimensions. This is suitable for specific application scenarios such as environmental monitoring, water conservancy scheduling simulation, and emergency assessment of sudden pollution events.
[0142] The present invention also provides a cloud-based river network water quality simulation system for executing the above-described cloud-based river network water quality simulation method, wherein the cloud-based river network water quality simulation system comprises:
[0143] The river network modeling module is used to acquire basic river network data, river cross-section data, river topography data, water quality monitoring data, and water level and flow data. Based on the basic river network data, river topography data, and river cross-section data, a river network hydrodynamic model is constructed. Based on the river network hydrodynamic model and combined with water quality monitoring data and water level and flow data, the water quality component categories are determined, and an uncalibrated preliminary coupled model is constructed.
[0144] The initial water quality field module is used to determine the initial water quality field of the preliminary coupled model based on water quality monitoring data, so as to obtain the initial concentration field model of water quality.
[0145] The model calibration and segmentation module is used to calibrate and evaluate the accuracy of the initial water quality concentration field model based on the Nash efficiency coefficient, resulting in a hydrodynamic-water quality coupled model. Based on the water quality calibration results of each section of the hydrodynamic-water quality coupled model, the river segment between the upstream and downstream sections is adaptively segmented to form subdivided river segment data.
[0146] The rendering color determination module is used to perform linear interpolation of water quality component concentrations in each river segment based on the subdivided river segment data, and to render and determine the values of each water quality component in each sub-river segment according to the preset color band mapping table, so as to obtain the river segment rendering data.
[0147] The diffusion simulation module is used to perform pollutant particle animation rendering based on the river section rendering data and the flow velocity in the hydrodynamic-water quality coupling model, so as to obtain the water quality diffusion simulation rendering results.
[0148] Therefore, the embodiments should be considered as exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of the equivalents of the application are intended to be included within the invention.
[0149] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.
Claims
1. A method for simulating river network water quality based on a cloud platform, characterized in that, Includes the following steps: Step S1: Obtain basic river network data, river cross-section data, river topography data, water quality monitoring data, and water level and flow data. Construct a river network hydrodynamic model based on the basic river network data, river topography data, and river cross-section data. Determine the water quality component categories based on the river network hydrodynamic model combined with water quality monitoring data and water level and flow data. Construct an uncalibrated preliminary coupled model. Step S2: Based on water quality monitoring data, the initial water quality field of the preliminary coupled model is determined to obtain the initial water quality concentration field model. Step S2 includes: Step S21: Identify the spatial coordinates of each monitoring station based on the water quality monitoring data, spatially match the monitoring station coordinates with the preliminary coupling model, determine the upstream and downstream monitoring station intervals of each river network water quality section, and obtain the section-station spatial relationship data. Step S22: Calculate the straight-line distance between each river network section and the two upstream and downstream monitoring stations based on the cross-section-station spatial relationship data, and use the inverse distance weighted interpolation method to perform spatial interpolation calculation of the initial concentration of water quality components for each river network section to obtain the initial concentration distribution data; The specific formula for the inverse distance weighted interpolation method is as follows: In the formula, Let be the initial concentration of the nth component in the river cross-section water quality. The initial concentration of the nth component at the upstream water quality monitoring station of the river section. This refers to the distance from the upstream station to the river cross-section. This represents the distance from the downstream station to the river cross-section. The initial concentration of the nth component at the downstream water quality monitoring station of the river section; Step S23: Perform time correction processing on the initial concentration distribution data to obtain the initial corrected concentration data; The specific formula for time correction is as follows: ; In the formula, Let be the initial concentration correction factor for the nth component. Let m be the monitored concentration of the nth component at time m at the upstream station, and t be the time it takes for the water to flow from the upstream station to the downstream station. The monitored concentration of the nth component is given when the water flows from the upstream station at time m to the downstream station. The preset distance coefficient, This represents the initial corrected concentration of the nth component in the river cross-section water quality. The initial concentration of the nth component in the river cross-section water quality is given by M, where M is the number of monitoring time points. Step S24: Perform concentration rationality verification based on the initial corrected concentration data, check whether the concentration gradient between adjacent sections exceeds the preset threshold, smooth the sections with abnormal gradients, and obtain the initial water quality concentration field model. Step S3: Perform model calibration and accuracy evaluation on the initial water quality concentration field model based on the Nash efficiency coefficient to obtain the hydrodynamic-water quality coupled model; based on the water quality calibration results of each section of the hydrodynamic-water quality coupled model, perform adaptive segmentation processing on the river segment between the upstream and downstream sections to form subdivided river segment data; Step S4: Based on the subdivided river segment data, perform linear interpolation of water quality component concentrations for each river segment, and render and color-code the values of each water quality component in each sub-river segment according to the preset color band mapping table to obtain the river segment rendering data. Step S5: Based on the river section rendering data and the flow velocity in the hydrodynamic-water quality coupling model, perform pollutant particle animation rendering to obtain the water quality diffusion simulation rendering results.
2. The river network water quality simulation method based on a cloud platform according to claim 1, characterized in that, Step S1 includes the following steps: Step S11: Obtain basic river network data, river cross-section data, river topography data, water quality monitoring data, and water level and flow data; Step S12: Extract the coordinates of the river centerline and the topological connection relationship of the river network based on the basic data of the river network, establish the river network node numbering system, and obtain standardized river network topological structure data; Step S13: Determine the geometric parameters of each section based on the river cross-section data, evaluate the slope and roughness of each river segment based on the river topography data, and associate the geometric parameters and slope and roughness with the corresponding river network nodes in the standardized river network topology data to obtain river network structure data containing hydraulic geometry information. Step S14: Based on the river network structure data and water level and flow data, construct the hydrodynamic equation set, establish a continuity equation for each river network node, establish a momentum equation for each river segment, embed the boundary condition data into the equation set, and obtain the river network hydrodynamic mathematical model. Step S15: Perform numerical discretization on the river network hydrodynamic mathematical model, convert the continuity equation and momentum equation into a system of algebraic equations, set the time step and spatial step, establish the solution matrix, and obtain a computable river network hydrodynamic model. Step S16: Determine the water quality component categories based on the river network hydrodynamic model combined with water quality monitoring data and water level and flow data, thereby constructing an uncalibrated preliminary coupled model.
3. The river network water quality simulation method based on a cloud platform according to claim 2, characterized in that, Step S16 includes the following steps: Step S161: Based on the water quality monitoring data, the detection frequency and value range of water quality indicators at each monitoring station are statistically analyzed, and water quality indicators with a detection frequency higher than the preset threshold are selected to obtain a list of target water quality components. Step S162: Analyze the component transport characteristics based on the target water quality component list and water level and flow rate data, calculate the actual time for pollutants to be transported from the upstream station to the downstream station, identify the conservation and reactivity characteristics of each component by analyzing the correlation between upstream and downstream concentrations at different times, determine the degradation coefficient of each component, and obtain the water quality component parameter table. Step S163: Extract the flow velocity and water depth calculation results of each river segment based on the river network hydrodynamic model, calculate the Reynolds number and Peclet number of each river segment, determine the flow regime type based on the Reynolds number, evaluate the dominant mechanism of diffusion and transport based on the Peclet number, and obtain the hydraulic transport characteristic data of the river segment. Step S164: Based on the hydraulic transport characteristic data of the river section and the water quality component parameter table, the diffusion parameters are determined. The longitudinal diffusion coefficient and the transverse diffusion coefficient are calculated for each river section, and the diffusion coefficient values are corrected according to the geometric characteristics of the river section. The diffusion parameters are associated with the corresponding river sections to obtain the river section diffusion parameter database. Step S165: Establish convection-diffusion transport equations for each water quality component based on the river section diffusion parameter database. Use the flow velocity calculation results of the hydrodynamic model as the convection term coefficient, the river section diffusion parameters as the diffusion term coefficient, and the water quality component degradation coefficient as the reaction term coefficient to obtain the water quality transport equation set. Step S166: Establish a data transmission interface for hydrodynamic calculation and water quality calculation based on the water quality transport equation set and the river network hydrodynamic model, set a time synchronization mechanism for coupled calculation, and obtain an uncalibrated preliminary coupled model.
4. The river network water quality simulation method based on a cloud platform according to claim 3, characterized in that, Step S3 includes the following steps: Step S31: Perform trial calculations based on the initial water quality concentration field model, select measured water quality information from historical periods as the verification benchmark, run the model to calculate the predicted water quality concentration values of each river network section in the same period, pair the predicted values with the measured values according to the time series, and obtain a simulation-measured data comparison table. Step S32: Calculate the root mean square error and the standard deviation of the measured data according to the simulation-measured data comparison table, and compare the root mean square error value with 0.5 times the standard deviation to obtain the error evaluation result; Step S33: Calculate the Nash efficiency coefficient based on the simulation-measured data comparison table, calculate the average value of the measured values, calculate the sum of squares of the differences between the predicted and measured values and the sum of squares of the differences between the measured values and the average value of the measured values, and obtain the efficiency coefficient evaluation results. Step S34: Perform comprehensive accuracy judgment processing based on the error evaluation results and efficiency coefficient evaluation results. When the root mean square error value is less than 0.5 times the standard deviation of the measured value, the average value of the Nash efficiency coefficients of each water quality component is greater than 0.7, and the lowest Nash efficiency coefficient is not less than 0.6, the accuracy is judged to be qualified, and an accuracy qualified mark is obtained. Step S35: Based on the accuracy qualification mark, confirm that the initial concentration field model of water quality has been calibrated. Solidify the calibrated parameters into the model. Perform complete time series water quality concentration calculations on all river network sections. Extract the water quality component concentration values of each section at different times. Organize them according to the section number and time order to obtain a hydrodynamic water quality coupling model containing the water quality calibration results of each section. Step S36: Based on the water quality calibration results of each section of the hydrodynamic-water quality coupling model, adaptive segmentation processing is performed on the river segment between the upstream and downstream sections to form subdivided river segment data.
5. The river network water quality simulation method based on a cloud platform according to claim 4, characterized in that, Step S36 includes the following steps: Step S361: Calculate the straight-line distance between two adjacent sections based on the water quality calibration results of each section in the hydrodynamic-water quality coupling model, and use it as the basic length of the river section; Step S362: Establish a grading standard for cutting spacing based on the basic length of the river section, and obtain standard cutting spacing data; Step S363: Perform river curvature correction processing based on standard cutting spacing data, extract the geometric shape data of each river segment, calculate the sinuosity coefficient of the river segment, and determine the high-curvature river segment when the sinuosity coefficient exceeds the preset threshold. Reduce the cutting spacing of the high-curvature river segment to 50%-70% of the standard spacing to obtain the corrected cutting spacing data. The specific formula for calculating the sinuosity coefficient of the river segment is sinuosity coefficient = actual length of river segment / straight distance of river segment. Step S364: Based on the corrected cutting spacing data, each river segment is cut at equal intervals. Starting from the upstream section, the cutting points are located along the river centerline according to the determined cutting spacing, generating the coordinate information of each cutting point, forming several sub-river segments separated by the cutting points, and obtaining subdivided river segment data.
6. The river network water quality simulation method based on a cloud platform according to claim 5, characterized in that, Step S4 includes the following steps: Step S41: Extract the starting and ending coordinates of each sub-segment based on the subdivided river segment data, calculate the center point coordinates of each sub-segment as the representative position of the river segment, identify the upstream and downstream cross-sectional position relationship of each sub-segment, establish the spatial correspondence between the sub-segment and the cross-section, and obtain the river segment-cross-section association data. Step S42: Calculate the distance from the center point of each sub-river segment to the upstream and downstream cross-sections based on the river segment-section correlation data. Use the reciprocal of the distance as the weight factor and normalize the weight factor so that the sum of the upstream and downstream weights equals 1 to obtain the river segment interpolation weight data. Step S43: Based on the interpolation weight data of the river section, perform interpolation calculation on the concentration of water quality components in each sub-river section, and perform interpolation calculation on all water quality components one by one to obtain the water quality concentration distribution data of the river section. The specific formula for calculating the water quality component concentration interpolation is as follows: In the formula, Let be the concentration value of the i-th sub-river segment. This represents the concentration value at the upstream section. This represents the concentration value at the downstream section. Let be the distance from the i-th sub-river segment to the upstream cross-section. This represents the total distance between the upstream and downstream sections. Step S44: Based on the water quality concentration distribution data of the river section, perform water quality grade assessment based on surface water quality standards and specifications to obtain the water quality grade data of the river section; Step S45: Render and color-determine the values of each water quality component in each sub-river section according to the preset color mapping table to obtain the river section rendering data.
7. The river network water quality simulation method based on a cloud platform according to claim 6, characterized in that, Step S5 includes the following steps: Step S51: Extract the centerline coordinates and water quality concentration values of each sub-segment based on the river segment rendering data. Combine the flow velocity in the hydrodynamic-water quality coupling model to associate the corresponding flow velocity vector and concentration value for each sub-segment to obtain the basic data of the river segment flow field. Step S52: Based on the basic data of the river flow field, the particle emission source is deployed and processed. The coordinates of the particle emission points are generated at preset intervals on each river section and centerline. The pollutant concentration value at each emission point is calculated, and the particle generation density coefficient at that point is determined according to the concentration value to obtain the particle emission source distribution data. Step S53: Based on the particle emission source distribution data, generate a corresponding number of particles per unit time for each emission source according to its generation density coefficient, and assign a unique identifier, initial position coordinates, lifetime and pollutant concentration attribute to each particle to obtain the initial attribute data of the particles; Step S54: Based on the initial particle attribute data and the two-dimensional velocity vector in the hydrodynamic-water quality coupling model, the particle motion parameters are assigned, and each particle is given real-time velocity and direction to obtain particle motion control data; Step S55: Based on the particle motion control data, the position of each particle is updated frame by frame, the motion trajectory path of each particle is recorded, and particle trajectory data is obtained; Step S56: Perform pollutant particle animation rendering based on particle trajectory data to obtain water quality diffusion simulation rendering results.
8. The river network water quality simulation method based on a cloud platform according to claim 7, characterized in that, Step S56 includes the following steps: Step S561: Identify the particles that arrive at the river network branching nodes and confluence nodes based on the particle trajectory data, allocate the paths of the particles at the branching nodes according to the flow ratio of each tributary, and perform merging processing on the particles at the confluence nodes to obtain the node-processed trajectory data. Step S562: Determine the display size and transparency of particles based on the trajectory data after node processing. Particles with higher concentrations are displayed larger and less transparent. Assign corresponding color attributes to particles according to the color information in the river section rendering data to obtain particle rendering attribute data. Step S563: Perform particle animation rendering processing based on the particle rendering attribute data using the OpenLayers framework to obtain pollutant particle animation; Step S564: Perform time-axis synchronization control processing on the pollutant particle animation, establish the time correspondence between the particle animation and the river section rendering data, and obtain the water quality diffusion simulation rendering results.
9. A river network water quality simulation system based on a cloud platform, characterized in that, For executing the cloud-based river network water quality simulation method as described in claim 1, the cloud-based river network water quality simulation system comprises: The river network modeling module is used to acquire basic river network data, river cross-section data, river topography data, water quality monitoring data, and water level and flow data. Based on the basic river network data, river topography data, and river cross-section data, a river network hydrodynamic model is constructed. Based on the river network hydrodynamic model and combined with water quality monitoring data and water level and flow data, the water quality component categories are determined, and an uncalibrated preliminary coupled model is constructed. The initial water quality field module is used to determine the initial water quality field of the preliminary coupled model based on water quality monitoring data, so as to obtain the initial concentration field model of water quality. The model calibration and segmentation module is used to calibrate and evaluate the accuracy of the initial water quality concentration field model based on the Nash efficiency coefficient, resulting in a hydrodynamic-water quality coupled model. Based on the water quality calibration results of each section of the hydrodynamic-water quality coupled model, the river segment between the upstream and downstream sections is adaptively segmented to form subdivided river segment data. The rendering color determination module is used to perform linear interpolation of water quality component concentrations in each river segment based on the subdivided river segment data, and to render and determine the values of each water quality component in each sub-river segment according to the preset color band mapping table, so as to obtain the river segment rendering data. The diffusion simulation module is used to perform pollutant particle animation rendering based on the river section rendering data and the flow velocity in the hydrodynamic-water quality coupling model, so as to obtain the water quality diffusion simulation rendering results.
Citation Information
Patent Citations
Section gradient interpolation technology for water quality multi-index dynamic simulation
CN102708520A
Water quality model parameter calibration method based on equivalent pollution source thought
CN116882121A