A method and system for treating sewage in a scenic area water channel
Patent Information
- Application Number
- CN202611002034.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-07
- Publication Date
- 2026-10-09
AI Technical Summary
[0004]本发明的目的在于提供一种用于景区水渠污水处理方法及系统,以解决现有技术依赖稳态单点水质参数,无法同步捕捉污染团扩散迁移状态与成分特征,导致净化方案在空间分布上偏离实际污染动态的问题;同时解决现有技术缺乏将底泥耗氧速率和微生物种群活性变化实时映射为曝气强度和菌剂投加量调整指令的量化机制,造成反馈调节滞后且失当的问题
[0018]采用对动态水质图像序列进行光流场分解并与静态水质参数矩阵的奇异值分解结果卷积交互的方式,实现了污染物物理输运速度与化学组分特征的结构化融合。光流场分解从连续图像帧中提取出每个像素位置的污染团运动矢量,构成高分辨率的扩散速度场,其空间粒度远高于传统传感器的点式流速测量。同步地,对静态水质参数矩阵的奇异值分解,通过代数变换从中剥离出占据主导方差方向的主要污染成分特征向量,该向量凝练了污染物的内在组分结构信息。将扩散速度场作为动态卷积核,在主要污染成分特征向量上执行一维深度卷积并结合外积运算生成污染扩散协同张量后,该张量在单一数据结构内同时编码了污染团“如何扩散”与“扩散的是什么”的双重信息流,消除了物理迁移数据与化学分析数据之间的模态割裂。这种融合使得以此张量为依据划分治理河段时,分段边界与污染扩散前沿的实际推进位置精确对齐,每个河段内生成了与污染扩散阶段和成分特征双重匹配的初始净化方案,从源头上解决了统一治理策略与污染时空异质性之间的错配问题。采用底泥耗氧速率变化量和微生物种群活性变化量双参数驱动净化效能响应曲面进行动态修正的方式,构建了从生物化学界面过程到工程操作参数的连续量化映射通道。在净化方案执行过程中,布设于底部沉积物界面的溶解氧微电极持续捕捉底泥耗氧速率相对于净化前基准值的变化量,该变化量直接反映有机质分解强度和氧化还原状态的转化幅度;同时,流式细胞仪采样端口输出的微生物种群平均荧光强度变化量,实时指示了菌剂接种后微生物群落代谢活性与生物量消长的真实响应水平。预构建的净化效能响应曲面并非简单的阈值判断逻辑,而是一个由历史净化实验数据拟合形成的三维曲面,能够将上述两个内禀变化量构成的二维输入,准确投影为连续的净化效率修正系数。依据该修正系数与预设目标之间的数值关系,自动计算出曝气频率的上调比例和菌剂的追加投加量,实现操作参数的无级调节,而非通断式开关控制。一氧消耗指标与一生物活性指标在曲面上的协同定位,使得修正量同时兼顾了物理富氧效率和生物降解效率的平衡需求,避免了仅凭单一指标调节时容易出现的过度曝气抑制特定菌群活性或菌剂过量投加导致沉积物二次释磷等副作用,最终使每个治理河段的净化参数都能朝净化效率最优方向逼近。
Smart Images

