A quantitative detection method for nitrate in water based on Raman spectroscopy

Through the quantitative detection method of water quality nitrate based on Raman spectroscopy, the combination of training and application layers is used to solve the problems of time-consuming, easy sample destruction and high cost in the existing detection methods, and achieve lossless, fast and high sensitivity detection effects .

CN114965429BActive Publication Date: 2025-02-07CHONGQING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210554736.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-20
Publication Date
2025-02-07
Estimated Expiration
2042-05-20

AI Technical Summary

Technical Problem

The existing quantitative detection methods for water quality nitrates have problems such as long time, easy sample damage, high detection cost, and weak ease of use and reusability.

Method used

Using the quantitative detection method of water nitrate based on Raman spectroscopy, the characteristics of Raman spectroscopy are used to detect through the combination of training layer and application layer, including training processing layer, training fitting layer, training verification layer, parameter memory layer, Application processing layer, application fitting layer, application verification layer, and data display layer.

Benefits of technology

It realizes lossless, fast and highly sensitive quantitative detection of water-quality nitrates, can calculate nitrate content in real time, has anti-interference ability, reduces detection costs, and improves detection accuracy and ease of use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114965429B_ABST
    Figure CN114965429B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for quantitatively detecting nitrate of water quality based on Raman spectroscopy, and belongs to the technical field of Raman spectroscopy detection. The present invention has the following advantages: (1) Raman spectroscopy is used as the basis for determination, so as to avoid damage to the water body to be measured, and the method is non-destructive; (2) data acquisition and implementation processes are relatively simple, and the nitrate content of the water body to be measured can be calculated immediately after the Raman spectrum of the water body to be measured is collected, and the method has real-time and sensitivity; (3) the training processing layer and the application processing layer both consider the possible offset phenomenon of the Raman spectrum, and the peak data can also be obtained for the Raman spectrum with a certain offset, and the method has anti-interference; (4) the training layer and the application layer are both provided with a verification part to ensure accuracy; (5) each component has clear logic, clear division of labor, and can be deployed in a distributed manner, and the method has flexibility; (6) the method has the characteristics of non-destructive, rapid, high sensitivity and anti-water interference, and the method can be widely used in environmental protection construction, urban planning, emergency monitoring, agricultural supervision and industrial layout planning, etc.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of Raman spectrum detection, and relates to a method for quantitatively detecting nitrate in water quality based on Raman spectrum. Background Art

[0002] Nitrate is the anion of nitrate and one of the important indicators for water quality monitoring. It enters the water body through sludge inflow, sewage discharge and garbage dumping, causing water environmental pollution, thus affecting people's production and life. The current mainstream methods for quantitative detection of nitrate in water quality are spectrophotometry and ion chromatography. Although these two methods have high detection accuracy, they have certain limitations. Spectrophotometry requires sample pretreatment, which is time-consuming and easy to damage the sample; ion chromatography requires the use of professional instruments for measurement, which increases the detection cost, and has poor ease of use and reusability.

[0003] Raman spectroscopy is a scattering spectrum, also known as "molecular fingerprint". From Raman spectroscopy, information on the molecular vibration energy level and rotation energy level structure can be obtained, and it is widely used in material identification, chemical analysis, etc. The water quality nitrate detection method based on Raman spectroscopy has the characteristics of non-destructive, rapid, and high sensitivity, but the determination of the specific content of nitrate is affected by factors such as sample molecular distribution, instrument stability, and uniformity of the enhancing medium.

[0004] Therefore, it is necessary to study a quantitative detection method for nitrate in water quality based on Raman spectroscopy. Summary of the invention

[0005] In view of this, the object of the present invention is to provide a method for quantitative detection of water quality nitrate based on Raman spectroscopy.

[0006] In order to achieve the above object, the present invention provides the following technical solutions:

[0007] A method for quantitatively detecting nitrate in water based on Raman spectroscopy, the method comprising a training layer and an application layer;

[0008] The training layer is responsible for memorizing the parameter relationship between the Raman spectrum of the measured water sample and the nitrate content, and includes a training processing layer, a training fitting layer, a training verification layer and a parameter memory layer connected in sequence;

[0009] The application layer obtains the content of nitrate in the water sample to be tested through the parameter relationship and the Raman spectrum of the water sample to be tested, and includes an application processing layer, an application fitting layer, an application verification layer and a data display layer connected in sequence;

[0010] The parameter memory layer is connected to the application processing layer, and the application processing layer is connected to the data display layer.

