Pollution source tracing method and system based on flow field dynamics and adjoint matrix
By using flow field dynamics and adjoint matrix-based pollution source tracing methods, the problem of source tracing deviation caused by changes in the direction of pollutant propagation in urban tidal river networks has been solved, achieving more accurate identification of pollution source locations and emission periods.
Patent Information
- Application Number
- CN202611383474.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-11-17
AI Technical Summary
In urban tidal river networks, the direction of pollutant propagation changes with hydrodynamic conditions, leading to temporal or spatial deviations in the process of tracing pollution sources, which affects the inaccurate identification of pollution discharge location, discharge time, and discharge scale.
A pollution source tracing method based on flow field dynamics and adjoint matrix is adopted. By acquiring water level data, cross-sectional flow data and water quality monitoring values, an adjoint matrix is constructed to invert the discharge quality of candidate discharge outlets and determine the location of pollution sources and discharge periods.
It improves the identifiability of pollution source location and emission time period, enhances the certainty of pollution source tracing results, and reduces the impact of delayed response of monitoring equipment on the results.
Smart Images

Figure CN123115685A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of environmental monitoring and pollution source tracing technology, and in particular to a pollution source tracing method and system based on flow field dynamics and adjoint matrix. Background Technology
[0002] With the development of urban river network water quality monitoring systems, continuous monitoring of river water quality is typically achieved by deploying online water quality monitoring equipment. Upon detecting water quality anomalies, the location, timing, and scale of pollutant discharge are inferred by combining river hydrodynamic data, pollutant transport processes, and reverse analysis results. In river environments with relatively stable flow directions and relatively simple pollutant transport processes, there is usually a clear correlation between the direction of pollutant propagation, arrival time, and spatial location. Therefore, pollution sources can be identified based on pollution responses at different monitoring locations.
[0003] Urban tidal river networks are affected by tidal changes, sluice gate regulation, and pumping station operation, causing river velocity and direction to change within short periods. As the direction of pollutant propagation in the river network changes with hydrodynamic conditions, pollutants may turn back and pass through the same monitoring section again, resulting in similar monitoring responses at different locations during certain time periods. Meanwhile, online water quality monitoring equipment typically has a certain response time during sampling, transmission, and detection, and pollutant residues inside the equipment may cause monitored values to continue to change slowly even after the actual pollutant concentration has decreased.
[0004] In the aforementioned pollution source tracing process, hydrodynamic calculations are typically used as the basis for pollutant transport analysis, and the pollution response process is determined based on the time series output from online water quality monitoring equipment. However, when river hydrodynamic conditions change frequently, or when the monitoring equipment output cannot promptly reflect actual concentration changes in the river channel, temporal or spatial discrepancies can easily arise between the hydrodynamic calculation process, the actual pollutant transport process, and the monitoring response process. Such discrepancies may make it difficult to distinguish between different candidate emission locations, or may cause short-term pollution emissions to be confused with the delayed responses of monitoring equipment, thereby affecting the identification results of pollution emission location, emission time, and emission scale. Summary of the Invention
[0005] This application provides a pollution source tracing method, system, storage medium, computer program product, and electronic device based on flow field dynamics and adjoint matrix, which at least solves the problem of insufficient reliability of source tracing results caused by the inconsistency between the pollutant transport process and the monitoring response process in the prior art.
[0006] In a first aspect, embodiments of this application provide a pollution source tracing method based on flow field dynamics and adjoint matrix. The method includes: acquiring water level data, cross-sectional flow data, water quality monitoring values and their monitoring locations, and candidate discharge outlets and their locations for a target river segment during a pollution event; dividing the pollution event into multiple candidate discharge time slices, wherein the pollution event includes at least one flow direction reversal; acquiring a sensor memory kernel corresponding to the monitoring location, wherein the sensor memory kernel characterizes the time response relationship between pollutant concentration and the water quality monitoring value; correcting the cross-sectional flow data based on the water level data, constrained by the continuous relationship of water volume in the river segment, to obtain a corrected flow rate; determining the flow direction reversal time based on the corrected flow rate, and determining two paired times with equal cumulative water exchange before and after the flow direction reversal time as a benchmark; extracting water quality monitoring values at the same monitoring location at the two paired times to form a set of paired monitoring values; and using the time-reversed sensor memory kernel as the corresponding monitoring value. The accompanying observation source is used to perform accompanying calculations on the pollutant transport process based on the corrected flow rate and the accompanying observation source. Based on the location of each candidate discharge outlet, the response sensitivity of each candidate discharge outlet to the water quality monitoring value per unit discharge mass in each candidate discharge time slot is determined. An accompanying matrix is constructed based on the response sensitivity, with rows corresponding one-to-one to the water quality monitoring value and columns corresponding one-to-one to the combination of each candidate discharge outlet and each candidate discharge time slot. The rows of each pair of monitoring values and the corresponding two matrices in the accompanying matrix are simultaneously summed and subtracted to obtain a summed observation vector, a subtracted observation vector, a summed accompanying matrix, and a subtracted accompanying matrix. Based on the summed observation vector, the subtracted observation vector, the summed accompanying matrix, and the subtracted accompanying matrix, the discharge mass of each candidate discharge outlet in each candidate discharge time slot is inverted to obtain the discharge mass time series of each candidate discharge outlet. The location of the pollution source and the corresponding discharge period are determined based on the discharge mass time series.
[0007] Secondly, embodiments of this application provide a pollution source tracing system based on flow field dynamics and adjoint matrix. The system includes: a data preprocessing unit, used to acquire water level data, cross-sectional flow data, water quality monitoring values and their monitoring locations, and candidate discharge outlets and their locations for a target river segment during a pollution event, and to divide the pollution event into multiple candidate discharge time slices, wherein the pollution event includes at least one flow direction reversal; to acquire a sensor memory kernel corresponding to the monitoring location, wherein the sensor memory kernel characterizes the time response relationship between pollutant concentration and the water quality monitoring value; to correct the cross-sectional flow data based on the water level data, constrained by the continuous relationship of water volume in the river segment, to obtain a corrected flow rate; a flow direction reversal pairing unit, used to determine the flow direction reversal time based on the corrected flow rate, and to determine two pairing times with equal cumulative water exchange before and after the flow direction reversal time as a reference, and to extract the water quality monitoring values of the same monitoring location at the two pairing times to form a set of paired monitoring values; and an adjoint sensitivity unit, used to use the time-reversed sensor memory kernel as... For each monitoring location, an accompanying observation source is used to perform accompanying calculations on the pollutant transport process based on the corrected flow rate and the accompanying observation source. Based on the location of each candidate discharge outlet, the response sensitivity of each candidate discharge outlet to the water quality monitoring value per unit discharge mass in each candidate discharge time slot is determined. An accompanying matrix transformation unit is used to construct an accompanying matrix whose rows correspond one-to-one with the water quality monitoring value and whose columns correspond one-to-one with the combination of each candidate discharge outlet and each candidate discharge time slot. The unit simultaneously sums and subtracts the corresponding rows of the paired monitoring values and the two matrices in each accompanying matrix to obtain a summed observation vector, a subtracted observation vector, a summed accompanying matrix, and a subtracted accompanying matrix. A pollution source inversion unit is used to invert the discharge mass of each candidate discharge outlet in each candidate discharge time slot based on the summed observation vector, the subtracted observation vector, the summed accompanying matrix, and the subtracted accompanying matrix, obtaining a discharge mass time series for each candidate discharge outlet. Based on the discharge mass time series, the pollution source location and the corresponding discharge period are determined.
[0008] Thirdly, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of the pollution source tracing method based on flow field dynamics and adjoint matrix of any embodiment of the present application.
[0009] Fourthly, embodiments of this application provide a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the pollution source tracing method based on flow field dynamics and adjoint matrix of any embodiment of this application.
[0010] Fifthly, embodiments of this application provide a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the pollution source tracing method based on flow field dynamics and adjoint matrix of any embodiment of this application.
[0011] The pollution source tracing method and system based on flow field dynamics and adjoint matrix provided in this application can achieve at least the following technical effects: Using the reversal of flow direction as the physical boundary for changes in pollution transport status, and establishing a correspondence between monitoring responses based on the cumulative water exchange volume before and after the reversal, ensures that the two paired time points are not merely symmetrical in time, but correspond to matching water transport scales. Based on this, the paired monitoring values and their corresponding accompanying responses are simultaneously summed and subtracted, retaining the common pollution response components at both times while highlighting the differential response components arising from changes in flow direction. Thus, candidate emission responses that were initially similar in a single monitoring sequence can be transformed into joint constraints with different directional identification capabilities. This allows for a more comprehensive reflection of response differences between different candidate discharge outlets and different emission time slices during the inversion process, improving the identifiability of pollution source locations and emission periods in the reversing river section.
[0012] Furthermore, the temporal response characteristics of monitoring equipment are incorporated into the accompanying calculation process of pollutant transport. A sensitivity relationship between unit discharge mass and actual water quality monitoring output is established through a time-reversed sensor memory kernel. This ensures that the resulting adjoint matrix not only reflects the migration process of pollutants in the river channel but also includes the delayed and continuous response characteristics of the monitoring equipment to the pollution process. Therefore, the response relationship used in the inversion can be consistent with the actual obtained water quality monitoring values. This allows the pollution response formed by short-term discharge and the hysteretic response of the monitoring equipment itself to be expressed in a unified model, further improving the stability and temporal positioning capability of the discharge mass time series inversion.
[0013] This technical solution transforms the pollution response changes caused by flow reversal from an unfavorable time-varying factor into directional information that can be used for pollution source identification. This information is then extracted through pairing equal water exchange volumes and synchronous sum-difference transformation of observation and accompanying response. Therefore, in river sections where pollutants may undergo backflow propagation, even if different candidate sources produce similar local monitoring responses, they can be further distinguished based on their joint response characteristics before and after the reversal, thereby enhancing the certainty of the pollution source location, emission period, and emission quality inversion results. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 A flowchart illustrating an example of a pollution source tracing method based on flow field dynamics and adjoint matrix according to an embodiment of this application is shown; Figure 2 A flowchart illustrating an example of determining response sensitivity based on a sensor memory core in a method according to an embodiment of this application is shown. Figure 3 A flowchart illustrating an example of how emission quality is retrieved based on outlet operating conditions in a method according to an embodiment of this application is shown. Figure 4 A schematic diagram illustrating the operational mechanism of an example pollution source tracing method based on flow field dynamics and adjoint matrix according to an embodiment of this application is shown. Figure 5 This diagram illustrates the comparison of normalized candidate source evidence strength on the emission initiation time plane relative to the flow reversal time at the candidate discharge outlet location using different processing methods. Figure 6 A schematic diagram showing the joint comparison of the localization error distribution and the change in mirror misjudgment rate of different methods under different experimental subsets is presented; Figure 7 This diagram illustrates the comparison of median positioning error contour lines under the combined disturbances of slow response time constant and corrected flow system bias using different methods. Figure 8 A structural block diagram of an example pollution source tracing system based on flow field dynamics and adjoint matrix according to an embodiment of this application is shown. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0017] It should be noted that some current pollution source tracing systems employ geostatistical inversion methods. Based on pollutant concentration data obtained from limited monitoring locations, they establish prior covariance using spatial and temporal correlations during pollution propagation, and then reconstruct the emission history of the pollution source using regularization constraints. Such systems can suppress drastic fluctuations in inversion results when monitoring data is limited or contains noise; however, the results are easily affected by prior correlation structures and regularization parameters. When different candidate pollution sources have similar interpretability to limited monitoring data, smoothing constraints may further reduce the response differences between different candidate sources, and cause a short-duration emission to appear as a longer-duration emission process in the inversion results.
[0018] Other pollution source tracing systems employ the Backward Probability Method (BPM) or adjoint analysis to calculate the contribution of different candidate locations and time periods to the monitoring response based on river hydrodynamic conditions and pollutant transport relationships. BPM can be used to determine the backward probability of pollutants occurring at different locations and times, while adjoint analysis can be used to establish the sensitivity relationship between candidate source terms and the monitoring response, reducing the computational burden required for forward simulation of each candidate location. For non-instantaneous pollution emissions, some systems also use reverse flow and pollution routing to reconstruct the time-varying process of pollution emissions and utilize EnKF (Ensemble Kalman Filter) to update the preliminary identification results. These systems typically use given flow field, boundary conditions, and pollution transport parameters as the basis for calculations. Errors in flow measurement, boundary condition deviations, and model parameter errors can all be passed on to the calculation results of candidate pollution sources, and short-duration pollution emissions are more susceptible to observation errors.
[0019] To reduce the computational burden caused by repetitive calculations in pollution transport models, some pollution source tracing systems combine two-dimensional transient advection-diffusion models with optimization algorithms such as Differential Evolution (DE) to adjust the location and emission parameters of candidate pollution sources based on the difference between simulated and monitored concentrations. Other systems employ transfer functions to establish surrogate transport models, converting pollutant transport calculations into algebraic relationships that are easier to solve repeatedly. With the development of data-driven technologies, some systems utilize the MIKE 21 hydrodynamic-water quality model to generate pollution event samples and establish alternative mappings between pollution source parameters and monitoring responses using LSTM (Long Short-Term Memory) networks. These systems can reduce the computation time required for candidate pollution source searches, but their identification results depend on the accuracy of the forward model and the coverage of actual river conditions by the preset samples. When the model structure, boundary conditions, or sample conditions are inconsistent with actual pollution events, the alternative calculations may still retain deviations in the original response relationships.
[0020] In water quality monitoring, some online monitoring systems employ optical detection methods such as fluorescence, absorption, or scattering to continuously characterize water quality indicators such as organic pollutants, nitrates, DOC (Dissolved Organic Carbon), or turbidity. Other systems use online TOC (Total Organic Carbon) analyzers to characterize the organic pollution load in water bodies. These monitoring results are affected not only by the concentration of the analyte but also by factors such as water temperature, turbidity, calibration status, and biofouling. For flow-through monitoring systems, sampling flow rate, pipeline length, and instrument arrangement also affect system residence time and time delays between different instruments. When samples are adsorbed or remain inside the equipment, carryover and memory effects may occur. Current technologies typically filter, time-correct, or noise-process these effects before pollution source tracing. When measurement deviations are persistent or change with equipment operating conditions, pre-processed monitoring data may still deviate from the actual pollutant concentration changes in the river, affecting the estimation of pollution source emission processes.
[0021] It should be understood that the above description of the relevant technologies is intended only to help the public better understand the inventive spirit and motivation of this application, and is not intended to limit this application. Furthermore, the technical solutions described in the above-mentioned relevant technologies are not prior art, and may also be undisclosed technical solutions, such as those under research or in the laboratory stage.
[0022] Figure 1 A flowchart illustrating an example of a pollution source tracing method based on flow field dynamics and adjoint matrix according to an embodiment of this application is shown.
[0023] The method provided in this application embodiment can be executed by a pollution source tracing server, a river network monitoring platform, or a computing device with data processing capabilities. The method can be implemented by a processor executing programs or instructions in memory, or by software, hardware, or a combination of both. The computing device establishes data interfaces with water level monitoring equipment, cross-sectional flow monitoring equipment, online water quality monitoring equipment, gate pump operation recording system, and candidate discharge outlet information database to obtain river hydrodynamic data, water quality monitoring data, and candidate discharge outlet data during pollution events.
[0024] In some implementations, the target river section may be an urban river section whose flow direction changes due to tidal backwater, gate regulation, or pumping station operation, or it may include tributary river sections that are connected to the urban river section and affect the transport of pollutants.
[0025] In one business application scenario, the target river section is an urban drainage river section affected by tides, gate scheduling, and pumping station drainage. After receiving pollution anomaly alarms from online water quality monitoring stations, the river network monitoring platform correlates and obtains water level data, cross-sectional flow data, water quality monitoring values, gate and pumping station operation records, candidate discharge outlet information, and corresponding sensor operation response data during the pollution event. The candidate discharge outlets may include combined sewer overflow outlets, pumping station outlets, and industrial wastewater outlets. Due to tidal changes or gate / pump scheduling, the river flow direction changes during the pollution event, and pollutants may be redirected along the changed flow direction, forming similar responses at different monitoring locations.
[0026] In this scenario, the river network monitoring platform corrects the flow rate at each cross-section based on water level changes and the continuous relationship of water volume in the river section, obtaining a corrected flow rate that reflects the time-varying hydrodynamic state during the event. The platform then determines the flow reversal time based on the corrected flow rate and, according to the condition that the cumulative water exchange volume before and after the reversal is equal, identifies paired monitoring values from the water quality monitoring data at the same monitoring location. Thus, the pairing of observations before and after the reversal is established based on the actual water exchange volume passing through the monitoring cross-section, avoiding misalignment of the hydrodynamic process caused by pairing solely based on clock time intervals.
[0027] For the fluorescence, ultraviolet absorption, or conductivity monitoring values output by online water quality monitoring stations, the platform determines the sensor memory core based on the sensor's clean water flushing response or standard solution step response. The time-reversed sensor memory core is used as the accompanying observation source for the corresponding monitoring location, and the corrected flow rate is used as the time-varying convection condition for the pollutant transport process. The platform calculates the unit discharge mass response sensitivity of each candidate discharge outlet in each candidate discharge time slice. The platform constructs an accompanying matrix with water quality monitoring values as matrix rows and combinations of candidate discharge outlets and candidate discharge time slices as matrix columns. The platform simultaneously sums and differs the paired monitoring values and their corresponding matrix rows to form common response and directional difference information for inversion.
[0028] Subsequently, under the constraints of non-negative discharge quality, the discharge capability status of candidate discharge outlets, and a preset upper limit for discharge quality, the river network monitoring platform inverts the discharge quality time series of each candidate discharge outlet based on the processed observation vectors and adjoint matrices. The main candidate discharge outlet, pollution source location, and discharge period are then determined by the cumulative discharge quality and continuous discharge time slices. The obtained location results can be further validated by combining the replay water quality response at reserved monitoring locations, the response similarity between candidate discharge outlets, and the results of perturbation-repeated inversions, providing target locations and time ranges for mobile sampling, shoreline patrols, and discharge outlet sampling.
[0029] like Figure 1 As shown, in step S110, water level data, cross-sectional flow data, water quality monitoring values and their monitoring locations, and candidate discharge outlets and their locations for the target river section during the pollution event are acquired. The pollution event period is divided into multiple candidate discharge time slices, and the pollution event period includes at least one flow direction reversal. Sensor memory kernels corresponding to the monitoring locations are acquired, and the sensor memory kernels characterize the time response relationship between pollutant concentration and the water quality monitoring values. The cross-sectional flow data is corrected based on the water level data, constrained by the continuous relationship of water volume in the river section, to obtain the corrected flow rate.
[0030] The duration of a pollution event can be determined based on pollution event records. In some examples, a preset background water quality change range can be determined based on background monitoring data prior to the pollution event. The moment when the water quality monitoring value first exceeds the preset background water quality change range is defined as the start time, and the moment when the water quality monitoring value returns to the preset background water quality change range is defined as the end time. Hydrodynamic data and water quality monitoring data are retained for preset durations before the start time and after the end time, respectively, to cover the propagation process of the pollutant before it reaches the monitoring location and the process of pollution response decline. The pollution event period must cover at least one process of flow direction changing from a first direction to a second direction, so that the acquired data includes water quality monitoring values located on both sides of the same flow direction reversal moment.
[0031] Water level data can be obtained from water level gauges deployed along the target river section, and includes at least the water level monitoring location, the water level acquisition time, and the corresponding water level value. Cross-sectional flow data can be obtained from acoustic Doppler current profilers, fixed flow meters, or flow monitoring equipment based on the water level-flow relationship, and includes at least the cross-sectional location, the acquisition time, and the corresponding cross-sectional flow. Water quality monitoring values can be tryptophan-like fluorescence, ultraviolet absorption, total organic carbon, conductivity, turbidity, or other water quality indicators with a calibration relationship to the target pollutant concentration, output by online water quality monitoring equipment. For water quality indicators with different physical meanings, corresponding water quality monitoring value sequences are formed, and adjoint calculations and discharge quality inversion are performed separately for each.
[0032] The water level data, cross-sectional flow data, and water quality monitoring values are processed using a unified time stamp to ensure that all data correspond to each other according to the time of collection. This unified time stamp processing can utilize standard timestamps recorded by the monitoring equipment and correct for fixed time deviations between different devices based on equipment clock calibration records. The monitoring location is associated with the water quality monitoring equipment identifier, the river section in which it is located, its location along the river, and the corresponding cross-section, ensuring that each water quality monitoring value has a definite monitoring location and time.
[0033] Candidate discharge outlets can be determined based on discharge outlet survey data, drainage network data, shoreline patrol records, or historical sewage discharge records. Each candidate discharge outlet and its location is used to at least indicate the connection between the candidate discharge outlet and the target river section, as well as the spatial relationship of the connection relative to each monitoring location. For registered candidate discharge outlets, the discharge outlet type, discharge outlet orientation, discharge outlet bottom elevation, and operating status can also be recorded.
[0034] In some examples, the pollution event period is divided into multiple consecutive candidate emission time slices according to a preset time interval. Each candidate emission time slice corresponds to a time range within which pollution emissions may occur. The time interval can be determined based on the sampling cycle of the water quality monitoring equipment, the sensor response speed, the flow field change rate, and the duration of the pollution event to be identified. Multiple candidate source terms are constituted by candidate discharge outlets and candidate emission time slices. Each candidate source term represents the situation where a unit emission mass or the required emission mass occurs at the corresponding candidate discharge outlet within the corresponding candidate emission time slice.
[0035] The sensor memory core can be pre-stored in a sensor parameter library and a correspondence can be established between the water quality monitoring equipment identifier and the corresponding monitoring location. The sensor memory core describes the temporal distribution of the impact of changes in pollutant concentration in the river channel on water quality monitoring values at different times after passing through the sampling pipeline, flow unit, and sensor sensitive components. The sensor memory core can be obtained from the sensor's flushing response, standard solution switching response, or maintenance calibration data. When multiple water quality monitoring devices are installed at the same monitoring location, a corresponding sensor memory core is configured for each device.
[0036] During flow reversal, the absolute value of the cross-sectional flow can lie within a preset flow hysteresis interval, including zero flow. Equipment measurement errors can affect the flow sign determination. To obtain the hydrodynamic conditions for determining the reversal time and calculating pollutant transport, the flow rates of multiple cross-sections at the same time period are jointly corrected based on the changes in river storage volume reflected by water level data. During the correction process, the inflow, outflow, and river storage volume changes of adjacent cross-sections are made to satisfy the continuity relationship of river volume. The deviation of the corrected cross-sectional flow rate from the corresponding measured cross-sectional flow rate is constrained according to the measurement accuracy of each cross-section, while reducing the river volume continuity residual. This yields the corrected flow rate for each cross-section at each calculation time. The corrected flow rate maintains the correspondence with the cross-sectional position and calculation time and is used to calculate the cumulative water exchange volume and construct the time-varying convection conditions for pollutant transport.
[0037] In step S120, the flow reversal time is determined according to the corrected flow rate, and two paired times with equal cumulative water exchange before and after the flow reversal time are determined based on the flow reversal time. Water quality monitoring values at the same monitoring location at the two paired times are extracted to form a set of paired monitoring values.
[0038] For any monitoring location, the change of the flow symbol over time is determined based on the corrected flow rate at the cross-section where the monitoring location is located or at a cross-section with a hydrodynamic correspondence to the monitoring location. The flow symbol represents the actual flow direction at the corresponding cross-section. Flow along a preset mainstream direction can be defined as positive flow, and flow opposite to the preset mainstream direction can be defined as reverse flow. When the corrected flow rate changes from positive to reverse or from reverse to positive and remains in the changed flow direction for a preset duration, the corresponding flow symbol change time is determined as the flow direction reversal time. Thus, only flow symbol changes that meet the flow direction maintenance condition are identified as flow direction reversals.
[0039] The cumulative water exchange volume is determined by the cumulative result of the corrected flow rate over time, while maintaining the exchange direction indicated by the flow rate symbol. The cumulative water exchange volume increases in the direction corresponding to the forward flow rate and decreases in the direction corresponding to the reverse flow rate, thus representing the net exchange direction and process of water relative to the monitoring section. Compared to directly using clock time, the cumulative water exchange volume also reflects the actual amount of water passing through the monitoring section.
[0040] Using any flow reversal moment as a reference, pairing moments are searched both before and after the reversal moment. The absolute value of the difference between the signed cumulative water exchange at the pairing moment before the reversal and the signed cumulative water exchange at the reversal moment is equal to the absolute value of the difference between the signed cumulative water exchange at the pairing moment after the reversal and the signed cumulative water exchange at the reversal moment. Therefore, the two pairing moments are located on opposite sides of the same flow reversal process and correspond to the same cumulative water exchange. When there is a difference in the absolute value of the flow rate before and after the reversal, the time interval between the two pairing moments and the reversal moment can be different.
[0041] In some examples, multiple positive preset exchange quantities can be set for the reversal time of the same flow direction, and a pairing time can be formed for each preset exchange quantity. Each pairing time is associated with the reversal time of the same flow direction and the corresponding preset exchange quantity, so that each pairing monitoring value has a definite reversal order and exchange quantity scale.
[0042] After determining a pairing time set, water quality monitoring values at the same monitoring location before and after the reversal are read from the water quality monitoring data after standardization. When the pairing time is between two adjacent acquisition times, the water quality monitoring value corresponding to the acquisition time with the smallest time interval to the pairing time can be used, or time interpolation can be performed based on the water quality monitoring values of the two adjacent acquisition times. A pairing monitoring value set is formed by two water quality monitoring values corresponding to the same monitoring location, the same reversal time, and the same preset exchange volume. Each pairing monitoring value set retains the correspondence between monitoring location, reversal order, pairing time, and preset exchange volume, so that each pairing monitoring value set can establish a correspondence with the corresponding two matrix rows in the adjoint matrix.
[0043] In step S130, the time-reversed sensor memory core is used as the accompanying observation source for the corresponding monitoring location. The pollutant transport process is calculated based on the corrected flow rate and the accompanying observation source. The response sensitivity of each candidate discharge outlet to the water quality monitoring value per unit discharge mass in each candidate discharge time slice is determined according to the location of each candidate discharge outlet.
[0044] Here, a pollutant transport model is established on the target river section. This model describes the convective transport of pollutants with the water flow, and their dispersion and attenuation within the river channel. The spatial computational scope of the model covers at least each candidate discharge point and each monitoring location, while the temporal computational scope covers the entire pollution event period. In an example using a one-dimensional cross-sectional average transport model, the cross-sectional average velocity is determined based on the corrected flow rate and corresponding cross-sectional area, and this velocity characterizes the time-varying convective conditions corresponding to the corrected flow rate. In an example using a conserved transport model, the corrected flow rate is incorporated into the pollutant convective flow rate term. Thus, the direction of pollutant transport changes with the sign of the corrected flow rate.
[0045] The water quality monitoring value is the output of the device after the river pollutant concentration at the corresponding monitoring location has been processed by the sensor memory core. For any monitoring location at any monitoring time, the water quality monitoring value can be simultaneously affected by the river pollutant concentration at multiple times prior to the monitoring time. Based on the response degree corresponding to different response delays in the sensor memory core, the sensor memory core is time-reversed relative to the current monitoring time to form an accompanying observation source acting on each calculation time prior to the current monitoring time.
[0046] The accompanying observation sources are set at the monitoring locations corresponding to the water quality monitoring values and distributed temporally according to the sensor memory kernels after time reversal. Using the accompanying observation sources as input and the time-varying convection conditions corresponding to the corrected flow rate as the hydrodynamic conditions, the accompanying calculation is performed on the pollutant transport process, causing the accompanying field to propagate from the monitoring time of the corresponding water quality monitoring value to the previous calculation time. The resulting accompanying field is used to characterize the degree of influence of unit pollutant input at different spatial locations and different historical times in the target river section on the corresponding water quality monitoring value.
[0047] For each candidate discharge outlet and each candidate discharge time slice, the response of the accompanying field at the candidate discharge outlet location within the corresponding candidate discharge time slice is extracted, and time aggregation is performed according to the time distribution of unit discharge mass within the candidate discharge time slice. The unit discharge mass within the candidate discharge time slice can be uniformly distributed or distributed using a pre-defined time basis function. The total discharge mass corresponding to the time distribution within the corresponding candidate discharge time slice is the unit discharge mass. The time aggregation result is the response sensitivity of the corresponding candidate discharge outlet to the corresponding water quality monitoring value within the corresponding candidate discharge time slice.
[0048] By applying the above processing to water quality monitoring values at different monitoring locations and times, the response sensitivity of each candidate source term to each water quality monitoring value can be obtained. This response sensitivity simultaneously includes the river transport effect described by the corrected flow rate and the monitoring equipment time response effect described by the sensor memory kernel. Therefore, the object fitted in the inversion is the actual output water quality monitoring value from the online water quality monitoring equipment, which includes the sensor's dynamic response.
[0049] In step S140, based on the response sensitivity, an adjoint matrix is constructed in which rows correspond one-to-one with the water quality monitoring values and columns correspond one-to-one with the combinations of each candidate discharge outlet and each candidate discharge time slice. The rows of each pair of monitoring values and the corresponding two matrices in the adjoint matrix are simultaneously summed and subtracted to obtain the summed observation vector, the subtracted observation vector, the summed adjoint matrix, and the subtracted adjoint matrix.
[0050] Each water quality monitoring value is treated as an observation object, and these observation objects are arranged according to their monitoring location and time to form the rows of the adjoint matrix. Each candidate discharge outlet and each candidate discharge time slice combination is treated as a candidate source term, and these candidate source terms are arranged according to their discharge outlet order and discharge time slice order to form the columns of the adjoint matrix. The response sensitivity obtained from the aforementioned adjoint calculation is written to the position where the corresponding observation object intersects with the corresponding candidate source term, thereby constructing the adjoint matrix.
[0051] In the adjoint matrix, a row represents the response relationship of each candidate source term to the same water quality monitoring value, and a column represents the response relationship of the same candidate source term to each water quality monitoring value. The rows of the adjoint matrix maintain a one-to-one correspondence with the water quality monitoring values, ensuring that any pair of paired monitoring values can be identified in the adjoint matrix along with its corresponding two rows.
[0052] For any pair of paired monitoring values, the water quality monitoring value before the switchover and the water quality monitoring value after the switchover are added together to form the summed observation value corresponding to the paired monitoring values; the water quality monitoring value before the switchover and the water quality monitoring value after the switchover are subtracted to form the difference observation value corresponding to the paired monitoring values. Simultaneously, the same summation and difference processing are performed on the two matrix rows in the adjoint matrix corresponding to the water quality monitoring values before and after the switchover, respectively forming the summation response row and the difference response row.
[0053] In some examples, the water quality monitoring values and corresponding matrix rows after the reversal can be compensated based on the pollutant decay between two paired time points and the change in the water flow area of the monitoring section, before performing the summation and difference processing. When using the compensation, the water quality monitoring values and corresponding matrix rows use the same compensation coefficient and the same addition and subtraction relationship to maintain the correspondence between the processed observation objects and response relationships.
[0054] The summed observations are compiled according to the order of the paired monitoring values in each group, forming a summed observation vector; the differenced observations are compiled according to the same order, forming a differenced observation vector. Correspondingly, the summed response rows and the differenced response rows are combined according to the order of the paired monitoring values in each group, forming a summed adjoint matrix and a differenced adjoint matrix, respectively. The elements in the summed observation vector correspond one-to-one with the rows of the summed adjoint matrix, and the elements in the differenced observation vector correspond one-to-one with the rows of the differenced adjoint matrix.
[0055] The summation relation represents the superposition component of the water quality response at two paired time points, while the difference relation represents the difference component of the water quality response at two paired time points. The same linear transformation is performed on the water quality monitoring values and their corresponding matrix rows, ensuring that the two transformed observation vectors maintain the candidate source term response relationship consistent with their corresponding adjoint matrices, while preserving the matrix column structure corresponding to the candidate discharge outlet and candidate discharge time slice combinations.
[0056] In step S150, based on the summation observation vector, the difference observation vector, the summation adjoint matrix, and the difference adjoint matrix, the emission quality of each candidate emission outlet in each candidate emission time slice is inverted to obtain the emission quality time series of each candidate emission outlet, and the pollution source location and corresponding emission period are determined according to the emission quality time series.
[0057] The emission mass of each candidate emission outlet within each candidate emission time slice is set as the quantity to be inverted, and an emission mass vector is formed according to the column order of the adjoint matrix. After the summation adjoint matrix is applied to the emission mass vector, a summation prediction response corresponding to the summation observation vector is formed; after the difference adjoint matrix is applied to the emission mass vector, a difference prediction response corresponding to the difference observation vector is formed.
[0058] A constrained inversion method is employed to adjust the emission mass vector, thereby reducing the differences between the summed predicted response and the summed observed vector, as well as the differences between the differenced predicted response and the differenced observed vector. The emission mass can be constrained to be non-negative to correspond to the mass of pollutants discharged from candidate outlets into the target river segment. In some examples, constrained inversion can be performed within a feasible region defined by the range of emission mass values and the operating status of candidate outlets, using the total change in emission mass of adjacent candidate emission time slices for the same candidate outlet and the number of candidate outlets with at least one non-zero emission mass as inversion selection criteria.
[0059] The operational status of candidate discharge outlets can be used to limit the value range of the corresponding quantities to be inverted. Before inversion, the same background-removing linear transformation can be performed on the observation vector and the corresponding adjoint matrix based on boundary water quality changes, tidal background, or sensor baseline drift to maintain the correspondence between the transformed observation objects and the candidate source term responses. Thus, the operational status of candidate discharge outlets limits the feasible range of the quantities to be inverted, and background processing limits the data components entering the inversion; both act on their respective processing objects.
[0060] After the inversion is completed, the quantities to be inverted in the emission quality vector are grouped according to the candidate emission outlets, and the emission qualities corresponding to the same candidate emission outlet are arranged in chronological order of the candidate emission time slices to obtain the emission quality time series of each candidate emission outlet. The emission quality time series is used to show the emission quality changes of the corresponding candidate emission outlet in each candidate emission time slice during the pollution event.
[0061] The cumulative emission mass of each candidate emission outlet is determined based on its emission mass time series, and the candidate outlets are then ranked according to the cumulative emission mass. In some examples, the candidate outlet with the largest cumulative emission mass is designated as the primary candidate outlet, and the location of the primary candidate outlet is determined as the pollution source location.
[0062] For candidate emission outlets identified as pollution source locations, consecutive candidate emission time slices whose emission quality reaches a preset emission identification threshold are defined as emission periods. The start time of the first consecutive candidate emission time slice is defined as the emission start time, and the end time of the last consecutive candidate emission time slice is defined as the emission end time. The corresponding emission period is determined by the emission start time and the emission end time. By aggregating the emission quality of each candidate emission time slice within the emission period, the emission quality of the corresponding pollution event can also be obtained.
[0063] In this embodiment, the corrected flow rate is used simultaneously to establish the correspondence between water body exchanges before and after the exchange and to determine the response of candidate discharges to water quality monitoring values; the sensor memory kernel is incorporated into the observation formation process of water quality monitoring values; the paired monitoring values and the adjoint matrix are subjected to the same summation and difference processing. Thus, a corresponding inversion data chain is formed between candidate discharge outlets, candidate discharge time slices, and water quality monitoring values, and the pollution source location and corresponding discharge period are output.
[0064] Regarding the implementation details of correcting cross-sectional flow based on the continuous relationship of water volume in the method of this application embodiment, in some examples of this application embodiment, at least one of the cross-sectional geometric data of the target river section, the measurement accuracy of the flow of each cross-section, and the gate switching record and pump station start-up and shutdown record is obtained, and the target river section is divided into multiple river section units.
[0065] The cross-sectional geometric data may include the location, elevation, and correspondence between water level and flow area of each cross-section. Along the main current direction of the target river segment, the river segment between two adjacent cross-sections is considered a single river segment unit, and the upstream and downstream cross-sections and their arrangement along the river are recorded for each segment unit. When the target river segment has tributaries connecting to the main channel, the flow rate corresponding to the tributary connection location is used as the local inflow or outflow rate of the corresponding river segment unit, and the connection relationship of the river segment units set along the main current direction is preserved. The measurement accuracy of the flow rate at each cross-section can be determined based on the nominal measurement error of the flow monitoring equipment, calibration records, and the valid data status during pollution events. Gate switching records and pump station start / stop records may include equipment identification, equipment location, time of status change, and the operating status after the change, and the gates or pump stations are associated with the corresponding river segment units according to their equipment locations.
[0066] The rate of change of water storage in each river segment is determined based on the water level data and the cross-sectional geometric data. The local inflow or local outflow of each river segment is determined based on the acquired records. The net inflow of each river segment is determined based on the flow of adjacent cross sections in the cross-sectional flow data.
[0067] For any river segment, the water storage capacity of the river segment at adjacent calculation times is determined based on the water level data and the correspondence between the water level and the water-passing area. The rate of change of water storage capacity for that river segment is determined based on the difference between the two river segment water storage capacities and the time interval between adjacent calculation times. These rates of change of water storage capacity are aggregated according to the river-side arrangement order of each river segment to form a rate of change of water storage capacity vector. The water volume affected by the gate or pumping station during the corresponding calculation period is determined based on the location and operating status of the gate or pumping station. The water volume entering the river segment is considered as the local inflow, and the water volume leaving the river segment is considered as the local outflow. When equipment undergoes a state switch within the same calculation period, the local inflow or local outflow corresponding to that calculation period is determined based on the duration of the operating state before and after the switch. For river segment segments arranged along the main flow direction, the upstream cross-sectional flow is considered as the cross-sectional inflow, and the downstream cross-sectional flow is considered as the cross-sectional outflow. The net inflow is determined based on the cross-sectional inflow and the cross-sectional outflow.
[0068] The water volume continuity residual of each river segment unit is determined based on the net inflow, the rate of change of water storage, and the local inflow or local outflow; wherein the local inflow and the local outflow are respectively used as the inflow term and outflow term in the water volume continuity relationship of the corresponding river segment unit.
[0069] For any river segment, the rate of change in water storage is used as the water volume change term, and the net inflow formed by the flow at adjacent cross-sections is used as the cross-sectional flux term. Local inflow is included on the inflow side, and local outflow is included on the outflow side. The continuous water volume residual for that river segment is determined based on the difference between the water volume change term, the cross-sectional flux term, the local inflow, and the local outflow. The continuous water volume residuals of each river segment are collected according to their order of arrangement along the river, forming a conserved residual vector. Local water volume changes caused by gate switching or pump station start-up / shutdown are represented separately by the corresponding local inflow or local outflow, and are treated as independent water volume terms in the continuous water volume relationship of the river segment.
[0070] The corresponding flow correction weight is determined based on the measurement accuracy of the flow rate at each cross-section, so that the flow correction weight increases when the measurement accuracy is improved.
[0071] The flow correction weights are used to constrain the degree to which the flow rate at each cross-section deviates from the corresponding measured flow rate during the joint adjustment process. The flow correction weight for each cross-section can be determined based on the reciprocal of the corresponding measurement error or measurement uncertainty, and normalized relative to the same reference scale. The flow correction weights corresponding to each cross-section are written into the diagonal position of the flow correction weight matrix to form a flow correction weight matrix corresponding to the cross-section flow rate vector.
[0072] Furthermore, the flow rates of each cross section in the cross-sectional flow data are jointly adjusted, and the deviation of the adjusted flow rates of each cross section relative to the corresponding flow rates in the cross-sectional flow data is constrained according to the flow correction weight. The continuous residual of water volume in each river segment unit is reduced, and the adjusted flow rates of each cross section are determined as the correction flow rates.
[0073] In one implementation, the cross-sectional flow data is organized into a measured flow vector, and the rate of change of water storage, net inflow, and local inflow or outflow of each river segment are organized into a unified continuous residual expression of water volume. The corrected flow vector is determined according to the following formula: Equation (1) In the formula, To correct the flow vector; The flow vector to be corrected; The measured flow vector is composed of the cross-sectional flow data. This is the flow correction weight matrix determined based on the measurement accuracy of the flow rate at each cross-section; This is a vector representing the rate of change of water storage in each of the aforementioned river segment units; This is an operator that converts cross-sectional flow into net inflow into river segment units based on the upstream and downstream adjacency relationship between the cross-section and the river segment unit; To determine the state variables of the gate or pumping station A vector consisting of defined local inflow or local outflow rates, where the local inflow rate is... Take the positive value, the local outflow rate is Take the negative value; The positive conserved residual weighting coefficient; The value is a 2-norm. When the measurement uncertainty of a certain cross-section is zero, a preset positive lower limit is used to replace the measurement uncertainty before determining the corresponding flow correction weight.
[0074] The first term of the objective function is used to constrain the flow vector to be corrected. Relative to the measured flow vector The weighted bias, the second term is used to constrain the continuous residual of water volume in each river segment unit. The conserved residual weighting coefficient... The weighting factor can be determined based on the accuracy of cross-sectional flow measurement, the accuracy of water level data measurement, the measurement error of cross-sectional geometric data, and the allowable water balance error, and set to a positive value. When the measurement errors corresponding to the water level data and cross-sectional geometric data are within the preset error range, the weighting factor of the conserved residual is increased; when there is a deviation exceeding the preset time in the gate switching record or pump station start-up and shutdown record, the weighting factor of the conserved residual is decreased.
[0075] When solving, the measured flow vector can be used. As the flow vector to be corrected The initial value is determined, and the flow rates at each cross-section are jointly adjusted at the same calculation time. The solution obtained is... The flow rates at each cross-section are the corrected flow rates for the corresponding cross-sections. The joint adjustment is repeated for each calculation time during the pollution event, and the obtained corrected flow rates are arranged according to the cross-section location and calculation time to form the time-varying corrected flow rates for the target river segment.
[0076] Regarding the implementation details of the method for forming paired monitoring values based on flow direction reversal in the embodiments of this application, in some examples of the embodiments of this application, for any monitoring location, the corrected flow rate of the cross section where the monitoring location is located is obtained; when the corrected flow rate crosses from one side of a preset flow hysteresis interval containing zero flow rate to the other side, and the flow rate sign remains unchanged after crossing for a preset flow direction maintenance time, the moment when the corrected flow rate crosses the boundary of the other side of the preset flow hysteresis interval is determined as the flow direction reversal moment.
[0077] The preset flow hysteresis interval includes forward flow boundaries and reverse flow boundaries located on both sides of zero flow. The forward and reverse flow boundaries can be determined based on the measurement error of the flow monitoring equipment in the low flow velocity range, calibration results, or the flow fluctuation range during historical zero flow periods. When the corrected flow enters the preset flow hysteresis interval from outside the forward flow boundary and crosses the reverse flow boundary, a flow direction reversal from forward to reverse is determined; when the corrected flow enters the preset flow hysteresis interval from outside the reverse flow boundary and crosses the forward flow boundary, a flow direction reversal from reverse to forward is determined. The preset flow direction holding duration is determined based on the calculation time interval of the corrected flow and the flow fluctuation characteristics of the target river segment. Only when the corrected flow completes the crossing of the preset flow hysteresis interval and maintains the corresponding flow symbol for the preset flow direction holding duration after crossing is the corresponding moment recorded as the flow direction reversal moment. Each flow direction reversal moment is recorded in chronological order and associated with the corresponding monitoring location, the cross-section, and the flow symbols before and after the reversal.
[0078] From the start of monitoring, the corrected flow rate is accumulated over time according to the flow sign to obtain the signed cumulative water exchange volume.
[0079] In the cumulative processing, the monitoring location will be... The corrected flow rate at the cross section is denoted as The signed cumulative water exchange volume is determined according to the following formula: Equation (2) In the formula, For monitoring location The corresponding signed cumulative water exchange volume, To monitor the start time, The time to be matched. For integration time, For monitoring location The section in the integral time Corrected flow rate.
[0080] During discrete calculations, the corrected flow rates are read sequentially according to the calculation times. The exchanged water volume within the corresponding time period is determined based on the corrected flow rates and time intervals between adjacent calculation times, and then accumulated according to the sign of the corrected flow rates. When the corrected flow rate is positive, the signed cumulative water exchange volume increases in a pre-defined positive direction; when the corrected flow rate is negative, the signed cumulative water exchange volume changes in the opposite direction. When the time intervals between adjacent calculation times are different, the corresponding exchanged water volume is calculated separately for each time interval, maintaining the correspondence between the signed cumulative water exchange volume and the monitoring location and calculation time.
[0081] Furthermore, for at least one positive preset exchange volume, at each flow reversal time, the absolute value of the difference between the signed cumulative water exchange volume and the signed cumulative water exchange volume at the flow reversal time is determined to be equal to the pre-reversal time and post-reversal time of the same preset exchange volume. The pre-reversal time and the post-reversal time are determined as a pair of paired times, and the water quality monitoring values of the same monitoring location at the two paired times are extracted to form a pair of paired monitoring values.
[0082] For the moment of flow reversal The preset exchange quantity of positive and negative The time before and after the switching is determined according to the following formula: Equation (3) In the formula, For monitoring location The corresponding number At the moment when the flow direction changes, For the first A positive preset exchange quantity, For the previous moment, The time after the flow reversal is defined as follows: For each flow reversal time, a search is conducted both forward and backward to find times that satisfy the pairing conditions, limiting the search range to the corresponding flow stages between adjacent flow reversal times. When a time satisfying the pairing conditions exists in the discrete calculation times, that calculation time is directly determined as the time before or after the reversal. When the preset exchange volume is within the range of cumulative exchange volume changes corresponding to adjacent calculation times, time interpolation is performed based on the signed cumulative water exchange volume of adjacent calculation times to determine the corresponding pairing time. Multiple preset exchange volumes form multiple sets of pairing times in numerical order of exchange volume, and their upper limit is determined based on the available cumulative water exchange volume on both sides of the flow reversal time.
[0083] After determining the pairing time, water quality monitoring values for the two paired times are extracted from the water quality monitoring data corresponding to the same monitoring location. When the acquisition time and the pairing time coincide, the corresponding water quality monitoring value is read directly; when the acquisition time and the pairing time do not coincide, time interpolation is performed based on the water quality monitoring values adjacent to the paired times, while maintaining the correspondence between water quality monitoring values, monitoring locations, and monitoring equipment. Each pairing monitoring value is associated with at least the monitoring location, flow direction reversal time, time before reversal, time after reversal, and the corresponding preset exchange quantity, and is recorded in the order of monitoring location, flow direction reversal time, and preset exchange quantity for the corresponding two matrix rows in the subsequent positioning accompaniment matrix.
[0084] Figure 2 A flowchart illustrating an example of determining response sensitivity based on a sensor memory core in a method according to an embodiment of this application is shown.
[0085] like Figure 2 As shown, in step S210, the water rinsing response or standard solution step response of the sensor corresponding to the monitoring position is obtained. The first response time scale and the second response time scale are determined according to the response front and the recovery tail, respectively. The proportion of the first response component is determined according to the contribution of the response components corresponding to the first response time scale and the second response time scale to the water rinsing response or the standard solution step response.
[0086] The water rinsing response can be obtained by introducing clean water into the sampling pipeline and flow unit after the sensor completes the detection of the contaminated sample; the standard solution step response can be obtained by switching the liquid input to the sensor from a reference solution to a standard solution of known concentration, or by switching the standard solution back to the reference solution. During the acquisition process, the liquid switching time, the sensor output time, and the corresponding output value are recorded to ensure that the acquisition period covers the response front, the main response change process, and the recovery tail.
[0087] Based on the stable output values before and after liquid switching, baseline subtraction and amplitude normalization are performed on the sensor output to form a response sequence for parameter identification. The first response time scale is determined based on the change process within the response leading edge, and the second response time scale is determined based on the decay process within the recovery tail. The proportion of the first response component is determined based on the ratio of the response area corresponding to each of the two response components to the total response area. When different sensors are configured at different monitoring locations, the corresponding parameters are determined using the response data of the respective sensors.
[0088] In step S220, a sensor memory core is constructed based on the first response time scale, the second response time scale, and the proportion of the first response component. The core is normalized and contains two time response components corresponding to the first response time scale and the second response time scale, respectively. The second response time scale is greater than the first response time scale, and the first response time scale, the second response time scale, and the proportion of the first response component constitute the sensor memory core parameters.
[0089] In a two-component memory kernel implementation, the monitoring location is constructed according to the following formula. Corresponding sensor memory core: Equation (4) In the formula, For monitoring location The corresponding sensor memory core, In response to the delay time, The first response time scale As the second response time scale, This represents the proportion of the first response component, and , The integral of the sensor memory core over the non-negative response delay time is 1. A first time response component characterizes the short-term changes of the sensor at the response leading edge, and a second time response component characterizes the sustained response at the recovery tail. The two time response components are combined according to the proportion of the first response component. In actual calculations, the sensor memory core can be discretely sampled according to the time intervals of the accompanying calculations, and the discrete sampled values are normalized so that the sum of the products of the discrete sampled values and the corresponding time intervals is 1. The calculation range of the sensor memory core can be determined based on the cumulative response ratio; responses exceeding the calculation range are treated as truncation errors.
[0090] In step S230, for any water quality monitoring value at any monitoring location at any monitoring time, the sensor memory core is applied to the monitoring location in a time-reverse relationship according to the response delay between the monitoring time and each calculation time preceding the monitoring time, thereby forming the accompanying observation source.
[0091] For monitoring locations During monitoring time Water quality monitoring values, with As the starting point for the accompanying calculation, the calculation Compared with previous calculation times Response delay between and will The corresponding calculation time is applied to the monitoring location. The intensity of the accompanying source at the location. When the response delay exceeds the calculation range of the sensor memory core, the accompanying observation source of the water quality monitoring value is no longer applied to the corresponding calculation time. When forming an accompanying observation source, the correspondence between the water quality monitoring value, monitoring location, monitoring time, and sensor memory core is maintained.
[0092] In step S240, the corrected flow rate is used as the time-varying convection condition for the pollutant transport process, and the accompanying calculation is performed based on the accompanying observation source to obtain the accompanying field corresponding to the water quality monitoring value.
[0093] In the accompanying calculation, for the monitoring location During monitoring time Water quality monitoring values, in Within the time frame As applied to the monitoring location The accompanying observation source was obtained, and the accompanying field was acquired. In the formula, For the first Each monitoring moment, For the accompanying computation time, For the spatial location along the river, For the corresponding monitoring location and monitoring time The accompanying field is determined by the pollutant transport process, which can be represented by a non-steady-state transport model including advection, dispersion, and attenuation terms. The corrected flow rate is written into the transport model according to the cross-sectional location and calculation time, serving as a time-varying convection condition. The accompanying calculation uses spatial discrete units, time calculation nodes, and boundary conditions corresponding to the transport model, and proceeds in reverse chronological order from the monitoring time to the previous calculation time. When the flow direction changes, the convection condition in the accompanying calculation changes with the sign and value of the corrected flow rate. The resulting accompanying field maintains the correspondence between the spatial location along the river, the accompanying calculation time, the monitoring location, and the monitoring time. Its value at a certain spatial location and historical calculation time represents the response contribution of a unit pollutant input to the corresponding water quality monitoring value at that location and time.
[0094] In step S250, the time distribution of unit discharge mass within each of the candidate discharge time slices is determined, and the response of the accompanying field at each of the candidate discharge outlets is time-aggregated according to the time distribution to obtain the response sensitivity of each candidate discharge outlet to the water quality monitoring value per unit discharge mass in each of the candidate discharge time slices.
[0095] The time distribution can be represented as candidate emission time slices. Unit mass time basis function And satisfy the following formula: , Equation (5) For the position is candidate outlets The response sensitivity is determined according to the following formula: Equation (6) In the formula, Candidate discharge outlets In candidate emission time slices Unit emission mass within the monitoring location During monitoring time The response sensitivity of water quality monitoring values Candidate discharge outlets Location, For the first One candidate emission time slice, For candidate emission time slices The unit mass time basis function is used. When the candidate discharge outlet location coincides with a spatial discrete node, the associated field response of the corresponding node is directly read; when the candidate discharge outlet is located between adjacent spatial nodes, spatial interpolation is performed on the associated field response of the adjacent nodes based on its position along the river. The aforementioned time aggregation is performed on each monitoring location, each monitoring time, each candidate discharge outlet, and each candidate discharge time slice to obtain the corresponding response sensitivity. The rows of the associated matrix are arranged according to the water quality monitoring values, and the columns of the associated matrix are arranged according to the combination of candidate discharge outlets and candidate discharge time slices.
[0096] Regarding the implementation details of the method for synchronously forming sum and difference observations and sum and difference adjoint matrices in the embodiments of this application, in some examples of the embodiments of this application, the adjoint matrix is constructed by arranging the response sensitivity according to the combination of the water quality monitoring values and the candidate discharge outlets and the candidate discharge time slices.
[0097] In the matrix implementation, the monitoring location and monitoring time corresponding to each water quality monitoring value are combined and recorded as the row index. The candidate emission outlets and candidate emission time slices are combined and recorded as a column index. The response sensitivity is then used as an element of the adjoint matrix, such that the elements of the adjoint matrix satisfy the following equation: Equation (7) In the formula, For the adjoint matrix, the first... Rows and corresponding candidate outlets and candidate emission time slices matrix elements, Candidate discharge outlets In candidate emission time slices Unit emission mass within the monitoring location During monitoring time Response sensitivity, This serves as the row index for the water quality monitoring values. When constructing the adjoint matrix, the water quality monitoring values are arranged according to monitoring location and time to form matrix rows, and the response sensitivities are arranged according to the combination of candidate discharge outlets and candidate discharge time slices to form matrix columns. The arrangement rules for matrix rows and columns remain unchanged during subsequent compensation, summation, subtraction, background removal, and discharge quality inversion processes. Each matrix row in the adjoint matrix corresponds to a water quality monitoring value, and each matrix column corresponds to a combination of a candidate discharge outlet and a candidate discharge time slice.
[0098] Based on the water level data, the cross-sectional geometric data, and the pairing times of each group, the change in the water flow area of the cross-section where the corresponding monitoring location is located is determined, and based on the change in the water flow area, the time interval of the pairing times, and the preset pollutant decay characteristics, the compensation relationship of the water quality response before and after the change is determined.
[0099] For the Grouping and monitoring values, based on the pairing time before switching. and pairing time after commutation Corresponding water flow area and Determine the positive compensation coefficient: Equation (8) In the formula, For the first The compensation coefficient corresponding to the paired monitoring values, For the pairing time before switching, The pairing time after commutation. This refers to the cross-sectional area of the monitoring location at the time of pairing before switching. This refers to the cross-sectional area of the monitoring position at the pairing moment after the reversal. This is a positive effective attenuation constant for pollutants. Among them, and , representing the effective flow area of the monitoring section corresponding to the two paired times. The flow area is determined based on the water level data at the corresponding paired times and the water level-flow area relationship of the section where the monitoring location is located. When the water level acquisition time does not coincide with the paired time, time interpolation is performed based on the water level data before and after the paired time. The flow area of different monitoring locations is determined using the cross-sectional geometric data of their respective sections. The compensation coefficient simultaneously characterizes the pollutant attenuation and the change in flow area between the two paired times.
[0100] The water quality monitoring values and corresponding matrix rows in the paired monitoring values are compensated according to the compensation relationship, and are simultaneously summed and subtracted from the water quality monitoring values and corresponding matrix rows before the switching to form the summed observation vector, the subtracted observation vector, the summed adjoint matrix, and the subtracted adjoint matrix.
[0101] The first The pre-switch water quality monitoring value, post-switch water quality monitoring value, and the corresponding two matrix rows in the adjoint matrix are respectively denoted as: , , and And simultaneously sum and subtract according to the following formula: Equation (9) In the formula, For the first The summation of the observed values corresponding to the paired monitoring values, For the first The difference between the paired monitoring values and the corresponding observation values. These are the water quality monitoring values before the change. These are the water quality monitoring values after the reversal. The corresponding rows of the adjoint matrix are summed and subtracted simultaneously according to the following formula:
[0102] Equation (10) In the formula, For the first Group the summation response rows corresponding to the monitored values. For the first Group the subtraction response lines corresponding to the monitored values. These are the matrix rows corresponding to the water quality monitoring values before the transformation. This represents the matrix rows corresponding to the water quality monitoring values after the reversal. The summed observations, subtracted observations, summed response rows, and subtracted response rows are arranged according to the unified order of the paired groups, forming the summed observation vector, the subtracted observation vector, the summed adjoint matrix, and the subtracted adjoint matrix. The number of elements in the summed response rows and the subtracted response rows is the same as the number of columns in the original adjoint matrix, and each element continues to correspond to a combination of the same candidate discharge outlet and the same candidate discharge time slice.
[0103] Obtain background monitoring data characterizing background water quality and monitoring interference, and construct a background interference basis matrix; compensate the matrix rows corresponding to the pairing time according to the compensation relationship, and sum and subtract to form a summed background interference basis matrix and a subtracted background interference basis matrix.
[0104] The background monitoring data may include at least one of boundary water quality data, tidal background data, sensor blank response data, and turbidity interference data. The background monitoring data is arranged according to the monitoring location and time of the water quality monitoring values to construct a background interference basis matrix. The background interference basis matrix rows corresponding to each pair of time points are subjected to the same compensation, summation, and difference processing as the paired monitoring values, forming a summed background interference basis matrix and a differencing background interference basis matrix, ensuring that the background response components, the summed observation vector, the differencing observation vector, and the corresponding adjoint matrix are in the same summation and difference observation space. Each matrix column in the background interference basis matrix represents a type of background water quality change or monitoring interference response. When there are repeated background responses, the matrix column that can independently represent the corresponding background change is retained.
[0105] The measurement covariance matrix is determined based on the measurement uncertainty of each water quality monitoring value and the compensation, summation and difference processing. The measurement covariance matrix can be determined by the measurement uncertainty of each water quality monitoring value and the uncertainty propagation relationship corresponding to compensation, summation, and difference processing. For the same set of paired monitoring values, the uncertainties of the corresponding summation and difference observations are determined based on the measurement uncertainties and compensation coefficients of the water quality monitoring values before and after the changeover, and the correlation between the two is preserved in the measurement covariance matrix. The uncertainties and their correlations are arranged according to the combination order of the summation observation vector and the difference observation vector to form the measurement covariance matrix.
[0106] Furthermore, within the weighted space defined by the measurement covariance matrix, based on the summed background interference basis matrix and the subtracted background interference basis matrix, linear transformations to remove background response components are performed on the summed observation vector and the summed adjoint matrix, the subtracted observation vector and the subtracted adjoint matrix, respectively, to obtain background-removed summed observation vector, background-removed subtracted observation vector, background-removed summed adjoint matrix and background-removed subtracted adjoint matrix. The measurement covariance matrix is then transformed according to the linear transformation relationship to obtain the background-removed measurement covariance matrix.
[0107] In one implementation, the linear transformation matrix that removes the summed background response components is denoted as... The linear transformation matrix after removing the differenced background response component is denoted as... The background-removed observation vector and adjoint matrix are obtained according to the following formula: Equation (11) In the formula, To sum the observation vectors to remove the background, To extract the adjoint matrix after removing the background, To obtain the difference observation vector for background removal, To obtain the difference adjoint matrix for background removal, To sum the observation vectors, To sum the adjoint matrix, To find the difference observation vector, To find the difference adjoint matrix. The... and The corresponding observation vector and adjoint matrix are determined by orthogonal complement of the corresponding background interference basis matrix in the weighted space defined by the measurement covariance, so that the response components in the background basis direction are removed from the corresponding observation vector and adjoint matrix.
[0108] Will and The linear transformation matrix is formed according to the same arrangement rules as the summation and difference observation components. When the summation and difference channels are arranged in blocks, The measurement covariance matrix is transformed according to the following formula: Equation (12) In the formula, To remove the background measurement covariance matrix, To measure the covariance matrix, To arrange according to the rules of summation and difference channels and The linear transformation matrix formed, superscript This represents the matrix transpose. The linear transformation matrix is applied simultaneously to the corresponding observation vector and the adjoint matrix, and the measurement covariance matrix is updated according to the same transformation relationship. This ensures that the background-removed observation vector, the background-removed adjoint matrix, and the background-removed measurement covariance matrix maintain dimensional correspondence and consistent error relationships, and are used together as inputs for subsequent emission quality inversion.
[0109] Figure 3 A flowchart illustrating an example of how emission quality is inverted based on outlet operating conditions in a method according to an embodiment of this application is shown.
[0110] like Figure 3 As shown, in step S310, the background-removed summation observation vector and the background-removed difference observation vector, the background-removed summation adjoint matrix and the background-removed difference adjoint matrix are combined respectively to obtain the background-removed observation vector and the background-removed adjoint matrix; In one implementation, the background-removed summation observation vector and the background-removed difference observation vector are combined into a background-removed observation vector according to a preset channel order. The background-removed summation adjoint matrix and the background-removed difference adjoint matrix are combined in the same channel order to form the background-removed adjoint matrix. Each observation component in the background-removed observation vector corresponds one-to-one with the corresponding row in the background-removed adjoint matrix, and the columns of the background-removed adjoint matrix continue to correspond to the combination of candidate discharge outlets and candidate discharge time slices. The summation and difference channels can be arranged consecutively or alternately, but the background-removed measurement covariance matrix adopts the same arrangement order as the background-removed observation vector and the background-removed adjoint matrix.
[0111] In step S320, the pipe head, corresponding river water level, partial opening head loss, and status of check valve, gate and pump are obtained for each candidate discharge outlet; the difference between the pipe head and the partial opening head loss is determined as the effective head of the discharge outlet, and the discharge passage is opened or closed according to the status of the check valve and the gate.
[0112] The water head within the pipe can be obtained from water level monitoring equipment within the drainage pipeline, or determined based on the water level of the upstream inspection well connected to the candidate discharge outlet and the pipeline elevation. The river water level is determined based on water level monitoring values near the candidate discharge outlet, or by interpolation based on water level data between adjacent monitoring locations. The partial opening head loss is used to represent the head loss caused by the discharge outlet structure, valves, gates, partial pipe contraction, and outlet submersion. The result after deducting the partial opening head loss from the water head within the pipe is determined as the effective head of the discharge outlet, and the states of the check valve, gate, and pump are associated with the corresponding candidate discharge time slices according to the state recording time. When the state changes within a candidate discharge time slice, the corresponding time slices can be divided according to the state change time, so that each time slice corresponds to a determined discharge path state and pump operating state.
[0113] In step S330, a candidate discharge time slot that is open and meets either the condition that the pump is in the start state or the effective head of the discharge outlet is higher than the river water level is determined as an allowed discharge time slot; a candidate discharge time slot that is closed, or a candidate discharge time slot that is open, the pump is in the stop state and the effective head of the discharge outlet is lower than or equal to the river water level is determined as a prohibited discharge time slot.
[0114] In the corresponding calculation implementation, the emission coefficient corresponding to the allowed emission time slice will be... A value of 1 indicates the emission allowable factor corresponding to the prohibited emission time slot. The value is 0. In the formula, Candidate discharge outlets In candidate emission time slices The allowable discharge coefficient is determined based on the pump's drive head when the discharge path is open and the pump is running. When the pump is stopped, the allowable discharge time slot is determined based on the relationship between the effective head at the discharge outlet and the river level. When the discharge path is closed, the corresponding candidate discharge time slot is designated as the prohibited discharge time slot.
[0115] In step S340, the emission quality of each candidate emission outlet in each candidate emission time slice is taken as the quantity to be inverted, and a predicted response is formed based on the background removal adjoint matrix and the quantity to be inverted.
[0116] According to the column order of the background removal adjoint matrix, the invertible quantities of each candidate emission outlet in each candidate emission time slice are formed into an invertible quantity vector. Each element in the vector to be inverted corresponds to a column in the background-removed adjoint matrix, representing the pollutant mass entering the target river segment from the corresponding candidate discharge outlet within the corresponding candidate discharge time slice. and Multiplying these components yields the predicted response in the background-free observation space, where each component in the predicted response is consistent with the corresponding observation component in the background-free observation vector.
[0117] In step S350, under the constraints that the quantity to be inverted simultaneously satisfies non-negativity, the allowable emission time slot does not exceed the preset emission quality upper limit, and the prohibited emission time slot is zero, the emission quality of each candidate emission outlet in each candidate emission time slot is determined by the selection conditions of jointly reducing the weighted difference between the predicted response and the background removal observation vector based on the background removal measurement covariance matrix, the total change of the quantity to be inverted in adjacent candidate emission time slots of the same candidate emission outlet, and the number of candidate emission outlets with at least one non-zero quantity to be inverted.
[0118] The background-removed measurement covariance matrix can be used to form a weighted matrix: Equation (13) In the formula, The weighting matrix is used to calculate the weighted differences. To remove the background measurement covariance matrix, According to The positive stability constant determined by the mean of the diagonal elements. Let be the identity matrix. The positive stability constant is used to maintain the computability of the matrix inversion process.
[0119] In one implementation, the emission mass vector is determined according to the following formula: Equation (14) In the formula, For the determined emission mass vector, This is a vector composed of the quantities to be inverted for each candidate emission outlet in each candidate emission time slice. Candidate discharge outlets In candidate emission time slices Internal emissions quality Candidate discharge outlets In candidate emission time slices The upper limit of the preset emission quality within, Candidate discharge outlets The corresponding emission quality time series, For time-first difference operators, A positive time-varying constraint coefficient. A positive outlet sparsity constraint coefficient. It is a norm of 1. Norm 2, superscript This represents the matrix transpose. Iterate through all candidate emission outlets, and the third term uses the L2 norm of the emission quality time series of each candidate emission outlet as a continuous substitute for the number of candidate emission outlets with non-zero emission quality.
[0120] The lower bound in the constraint condition To keep emissions quality non-negative. When hour, The upper bound is ;when hour, The value is limited to zero. The first term of the objective function is used to calculate the measurement-weighted difference between the predicted response and the background-free observation vector; the second term is used to constrain the emission quality changes between adjacent candidate emission time slices of the same candidate emission outlet; and the third term is used to apply a set of sparsity constraints to the emission quality time series corresponding to the candidate emission outlet. The preset upper bound of emission quality can be determined based on the candidate emission outlet diameter, emission time slice duration, allowable flow rate, and target pollutant concentration range; the time variation constraint coefficient and the outlet sparsity constraint coefficient can be determined based on the monitoring data playback differences and emission duration conditions.
[0121] In step S360, the emission quality of the same candidate emission outlet is arranged according to the time sequence of the candidate emission time slices to obtain the emission quality time series of each candidate emission outlet.
[0122] Based on the correspondence between the columns of the background-removed adjoint matrix and the candidate emission outlets and candidate emission time slices, the emission quality vector is... Each element in the data is reassociated with its corresponding candidate emission outlet. For the same candidate emission outlet, the corresponding emission quality is arranged according to the time sequence of the candidate emission time slices, forming an emission quality time series for that candidate emission outlet. The emission quality corresponding to the prohibited emission time slice is zero, and the emission quality corresponding to the permitted emission time slice is between zero and the corresponding preset upper limit of the emission quality. The emission quality time series is used to calculate the cumulative emission quality of each candidate emission outlet and further determine the location of the pollution source and the emission period.
[0123] Regarding the implementation details of determining the location of pollution sources and corresponding emission periods based on emission quality time series in the method of this application, in some examples of this application, based on the background removal measurement covariance matrix, the non-negative normalized correlation value of the corresponding response of any two candidate emission outlets in the background removal adjoint matrix under different combinations of candidate emission time slices is calculated, and the maximum value is taken as the response similarity of the two candidate emission outlets.
[0124] In one implementation, Corresponding candidate outlet and candidate emission time slices The list is denoted as Candidate discharge outlets and candidate emission time slices The list is denoted as First, determine the non-negative normalized correlation value between the response columns according to the following formula: Equation (15) In the formula, Candidate discharge outlets In candidate emission time slices The response column and candidate output In candidate emission time slices The non-negative normalized correlation values between the response columns within the column, This is the serial number of another candidate outlet. This is the sequence number of another candidate emission time slice. This is the positive stability constant determined based on the weighted mean response energy of each candidate response column. The response similarity between the two candidate outlets is then determined using the following formula:
[0125] Equation (16) In the formula, Candidate discharge outlets With candidate discharge outlets The response similarity is calculated by not comparing the same candidate emission outlet with itself, but by iterating through the candidate emission time slice combinations corresponding to two different candidate emission outlets. The weighting matrix... Using the background removal measurement covariance relationship from the emission quality inversion, the positive stability constant is used to keep the weighted response energy of the candidate response series zero or close to zero, and the denominator can be calculated. The original correlation results are taken as non-negative values before determining the maximum value, so that candidate emission outlets with opposite response directions do not reach the response similarity threshold due to a large absolute value of the correlation value.
[0126] The cumulative emission mass of each candidate emission outlet is determined based on the emission mass time series; the inversion is repeated under the preset perturbation of the corrected flow rate, the sensor memory kernel parameters, and the measurement noise, and the frequency at which each candidate emission outlet has the largest cumulative emission mass is used as the ranking stability.
[0127] For any candidate emission outlet, the emission masses corresponding to each candidate emission time slice in its emission mass time series are summed to obtain the cumulative emission mass of that candidate outlet. In repeated inversions, the emission mass time series is re-determined within a preset disturbance range for the corrected flow rate, sensor memory kernel parameters, and measurement noise, and the candidate outlet with the largest cumulative emission mass in each inversion is recorded. Candidate outlets can be determined according to the following formula. Ranking stability:
[0128] Equation (17) In the formula, Candidate discharge outlets The stability of the ranking For the number of times the inversion is repeated, Candidate discharge outlets The number of times the cumulative discharge mass is the largest. When adjusting the calibration flow rate, the continuity of river flow is maintained. When adjusting the sensor memory kernel parameters, the first response time scale is kept smaller than the second response time scale, the proportion of the first response component is between zero and one, and the sensor memory kernel is normalized. Each repeated inversion uses the same candidate discharge outlet, candidate discharge time slice, and discharge mass constraints.
[0129] At least one verification monitoring location is selected, and the water quality monitoring values of the remaining monitoring locations are used to re-invert the data. Based on the obtained discharge quality time series and the corrected flow rate for forward transport of pollutants, the playback water quality response of the verification monitoring location is obtained in conjunction with the sensor memory kernel. The verification playback error is determined based on the normalized difference between the playback water quality response and the water quality monitoring values of the verification monitoring location.
[0130] After selecting the verification monitoring location, the data corresponding to that location are excluded from the observation vector, adjoint matrix, background interference basis matrix, and measurement covariance matrix used in the emission quality inversion. The emission quality time series is then re-determined using data from the remaining monitoring locations. The obtained emission quality time series and the corrected flow rate are input into the pollutant forward transport model to obtain the pollutant concentration change at the verification monitoring location. Time response processing is then performed using the sensor memory kernel corresponding to that verification monitoring location to obtain the playback water quality response at the same output scale as the water quality monitoring value.
[0131] In one implementation, the playback water quality response at the verification monitoring location is denoted as... The water quality monitoring values at the verification monitoring locations will be recorded as follows: The playback error is determined using the following formula: Equation (18) In the formula, To verify playback error, The playback water quality response vectors are arranged according to the verification monitoring time. This is a vector of water quality monitoring values arranged according to the same monitoring time. It is a positive stability constant. The replay water quality response and water quality monitoring values are arranged according to the same sampling time. When the sampling times are inconsistent, the forward transport results are interpolated to the water quality monitoring time and the verification replay error is calculated.
[0132] The candidate discharge outlet with the largest cumulative emission mass is selected as the primary candidate discharge outlet, the location of the primary candidate discharge outlet is determined as the pollution source location, and the continuous candidate emission time slices in which the emission mass of the primary candidate discharge outlet reaches the preset emission identification threshold are determined as emission periods. Candidate emission outlets are ranked according to their cumulative emission mass, and the one with the largest cumulative emission mass is identified as the primary candidate emission outlet, whose location is then designated as the pollution source location. The emission mass of the primary candidate emission outlet is read in chronological order according to the candidate emission time slices. Candidate emission time slices that reach the preset emission identification threshold and are consecutive in time are grouped into continuous emission segments, and the emission period is determined based on the start and end times of each continuous emission segment. If a primary candidate emission outlet has multiple separate continuous emission segments, the corresponding emission period is determined for each segment.
[0133] Other candidate outlets whose response similarity to the main candidate outlet reaches a preset similarity threshold are identified as similar candidate outlets; when the number of similar candidate outlets is zero, the ranking stability of the main candidate outlet is greater than or equal to a preset stability threshold, and the verification playback error is less than or equal to a preset playback error threshold, the pollution source location is marked as a reliable location result. The response similarity between the primary candidate outlet and other candidate outlets is compared with a preset similarity threshold. Other candidate outlets that reach the preset similarity threshold are identified as similar candidate outlets. When the number of similar candidate outlets is zero, the ranking stability of the primary candidate outlet is greater than or equal to the preset stability threshold, and the verification playback error is less than or equal to the preset playback error threshold, the pollution source location is marked as a reliable location result. The preset similarity threshold, the preset stability threshold, and the preset playback error threshold can be determined based on historical pollution events, controlled tracer data, or model validation results.
[0134] Furthermore, when the number of similar candidate discharge outlets is greater than zero, or the ranking stability of the main candidate discharge outlet is lower than the preset stability threshold, or the verification playback error exceeds the preset playback error threshold, the pollution source location is marked as a location result to be verified, and candidate areas are determined according to the respective locations of the main candidate discharge outlet, the similar candidate discharge outlet, and other candidate discharge outlets that become the ones with the largest cumulative emission mass in repeated inversion.
[0135] When the number of similar candidate discharge outlets is greater than zero, or the ranking stability of the main candidate discharge outlet is lower than a preset stability threshold, or the verification playback error exceeds a preset playback error threshold, the pollution source location is marked as a location result to be verified. The locations of the main candidate discharge outlet, similar candidate discharge outlets, and other candidate discharge outlets that have the largest cumulative emission mass during repeated inversion are spatially aggregated. Candidate areas are determined based on the location range of each relevant candidate discharge outlet, and the discharge outlet identification, location, cumulative emission mass, and ranking stability of each candidate discharge outlet are retained for use in on-site sampling or shoreline investigation.
[0136] Figure 4A schematic diagram illustrating the operational mechanism of an example pollution source tracing method based on flow field dynamics and adjoint matrix according to an embodiment of this application is shown.
[0137] like Figure 4 As shown, the hydrodynamic synchronous acquisition module acquires water level data and cross-sectional flow data during the pollution event, and performs time correspondence between hydrodynamic data from different sources through synchronous time stamps; the outlet condition acquisition module acquires the location of candidate outlets, water head in the pipe, river water level, local opening head loss, and the operating status of check valves, gates and pumps; the water quality monitoring value module acquires the water quality monitoring values at each monitoring location and their corresponding monitoring time.
[0138] The water level data, cross-sectional flow data, and outlet operation records output by the hydrodynamic synchronous acquisition module are input into the continuous water volume constraint flow correction module to obtain the corrected flow rate that satisfies the continuous water volume relationship of the river section. The flow direction reversal time is determined based on the corrected flow rate, and the pairing time is determined based on the condition that the cumulative water exchange volume before and after the reversal is equal. Paired monitoring values are formed from the water quality monitoring data corresponding to the same monitoring location.
[0139] The reversing water exchange volume pairing module and the sensor memory core accompanying calculation module form two parallel processing branches. The pairing time and paired monitoring value output by the reversing water exchange volume pairing module are used for pairing compensation, summation and subtraction processing; the sensor memory core module determines the sensor memory core based on the clean water flushing response or the standard solution step response, and the sensor memory core accompanying calculation module uses the time-reversed sensor memory core as the accompanying observation source, and uses the corrected flow rate as the time-varying convection condition of the pollutant transport process to perform accompanying calculations to obtain the response sensitivity.
[0140] Based on the stated response sensitivity, an adjoint matrix is constructed. Compensation, summation, and subtraction are then performed synchronously on the paired monitoring values before and after the transformation and the corresponding matrix rows in the adjoint matrix, resulting in summed observations, subtracted observations, summed adjoint matrices, and subtracted adjoint matrices. A background interference basis matrix is constructed by combining background water quality, tidal changes, sensor baseline drift, and monitoring interference. Background response elimination is then performed within the weighted space defined by the measurement covariance matrix, yielding a background-removed observation vector, a background-removed adjoint matrix, and a background-removed measurement covariance matrix.
[0141] The discharge outlet operating condition acquisition module provides the discharge outlet operating conditions to the discharge feasible region inversion module. The discharge feasible region inversion module determines the allowable discharge time slot and the prohibited discharge time slot based on the water head in the pipe, the river water level, the head loss of the partially open water, and the status of the check valve, gate and pump. Under the constraints of non-negative discharge quality, allowable discharge time slots being limited by the upper limit of discharge quality, and the discharge quality of the prohibited discharge time slot being zero, the discharge quality time series of each candidate discharge outlet is inverted.
[0142] The emission quality time series is input into the pollutant forward transport model and sensor response model for playback to obtain the playback water quality response at the verification monitoring location. The location reliability of the pollution source and emission period is verified by combining the response similarity between candidate discharge outlets, the ranking stability under disturbance conditions, and the verification playback error. A reliable location result is output when the preset reliability conditions are met; otherwise, the location result to be verified and the corresponding candidate area are output when similar candidate discharge outlets exist, the ranking stability does not reach the preset stability threshold, or the verification playback error exceeds the preset playback error threshold.
[0143] The following description, based on the experimental verification section, details how a controlled digital twin testbed was constructed to reproduce the source ambiguity arising from the coupling of hydrodynamic reversal and sensor memory effects in tidal river networks. The testbed corresponds to a 7.6 km long river section with an average width of 42 m and a normal depth of 2.8 m. Twelve candidate discharge outlets and five fixed water quality monitoring stations were deployed along the river. A baseflow with an average value of 18 m³ / s was set at the upstream boundary, while a semi-diurnal tidal pattern was applied at the downstream boundary, superimposed with a random gate switching time lag of 0–20 min, ensuring 1–3 continuous and effective flow reversals in the area where monitoring station S3 is located within the event observation window. Hydrodynamic calculations employed a one-dimensional unsteady shallow water equation, and pollutant transport used a conserved finite volume scheme. The longitudinal dispersion coefficient was sampled within the range of 8–26 m² / s, with a first-order decay half-life. Sampling was conducted within the range of 4–10 hours, and based on… Determine the effective decay constant of pollutants. For each event, randomly select one or two candidate outlets and inject organic tracers for 18-70 min. The mass of a single injection is set to 22-140 kg. When an event includes two injection outlets, the outlet with the larger injection mass is determined as the true primary outlet. When the injection masses are the same, the true primary outlet is determined according to the preset outlet numbering order, and the other outlet is designated as the secondary true outlet.
[0144] To simulate the actual measurement chain of online sensors, the ideal river pollutant concentration is processed through sensor memory kernels, baseline drift, and measurement noise to generate the observation signal. For monitoring locations... The sensor memory core is represented by two time response components:
[0145] Equation (19) in, For monitoring location The corresponding sensor memory core, In response to the delay time, For fast response time constant, For slow response time constant, For the proportion of fast response components, and satisfying the following: and and satisfy The sensor output signal is generated according to the following formula:
[0146] Equation (20) in, For monitoring location At any moment Sensor output, The sensor gain coefficient. For monitoring location At any moment The concentration of pollutants in the river channel For monitoring location Spatial location, For baseline drift term, Heteroscedasticity measurement noise related to pollutant concentration. Fast response time constant. Sampling was performed within the range of 3.3–5.7 min, with a slow response time constant. Sampling was performed within the range of 17–27 minutes; the proportion of slow response components was analyzed. Sampling within the range of 0.23 to 0.39 corresponds to the proportion of the fast response component. Sampling was performed in the range of 0.61 to 0.77. The signal was superimposed with baseline drift of 0.5% / h, turbidity-related optical bias, and heteroscedastic noise; in extreme stagnation conditions, the slow response time constant was set to 30 min.
[0147] The event library includes 240 independent scenarios, including 80 routine control events and 40 each of high noise, strong missing measurement, timescale distortion and extreme stagnation conditions. Figure 6 The experimental subset labeled "sparse sensors" corresponds to the aforementioned severe under-monitoring conditions. The high-noise condition is superimposed with 10% concentration noise, the severe under-monitoring condition randomly lacks 40% of monitoring values, and the time-scale distortion condition adds a ±10-minute time deviation to the gate log. To verify the generalization ability across monitoring stations, one monitoring station is randomly selected for each inversion. The data from this station is not used in the emission quality solution but only for forward playback and calculation of playback error verification. During flow field correction, one cross-sectional flowmeter is retained as a verification quantity. The sensor memory kernel parameters are determined by independent clean water flushing responses or standard solution step responses, without using the actual concentration from the same pollution event to adjust the sensor memory kernel parameters.
[0148] The experiment included four sets of comparative algorithms: RFR (Reverse Flow Routing) algorithm, which routes pollution sources based on observed peak values and reverse flow velocities; BPM (Backward Probability Method), which ranks candidate pollution sources based on backward probability; AM-Tik (Adjoint Matrix with Tikhonov Regularization), which smoothly solves the standard adjoint matrix without embedded sensor memory; and the proposed method based on commutation water exchange volume pairing, sensor memory embedding, and summation and subtraction processing, denoted as PUSM-AM (Phase-Unfolding Sensor-Memory-embedded Adjoint Matrix), where phase unfolding corresponds to establishing pairings based on the cumulative water exchange volume before and after commutation and performing summation and subtraction processing on the paired observations and their accompanying responses. The comparison focused on source term identification processing under the same hydrodynamic and pollutant transport models, without establishing a separate general depth network baseline. Evaluation metrics included spatial positioning error. Error at start time relative error of mass Top-1 hit rate and mirror image false positive rate Among them, spatial positioning error is the absolute value of the riverside distance between the recovered primary candidate discharge outlet and the actual primary discharge outlet; start time error is the absolute value of the time difference between the first effective emission time slice recovered and the actual emission start time; relative mass error is the absolute value of the difference between the recovered total mass and the actual total mass divided by the actual total mass; Top-1 hit rate is the percentage of events where the candidate discharge outlet with the largest cumulative emission mass matches the actual primary discharge outlet; mirror misclassification rate is the percentage of events where the primary candidate discharge outlet is located on the other side of the monitoring station and forms a reverse mirror position with the actual primary discharge outlet. The median and 95% confidence interval of each indicator were calculated using the 2000-event bootstrap method.
[0149] Figure 5 This diagram illustrates the comparison of normalized candidate source evidence strength on the emission initiation time plane relative to the flow reversal time for different processing methods at candidate discharge outlet locations.
[0150] like Figure 5As shown, the three subplots use the same coordinate range. The horizontal axis represents the longitudinal spatial location of the candidate discharge outlet along the river segment, ranging from 0 to 8 km; the vertical axis represents the discharge start time relative to the flow reversal time, ranging from -60 to 60 min. The left subplot shows the normalized evidence strength obtained from the standard adjoint treatment. Two hotspots with similar intensity are formed at the actual discharge outlet at approximately 3.25 km and the mirror discharge outlet at approximately 5.90 km, indicating that there is response aliasing between the actual and mirror discharge outlets when relying solely on the standard adjoint response.
[0151] Figure 5 The middle subplot represents the normalized evidence strength obtained by pairing based on the water exchange volume before and after the reversal. Compared with the left subplot, the hotspot corresponding to the actual discharge outlet at approximately 3.25 km shrinks and concentrates along the spatial location and discharge start time direction, while the evidence strength corresponding to the mirror discharge outlet at approximately 5.90 km weakens. This indicates that the distinguishability of the candidate discharge outlet response is enhanced after establishing the pairing relationship according to the cumulative water exchange volume before and after the reversal.
[0152] Figure 5 The right subplot represents the normalized difference evidence obtained after subtracting the paired observations and corresponding accompanying responses before and after the flow reversal. The region where the actual outlet is located is represented by positive warm-colored evidence, while the region where the mirrored outlet is located is represented by negative cool-colored evidence; the pentagram indicates the location of the actual outlet, and the cross indicates the location of the mirrored outlet after the flow reversal. The normalized difference evidence corresponds to the difference observation vector, the difference accompanying matrix, and the weighted measurement relationship, and is used to characterize the difference between the actual outlet and the mirrored outlet in the direction of the response before and after the flow reversal.
[0153] Figure 6 This diagram illustrates the combined comparison of the localization error distribution and mirror misjudgment rate changes of different methods across different experimental subsets.
[0154] like Figure 6 As shown, the left subplot represents the positioning error distribution of the four comparison methods under various event scenarios. The horizontal axis represents RFR, BPM, AM-Tik, and the PUSM-AM method of this application, respectively, while the vertical axis represents the positioning error expressed on a logarithmic scale in meters. The distribution for each method consists of a half-violin density, an internal box plot, and event-level scatter plots. The half-violin density represents the distribution range of the positioning error, the box plot represents the median and quartiles, and the scatter plots represent the positioning error for different events. The positioning error samples corresponding to the method of this application are distributed in the low-value range of the vertical axis shown in the figure.
[0155] Figure 6The right-hand subplot represents the mirror error rate variation relative to AM-Tik for different experimental subsets. The vertical axis represents high noise, sparse sensor, gate timescale deviation, long sensor memory, and the full set of experimental subsets, respectively. The horizontal axis represents the percentage change in mirror error rate relative to AM-Tik, and the dashed zero axis represents the reference level of AM-Tik. Each subset uses dots to represent the median of the error rate variation, and the horizontal line segment represents the 95% confidence interval; negative values indicate that the mirror error rate of the proposed method is lower than that of AM-Tik. The confidence intervals for each experimental subset are all located to the left of the zero axis, with the long sensor memory subset showing the largest negative change.
[0156] Combination Figure 5 The comparison of candidate source evidence strength shown in the figure reveals that the standard adjoint method generates response hotspots of similar intensity at both the actual discharge outlet and the mirrored discharge outlet. The method in this application, through matching the water exchange volume during directional flow, embedding sensor memory, and differential evidence processing, ensures that the actual discharge outlet maintains a positive response in the evidence space, while the response of the mirrored candidate discharge outlet is suppressed. Correspondingly, the mirrored false positive rate was reduced from 41.8% in AM-Tik to 4.2%. Figure 6 Further, it is shown that in high-noise, sparse sensor, gate timescale deviation, long sensor memory, and full-set experimental subsets, the mirror error rate change of the proposed method relative to AM-Tik is negative, with the largest negative change observed in the long sensor memory subset. This result corresponds to the proposed method's joint processing of the water exchange relationship and sensor dynamic response.
[0157] Figure 7 A schematic diagram showing the comparison of median positioning error contour lines under the combined disturbance of the second response time scale and the cross-sectional flow system deviation is presented.
[0158] like Figure 7 As shown, the left and right sub-figures correspond to the standard adjoint method and the method of this application, respectively. The horizontal axis represents the second response time scale, i.e., the time constant corresponding to the slow desorption process of the sensor, covering the parameter range of 0 to 30 min and above. The vertical axis represents the systematic deviation of the cross-sectional flow rate relative to the reference cross-sectional flow rate, ranging from −20% to +20%. The colors and contour lines in the figure represent the median positioning error, with the color scale unit being meters. Light-colored areas correspond to positioning errors below 200 m, and dark-colored areas correspond to positioning errors reaching or exceeding 2000 m.
[0159] Figure 7 In the left subplot, the positioning error shows an oblique expansion trend with the combined change of the second response time scale and the cross-sectional flow system deviation. When the second response time scale approaches or exceeds 30 min and the cross-sectional flow system deviation deviates from zero, the positioning error enters the high value region. Figure 7In the right subplot, the central region defined by the 200 m contour line maintains a positioning error of less than 200 m and covers the working range of approximately 6 to 26 minutes for the second response time scale and the cross-sectional flow system deviation close to zero. When the second response time scale approaches zero, the delay of the slow response component approaches the instantaneous response, and the sustained tail effect in the sensor memory core weakens.
[0160] When the second response timescale exceeds 30 minutes, the long-tailed response of the sensor memory core may exceed the normal calibration range, and the positioning error in some parameter areas may enter the high-value range. For such operating conditions where the sensor memory parameters deviate from the calibration range, the sensor memory core parameters should be re-determined by combining the independent clean water flushing response or the standard solution step response, and the sensor should be maintained on-site. After the parameters are recalibrated and the sensor status is confirmed, the pollution source should be located.
[0161] To analyze the contribution of each treatment relationship to the pollution source location results, under the same event database, monitoring data, candidate discharge outlets, candidate emission time slices, solution parameters, and stopping conditions, one treatment relationship was deactivated while other treatment relationships remained unchanged, resulting in the ablation results shown in Table 1.
[0162] Table 1. Statistical results of the median event level for each indicator under the same event set. method Positioning error / m Mirror image misjudgment rate / % Start time error / min Replay error Complete PUSM-AM 86 4.2 3.4 0.083 Continuous Constraint Flow Correction for Water Removal 176 11.7 5.9 0.121 Remove sensor memory embedding 248 22.5 9.6 0.148 Remove the difference channel 327 34.6 8.7 0.157 Remove emission feasible region constraints 151 13.3 4.8 0.104 Remove background response projection 194 16.7 6.1 0.132 As shown in Table 1, the complete PUSM-AM achieved the lowest results in all four indicators: positioning error, mirror error rate, start time error, and station playback error. After removing the difference channel, the mirror error rate increased from 4.2% to 34.6%, and the positioning error increased to 327 m, indicating that after performing difference processing on the paired observations before and after the reversal and their corresponding accompanying responses, evidence of directional differences that can be used to distinguish between the real discharge outlet and the mirrored discharge outlet after the reversal can be formed. After removing the sensor memory embedding, the start time error increased from 3.4 min to 9.6 min, and the station playback error increased from 0.083 to 0.148, indicating that reversing the sensor memory core time to form the accompanying observation source is a necessary process for recovering the emission time and reconstructing the monitoring response.
[0163] After removing the continuous flow constraint correction, the positioning error increased from 86 m to 176 m, accompanied by an increase in the mirror error rate and the station playback error. This indicates that the corrected flow rate affects the timing of flow reversal, the pairing of cumulative water exchange volume, and the calculation of pollutant transport. After removing the feasible discharge domain constraint, the positioning error increased to 151 m, and the mirror error rate increased to 13.3%. This indicates that determining the allowable and prohibitive discharge time slots based on the pipe head, river level, local open head loss, and the status of check valves, gates, and pumps can limit false discharge volumes when equipment is shut down, river water backflow occurs, or the discharge path does not meet discharge conditions. After removing the background response projection, the positioning error increased to 194 m, and the station playback error increased to 0.132. This indicates that simultaneously performing background response elimination on the observation vector, adjoint matrix, and measurement covariance relationship can reduce the impact of background water quality changes and monitoring interference on discharge quality inversion.
[0164] The aforementioned ablation processes are applied to the corrected flow formation, sensor response modeling, reversal pairing and difference processing, emission feasible region limitation, and background response elimination stages, respectively. The outputs of each process are used in subsequent inversion or location evaluation processes. The changes in the indicators in Table 1 reflect the independent and combined contributions of different processing relationships to the location results of the same pollution source.
[0165] In one implementation deployment, the event window includes at least one cross-section capable of confirming the flow direction, two water level monitoring locations for calculating changes in river storage capacity, two water quality monitoring locations at different hydrodynamic positions, and one water quality monitoring device capable of obtaining a clear water flushing response or a standard solution step response. Candidate outlet data includes at least the following: riverside location, bank side, outlet diameter, bottom elevation, outlet orientation, submersion status, check valve status, gate status, and pump operating status. For outlets whose locations are not yet registered, virtual candidate locations can be set along the bank, and their structural status can be marked in the output results. When both flow rate and water level data are missing during a flow direction reversal, a reliable corrected flow rate that satisfies the continuity of water volume cannot be formed, and the system outputs the location results as candidate areas. The forward model and the adjoint model employ a discrete adjoint flux scheme, and their consistency is verified by the unit emission pulse inner product. The flow direction holding time, preset upper limit of exchange volume, sensor memory kernel cutoff range, time variation constraint coefficient, and discharge outlet sparsity constraint coefficient are determined based on the sampling interval, cumulative response ratio of the memory kernel, station playback error, and discharge duration boundary. The measurement covariance relationship includes water quality monitoring noise and uncertainties transmitted through compensation, summation, and difference processing. When the confidence level of the flow direction determination at the reversal time is lower than the preset condition, the weighting effect of the corresponding difference channel in the inversion is reduced.
[0166] When pollution indicators include nonlinear responses, sedimentation-resuspended, or density flow effects, the pollutant transport relationship is locally linearized around the current forward transport trajectory, and the response sensitivity matrix is updated during the iteration process. For water quality indicators with different physical meanings, such as conservative conductivity and organic fluorescence, discharge quality inversion is performed separately, and the results are correlated by candidate discharge outlet locations and candidate discharge time slices, without directly adding different indicators. When the main candidate discharge outlets or discharge time periods obtained from different indicators are inconsistent, the result is used as an indication of mixed pollution sources or insufficient background response models. Discharge quality time series, response similarity, ranking stability, and verification playback error are used to guide unmanned surface vessel inspections, shoreline investigations, and sampling location selection. When the location results cannot distinguish between the main candidate discharge outlet and similar candidate discharge outlets, the ranking stability does not reach the threshold, or the verification playback error exceeds the threshold, the location results to be verified and candidate areas are output.
[0167] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of combined actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Secondly, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application. In the above embodiments, the descriptions of each embodiment have their own emphasis; for parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0168] Figure 8 A structural block diagram of an example pollution source tracing system based on flow field dynamics and adjoint matrix according to an embodiment of this application is shown.
[0169] like Figure 8 As shown, the pollution source tracing system 800 based on flow field dynamics and adjoint matrix includes a data preprocessing unit 810, a reversal pairing unit 820, an adjoint sensitivity unit 830, an adjoint matrix transformation unit 840, and a pollution source inversion unit 850.
[0170] The data preprocessing unit 810 is used to acquire water level data, cross-sectional flow data, water quality monitoring values and their monitoring locations, and candidate discharge outlets and their locations for the target river section during a pollution event. The pollution event period is divided into multiple candidate discharge time slices, and the pollution event period includes at least one flow direction reversal. The unit also acquires sensor memory kernels corresponding to the monitoring locations, whereby the sensor memory kernels characterize the time response relationship between pollutant concentration and the water quality monitoring values. The unit further corrects the cross-sectional flow data based on the water level data, constrained by the continuous relationship of water volume in the river section, to obtain the corrected flow rate.
[0171] The reversing pairing unit 820 is used to determine the reversing time of the flow direction based on the corrected flow rate, and to determine two pairing times when the cumulative water exchange volume before and after the reversing time is equal, based on the reversing time of the flow direction, and to extract the water quality monitoring values of the same monitoring location at the two pairing times to form a set of paired monitoring values.
[0172] The accompanying sensitivity unit 830 is used to use the time-reversed sensor memory core as the accompanying observation source for the corresponding monitoring location, perform accompanying calculations on the pollutant transport process based on the corrected flow rate and the accompanying observation source, and determine the response sensitivity of each candidate discharge outlet to the water quality monitoring value per unit discharge mass in each candidate discharge time slice according to the location of each candidate discharge outlet.
[0173] The adjoint matrix transformation unit 840 is used to construct an adjoint matrix based on the response sensitivity, where rows correspond one-to-one with the water quality monitoring values and columns correspond one-to-one with the combinations of each candidate discharge outlet and each candidate discharge time slice. The unit simultaneously sums and subtracts the corresponding two matrix rows in each pair of monitoring values and the adjoint matrix to obtain the summation observation vector, the difference observation vector, the summation adjoint matrix, and the difference adjoint matrix.
[0174] The pollution source inversion unit 850 is used to invert the emission quality of each candidate discharge outlet in each candidate emission time slice based on the summation observation vector, the difference observation vector, the summation adjoint matrix and the difference adjoint matrix, to obtain the emission quality time series of each candidate discharge outlet, and to determine the pollution source location and the corresponding emission period based on the emission quality time series.
[0175] In some embodiments, this application provides a non-volatile computer-readable storage medium storing one or more programs including execution instructions. The execution instructions can be read and executed by electronic devices (including but not limited to computers, servers, or network devices) to perform the steps of any of the pollution source tracing methods based on flow field dynamics and adjoint matrices described above.
[0176] In some embodiments, this application also provides a computer program product, the computer program product including a computer program stored on a non-volatile computer-readable storage medium, the computer program including program instructions, which, when executed by a computer, cause the computer to perform any of the steps of the pollution source tracing method based on flow field dynamics and adjoint matrix described above.
[0177] In some embodiments, this application also provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform steps of a pollution source tracing method based on flow field dynamics and adjoint matrix.
[0178] The above-described product can perform the methods provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects for performing the methods. Technical details not described in detail in this embodiment can be found in the methods provided in the embodiments of this application.
[0179] The electronic devices in this application can exist in various forms, including but not limited to: mobile communication devices, ultra-mobile personal computer devices, portable entertainment devices, or other airborne electronic devices with data interaction functions.
[0180] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0181] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0182] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A pollution source tracing method based on flow field dynamics and adjoint matrix, characterized in that, The method includes: The process involves acquiring water level data, cross-sectional flow data, water quality monitoring values and their monitoring locations, and candidate discharge outlets and their locations for the target river segment during a pollution event. The pollution event is divided into multiple candidate discharge time slices, including at least one flow direction reversal. A sensor memory core corresponding to the monitoring location is acquired, representing the time response relationship between pollutant concentration and the water quality monitoring value. The cross-sectional flow data is corrected based on the water level data, constrained by the continuous relationship of water volume in the river segment, to obtain the corrected flow rate. The flow direction reversal time is determined based on the corrected flow rate, and two paired times when the cumulative water exchange volume before and after the reversal time is equal are determined based on the flow direction reversal time. Water quality monitoring values at the same monitoring location at the two paired times are extracted to form a set of paired monitoring values. Using the time-reversed sensor memory core as the accompanying observation source for the corresponding monitoring location, the pollutant transport process is calculated based on the corrected flow rate and the accompanying observation source. Based on the location of each candidate discharge outlet, the response sensitivity of each candidate discharge outlet to the water quality monitoring value per unit discharge mass in each candidate discharge time slice is determined. Based on the response sensitivity, construct an adjoint matrix in which rows correspond one-to-one with the water quality monitoring values and columns correspond one-to-one with the combinations of each candidate discharge outlet and each candidate discharge time slice. Simultaneously sum and subtract the corresponding two matrix rows in each pair of monitoring values and the adjoint matrix to obtain the summation observation vector, the difference observation vector, the summation adjoint matrix, and the difference adjoint matrix. Based on the summation observation vector, the difference observation vector, the summation adjoint matrix, and the difference adjoint matrix, the emission quality of each candidate discharge outlet in each candidate emission time slice is inverted to obtain the emission quality time series of each candidate discharge outlet, and the pollution source location and corresponding emission period are determined according to the emission quality time series.
2. The method according to claim 1, characterized in that, The process of correcting the cross-sectional flow rate data based on the water level data, constrained by the continuous relationship of water volume in the river section, to obtain the corrected flow rate includes: Obtain at least one of the following: cross-sectional geometric data of the target river section, measurement accuracy of flow at each cross-section, gate switching records, and pump station start-up and shutdown records; and divide the target river section into multiple river section units. The rate of change of water storage in each river segment unit is determined based on the water level data and the cross-sectional geometric data. The local inflow or local outflow of each river segment unit is determined based on the acquired records. The net inflow of each river segment unit is determined based on the flow of adjacent cross sections in the cross-sectional flow data. The water volume continuity residual of each river segment unit is determined based on the net inflow, the rate of change of water storage, and the local inflow or local outflow; wherein the local inflow and the local outflow are respectively used as the inflow term and outflow term in the water volume continuity relationship of the corresponding river segment unit. The corresponding flow correction weight is determined based on the measurement accuracy of the flow rate at each cross-section, so that the flow correction weight increases when the measurement accuracy is improved. The flow rates of each cross section in the cross-sectional flow data are jointly adjusted. The deviation of the adjusted flow rate of each cross section relative to the corresponding flow rate in the cross-sectional flow data is constrained according to the flow correction weight. The continuous residual of water volume in each river segment unit is reduced, and the adjusted flow rate of each cross section is determined as the correction flow rate.
3. The method according to claim 2, characterized in that, The process involves determining the flow reversal time based on the corrected flow rate, and using the flow reversal time as a benchmark to determine two paired times when the cumulative water exchange volume before and after the reversal is equal. Water quality monitoring values from the same monitoring location at the two paired times are then extracted to form a set of paired monitoring values, including: For any of the monitoring locations, the corrected flow rate of the cross section where the monitoring location is located is obtained; when the corrected flow rate crosses from one side of a preset flow hysteresis interval containing zero flow rate to the other side, and the flow rate sign remains unchanged after crossing for a preset flow direction maintenance time, the moment when the corrected flow rate crosses the boundary of the other side of the preset flow hysteresis interval is determined as the flow direction reversal moment. From the start of monitoring, the corrected flow rate is accumulated over time according to the flow sign to obtain the signed cumulative water exchange volume. For at least one positive preset exchange volume, at each flow reversal time, the absolute value of the difference between the signed cumulative water exchange volume and the signed cumulative water exchange volume at the flow reversal time is determined to be equal to the time before and after the reversal of the same preset exchange volume. The time before and after the reversal time are determined as a pair of times, and the water quality monitoring values of the same monitoring location at the two pairs of times are extracted to form a pair of monitoring values.
4. The method according to claim 3, characterized in that, The step of acquiring the sensor memory core corresponding to the monitoring location includes: Acquire the water rinsing response or standard solution step response of the sensor corresponding to the monitoring location, determine the first response time scale and the second response time scale according to the response front and the recovery tail, and determine the proportion of the first response component according to the contribution of the response components corresponding to the first response time scale and the second response time scale to the water rinsing response or the standard solution step response. Based on the first response time scale, the second response time scale, and the proportion of the first response component, a normalized sensor memory core is constructed, which includes two time response components corresponding to the first response time scale and the second response time scale, respectively; the second response time scale is greater than the first response time scale, and the first response time scale, the second response time scale, and the proportion of the first response component constitute the sensor memory core parameters; The sensor memory core, which reverses time, serves as the accompanying observation source for the corresponding monitoring location. Based on the corrected flow rate and the accompanying observation source, the pollutant transport process is calculated, and according to the location of each candidate discharge outlet, the response sensitivity of each candidate discharge outlet to the water quality monitoring value per unit discharge mass in each candidate discharge time slot is determined, including: For any water quality monitoring value at any monitoring location at any monitoring time, the sensor memory core is applied to the monitoring location in a time-reverse relationship according to the response delay between the monitoring time and each calculation time preceding the monitoring time, thereby forming the accompanying observation source; Using the corrected flow rate as the time-varying convection condition for the pollutant transport process, and performing accompanying calculations based on the accompanying observation source, the accompanying field corresponding to the water quality monitoring value is obtained; The temporal distribution of unit discharge mass within each of the candidate discharge time slices is determined, and the response of the accompanying field at each of the candidate discharge outlets is time-aggregated based on the temporal distribution to obtain the response sensitivity of each candidate discharge outlet to the water quality monitoring value per unit discharge mass in each of the candidate discharge time slices.
5. The method according to claim 4, characterized in that, The process of constructing an adjoint matrix based on the response sensitivity, where rows correspond one-to-one with the water quality monitoring values and columns correspond one-to-one with the combinations of each candidate discharge outlet and each candidate discharge time slice, involves simultaneously summing and subtracting the rows of the paired monitoring values and the corresponding two matrices in each group of adjoint matrices to obtain a summed observation vector, a subtracted observation vector, a summed adjoint matrix, and a subtracted adjoint matrix, including: The response sensitivity is arranged according to the combination of the water quality monitoring values and the candidate discharge outlets and the candidate discharge time slices to construct the adjoint matrix; Based on the water level data, the cross-sectional geometric data, and the pairing times of each group, the change in the water flow area of the cross-section where the corresponding monitoring location is located is determined, and based on the change in the water flow area, the time interval of the pairing times, and the preset pollutant decay characteristics, the compensation relationship of the water quality response before and after the change is determined. According to the compensation relationship, the water quality monitoring value after the reversal and the corresponding matrix row in the paired monitoring value are compensated, and the summation and difference are synchronously calculated with the water quality monitoring value before the reversal and the corresponding matrix row to form the summation observation vector, the difference observation vector, the summation adjoint matrix and the difference adjoint matrix; Obtain background monitoring data characterizing background water quality and monitoring interference, and construct a background interference basis matrix; compensate the matrix rows corresponding to the pairing time according to the compensation relationship, and sum and subtract to form a summed background interference basis matrix and a subtracted background interference basis matrix; The measurement covariance matrix is determined based on the measurement uncertainty of each water quality monitoring value and the compensation, summation and difference processing. Within the weighted space defined by the measurement covariance matrix, based on the summed background interference basis matrix and the subtracted background interference basis matrix, a linear transformation to remove background response components is performed on the summed observation vector and the summed adjoint matrix, and the subtracted observation vector and the subtracted adjoint matrix, respectively, to obtain the background-removed summed observation vector, the background-removed subtracted observation vector, the background-removed summed adjoint matrix, and the background-removed subtracted adjoint matrix. Then, the measurement covariance matrix is transformed according to the linear transformation relationship to obtain the background-removed measurement covariance matrix.
6. The method according to claim 5, characterized in that, The process of inverting the emission quality of each candidate emission outlet in each candidate emission time slice based on the summed observation vector, the subtracted observation vector, the summed adjoint matrix, and the subtracted adjoint matrix to obtain the emission quality time series of each candidate emission outlet includes: By combining the background-removed summation observation vector with the background-removed difference observation vector, and the background-removed summation adjoint matrix with the background-removed difference adjoint matrix, the background-removed observation vector and the background-removed adjoint matrix are obtained respectively. Obtain the pipe head, corresponding river level, partial opening head loss, and status of check valve, gate, and pump for each candidate discharge outlet; determine the effective head of the discharge outlet by the difference between the pipe head and the partial opening head loss, and determine whether the discharge passage is open or closed based on the status of the check valve and the gate. Candidate discharge time slots that are open and meet either the condition that the pump is running or the effective head at the discharge outlet is higher than the river level are determined as permitted discharge time slots; candidate discharge time slots that are closed, or open, pump stopped, and effective head at the discharge outlet is lower than or equal to the river level are determined as prohibited discharge time slots. The emission quality of each candidate emission outlet in each candidate emission time slice is used as the quantity to be inverted, and a predicted response is formed based on the background removal adjoint matrix and the quantity to be inverted. Under the constraints that the quantity to be inverted simultaneously satisfies non-negativity, the allowed emission time slot does not exceed the preset emission quality upper limit, and the prohibited emission time slot is zero, the emission quality of each candidate emission outlet in each candidate emission time slot is determined by the selection conditions of jointly reducing the weighted difference between the predicted response and the background removal observation vector based on the background removal measurement covariance matrix, the total change of the quantity to be inverted in adjacent candidate emission time slots of the same candidate emission outlet, and the number of candidate emission outlets with at least one non-zero quantity to be inverted. The emission quality of the same candidate emission outlet is arranged in chronological order according to the candidate emission time slices to obtain the emission quality time series of each candidate emission outlet.
7. The method according to claim 6, characterized in that, The step of determining the location of the pollution source and the corresponding emission period based on the emission quality time series includes: Based on the background-removed measurement covariance matrix, the non-negative normalized correlation value of the corresponding response of any two candidate discharge outlets in the background-removed adjoint matrix under different combinations of candidate emission time slices is calculated, and the maximum value is taken as the response similarity of the two candidate discharge outlets. The cumulative emission mass of each candidate emission outlet is determined based on the emission mass time series; the inversion is repeated under the preset perturbation of the corrected flow rate, the sensor memory kernel parameters, and the measurement noise, and the frequency at which each candidate emission outlet has the largest cumulative emission mass is used as the ranking stability. At least one verification monitoring location is selected, and the water quality monitoring values of the remaining monitoring locations are used to re-invert the data. Based on the obtained discharge quality time series and the corrected flow rate for forward transport of pollutants, the playback water quality response of the verification monitoring location is obtained in conjunction with the sensor memory kernel. The verification playback error is determined based on the normalized difference between the playback water quality response and the water quality monitoring values of the verification monitoring location. The candidate discharge outlet with the largest cumulative emission mass is selected as the primary candidate discharge outlet, the location of the primary candidate discharge outlet is determined as the pollution source location, and the continuous candidate emission time slices in which the emission mass of the primary candidate discharge outlet reaches the preset emission identification threshold are determined as emission periods. Other candidate outlets whose response similarity to the main candidate outlet reaches a preset similarity threshold are identified as similar candidate outlets; when the number of similar candidate outlets is zero, the ranking stability of the main candidate outlet is greater than or equal to a preset stability threshold, and the verification playback error is less than or equal to a preset playback error threshold, the pollution source location is marked as a reliable location result. When the number of similar candidate discharge outlets is greater than zero, or the ranking stability of the main candidate discharge outlet is lower than the preset stability threshold, or the verification playback error exceeds the preset playback error threshold, the pollution source location is marked as a location result to be verified, and the candidate area is determined according to the respective locations of the main candidate discharge outlet, the similar candidate discharge outlet, and other candidate discharge outlets that become the ones with the largest cumulative emission mass in repeated inversion.
8. A pollution source tracing system based on flow field dynamics and adjoint matrix, characterized in that, The system includes: The data preprocessing unit is used to acquire water level data, cross-sectional flow data, water quality monitoring values and their monitoring locations, and candidate discharge outlets and their locations for the target river section during a pollution event. It also divides the pollution event period into multiple candidate discharge time slices, including at least one flow direction reversal. The unit acquires sensor memory kernels corresponding to the monitoring locations, where the sensor memory kernels characterize the time response relationship between pollutant concentrations and the water quality monitoring values. Finally, constrained by the continuous water volume relationship of the river section, it corrects the cross-sectional flow data based on the water level data to obtain the corrected flow rate. The reversal pairing unit is used to determine the reversal time of the flow direction based on the corrected flow rate, and to determine two pairing times when the cumulative water exchange volume before and after the reversal is equal based on the reversal time, and to extract the water quality monitoring values of the same monitoring location at the two pairing times to form a set of paired monitoring values. The accompanying sensitivity unit is used to use the time-reversed sensor memory core as the accompanying observation source for the corresponding monitoring location, perform accompanying calculations on the pollutant transport process based on the corrected flow rate and the accompanying observation source, and determine the response sensitivity of each candidate discharge outlet to the water quality monitoring value per unit discharge mass in each candidate discharge time slice according to the location of each candidate discharge outlet. The accompanying matrix transformation unit is used to construct an accompanying matrix based on the response sensitivity, where rows correspond one-to-one with the water quality monitoring values and columns correspond one-to-one with the combinations of each candidate discharge outlet and each candidate discharge time slice. The unit simultaneously sums and subtracts the corresponding two matrix rows in each pair of monitoring values and the accompanying matrix to obtain the summation observation vector, the difference observation vector, the summation accompanying matrix, and the difference accompanying matrix. The pollution source inversion unit is used to invert the emission quality of each candidate discharge outlet in each candidate emission time slice based on the summation observation vector, the difference observation vector, the summation adjoint matrix and the difference adjoint matrix, to obtain the emission quality time series of each candidate discharge outlet, and to determine the pollution source location and the corresponding emission period based on the emission quality time series.
9. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor, characterized in that the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of the method as described in any one of claims 1-7.
10. A storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1-7.
