Method and equipment for measuring total nitrogen flux in water in real time
The total nitrogen flux is calculated in real time through sensor arrays and lightweight neural network models, which solves the problem of time-consuming and large errors of traditional methods, and realizes low-cost and high-frequency total nitrogen flux measurement, improving monitoring efficiency and accuracy.
Patent Information
- Application Number
- CN202510554890.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-04-29
AI Technical Summary
The prior art cannot achieve low-cost, high-frequency, real-time synchronous acquisition of total nitrogen concentration and flux in water, and the traditional method takes a long time and has large errors.
The sensor array is used to collect optical, electrochemical and physical indicators, combined with an ultrasonic flowmeter, and calculate the total nitrogen flux in real time through a lightweight neural network model, integrate flow velocity and concentration synchronous acquisition, and use adaptive control and cleaning mechanisms to ensure detection accuracy.
Real-time measurement of total nitrogen flux at low cost and high frequency is achieved, with prediction errors of less than ±10%, and equipment costs are reduced to less than 40% of traditional instruments, improving monitoring efficiency and accuracy.
Smart Images

Figure BDA0005383140810000021 
Figure BDA0005383140810000024 
Figure BDA0005383140810000025
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water quality monitoring, and in particular to a method and device for real-time measurement of total nitrogen flux in water. Background Art
[0002] Total nitrogen (TN) is a key indicator for assessing water eutrophication. Traditional measurement methods (such as spectrophotometry and combustion oxidation) require complex pretreatment and laboratory analysis, taking hours to days and failing to meet real-time monitoring requirements. Existing online TN detectors, most of which rely on ultraviolet absorption or chemical digestion, are expensive, complex to maintain, and have long measurement cycles (typically >10 minutes).
[0003] Furthermore, calculating total nitrogen flux requires simultaneous acquisition of concentration and water flow data. Conventional methods struggle to achieve high-frequency simultaneous measurements, leading to large errors in flux estimation. Therefore, a low-cost, high-frequency (≤ 1 minute) technical solution that can simultaneously acquire total nitrogen concentration and flux in real time is urgently needed.
[0004] Therefore, a real-time measurement method and device for total nitrogen flux in water are proposed to solve the above problems. Summary of the Invention
[0005] In view of this, the technical problem to be solved by the present invention is to propose a real-time measurement method and equipment for total nitrogen flux in water to solve the problems in the prior art of uneven distribution of nitrogen in water and impurities that easily cause measurement inaccuracy.
[0006] To achieve the above object, the present invention provides the following technical solution: a method for real-time measurement of total nitrogen flux in water, comprising:
[0007] S1. A real-time measurement device for total nitrogen flux in water is installed at the monitoring section. The sensor array on the measurement device collects optical, electrochemical, and physical indicators related to total nitrogen concentration, and the ultrasonic flow meter installed on the device obtains real-time flow data of the section.
[0008] S2. De-noise, normalize and remove outliers from the collected indicator data, and generate time series features through the sliding window method;
[0009] S3, constructing a total nitrogen inversion model, inputting the data processed in S2 into the total nitrogen inversion model, and inverting the total nitrogen concentration data;
[0010] S4. Combine the flow data obtained by the ultrasonic flow meter to calculate the total nitrogen flux in real time. The specific formula is:
[0011] Total nitrogen flux = total nitrogen concentration × flow rate × cross-sectional area
[0012] After obtaining the total nitrogen flux, upload it to the cloud platform.
[0013] The optical indicators related to the total nitrogen concentration described in S1 include ultraviolet absorbance and visible light absorbance, and the electrochemical indicators include pH and conductivity. The relevant indicators collected by the sensor array described in S1 must be determined through preliminary feature engineering, and the steps are as follows:
[0014] S1.1, input indicator data from previous years and use Pearson correlation analysis to select features with high correlation with TN. The formula is as follows:
[0015]
[0016] Where r represents the Pearson correlation coefficient; x i and y i represents the observed value of the variable; and represents the mean of the variable;
[0017] S1.2, Collinearity processing: Calculate the variance inflation factor (VIF). The specific formula is as follows:
[0018]
[0019] Where R 2 Indicates the strength of the linear relationship;
[0020] S1.3, Constructing new features: Creating nonlinear combinations.
[0021] The total nitrogen inversion model described in S3 establishes a nonlinear mapping relationship between multiple parameters and total nitrogen concentration based on a lightweight neural network model. Before application, it must be trained using data from previous years. The design and deployment steps are as follows:
[0022] S3.1, lightweight model design: The network structure adopts a shallow fully connected network, L2 regularization prevents overfitting, and a weight penalty term is added to the loss function. The specific formula is as follows:
[0023]
[0024] Where, L total Represents the total loss function; L MSE represents the mean square error; λ represents the regularization parameter, which controls the weight of the regularization term in the total loss function; represents the sum of squares of all weights in the model;
[0025] S3.2, loss function and optimizer: the loss function is mean square error, and the optimizer is Adam;
[0026] S3.3, model training and tuning: Use previous years' indicator data for training, with a batch size of 32 or 64, use early stopping to monitor the validation set loss, and use grid search or random search to optimize the number of hidden layers, number of nodes, and learning rate;
[0027] S3.4, Model evaluation: The evaluation indicators selected are root mean square error, mean absolute error and coefficient of determination;
[0028] S3.5, lightweight model deployment: Prune, quantize, and embed the model: remove connections with small absolute weight values to sparse the model; convert floating-point weights into 8-bit integers to reduce the model size.
[0029] A real-time measurement device for total nitrogen flux in water, comprising a flow detection module, a data processing module, a communication module, and a power supply module. The data processing module includes a waterproof cover, a flow guide tube is provided in the middle of the waterproof cover, the detection module is installed in the flow guide tube, a sensor array is evenly provided in the flow guide tube, a collection cover is installed on the flow guide tube, the communication module and the power supply module are installed in the collection cover, a diverter cover is installed on the side of the waterproof cover away from the collection cover, an ultrasonic flowmeter is installed in the middle of the diverter cover, and the device also includes a detection adaptive control mechanism, a quick installation mechanism, and an adaptive cleaning mechanism.
[0030] The detection adaptive control mechanism is arranged on the flow guide pipe, and the detection adaptive control mechanism is used to evenly disperse nitrogen and impurities in the water;
[0031] The quick installation mechanism is provided on the waterproof cover and is used for quick installation of the guide pipe;
[0032] Preferably, the detection adaptive control mechanism includes a guide cover, one end of the guide cover is fixedly connected to the guide pipe, the other end of the guide cover is fixedly connected to the expansion disk, the inner wall of the expansion disk is fixedly connected to the arc guide plate, the guide cover is connected to the first support plate in a uniformly rotating manner on the outer side of one end close to the expansion disk, the first support plate is connected to the second support plate in a rotating manner away from the end of the guide cover, and a closed spring plate is arranged on the circumference of the guide cover.
[0033] Preferably, the upper surface of the closing spring plate is slidingly connected to the bottom of the first support plate and the second support plate respectively, the closing spring plate is fixedly connected to the spoiler at one end away from the deflector, the second support plate is fixedly connected to the spoiler at one end away from the first support plate, and a guide groove is opened in the middle of the spoiler.
[0034] Preferably, the quick installation mechanism includes a card slot, which is evenly arranged on the outer surface of the guide tube. The outer surface of the guide tube is provided with a U-shaped card plate, and arc card plates are fixedly connected on both sides of the U-shaped card plate. The arc card plates are clamped in the card slot, and a reset spring is fixedly connected to the upper surface of the waterproof cover, and the upper end of the reset spring is fixedly connected to the U-shaped card plate.
[0035] Preferably, the adaptive cleaning mechanism includes a turbine generator, which is rotatably connected to the bottom slope of the diverter hood, the diverter hood is connected to the guide pipe, and a turntable is fixedly connected to the middle of the turbine generator, and the outer surface of the middle of the turntable is rotatably connected to the inner wall of the diverter hood.
[0036] Preferably, the eccentric part of the turntable is rotatably connected to an eccentric push plate, and the eccentric push plate is rotatably connected to an end of the turntable away from the turntable. The n-shaped scraper is slidably connected to the inner wall of the diversion cover. The n-shaped scraper is made of flexible material and is used for cleaning impurities on the mirror of the ultrasonic flowmeter.
[0037] Compared with the prior art, the present invention provides a method and device for real-time measurement of total nitrogen flux in water, which has the following beneficial effects:
[0038] Compared with traditional nitrogen flux detection methods, this scheme has the following benefits:
[0039] Multi-parameter fusion modeling: The total nitrogen concentration is inverted by jointly using non-directly related conventional indicators, breaking through the limitations of a single sensor and improving prediction accuracy. The total nitrogen concentration prediction error is ≤±10%.
[0040] High-frequency real-time computing: Using lightweight models and edge computing technology, the entire process from data collection to flux output is completed within 1 minute.
[0041] Low-cost deployment: Reuses conventional water quality sensors, eliminating expensive dedicated total nitrogen detection modules, reducing equipment costs to less than 40% of traditional online total nitrogen meters.
[0042] Flux synchronous measurement: Integrates synchronous acquisition of flow rate and concentration to resolve errors caused by timing asynchrony in traditional methods.
[0043] Compared with the traditional nitrogen flux detection device, this solution has the following advantages:
[0044] This solution uses a diverter hood to divert the water flow in the diversion pipe to the upper portion for testing, while the water flow below the diversion pipe outlet is used to drive the turbine generator. An electromagnetic clutch is installed in the center of the turbine generator, which controls the connection between the rotating shaft in the middle of the turntable and the turbine generator. This solution uses a diverter hood to divert the water flow in the diversion pipe to the upper portion for testing, while the water flow below the diversion pipe outlet is used to drive the turbine generator. When the device is operating, the rotation of the turbine generator charges the entire device. The turbine generator synchronously drives the turntable. The turntable rotation and the eccentric design of the eccentric push plate drive the eccentric push plate to reciprocate within the diverter hood. This reciprocating motion of the eccentric push plate drives an n-shaped scraper to self-clean the ultrasonic flowmeter mirror. The sliding of the n-shaped scraper removes debris from the ultrasonic flowmeter surface, ensuring the transmission efficiency of the ultrasonic signal. Compared with traditional designs, this solution not only reduces manual maintenance but also maintains the detection accuracy of the ultrasonic flowmeter.
[0045] 2. This solution is equipped with a connection device that can be quickly connected. Compared with the traditional single fixed installation, this solution adopts a push-type quick installation and disassembly, which enables the equipment to be deployed and moved more quickly and adapt to different monitoring environments and needs. This design also enables the equipment to be more widely used in various waters and monitoring scenarios, such as rivers, lakes, and oceans, improving monitoring efficiency and accuracy:
[0046] 3. This solution is equipped with a spoiler at the front end of the flared disc. The spoiler can initially guide the water flow to make the water flow more uniform. At the same time, it can also prevent large particles of stone from flowing in special environments such as floods, mudslides and other severe weather. The spoiler can initially block the flow to protect the collection equipment at the rear end. At the same time, the spoiler drives the closed spring clip to buffer and control the vertical water flow. When impurities or particles in the water flow hit the spoiler, the closed spring clips arranged on the outer circumference will be deformed. This deformation can change the direction of the water flow, so that the water flows more smoothly through the flow meter. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 This is a flow chart of a method for real-time measurement of total nitrogen flux in water according to the present invention;
[0048] Figure 2 It is a schematic diagram of the three-dimensional structure of the present invention;
[0049] Figure 3 This is an auxiliary schematic diagram of the three-dimensional structure of the present invention;
[0050] Figure 4 This is a schematic diagram of the structural connection relationship of the detection adaptive control mechanism of the present invention;
[0051] Figure 5 A half-cut schematic diagram showing the structural connection relationship of the detection adaptive control mechanism of the present invention;
[0052] Figure 6 This is a schematic diagram of the structural connection relationship of the quick installation mechanism of the present invention;
[0053] Figure 7 This is an auxiliary schematic diagram of the structural connection relationship of the quick installation mechanism of the present invention;
[0054] Figure 8 A schematic diagram of the structural connection relationship of the adaptive cleaning mechanism of the present invention;
[0055] Figure 9 It is a schematic diagram of the decomposition of the three-dimensional structure of the present invention.
[0056] In the picture:
[0057] 1. Waterproof cover; 11. Collection cover; 12. Flow guide tube; 13. Diverter cover; 14. Ultrasonic flow meter;
[0058] 2. Detection of adaptive control mechanism; 21. Air deflector; 22. Flared plate; 23. Curved deflector; 24. First support plate; 25. Second support plate; 26. Closing spring; 27. Air spoiler; 28. Air guide groove;
[0059] 3. Quick installation mechanism; 31. Card slot; 32. U-shaped card plate; 33. Return spring; 34. Arc card plate;
[0060] 4. Adaptive cleaning mechanism; 41. Turbine generator; 42. Rotary disc; 43. Eccentric push plate; 44. N-shaped cleaning scraper. DETAILED DESCRIPTION
[0061] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0062] The present invention will be described in further detail below with reference to the accompanying drawings and examples.
[0063] First embodiment
[0064] Please refer to Figures 2 to 9 As shown:
[0065] To solve the problems mentioned in the technical solution, the embodiment of the present application provides a real-time measurement device for total nitrogen flux in water, including a flow detection module, a data processing module, a communication module and a power supply module. The data processing module includes a waterproof cover 1, a guide tube 12 is provided in the middle of the waterproof cover 1, the detection module is installed in the guide tube 12, a sensor array is evenly provided in the guide tube 12, a collection cover 11 is installed on the guide tube 12, the communication module and the power supply module are installed in the collection cover 11, a diverter cover 13 is installed on the side of the waterproof cover 1 away from the collection cover 11, an ultrasonic flowmeter 14 is installed in the middle of the diverter cover 13, and further includes a detection adaptive control mechanism 2, a quick installation mechanism 3 and an adaptive cleaning mechanism 4;
[0066] The detection adaptive control mechanism 2 is arranged on the flow guide tube 12, and the detection adaptive control mechanism 2 is used to uniformly disperse nitrogen and impurities in water;
[0067] Among them, the sensor array in the diversion tube 12: integrated UV / visible light photometer, pH / conductivity / DO sensor, temperature / turbidity probe, ammonia nitrogen / COD sensor, etc.
[0068] Flow monitoring module: ultrasonic flow meter, real-time acquisition of flow rate data;
[0069] Data processing module: embedded processor (such as ARM Cortex-A series), built-in total nitrogen inversion model and flux calculation algorithm;
[0070] Communication module: supports 4G / 5G or LoRa wireless transmission to achieve remote data transmission;
[0071] Power supply module: powered by solar cells or DC power supply.
[0072] Specifically, such as Figure 4 and Figure 5 As shown, one end of the air deflector 21 is fixedly connected to the air guide pipe 12, and the other end of the air deflector 21 is fixedly connected to the flared disk 22. The inner wall of the flared disk 22 is fixedly connected to the curved air deflector plate 23. The outer side of the end of the air deflector 21 close to the flared disk 22 is evenly connected to the first support plate 24, and the end of the first support plate 24 away from the air deflector 21 is rotatably connected to the second support plate 25. A closing spring plate 26 is provided on the circumference of the air deflector 21.
[0073] The arc-shaped guide plate 23 adopts an arc-shaped vortex design on the inner wall of the extended return spring 33, and the flared plate 22 adopts a flared design, which is conducive to increasing the diversion of water. The closing spring 26 adopts a spring plate with a certain toughness.
[0074] This solution evenly arranges expandable closing springs 26 on the outside of the flared disk 22. By controlling the blocking of the water flow by the closing springs 26, the impurities and gas mixture in the water can be effectively dispersed evenly, and the guiding effect of the arc guide plate 23 can make the water flow more uniform.
[0075] Furthermore, the upper surfaces of the closing spring piece 26 are slidably connected to the bottom of the first support plate 24 and the second support plate 25 respectively. The end of the closing spring piece 26 away from the deflector 21 is fixedly connected to the spoiler 27. The end of the second support plate 25 away from the first support plate 24 is fixedly connected to the spoiler 27. A guide groove 28 is opened in the middle of the spoiler 27.
[0076] In this solution, a spoiler 27 is provided at the front end of the flared disc 22. The spoiler 27 can initially guide the water flow to make the water flow more uniform. At the same time, it can also prevent large particles of stone from flowing in the water under special circumstances, such as floods, mudslides and other severe weather conditions. The spoiler 27 can initially block the flow to protect the collection equipment at the rear end. At the same time, the spoiler 27 drives the closed spring piece 26 to buffer and control the vertical water flow. When impurities or particles in the water flow hit the spoiler 27, the closed spring piece 26 arranged on the outer circumference will be deformed. This deformation can change the flow direction of the water flow, so that the water flows more smoothly through the flow meter.
[0077] Specifically, such as Figure 6 and Figure 7 As shown, the card slots 31 are evenly opened on the outer surface of the guide tube 12, and the outer surface of the guide tube 12 is sleeved with a U-shaped card plate 32. The two sides of the U-shaped card plate 32 are fixedly connected to the arc card plates 34. The arc card plates 34 are clamped in the card slots 31. The upper surface of the waterproof cover 1 is fixedly connected to a return spring 33, and the upper end of the return spring 33 is fixedly connected to the U-shaped card plate 32.
[0078] This solution uses a quick-connect connection device. Compared with the traditional single fixed installation, this solution adopts a push-type quick installation and removal, which enables the equipment to be deployed and moved more quickly to adapt to different monitoring environments and needs. This design also enables the equipment to be more widely used in various waters and monitoring scenarios, such as rivers, lakes, and oceans, improving monitoring efficiency and accuracy:
[0079] Specific as Figure 8As shown, the turbine generator 41 is rotatably connected to the bottom inclined surface of the diverter cover 13, the diverter cover 13 is connected to the guide pipe 12, and a turntable 42 is fixedly connected to the middle part of the turbine generator 41. The outer surface of the middle part of the turntable 42 is rotatably connected to the inner wall of the diverter cover 13; the turntable 42 is rotatably connected to the eccentric push plate 43 at the eccentric position, and the end of the eccentric push plate 43 away from the turntable 42 is rotatably connected to the n-shaped scraper 44, which is slidably connected to the inner wall of the diverter cover 13. The n-shaped scraper 44 is made of flexible material and is used to clean impurities on the mirror surface of the ultrasonic flowmeter 14;
[0080] Among them, an electromagnetic clutch is installed in the middle of the turbine generator 41. The connection between the rotating shaft in the middle of the turntable 42 and the rotating shaft in the middle of the turbine generator 41 can be controlled by the clutch control. In this solution, the water flow in the diversion pipe 12 is diverted by the diversion cover 13. The water flow above is used for detection, and the water flow below the outlet of the diversion pipe 12 is used to drive the turbine generator 41 to rotate. When the equipment is working, the turbine generator 41 can be rotated to charge the entire equipment. When the equipment stops running, the turbine can be controlled by the clutch under the drive of the water flow. Generator 41 drives turntable 42 to rotate. The rotation of turbine generator 41, through the clutch, synchronously drives turntable 42. The rotation of turntable 42 and the eccentric design of eccentric push plate 43 drive eccentric push plate 43 to reciprocate within diverter hood 13. The reciprocating motion of eccentric push plate 43 drives n-shaped scraper 44 to self-clean the mirror surface of ultrasonic flowmeter 14. The sliding movement of n-shaped scraper 44 removes deposits such as algae, scale, and sediment from the surface of ultrasonic flowmeter 14, ensuring efficient transmission of ultrasonic signals. Compared to traditional designs, this solution not only reduces manual maintenance but also maintains the detection accuracy of ultrasonic flowmeter 14.
[0081] Second embodiment
[0082] A real-time measurement method for total nitrogen flux in water, comprising:
[0083] S1. A real-time measurement device for total nitrogen flux in water is installed at the monitoring section. The sensor array on the measurement device collects optical, electrochemical, and physical indicators related to total nitrogen concentration, and the ultrasonic flow meter installed on the device obtains real-time flow data of the section.
[0084] S2. De-noise, normalize and remove outliers from the collected indicator data, and generate time series features through the sliding window method;
[0085] S3, constructing a total nitrogen inversion model, inputting the data processed in S2 into the total nitrogen inversion model, and inverting the total nitrogen concentration data;
[0086] S4. Combine the flow data obtained by the ultrasonic flow meter to calculate the total nitrogen flux in real time. The specific formula is:
[0087] Total nitrogen flux = total nitrogen concentration × flow rate × cross-sectional area
[0088] After obtaining the total nitrogen flux, upload it to the cloud platform.
[0089] The specific operations of the above embodiment are as follows:
[0090] 1. Deploy sensor arrays and ultrasonic flow meters along the river section, collecting water quality parameters and flow rates every 10 seconds.
[0091] The specific operation process is as follows:
[0092] First, install waterproof covers 1 on both sides of the river section. Figure 5 and Figure 8 As shown, the operator manually presses the U-shaped card plate 32 downwards, and the arc card plate 34 and the insertion hole in the waterproof cover 1 are located on the same track. At this time, the operator inserts the guide tube 12 through the U-shaped card plate 32 and the waterproof cover 1 again, and the pressing on the U-shaped card plate 32 is released again. The U-shaped card plate 32 begins to stretch upward under the elastic action of the return spring 33. Since the arc card plates 34 are symmetrically provided on both sides of the U-shaped card plate 32, and the outer surface of the guide tube 12 is evenly provided with card grooves 31, the return spring 33 elastically stretches the card plate 32. The U-shaped card plate 32 starts to slide upward, and the arc card plate 34 is engaged in the card slot 31 provided in the guide tube 12. This solution is provided with a connection device that can be quickly connected. Compared with the traditional single fixed installation, this solution adopts a press-type installation, rotation and disassembly, so that the equipment can be deployed and moved more quickly to adapt to different monitoring environments and needs. This design of the solution also enables the equipment to be more widely used in various waters and monitoring scenarios, such as rivers, lakes, oceans, etc., thereby improving monitoring efficiency and accuracy:
[0093] 2. The data processing unit performs sliding average processing on the six sets of data within the past minute, inputs them into the pre-trained total nitrogen inversion model, and outputs the predicted value of total nitrogen concentration;
[0094] 3. Calculate the current total nitrogen flux by combining the real-time flow rate and the preset cross-sectional area;
[0095] The specific usage scenarios are as follows:
[0096] When the spoiler 27 is diverting the water, the guide groove 28 is blocked due to the obstruction of garbage objects in the water. At this time, since the guide groove 28 is blocked as a whole, the resistance of the spoiler 27 to the water flow increases. At this time, the resistance of the water flow to the spoiler 27 will drive the closed spring piece 26 to begin to deform. At this time, the blocked water flow will begin to flow along the external closed spring piece 26 to the inside of the closed spring piece 26. Under the blocking effect of the closed spring piece 26, the water flow begins to flow along the curved guide plate 23 into the guide pipe 12. In this solution, a spoiler 27 is provided at the front end of the flared disc 22. The initial diversion of the water flow by the spoiler 27 can make the water flow more uniform. At the same time, it can also prevent large stones from flowing in the water under special circumstances such as floods, mudslides and other severe weather conditions. The initial blocking by the spoiler 27 can protect the rear-end collection equipment. At the same time, the spoiler 27 drives the closed spring piece 26 to buffer and control the vertical water flow. When impurities or particles in the water flow hit the spoiler 27, the closed spring piece 26 arranged on the outer circumference will be deformed. This deformation can change the flow direction of the water flow, so that the water flows more smoothly through the flow meter.
[0097] At this time, the water flow rate can be quickly detected through the 14 in the collection cover 11. Since the water sample undergoes preliminary flow obstruction and mixing, the nitrogen oxide gas in the water is evenly mixed, thereby increasing the accuracy of nitrogen flux detection in the water flow.
[0098] At the same time, this solution uses the diverter cover 13 to divert the water flow in the guide pipe 12 to the upper water flow for detection. An electromagnetic clutch is installed in the middle of the turbine generator 41. The clutch control can control the connection between the rotating shaft in the middle of the turntable 42 and the rotating shaft in the middle of the turbine generator 41. This solution uses the diverter cover 13 to divert the water flow in the guide pipe 12 to the upper water flow for detection. The water flow below the outlet of the guide pipe 12 is used to drive the turbine generator 41 to rotate. When the equipment is working, the turbine generator 41 can be rotated to charge the entire equipment. When the equipment stops running, it can be driven by the water flow. By controlling the clutch, 41 drives 42 to rotate. The water flow below the outlet of the diversion tube 12 is used to drive the turbine generator 41 to rotate. The rotation of the turbine generator 41 synchronously drives the rotation of the turntable 42. The rotation of the turntable 42 and the eccentric design of the eccentric push plate 43 can drive the eccentric push plate 43 to reciprocate within the diversion cover 13. The reciprocating movement of the eccentric push plate 43 drives the n-shaped cleaning blade 44 to self-clean the mirror surface of the ultrasonic flowmeter 14. The sliding of the n-shaped cleaning blade 44 removes attachments such as algae, scale, and sediment from the surface of the ultrasonic flowmeter 14, ensuring the transmission efficiency of the ultrasonic signal. Compared with traditional designs, this solution not only reduces manual maintenance but also maintains the detection accuracy of the ultrasonic flowmeter 14.
[0099] 4. The data is uploaded to the cloud platform through the 4G module to generate a flux change trend chart.
[0100] The indicators that need to be obtained by the sensor array in step 1 must be determined through preliminary feature engineering. The steps are as follows:
[0101] (1) Feature correlation analysis: Input the indicator data of previous years and use Pearson correlation analysis to select features with high correlation with TN. The formula is as follows:
[0102]
[0103] Where r represents the Pearson correlation coefficient; x i and y i represents the observed value of the variable; and represents the mean of the variable;
[0104] (2) Collinearity processing: Calculate the variance inflation factor (VIF). If VIF > 10, redundant features need to be deleted:
[0105]
[0106] Where R 2 Indicates the strength of the linear relationship;
[0107] (3) Construct new features: such as creating nonlinear combinations.
[0108] The total nitrogen inversion model in step 2 is based on a lightweight neural network algorithm. The main steps are as follows:
[0109] (1) Lightweight model design: The network structure adopts a shallow fully connected network (MLP), L2 regularization prevents overfitting, and a weight penalty term is added to the loss function:
[0110]
[0111] Where, L total Represents the total loss function; L MSE represents the mean square error; λ represents the regularization parameter, which controls the weight of the regularization term in the total loss function; represents the sum of squares of all weights in the model;
[0112] (2) Loss function and optimizer: The loss function is mean square error (MSE), and the optimizer is Adam (adaptive learning rate, default parameters).
[0113] (3) Model training and tuning: Use previous years' indicator data for training, with a batch size of 32 or 64. Use early stopping to monitor the validation set loss. If there is no improvement for 10 consecutive rounds, terminate the training. Reduce the learning rate by half every 20 rounds. Use grid search or random search to optimize the number of hidden layers, number of nodes, and learning rate.
[0114] (4) Model evaluation: The evaluation indicators selected are root mean square error, mean absolute error and coefficient of determination.
[0115] (5) Model lightweight deployment: Prune, quantize and embed the model: remove connections with small absolute weight values to sparse the model; convert floating-point weights into 8-bit integers to reduce the model size; export the model using TensorFlow or ONNX format to adapt it to edge devices.
[0116] Please refer to the above working process Figures 1 to 9 .
[0117] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0118] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A method for real-time measurement of total nitrogen flux in water, characterized in that: include: S1. A real-time measurement device for total nitrogen flux in water is installed at the monitoring section. The sensor array on the measurement device collects optical, electrochemical, and physical indicators related to total nitrogen concentration, and the ultrasonic flow meter installed on the device obtains real-time flow data of the section. S2. De-noise, normalize and remove outliers from the collected indicator data, and generate time series features through the sliding window method; S3, constructing a total nitrogen inversion model, inputting the data processed in S2 into the total nitrogen inversion model, and inverting the total nitrogen concentration data; S4. Combine the flow data obtained by the ultrasonic flow meter to calculate the total nitrogen flux in real time. The specific formula is: Total nitrogen flux = total nitrogen concentration × flow rate × cross-sectional area After obtaining the total nitrogen flux, upload it to the cloud platform.
2. The method for real-time measurement of total nitrogen flux in water according to claim 1, wherein: The optical indicators related to the total nitrogen concentration described in S1 include ultraviolet absorbance and visible light absorbance; the electrochemical indicators include pH and conductivity; the relevant indicators collected by the sensor array described in S1 are determined through preliminary feature engineering, and the steps are as follows: S1.1, input indicator data from previous years and use Pearson correlation analysis to select features with high correlation with TN. The formula is as follows: Where r represents the Pearson correlation coefficient; x i and y i represents the observed value of the variable; and represents the mean of the variable; S1.2, Collinearity processing: Calculate the variance inflation factor (VIF). The specific formula is as follows: Where R 2 Indicates the strength of the linear relationship; S1.3, Constructing new features: Creating nonlinear combinations.
3. The method for real-time measurement of total nitrogen flux in water according to claim 1, wherein: The total nitrogen inversion model described in S3 establishes a nonlinear mapping relationship between multiple parameters and total nitrogen concentration based on a lightweight neural network model. It is trained using data from previous years before application. The design and deployment steps are as follows: S3.1, lightweight model design: The network structure adopts a shallow fully connected network, L2 regularization prevents overfitting, and a weight penalty term is added to the loss function. The specific formula is as follows: Where, L total Represents the total loss function; L MSE represents the mean square error; λ represents the regularization parameter, which controls the weight of the regularization term in the total loss function; represents the sum of squares of all weights in the model; S3.2, loss function and optimizer: the loss function is mean square error, and the optimizer is Adam; S3.3, model training and tuning: Use previous years' indicator data for training, with a batch size of 32 or 64, use early stopping to monitor the validation set loss, and use grid search or random search to optimize the number of hidden layers, number of nodes, and learning rate; S3.4, Model evaluation: The evaluation indicators selected are root mean square error, mean absolute error and coefficient of determination; S3.5, lightweight model deployment: Prune, quantize, and embed the model: remove connections with small absolute weight values to sparse the model; convert floating-point weights into 8-bit integers to reduce the model size.
4. A real-time measurement device for total nitrogen flux in water, suitable for a real-time measurement method for total nitrogen flux in water according to any one of claims 1 to 3, characterized in that: The invention comprises a flow detection module, a data processing module, a communication module and a power supply module, wherein the data processing module comprises a waterproof cover (1), a flow guide tube (12) is provided in the middle of the waterproof cover (1), the detection module is installed in the flow guide tube (12), a sensor array is evenly provided in the flow guide tube (12), a collection cover (11) is installed on the flow guide tube (12), the communication module and the power supply module are installed in the collection cover (11), a diversion cover (13) is installed on the side of the waterproof cover (1) away from the collection cover (11), an ultrasonic flow meter (14) is installed in the middle of the diversion cover (13), and the invention also comprises a detection adaptive control mechanism (2), a quick installation mechanism (3) and an adaptive cleaning mechanism (4); The detection adaptive control mechanism (2) is arranged on the flow guide tube (12), and the detection adaptive control mechanism (2) is used to uniformly disperse nitrogen and impurities in water; The quick installation mechanism (3) is arranged on the waterproof cover (1), and the quick installation mechanism (3) is used for quick installation of the guide tube (12); The adaptive cleaning mechanism (4) is arranged in the diverter cover (13), and the quick installation mechanism (3) is used to regularly clean the attachments on the surface of the ultrasonic flow meter (14).
5. A real-time measurement device for total nitrogen flux in water according to claim 4, characterized in that: The detection adaptive control mechanism (2) comprises a deflector (21), one end of the deflector (21) is fixedly connected to the deflector pipe (12), the other end of the deflector (21) is fixedly connected to a flared disk (22), the inner wall of the flared disk (22) is fixedly connected to a curved deflector plate (23), the outer side of one end of the deflector (21) close to the flared disk (22) is uniformly connected to a first support plate (24), the end of the first support plate (24) away from the deflector (21) is connected to a second support plate (25), and a closing spring plate (26) is provided on the circumference of the deflector (21).
6. A real-time measurement device for total nitrogen flux in water according to claim 5, characterized in that: The upper surfaces of the closing spring piece (26) are respectively slidably connected to the bottoms of the first support plate (24) and the second support plate (25); one end of the closing spring piece (26) away from the deflector (21) is fixedly connected to the spoiler (27); one end of the second support plate (25) away from the first support plate (24) is fixedly connected to the spoiler (27); and a guide groove (28) is provided in the middle of the spoiler (27).
7. A real-time measurement device for total nitrogen flux in water according to claim 6, characterized in that: The quick installation mechanism (3) comprises a card slot (31), the card slot (31) being evenly arranged on the outer surface of the guide tube (12), the outer surface of the guide tube (12) being sleeved with a U-shaped card plate (32), both sides of the U-shaped card plate (32) being fixedly connected with circular arc card plates (34), the circular arc card plates (34) being clamped in the card slot (31), the upper surface of the waterproof cover (1) being fixedly connected with a reset spring (33), the upper end of the reset spring (33) being fixedly connected to the U-shaped card plate (32).
8. The real-time measurement device for total nitrogen flux in water according to claim 6, characterized in that: The adaptive cleaning mechanism (4) comprises a turbine generator (41), the turbine generator (41) being rotatably connected to the bottom inclined surface of the diverter hood (13), the diverter hood (13) being in communication with the flow guide pipe (12), a turntable (42) being fixedly connected to the middle of the turbine generator (41), and the outer surface of the middle of the turntable (42) being rotatably connected to the inner wall of the diverter hood (13).
9. A real-time measurement device for total nitrogen flux in water according to claim 8, characterized in that: The eccentric portion of the turntable (42) is rotatably connected to an eccentric push plate (43), and one end of the eccentric push plate (43) away from the turntable (42) is rotatably connected to an n-shaped cleaning scraper (44). The n-shaped cleaning scraper (44) is slidably connected to the inner wall of the diverter cover (13). The n-shaped cleaning scraper (44) is made of a flexible material and is used for cleaning impurities on the mirror surface of the ultrasonic flowmeter (14).
Citation Information
Patent Citations
Water pollutant flux monitoring method and system based on buoy station
CN114994275A
Irrigation area water body greenhouse gas monitoring system based on low-cost sensor and intelligent algorithm
CN116381176A
Calculation method and device for downscaling river substance flux time and electronic equipment
CN118747279A
Method for predicting outlet water quality of rural sewage treatment facility based on multi-path data source
CN118760979A
Pollutant flux method based on full-section sampling and water quality automatic station data fusion
CN119274699A
Cited By
A tangential turbine flowmeter and its metering method
CN122448301A