[0011] Preferably, in the training processing layer, a column vector with the same number of rows N and a size of N×2 is received, which respectively represents the peak value of the Raman spectrum of the measured water sample and the nitrate content in the measured water sample, wherein the peak value is the peak value at 1024.1cm in the Raman spectrum. -1 ~1065.9cm -1 The peak value of the interval, the Raman spectrum includes but is not limited to any one of the original Raman spectrum obtained by a Raman spectrometer in the measured water sample, the Raman spectrum after baseline processing, or the Raman spectrum using surface enhanced Raman spectrum, after the vacant data and the gross error data are eliminated, they are integrated into a matrix M and sent to the training and fitting layer;

[0012] In the training fitting layer, the optimal parameter K is deduced using the Levenberg-Marquardt method according to the preset template equation for parameter deduction and the input matrix M, and the matrix M, the corresponding equation F and the optimal parameter K are sent to the training verification layer;

[0013] In the training verification layer, the predicted value MP is calculated through the matrix M, the corresponding equation F and the optimal parameter K. The true value in the matrix M is recorded as T, the mean value of T is recorded as μ, and the determination coefficient R is arranged in descending order. i Based on this, we select the optimal parameter K_best and the corresponding equation F_best, both of which are N, and finally compare them with the determination coefficient R 2 Sent to the parameter memory layer together,

[0014] Where R i Calculate according to the following formula: ;

[0015] In the parameter memory layer, incoming data is received and stored in any suitable data structure.

[0016] Preferably, in the application processing layer, a Raman spectrum peak value (the peak value is the peak value at 1024.1 cm in the Raman spectrum) of N rows representing the water sample to be tested is received. -1 ~1065.9cm -1 The peak value of the interval, the Raman spectrum includes but is not limited to any one of the original Raman spectrum obtained by a Raman spectrometer in the water sample to be tested, the Raman spectrum after baseline processing, or the Raman spectrum using surface enhanced Raman spectrum), the missing data and the gross error data are eliminated, and the processed Raman spectrum peak column vector V of the water sample to be tested is sent to the application fitting layer and the data display layer;

[0017] In the application fitting layer, the input Raman spectrum peak column vector V of the water sample to be tested, the optimal parameter K_best in the training verification layer and the corresponding equation F_best are used to obtain the optimal parameter K_best. The formula calculates the nitrate content matrix C in the water sample to be tested and sends it to the application verification layer;

[0018] In the application verification layer, according to the input nitrate content matrix C and the determination coefficient R 2 , calculate the final nitrate content column vector Y and send it to the data display layer;

[0019] In the data display layer, the final nitrate content calculated by applying the verification layer is converted into a file format that can be directly viewed and applied.

[0020] Further preferably, in order to eliminate the missing data and gross error data of the Raman spectrum peak of the measured water sample and the nitrate content in the measured water sample, the following operations are performed:

[0021] The peak value of the Raman spectrum of the measured water sample is recorded as vector V1, and the actual nitrate content of the measured water sample is recorded as vector V2, and the processing is performed in parallel. The steps are as follows:

[0022] (1) Definition of V i represents the vector currently being processed, i represents the number of columns currently being processed, j represents the number of rows, and E i,j Represents the element currently being processed, μ i V i The mean value, σ i V i The standard deviation and deviation D i Represents the current element E i,j The degree of deviation from the mean,

[0023] where i∈[1,2], j∈[1,N], D i ∈[0,1]

[0024] (2) Traverse V in order i For all elements under i,j , and do the following:

[0025] a. If E i,j Empty, delete E i,1 、E i,2 , if E i,j Not empty, keep E i,j ,

[0026] b. If , retain E i,j ,

[0027] c. If ,and , retain E i,j ,

[0028] d. If ,and , delete E i,1 、E i,2 .

[0029] Further preferably, the training fitting layer presets 5 template equations for parameter deduction: a linear equation, a cosine equation, an exponential equation, a logarithmic equation and a high-order equation, and the matrix formed by integrating the Raman spectrum peak of the measured water sample and the nitrate content in the measured water sample is recorded as M;

[0030] For the linear equation, the optimal parameters to be deduced are represented by a, b, c, d, and e, and the template equation is in the form of:

[0031] M …,2 = a×M …,1 e + b×M …,1 e-1 + c×M …,1 e-2 + d;

[0032] For the cosine equation, the optimal parameters to be derived are represented by a, b, c, d, and e, and the template equation is in the form of:

