A water body parameter prediction method, storage medium and terminal device
Through the multi-wavelength turbidity compensation model and turbidity prediction model, the problem of low turbidity compensation accuracy in the prior art is solved, and higher prediction accuracy and modeling accuracy of water parameter concentration are achieved.
Patent Information
- Application Number
- CN202211615920.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-15
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2042-12-15
AI Technical Summary
In the prior art, the modeling accuracy of single-wavelength compensation is not high, and because the turbidity has different impacts on the absorption spectrum of the parameters to be measured at different wavelengths, it is impossible to fundamentally remove the interference of turbidity on the prediction of water parameters.
Using a multi-wavelength turbidity compensation model, by calculating the spectral area corresponding to the original absorption spectrum data of the water body to be measured, the turbidity prediction model is used to predict the turbidity value, and a turbidity compensation curve is established to correct the water body absorption spectrum data, thereby improving the accuracy of water body parameter concentration prediction.
The accuracy of water body parameter concentration prediction is improved, and the impact of turbidity on water body parameter prediction is effectively avoided. The modeling interval of the turbidity compensation model is continuous band, which improves the modeling accuracy.
Smart Images

Figure CN116202975B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a water quality detection method, and in particular to a water body parameter prediction method, a storage medium and a terminal device. Background Art
[0002] Ultraviolet absorption spectroscopy or ultraviolet visible absorption spectroscopy is commonly used for water quality parameter detection. The water quality analysis technology of ultraviolet absorption spectroscopy or ultraviolet visible absorption spectroscopy is based on the Lambert-Beer law. After the water quality parameter model is established, the unknown concentration can be directly predicted. Due to its advantages such as simple measurement procedure, fast and convenient detection, and no secondary pollution, it has been increasingly used to measure the nitrate nitrogen content and other parameters of water bodies. Nitrate nitrogen, COD, etc. are one of the common chemical pollutants in water bodies and are important indicators for water quality monitoring. However, there are often suspended particles in natural water bodies. When directly measured, absorption and scattering will occur, causing nonlinear shift of the spectrum, which seriously affects the detection accuracy of the parameters to be measured.
[0003] At present, the commonly used turbidity compensation method is single wavelength compensation, which eliminates the influence of turbidity by subtracting the absorbance at the turbidity compensation wavelength corresponding to the measured parameter from the absorbance at the absorption peak position of nitrate or other measured parameters. Nitrate uses the absorbance at 350nm for turbidity compensation, and COD uses the absorbance at 546nm for turbidity compensation. However, this method is only suitable for establishing a single wavelength parameter prediction model, and the modeling accuracy is not high. Moreover, due to the different effects of turbidity on the absorption spectra of the measured parameters at different wavelengths, this method can only weaken the turbidity interference to a certain extent and cannot fundamentally eliminate it. Summary of the invention
[0004] The purpose of the present invention is to solve the problem that the modeling accuracy of single-wavelength compensation during turbidity compensation in the prior art is not high, and the deficiency that the interference of turbidity on the prediction of water parameters cannot be fundamentally eliminated due to the different effects of turbidity on the absorption spectrum of the water parameters to be measured at different wavelengths, and to provide a water parameter prediction method, storage medium and terminal device.
[0005] To achieve the above objectives, the technical solutions provided by the present invention are as follows:
[0006] A method for predicting water body parameters, which is special in that it includes the following steps:
[0007] S1. Predict the turbidity of the water sample to be tested
[0008] S1.1. Calculate the spectral area corresponding to the original absorption spectrum data of the water body to be tested;
[0009] S1.2. Use the spectral area to predict the turbidity value of the water sample to be tested according to the turbidity prediction model;
[0010] The turbidity prediction model is established based on the area of the absorption spectrum of the mixed solution sample and its corresponding turbidity value; the mixed solution is a mixed solution including the parameter to be measured and the turbidity; the original absorption spectrum and the absorption spectrum of the mixed solution sample are both absorption spectra of continuous bands;
[0011] S2. Calculate the absorption spectrum data of the water body to be tested after turbidity compensation
[0012] S2.1. Substitute the turbidity value obtained in S1.2 into the turbidity compensation model to calculate the corresponding turbidity compensation curve;
[0013] The turbidity compensation model is established based on the differential spectrum data of the mixed solution sample and the corresponding turbidity;
[0014] S2.2. Calculate the absorption spectrum data of the water body to be tested after turbidity compensation based on the original absorption spectrum data of the water body to be tested and the turbidity compensation curve obtained in S2.1;
[0015] S3. Predict the concentration of the parameter to be measured
[0016] The absorption spectrum data of the water body to be tested after turbidity compensation is substituted into the prediction model of the parameter to be tested to obtain the corresponding concentration of the parameter to be tested, and the prediction of the water body parameter is completed; the prediction model of the parameter to be tested is established based on the absorption spectrum data of the standard sample of the parameter to be tested and its corresponding concentration, and the absorption spectrum of the standard sample of the parameter to be tested is an absorption spectrum of a continuous band.
[0017] Furthermore, the differential spectrum data is the absorption spectrum data of the mixed solution sample minus the absorption spectrum data of the standard solution of the parameter to be measured of the corresponding concentration; the differential spectrum data reflects the influence of turbidity on the absorption spectrum of the parameter to be measured.
[0018] Furthermore, in S2.1, the method for establishing the turbidity compensation model is:
[0019] a. subtracting the absorption spectrum data of the standard solution of the parameter to be measured of the corresponding concentration from the absorption spectrum data of the mixed solution sample to obtain the differential spectrum data;
[0020] b. Using the differential spectrum data and the turbidity of the corresponding mixed solution sample, a linear regression model of the two at different wavelengths is established as a turbidity compensation model.
[0021] Further, in S1, the turbidity prediction model is established based on a univariate linear regression model, and the absorbance of the modeling interval of the turbidity prediction model is contributed by the turbidity;
[0022] In S3, the prediction model of the parameter to be measured is obtained by performing regression analysis using the partial least squares method.
[0023] Further, in S3, the modeling interval of the parameter prediction model to be measured is the optimal modeling interval, and the steps for determining the optimal modeling interval are:
[0024] a. Selecting the first band range in which the same turbidity has a constant effect on the measured parameter at any concentration; in the present invention, the absorption spectrum data of the measured parameter standard solution corresponding to the same turbidity and different gradient concentrations are compared;
[0025] b. Within the first wavelength range, the absorption spectrum data of the standard sample solution of the parameter to be measured with gradient concentration and its corresponding concentration are substituted into the wavelength selection algorithm to select the optimal modeling interval.
[0026] Furthermore, the wavelength selection algorithm is an interval partial least squares method, a moving window partial least squares method, a continuous projection method or an uninformative variable elimination method.
[0027] Furthermore, in S1.2 and S3, the continuous waveband is located in the waveband of 200nm-700nm; when ultraviolet absorption spectroscopy is adopted, the continuous waveband is located between 200-400nm, and when visible light absorption spectroscopy is adopted, the continuous waveband is located between 400-700nm.
[0028] At the same time, a computer-readable storage medium is also provided, on which a computer program is stored, and the special feature of the computer program is that when the program is executed by a processor, the steps of the above-mentioned water body parameter prediction method are implemented.
[0029] At the same time, a terminal device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, the special feature of which is that when the processor executes the computer program, the steps of the above-mentioned water body parameter prediction method are implemented.
[0030] Compared with the prior art, the present invention has the following beneficial effects:
[0031] 1. The present invention adds a turbidity compensation model in the process of predicting the concentration of water body parameters, which is used to correct the deviation of the absorption spectrum of water body parameters caused by turbidity and improve the accuracy of water body parameter concentration prediction. The modeling interval of the turbidity compensation model is a continuous band, which improves the modeling accuracy and thus improves the accuracy of the final water body parameter prediction, effectively avoiding the influence of turbidity on the prediction of water body parameters. At the same time, a turbidity prediction model is established to obtain the corresponding water body turbidity while predicting water body parameters.
[0032] 2. The absorbance in the modeling interval of the turbidity prediction model in the present invention is mainly contributed by turbidity, which avoids the influence of other water parameters on turbidity. The turbidity prediction model is also obtained based on the absorption spectrum of continuous bands.
[0033] 3. The present invention establishes a turbidity compensation model based on the linear characteristics of the differential spectrum and the corresponding turbidity. When performing turbidity compensation, the turbidity is substituted into the turbidity compensation model to calculate the turbidity compensation curve. The turbidity compensation curve is used to subtract the turbidity-affected part from the continuous original spectrum, thereby eliminating the turbidity effect on the original spectrum of the water body to be tested.
[0034] 4. The water body parameter prediction model of the present invention selects the first band range according to the influence characteristics of turbidity on water body parameters, and selects the optimal modeling interval through the wavelength selection algorithm, which is used to establish a prediction model for the parameters to be measured, effectively improving the accuracy of modeling.
[0035] 5. The present invention also provides a computer-readable storage medium and a terminal device capable of executing the above method steps, which can promote and apply the method of the present invention and realize water body parameter prediction on corresponding hardware devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 is a flow chart of a method for predicting nitrate nitrogen concentration in an embodiment of the present invention;
[0037] Figure 2 is a schematic diagram of a turbidity prediction model in an embodiment of the present invention;
[0038] Figure 3 is a differential spectrum of the mixed solution in an embodiment of the present invention;
[0039] Figure 4 is a schematic diagram of a nitrate nitrogen prediction model in an embodiment of the present invention;
[0040] Figure 5 It is a comparison chart of the results of predicting nitrate nitrogen concentration before and after turbidity compensation in an embodiment of the present invention. DETAILED DESCRIPTION
[0041] The present invention is further described in detail below in conjunction with specific embodiments and drawings.
[0042] The present invention provides a method for predicting water body parameters, which is mainly used to predict the concentration of water body related parameters by using ultraviolet or visible light absorption spectrum, and specifically comprises the following steps:
[0043] S1. Establishment of turbidity prediction model
[0044] The spectral areas corresponding to the absorption spectrum data of multiple groups of mixed solution samples were calculated, and a turbidity prediction model based on univariate linear regression was established using the multiple groups of spectral areas and the turbidity values of the corresponding mixed solutions.
[0045] The mixed solution sample is a mixed solution including the parameter to be measured and turbidity. The turbidity in the multiple groups of mixed solutions has a certain concentration gradient, and the same turbidity corresponds to at least two gradients of the concentration of the parameter to be measured.
[0046] The absorbance of the mixed solution in the modeling interval of the turbidity prediction model is mainly contributed by turbidity;
[0047] When there are multiple mixed solution samples corresponding to the same turbidity, the average value of the absorption spectra of the multiple mixed solution samples is taken as the absorption spectrum corresponding to the turbidity;
[0048] S2. Establishing turbidity compensation model
[0049] S2.1. Calculation of differential spectral data
[0050] The absorption spectrum data of the standard solution of the parameter to be measured of the corresponding concentration is subtracted from the absorption spectrum data of the mixed solution sample in S1.1 to obtain the differential spectrum data.
[0051] S2.2. Establishment of turbidity compensation model
[0052] The differential spectrum data of S2.1 and the turbidity of the corresponding mixed solution sample are used to establish a linear regression model of the two at different wavelengths, which is the turbidity compensation model, and the regression parameters at different wavelengths are calculated.
[0053] S3. Determine the optimal modeling range of water body parameters
[0054] The first waveband range is determined according to the influence of turbidity on the measured parameter, that is, the waveband in which the influence of the same turbidity on the absorption spectrum of the measured parameter with different gradient concentrations is a constant value is selected as the first waveband range; within the first waveband range, the absorption spectrum data of the measured parameter standard sample solution with gradient concentration and its corresponding concentration are substituted into the wavelength selection algorithm to select the optimal modeling interval. Among them, the wavelength selection algorithm can adopt the interval partial least squares method, the moving window partial least squares method, the continuous projection method, the non-information variable elimination method and other methods.
[0055] The optimal modeling interval is both the spectral interval for establishing the prediction model of the parameter to be measured and the spectral interval for performing turbidity compensation. The modeling interval of the turbidity compensation model must cover the optimal modeling interval. In other embodiments of the present invention, S3 may be performed first and then S2.
[0056] S4. Establishment of prediction model for parameters to be measured
[0057] The partial least squares method is used to perform regression analysis on the spectral data of the standard samples of the parameters to be measured with gradient concentrations within the optimal modeling interval and their corresponding concentrations of the parameters to be measured, and a prediction model for the parameters to be measured is calculated.
[0058] S5. Predict the parameters of the water sample to be tested
[0059] S5.1. Predict the turbidity of the water sample to be tested
[0060] Calculate the spectral area corresponding to the original absorption spectrum data of the water body to be tested, and substitute the spectral area into the turbidity prediction model in S1 to predict the turbidity value of the corresponding water body sample to be tested;
[0061] S5.2. Calculate the absorption spectrum data of the water sample to be tested after turbidity compensation
[0062] Substitute the turbidity value of S5.1 into the turbidity compensation model of S2.2 to calculate the corresponding turbidity compensation curve; calculate the absorption spectrum data of the water sample to be tested after turbidity compensation based on the original absorption spectrum data of the water sample to be tested and the turbidity compensation curve;
[0063] S5.3. Substitute the absorption spectrum data of the water sample to be tested after turbidity compensation into the parameter prediction model to be tested in S4 to obtain the concentration of the parameter to be tested and complete the water parameter prediction.
[0064] The prediction method of the present invention can be applied in a computer-readable storage medium, which stores a computer program. The above prediction method can be stored in the computer-readable storage medium as a computer program, and the computer program implements the steps of the above prediction method when executed by a processor.
[0065] In addition, the prediction method of the present invention can also be applied to a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the prediction method of the present invention when executing the computer program. The terminal device here can be a computer, a notebook, a PDA, and various cloud servers and other computing devices, and the processor can be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, or other programmable logic device, etc.
[0066] This embodiment combines the method of ultraviolet absorption spectroscopy to detect nitrate nitrogen in water. The method flow is as follows Figure 1 As shown, the specific steps include:
[0067] S1. Establishment of turbidity prediction model
[0068] S1.1. Collect absorption spectrum data of mixed solution samples
[0069] Collect absorption spectrum data of multiple groups of mixed solution samples in sequence, and the nitrate nitrogen concentration C of the corresponding mixed solution samples mix(n) Its turbidity T mix The method for preparing the mixed solution samples is as follows: using the nitrate nitrogen standard solution, the formazine standard solution, and ultrapure water to mix and prepare mixed solution samples of different concentration combinations.
[0070] S1.2. Model building
[0071] According to the absorption spectrum data collected in S1.1.A mixture Calculate the corresponding spectral area S mixture , using the spectral area S mixture The corresponding turbidity value T mix The turbidity prediction model based on univariate linear regression is established as follows:
[0072] T mix =β1·S mixture +β0
[0073] Among them, β0 and β1 are regression coefficients.
[0074] In this embodiment, 15 groups of mixed solution samples are obtained by mixing nitrate nitrogen standard solution, formazine standard solution and ultrapure water. The turbidities contained in the mixed solution samples are 10, 20, 30, 40, and 50 NTU, respectively. Each turbidity corresponds to three gradients of nitrate nitrogen concentration, which are 0.2, 2, and 4 mg / L, respectively. The absorption spectrum of each mixed solution sample in the wavelength range of 200-400 nm is obtained by using a UV-visible spectrophotometer. Among them, since the absorbance of nitrate nitrogen is basically 0 after 250 nm, the absorption spectrum of the mixed solution sample between 250-400 nm is almost entirely contributed by turbidity. Therefore, this embodiment selects the absorption spectrum data of the mixed solution sample between 250-400 nm. The same turbidity corresponds to three mixed solution samples with different nitrate nitrogen concentrations. The average value of its absorption spectrum is calculated as the absorption spectrum of the turbidity, and its corresponding spectral area is calculated. The corresponding spectral areas of 5 different turbidities are obtained by the same method. A turbidity prediction model based on univariate linear regression is established using different turbidities and their corresponding spectral areas, such as Figure 2 As shown, the regression equation is y=60.51x-2.708, and the determination coefficient is 0.9989.
[0075] S2. Establishing turbidity compensation model
[0076] S2.1. Calculation of differential spectral data
[0077] Absorption spectrum data of the mixed solution sample A in S1.1 mixture Subtract the absorption spectrum data of the corresponding concentration of nitrate nitrogen standard solution A from nitrate , and obtain the differential spectrum data A ref , as shown below:
[0078]
[0079] Wherein, n is the number of mixed solution samples, and λ is the number of wavelengths. The differential spectrum reflects the effect of turbidity on the nitrate nitrogen absorption spectrum.
[0080] S2.2. Establishment of turbidity compensation model
[0081] Using the differential spectrum data of S2.1 A ref and the turbidity T of the corresponding mixed solution sample mix The linear regression model of the two at different wavelengths is established as the turbidity compensation model, and the regression parameters a of the two at different wavelengths are calculated. i (i=1,2,…,λ) and b i (i=1,2,…,λ), the turbidity compensation model is shown as follows.
[0082]
[0083] S3. Determine the optimal modeling interval
[0084] According to the influence of turbidity on the absorption spectrum of nitrate nitrogen, the wavelength range in which the same turbidity has a constant value on the absorption spectrum of nitrate nitrogen of any concentration is selected as the first wavelength range. The nitrate nitrogen absorption spectrum data of the first wavelength range and its corresponding nitrate nitrogen concentration data are substituted into the wavelength selection algorithm to select the optimal modeling interval [λ m ,λ n ].
[0085] In this embodiment, when the wavelength is between 230-400 nm, the influence of the same turbidity measured on the spectral data of nitrate nitrogen of any concentration is fixed, such as Figure 3 As shown, after 230nm, the differential spectral absorbance curves corresponding to nitrate nitrogen concentrations of different gradient concentrations at the same turbidity overlap after 230nm, while between 200-230nm, the differential spectra corresponding to nitrate nitrogen concentrations of different gradient concentrations at the same turbidity are all different, indicating that the same turbidity between 200-230nm has different effects on the absorption spectra of nitrate nitrogen standard solutions of different concentrations, and it is difficult to establish a compensation model that adapts to any nitrate concentration. Therefore, the optimal modeling interval is selected in the band of 230-400nm. The optimal modeling interval selected according to the wavelength selection algorithm is 230-240nm, and a nitrate nitrogen concentration prediction model is established within this band.
[0086] In this embodiment, the absorption spectrum data of the corresponding nitrate nitrogen concentration is subtracted from the absorption spectrum data of the 15 groups of mixed solution samples in S1 to obtain differential spectrum data of different turbidities, and a turbidity compensation model at different wavelengths is established using the differential spectrum and the corresponding turbidity, wherein the regression coefficients in the range of 230-240nm are shown in Table 1; in this embodiment, the spectral interval is 0.5nm, and in other embodiments of the present invention, the spectral interval can be <1nm.
[0087]
[0088] S4. Establish a prediction model for nitrate nitrogen concentration
[0089] Select the absorption spectrum data of the nitrate nitrogen standard solution sample with gradient concentration A nitrate The optimal modeling interval [λ m ,λ n ] Spectral data A mn , for the spectral data A mn The corresponding nitrate concentration data C nitrate The partial least squares method is used for regression analysis to calculate the regression coefficient V and the inversion model of the predicted concentration. The inversion model of the predicted concentration, i.e., the nitrate nitrogen concentration prediction model, is:
[0090] C nitrate =A mn ·V
[0091] In this embodiment, the concentrations of the nitrate nitrogen standard solutions are 0.1, 0.2, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, and 5.0 mg / L, respectively, for a total of 10 groups. The nitrate nitrogen concentration data is C nitrate In the wavelength range of 200-400nm, the absorption spectrum data corresponding to the standard solution of nitrate nitrogen with different concentrations are A nitrate ; Select 10 groups of spectral data of nitrate nitrogen standard solution samples between 230-240nm, and establish a nitrate nitrogen prediction model based on partial least squares method according to the selected spectral data and the corresponding nitrate nitrogen concentration values, such as Figure 3 As shown, the model determination coefficient is 0.9996, and the predicted root mean square error is 0.0462 mg / L. The concentration of the nitrate nitrogen standard solution in this embodiment includes three gradients of nitrate nitrogen concentration corresponding to the mixed solution sample in S1, and there is no need to specially prepare a standard solution corresponding to the nitrate nitrogen concentration in the mixed solution, thereby reducing the number of samples required for absorption spectrum data collection;
[0092] In other embodiments of the present invention, other multivariate linear regression analysis methods may also be used to perform regression analysis to obtain a nitrate nitrogen concentration prediction model.
[0093] S5. Detection of nitrate concentration in the sample to be tested
[0094] S5.1. Collect the original absorption spectrum data of the water sample to be tested between 200-400nm wavelength A mes ;
[0095] S5.2. Predict the turbidity of the water sample to be tested
[0096] According to the absorption spectrum data A of the water sample to be tested mes Calculate the corresponding spectral area S mes , the spectral area S mesSubstitute the turbidity prediction model established in S1.2 into the following formula to calculate the turbidity value T of the water sample to be tested: mes .
[0097] T mes =β1·S mes +β0
[0098] S5.3. Calculate the absorption spectrum data of the water body to be tested after turbidity compensation
[0099] The turbidity value T of the water sample to be tested mes Substitute the turbidity compensation model established in S2 to calculate the turbidity compensation curve A of the water sample to be tested. tur , as shown below:
[0100]
[0101] According to the original absorption spectrum data A of the water sample to be tested mes and turbidity compensation curve A tur The absorption spectrum data A after turbidity compensation is calculated by the following formula com .
[0102] A com =A mes -A tur
[0103] S5.4. Predict the nitrate nitrogen concentration of the water sample to be tested
[0104] The absorption spectrum data A of the water body to be tested after turbidity compensation com Substitute it into the nitrate nitrogen concentration prediction model established in S4 to calculate the nitrate nitrogen concentration C of the water sample to be tested. mes .
[0105] C mes =A com ·V
[0106] In this embodiment, 5 groups of mixed samples of nitrate nitrogen and turbidity to be tested are configured as water samples to be tested, and the nitrate nitrogen concentration of the mixed sample to be tested is obtained through the process from S5.1 to S5.4, and the corresponding turbidity value can also be obtained. The nitrate nitrogen concentration of the water sample to be tested obtained after compensation using this method, the nitrate nitrogen concentration measured without compensation and the true value of the nitrate nitrogen concentration are compared, and the results are as follows: Figure 4As shown in the figure, the points representing the true value and the nitrate nitrogen concentration after compensation almost coincide. Before compensation, the relative error of nitrate nitrogen concentration calculation was 50.33%, and the predicted root mean square error was 0.7845 mg / L. After compensation, the relative error was reduced to 1.33%, and the predicted root mean square error was 0.0359 mg / L. It can be seen from the experimental results that, combined with the turbidity compensation method of the present invention, the nitrate nitrogen mixed water sample containing turbidity can be accurately predicted, providing a technical reference for the direct detection of nitrate nitrogen content in the environment.
[0107] In other embodiments of the present invention, the method can also be used to predict other water parameters, including COD, TOC and other water parameters that can be measured using ultraviolet-visible absorption spectra. The modeling intervals of the turbidity prediction model, the turbidity compensation model and the parameter prediction model to be measured are adjusted according to the band range of the ultraviolet or visible light absorption spectrum and the absorption spectrum characteristics of the parameter to be measured. The band range of the ultraviolet absorption spectrum is 200-400nm, and the band range of the visible light absorption spectrum is 400-700nm.
Claims
1. A method for predicting water body parameters, characterized in that: The following steps are involved: S1. Predict the turbidity of the water sample to be tested S1.
1. Calculate the spectral area corresponding to the original absorption spectrum data of the water body to be tested; S1.
2. Use the spectral area to predict the turbidity value of the water sample to be tested according to the turbidity prediction model; The turbidity prediction model is established based on the area of the absorption spectrum of the mixed solution sample and its corresponding turbidity value; the mixed solution is a mixed solution including the parameter to be measured and the turbidity; the original absorption spectrum and the absorption spectrum of the mixed solution sample are both absorption spectra of continuous bands; S2. Calculate the absorption spectrum data of the water body to be tested after turbidity compensation S2.
1. Substitute the turbidity value obtained in S1.2 into the turbidity compensation model to calculate the corresponding turbidity compensation curve; The method for establishing the turbidity compensation model is: a. subtracting the absorption spectrum data of the standard solution of the parameter to be measured of the corresponding concentration from the absorption spectrum data of the mixed solution sample to obtain differential spectrum data; b. using the differential spectrum data and the turbidity of the corresponding mixed solution sample to establish a linear regression model of the two at different wavelengths as a turbidity compensation model; S2.
2. Calculate the absorption spectrum data of the water body to be tested after turbidity compensation based on the original absorption spectrum data of the water body to be tested and the turbidity compensation curve obtained in S2.1; S3. Predict the concentration of the parameter to be measured Substituting the absorption spectrum data of the water body to be measured after turbidity compensation into the prediction model of the parameter to be measured, obtaining the corresponding concentration of the parameter to be measured, and completing the prediction of the water body parameter; The parameter prediction model to be measured is established based on the absorption spectrum data of the standard sample of the parameter to be measured and its corresponding concentration, and the absorption spectrum of the standard sample of the parameter to be measured is an absorption spectrum of a continuous band.
2. A method for predicting water body parameters according to claim 1, characterized in that: In S1, the turbidity prediction model is established based on a univariate linear regression model, and the absorbance in the modeling interval of the turbidity prediction model is contributed by the turbidity; In S3, the prediction model of the parameter to be measured is obtained by performing regression analysis using the partial least squares method.
3. A method for predicting water body parameters according to claim 1 or 2, characterized in that: In S3, the modeling interval of the parameter prediction model to be measured is the optimal modeling interval, and the steps for determining the optimal modeling interval are: a. Select the band where the same turbidity has a constant effect on the measured parameter of any concentration as the first band range; b. Within the first wavelength range, the absorption spectrum data of the standard sample solution of the parameter to be measured with gradient concentration and its corresponding concentration are substituted into the wavelength selection algorithm to select the optimal modeling interval.
4. A method for predicting water body parameters according to claim 3, characterized in that: The wavelength selection algorithm is an interval partial least squares method, a moving window partial least squares method, a continuous projection method or a non-information variable elimination method.
5. A method for predicting water body parameters according to claim 4, characterized in that: In S1.2 and S3, the continuous waveband is located in the waveband of 200 nm-700 nm.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of a water body parameter prediction method as described in any one of claims 1 to 5 are implemented.
7. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of a water body parameter prediction method as described in any one of claims 1 to 5 are implemented.