Figure CN122877936A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wastewater treatment technology, specifically to a method and system for treating wastewater in scenic area canals. Background Technology
[0002] As an important component of scenic water systems, water channels in tourist areas face the prominent challenge of highly variable spatiotemporal pollution inputs in water quality maintenance. Existing technologies typically deploy fixed sensors at key nodes in the channels to periodically monitor indicators such as chemical oxygen demand (COD), ammonia nitrogen, and total phosphorus, and then uniformly implement mechanical aeration or microbial agent addition based on the test results. This approach relies on the average level of steady-state water quality parameters to formulate purification strategies, making it difficult to address the rapid diffusion and concentration changes of pollutant plumes during water flow. When pollutant plumes migrate along the channels, there is a complex dynamic coupling relationship between their diffusion rate and the main pollutant components. Fixed sensors can only acquire discrete data from single points and cannot simultaneously capture the spatial transport status and compositional evolution characteristics of pollutants, causing purification measures to deviate from the actual pollution distribution both spatially and temporally. Another drawback of existing solutions is the crude feedback adjustment mechanism for purification execution. Conventional methods usually use achieving the required water quality at the outlet as the ultimate control objective, triggering equipment start-up and shutdown by setting fixed thresholds, lacking continuous dynamic perception and response to key biochemical indicators during the purification process. Sediment oxygen consumption rate and microbial community activity are core intrinsic variables reflecting the self-purification capacity of water bodies and the actual effectiveness of purification measures. Existing technologies have failed to establish a quantitative mapping model between these two dynamic variables and purification operation parameters. In practice, operators often rely on experience rules to adjust aeration rates and bacterial agent dosages, resulting in delayed adjustments and inappropriate magnitudes, leading to response delays, low treatment efficiency, or waste of energy and chemicals.
[0003] This invention focuses on how to accurately identify the pollution diffusion front in the spatial dimension and allocate treatment resources accordingly, and how to establish an adaptive adjustment closed loop from biochemical response to operational parameters in the temporal dimension. Existing technologies lack effective systematic solutions for the dynamic integration of pollution migration and diffusion along water flow with the component characteristics implicit in the water quality parameter matrix, and for the real-time conversion of changes in sediment microbial interface processes caused by remediation measures into operational variable corrections. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for treating sewage in scenic water channels, which solves the problem that existing technologies rely on steady-state single-point water quality parameters and cannot simultaneously capture the diffusion and migration state and composition characteristics of pollution plumes, resulting in the purification scheme deviating from the actual pollution dynamics in terms of spatial distribution; at the same time, it solves the problem that existing technologies lack a quantitative mechanism to map changes in sediment oxygen consumption rate and microbial population activity into real-time aeration intensity and bacterial agent dosage adjustment instructions, resulting in delayed and inappropriate feedback regulation.
[0005] To achieve the above objectives, the present invention provides the following technical solution: The present invention provides a method for treating sewage in scenic water channels, comprising the following steps: acquiring a dynamic water quality image sequence and a static water quality parameter matrix at the inlet of the scenic water channel; performing optical flow field decomposition on the dynamic water quality image sequence to extract the diffusion velocity field of the pollutant cluster, and simultaneously performing singular value decomposition on the static water quality parameter matrix to extract the feature vectors of the main pollutants; performing convolution interaction between the diffusion velocity field of the pollutant cluster and the feature vectors of the main pollutants to generate a pollution diffusion co-existence tensor; and performing time-axis-based analysis on the pollution diffusion co-existence tensor. Accumulated gradients are used to dynamically divide the canal into multiple treatment sections, and an initial purification scheme is configured independently for each treatment section. The changes in sediment oxygen consumption rate and microbial population activity generated after the execution of the initial purification scheme in each treatment section are tracked in real time. The changes in sediment oxygen consumption rate and microbial population activity in each treatment section are input into a pre-constructed purification efficiency response surface, and the purification efficiency correction coefficients for each treatment section are output. The aeration intensity and microbial agent dosage in the initial purification scheme of the corresponding treatment section are adjusted in reverse using the purification efficiency correction coefficients for each treatment section.
[0006] By convolving the diffusion velocity field, which characterizes pollutant transport, with the feature vectors of the main pollutant components, a pollution diffusion co-evolution tensor is generated to depict the spatiotemporal evolution of pollution. This makes the subsequent dynamic segmentation of the canal more closely reflect the actual pollution diffusion situation, providing greater targeting for the initial purification schemes matched to each river section. Real-time feedback on changes in sediment oxygen consumption rate and microbial population activity, along with the generation of purification efficiency correction coefficients using the purification efficiency response surface to dynamically adjust aeration intensity and bacterial agent dosage, achieves adaptive closed-loop control of the purification strategy. This effectively adapts to fluctuations in scenic canal water quality, ensuring stable effluent quality while reducing energy and chemical consumption.
[0007] Preferably, the specific method for acquiring the dynamic water quality image sequence and the static water quality parameter matrix is as follows: An underwater high-definition camera is deployed at the water inlet of the canal to continuously acquire image frames containing the motion trajectory of suspended particulate matter at a fixed sampling frequency. These image frames are then stacked in chronological order to form a dynamic water quality image sequence. Simultaneously, a multi-parameter water quality sensor array is set up at the water inlet to periodically detect water quality indicators including chemical oxygen demand (COD), ammonia nitrogen, total phosphorus, dissolved oxygen, and pH. All water quality indicator values are arranged into a row vector according to a preset indicator order. The row vectors obtained from multiple sampling times are then stacked vertically in chronological order to form a static water quality parameter matrix. This data acquisition method aligns the visual motion information of solid pollutants in the water body with the multidimensional chemical indicators of dissolved pollutants in the spatiotemporal domain, providing a unified observation basis for subsequent coupled analysis.
[0008] Preferably, the specific method for extracting the diffusion velocity field of the pollution plume and the feature vector of the main pollutant component is as follows: Select two consecutive frames of images from a dynamic water quality image sequence; calculate the optical flow displacement vector of each pixel in the two consecutive frames; arrange the optical flow displacement vectors of all pixels according to their original pixel positions to form a two-dimensional optical flow field; vectorize the horizontal and vertical components of the two-dimensional optical flow field and then concatenate them to obtain the diffusion velocity field of the pollution plume; perform singular value decomposition on the static water quality parameter matrix to obtain a left singular matrix, a singular value diagonal matrix, and a right singular matrix; extract the first column vector corresponding to the largest singular value in the left singular matrix as the feature vector of the main pollutant component. Further, the optical flow displacement vector is calculated using the Lucas-Kanade pyramid iterative algorithm, and a gradient magnitude threshold is set during the calculation process to remove background static pixels, thereby ensuring that the extracted velocity field mainly reflects the macroscopic migration of the pollution plume and eliminates the interference of the static texture of the water body background.
[0009] Preferably, the specific method for generating the pollution diffusion co-current tensor is as follows: using the pollution plume diffusion velocity field as the convolution kernel, a one-dimensional deep convolution operation is performed on the feature vectors of the main pollution components. The stride of the one-dimensional deep convolution operation is set to the actual distance corresponding to the interval between adjacent elements in the feature vectors of the main pollution components, resulting in a convolution response sequence. Each velocity component in the pollution plume diffusion velocity field is then cross-producted with the feature vectors of the main pollution components, resulting in multiple cross-product matrices. After element-wise weighted summation of all cross-product matrices with the convolution response sequence, a pollution diffusion co-current tensor in the form of a three-dimensional array is reconstructed. This process achieves multi-scale and multi-modal fusion of the velocity field and component features, and the three-dimensional array form can completely preserve the coupling structure between time, space, and pollution components. The one-dimensional deep convolution operation employs a zero-padding strategy to maintain the convolution response sequence with the feature vectors of the main pollution components of the same length, ensuring dimensionality matching in subsequent calculations.
[0010] Preferably, the specific method for dynamically dividing the treated river sections and configuring initial purification schemes is as follows: Along the time axis of the pollution diffusion coordination tensor, calculate the gradient value of the sum of all elements of the pollution diffusion coordination tensor on each time slice. Mark the moment when the gradient value exceeds a preset fluctuation threshold as a segmentation point. Using these segmentation points as boundaries, dynamically divide the canal into multiple treated river sections along the water flow direction. For each treated river section, extract the core tensor of the pollution diffusion coordination tensor within the corresponding time period of that treated river section. Perform cluster analysis on the core tensor to obtain the pollution characteristic pattern label of that treated river section. Based on the pollution characteristic pattern label, match the rated power of the aerator, the type of microbial agent, and its initial dosage concentration from a preset scheme library to form an initial purification scheme. Preferably, the cluster analysis uses the K-means algorithm, and the number of clusters K is automatically determined based on the principle of maximizing the silhouette coefficient, so that the river section division and scheme matching do not require manual preset of the number of categories, improving the level of automation.
[0011] Preferably, the specific method for real-time tracking of changes in sediment oxygen consumption rate and microbial community activity is as follows: Dissolved oxygen microelectrodes are deployed at the bottom sediment interface in each treated river section. The first sediment oxygen consumption rate is measured before the initial purification plan is implemented, and the second sediment oxygen consumption rate is continuously measured during the initial purification plan. The difference between the second and first sediment oxygen consumption rates is calculated as the change in sediment oxygen consumption rate. Flow cytometer sampling ports are deployed in the water body of each treated river section. The average fluorescence intensity of the first microbial community is measured before the initial purification plan is implemented, and the average fluorescence intensity of the second microbial community is measured periodically during the initial purification plan. The difference between the average fluorescence intensity of the second and first microbial communities is calculated as the change in microbial community activity. Through in-situ, real-time, and high temporal resolution monitoring of biogeochemical processes, the obtained changes can sensitively reflect the immediate impact of purification measures on the sediment-water interface and microbial community activity.
[0012] Preferably, the specific method for obtaining the purification efficiency correction coefficient is as follows: After normalizing the changes in sediment oxygen consumption rate and microbial population activity, two-dimensional input coordinate points are formed. These two-dimensional input coordinate points are projected onto a pre-constructed purification efficiency response surface. This surface is a three-dimensional surface fitted using historical purification experimental data, with the changes in sediment oxygen consumption rate as the first axis, the changes in microbial population activity as the second axis, and the purification efficiency correction coefficient as the third axis. A target point with the same first and second axis coordinates as the two-dimensional input coordinate points is located on the purification efficiency response surface. The third axis coordinate value of the target point is extracted as the purification efficiency correction coefficient for the treated river section. Using a three-dimensional response surface fitted with historical data makes the complex nonlinear purification efficiency relationship explicit and queryable, providing an objective basis for obtaining the correction coefficient and avoiding bias caused by relying on a single threshold.
[0013] Preferably, the specific method for reverse adjustment of aeration intensity and microbial agent dosage is as follows: The purification efficiency correction coefficient is compared with a preset correction coefficient threshold. When the purification efficiency correction coefficient is lower than the correction coefficient threshold, the aeration intensity increase ratio is calculated based on the ratio of the purification efficiency correction coefficient to the correction coefficient threshold. The operating frequency of the aerator in the initial purification scheme is increased according to the aeration intensity increase ratio. Simultaneously, the additional microbial agent dosage is calculated based on the difference between the purification efficiency correction coefficient and the correction coefficient threshold. The additional microbial agent dosage is added to the initial microbial agent dosage in the initial purification scheme to obtain the updated microbial agent dosage. This adjustment method allows aeration and microbial agent dosage to work synergistically, simultaneously enhancing physical oxygen supply and biodegradation capacity when purification efficiency is insufficient.
[0014] As a technical solution of this invention, after adjusting the initial purification scheme of the corresponding river section using the purification efficiency correction coefficient of each treated river section, the following steps are further performed: The changes in sediment oxygen consumption rate and microbial population activity of each treated river section after adjustment are re-acquired, and the purification efficiency response surface is input to generate updated purification efficiency correction coefficients; it is determined whether the updated purification efficiency correction coefficients reach a preset qualified threshold. If the qualified threshold is not reached, the steps of adjusting the aeration intensity and microbial agent dosage are repeated until the purification efficiency correction coefficients of all treated river sections reach the qualified threshold. The final aeration intensity and microbial agent dosage used for each treated river section are recorded as the solidified purification parameters for that treated river section. This iterative closed loop ensures that the purification effect can converge to the target level, and at the same time provides a verified parameter combination for direct use of the initial scheme under similar subsequent working conditions.
[0015] As another technical solution of the present invention, after independently configuring an initial purification scheme for each treated river section, and before tracking the changes in sediment oxygen consumption rate and microbial population activity in real time, a verification step is included: An ultraviolet-visible absorption spectrometer is deployed at the end of each treated river section to continuously collect the full-band absorption spectrum of the water flowing through that section; the full-band absorption spectrum is matched with the pre-stored target effluent spectrum of that treated river section, and the waveform matching degree is calculated; when the waveform matching degree is lower than a preset activation threshold, the step of real-time tracking of changes in sediment oxygen consumption rate and microbial population activity is triggered; when the waveform matching degree reaches or exceeds the activation threshold, the current initial purification scheme is maintained and the waveform matching degree continues to be monitored. This step, through online spectral fingerprint verification, only activates subsequent fine-feedback adjustments when the initial purification scheme fails to achieve the expected water quality, effectively reducing unnecessary monitoring and calculation overhead and improving the overall operating efficiency of the system.
[0016] This invention also provides a wastewater treatment system for scenic area canals, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of the aforementioned wastewater treatment method for scenic area canals. This system embeds the above-mentioned method into an automatically running computer program, capable of acquiring sensor data online, performing image and matrix decomposition, generating pollution diffusion co-current tensors, segmenting and controlling the purification process, making the entire wastewater treatment process highly automated and intelligent, adaptable to scenarios with frequent fluctuations in water quality in scenic area canals.
[0017] The technical effects and advantages provided by the present invention in the above technical solution are as follows:
[0018] By performing optical flow field decomposition on dynamic water quality image sequences and convolving it with the singular value decomposition results of static water quality parameter matrices, a structured fusion of pollutant physical transport velocities and chemical component characteristics was achieved. Optical flow field decomposition extracts the pollutant cluster motion vector at each pixel location from consecutive image frames, constructing a high-resolution diffusion velocity field with a spatial granularity far exceeding that of point-based flow velocity measurements from traditional sensors. Simultaneously, the singular value decomposition of the static water quality parameter matrix extracts the main pollutant component feature vectors dominating the variance direction through algebraic transformations. These vectors encapsulate the intrinsic component structure information of the pollutants. Using the diffusion velocity field as a dynamic convolution kernel, a one-dimensional depthwise convolution is performed on the main pollutant component feature vectors, combined with outer product operations to generate a pollution diffusion co-evaluation tensor. This tensor simultaneously encodes the dual information flow of "how the pollutant cluster diffuses" and "what is diffused" within a single data structure, eliminating the modal separation between physical migration data and chemical analysis data. This integration ensures that when dividing river sections for treatment based on this tensor, the segment boundaries are precisely aligned with the actual advance position of the pollution diffusion front. Each river section generates an initial purification scheme that matches both the pollution diffusion stage and component characteristics, fundamentally resolving the mismatch between a unified treatment strategy and the spatiotemporal heterogeneity of pollution. A continuous quantitative mapping channel from biochemical interface processes to engineering operation parameters is constructed by dynamically correcting the purification efficiency response surface using two parameters: changes in sediment oxygen consumption rate and changes in microbial population activity. During the execution of the purification scheme, dissolved oxygen microelectrodes deployed at the bottom sediment interface continuously capture the change in sediment oxygen consumption rate relative to the pre-purification baseline value. This change directly reflects the intensity of organic matter decomposition and the magnitude of redox transformation. Simultaneously, the change in the average fluorescence intensity of the microbial population output from the flow cytometer sampling port indicates the real-time response level of microbial community metabolic activity and biomass fluctuations after inoculation with the microbial agent. The pre-constructed purification efficiency response surface is not a simple threshold judgment logic, but a three-dimensional surface formed by fitting historical purification experimental data. It can accurately project the two-dimensional input consisting of the two intrinsic variables mentioned above into a continuous purification efficiency correction coefficient. Based on the numerical relationship between this correction coefficient and the preset target, the increase ratio of aeration frequency and the additional dosage of microbial agent are automatically calculated, realizing stepless adjustment of operating parameters, rather than on / off switch control. The synergistic positioning of an oxygen consumption index and a biological activity index on the surface ensures that the correction amount simultaneously takes into account the balance requirements of physical oxygen enrichment efficiency and biodegradation efficiency. This avoids the side effects that can easily occur when adjusting only a single index, such as over-aeration inhibiting the activity of specific bacterial groups or excessive addition of microbial agents leading to secondary phosphorus release from sediments. Ultimately, this allows the purification parameters of each treated river section to approach the optimal purification efficiency. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0020] Figure 1 This is a flowchart of a wastewater treatment method for scenic area canals;
[0021] Figure 2 This is a flowchart of the dynamic division of river sections for treatment and the configuration of initial purification schemes based on the pollution diffusion synergistic tensor.
[0022] Figure 3 This is a flowchart for real-time tracking of changes in sediment oxygen consumption rate and microbial population activity;
[0023] Figure 4 This is a flowchart of the iterative adjustment process for river management parameters based on the purification efficiency response surface;
[0024] Figure 5 This is a flowchart based on the tracking of sediment oxygen consumption rate and microbial activity triggered by spectral waveform matching;
[0025] Figure 6 This is a comparison chart of the feature vectors of the main pollutants and the convolutional response sequences;
[0026] Figure 7 This is a K-means clustering distribution map of the pollution characteristics of the river section under treatment;
[0027] Figure 8 It is the waveform matching curve of the full-band absorption spectrum of the effluent from the treated river section with the target spectrum. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] See Figure 1This invention provides a method for treating sewage in a scenic area's irrigation canal, comprising the following steps: acquiring a dynamic water quality image sequence and a static water quality parameter matrix at the canal's inlet; performing optical flow field decomposition on the dynamic water quality image sequence to extract the diffusion velocity field of the pollutant plume, and simultaneously performing singular value decomposition on the static water quality parameter matrix to extract the feature vectors of the main pollutants; convolving the diffusion velocity field of the pollutant plume with the feature vectors of the main pollutants to generate a pollution diffusion co-existence tensor; dynamically dividing the canal into multiple treatment sections based on the cumulative gradient of the pollution diffusion co-existence tensor on the time axis, and independently configuring an initial purification scheme for each treatment section; tracking in real time the changes in sediment oxygen consumption rate and microbial population activity in each treatment section after the initial purification scheme is implemented; inputting the changes in sediment oxygen consumption rate and microbial population activity in each treatment section into a pre-constructed purification efficiency response surface, and outputting the purification efficiency correction coefficients for each treatment section; and using the purification efficiency correction coefficients for each treatment section to adjust the aeration intensity and microbial agent dosage in the initial purification scheme for the corresponding treatment section.
[0030] Example 1:
[0031] In practice, the method for obtaining dynamic water quality image sequences and static water quality parameter matrices at the inlet of the scenic area's water channel is as follows: An underwater high-definition camera is deployed at the inlet, with its lens plane perpendicular to the water flow direction. Image frames containing the trajectories of suspended particles are continuously acquired at a fixed sampling frequency. These frames are then stacked in chronological order to form a dynamic water quality image sequence. The fixed sampling frequency is set based on the average drift velocity of suspended particles in the water channel, ensuring that the displacement of the same suspended particle in two adjacent frames does not exceed eight pixels. Simultaneously, a multi-parameter water quality sensor array is installed at the inlet of the water channel, 0.5 meters downstream of the normal direction of the underwater high-definition camera's lens plane. This array includes electrodes for chemical oxygen demand (COD), ammonia nitrogen, total phosphorus, dissolved oxygen, and pH. A multi-parameter water quality sensor array periodically detects chemical oxygen demand (COD), ammonia nitrogen (ANO), total phosphorus (TP), dissolved oxygen (DO), and pH values. All water quality index values are arranged into a row vector according to the preset index order of COD, ANO, TP, DDO, and pH. The row vectors obtained from multiple sampling times are stacked vertically in chronological order to form a static water quality parameter matrix. The number of rows in the static water quality parameter matrix is equal to the total number of sampling times, and the number of columns in the static water quality parameter matrix is five.
[0032] The method for extracting the diffusion velocity field of pollutant blobs through optical flow field decomposition of dynamic water quality image sequences is as follows: Two temporally consecutive frames are selected from the dynamic water quality image sequence, with the earlier frame designated as the first frame and the later frame as the second frame. For each pixel in both frames, the Lucas-Kanade pyramid iterative algorithm is used to calculate the optical flow displacement vector from the first frame to the second frame. The Lucas-Kanade pyramid iterative algorithm has three pyramid layers, and the iteration terminates when the change in optical flow displacement vector is less than one percent of the pixel width or the number of iterations reaches twenty. During the calculation process of the Lucas-Kanade pyramid iterative algorithm, the gradient magnitude of each pixel in the first frame is calculated within its neighborhood. When the gradient magnitude of a pixel is lower than a preset gradient magnitude threshold, the pixel is marked as a background stationary pixel and discarded, not participating in the subsequent step of constructing a two-dimensional optical flow field using optical flow displacement vectors. The preset gradient magnitude threshold is set to 0.1 times the median gradient magnitude of all pixels in the first frame. Arrange the optical flow displacement vectors of all unremoved pixels according to their original pixel positions in the first frame to form a two-dimensional optical flow field. Arrange the horizontal components of the two-dimensional optical flow field into a horizontal component vector in order from left to right and from top to bottom, and arrange the vertical components of the two-dimensional optical flow field into a vertical component vector in order from left to right and from top to bottom. Concatenate the horizontal component vector and the vertical component vector end to end to obtain the diffusion velocity field of the contaminant plume.
[0033] The method for extracting the feature vectors of major pollutants from a static water quality parameter matrix using singular value decomposition (SVD) is as follows: Singular value decomposition is performed on the static water quality parameter matrix, decomposing it into a product of a left singular matrix, a singular value diagonal matrix, and a right singular matrix. The diagonal elements of the singular value diagonal matrix are singular values arranged in descending order of value. The first column vector corresponding to the largest singular value in the left singular matrix is extracted and used as the feature vector of the major pollutant. The dimension of the feature vector of the major pollutant is the same as the number of rows in the static water quality parameter matrix.
[0034] The method for generating a pollution diffusion co-current tensor by convolving the pollution plume diffusion velocity field with the feature vectors of the main pollutants is as follows: The pollution plume diffusion velocity field is used as the kernel of a one-dimensional depthwise convolution operation, with the kernel length equal to the total number of elements in the velocity field. A one-dimensional depthwise convolution operation is performed on the feature vectors of the main pollutants, with the stride set to the actual distance traveled by the water flow in the canal between the sampling times of two adjacent elements in the feature vectors. The actual distance is calculated by multiplying the average flow velocity by the time interval between two adjacent sampling times. During the one-dimensional depthwise convolution operation, zero-value elements equal to the kernel length minus one are added to both ends of the feature vectors of the main pollutants, ensuring that the length of the convolution response sequence matches the length of the feature vectors of the main pollutants, thus obtaining the convolution response sequence. Each velocity component in the pollution plume diffusion velocity field is externally productd with the eigenvectors of the main pollutants. The total number of velocity components is the same as the total number of elements in the pollution plume diffusion velocity field. Each velocity component's external product with the eigenvectors of the main pollutants yields an external product matrix. The external product matrices corresponding to all velocity components are then summed element-wise with the corresponding element values in the convolutional response sequence. The weighting coefficients for the element-wise weighted summation are determined based on the position index of the velocity component in the pollution plume diffusion velocity field, and are calculated using the following formula:
[0035]
[0036] in, Indicates the diffusion speed of the pollution plume in the field. The weighting coefficients corresponding to each velocity component This is the position index of the velocity component in the velocity field of the pollution plume diffusion. The value range is all integers from 1 to the total number of velocity components in the pollution plume diffusion velocity field. The total number of velocity components in the velocity field of the pollution plume diffusion. Indicates to The result of dividing by 2 is rounded down. The base of the natural logarithm is used. The weighted summation is reshaped into a three-dimensional array. The three dimensions of the three-dimensional array are the total number of velocity components in the pollution plume diffusion velocity field, the length of the eigenvectors of the main pollution components, and the length of the convolution response sequence, respectively. The reshaped three-dimensional array is the pollution diffusion co-tensor.
[0037] See Figure 6In the figure, the horizontal axis represents the sampling time index, and the vertical axis represents the vector element values. The black solid line represents the feature vector of the main pollutants, which is obtained by performing singular value decomposition on the static water quality parameter matrix and reflects the changing trend of the main characteristics of pollutants at the canal inlet over time. The gray dashed line represents the convolution response sequence, which is the convolution response obtained by applying the pollution cloud diffusion velocity field as the convolution kernel to the feature vector of the main pollutants, reflecting the spatiotemporal interaction between the pollution diffusion velocity and the characteristics of the main pollutants.
[0038] The two curves in the figure show a high degree of consistency in their overall trends, indicating that the convolutional response sequence can accurately reflect the dynamic changes of the feature vectors of the main pollutants. The vector element values exhibit periodic fluctuations at different sampling time indices, with a maximum value of approximately 1.3 and a minimum value of approximately -1.3, showing that the pollution characteristics have a clear temporal variation pattern. This periodic variation feature provides an effective temporal basis for subsequent dynamic division of canal treatment sections using the pollution diffusion co-tensor.
[0039] The overall curve exhibits rich detail and fluctuations. The specific peaks and troughs correspond to changes in pollution levels during the sampling time of the water quality parameter matrix, demonstrating the real-time effectiveness of the extracted main pollution features after fusing the dynamic water quality image sequence with the static water quality parameter matrix. This data conforms to the technical solution described in Example 1, which involves extracting feature vectors of main pollution components through singular value decomposition and calculating the diffusion velocity field of pollution plumes based on dynamic water quality image sequences, further generating a convolutional response sequence. The data showcases the calculation results of key steps and their interrelationships.
[0040] Example 2:
[0041] In specific implementation, please refer to Figure 2 The method for dynamically dividing a canal into multiple treatment sections based on the cumulative gradient of the pollution diffusion co-current tensor along the time axis, and independently configuring an initial purification scheme for each treatment section, is as follows: Along the time axis of the pollution diffusion co-current tensor, extract each time slice from the tensor. The total number of time slices is equal to the length of the time axis dimension of the tensor. For each time slice, calculate the sum of all elements of the pollution diffusion co-current tensor on that time slice. Arrange the sums of elements corresponding to all time slices in time axis order to form a one-dimensional cumulative sequence. For each position in the one-dimensional cumulative sequence, calculate the difference between the current position's element value and the previous position's element value, and use this difference as the gradient value for the current position. The gradient value of the first position in the one-dimensional cumulative sequence is defined as zero. Mark the moment when the absolute value of the gradient value exceeds a preset fluctuation threshold as a segmentation point. The preset fluctuation threshold is set by calculating the standard deviation of the gradient values corresponding to all time slices, multiplying the standard deviation by 0.5, and using this standard deviation as the preset fluctuation threshold.
[0042] Using all segmentation points as boundaries, the canal is dynamically divided into multiple treatment river segments along the water flow direction. The canal interval between two adjacent segmentation points, as well as the canal interval upstream of the first segmentation point and the canal interval downstream of the last segmentation point, each constitute a treatment river segment. The total number of treatment river segments is the total number of segmentation points plus one.
[0043] For each river segment undergoing treatment, pollution diffusion co-occurrence tensors are extracted from all time slices between the starting and ending points of the treatment segment. These tensors are averaged along the time axis to obtain a three-dimensional core tensor. This core tensor is then expanded into one-dimensional feature vectors, the length of which is equal to the product of the three dimensions of the core tensor. K-means clustering analysis is performed on these feature vectors. The core architecture of K-means clustering consists of a distance calculation module, a cluster center update module, and a silhouette coefficient evaluation module. The distance calculation module receives the one-dimensional feature vectors and the current cluster center vectors, calculates the Euclidean distance between the feature vectors and each cluster center vector, and assigns the feature vectors to the cluster with the smallest Euclidean distance. The cluster center update module receives all the assigned one-dimensional feature vectors within each cluster, calculates the arithmetic mean of these vectors, and uses this arithmetic mean as the updated cluster center vector. The silhouette coefficient evaluation module calculates the silhouette coefficient after clustering is completed. The silhouette coefficient is calculated as follows: for each one-dimensional feature vector, the average Euclidean distance between the one-dimensional feature vector and other one-dimensional feature vectors in the same cluster is calculated as the intra-cluster dissimilarity. The average Euclidean distance between the one-dimensional feature vector and all one-dimensional feature vectors in the nearest neighbor cluster is calculated as the inter-cluster dissimilarity. The difference between the inter-cluster dissimilarity and the intra-cluster dissimilarity is divided by the larger of the inter-cluster dissimilarity and the intra-cluster dissimilarity to obtain the silhouette coefficient of a single one-dimensional feature vector. The arithmetic mean of the silhouette coefficients of all one-dimensional feature vectors is taken as the silhouette coefficient of the cluster under the current number of clusters.
[0044] The number of clusters K in K-means clustering analysis is automatically determined based on the principle of maximizing the silhouette coefficient. The specific steps for automatically determining the number of clusters K are as follows: First, set the search range for the number of clusters K to an integer from two to ten. For each value of the number of clusters K within the search range, perform K-means clustering analysis. The initialization method for K-means clustering analysis is to randomly select K different one-dimensional feature vectors from the set of one-dimensional feature vectors as initial cluster center vectors. The iteration termination condition is that the change in the cluster center vectors is less than one-thousandth of the standard deviation of each dimension of the one-dimensional feature vectors, or the number of iterations reaches one hundred. Record the silhouette coefficient corresponding to each value of the number of clusters K. The cluster number K with the largest silhouette coefficient among all values of the number of clusters K is taken as the final number of clusters, and the clustering result under the final number of clusters is used as the final cluster partition.
[0045] Each treated river section's one-dimensional feature vector is assigned to the cluster corresponding to the cluster center vector with the closest Euclidean distance in the final clustering count. The cluster label of this cluster is the pollution feature pattern label of the treated river section. A preset scheme library, indexed by the pollution feature pattern label, stores the correspondence between aerator rated power values, microbial agent type numbers, and initial dosage concentration values. Matching aerator rated power values, microbial agent type numbers, and initial dosage concentration values are retrieved from the preset scheme library based on the pollution feature pattern label. The preset scheme library is constructed as follows: During historical treatment cycles, purification record data of different treated river sections under various pollution diffusion synergistic tensor characteristics are collected. The historical pollution diffusion synergistic tensor feature vectors undergo the same unfolding and clustering operations as the aforementioned K-means clustering analysis. For each cluster, the optimal operating power of the aerator, the optimal type of microbial agent, and the optimal initial dosage concentration, verified on-site, are manually set, and these data are bound and stored with the cluster label.
[0046] The retrieved rated power value of the aerator is set as the baseline operating frequency value of the aerator in the corresponding river section to be treated. The specific microbial agent type corresponding to the retrieved microbial agent type number is determined as the added inoculum. The retrieved initial addition concentration value is used as the baseline dosage value of the microbial agent in the corresponding river section to be treated. The initial purification scheme for the river section to be treated is formed by combining the baseline operating frequency value of the aerator, the added inoculum, and the dosage baseline values. The correspondence between the rated power value of the aerator and the baseline operating frequency value of the aerator is calculated using the working curve of the variable frequency drive. The conversion formula is as follows:
[0047]
[0048] in, This represents the basic operating frequency of the aerator, in Hertz (Hz). This represents the rated power value of the aerator retrieved from the preset scheme library, in watts. This indicates the energy conversion efficiency of the variable frequency drive, with a value ranging from 0.85 to 0.95, determined based on the parameters on the variable frequency drive's nameplate. This indicates the rated torque of the aerator motor, expressed in Newton-meters, and can be obtained from the aerator's specification sheet. Pi is a constant. This indicates the nominal diameter of the aerator impeller, in meters, and can be obtained from the aerator's specification sheet.
[0049] See Figure 7The figure shows the distribution of pollution feature pattern clusters obtained by K-means clustering analysis after expanding the three-dimensional core tensor of multiple treated river sections into one-dimensional feature vectors. The horizontal axis is principal component 1, and the vertical axis is principal component 2. The legend identifies the three types of pollution feature pattern clusters, represented by solid circles, squares, and triangles, respectively, with the cluster center marked by a large "×" symbol.
[0050] As can be seen from the figure, the three pollution feature pattern clusters show obvious separation on the principal component 1 and principal component 2 axes. The numerical ranges of principal component 1 are concentrated in approximately [-13, -7], [-1, 4] and [13, 17], respectively, while the numerical ranges of principal component 2 are concentrated in approximately [-2.5, -0.5], [1.5, 4] and [-2.5, -0.5], respectively. This reflects that there are obvious differences in the pollution characteristics of the treated river sections based on the pollution diffusion co-tensor characteristics.
[0051] The clustered distribution of sample points in the figure indicates that K-means clustering analysis has a good aggregation effect on the classification of pollution characteristics in the treated river sections. Based on the clustering results, the pollution characteristic pattern label for each treated river section can be accurately matched with the corresponding aerator rated power, microbial agent type, and initial dosage concentration from the preset scheme library, realizing a technical solution for dynamically dividing the canal into multiple treated river sections and configuring an initial purification scheme for each river section independently.
[0052] This figure verifies the key steps in Example 2, which involve averaging the three-dimensional core tensor expansion feature vector obtained by the pollution diffusion synergy tensor along the time axis, automatically determining the number of clusters using the principle of maximizing the silhouette coefficient, thereby achieving automatic identification of pollution feature patterns and division of river sections for treatment. This supports the technical effect of dynamically and accurately configuring purification schemes.
[0053] Example 3:
[0054] In specific implementation, please refer to Figure 3 The method for real-time tracking of changes in sediment oxygen consumption rate and microbial population activity in each treated river section after the implementation of the initial purification plan is as follows: Dissolved oxygen microelectrodes are deployed at the bottom sediment interface of each treated river section. The tip of the dissolved oxygen microelectrode is inserted three millimeters below the sediment surface, and the reference electrode of the dissolved oxygen microelectrode is placed in the overlying water five centimeters above the sediment surface. The dissolved oxygen microelectrode continuously collects dissolved oxygen concentration values at 0.1-second intervals, with each collection lasting thirty seconds, forming a profile sequence of dissolved oxygen concentration changes over time.
[0055] Before the initial purification plan was implemented, a dissolved oxygen concentration profile sequence for a complete time period was collected using a dissolved oxygen microelectrode. Linear regression was performed on the dissolved oxygen concentration values in this profile sequence, and the absolute value of the slope obtained from the linear regression was taken as the first sediment oxygen consumption rate, measured in milligrams per liter per square centimeter per second. During the initial purification plan, a dissolved oxygen concentration profile sequence for a complete time period was collected every fifteen minutes using the dissolved oxygen microelectrode, and the second sediment oxygen consumption rate corresponding to each collection was calculated using the same linear regression method. The difference between the second sediment oxygen consumption rate calculated from each collection and the first sediment oxygen consumption rate was calculated to obtain the change in sediment oxygen consumption rate. The difference calculation is shown in the following formula:
[0056]
[0057] in, This indicates the change in the rate of oxygen consumption in the sediment, expressed in milligrams per liter per square centimeter per second. This represents the second sediment oxygen consumption rate measured at a certain time during the execution of the initial purification plan, and the unit is milligrams per liter per square centimeter per second. This indicates the first sediment oxygen consumption rate measured before the initial purification program begins, expressed in milligrams per liter per square centimeter per second.
[0058] Flow cytometer sampling ports are deployed in the water bodies of each treated river section. These ports use peristaltic pumps to extract water samples at a constant flow rate of 2 ml per minute. The samples are pre-filtered through a 50-micron pore size filter before entering the flow cell of the flow cytometer. The flow cytometer is equipped with a 488 nm wavelength excitation source and collects fluorescence signals in the 530 nm and 610 nm bands, recording fluorescence pulses of individual microbial cells at a rate of 10,000 events per minute.
[0059] Before the initial purification protocol was implemented, flow cytometry continuously collected fluorescence events of all microbial cells over a five-minute period. The sum of the fluorescence intensities of each microbial cell in the 530 nm and 610 nm wavelength bands was calculated as the fluorescence intensity of a single cell. The arithmetic mean of all single-cell fluorescence intensities was taken as the average fluorescence intensity of the first microbial population, expressed in relative fluorescence units (RFUs). During the initial purification protocol, flow cytometry was activated every 30 minutes for a five-minute continuous collection. The average fluorescence intensity of the second microbial population was calculated for each collection, using the same method as for the first microbial population. The difference between the average fluorescence intensity of the second and first microbial populations was calculated to obtain the change in microbial population activity, expressed in RFUs.
[0060] Example 4:
[0061] In specific implementation, please refer to Figure 4 The method for outputting the purification efficiency correction coefficients for each treated river section by inputting the changes in sediment oxygen consumption rate and microbial population activity into a pre-constructed purification efficiency response surface is as follows: The sediment oxygen consumption rate change is normalized using the 5th and 95th percentiles of all recorded sediment oxygen consumption rate changes in the historical purification experiment database. The normalization formula is the sediment oxygen consumption rate change minus the minimum value, divided by the difference between the maximum and minimum values. Similarly, the microbial population activity change is normalized using the 5th and 95th percentiles of all recorded microbial population activity changes in the historical purification experiment database. The normalization formula is the microbial population activity change minus the minimum value, divided by the difference between the maximum and minimum values. The normalized value of the change in sediment oxygen consumption rate is used as the first axis coordinate of the two-dimensional input coordinate point, and the normalized value of the change in microbial population activity is used as the second axis coordinate of the two-dimensional input coordinate point, thus forming the two-dimensional input coordinate point.
[0062] The pre-constructed purification efficiency response surface is a three-dimensional surface fitted using historical purification experimental data. The construction process of the purification efficiency response surface is as follows: Changes in sediment oxygen consumption rate, microbial population activity, and corresponding purification efficiency correction coefficients are collected from different treated river sections under different operating conditions during historical purification experiments. The historical changes in sediment oxygen consumption rate and historical changes in microbial population activity are normalized to the interval between zero and one using the aforementioned normalization method, and used as the x-axis and y-axis of the sample points. The historical purification efficiency correction coefficient is used as the y-axis of the sample points. The purification efficiency correction coefficient is defined as the deviation between the ratio of the chemical oxygen demand (COD) concentration at the end of the treated river section to the COD concentration at the inlet and the preset target ratio. Its value ranges from zero to two. A purification efficiency correction coefficient equal to one indicates that the purification effect meets expectations; less than one indicates insufficient purification effect; and greater than one indicates that the purification effect exceeds expectations.
[0063] Using the three-dimensional coordinates of all sample points, a purification efficiency response surface was constructed using the thin-plate spline interpolation method. The smoothing parameter for the thin-plate spline interpolation was set to zero and 0.1. The purification efficiency response surface uses the change in sediment oxygen consumption rate as the first axis, the change in microbial population activity as the second axis, and the purification efficiency correction coefficient as the third axis. The coordinate range of the first and second axes is from zero to one, and the coordinate range of the third axis is from zero to two.
[0064] The two-dimensional input coordinate points are projected onto the purification efficiency response surface. Surface position points with the same first and second axis coordinates are retrieved from the surface. The third axis coordinate value of these surface position points is extracted, which is the purification efficiency correction coefficient corresponding to the treated river section. When the first or second axis coordinate of the two-dimensional input coordinate point exceeds the range of zero to one, the coordinate values exceeding the range are truncated to zero or one before projection retrieval.
[0065] The method for adjusting the aeration intensity and microbial agent dosage in the initial purification plan for each treated river section using the purification efficiency correction coefficient is as follows: The purification efficiency correction coefficient is compared with a preset correction coefficient threshold, which is set to 0.85. When the purification efficiency correction coefficient is lower than 0.85, the quotient of 0.85 divided by the purification efficiency correction coefficient is used as the aeration intensity increase ratio. The operating frequency of the aerators in the initial purification plan is increased according to this increase ratio. The updated aerator operating frequency is equal to the aerator operating frequency in the initial purification plan multiplied by the aeration intensity increase ratio. Simultaneously, the difference between 0.85 and the purification efficiency correction coefficient is multiplied by the initial microbial agent dosage concentration in the initial purification plan to obtain the additional agent dosage. This additional agent dosage is then added to the initial microbial agent dosage concentration in the initial purification plan to obtain the updated microbial agent dosage concentration. When the purification efficiency correction coefficient is greater than or equal to 0.85, the aerator operating frequency and microbial agent concentration in the initial purification scheme remain unchanged.
[0066] After adjusting the initial purification scheme for the corresponding river section using the purification efficiency correction coefficient, the changes in sediment oxygen consumption rate and microbial population activity for each treated river section are re-acquired. The re-acquisition method is the same as the tracking method used during the initial purification scheme execution: the adjusted second sediment oxygen consumption rate is measured using a dissolved oxygen microelectrode, and the difference between this and the first sediment oxygen consumption rate is used to obtain the new sediment oxygen consumption rate change; the average fluorescence intensity of the adjusted second microbial population is measured using flow cytometry, and the difference between this and the average fluorescence intensity of the first microbial population is used to obtain the new microbial population activity change. The new sediment oxygen consumption rate change and the new microbial population activity change are normalized according to the aforementioned method to form new two-dimensional input coordinate points, which are then input into the pre-constructed purification efficiency response surface to generate the updated purification efficiency correction coefficient.
[0067] Determine whether the updated purification efficiency correction coefficient reaches the preset qualified threshold, which is set to 0.9. If the updated purification efficiency correction coefficient is less than 0.9, repeat the steps of adjusting the aerator operating frequency and microbial agent dosage. The calculation method is to replace 0.85 with 0.9, divide 0.9 by the updated purification efficiency correction coefficient as the new round of aeration intensity increase ratio, and multiply the difference between 0.9 and the updated purification efficiency correction coefficient by the current microbial agent dosage to obtain the new round of agent addition amount. Continue adjusting until the newly generated purification efficiency correction coefficient is greater than or equal to 0.9. When the purification efficiency correction coefficient of all treated river sections reaches 0.9 or above, record the aerator operating frequency and microbial agent dosage used in each treated river section at this time as the solidified purification parameters of the treated river section. The solidified purification parameters are stored in the controller of the treated river section for constant parameter control in the subsequent continuous operation phase.
[0068] Example 5:
[0069] In specific implementation, please refer to Figure 5 After configuring an initial purification plan independently for each treated river section, and before tracking in real time the changes in sediment oxygen consumption rate and microbial population activity resulting from the implementation of the initial purification plan within each treated river section, an ultraviolet-visible light absorption spectrometer (UV-Vis spectrometer) was deployed at the end of each treated river section. The UV-Vis spectrometer has an optical path length of 10 mm, a wavelength scanning range of 200 nm to 800 nm, and a wavelength sampling interval of 1 nm. The UV-Vis spectrometer is connected to the outlet channel at the end of the treated river section via an inlet. A 50-micron pore size filter is installed at the inlet to remove large suspended particles. Water flows at a constant velocity through the quartz flow cuvette of the UV-Vis spectrometer, with the flow rate controlled at 5 ml per minute by a peristaltic pump. The ultraviolet-visible absorption spectrometer continuously collects the full-band absorption spectrum of the water body after it flows through the treated river section. The full-band absorption spectrum consists of absorbance values corresponding to 601 wavelength points. The acquisition frequency is once per minute, and each acquisition yields a full-band absorption spectrum data vector containing 601 absorbance values.
[0070] The target effluent spectra for each treated river section are pre-stored. The target effluent spectra are obtained as follows: under ideal conditions where the treated river section is unaffected by pollution, or according to the typical spectra corresponding to the effluent water quality standards stipulated in the local water environment functional zoning, water samples are collected using an ultraviolet-visible absorption spectrometer under the same conditions as described above, and the absorbance values corresponding to 601 wavelength points are recorded. These absorbance values are used as the target effluent spectral data vector for that treated river section. The length of the target effluent spectral data vector is the same as that of the full-band absorption spectral data vector, both being 601.
[0071] Waveform matching is performed between the full-band absorption spectrum data vector and the effluent target spectrum data vector. The waveform matching uses a cosine similarity algorithm, calculating the cosine of the angle between the two vectors, and using this cosine value as the waveform matching degree. The formula for calculating the cosine similarity is:
[0072]
[0073] in, This indicates the waveform matching degree, with a value between zero and one. Represents the first element in the full-band absorption spectrum data vector. The absorbance values corresponding to each wavelength point. The value of is an integer from 1 to 601, corresponding to each sampling point in the wavelength range of 200 nanometers to 800 nanometers; The first element in the target spectral data vector of the water is represented by the first element. The absorbance values corresponding to each wavelength point; the numerator represents the dot product of two data vectors, and the denominator represents the product of the magnitudes of the two data vectors.
[0074] The waveform matching degree is compared with a preset trigger threshold, which is set to 0.8. When the waveform matching degree is below 0.8, it indicates a significant deviation between the effluent quality of the treated river section and the target spectrum, triggering the step of real-time tracking of changes in sediment oxygen consumption rate and microbial population activity. This involves deploying dissolved oxygen microelectrodes at the sediment interface at the bottom of the treated river section and deploying flow cytometer sampling ports in the water body of the treated river section to track changes in sediment oxygen consumption rate and microbial population activity in real time. When the waveform matching degree reaches or exceeds 0.8, it indicates that the effluent quality of the treated river section is close to the target spectrum. The aerator operating frequency and microbial agent dosage in the current initial purification scheme are maintained unchanged, and the full-band absorption spectrum is monitored at a frequency of once per minute. The waveform matching degree is continuously calculated until it drops below 0.8, at which point the step of real-time tracking of changes in sediment oxygen consumption rate and microbial population activity is triggered again.
[0075] See Figure 8In the figure, the horizontal axis represents wavelength, ranging from 200 nm to 800 nm, and the vertical axis represents absorbance at the corresponding wavelength, in dimensionless absorbance values. The solid black line in the figure is the real-time full-band absorption spectrum curve of the water body at the end of the treated river section, composed of 601 sampling points. The dashed gray line is the pre-stored target effluent spectrum curve of the treated river section, also with 601 sampling points. The two spectral curves show similar overall waveform trends in the wavelength range of 200 nm to 800 nm, both exhibiting absorbance peaks at approximately 250 nm and 450 nm, with the relative height and width of the peak bands being basically consistent. However, the absorbance value of the real-time full-band absorption spectrum is generally higher than that of the target spectrum, showing a certain degree of fluctuation, reflecting the enhanced absorbance caused by pollutants present in the water body.
[0076] The waveform matching degree (cosine similarity) marked in the figure is 0.943, which is close to 1. This indicates that there is a high degree of similarity between the real-time acquired full-band absorption spectrum and the preset target effluent spectrum, reflecting that the effluent quality at the end of the currently treated river section is close to the target water quality standard. According to the technical solution in Example 5, when the waveform matching degree is higher than the preset start-up threshold of 0.8, the existing aerator operating frequency and microbial agent dosage remain unchanged, and full-band spectrum acquisition and waveform matching calculation are continuously performed once per minute to achieve dynamic monitoring of water quality.
[0077] In summary, the waveform matching degree between the full-band absorption spectrum shown in this figure and the target spectrum of the effluent reaches 0.943, indicating that the water quality of this treated river section is in an ideal or near-ideal state. There is no need to initiate real-time tracking steps for changes in sediment oxygen consumption rate and microbial population activity. The aeration intensity and bacterial agent dosage of the current initial purification scheme can be maintained, achieving energy-saving and efficient canal sewage treatment control.
[0078] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for treating sewage in scenic area canals, characterized in that, Includes the following steps: Obtain dynamic water quality image sequences and static water quality parameter matrices at the inlet of the scenic area's water channel; Optical flow field decomposition was performed on dynamic water quality image sequences to extract the diffusion velocity field of pollutant clusters, while singular value decomposition was performed on static water quality parameter matrices to extract feature vectors of major pollutant components. The pollution plume diffusion velocity field is convolved with the feature vectors of the main pollution components to generate a pollution diffusion co-current tensor. Based on the cumulative gradient of the pollution diffusion synergy tensor on the time axis, the canal is dynamically divided into multiple treatment sections, and an initial purification scheme is independently configured for each treatment section. Real-time tracking of changes in sediment oxygen consumption rate and microbial population activity in each treated river section after the implementation of the initial purification plan; The changes in sediment oxygen consumption rate and microbial population activity in each treated river section are input into the pre-constructed purification efficiency response surface, and the purification efficiency correction coefficients for each treated river section are output. The aeration intensity and microbial agent dosage in the initial purification scheme of each treated river section are adjusted in reverse using the purification efficiency correction coefficient of each treated river section.
2. The method for treating sewage in scenic area canals according to claim 1, characterized in that, The specific method for obtaining the dynamic water quality image sequence and static water quality parameter matrix of the scenic area's water inlet is as follows: An underwater high-definition camera is deployed at the water inlet of the canal to continuously collect image frames containing the movement trajectory of suspended particulate matter at a fixed sampling frequency. The image frames are stacked in the order of collection time to form a dynamic water quality image sequence. Simultaneously, a multi-parameter water quality sensor array is set at the water inlet of the canal to periodically detect water quality indicators including chemical oxygen demand, ammonia nitrogen, total phosphorus, dissolved oxygen and pH. All water quality indicator values are arranged into a row vector according to a preset index order. The row vectors obtained from multiple sampling times are stacked vertically in chronological order to form a static water quality parameter matrix.
3. The method for treating sewage in scenic area canals according to claim 1, characterized in that, The specific method for extracting the diffusion velocity field of pollutants by optical flow field decomposition of dynamic water quality image sequences, and simultaneously extracting the feature vectors of main pollutants by singular value decomposition of static water quality parameter matrices, is as follows: Two consecutive frames of images are selected from the dynamic water quality image sequence. The optical flow displacement vector of each pixel in the two consecutive frames is calculated from the first frame to the second frame. The optical flow displacement vectors of all pixels are arranged according to their original pixel positions to form a two-dimensional optical flow field. The components of the two-dimensional optical flow field in the horizontal and vertical directions are vectorized and then stitched together to obtain the diffusion velocity field of the pollutant plume. Singular value decomposition is performed on the static water quality parameter matrix to obtain the left singular matrix, the singular value diagonal matrix, and the right singular matrix. The first column vector corresponding to the largest singular value in the left singular matrix is extracted and used as the feature vector of the main pollutant component.
4. A method for treating sewage in scenic area canals according to claim 3, characterized in that, The optical flow displacement vector is calculated using the Lucas-Kanade pyramid iterative algorithm, and a gradient magnitude threshold is set during the calculation process to remove static background pixels.
5. A method for treating sewage in scenic area canals according to claim 1, characterized in that, The specific method for generating a pollution diffusion co-current tensor by convolving the pollution plume diffusion velocity field with the feature vectors of the main pollution components is as follows: Using the diffusion velocity field of the pollution plume as the convolution kernel, a one-dimensional deep convolution operation is performed on the feature vector of the main pollution component. The stride of the one-dimensional deep convolution operation is set to the actual distance between adjacent elements in the feature vector of the main pollution component, and a convolution response sequence is obtained. Each velocity component in the pollution plume diffusion velocity field is externally productted with the feature vector of the main pollution component to obtain multiple external product matrices. All external product matrices are then element-wise weighted and summed with the convolution response sequence to reshape them into a three-dimensional array, which is the pollution diffusion co-tensor.
6. A method for treating sewage in scenic area canals according to claim 5, characterized in that, The one-dimensional depthwise convolution operation employs a zero-padding strategy to maintain the convolution response sequence with the feature vector length of the main contaminant components.
7. A method for treating sewage in scenic area canals according to claim 1, characterized in that, The specific method for dynamically dividing the canal into multiple treatment sections based on the cumulative gradient of the pollution diffusion co-current tensor on the time axis, and independently configuring an initial purification scheme for each treatment section, is as follows: Along the time axis of the pollution diffusion co-tensor, the gradient value of the sum of all elements of the pollution diffusion co-tensor on each time slice is calculated. The moment when the gradient value exceeds the preset fluctuation threshold is marked as a segment point. The canal is dynamically divided into multiple treatment sections along the water flow direction using the segment point as the boundary. For each river section to be treated, the core tensor of the pollution diffusion co-current tensor for the corresponding time period of the river section is extracted. Cluster analysis is performed on the core tensor to obtain the pollution characteristic pattern label of the river section to be treated. Based on the pollution characteristic pattern label, the rated power of the aerator, the type of microbial agent and its initial addition concentration are matched from the preset scheme library to form an initial purification scheme.
8. A method for treating sewage in scenic area canals according to claim 7, characterized in that, The clustering analysis uses the K-means algorithm, and the number of clusters K is automatically determined by maximizing the silhouette coefficient.
9. A method for treating sewage in scenic area canals according to claim 1, characterized in that, The specific method for real-time tracking of changes in sediment oxygen consumption rate and microbial population activity in each treated river section after the initial purification plan is implemented is as follows: Dissolved oxygen microelectrodes were deployed at the bottom sediment interface of each treated river section. The oxygen consumption rate of the first sediment was measured before the initial purification plan was implemented, and the oxygen consumption rate of the second sediment was continuously measured during the implementation of the initial purification plan. The difference between the oxygen consumption rate of the second sediment and the oxygen consumption rate of the first sediment was calculated as the change in the oxygen consumption rate of the sediment. Flow cytometer sampling ports were deployed in the water of each treated river section. The average fluorescence intensity of the first microbial population was measured before the initial purification plan was implemented. During the implementation of the initial purification plan, the average fluorescence intensity of the second microbial population was measured at regular intervals. The difference between the average fluorescence intensity of the second microbial population and the average fluorescence intensity of the first microbial population was calculated as the change in microbial population activity.
10. A sewage treatment system for scenic area canals, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for treating sewage in scenic water channels as described in any one of claims 1 to 9.