A river water quality detection and analysis method and device for river environment protection
By preprocessing and screening characteristic wavelengths of river water samples, and combining the Lambert-Beer law, the problem of spectral data interference in river water quality detection was solved, and high-precision water quality detection was achieved.
Patent Information
- Application Number
- CN202511544434.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-28
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-10-28
AI Technical Summary
In river water quality testing, the presence of impurities in the river leads to poor spectral data quality, resulting in low detection accuracy in existing technologies.
The method involves pre-processing river water samples and dividing them into two parts. The turbidity of one part is measured, while the absorbance of the other part is detected. Sparse principal component analysis algorithm is used to screen characteristic wavelengths, and Beer-Lambert law is used to determine the characteristic wavelengths and absorbance correction values of water quality influencing elements. Through multi-dimensional spectral correction and intelligent feature extraction, the detection accuracy is improved.
It significantly improves the accuracy and efficiency of river water quality testing, solves the problem of cross-interference caused by overlapping heavy metal absorption peaks, and enables rapid and accurate detection of complex water bodies.
Smart Images

Figure CN121027016B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of water quality detection, in particular to a river water quality detection and analysis method and device for river environmental protection. BACKGROUND
[0002] River water quality detection is a key defense line for maintaining ecological safety and public health. Excessive heavy metals and accumulation of organic pollutants caused by industrial wastewater, agricultural non-point source pollution, etc. pose a threat to organisms in the river and seriously damage the biodiversity in the river, which not only destroys the aquatic ecosystem but also threatens human health through the food chain.
[0003] At present, river water quality detection is often carried out by a spectrum analyzer, but impurities usually exist in river water, which interferes with the quality of spectrum data, so that the measured spectrum data has deviation, resulting in low accuracy of river water quality detection. SUMMARY
[0004] In order to solve the above technical problems, the purpose of the present application is to provide a river water quality detection and analysis method and device for river environmental protection, and the technical solution adopted is as follows:
[0005] In a first aspect, the present application provides a river water quality detection and analysis method for river environmental protection, which comprises the following steps:
[0006] After pretreatment, the collected river water sample is evenly divided into two parts, the turbidity of any one of the river water samples is measured, and the water quality absorbance of the remaining river water sample is detected;
[0007] The absorbance of the river water sample at all wavelengths forms a water sample absorbance sequence, and correspondingly, the pure water absorbance sequence of the equal-volume pure water sample is obtained;
[0008] The difference between the water sample absorbance sequence and the pure water absorbance sequence is used to obtain a calibration water sample sequence; based on the change trend of all data in the calibration water sample sequence and the number of peak points in the calibration water sample sequence, the turbidity is combined to determine the sparsity parameter of the river water sample;
[0009] The sparsity parameter and the sparse principal component analysis algorithm are combined to screen the characteristic wavelengths of the river water sample; the characteristic wavelengths of each preset water quality influencing element are determined by using the Lambert-Beer law through a control variable experiment;
[0010] The difference between the characteristic wavelengths of each preset water quality influencing element and the characteristic wavelengths of the river water sample in the corresponding element in the calibration water sample sequence is analyzed, and the turbidity is combined to determine the absorbance correction value of each preset water quality influencing element;
[0011] The content of each preset water quality influencing element in the river water sample is obtained by using the absorbance correction value and combining with the Lambert-Beer law.
[0012] In one embodiment, the pretreatment includes dropwise adding a digestion agent to the river water sample and stirring.
[0013] In one embodiment, the calibration water sample sequence is composed of the difference between the absorbance of the water sample sequence and the absorbance of the pure water sequence at the same wavelength.
[0014] In one embodiment, the determination of the sparsity parameter includes:
[0015] The curve fitting is performed on all data in the calibration water sample sequence to obtain a goodness of fit, and the sparsity parameter is positively correlated with the goodness of fit and negatively correlated with the number of peak points and the turbidity.
[0016] In one embodiment, the sparsity parameter is calculated in the following manner:
[0017] In the formula, is the sparsity parameter of the river water sample, is the goodness of fit, is the turbidity of the river water sample, is the number of peak points in the calibration water sample sequence, ln() is a logarithmic function with a natural constant as the base, and norm() is a normalization function.
[0018] In one embodiment, the determination of the characteristic wavelength of each preset water quality influencing element by the control variable experiment and the Lambert-Beer law includes:
[0019] For each preset water quality influencing element, a water quality influencing element of each preset concentration is added to pure water, water quality absorbance detection is performed on the pure water to which each preset concentration is added, and the characteristic wavelength of each preset water quality influencing element is determined through the water quality absorbance detection results of all preset concentrations.
[0020] In one embodiment, the determination of the absorbance correction value includes:
[0021] The turbidity is mapped to a preset interval range, and the characteristic wavelengths of the river water sample, except for the characteristic wavelengths of all preset water quality influencing elements, are denoted as turbidity wavelengths.
[0022] For any preset water quality influencing element, a preset number of turbidity wavelengths adjacent to the characteristic wavelength of the any preset water quality influencing element are obtained, denoted as near turbidity wavelengths, and the reciprocal of the distance between each near turbidity wavelength and the characteristic wavelength of the any preset water quality influencing element is taken as a weight, and data corresponding to all near turbidity wavelengths in the calibration water sample sequence are weighted and summed up.
[0023] The absorbance correction value of the any preset water quality influencing element is inversely proportional to the result of the weighted sum and the turbidity mapped into the preset interval range, and is proportional to the data corresponding to the characteristic wavelength of the any preset water quality influencing element in the calibration water sample sequence.
[0024] In one embodiment, the determination of the absorbance correction value of the any preset water quality influencing element is as follows:
[0025] The product of the result of the weighted sum and the turbidity mapped into the preset interval range is calculated, and the absorbance correction value of the any preset water quality influencing element is the difference between the data corresponding to the characteristic wavelength of the any preset water quality influencing element in the calibration water sample sequence and the product.
[0026] In one embodiment, in the process of obtaining the content of each preset water quality influencing element in the river water sample, the length of the optical path in the Lambert-Beer law is determined by the control variable experiment.
[0027] In a second aspect, the embodiments of the present application further provide a river water quality detection and analysis device for river environmental protection, which comprises a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the steps of any of the above-mentioned methods when executing the computer program.
[0028] The present application has at least the following beneficial effects:
[0029] The application divides the collected river water sample into two parts after pretreatment, measures the turbidity of any one of the river water samples, and detects the water quality absorbance of the remaining river water sample; through the double-sample parallel processing strategy, the efficiency of water quality sample detection is improved; the absorbance of the river water sample at all wavelengths forms a water sample absorbance sequence, and correspondingly, the pure water absorbance sequence of the equal volume pure water sample is obtained; the difference between the water sample absorbance sequence and the pure water absorbance sequence is used to obtain the calibration water sample sequence; the turbidity is combined to determine the sparsity parameter of the river water sample based on the change trend of all data in the calibration water sample sequence and the number of peak points in the calibration water sample sequence; the sparsity parameter is combined with the sparse principal component analysis algorithm to screen the characteristic wavelengths of the river water sample; the turbidity compensation sparse principal component analysis algorithm improves the accuracy of the screened characteristic wavelengths, effectively solves the cross interference problem caused by the overlap of heavy metal absorption peaks in traditional spectral analysis, and determines the characteristic wavelengths of each preset water quality influencing element by using the Lambert-Beer law through the control variable experiment; the difference between the characteristic wavelengths of each preset water quality influencing element and the characteristic wavelengths of the river water sample in the corresponding element in the calibration water sample sequence is analyzed, and the absorbance correction value of each preset water quality influencing element is determined in combination with the turbidity; the absorbance correction value is used in combination with the Lambert-Beer law to obtain the content of each preset water quality influencing element in the river water sample; through the synergistic optimization of multi-dimensional spectral correction and intelligent feature extraction, the precision and efficiency of water quality detection are significantly improved, and rapid and accurate water quality detection of complex water bodies is completed. BRIEF DESCRIPTION OF DRAWINGS
[0030] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the drawings needed in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0031] Figure 1 A step flow chart of a river water quality detection and analysis method for river environmental protection provided by an embodiment of the present application;
[0032] Figure 2 A flow chart for determining the content of water quality influencing elements. DETAILED DESCRIPTION
[0033] In order to further illustrate the technical means and effects taken by the present application to achieve the predetermined object, the specific implementation, structure, features and effects of the river water quality detection and analysis method and device for river environment protection according to the present application are described in detail as follows. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.
[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0035] The specific scheme of the river water quality detection and analysis method and device for river environment protection provided by the present application is described in detail below in combination with the drawings.
[0036] Please refer to Figure 1 which shows the step flowchart of the river water quality detection and analysis method for river environment protection provided by one embodiment of the present application, which includes the following steps:
[0037] S1, the collected river water sample is divided into two parts after pretreatment, the turbidity of any one of the river water samples is measured, and the water quality absorbance of the remaining river water sample is detected.
[0038] In order to realize the detection and analysis of water quality in the river, in this embodiment, based on any river that needs water quality detection, water quality detection stations are deployed at equal intervals along the flow direction of the river. In this embodiment, the interval between two adjacent water quality detection stations is 100 m, and the implementer can set the interval between water quality detection stations according to the actual situation, which is not limited in this embodiment. Based on each water quality detection station, river water quality samples are extracted for water quality detection and analysis. This embodiment illustrates the river water quality samples extracted by any one water quality detection station, reduces environmental interference, and improves the automation and accuracy of water quality detection.
[0039] Specifically, in this embodiment, the river water quality sample is extracted by a water pump. The river water quality sample extracted in this embodiment is 50 ml, and the implementer can set the extraction amount of the river water quality sample. The extracted river water quality sample is stored in a sampling container, 20 ml of the river water quality sample is extracted from the sampling container into a digestion chamber, the river water quality sample is heated to a fixed temperature in the digestion chamber, the temperature is related to the optimal working temperature of the spectrometer, and the working temperature of the spectrometer is usually 25℃~40℃. In this embodiment, the water quality sample is heated to 30℃.
[0040] Pretreatment of the heated river water samples in the digestion chamber aims to reduce interference from inorganic elements and organic compounds that may affect the absorption spectrum during spectral detection. Specifically, the pretreatment involves adding a digesting agent dropwise to the river water sample in the digestion chamber. In this embodiment, a 1:1 mixture of FeSO4 and H2O2 is used as the digesting agent. The agent is added dropwise at a rate of 0.1 ml / s, with magnetic stirring performed simultaneously for 20 minutes.
[0041] The pretreated river water samples were divided into two portions, denoted as river water sample X and river water sample Y. Turbidity was measured on either sample, for example, river water sample X. The specific procedure can be found in the standard "Determination of Turbidity in Water Quality - Turbidity Meter Method (HJ 1075-2019)" to obtain the turbidity information of river water sample X. Simultaneously, the absorbance of river water sample Y was measured using a spectrometer.
[0042] S2, the absorbance of all wavelengths of the river water sample is used to form the absorbance sequence of the water sample, and correspondingly, the absorbance sequence of pure water of the same volume is obtained.
[0043] In this embodiment, the absorbance of all wavelengths of the river water sample Y is arranged in ascending order to form a water sample absorbance sequence.
[0044] Water quality testing using spectrometers primarily relies on Beer-Lambert's law, which states that the absorbance of a river water sample at a specific wavelength is positively correlated with the concentration of the substance corresponding to that wavelength and the thickness of the solution. In actual testing, the thickness of the water sample solution is consistent, thus approximating a positive correlation between absorbance and the concentration of the corresponding substance.
[0045] In the process of using spectrometers to detect river water quality samples, the high wavelength resolution results in a high degree of redundancy in the absorbance sequences. This makes the analysis of various elements in the river water samples susceptible to noise interference, leading to poor accuracy in water quality detection. Furthermore, the presence of impurities and other non-dissolved components in the water during the detection process causes inconsistencies in turbidity levels at different times, which also interferes with water quality analysis. Therefore, it is necessary to analyze the absorbance sequences of water samples during the water quality detection process to improve the accuracy of river water quality detection.
[0046] Since H2O constitutes the majority of the water quality during river water quality testing, to reduce equipment deviations during spectrometer operation at different times, while obtaining the absorbance sequence of the river water samples through spectral analysis, an equivalent volume of pure water was pretreated, and its absorbance sequence was also collected. The aim is to reduce the impact of spectrometer operational deviations on river water quality testing.
[0047] S3. By utilizing the difference between the absorbance sequence of the water sample and the absorbance sequence of pure water, a calibration water sample sequence is obtained. Based on the changing trend of all data in the calibration water sample sequence and the number of peak points in the calibration water sample sequence, combined with the turbidity, the sparsity parameter of the river water sample is determined.
[0048] To reduce the impact of equipment operation deviations on water quality testing, the difference between the absorbance of the same wavelength in the water sample absorbance sequence and the pure water absorbance sequence is calculated. The difference is then arranged in order of wavelength to form a calibration water sample sequence.
[0049] Water quality testing primarily focuses on organic and inorganic elements that affect water quality. This embodiment analyzes water quality-influencing elements including chemical oxygen demand (COD), total organic carbon (TOC), ammonia nitrogen (NH3-N), and nitrate (NO3). - Nitrite NO2 - Total phosphorus (TP), lead (Pb), cadmium (Cd), mercury (Hg), and arsenic (As) are all considered. Based on Beer-Lambert's law, each element typically corresponds to a single characteristic wavelength. However, in spectral detection, thousands of wavelengths are often present, leading to wavelength redundancy. Furthermore, impurities in the river water will affect characteristic wavelengths related to turbidity, potentially interfering with the values of these characteristic wavelengths. Therefore, it is necessary to screen all characteristic wavelengths of the current river water sample to reduce interference from redundant information.
[0050] Typically, the selection of characteristic wavelengths for spectral data relies on feature selection parameters. For example, in the Sparse Principal Component Selection (SPCAFS) algorithm, a fixed sparsity parameter is usually set to determine the number of characteristic wavelengths to be selected. However, in water quality testing, different water samples often have different environmental conditions and turbidity levels, resulting in variations in the number and location of characteristic wavelengths in each selection process. Therefore, fixed selection parameters can easily lead to deviations in the selection of characteristic wavelengths.
[0051] Furthermore, the higher the turbidity of the river water sample, the lower the degree of scattering and absorption of light by suspended particles in the river. In normal river water, the turbidity value is generally between 1 and 100 NTU. The higher the value, the higher the content of suspended matter in the river water, and the greater the impact on the water quality spectrum data.
[0052] In an ideal scenario, the spectral data of a water quality sample shows characteristic peaks only at the wavelengths corresponding to the elements affecting water quality, with smooth transitions between these peaks, a small overall number of characteristic peaks, and few outliers. However, when affected by suspended particles in river water, interference occurs between wavelengths in the water quality spectral data, resulting in a significantly larger number of peaks in the calibrated water sample sequence than the number of elements affecting water quality, and a greater overall number of outliers.
[0053] Based on the above analysis, this embodiment calculates the sparsity parameters of the current river water quality samples, specifically as follows:
[0054] Curve fitting is performed on all data in the calibration water sample sequence using the least squares method to obtain the goodness of fit. A peak point detection algorithm is then used to obtain the peak points in the calibration water sample sequence. The least squares method is a known existing technique, and the implementer can choose other feasible existing curve fitting algorithms. The specific calculation method for the sparsity parameter is as follows:
[0055] In the formula, For the sparsity parameters of river water samples, The goodness of fit is... Let X be the turbidity of the river water sample. To determine the number of peak points in the water sample sequence, ln() is a logarithmic function with the natural constant as the base, and norm() is a normalization function.
[0056] It should be understood that the more severe the influence of suspended particles in river water, the more significant the influence between different wavelengths during spectral analysis of river water samples. This results in a larger number of outliers in the spectral data, leading to a smaller sparsity parameter value. To better extract feature information from the spectral data, more feature wavelengths need to be selected. Conversely, when the river water quality is good and less affected by suspended particles, the measured spectral data is of higher quality, and fewer feature wavelengths can be used to extract the feature information.
[0057] S4. Combining the sparsity parameters and the sparse principal component analysis algorithm, the characteristic wavelengths of the river water samples are screened; the characteristic wavelengths of each preset water quality influencing element are determined by using Lambert-Beer's law through controlled variable experiments.
[0058] Based on the sparsity parameters of the obtained river water quality samples The calibrated water sample sequence is used as input to the Sparse Principal Component Selection (SPCAFS) algorithm, and the output is the selected characteristic wavelengths of the current river water quality sample. For example, 100 characteristic wavelengths are selected from the original 1900 wavelengths. It should be noted that the number of characteristic wavelengths is determined by the sparsity parameter of the SPCAFS algorithm. Generally, the number of characteristic wavelengths should include and be greater than the number of wavelengths of water quality influencing elements. The SPCAFS algorithm is a well-known existing technology, and its specific process will not be elaborated upon.
[0059] This embodiment uses the Lambert-Beer law to determine the characteristic wavelengths of each water quality influencing element mentioned in step S3 through controlled variable experiments. Specifically, to obtain the characteristic wavelength of total phosphorus (TP), TP solutions with concentrations of 10, 20, 30, 40, 50, 60, 70, 80, 90, and 100 mg / L were prepared in pure water and subjected to spectral detection. The spectral data were obtained, and the characteristic peaks corresponding to TP were obtained based on their positions. The wavelengths corresponding to the characteristic peaks were taken as the characteristic wavelengths of total phosphorus (TP).
[0060] It should be understood that the formula for Lambert-Beer's Law is... In the formula, A is the absorbance, k is the proportionality coefficient, c is the concentration of the measured liquid, and l is the optical path length. The optical path length is a specific parameter used in spectrometer measurements and is generally constant; it can be obtained through the spectrometer's display interface. Based on the known absorbance at different concentrations, the proportionality coefficients of each water quality influencing element can be obtained through fitting. The Lambert-Beer law is a well-known technique, and its specific process will not be elaborated upon.
[0061] It should be noted that when obtaining the characteristic wavelengths of each water quality influencing element, the concentration of the water quality influencing element added to pure water can be set by the implementer according to the actual situation, and this embodiment does not impose any restrictions here.
[0062] S5, analyze the differences between the characteristic wavelengths of each preset water quality influencing element and the characteristic wavelengths of the river water sample in the corresponding elements of the calibrated water sample sequence, and determine the absorbance correction value of each preset water quality influencing element in combination with the turbidity.
[0063] Under ideal water quality conditions, the spectral data of river water samples only contain the characteristic wavelengths of water quality influencing elements. However, in actual water quality testing, the characteristic wavelengths include not only those of water quality influencing elements but also those affected by water turbidity. Due to the scattering of light by suspended particles in the water, other scattered light wavelengths are added to the characteristic wavelengths of water quality influencing elements, causing the measured absorbance of these elements to be greater than the actual absorbance, thus affecting the judgment of actual water quality influencing conditions.
[0064] In this embodiment, the characteristic wavelengths of all characteristic wavelengths of the river water quality sample, excluding the characteristic wavelengths of all water quality influencing elements, are denoted as turbidity wavelengths. For any water quality influencing element, a preset number of turbidity wavelengths adjacent to the characteristic wavelength of the water quality influencing element are obtained and denoted as near-turbidity wavelengths. In this embodiment, the preset number is 10. Implementers can set it according to the actual situation. This embodiment does not impose any restrictions here.
[0065] Generally, for the characteristic wavelengths of various water quality influencing elements in river water samples, the closer they are to the near-turbidity wavelength, the greater the impact on the absorbance of that element. Therefore, this embodiment corrects absorbance by considering the overall turbidity of the water body and the distribution of near-turbidity wavelengths within a local range of the characteristic wavelengths of each water quality influencing element. Specifically:
[0066] First, the turbidity of river water sample X is proportionally reduced and mapped to a value range of 0 to m, where m ranges from [0.2, 0.5]. A larger value of m indicates a greater impact of turbidity on water quality. In this embodiment, m = 0.2. The implementer can set the value of m within its range. The mapped value of the turbidity of river water sample X is recorded as the turbidity influence coefficient. Second, taking the j-th water quality influencing element as an example, the reciprocal of the distance between each near-turbidity wavelength of the j-th water quality influencing element and its characteristic wavelength is used as a weight. The data corresponding to all near-turbidity wavelengths of the j-th water quality influencing element in the calibration water sample sequence are then weighted and summed. The absorbance correction value for each water quality influencing element in this embodiment is calculated as follows:
[0067] In the formula, This is the absorbance correction value for the j-th water quality influencing element at its characteristic wavelength. This represents the corresponding data of the characteristic wavelength of the j-th water quality influencing element in the calibration water sample sequence. The turbidity influence coefficient is mentioned above. This is the weighted sum of the j-th water quality influencing element.
[0068] It should be understood that if the content of water quality influencing elements in river water is higher, it indicates that the water quality influencing element is more harmful to the water quality. At this time, the near-turbidity wavelength in the local range of the characteristic wavelength corresponding to the water quality influencing element may cause scattering effect on the characteristic wavelength of the water quality influencing element. Therefore, it is necessary to reduce the influence of near-turbidity wavelength to obtain a more accurate characteristic wavelength of the water quality influencing element.
[0069] It should be noted that the content of every water quality influencing element in river water is not necessarily high. This may result in a negative value for the actual calculated absorbance correction value. In this case, it indicates that the content of the water quality influencing element is small and less affected by turbidity. The absorbance correction value of the water quality influencing element in this case is the corresponding data in the calibration water sample sequence.
[0070] S6. Using the absorbance correction value and the Lambert-Beer law, the content of each preset water quality influencing element in the river water sample is obtained.
[0071] Based on the above steps, the absorbance correction value corresponding to each water quality influencing element analyzed in this embodiment can be obtained. Based on the absorbance correction value of each water quality influencing element and the proportion coefficient of each water quality influencing element obtained in step S4, the content of each water quality influencing element in the river water sample Y can be obtained using the known optical path length and the Lambert-Beer law, thus completing the river water quality detection and analysis. The flowchart for determining the content of water quality influencing elements is as follows. Figure 2 As shown.
[0072] Based on the same inventive concept as the above method, this application embodiment also provides a river water quality detection and analysis device for river environmental protection, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any one of the above-described methods for river water quality detection and analysis for river environmental protection.
[0073] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments of this specification have been described above. Additionally, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are possible or may be advantageous.
[0074] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0075] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for detecting and analyzing river water quality for river environmental protection, characterized in that, The method includes the following steps: After preprocessing, the collected river water samples were divided into two parts. The turbidity of one part of the river water sample was measured, and the absorbance of the remaining part of the river water sample was tested. The absorbance of all wavelengths of the river water sample was used to form the absorbance sequence of the water sample. Correspondingly, the absorbance sequence of pure water of the same volume was obtained. By utilizing the difference between the absorbance sequence of the water sample and the absorbance sequence of pure water, a calibration water sample sequence is obtained; based on the changing trend of all data in the calibration water sample sequence and the number of peak points in the calibration water sample sequence, combined with the turbidity, the sparsity parameter of the river water sample is determined. Combining the aforementioned sparsity parameters with the sparse principal component analysis algorithm, we screened the characteristic wavelengths of river water samples; and determined the characteristic wavelengths of each preset water quality influencing element using Lambert-Beer's law through controlled variable experiments. The differences between the characteristic wavelengths of each preset water quality influencing element and the characteristic wavelengths of the river water sample in the corresponding elements of the calibrated water sample sequence were analyzed. Combined with the turbidity, the absorbance correction value of each preset water quality influencing element was determined. Using the absorbance correction value and Beer-Lambert law, the content of each preset water quality influencing element in the river water sample is obtained; Determining the absorbance correction value includes: The turbidity is mapped to a preset range, and the characteristic wavelengths of all characteristic wavelengths of the river water sample, excluding the characteristic wavelengths of all preset water quality influencing elements, are recorded as turbidity wavelengths. For any preset water quality influencing element, a preset number of turbidity wavelengths adjacent to the characteristic wavelength of the preset water quality influencing element are obtained and denoted as near-turbidity wavelengths. The reciprocal of the distance between each near-turbidity wavelength and the characteristic wavelength of the preset water quality influencing element is used as a weight, and the data corresponding to all near-turbidity wavelengths in the calibration water sample sequence are weighted and summed. The absorbance correction value of any preset water quality influencing element is inversely proportional to the weighted summation result and the turbidity mapped to the preset range, and is directly proportional to the data corresponding to the characteristic wavelength of any preset water quality influencing element in the calibration water sample sequence.
2. The method for river water quality detection and analysis for river environmental protection as described in claim 1, characterized in that, The pretreatment involves adding a digesting agent dropwise to the river water sample and stirring.
3. The method for river water quality detection and analysis for river environmental protection as described in claim 1, characterized in that, The calibration water sample sequence consists of the difference between the absorbance of the water sample absorbance sequence and the absorbance of pure water at the same wavelength.
4. The method for river water quality detection and analysis for river environmental protection as described in claim 1, characterized in that, The determination of the sparsity parameter includes: Curve fitting is performed on all data in the calibration water sample sequence to obtain the goodness of fit. The sparsity parameter is positively correlated with the goodness of fit and negatively correlated with the number of peak points and the turbidity.
5. The method for river water quality detection and analysis for river environmental protection as described in claim 4, characterized in that, The sparsity parameter is calculated as follows: In the formula, For the sparsity parameters of river water samples, The goodness of fit is... The turbidity of the river water sample. To determine the number of peak points in the water sample sequence, ln() is a logarithmic function with the natural constant as the base, and norm() is a normalization function.
6. The method for river water quality detection and analysis for river environmental protection as described in claim 1, characterized in that, The method of determining the characteristic wavelengths of each preset water quality influencing element using Lambert-Beer's law through controlled variable experiments includes: For each preset water quality influencing element, a preset concentration of each water quality influencing element is added to pure water. The absorbance of the pure water with each preset concentration is measured. Based on the absorbance measurement results of all preset concentrations, the characteristic wavelength of each preset water quality influencing element is determined.
7. The method for river water quality detection and analysis for river environmental protection as described in claim 1, characterized in that, The absorbance correction value for any preset water quality influencing element is determined as follows: The product of the weighted summation result and the turbidity mapped to the preset interval is calculated, and the absorbance correction value of any preset water quality influencing element is the difference between the data corresponding to the characteristic wavelength of any preset water quality influencing element in the calibration water sample sequence and the product.
8. The method for river water quality detection and analysis for river environmental protection as described in claim 1, characterized in that, In the process of obtaining the content of each preset water quality influencing element in the river water sample, the optical path length in the Lambert-Beer law is determined by the controlled variable experiment.
9. A river water quality detection and analysis device for river environmental protection, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1-8.
Citation Information
Patent Citations
Kernel extreme learning machine flood forecast method based on sparse self-encoding
CN107563567A
Correction method for turbidity influence during water quality COD detection by using ultraviolet-visible spectroscopy
CN112326565A