[0033] M …,2 = a × sin d (M …,1 ) + b×cos e (M …,1 ) + c;

[0034] For the exponential equation, the optimal parameters to be deduced are represented by a, b, and c, and the template equation is in the form of:

[0035] M …,2 = a×M …,1 c + b;

[0036] For the logarithmic equation, the optimal parameters to be deduced are represented by a, b, and c, and the template equation is in the form of:

[0037] M …,2 = a × log c (M …,1 ) + b;

[0038] For the high-order equation, the optimal parameters to be deduced are represented by a, b, and c, and the template equation is in the form of:

[0039] M …,2 = a×d c (M …,2 ) / d(M …,1 ) c+ b;

[0040] Then the Levenberg-Marquardt method is used to calculate the i , fitting deduction F i The optimal parameter K under i,j , which can be expanded to describe as:

[0041]

[0042] Further preferably, in the training verification layer, according to the input matrix M and the optimal parameter K_best, they are substituted into the corresponding template equation for calculation to obtain each formula F i Calculated nitride content MP,

[0043] The true value in the matrix M is recorded as T, the mean value of T is recorded as μ, and the nitride content is recorded as P. The coefficient of determination R of each formula is calculated based on this 2 , coefficient of determination R 2 The equation is:

[0044]

[0045] R i 2 Sort in descending order and start with R i 2 Based on this, select R i 2 The corresponding parameter in the largest equation is the optimal parameter K_best i And the optimal parameter corresponding equation F_best i .

[0046] Further preferably, in order to remove the Raman spectrum peak of the water sample to be tested and the missing data and gross error data of the nitrate content in the water sample to be tested, the Raman spectrum peak of the water sample to be tested is regarded as a vector V, and the processing is performed on it, the steps are as follows:

[0047] (1) Define j to represent the number of columns currently being processed, E j represents the element currently being processed, μ represents the mean of V, σ represents the standard deviation of V, and the deviation D represents the current element E j The degree of deviation from the mean,

[0048] Where j∈[1,N], D∈[0,1];

[0049] (2) Traverse all elements under V in order, and for each element E j , and do the following:

[0050] a. If E j Empty, delete E j ,

[0051] b. If , retain E j ,

[0052] c. If ,and , retain E j ,

[0053] d. If ,and , delete E j ;

[0054] Further preferably, the nitrate content column vector Y is calculated according to the following method:

[0055] First, the coefficient of determination R 2 Normalize and get the coefficient of determination R 2 The normalized vector W of:

[0056] ,

[0057] Secondly, according to W i Calculate Y j ,have:

[0058] , j is the number of rows of the Raman spectrum of the water sample to be tested received by the application processing layer, j [1,B].

[0059] Further preferably, the data display layer receives the Raman spectrum peak and the final nitrate content Y of the water sample to be tested, and the column vectors V and Y are constructed into a table, a coordinate graph, a pie chart or other files capable of visual quantitative analysis according to the purpose.

[0060] The beneficial effects of the present invention are as follows: the present invention discloses a method for quantitatively detecting nitrate in water quality based on Raman spectroscopy, which has the following advantages: (1) the method of the present invention uses Raman spectroscopy as the basis for determination, thus avoiding damage to the water body to be measured and having non-destructiveness; (2) the data acquisition and implementation processes in the method of the present invention are relatively simple, and the nitrate content of the water body to be measured can be calculated immediately after the Raman spectrum of the water body to be measured is collected, thus having real-time and sensitivity; (3) the training processing layer and the application processing layer in the method of the present invention both take into account the possible offset phenomenon of the Raman spectrum, and can also obtain peak data for the Raman spectrum with a certain offset, thereby improving resistance to various interferences from the water body; (4) the training layer and the application layer in the method of the present invention are both provided with a reliable verification part, thus ensuring the accuracy of the invention; (5) the various components in the method of the present invention have clear logic and clear division of labor, and can be deployed in a distributed manner, thus having flexibility; (6) the method of the present invention has the characteristics of being non-destructive, rapid, highly sensitive and resistant to water body interference, and can be widely used in environmental protection construction, urban planning, emergency monitoring, agricultural supervision and industrial layout planning, etc.

[0061] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:

[0063] Figure 1 This is a schematic diagram of the structure of a method for quantitative calculation of water quality nitrate based on Raman spectroscopy in Example 2;

[0064] Figure 2 is a Raman spectrum of an ideal water sample containing nitrate in Example 2;

[0065] Figure 3 A tabular document presentation diagram generated for the data display layer;

