A method for in-situ verification and compensation of sewer water quality data
Patent Information
- Application Number
- CN202611158343.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-16
AI Technical Summary
这种处理方式不仅无法有效区分管网真实的水质突变与井内局部释放引起的干扰,还会导致水质污染溯源方向偏离,最终造成管网运行监测数据的失真
Smart Images

Figure CN122925819A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically, to a method for in-situ verification and compensation of manhole water quality data. Background Technology
[0002] In urban drainage network online monitoring projects, water quality sensors are typically installed inside manholes to continuously acquire information on water quality changes at network nodes. Manholes generally have flow channels at the bottom to guide water flow, and a semi-enclosed local space is formed between the flange of the flow channel and the sidewall of the manhole chamber. During periods of low water levels, this space traps some slow-flowing, aging water, accompanied by the deposition of suspended particles and pollutants, gradually forming a water-stagnant wedge.
[0003] When the inflow of water from upstream increases and the water level rises, exceeding the flange of the flow channel, the main flow exerts a strong shearing and stripping effect on the stagnant water in the aforementioned space. This causes sediments and high-concentration aging water to be resuspended and preferentially enter the sampling sensitive zone of the sidewall water quality sensor. This localized mixing and release can cause significant spikes in sensor readings within a short period. In routine operation and data analysis, such data mutations caused by local boundary conditions are easily confused with actual upstream pollution source discharge events.
[0004] Existing data cleaning and preprocessing algorithms typically treat such spikes as routine instrument drift, equipment malfunction, or statistical outliers based solely on time series data, directly employing smoothing filters or global rejection without considering the triggering conditions of water levels crossing the channel flange. This approach not only fails to effectively distinguish between genuine water quality changes in the pipeline network and interference caused by localized releases from wells, but also leads to deviations in tracing the source of water pollution, ultimately distorting the pipeline network operation monitoring data. Summary of the Invention
[0005] In urban drainage network online monitoring projects, water quality sensors are typically installed inside manholes to continuously acquire information on water quality changes at network nodes. Manholes generally have flow channels at the bottom to guide water flow, and a semi-enclosed local space is formed between the flange of the flow channel and the sidewall of the manhole chamber. During periods of low water levels, this space traps some slow-flowing, aging water, accompanied by the deposition of suspended particles and pollutants, gradually forming a water-stagnant wedge.
[0006] When the inflow of water from upstream increases and the water level rises, exceeding the flange of the flow channel, the main flow exerts a strong shearing and stripping effect on the stagnant water in the aforementioned space. This causes sediments and high-concentration aging water to be resuspended and preferentially enter the sampling sensitive zone of the sidewall water quality sensor. This localized mixing and release can cause significant spikes in sensor readings within a short period. In routine operation and data analysis, such data mutations caused by local boundary conditions are easily confused with actual upstream pollution source discharge events.
[0007] Existing data cleaning and preprocessing algorithms typically treat such spikes as routine instrument drift, equipment malfunction, or statistical outliers based solely on time series data, directly employing smoothing filters or global rejection without considering the triggering conditions of water levels crossing the channel flange. This approach not only fails to effectively distinguish between genuine water quality changes in the pipeline network and interference caused by localized releases from wells, but also leads to deviations in tracing the source of water pollution, ultimately distorting the pipeline network operation monitoring data. Attached Figure Description
[0008] Figure 1 This is a flowchart of an in-situ verification and compensation method for manhole water quality data according to the present invention; Figure 2 This is a schematic diagram of the internal structure reference of the manhole and the planar layout of the water quality probe according to the present invention; Figure 3 This is a schematic diagram of the vertical installation position of the water quality probe and the cross-sectional view of the low-water-level stagnant wedge of the present invention. Detailed Implementation
[0009] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, features described in some examples may be combined in other examples.
[0010] like Figure 1 As shown, an in-situ verification and compensation method for manhole water quality data is applied to a drainage manhole including a bottom flume, manhole wall, rigid support, and water quality probe, comprising: Establish a local coordinate system and obtain the flange elevation, outlet pipe diameter, well chamber diameter, and horizontal distance of measuring points to generate a structural reference. The water quality probe is fixed on the rigid bracket, and the water quality probe is located in the wall-attached area outside the flange elevation. The original water quality, original water level and sampling time are continuously collected, and the process of immersion and receding when the original water level exceeds the flange elevation is extracted as the lip window. Perform time-domain denoising on the original water level and the original water quality to obtain a smoothed water level and smoothed water quality. Within the lip window, based on the structural reference, the smoothed water level, the smoothed water quality, and the sampling time, the release weight reflecting the degree of water body replacement and the trend water quality representing the background concentration of the pipeline network are calculated to obtain the compensated water quality; The released weights are used to distinguish between disturbed samples and normal samples. The disturbed samples are given the compensated water quality, and the normal samples are given the smoothed water quality. The compensated water quality and the smoothed water quality are written in the sampling order and a compensation sequence is generated. Output the final sequence after in-situ verification and compensation.
[0011] The in-situ verification and compensation method for manhole water quality data provided in this embodiment is applied to drainage manholes that include a bottom flow channel, manhole wall, rigid support, and water quality probe. This embodiment is only applicable to gravity flow drainage manholes; for pressure flow manholes, adaptation can be achieved through coefficient adjustment. The wall-attached area is the semi-enclosed region between the outer edge of the flow channel and the manhole wall. Its geometric boundary is defined as follows: in a local coordinate system with the lowest point of the outlet pipe as the origin, the main discharge direction of water as the positive X-axis, the horizontal direction perpendicular to the water flow direction as the positive Y-axis, and the vertical upward direction as the positive Z-axis, the X-axis direction covers the axial length of the entire manhole, and the Y-axis direction ranges from [missing information]. ,in The diameter of the outlet pipe. The net width of the well chamber in the Y-axis direction, within a circular well chamber. Equal to half the inner diameter of the well chamber, in square or rectangular well chambers The length of the well chamber is equal to the net side length of the well chamber in the Y-axis direction, in the horseshoe-shaped well chamber. It is equal to the net width of the cross-section where the probe is located in the Y-axis direction.
[0012] S201: The lowest point of the bottom of the water outlet pipe is taken as the local coordinate zero point.
[0013] The local coordinate zero point serves as a unified reference surface for all spatial parameters, eliminating calculation errors caused by differences in elevation references among different manholes. When multiple inlet and outlet pipes exist in a manhole, the downstream main outlet pipe is preferentially selected, i.e., the outlet pipe with the largest diameter and the water flow direction pointing downstream of the pipe network. The lowest point of the bottom of this outlet pipe is taken as the zero point. Before measurement, sediment at the outlet of the outlet pipe must be removed. If the bottom of the pipe is damaged, the lowest point of the undamaged area is taken. If the outlet pipe has a slope, the lowest point of the outlet section of the outlet pipe inside the manhole is taken. A level instrument with an accuracy of not less than 1mm is used to ensure the measurement accuracy of the zero point. The coordinate axes of the local coordinate system are defined as follows: the positive direction of the X-axis is consistent with the main water flow direction; the positive direction of the Y-axis is horizontal and perpendicular to the X-axis, pointing to the side of the wall; and the positive direction of the Z-axis is vertically upward.
[0014] When multiple symmetrically distributed wall-attached zones exist in a manhole, the zone with the lower water flow scouring intensity should be selected as the monitoring area, with the positive Y-axis pointing towards this selected zone. If multiple lowest points exist at the bottom of the outlet pipe, the lowest point closest to the center of the manhole should be taken as the local coordinate zero point. The level instrument must be set up at least 1 meter away from the edge of the manhole, and horizontal calibration must be performed after setup, with a calibration error not exceeding 1 millimeter. Surveyors must wear safety protective equipment, and warning signs should be placed at the manhole opening to prevent falls.
[0015] S202: Identify the channel centerline along the water flow direction, and use the elevation of the water-land boundary line where the water first enters the wall-attached area as the flange elevation. .
[0016] The method for measuring the centerline of the channel is as follows: A measuring point is taken at every 10 cm interval along the water flow direction at the bottom of the channel, for a total of no less than 10 measuring points. The centerline is obtained by fitting a cubic spline curve. If the channel is worn, measuring points in the unworn area are selected for fitting. If there is sediment in the channel, the sediment is removed before measuring. The flange elevation is measured using a field water injection test. Before the test, the water in the well chamber is emptied, and water is injected into the well chamber at a constant rate of 0.5 cm / min. The water level is observed every 10 seconds. When the water flow first crosses the channel flange and enters the wall-attached area, the water level elevation at this point is recorded. This test is repeated three times, and the average of the three measurements is taken as the flange elevation. If the deviation of the three results exceeds 1 cm, the test is repeated. The unit of flange elevation is meters, and the value ranges from 0 to 10 meters. It is the critical elevation parameter for determining whether the water-stagnant wedge is activated.
[0017] If the flume has bends, add a measuring point every 5 cm at the bend to ensure the accuracy of curve fitting. The water level observation point for the water injection test is set at the intersection of the flume's centerline and the flange, using a water level gauge with an accuracy of at least 1 mm. The criterion for the water flow to first enter the wall-attached zone is the observation of three consecutive drops of water entering the wall-attached zone and forming a stable flow path. If the deviation of the results from three water injection tests exceeds 1 cm, check the flume for damage or incomplete removal of sediment; after repair, repeat the test.
[0018] S203: Obtain the inner diameter of the pipe parallel to the main discharge direction of the monitored water flow as the outlet pipe diameter. .
[0019] The outlet pipe diameter is measured at the outlet section of the outlet pipe within the manhole. If the pipe exhibits ellipticity, the average of the major and minor axes is taken as the outlet pipe diameter. If the scale thickness on the inner wall of the pipe exceeds 5mm, the actual inner diameter of the pipe is measured using an endoscope, and the outlet pipe diameter is obtained after deducting the scale thickness. The method for measuring the outlet pipe diameter is consistent for both gravity flow and pressure flow manholes; subsequent coefficients will be adaptively adjusted under pressure flow conditions. The measurement accuracy of the outlet pipe diameter is no less than 1mm, expressed in meters, with a range of 0.1 meters to 2 meters. This value is used to define the mainstream shear thickness threshold and limit the installation location range of the water quality probe.
[0020] If the outlet pipe has multiple diameter changes, select the complete pipe section closest to the well outlet as the measurement section. During endoscopic measurement, insert the endoscope into the outlet pipe to a depth of 1 meter, take a clear image of the pipe cross-section, and measure the actual inner diameter of the pipe using image analysis software. If the scale thickness on the inner wall of the pipe is uneven, select 8 measurement points evenly in the circumferential direction and take the average value as the scale thickness.
[0021] S204: Obtain the net inner diameter of the well chamber at the cross-section where the water quality probe is located as the inner diameter of the well chamber. .
[0022] For circular well chambers, the inner diameter is the net diameter of the well chamber within the cross-section where the probe is located, excluding the chamber wall thickness. For square well chambers, the inner diameter is twice the net side length of the well chamber along the Y-axis of the cross-section where the probe is located. For rectangular well chambers, the inner diameter is twice the net side length of the well chamber along the Y-axis of the cross-section where the probe is located. For horseshoe-shaped well chambers, the inner diameter is twice the net width of the well chamber along the Y-axis of the cross-section where the probe is located. The measurement cross-section must be perpendicular to the centerline of the outlet pipe, with a maximum allowable deviation of 1 degree. If there are protrusions such as ladders or branch pipe interfaces on the well chamber wall, the thickness of the protrusions should be deducted during measurement to obtain the net inner diameter. The measurement accuracy of the inner diameter of the well chamber should not be less than 1 mm, and the unit is meters, with a range of 0.3 meters to 3 meters, used to calculate the lateral space range of the wall-attached area.
[0023] If the well chamber has an irregular cross-section, at the probe's center elevation, select five evenly spaced measurement points along the Y-axis to measure the distance between the well chamber walls, and take the average value as the net width of the well chamber along the Y-axis. The measurement height of the well chamber's inner diameter must be consistent with the center elevation of the water quality probe. If there are obstacles at the probe's center elevation, an unobstructed section can be selected within 10 cm above and below it for measurement, and the measurement height must be marked on the measurement results.
[0024] S205: Measure the horizontal orthogonal distance from the center of the water quality probe to the centerline of the flow channel as the horizontal distance of the measuring point. .
[0025] The center of the water quality probe refers to the physical center of the probe's sensitive element, not the geometric center of the probe housing. When the channel centerline is curved, the vertical distance from the projection of the probe center onto the horizontal plane to the nearest point on the channel centerline is taken as the horizontal distance of the measuring point. The measurement plane is the horizontal plane where the water quality probe center is located. If the probe is installed at an angle, the probe center is first projected onto this horizontal plane before distance calculation. The measurement accuracy of the horizontal distance is not less than 1 mm, and the unit is meters, with a range of 0.01 meters to 1 meter, used to characterize the relative position of the water quality probe within the wall-attached area.
[0026] If the water quality probe contains multiple sensing elements, the geometric center of all sensing elements should be taken as the probe center. The horizontal distance between measurement points should be measured using a laser rangefinder with an accuracy of at least 1 mm. During measurement, the laser rangefinder should be placed horizontally, ensuring the measurement direction is perpendicular to the centerline of the flow channel. If there is insufficient light inside the well, auxiliary lighting equipment should be used to ensure the measurement points are clearly visible.
[0027] S206: Adjusting the flange elevation , outlet pipe diameter , well indoor diameter horizontal distance from measuring point The spatial parameters are unified to the local coordinate zero point and recorded as the structural reference.
[0028] All elevation parameters under the original elevation datum are subtracted from the elevation value of the local coordinate zero point under the original elevation datum to obtain the elevation value in the local coordinate system. All planar parameters under the original planar coordinate system are transformed to a local planar coordinate system with the zero point as the origin and the X-axis as the direction of water flow. The structural datum is stored in JSON format, containing the values of all spatial parameters, measurement time, and measurement personnel information. When the manhole is modified, or the sediment thickness changes by more than 5 mm, the structural datum is remeasured, and the stored parameters are updated.
[0029] The structural reference is stored in the on-site data acquisition terminal next to the manhole and backed up to the cloud server.
[0030] S301: Anchor the lower end of the rigid support to the well chamber wall.
[0031] The rigid support adopts a cantilever structure, with the main body being a 30mm×30mm 304 stainless steel square tube with a wall thickness of 2mm. The cantilever length does not exceed 30cm, ensuring that the deformation under maximum water flow impact does not exceed 1mm. The lower end of the support is anchored with two M10 expansion bolts, with an anchoring depth of not less than 80mm and a pull-out force of not less than 500N for each bolt. The support surface is coated with an epoxy resin anti-corrosion coating with a thickness of not less than 80μm, achieving a corrosion resistance level of C5-M, meeting the corrosion requirements of wastewater environments. After installation, the verticality and horizontality of the support are checked, with a maximum allowable deviation of 1 degree.
[0032] If the well chamber wall is a brick structure, chemical anchors should be used instead of expansion bolts for anchoring. The drilling diameter for the chemical anchors is 12 mm, and the drilling depth is 100 mm. After injecting the chemical agent, wait 24 hours for it to fully cure before installing the support. After the support is installed, use a tensile tester to test the tensile strength of each anchor point. The test tensile strength should not be less than 300 N. Only after passing the test can the water quality probe be installed.
[0033] S302: Based on flange elevation Based on the standard, using the outlet pipe diameter As a scale, the center elevation of the water quality probe is... Limited to the vertical influence zone capable of capturing the water released by the water-trapping wedge, such that it satisfies: ; This is the flange elevation, in meters, ranging from 0 to 10 meters. The value is the diameter of the outlet pipe, in meters, ranging from 0.1 to 2 meters. This represents the center elevation of the water quality probe, in meters, ranging from 0 to 10 meters. The vertical range coefficients of 0.10 and 0.20 are applicable to gravity flow pipes with slopes from 0.001 to 0.05, when the total depth of the manhole is less than... At this time, install the probe 10cm above the bottom of the well. For pressure flow pipelines, adjust the vertical range as follows: ; The measurement accuracy of the probe center elevation is no less than 1mm. This range covers the main diffusion area of the water released by the water-retaining wedge, ensuring that it can effectively capture the interfering water released locally, while avoiding the inability to accurately monitor the mainstream water quality due to installation that is too high or too low.
[0034] The probe center elevation is measured using a steel tape measure with an accuracy of at least 1 mm. During measurement, the zero mark end of the steel tape measure is fixed at the lowest point of the bottom of the water outlet pipe, and the tape measure is pulled vertically upwards to the probe center position to read the value. If there is water in the well, the water should be pumped out before measurement. If the water cannot be pumped out, an ultrasonic depth sounder is used to measure the distance from the probe center to the water surface, and the probe center elevation is calculated by combining the water surface elevation.
[0035] S303: Place the horizontal projection of the water quality probe center between the center line of the flow channel and the well chamber wall, and adjust according to the outlet pipe diameter. With well chamber diameter Lateral expansion space constraint measurement point horizontal distance This ensures that the water quality probe is positioned within the wall-attached area and satisfies the following conditions: ; The value is the diameter of the outlet pipe, in meters, ranging from 0.1 to 2 meters. The horizontal distance between the measuring points is measured in meters, and the value ranges from 0.01 to 1 meter. This refers to the inner diameter of the manhole, in meters, ranging from 0.3 to 3 meters. The horizontal range coefficient of 0.15 applies to manholes and pipes of conventional proportions. At this time, install the probe at the middle position in the Y-axis direction, and take the horizontal distance of the measuring point as... If there are obstructions on the well chamber wall, the probe position in the X-axis direction can be adjusted, while the horizontal distance between measuring points in the Y-axis direction remains unchanged. The measurement accuracy of the horizontal distance between measuring points should not be less than 1mm. This horizontal range limits the installation position of the water quality probe in the wall-attached area, avoiding excessive interference from the main flow due to being too close to the center line of the flow channel, or obstructing water flow and causing sediment adhesion due to being too close to the well chamber wall.
[0036] If the well chamber wall has branch pipe interfaces that result in insufficient space in the wall-mounted area, the probe can be moved upstream of the outlet pipe along the X-axis, with a moving distance not exceeding 50 cm, while maintaining the horizontal distance of the measuring point along the Y-axis. The distance between the probe's installation position along the X-axis and the outlet of the outlet pipe should be between 20 cm and 100 cm to avoid disturbing the water flow due to excessive proximity to the outlet.
[0037] S304: Adjust the orientation of the water quality probe to avoid the water-facing side and face the downstream oblique direction of the water flow in the well bottom channel.
[0038] The probe orientation is defined as follows: the horizontal angle between the probe and the main water flow direction is 30 to 60 degrees, and the vertical angle between the probe and the horizontal plane is 5 to 15 degrees downwards. When the water flow direction is unclear, a tracer test is used to determine it. A small amount of salt solution is injected into the well chamber, and the concentration change at different locations is observed to determine the main water flow direction. The water-facing surface is the probe surface that is directly impacted by the water flow. Adjusting the orientation so that the sensitive surface of the probe avoids this direction reduces measurement noise caused by water flow impact. The allowable deviation of the probe orientation is 5 degrees. This orientation can reduce wear or clogging caused by suspended particles directly impacting the probe surface, extending the probe's service life.
[0039] The probe orientation is measured using an angle gauge with an accuracy of at least 1 degree. When measuring horizontal angles, the reference edge of the angle gauge is aligned with the main discharge direction of the water flow. When measuring vertical angles, the reference edge of the angle gauge is parallel to the horizontal plane. If the water flow direction changes with the seasons, the tracer test is repeated every quarter to adjust the probe orientation.
[0040] S401: Under the same clock reference, according to the set sampling interval Simultaneous collection of raw water quality Original water level and sampling time .
[0041] Clock synchronization is achieved by using the NTP network time protocol when a network signal is available in the well chamber, and by using a GPS module when no network signal is available. Clock calibration is performed every 24 hours, or a local high-precision RTC clock is used and calibrated monthly to ensure that the time synchronization error does not exceed 10% of the sampling interval. Due to the difference in response time between the water quality sensor and the water level sensor, the water quality data is aligned with the corresponding time delay based on the sensor's factory calibration parameters to eliminate errors caused by the response time difference. The sampling interval is set according to the water quality parameters: 60 seconds for chemical oxygen demand, 30 seconds for ammonia nitrogen, and 60 seconds for total phosphorus. Sampling data is checked using CRC32 to ensure data integrity. If data verification fails, a retransmission mechanism is triggered, with a sliding window size of 5. The water level measurement reference is the local coordinate zero point to ensure consistency between the water level data and the structural reference. is the sequence number at the sampling time, which is a positive integer. For the first The original water quality at any given time may include the concentration values of water quality parameters such as chemical oxygen demand, ammonia nitrogen, and total phosphorus, with units determined according to the specific parameters, such as milligrams per liter. The initial water level at time v is expressed in meters. For the first The sampling time at any given moment is recorded using a standard time format.
[0042] The local RTC clock calibration method involves connecting the data acquisition terminal to a standard time source, manually inputting the current standard time, and ensuring the clock error does not exceed 1 second after calibration. The response time difference compensation step involves delaying the timestamp of the water quality data by the corresponding response time based on the response time parameters in the sensor manual, ensuring synchronization with the water level data. If the CRC32 check fails, three retransmissions are triggered. If all three retransmissions fail, the data is marked as lost.
[0043] S402: Filter the original water level from the time series data At the wing edge elevation The following moments As the starting point of the lip crossing, the marker indicates that the water-stagnant wedge is in an inactive state, i.e., it satisfies: ; This represents the original water level corresponding to the starting point of the lip, in meters. The elevation is the flange elevation, in meters. To avoid misjudgments caused by water level fluctuations, anti-jitter rules are set: when the sampling interval is 1 second, 10 consecutive sampling points below the flange elevation are required to determine a breach start point; when the sampling interval is 5 seconds, 5 consecutive sampling points are required; and when the sampling interval is 1 minute, 3 consecutive sampling points are required. If the interval between adjacent breach events is less than 10 minutes, the two breach windows are merged into one; if the interval is greater than 10 minutes, they are split into independent breach windows. If there are missing water level data, if the number of missing points is no more than 3, linear interpolation is used to complete the data before judgment; if the number of missing points is more than 3, the breach start point judgment for that data segment is skipped. The sampling time corresponding to the starting point of the lip is when the water level is lower than the flange elevation. The water wedge is closed in the wall-attached area and does not mix with the mainstream. At this time, the water quality probe reading is not affected by local release and represents the background water quality of the pipeline network.
[0044] If the water level fluctuates repeatedly around the flange elevation beyond the anti-shake count, the determination of the lip-crossing start point is paused and restarted after the water level stabilizes. If the interval between two lip-crossing windows is less than 5 minutes, the two windows are merged into one. The merged lip-crossing start point becomes the start point of the first lip-crossing window, and the lip-crossing end point becomes the end point of the second lip-crossing window. If more than 3 data points are missing, the data segment is marked as invalid, and lip-crossing window extraction and compensation are not performed.
[0045] S403: Continuous sampling from the starting point of the lip, utilizing the outlet pipe diameter. Define the mainstream shear thickness threshold and the original water level The moment when the mainstream shear thickness threshold is exceeded As the endpoint of the lip, the release of the water-retaining wedge is marked as complete, i.e., satisfying: ; This represents the original water level corresponding to the end point of the lip crossing, in meters. This is the flange elevation, in meters. The outlet pipe diameter is in meters. A mainstream shear thickness threshold coefficient of 0.35 is applicable to gravity flow pipes with a slope of 0.001 to 0.05 and a roughness coefficient of 0.013. If sediment is present in the pipe, the sediment thickness is... The threshold is then adjusted as follows: ; To avoid misjudgments caused by water level fluctuations, three consecutive sampling points must exceed the threshold before a breach is considered the end point. The breach detection is only triggered when the water level is rising; it is not triggered during a drop in water level to avoid incorrect compensation. When the water level reaches full capacity, the breach detection process is skipped without compensation. The sampling time corresponding to the end point of the lip is defined as follows: when the water level exceeds this threshold, the mainstream completely covers the wall area, the aging water in the stagnant wedge has been completely replaced, and the local release interference disappears.
[0046] If the water level rises to the mainstream shear thickness threshold and then drops, and the drop is less than 5 cm, the determination of the lip-over endpoint continues. If the drop exceeds 5 cm, the determination of the lip-over starting point restarts. The criterion for a full-pipe state is that the water level reaches the top elevation of the outlet pipe for more than 1 minute. Sediment thickness is measured using a measuring rod with an accuracy of not less than 1 cm. Three measurements are taken at the centerline of the channel and in the wall-attached area, and the average value is taken as the sediment thickness.
[0047] S404: The starting point and ending point of the lip crossing, together with several consecutive sampling points extending from the boundary, are used to form the lip crossing window.
[0048] The number of sampling points extending beyond the boundary is set according to the sampling interval. When the sampling interval is 1 second, 5 consecutive sampling points are extended; when the sampling interval is 5 seconds, 3 consecutive sampling points are extended; and when the sampling interval is 1 minute, 1 consecutive sampling point is extended. These extended sampling points are included in the compensation calculation range to ensure a smooth transition of data at the boundary. If two lip windows overlap, they are merged into one. If the length of a lip window is less than 10 sampling points, the compensation processing for that lip window is skipped. The lip window encompasses the entire process of water wedge activation, release, and replacement; water quality data verification and compensation processing are only performed within this timeframe.
[0049] If the length of the lip-over window is less than 10 sampling points, the lip-over window is marked as invalid and no compensation is performed. The boundary extension sampling points are the corresponding number of sampling points before the lip-over start point and after the lip-over end point. The release weight of the overlapping part of the lip-over windows is the larger value between the calculation results of the two lip-over windows.
[0050] S501: The weighted moving average algorithm is used to analyze the original water level. and original water quality Perform temporal denoising to obtain a smooth water level. and smooth water quality : ; ; The original water level at the previous sampling time is expressed in meters. This represents the original water level at the current sampling time, in meters. This represents the original water level at the next sampling time, in meters. For the first The smooth water level at any given time, in meters. The original water quality at the previous sampling time, in units of... Consistent. The original water quality at the current sampling time, in units of... Consistent. The original water quality at the next sampling time, in units of... Consistent. For the first Smooth water quality at any time, unit and Consistency is maintained. Before smoothing, the 3σ criterion is used to remove outliers exceeding three standard deviations. When the noise level exceeds 10%, the sliding window size is adjusted to 5, and the corresponding weighting coefficient is used for smoothing. For the first two points of the time series data, forward weighting is used, with the first point taking the original value and the second point using a 3-point weighting. For the last two points of the time series data, backward weighting is used, with the last point taking the original value and the penultimate point using a 3-point weighting. This weighted moving average algorithm uses a center-weighted approach, assigning higher weight to the data at the current time, preserving the trend characteristics of the data while removing high-frequency noise, and avoiding the loss of true water quality change information due to over-smoothing.
[0051] The 3σ criterion is calculated as follows: The mean and standard deviation of the most recent 20 sampling points are calculated. Points exceeding the mean plus or minus three times the standard deviation are identified as outliers. After outliers are removed, the data for each point is completed using linear interpolation between the two preceding and following normal points. The noise level is measured by the ratio of the standard deviation to the mean of the most recent 20 sampling points. When the ratio exceeds 10%, it is considered a high noise level, and the sliding window size is adjusted to 5.
[0052] S502: Based on smooth water level Crossing the wing edge elevation Submersion depth and outlet pipe diameter The ratio is normalized and limited to obtain the immersion coefficient. : ; For the first The smooth water level at any given time, in meters. This is the flange elevation, in meters. This refers to the diameter of the water outlet pipe, in meters. For the first The submersion coefficient at any given time is a dimensionless parameter, ranging from 0 to 1. When the water level exceeds... Subsequently, if this state persists for more than 10 minutes, the submersion coefficient decreases by 0.1 every 10 minutes until it reaches 0, thus avoiding overcompensation under high water levels. hour, This indicates that the area adhering to the wall is not submerged and the water-retaining wedge is not activated. When hour, It increases linearly with flooding depth. When And before the decay time is reached, This indicates that the area attached to the wall is completely submerged. The submersion coefficient characterizes the degree to which the area attached to the wall is submerged by the mainstream.
[0053] The trigger condition for the decay of the submersion coefficient is that the water level stabilizes at a certain level. Add water at least 0.35 times the outlet pipe diameter for more than 10 minutes. After the submersion coefficient decays to 0, if the water level continues to rise, the submersion coefficient remains 0; if the water level drops to... For pipe diameters below 0.35, recalculate the immersion coefficient according to the formula.
[0054] S503: Calculate the rate of change of the smoothed water level between adjacent time points to obtain the water level variability. : ; For the first The smooth water level at any given time, in meters. This represents the smoothed water level at the previous sampling time, in meters. The sampling interval is in seconds. For the first The water level variability at any given time is expressed in meters per second (m / s) and ranges from 0 to 0.1. The water level variability is calculated only when the water level is rising; it is set to 0 during a drop to avoid incorrect compensation. The water level variability characterizes the rate of water level rise; a larger variability indicates a faster flow velocity and a stronger shearing impact on the water-stuck wedge.
[0055] If the water level difference between two adjacent sampling points is 0, the water level variability is set to 0. If a brief drop occurs during the water level rise, and the drop does not exceed 1 cm and the duration does not exceed 2 sampling intervals, it is still considered a water level rise process, and the water level variability is taken as the average value of the rise phase.
[0056] S504: Water level variability Based on the outlet pipe diameter By comparing the calculated reference variability, the sweep coefficient characterizing the intensity of water flow impact is obtained. : ; For the first The rate of change of water level at any given time, expressed in meters per second. This refers to the diameter of the water outlet pipe, in meters. The sampling interval is in seconds. The coefficient 12 in the formula applies to gravity flow pipes with a roughness coefficient of 0.013 and a slope of 0.003. When the pipe roughness coefficient is... When, the coefficient is adjusted to When the slope of the pipe is When, the coefficient is adjusted to When the water level variability exceeds 0.1 m / s, the sweeping coefficient is limited to 1. For the first The sweep coefficient at time t is a dimensionless parameter, ranging from 0 to 1. The reference variability is the baseline water level variability calculated based on empirical values of the full-pipe flow velocity in the drainage pipeline. The sweep coefficient characterizes the sweeping impact intensity of the mainstream on the stagnant wedge; when the water level variability is 0, This indicates no sweeping effect when the water level variability is much greater than the reference variability. A value close to 1 indicates an extremely strong sweeping effect.
[0057] The roughness coefficient and slope of the pipeline are preferably obtained from the pipeline network design drawings. If no design drawings are available, they are obtained through on-site measurement. The roughness coefficient is calculated by measuring the roughness of the inner wall of the pipeline, and the slope is calculated by measuring the elevation difference and length at both ends of the pipeline. After adjusting the coefficients, historical data is used for verification. If the interference elimination rate of the compensation effect is less than 0.7, the coefficients are readjusted.
[0058] S505: Based on twice the horizontal distance of the measuring point Inside diameter of well With the diameter of the water outlet pipe The proportion of the difference is normalized and limited to obtain the adhesion coefficient of the water quality probe. : ; The horizontal distance between the measuring points is in meters. The inner diameter of the well is in meters. This refers to the outlet pipe diameter, in meters. For non-circular well chambers, The value is twice the net width of the well chamber in the Y-axis direction to ensure the formula's universality. If the probe is located outside the wall-attachment zone, the wall-attachment coefficient is taken as 0. If the well chamber wall is irregular, the ratio of the distance from the probe to the center line of the flow channel to the distance to the well chamber wall is used for calculation. is the adhesion coefficient of the water quality probe, a dimensionless parameter ranging from 0 to 1. When hour, This indicates that the water quality probe is located on the center line of the flow channel. hour, This indicates that the water quality probe is in close contact with the well chamber wall. The wall contact coefficient characterizes the degree to which the water quality probe is close to the well chamber wall; the larger the wall contact coefficient, the greater the degree of interference from the release of the water-retaining wedge.
[0059] If a protrusion on the well chamber wall causes a change in the width of the wall-attached zone, the width of the wall-attached zone at the location of the protrusion should be reduced by the thickness of the protrusion. If the probe is located outside the wall-attached zone, the probe's installation position needs to be readjusted to allow it to enter the wall-attached zone. If this cannot be done, the monitoring point should be marked as an invalid monitoring point.
[0060] S506: Coupling Immersion Coefficient Sweep coefficient Adhesion coefficient Calculate release weight : ; For the first The immersion coefficient at time t is a dimensionless parameter. For the first The sweep coefficient at time t is a dimensionless parameter. denoted as the adhesion coefficient of the water quality probe, and denoted as a dimensionless parameter. If the calculated release weight is greater than 1, its amplitude is limited to 1. This product coupling method has been experimentally verified and can accurately characterize the interference level under the combined effect of three factors. For the first The release weight at any given time is a dimensionless parameter, ranging from 0 to 1. The release weight comprehensively characterizes the degree of interference between the water released from the water wedge and the water quality probe readings. When there is no local interference, The larger the value, the higher the degree of local interference.
[0061] If the release weight is greater than 1, first check whether the measurement of the structural reference parameters is correct, especially the flange elevation, outlet pipe diameter and measuring point horizontal distance. If the parameter measurement is incorrect, remeasure and calculate the release weight. If the parameter measurement is correct, limit the release weight to 1.
[0062] S507: Based on the smooth water quality at both ends of the lip window in an inactive state, time-domain interpolation is performed to reconstruct the trend water quality representing the background concentration of the pipe network. : First, determine the rate of change of water quality at both ends of the transverse lip window. If the rate of change is less than 0.1 mg / L / min, use linear interpolation. ; If the rate of change is greater than 0.1 mg / L / min, cubic spline interpolation is used to reconstruct the nonlinear trend water quality by combining undisturbed data before and after the lip window. Simultaneously, abrupt changes in water quality within the lip window are detected; when the rate of change in smoothed water quality exceeds 1 mg / L / min, that point is marked as a true pollution point, and no further compensation is performed. If water quality data is missing at both ends of the lip window, interpolation is performed using adjacent undisturbed water quality data. For the smooth water quality corresponding to the starting point of the lip, the unit is... Consistent. For the first The sampling time at any given moment. The sampling time corresponds to the starting point of the lip. This represents the sampling time corresponding to the end point of the lip crossing. For the smooth water quality corresponding to the endpoint of the lip, the unit is... Consistent. For the first Water quality trend over time, in units of Consistent. This interpolation method reconstructs the background water quality change trend of the entire pipe network within the lip window based on undisturbed water quality data at both ends of the lip window, eliminating the influence of local release interference, and can distinguish between local release interference and actual pollution source emissions.
[0063] The steps for cubic spline interpolation are as follows: select five undisturbed, smooth water quality data points before and after the lip window; fit the water quality change curve using a cubic spline function; and calculate the trend water quality at each time point within the lip window based on the curve. When both real pollution points and localized release disturbances exist simultaneously, if the water quality change rate exceeds 2 mg / L / min and the duration exceeds five sampling intervals, it is determined to be a real pollution event, and no compensation is performed.
[0064] S508: Utilizing the release weight Stripping smooth water quality Deviation from trend water quality The local disturbance amount is used to derive the compensation water quality. : ; For the first Smooth water quality at any time, unit and Consistent. For the first The release weight at time step is a dimensionless parameter. For the first Water quality trend over time, in units of Consistent. If the calculated compensation water quality is negative, correct it to 0. The compensation water quality is rounded to three decimal places to ensure data accuracy. This represents the deviation of the smoothed water quality from the trend water quality, i.e., the disturbance caused by local release. The disturbance is weighted and stripped using release weights to obtain the compensated water quality after eliminating local structural disturbances. When... hour, This indicates that no compensation is required when hour, This indicates that the compensation is based entirely on trend-based water quality.
[0065] If the compensation water quality is negative, first check if the trend water quality reconstruction is correct. If the trend water quality reconstruction is incorrect, reselect the interpolation point and reconstruct. If the trend water quality reconstruction is correct, correct the compensation water quality to 0.
[0066] S601: Within the cross-lip window, the weight will be released. Samples with values greater than zero are identified as disturbed samples and their weights will be released. Samples with a value of zero are considered normal samples.
[0067] The threshold for determining the release weight is set based on water quality parameters: 0.05 for chemical oxygen demand (COD), 0.03 for ammonia nitrogen, and 0.04 for total phosphorus. When the release weight is greater than the threshold, the sample is considered disturbed; when the release weight is less than or equal to the threshold, it is considered normal, avoiding unnecessary compensation due to extremely small release weights. A disturbed sample indicates the presence of localized release interference at that moment, causing the water quality reading to deviate from the true background value of the pipe network. A normal sample indicates the absence of localized interference at that moment, and the water quality reading accurately reflects the water quality status of the pipe network.
[0068] The thresholds for different water quality parameters are derived from a large amount of field test data and can be adjusted according to local water quality characteristics and monitoring needs, with the adjustment range not exceeding 50% of the original threshold. If the release weight fluctuates around the threshold, a lag threshold method is used. When the release weight exceeds 1.2 times the threshold, it is determined to be a disturbed sample, and when the release weight is less than 0.8 times the threshold, it is determined to be a normal sample.
[0069] S602: Apply compensatory water quality to the disturbed sample after eliminating local structural interference. To impart smooth water quality to normal samples while maintaining the original characteristics of the pipe network , as the sample output value.
[0070] If the rate of change in water quality exceeds 1 mg / L / min before smoothing, no smoothing is performed; the original water quality data is retained directly to avoid the loss of genuine pollution spikes due to smoothing. This processing method only compensates for the disturbed samples, retaining the original smoothed data of normal samples. This eliminates false spikes caused by local releases while fully preserving the true gradual and abrupt changes in water quality within the pipe network.
[0071] The distinction between true pollution spikes and instrument noise spikes is as follows: a true pollution spike lasts for more than three sampling intervals and shows a clear gradual change in water quality before and after it; an instrument noise spike lasts for no more than two sampling intervals and shows no significant change in water quality before and after it. Raw data is retained only if the water quality change rate exceeds 1 mg / L / min and is therefore classified as a true pollution spike.
[0072] S603: Compensation for water quality The original timestamps of the sample output values are preserved, written into the same data sequence in the sampling order, and the endpoints are kept equal to the smooth water quality at the lip window boundary.
[0073] Preserving the original timestamps ensures the temporal consistency of the data. At the boundary of the window lip, two points before and after the endpoint are weighted and smoothed to ensure a smooth transition of data at the boundary and avoid data jumps. The sampling points outside the boundary have their weights reduced to 0, thus outputting smooth water quality data. If there is overlap in the window lip, the data at the boundary is merged to ensure data continuity.
[0074] The weighted smoothing at the boundary uses a 3-point weighted average with weights of 0.25, 0.5, and 0.25 respectively. That is, the weight of the current point is 0.5, and the weights of the two points before and after it are each 0.25. The criterion for judging a data jump at the boundary is that the difference in water quality between two adjacent points exceeds three times the average difference of the previous 10 points.
[0075] S604: Reassemble the data sequence after it has been written according to the sampling interval to generate a single-column compensation sequence.
[0076] If the original data contains missing sampling points, linear interpolation is used to complete the data if there are no more than 5 missing points; otherwise, the data is marked as missing. If duplicate timestamps exist, the average of multiple samples is taken as the output value for that time point. The compensation sequence is stored in CSV format, containing fields such as timestamp, water quality value, release weight, and sample marker. For multi-parameter water quality monitoring, the compensation sequence for each parameter is stored separately and then merged into a single file. Recombining the data according to the sampling interval ensures that the time interval of the compensation sequence is consistent with the original sampling interval.
[0077] The specific steps for missing point interpolation are as follows: take the water quality values of two normal points before and after the missing point, and perform linear interpolation according to the time ratio. The priority for handling duplicate timestamps is to retain the data that was successfully verified first; if multiple data points are successfully verified, the average value is taken. The first column of the merged file is the timestamp, and the subsequent columns are, in order, the compensation water quality for different water quality parameters, the release weight, and the sample marker bit.
[0078] S701: Arrange all sample points in the compensation sequence according to the sampling time. The temporal relationships from earliest to latest are arranged in ascending order to form the final sequence. : ; For the first The sampling time at any given moment. For the first Water quality compensation at all times, unit and Consistency is ensured. If duplicate timestamps exist, the average value is taken, and only one sample point is retained. The timestamp precision is in seconds. After sorting, the time sequence is checked for correctness to ensure there are no reversed points. Samples outside the lip window period are directly output as smoothed water quality data and included in the final sequence. The final sequence is an ordered set of data pairs consisting of sampling time and corresponding water quality data. Arranging the data in ascending order by time ensures the temporal accuracy of the data.
[0079] If reversed-order points are found, first check if the timestamps are correct. If the timestamps are incorrect, correct the timestamps and reorder. If the timestamps are correct, delete duplicate reversed-order points. Data processing for non-lip-window periods is the same as for normal samples within the lip-window, outputting smoothed water quality data.
[0080] S702: Restricting the final sequence The water quality values in the sample do not exceed the lower limit of the measurement range specified by the water quality probe at the time of manufacture. and upper limit of the range Range, enabling boundary truncation of data exceeding the limit.
[0081] For different water quality parameters, their respective measurement ranges are used for cutoff. The lower limit for chemical oxygen demand (COD) is 0 mg / L, and the upper limit is 1000 mg / L; the lower limit for ammonia nitrogen (AM) is 0 mg / L, and the upper limit is 50 mg / L; the lower limit for total phosphorus (TP) is 0 mg / L, and the upper limit is 20 mg / L. When the compensation water quality is lower than... At that time, take As an output value, when the compensation water quality is higher than At that time, take As the output value, a flag is added to data that exceeds the limit to mark it as exceeding the limit. For data within the range but exceeding the physically reasonable range, such as negative numbers, 0 is taken as the output value. When the range changes after probe calibration, historical data is corrected using the calibration coefficient to ensure data consistency.
[0082] The flag for out-of-limit data has a value of 1 indicating that the measurement exceeds the upper limit, a value of -1 indicating that the measurement is below the lower limit, and a value of 0 indicating that it is normal. The specific method for correcting historical data is to multiply all water quality data before calibration by a calibration factor, which is the ratio of the calibrated standard value to the measured value before calibration. The physical reasonable range for chemical oxygen demand (COD) is 0 to 2000 mg / L, for ammonia nitrogen it is 0 to 100 mg / L, and for total phosphorus it is 0 to 50 mg / L.
[0083] S703: Extract the final sequence generated within the lip window that matches the actual sequence. The system for monitoring and tracing the water quality of water supply and drainage networks is invoked.
[0084] The final sequence includes data from all sampling periods. Data outside the lip window period represents smoothed water quality, while disturbed samples within the lip window have been replaced with compensated water quality. Data transmission uses the MQTT protocol with a QoS level of 1 to ensure reliable data transmission. The compensation effect is evaluated using the interference cancellation rate index, calculated as follows: ; in To compensate for water quality, Water quality for the mainstream area reference probe, The original water quality is used as a reference. When the ER is greater than 0.8, it indicates that the compensation effect meets the requirements. Key coefficients are calibrated on-site every six months, and the coefficients are adjusted through water injection tests to ensure consistency of compensation effects across different sites. The final sequence can be used for operational applications such as water quality anomaly early warning, pollution source tracing, and pipeline network operation scheduling.
[0085] When a sensor malfunctions, such as 10 consecutive sampling points showing unchanged data or data exceeding the measurement range, the data segment is marked as faulty, and compensation processing is stopped. When data transmission is interrupted, the sampled data is cached to local storage and uploaded in batches upon reconnection to ensure data integrity. In the event of extreme water levels, such as full pipe level, compensation processing is stopped, and the original smoothed data is output directly. When the water level is below the bottom of the well, the data is marked as invalid. When the manhole is silted up, with sediment thickness exceeding 10% of the outlet pipe diameter, a remeasurement of the structural reference is triggered, parameters are updated, and compensation is resumed. If human interference is detected, such as a probe position change exceeding 5cm, an alarm is triggered, prompting recalibration of the probe position and structural reference.
[0086] like Figure 2As shown, the drainage manhole in this embodiment includes a manhole wall, a bottom channel, a channel flange, a rigid support, and a water quality probe. The bottom channel extends through the manhole along the main drainage direction, and the centerline of the channel serves as a lateral reference for the horizontal distance of the measuring point. A wall-attaching area is formed between the outer side of the flange and the manhole wall. The water quality probe is fixed to one side of the manhole wall by the rigid support, with its center located within the wall-attaching area between the channel centerline and the manhole wall. The water quality probe is oriented to avoid the direct water flow surface and to face downstream at an angle.
[0087] like Figure 3 As shown, in this embodiment, the water quality probe is installed on a rigid support on the well chamber wall. The probe center elevation is defined by the flange elevation, placing it within the vertical influence zone capable of capturing the water released by the stagnant wedge. During low water level operation, the main flow is primarily located in the bottom channel. Local water within the wall-attached area outside the flange forms a stagnant wedge due to its low velocity. This wedge remains relatively closed or in a weak exchange state until the water level exceeds the flange elevation. As the water level gradually rises and approaches the flange elevation, this wall-attached area becomes the primary area for subsequent localized release disturbances. Therefore, setting the probe center within the vertical influence zone above the flange elevation allows the probe to detect localized disturbances caused by the release of the stagnant wedge, while also providing a structural basis for distinguishing between normal and disturbed samples.
[0088] The embodiments of this example have been described above. However, this example is not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms based on the guidance of this example, and all of them are within the protection scope of this example.
Claims
1. A method for in-situ verification and compensation of manhole water quality data, applied to drainage manholes including a bottom flow channel, manhole wall, rigid support, and water quality probe, characterized in that, include: Establish a local coordinate system and obtain the flange elevation, outlet pipe diameter, well chamber diameter, and horizontal distance of measuring points to generate a structural reference. The water quality probe is fixed on the rigid bracket, and the water quality probe is located in the wall-attached area outside the flange elevation. The original water quality, original water level and sampling time are continuously collected, and the process of immersion and receding when the original water level exceeds the flange elevation is extracted as the lip window. Perform time-domain denoising on the original water level and the original water quality to obtain a smoothed water level and smoothed water quality. Within the lip window, based on the structural reference, the smoothed water level, the smoothed water quality, and the sampling time, the release weight reflecting the degree of water body replacement and the trend water quality representing the background concentration of the pipeline network are calculated to obtain the compensated water quality; The released weights are used to distinguish between disturbed samples and normal samples. The disturbed samples are given the compensated water quality, and the normal samples are given the smoothed water quality. The compensated water quality and the smoothed water quality are written in the sampling order and a compensation sequence is generated. Output the final sequence after in-situ verification and compensation.
2. The method for in-situ verification and compensation of manhole water quality data according to claim 1, characterized in that, Establish a local coordinate system and obtain the flange elevation, outlet pipe diameter, well chamber diameter, and horizontal distance of measuring points to generate the structural reference, including: The lowest point of the bottom of the water outlet pipe is taken as the local coordinate zero point; Identify the centerline of the channel along the direction of water flow, and take the elevation of the water-land boundary line when the water first enters the wall-attached area as the flange elevation. The inner diameter of the pipe parallel to the main discharge direction of the monitored water flow is obtained as the outlet pipe diameter; The net inner diameter of the well chamber at the cross-section where the water quality probe is located is obtained as the inner diameter of the well chamber; The horizontal orthogonal distance from the center of the water quality probe to the center line of the flow channel is taken as the horizontal distance of the measuring point. The flange elevation, the outlet pipe diameter, the well chamber diameter, and the horizontal distance of the measuring points are unified to spatial parameters under the local coordinate zero point and recorded as the structural reference.
3. The method for in-situ verification and compensation of manhole water quality data according to claim 2, characterized in that, Fixing the water quality probe to the rigid bracket, and defining the water quality probe as being located within the wall-attached area outside the flange elevation, includes: The lower end of the rigid support is anchored to the well chamber wall; Using the flange elevation as a reference and the outlet pipe diameter as a scale, the center elevation of the water quality probe is limited to the vertical influence zone that can capture the water released by the water-stagnant wedge. The horizontal projection of the center of the water quality probe is placed between the center line of the flow channel and the wall of the well chamber, and the horizontal distance of the measuring point is constrained according to the lateral expansion space of the outlet pipe diameter and the inner diameter of the well chamber, so that the water quality probe is located within the wall-attached area. Adjust the orientation of the water quality probe to avoid the water-facing side and to face the downstream oblique direction of the water flow in the well bottom channel.
4. The method for in-situ verification and compensation of manhole water quality data according to claim 3, characterized in that, Continuously collect raw water quality, raw water level, and sampling time; extract the submersion and receding process of the raw water level exceeding the flange elevation as a lip-crossing window, including: Under the same clock reference, the original water quality, the original water level, and the sampling time are collected synchronously according to the set sampling interval; The moment when the original water level is below the flange elevation is selected from the time series data as the lip crossing start point, and the water-holding wedge is marked as being inactive. Starting from the lip-crossing point, data is continuously collected. The mainstream shear thickness threshold is defined using the outlet pipe diameter. The moment when the original water level exceeds the mainstream shear thickness threshold is taken as the lip-crossing point, marking the end of the water-stagnant wedge release. The starting point and ending point of the lip-crossing, together with several consecutive sampling points extending from the boundary, are used to form the lip-crossing window.
5. The method for in-situ verification and compensation of manhole water quality data according to claim 4, characterized in that, Temporal denoising is performed on the original water level and the original water quality to obtain smoothed water level and smoothed water quality; within the lip window, based on the structural reference, the smoothed water level, the smoothed water quality, and the sampling time, a release weight reflecting the degree of water body replacement and a trend water quality representing the background concentration of the pipe network are calculated to obtain the compensated water quality, including: A weighted moving average algorithm is used to perform time-domain denoising on the original water level and the original water quality to obtain the smoothed water level and the smoothed water quality; The submersion coefficient is obtained by normalizing and limiting the ratio of the submersion depth across the flange elevation to the outlet pipe diameter based on the smooth water level. The rate of change of the smooth water level at adjacent time intervals is calculated to obtain the water level variability. This variability is then compared with the reference variability calculated based on the outlet pipe diameter to obtain the sweep coefficient characterizing the water flow impact intensity. The wall adhesion coefficient of the water quality probe is obtained by normalizing and limiting the amplitude based on the proportion of twice the horizontal distance of the measuring point in the difference between the inner diameter of the well chamber and the diameter of the outlet pipe. The release weight is calculated by coupling the immersion coefficient, the sweeping coefficient, and the wall adhesion coefficient; Based on the smooth water quality at both ends of the lip window being inactive, time-domain interpolation is performed to reconstruct the trend water quality representing the background concentration of the pipe network; The local disturbance amount that deviates from the trend water quality by the release weight is removed to obtain the compensated water quality.
6. The method for in-situ verification and compensation of manhole water quality data according to claim 5, characterized in that, The released weights are used to distinguish between disturbed samples and normal samples. The disturbed samples are given the compensated water quality, and the normal samples are given the smoothed water quality. The compensation water quality and the smoothing water quality are written into the sampling order and a compensation sequence is generated, including: Within the lip window, samples with a release weight greater than zero are identified as disturbed samples, and samples with a release weight equal to zero are identified as normal samples. The disturbed sample is given the compensated water quality after eliminating local structural interference, and the normal sample is given the smooth water quality that maintains the original characteristics of the pipe network, as the sample output value; The original timestamps of the compensated water quality and the sample output value are retained, and they are written into the same data sequence in the sampling order, while the endpoints at the boundary of the lip window are kept equal to the smoothed water quality. The data sequence after writing is reassembled according to the sampling interval to generate a single-column compensation sequence.
7. The method for in-situ verification and compensation of manhole water quality data according to claim 6, characterized in that, The output is the final sequence after in-situ verification and compensation, including: All sample points in the compensation sequence are arranged in ascending order according to the temporal relationship of the sampling time from earliest to latest to form the final sequence; The water quality values in the final sequence are limited to the lower and upper limits of the range calibrated by the water quality probe at the factory, thereby achieving boundary truncation of data exceeding the limits. The final sequence generated within the lip window that conforms to the actual situation is extracted and called by the water quality monitoring and source tracing scheduling system of the water supply and drainage network.