Cross water area-oriented total phosphorus index detection method by spectrum method
By designing a spectral total phosphorus detection method for cross-water areas, using the spectral characteristic matrix and related models, the problem of detection of total phosphorus index in complex intersection basins is solved, and a high-precision, fast and pollution-free detection effect is achieved.
Patent Information
- Application Number
- CN202411986205.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-06
AI Technical Summary
Existing spectroscopic water quality monitoring technology is difficult to effectively detect total phosphorus indicators in complex intersection basins and large-scale areas.
A total phosphorus detection method for cross-water spectroscopy was designed. By obtaining the spectral set and total phosphorus index values of branched basins far away from the intersection center, the characteristics of total phosphorus discrete bands were extracted, the wavelength matrix of total phosphorus spectroscopy was established, and the relevant models were fitted to establish. Through the union processing and random mixing of samples, the cross-water spectral samples were simulated, and joint modeling was carried out to predict the water quality index of cross-water areas.
It has achieved rapid detection of the total phosphorus content in mixed waters, improved the accuracy of the total phosphorus index in cross-water areas, and has strong timeliness and no pollution.
Smart Images

Figure CN119935926A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for detecting a total phosphorus index of water quality, in particular to a method for detecting the total phosphorus index of water quality using a spectral method. Background Art
[0002] Spectroscopic water quality monitoring technology has been gradually applied to the water quality detection industry. Spectroscopic water quality detection has the advantages of fast timeliness and no pollution. In spectral water quality detection, water quality index modeling is the top priority. At present, modeling methods for single-point waters have appeared, but there are no mature reports on detection methods for complex confluence basins and large-scale areas. The total phosphorus index detection method provided by the present invention fills the application gap of spectral water quality monitoring to a certain extent. Summary of the invention
[0003] Purpose of the invention: A spectral total phosphorus detection method for cross-water areas is designed to detect the total phosphorus content in mixed water areas based on the complex geographical environment and variable water quality parameters.
[0004] Technical solution: A spectral total phosphorus index detection method for cross-water areas, including:
[0005] Step 1: Taking the intersection center of the water area as the reference point, obtain the spectrum set of N branch basins far away from the intersection center [S1, S2, …, S N ], and obtain the corresponding total phosphorus index value TP through chemical testing i Get the total phosphorus index value set [TP1, TP2,…, TP N ];
[0006] Step 2: Extract the total phosphorus discrete band characteristics based on the spectrum set and the total phosphorus index value set, and establish the total phosphorus spectrum characteristic wavelength matrix set R i , where 1≤i≤N;
[0007] Step 3: Repeat step 2 to calculate the spectral characteristic matrix set of all tributaries far away from the cross-confluence area [R1, R2, …, R N ];
[0008] Step 4: Using the total phosphorus spectrum characteristic wavelength matrix set R i And the corresponding total phosphorus index value TP i As independent variable and dependent variable, the total phosphorus correlation model F was obtained by fitting respectively. i ;
[0009] Step 5: Repeat step 4 to obtain the total phosphorus related model set [F1, F2, …, F N ];
[0010] Step 6: Substitute the branch spectrum feature matrix set [R1, R2, ..., R N ] The intersection and union processing is performed with the spectral wavelength as the unit to obtain a new total phosphorus spectral feature matrix set [R i ,R ij ,…,R ij…N ];
[0011] Step 7: Set the new total phosphorus spectral feature matrix set [R i ,R ij ,…,R ij…N ] According to the number of tributaries involved, the spectra of several sample water samples from the branch basins far away from the intersection center are randomly mixed in different proportions to obtain the mixed water spectrum sample feature set under the new matrix set [S i ,S ij ,…,S ij…N ], to record the mixed concentration of the mixed water sample [TP i ,TP ij ,…,TP ij…N ];
[0012] Step 8: Get a new total phosphorus spectrum feature matrix set [R i ,R ij ,…,R ij…N ] corresponds to the mixed water spectral sample feature set [S i ,S ij ,…,S ij…N ] in the spectrum collection [U i ,U ij ,…,U ij…N ], and the mixed water sample concentration [TP i ,TP ij ,…,TP ij…N ] one by one, establish an overdetermined equation, and solve the concentration contribution matrix set of each water sample [X i ,X ij ,…,X ij…N ];
[0013] Step 9: Obtain a water sample to be tested in the cross-mixing basin, and take several water samples near the water sample to be tested to form a spectrum set of the water sample to be tested [E1, E2, …, E N ], and calculate the spectrum set [S1,S2,…,S N ], and obtain the similarity matrix [L1,L2,…,L N ];
[0014] Step 10: According to the similarity matrix [L1, L2, ..., L N ], a new total phosphorus spectral feature matrix set [R i ,Rij ,…,R ij…N ] corresponding to the wavelength and water sample concentration contribution matrix set [X i ,X ij ,…,X ij…N ] and total phosphorus correlation model F i Calculate the total phosphorus value for the catchment area.
[0015] In a further embodiment, step 2 specifically includes the following process:
[0016] Step 2-1: Set the spectrum set [S1, S2, …, S N ] and the total phosphorus index value set [TP1,TP2,…,TP N ] to conduct regression fitting analysis and determine the optimal number of principal components f;
[0017] Step 2-1: Randomly generate a noise set [T1, T2, …, T N ], and combined with the spectrum set to form the spectral noise set [S1,S2,…,S N ,T1,T2,…,T N ];
[0018] Step 2-3: Based on the optimal number of principal components f generated in step 2-1, the spectral noise set [S1, S2, …, S N ,T1,T2,…,T N ] and the total phosphorus index value set [TP1,TP2,…,TP N ] to perform fitting regression analysis and obtain the regression coefficient vector set [B1, B2,…, B N ,B N+1 ,…,B 2N ];
[0019] Step 2-4: Calculate the standard deviation δ and mean M of the regression coefficient vector set to obtain the regression coefficient quotient difference set [C1, C2, …, C N ,C N+1 ,…,C 2N ], and calculate the maximum quotient difference C of the regression coefficient vector set in the noise area max ;
[0020] Step 2-5: retain the spectral point set whose quotient difference of the spectral region in the regression coefficient vector set is less than the maximum quotient difference of the noise region as the total phosphorus spectral characteristic wavelength matrix set R i .
[0021] In a further embodiment, the specific steps of step 6 are as follows:
[0022] Step 6-1: Prioritize the selection of the tributary spectral feature matrix set [R1, R2, …, R N ], the spectral segment with the largest number of cross-branch basins is used as the confluence characteristic matrix R of the corresponding branch basin. ij…N ;
[0023] Step 6-2: Use the remaining matrix parameters selected in step 6-1 to filter out the confluence characteristic matrix R of other corresponding branch basins according to step 6-1. ij ;
[0024] Step 6-3, looping steps 6-1 and 6-2 until all intersecting watersheds are in the confluence feature matrix;
[0025] Step 6-4: For all total phosphorus spectral feature matrix sets that have no intersection, use them as the confluence feature matrix R of the branch basin separately. i ;
[0026] Step 6-5: Integrate all confluence feature matrices to form a confluence feature matrix set [R i ,R ij ,…,R ij…N ].
[0027] In a further embodiment, the specific process of step 8 is as follows:
[0028] Step 8-1, Spectral Collection [U i ,U ij ,…,U ij…N ] The number of spectral band points corresponding to each subset in is greater than the number of participating branch basins under the subset;
[0029] Step 8-2: Use the least squares method to find the optimal solution of the overdetermined equation.
[0030] In a further embodiment, the similarity calculation formula in step 9 is as follows:
[0031]
[0032] In a further embodiment, the calculation process of the total phosphorus value of the confluence area is as follows:
[0033] Step 10-1, in the similarity matrix [L1,L2,…,L N ], if there is a similarity > 90% and the other similarities are < 60%, then the model F that is far away from the intersection area is used. i Directly solve for total phosphorus value;
[0034] Step 10-2: In the similarity matrix [L1,L2,…,L N], if all similarities are < 60%, then the spectrum to be tested [E1, E2, …, E N ] as a new spectrum set far from the crossing waters, repeat steps 1 to 10;
[0035] Step 10-3: For the cases that do not belong to step 10-1 and step 10-2, the water sample concentration contribution matrix set [X i ,X ij ,…,X ij…N ], the spectrum set corresponding to the spectral feature [U i ,U ij ,…,U ij…N ], calculate the total phosphorus value of each branch basin, and the total phosphorus value of the spectrum to be tested is the sum of the total phosphorus values of each branch basin.
[0036] In a further embodiment, if a branch watershed calculated in step 10-3 corresponds to multiple total phosphorus values, the average value is taken as the participating total phosphorus value of the branch watershed.
[0037] In a further embodiment, the spectrum set [S1, S2, ..., S N ]The wavelength range is 200nm~800nm.
[0038] Beneficial effects: Compared with existing chemical method equipment: this method is time-effective, green and pollution-free; compared with existing spectral methods, it solves the total phosphorus detection method in complex watersheds. At the same time, based on the spectrum of tributary waters, the present invention extracts the characteristic matrix corresponding to the water quality index, and performs intersection and union processing on the characteristic evidence, further extracts the water quality characteristic matrix of the cross-water area, and removes redundant spectral information. By randomly mixing tributary water samples, simulating cross-water spectral samples, and jointly modeling with cross-water spectral characteristic evidence, and predicting the composition and index value of cross-water water quality indicators by similarity and contribution methods, the accuracy of total phosphorus indicators in cross-water areas is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0040] This embodiment provides a spectral total phosphorus index detection method for cross-water areas, such as Figure 1 As shown, the following steps are included:
[0041] Step 1: Taking the intersection center of the water area as the reference point, obtain the spectrum set of N branch basins far away from the intersection center [S1, S2, …, S N ], and obtain the corresponding total phosphorus index value TP through chemical testing iGet the total phosphorus index value set [TP1, TP2,…, TP N ]; where the spectrum set of the branch basin far away from the intersection center [S1,S2,…,S N ]The wavelength range is 200nm~800nm.
[0042] Step 2: Extract the total phosphorus discrete band characteristics based on the spectrum set and the total phosphorus index value set, and establish the total phosphorus spectrum characteristic wavelength matrix set R i , where 1≤i≤N, further, step 2 specifically includes the following process:
[0043] Step 2-1: Set the spectrum set [S1, S2, …, S N ] and the total phosphorus index value set [TP1,TP2,…,TP N ] to conduct regression fitting analysis and determine the optimal number of principal components f;
[0044] Step 2-1: Randomly generate a noise set [T1, T2, …, T N ], and combined with the spectrum set to form the spectral noise set [S1,S2,…,S N ,T1,T2,…,T N ];
[0045] Step 2-3: Based on the optimal number of principal components f generated in step 2-1, the spectral noise set [S1, S2, …, S N ,T1,T2,…,T N ] and the total phosphorus index value set [TP1,TP2,…,TP N ] to perform fitting regression analysis and obtain the regression coefficient vector set [B1, B2,…, B N ,B N+1 ,…,B 2N ];
[0046] Step 2-4: Calculate the standard deviation δ and mean M of the regression coefficient vector set to obtain the regression coefficient quotient difference set [C1, C2, …, C N ,C N+1 ,…,C 2N ], and calculate the maximum quotient difference C of the regression coefficient vector set in the noise area max ;
[0047] Step 2-5: retain the spectral point set whose quotient difference of the spectral region in the regression coefficient vector set is less than the maximum quotient difference of the noise region as the total phosphorus spectral characteristic wavelength matrix set R i .
[0048] Step 3: Repeat step 2 to calculate the spectral characteristic matrix set of all tributaries far away from the cross-confluence area [R1, R2, …, R N ];
[0049] Step 4: Using the total phosphorus spectrum characteristic wavelength matrix set R i And the corresponding total phosphorus index value TP i As independent variable and dependent variable, the total phosphorus correlation model F was obtained by fitting respectively. i ;
[0050] Step 5: Repeat step 4 to obtain the total phosphorus related model set [F1, F2, …, F N ];
[0051] Step 6: Substitute the branch spectrum feature matrix set [R1, R2, ..., R N ] The intersection and union processing is performed with the spectral wavelength as the unit to obtain a new total phosphorus spectral feature matrix set [R i ,R ij ,…,R ij…N ];
[0052] Specifically, the specific steps of step 6 are as follows:
[0053] Step 6-1: Prioritize the selection of the tributary spectral feature matrix set [R1, R2, …, R N ], the spectral segment with the largest number of cross-branch basins, is used as the confluence characteristic matrix R of the corresponding branch basin ij…N ; where i, j...N, represents the number of tributaries involved in the intersection. If the wavelength corresponding to the characteristic matrix of a tributary does not intersect, it is recorded as R i , the wavelengths corresponding to the matrices of two tributaries intersect, which is recorded as R ij , the wavelengths corresponding to the matrices of multiple tributaries intersect and are recorded as R ij…N ;
[0054] Step 6-2: Use the remaining matrix parameters selected in step 6-1 to filter out the confluence characteristic matrix R of other corresponding branch basins according to step 6-1. ij ;
[0055] Step 6-3, looping step 6-1 and step 6-2 until all the intersecting watersheds are in the confluence characteristic matrix;
[0056] Step 6-4: For all total phosphorus spectral feature matrix sets that have no intersection, use them as the confluence feature matrix R of the branch basin separately. i ;
[0057] Step 6-5: Integrate all confluence feature matrices to form a confluence feature matrix set [R i ,Rij ,…,R ij…N ].
[0058] Step 7: Set the new total phosphorus spectral feature matrix set [R i ,R ij ,…,R ij…N ] According to the number of tributaries involved, the spectra of several sample water samples from the branch basins far away from the intersection center are randomly mixed in different proportions to obtain the mixed water spectrum sample feature set under the new matrix set [S i ,S ij ,…,S ij…N ], to record the mixed concentration of the mixed water sample [TP i ,TP ij ,…,TP ij…N ];
[0059] Step 8: Get a new total phosphorus spectrum feature matrix set [R i ,R ij ,…,R ij…N ] corresponds to the mixed water spectral sample feature set [S i ,S ij ,…,S ij…N ] in the spectrum collection [U i ,U ij ,…,U ij…N ], and the mixed water sample concentration [TP i ,TP ij ,…,TP ij…N ] one by one, establish an overdetermined equation, and solve the concentration contribution matrix set of each water sample [X i ,X ij ,…,X ij…N ]; The specific process is as follows:
[0060] Step 8-1, Spectral Collection [U i ,U ij ,…,U ij…N ] The number of spectral band points corresponding to each subset in is greater than the number of participating branch basins under the subset;
[0061] Step 8-2: Use the least squares method to find the optimal solution of the overdetermined equation.
[0062] Step 9: Obtain a water sample to be tested in the cross-mixing basin, and take several water samples near the water sample to be tested to form a spectrum set of the water sample to be tested [E1, E2, …, E N ], and calculate the spectrum set [S1,S2,…,S N ], and obtain the similarity matrix [L1,L2,…,L N]; the similarity calculation formula in step 9 is as follows:
[0063]
[0064] Step 10: According to the similarity matrix [L1, L2, ..., L N ], a new total phosphorus spectral feature matrix set [R i ,R ij ,…,R ij…N ] corresponding to the wavelength and water sample concentration contribution matrix set [X i ,X ij ,…,X ij…N ] and total phosphorus correlation model F i Calculate the total phosphorus value of the catchment area. The calculation process of the total phosphorus value of the catchment area is as follows:
[0065] Step 10-1, in the similarity matrix [L1,L2,…,L N ], if there is a similarity > 90% and the other similarities are < 60%, then the model F that is far away from the intersection area is used. i Directly solve for total phosphorus value;
[0066] Step 10-2: In the similarity matrix [L1,L2,…,L N ], if all similarities are < 60%, then the spectrum to be tested [E1, E2, …, E N ] as a new spectrum set far from the crossing waters, repeat steps 1 to 10;
[0067] Step 10-3: For the cases that do not belong to step 10-1 and step 10-2, the water sample concentration contribution matrix set [X i ,X ij ,…,X ij…N ], the spectrum set corresponding to the spectral feature [U i ,U ij ,…,U ij…N ], calculate the total phosphorus value of each branch basin, and the total phosphorus value of the spectrum to be tested is the sum of the total phosphorus values of each branch basin.
[0068] If a branch watershed calculated in step 10-3 corresponds to multiple total phosphorus values, the average value is taken as the participating total phosphorus value of the branch watershed.
[0069] The above disclosure is only a preferred embodiment of the present invention, and cannot be used to limit the scope of rights of the patent of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A spectral total phosphorus index detection method for cross-waters, characterized in that: include: Step 1: Taking the intersection center of the water area as the reference point, obtain the spectrum set of N branch basins far away from the intersection center [S1, S2, …, S N ], and obtain the corresponding total phosphorus index value TP through chemical testing i Get the total phosphorus index value set [TP1, TP2,…, TP N ]; Step 2: Extract the total phosphorus discrete band characteristics based on the spectrum set and the total phosphorus index value set, and establish the total phosphorus spectrum characteristic wavelength matrix set R i , where 1≤i≤N; Step 3: Repeat step 2 to calculate the spectral characteristic matrix set of all tributaries far away from the cross-confluence area [R1, R2, …, R N ]; Step 4: Using the total phosphorus spectrum characteristic wavelength matrix set R i And the corresponding total phosphorus index value TP i As independent variable and dependent variable, the total phosphorus correlation model F was obtained by fitting respectively. i ; Step 5: Repeat step 4 to obtain the total phosphorus related model set [F1, F2, …, F N ]; Step 6: Substitute the branch spectrum feature matrix set [R1, R2, ..., R N ] The intersection and union processing is performed with the spectral wavelength as the unit to obtain a new total phosphorus spectral feature matrix set [R i ,R ij ,…,R ij…N ], where i, j...N, represents the number of tributaries involved in the intersection. If the wavelength corresponding to the characteristic matrix of a tributary does not intersect, it is recorded as R i , the wavelengths corresponding to the matrices of two tributaries intersect, which is recorded as R ij , the wavelengths corresponding to the matrices of multiple tributaries intersect and are recorded as R ij…N ; Step 7: Set the new total phosphorus spectral feature matrix set [R i ,R ij ,…,R ij…N ] According to the number of tributaries involved, the spectra of several sample water samples from the branch basins far away from the intersection center are randomly mixed in different proportions to obtain the mixed water spectrum sample feature set under the new matrix set [S i ,S ij ,…,S ij…N ], to record the mixed concentration of the mixed water sample [TP i ,TP ij ,…,TP ij…N ]; Step 8: Get a new total phosphorus spectrum feature matrix set [R i ,R ij ,…,R ij…N ] corresponds to the mixed water spectral sample feature set [S i ,S ij ,…,S ij…N ] in the spectrum collection [U i ,U ij ,…,U ij…N ], and the mixed water sample concentration [TP i ,TP ij ,…,TP ij…N ] one by one, establish an overdetermined equation, and solve the concentration contribution matrix set of each water sample [X i ,X ij ,…,X ij…N ]; Step 9: Obtain a water sample to be tested in the cross-mixing basin, and take several water samples near the water sample to be tested to form a spectrum set of the water sample to be tested [E1, E2, …, E N ], and calculate the spectrum set [S1,S2,…,S N ], and obtain the similarity matrix [L1,L2,…,L N ]; Step 10: According to the similarity matrix [L1, L2, ..., L N ], a new total phosphorus spectral feature matrix set [R i ,R ij ,…,R ij…N ] corresponding to the wavelength and water sample concentration contribution matrix set [X i ,X ij ,…,X ij…N ] and total phosphorus correlation model F i Calculate the total phosphorus value for the catchment area.
2. The method for detecting total phosphorus index by spectral method for cross-water areas according to claim 1, characterized in that: The step 2 specifically includes the following process: Step 2-1: Set the spectrum set [S1, S2, …, S N ] and the total phosphorus index value set [TP1,TP2,…,TP N ] Carry out regression fitting analysis to determine the optimal number of principal components f; Step 2-1: Randomly generate a noise set [T1, T2, …, T N ], and combined with the spectrum set to form the spectral noise set [S1,S2,…,S N ,T1,T2,…,T N ]; Step 2-3: Based on the optimal number of principal components f generated in step 2-1, the spectral noise set [S1, S2, …, S N ,T1,T2,…,T N ] and the total phosphorus index value set [TP1,TP2,…,TP N ] to perform fitting regression analysis and obtain the regression coefficient vector set [B1, B2,…, B N ,B N+1 ,…,B 2N ]; Step 2-4: Calculate the standard deviation δ and mean M of the regression coefficient vector set to obtain the regression coefficient quotient difference set [C1, C2, …, C N ,C N+1 ,…,C 2N ], and calculate the maximum quotient difference C of the regression coefficient vector set in the noise area max ; Step 2-5: retain the spectral point set whose quotient difference of the spectral region in the regression coefficient vector set is less than the maximum quotient difference of the noise region as the total phosphorus spectral characteristic wavelength matrix set R i .
3. The method for detecting total phosphorus index by spectral method for cross-water areas according to claim 1, characterized in that: The specific steps of step 6 are as follows: Step 6-1: Prioritize the selection of the tributary spectral feature matrix set [R1, R2, …, R N ], the spectral segment with the largest number of cross-branch basins, is used as the confluence characteristic matrix R of the corresponding branch basin ij…N ; Step 6-2: Use the remaining matrix parameters selected in step 6-1 to filter out the confluence characteristic matrix R of other corresponding branch basins according to step 6-1. ij ; Step 6-3, looping step 6-1 and step 6-2 until all the intersecting watersheds are in the confluence characteristic matrix; Step 6-4: For all total phosphorus spectral feature matrix sets that have no intersection, use them as the confluence feature matrix R of the branch basin separately. i ; Step 6-5: Integrate all confluence feature matrices to form a confluence feature matrix set [R i ,R ij ,…,R ij…N ].
4. The method for detecting total phosphorus index by spectral method for cross-water areas according to claim 1, characterized in that: The specific process of step 8 is as follows: Step 8-1, Spectral Collection [U i ,U ij ,…,U ij…N ] The number of spectral band points corresponding to each subset in is greater than the number of participating branch basins under the subset; Step 8-2: Use the least squares method to find the optimal solution of the overdetermined equation.
5. The method for detecting total phosphorus index by spectral method for cross-water areas according to claim 1, characterized in that: The similarity calculation formula in step 9 is as follows:
6. The method for detecting total phosphorus index by spectral method for cross-water areas according to claim 1, characterized in that: The calculation process of the total phosphorus value in the catchment area is as follows: Step 10-1, in the similarity matrix [L1,L2,…,L N ], if there is a similarity > 90% and the other similarities are < 60%, then the model F that is far away from the intersection area is used. i Directly solve for total phosphorus value; Step 10-2: In the similarity matrix [L1,L2,…,L N ], if all similarities are < 60%, then the spectrum to be tested [E1, E2, …, E N ] as a new spectrum set far from the crossing waters, repeat steps 1 to 10; Step 10-3: For the cases that do not belong to step 10-1 and step 10-2, the water sample concentration contribution matrix set [X i ,X ij ,…,X ij…N ], the spectrum set corresponding to the spectral feature [U i ,U ij ,…,U ij…N ], calculate the total phosphorus value of each branch basin, and the total phosphorus value of the spectrum to be tested is the sum of the total phosphorus values of each branch basin.
7. The method for detecting total phosphorus index by spectral method for cross-water areas according to claim 6, characterized in that: If a branch watershed calculated in step 10-3 corresponds to multiple total phosphorus values, the average value is taken as the participating total phosphorus value of the branch watershed.
8. The method for detecting total phosphorus index by spectral method for cross-water areas according to claim 1, characterized in that: The spectrum set of the branch basin far away from the intersection center [S1,S2,…,S N ]The wavelength range is 200nm~800nm.