[0066] Figure 4 A Raman spectrum in the form of an image generated for the data display layer;

[0067] Figure 5 Another image form of Raman spectrum generated for the data display layer. DETAILED DESCRIPTION

[0068] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0069] Example 1

[0070] A method for quantitatively detecting nitrate in water based on Raman spectroscopy. A training layer and an application layer are set in the detection method. The parameter memory layer is connected to the application processing layer, and the application processing layer is connected to the data display layer. The functions of each part are as follows:

[0071] 1. The training layer is responsible for memorizing the parameter relationship between the Raman spectrum of the measured water sample and the nitrate content, including the training processing layer, training fitting layer, training verification layer and parameter memory layer connected in sequence

[0072] (1) In the training processing layer, the number of received rows is N, the size is N×2, and each of them represents the Raman spectrum peak of the measured water sample (the peak is the peak at 1024.1cm in the Raman spectrum). -1 ~1065.9cm -1 The peak value of the interval, the Raman spectrum includes but is not limited to the original Raman spectrum obtained by a Raman spectrometer in the measured water sample, the Raman spectrum after baseline processing, or any one of the surface enhanced Raman spectrum) and the column vector of the nitrate content in the measured water sample, after the vacant data and the gross error data are eliminated, they are integrated into a matrix M and sent to the training and fitting layer,

[0073] In order to remove the missing data and gross error data of the Raman spectrum peak of the measured water sample and the nitrate content in the measured water sample, the following operations are performed: the Raman spectrum peak of the measured water sample is recorded as vector V1, and the actual nitrate content of the measured water sample is recorded as vector V2, and they are processed in parallel, the steps are as follows:

[0074] A. Definition of V i represents the vector currently being processed, i represents the number of columns currently being processed, j represents the number of rows, and E i,j Represents the element currently being processed, μ i V i The mean value, σ i V i The standard deviation and deviation D i Represents the current element E i,j The degree of deviation from the mean,

[0075] where i∈[1,2], j∈[1,N], D i ∈[0,1]

[0076] B. Traverse V in order i For all elements under i,j , and do the following:

[0077] a. If E i,j Empty, delete E i,1 、E i,2 ,

[0078] b. If , retain E i,j ,

[0079] c. If ,and , retain E i,j ,

[0080] d. If ,and , delete E i,1 、E i,2 ;

[0081] (2) In the training and fitting layer, the optimal parameter K is derived using the Levenberg-Marquardt method based on the preset template equation for parameter deduction and the input matrix M, and the matrix M, the corresponding equation F and the optimal parameter K are sent to the training and verification layer.

[0082] The training and fitting layer presets 5 template equations for parameter deduction: linear equation, cosine equation, exponential equation, logarithmic equation and high-order equation. The matrix formed by integrating the Raman spectrum peak of the measured water sample and the nitrate content in the measured water sample is recorded as M;

[0083] For the linear equation, the optimal parameters to be deduced are represented by a, b, c, d, and e, and the template equation is in the form of:

[0084] M …,2 = a×M …,1 e + b×M …,1 e-1 + c×M …,1 e-2 + d;

[0085] For the cosine equation, the optimal parameters to be derived are represented by a, b, c, d, and e, and the template equation is in the form of:

[0086] M …,2 = a × sind (M …,1 ) + b×cos e (M …,1 ) + c;

[0087] For the exponential equation, the optimal parameters to be deduced are represented by a, b, and c, and the template equation is in the form of:

[0088] M …,2 = a×M …,1 c + b;

[0089] For the logarithmic equation, the optimal parameters to be deduced are represented by a, b, and c, and the template equation is in the form of:

[0090] M …,2 = a × log c (M …,1 ) + b;

[0091] For the high-order equation, the optimal parameters to be deduced are represented by a, b, and c, and the template equation is in the form of:

[0092] M …,2 = a×d c (M …,2 ) / d(M …,1 ) c + b;

[0093] Then the Levenberg-Marquardt method is used to calculate the i , fitting deduction F i The optimal parameter K under i,j , which can be expanded to describe as:

[0094] ;

[0095] (3) In the training and verification layer, the predicted value MP is calculated through the matrix M, the corresponding equation F and the optimal parameter K. The true value in the matrix M is recorded as T, the mean value of T is recorded as μ, and the determination coefficient R is arranged in descending order. i Based on this, we select the optimal parameter K_best and the corresponding equation F_best, both of which are N, and finally compare them with the determination coefficient R 2 Sent to the parameter memory layer together,

[0096] In the training verification layer, according to the input matrix M and the optimal parameter K_best, they are substituted into the corresponding template equation for calculation to obtain the formula F i Calculated nitride content MP,

[0097] The true value in the matrix M is recorded as T, the mean value of T is recorded as μ, and the nitride content is recorded as P. The coefficient of determination R of each formula is calculated based on this 2 , coefficient of determination R 2 The equation is:

[0098]

[0099] R i 2 Sort in descending order and start with R i 2 Based on this, select R i 2 The corresponding parameter in the largest equation is the optimal parameter K_best i And the optimal parameter corresponding equation F_best i ;

[0100] (4) In the parameter memory layer, receive the incoming data and store it in any suitable data structure.

[0101] 2. The application layer obtains the nitrate content in the water sample to be tested through the parameter relationship and the Raman spectrum of the water sample to be tested, including an application processing layer, an application fitting layer, an application verification layer and a data display layer connected in sequence.

[0102] (1) In the application processing layer, a Raman spectrum peak with N rows representing the water sample to be tested is received (the peak is the peak at 1024.1 cm in the Raman spectrum). -1 ~1065.9cm -1 The peak value of the interval, wherein the Raman spectrum includes but is not limited to any one of the original Raman spectrum obtained by a Raman spectrometer in the water sample to be tested, the Raman spectrum after baseline processing, or the Raman spectrum using surface enhanced Raman spectrum), the missing data and the gross error data are eliminated, and the processed Raman spectrum peak column vector V of the water sample to be tested is sent to the application fitting layer and the data display layer,

[0103] In order to remove the missing data and gross error data of the Raman spectrum peak of the water sample to be tested and the nitrate content in the water sample to be tested, the Raman spectrum peak of the water sample to be tested is regarded as a vector V, and the processing is performed on it, the steps are as follows:

[0104] (1) Define j to represent the number of columns currently being processed, E j represents the element currently being processed, μ represents the mean of V, σ represents the standard deviation of V, and the deviation D represents the current element E j The degree of deviation from the mean,

[0105] Where j∈[1,B], D∈[0,1];

[0106] (2) Traverse all elements under V in order, and for each element E j , and do the following:

[0107] a. If E j Empty, delete E j ,

[0108] b. If , retain E j ,

[0109] c. If ,and , retain E j ,

[0110] d. If ,and , delete E j ;

[0111] (2) In the application fitting layer, the Raman spectrum peak column vector V of the water sample to be tested, the optimal parameter K_best in the training and verification layer, and the corresponding equation F_best are used to calculate the optimal parameter K_best. The formula calculates the nitrate content matrix C in the water sample to be tested and sends it to the application verification layer;

[0112] (3) In the application verification layer, according to the input nitrate content matrix C and determination coefficient R 2 , calculate the final nitrate content column vector Y and send it to the data display layer,

[0113] The nitrate content column vector Y is calculated according to the following method:

[0114] First, the coefficient of determination R 2 Normalize and get the coefficient of determination R 2 The normalized vector W of:

[0115] ,

[0116] Secondly, according to W i Calculate Y j ,have:

[0117] , j is the number of rows of the Raman spectrum of the water sample to be tested received by the application processing layer, j [1,B];

[0118] (4) In the data display layer, the final nitrate content calculated by the verification layer is converted into a file format that can be directly viewed and applied (the Raman spectrum peak value and the final nitrate content Y of the water sample to be tested are received in the data display layer, and the column vectors V and Y are constructed into a table, a coordinate graph, a pie chart or other files that can be used for visual quantitative analysis according to the purpose).

[0119] Example 2

[0120] A water sample obtained from a river basin in Chongqing, China during a period of time in March 2022 was used as the water body to be tested for quantitative detection of nitrate:

[0121] 1. Use the Fuxiang Raman spectrometer to collect multiple groups of gold particle surface-enhanced Raman spectra of the water samples to be tested at different time periods, obtain the Raman characteristic peak of nitrate at a wavelength of 1043.5 cm-1, and record its peak data V1, and obtain 34 groups of data in total, that is, N = 34; on the official water quality monitoring website of the basin jurisdiction, obtain 34 groups of actual data V2 of the nitrate content of the water samples to be tested at different time periods, some of which are shown in Table 1.

[0122] Table 1 Partial data of water samples V1 and V2 to be tested

[0123]

[0124] After that, the missing data and gross error data in V1 and V2 are removed by corresponding processing, that is, 5 groups of missing data and gross error data are removed, and the size of V1 and V2 becomes 29. The processed V1 and V2 are integrated into a matrix M of size O×2, O∈[1,N], and sent to the training and fitting layer, where the training and fitting layer receives M, uses the preset equations and Levenberg-Marquardt method, and calculates the optimal parameters, corresponding formulas, and template equations used as shown in Table 2.

[0125] Table 2 Calculated optimal parameters, corresponding formulas and template equations used

[0126]

[0127] According to the calculation results, we can know that:

[0128]

[0129] At the same time, M, F, and K are integrated and sent to the training verification layer. In the training verification layer, the nitride MP is first calculated based on F, and then R is calculated based on MP. 2 , R 2 Arrange in descending order. According to the calculation results, select 3 sets of optimal parameters, that is, N=3, and get K_best, R 2And the corresponding equation F_best. The calculated K_best, R 2 , F_best and the selection are shown in Table 3.

[0130] Table 3 Calculated K_best, R 2 , F_best and selection

[0131]

[0132] The calculated K_best, R 2 and the corresponding equation F_best are sent to the parameter memory layer, where K_best, R 2 and the corresponding equation F_best are stored in the form of a linear hash table, which receives an input: R 2 , returns two outputs: F_best and K_best, whose format is:

[0133] [F_best, K_best] = LinearHashMap(R 2 )

[0134] Afterwards, the hash table is saved in a storage medium in binary format for use by the application layer.

[0135] 2. The application processing layer receives a set of N×1 column vectors V, which represent the peak values ​​of the Raman spectrum of the water sample to be tested. The Reshared Raman spectrometer is used to collect multiple sets of gold particle surface enhanced Raman spectra of the water sample to be tested at different time periods. -1 The Raman characteristic peak of nitrate was obtained, and its peak value data V was recorded. A total of 12 sets of data were obtained, that is, N = 12. Some of the data are shown in Table 4.

[0136] Table 4 V (partial) obtained in a river basin in Chongqing, China during a period of time in March 2022

[0137]

[0138] Since the amount of data is small, the data source can be considered to be completely trusted, and only V is retained.

[0139] After that, the processed V is sent to the application fitting layer and the data display layer. The application fitting layer obtains the optimal parameter K_best and the corresponding equation F_best from the parameter memory layer. Assuming that the nitrate content of the water sample to be tested is C, it is easy to obtain:

[0140]

[0141] The nitrate content C was calculated (as shown in Table 5).

[0142] Table 5 Calculated nitrate content C (partial)

[0143]

[0144] The nitrate content C and the determination coefficient R 2 Sent to the application verification layer, where the application verification layer receives the nitrate content matrix C and the determination coefficient R 2 , according to the coefficient of determination R 2 The normalized vector W of is used as the weight to synthesize C into the final nitrate content column vector Y: First, the determination coefficient R 2 After normalization, we have:

[0145]

[0146] The normalized results are shown in Table 6.

[0147] Table 6 R 2 And the calculated W

[0148]

[0149] according to Calculate Y j ,have:

[0150]

[0151] The calculated Y is shown in Table 7.

[0152] Table 7 Calculated Y (partial)

[0153]

[0154] At this point, the determination of nitrogen compounds in the water samples to be tested has been completed. Now, the accuracy of this method is verified by taking the absolute error percentage as the standard. On the official water quality monitoring website of the basin jurisdiction, the actual data T of the nitrate content of multiple water samples to be tested in the same period were obtained, with a size of 12×1. Y, T and the calculated error percentage results are shown in Table 8.

[0155] Table 8 Y, T and calculated absolute error percentage (partial)

[0156]

[0157] The statistical mean absolute error percentage is 9.32%, which means the prediction results are within an acceptable range.

[0158] The calculated final nitrate content Y is sent to the data display layer.

[0159] The data display layer constructs the column vectors V and Y into an image file in the format of a smooth line graph, and adds the number, coordinate ID and time information. After the file is opened, Figure 5 shown.

[0160] Figure 1 This is a schematic diagram of the structure of a method for quantitative calculation of water quality nitrate based on Raman spectroscopy in Example 2; Figure 2 is a Raman spectrum of an ideal water sample containing nitrate in Example 2; Figure 3 A tabular document presentation diagram generated for the data display layer; Figure 4 A Raman spectrum in the form of an image generated for the data display layer; Figure 5 Another image form of Raman spectrum generated for the data display layer.

[0161] In summary, the present invention discloses a method for quantitative detection of nitrate in water quality based on Raman spectroscopy, which has the following advantages: (1) The method of the present invention uses Raman spectroscopy as the basis for determination, thus avoiding damage to the water body to be measured and having non-destructiveness; (2) The data acquisition and implementation processes in the method of the present invention are relatively simple, and the nitrate content of the water body to be measured can be calculated immediately after the Raman spectrum of the water body to be measured is collected, which has real-time and sensitivity; (3) In the method of the present invention, the training processing layer and the application processing layer both take into account the possible offset phenomenon of the Raman spectrum, and the peak data can also be obtained for the Raman spectrum with a certain offset, thereby improving the resistance to various interferences from the water body; (4) In the method of the present invention, both the training layer and the application layer are provided with a reliable verification part, thereby ensuring the accuracy of the invention; (5) The various components in the method of the present invention have clear logic and clear division of labor, and can be deployed in a distributed manner, which has flexibility; (6) The method of the present invention has the characteristics of non-destructiveness, rapidity, high sensitivity and resistance to water body interference, and can be widely used in environmental protection construction, urban planning, emergency monitoring, agricultural supervision and industrial layout planning.

[0162] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.

Claims

1. A method for quantitative detection of water nitrate based on Raman spectroscopy, characterized in that: The detection method includes a training layer and an application layer; The training layer is responsible for memorizing the parameter relationship between the Raman spectrum of the measured water sample and the nitrate content, and includes a training processing layer, a training fitting layer, a training verification layer and a parameter memory layer connected in sequence; The application layer obtains the content of nitrate in the water sample to be tested through the parameter relationship and the Raman spectrum of the water sample to be tested, and includes an application processing layer, an application fitting layer, an application verification layer and a data display layer connected in sequence; The parameter memory layer is connected to the application processing layer, and the application processing layer is connected to the data display layer. In the training processing layer, a column vector with the same number of rows N and a size of N rows and 2 columns is received, each column representing the Raman spectrum peak of the measured water sample and the nitrate content in the measured water sample, wherein the peak is the peak at 1024.1 cm in the Raman spectrum. -1 ~1065.9cm -1 The peak value of the interval, wherein the Raman spectrum is any one of the original Raman spectrum obtained by a Raman spectrometer in the measured water sample, the Raman spectrum after baseline processing, or the Raman spectrum using surface enhanced Raman spectrum, after the vacant data and the gross error data are eliminated, they are integrated into a matrix M and sent to the training fitting layer; In the training fitting layer, the optimal parameter K is deduced using the Levenberg-Marquardt method according to the preset template equation for parameter deduction and the input matrix M, and the matrix M, the corresponding equation F and the optimal parameter K are sent to the training verification layer; In the training verification layer, the nitride prediction value MP is calculated by the matrix M, the corresponding equation F and the optimal parameter K. The true value in the matrix M is recorded as T, the mean value of T is recorded as μ, and the determination coefficient R is arranged in descending order. i 2 Based on this, the optimal parameter K_best and the corresponding equation F_best are selected. The number of groups of K_best and F_best are both A. Finally, the two are compared with the determination coefficient R 2 Sent to the parameter memory layer together, Where R i Calculate according to the following formula: ; The P i The nitride content of the number of rows currently being processed, in the parameter memory layer, receives the incoming data and stores it in any suitable data structure; In order to remove the Raman spectrum peaks of the measured water samples and the missing data and gross error data of the nitrate content in the measured water samples, the following operations are performed: The peak value of the Raman spectrum of the measured water sample is recorded as vector V1, and the actual nitrate content of the measured water sample is recorded as vector V2, and the processing is performed in parallel. The steps are as follows: (1) Definition of V i represents the vector currently being processed, i represents the number of columns currently being processed, j represents the number of rows, and E i,j Represents the element currently being processed, μ i V i The mean value, σ i V i The standard deviation and deviation Represents the current element The degree of deviation from the mean, where i∈[1,2], j∈[1,N], D i ∈[0,1] (2) Traverse V in order i For all elements under i,j , and do the following: a. If E i,j Empty, delete E i,1 、E i,2 , b. If , retain E i,j , c. If ,and , retain E i,j , d. If ,and , delete E i,1 、E i,2 ; In order to remove the missing data and gross error data of the Raman spectrum peak of the water sample to be tested and the nitrate content in the water sample to be tested, the Raman spectrum peak of the water sample to be tested is regarded as a vector V, and the processing is performed on it, the steps are as follows: (1) Define j to represent the number of rows currently being processed, E j represents the element currently being processed, μ represents the mean of V, σ represents the standard deviation of V, and the deviation D represents the current element The degree of deviation from the mean, Where j∈[1,B], D∈[0,1]; (2) Traverse all elements under V in order, and for each element E j , and do the following: a. If E j Empty, delete E j , b. If , retain E j , c. If ,and , retain E j , d. If ,and , delete E j ; In the application processing layer, the number of columns receiving row number B is 1, which represents the peak value of the Raman spectrum of the water sample to be tested. The peak value is the peak value at 1024.1cm in the Raman spectrum. -1 ~1065.9cm -1 The peak value of the interval, wherein the Raman spectrum is any one of the original Raman spectrum obtained by a Raman spectrometer in the water sample to be tested, the Raman spectrum after baseline processing, or the Raman spectrum using surface enhanced Raman spectrum, the vacant data and the gross error data are eliminated, and the processed Raman spectrum peak column vector V of the water sample to be tested is sent to the application fitting layer and the data display layer; In the application fitting layer, the input Raman spectrum peak column vector V of the water sample to be tested, the optimal parameter K_best in the training verification layer and the corresponding equation F_best are used to obtain the optimal parameter K_best. The formula calculates the nitrate content matrix C in the water sample to be tested and sends it to the application verification layer; In the application verification layer, according to the input nitrate content matrix C and the determination coefficient R 2 , calculate the final nitrate content column vector Y and send it to the data display layer; In the data display layer, the final nitrate content calculated by the application verification layer is converted into a file format that can be directly viewed and applied; The nitrate content column vector Y is calculated according to the following method: First, the coefficient of determination R 2 Normalize and get the coefficient of determination The normalized vector W of , where i represents the number of groups currently processed, i [1,A]: , Secondly, according to W i Calculate Y j ,have: , j is the number of rows of the Raman spectrum of the water sample to be tested received by the application processing layer, j [1,B].

2. The detection method according to claim 1, characterized in that: The training and fitting layer presets 5 template equations for parameter deduction: linear equation, cosine equation, exponential equation, logarithmic equation and high-order equation. The matrix formed by integrating the Raman spectrum peak of the measured water sample and the nitrate content in the measured water sample is recorded as M; For the linear equation, the optimal parameters to be deduced are represented by a, b, c, d, and e, and the template equation is in the form of: M …,2 = a×M …,1 e + b×M …,1 e-1 + c×M …,1 e-2 + d; For the cosine equation, the optimal parameters to be derived are represented by a, b, c, d, and e, and the template equation is in the form of: M …,2 = a×sin d (M …,1 ) + b×cos e (M …,1 ) + c; For the exponential equation, the optimal parameters to be deduced are represented by a, b, and c, and the template equation is in the form of: M …,2 = a×M …,1 c + b; For the logarithmic equation, the optimal parameters to be deduced are represented by a, b, and c, and the template equation is in the form of: M …,2 = a×log c (M …,1 ) + b; For the high-order equation, the optimal parameters to be deduced are represented by a, b, and c, and the template equation is in the form of: M …,2 = a×d c (M …,2 ) / d(M …,1 ) c + b; Then the Levenberg-Marquardt method is used to calculate the i , fitting deduction F i The optimal parameter K under i,j , which can be expanded to describe as: 。 3. The detection method according to claim 1, characterized in that: In the training verification layer, according to the input matrix M and the optimal parameter K_best, they are substituted into the corresponding template equation for calculation to obtain the formula F i Calculated nitride content MP, The true value in the matrix M is recorded as T, the mean value of T is recorded as μ, and the nitride content is recorded as P. The determination coefficient R of each formula is calculated based on this 2 , coefficient of determination R 2 The equation is: R i 2 Sort in descending order and start with R i 2 Based on this, select R i 2 The corresponding parameter in the largest equation is the optimal parameter K_best i And the optimal parameter corresponding equation F_best i .

4. The detection method according to claim 1, characterized in that: The data display layer receives the Raman spectrum peak value and the final nitrate content Y of the water sample to be tested, and constructs the column vectors V and Y into a table, a coordinate graph, a pie chart or other files that can be used for visual quantitative analysis according to the purpose.

Citation Information

Patent Citations

  • Producing fuel gases

    IE20078L

  • Quick and nondestructive chdecalciferolchdes terol content quantitative method based on Raman full spectrum analysis

    CN108802000A