Water quality monitoring method and system based on LSTM (Long Short Term Memory) and medium

By combining ultraviolet-visible full-wavelength absorption spectroscopy technology with LSTM, a corresponding relationship between pollutant concentration and absorbance is established, which solves the problems of low efficiency and low accuracy of traditional water quality monitoring methods and achieves high-precision calculation of major pollutants in water bodies.

CN120609764APending Publication Date: 2025-09-09AOPU TIANCHENG (WUHAN) OPTOELECTRONICS TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510510328.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

Traditional water quality monitoring methods are inefficient, inaccurate, and limited in the substances they can measure, making it impossible to accurately calculate the concentrations of major pollutants in water bodies.

Method used

Water quality monitoring is carried out by combining ultraviolet-visible full-wavelength absorption spectroscopy technology with long short-term memory networks (LSTMs). By establishing a corresponding relationship between pollutant concentration and absorbance and using LSTMs for data deduction, accurate pollutant concentration calculations can be achieved.

Benefits of technology

It has achieved high-precision monitoring of pollutants such as TSS, COD, nitrate nitrogen, ammonia nitrogen, and total phosphorus in water bodies, improving the efficiency and accuracy of water quality monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120609764A_ABST
    Figure CN120609764A_ABST
Patent Text Reader

Abstract

The invention discloses a water quality monitoring method and system based on LSTM (Long Short Term Memory) and a medium, and the method comprises the following steps: preparing a solution with a standard gradient concentration and calculating corresponding absorbance, establishing a corresponding relation between the concentration of TSS and the absorbance at a wave band of 400-600nm by utilizing the prepared concentration of the TSS and the corresponding absorbance, and further accurately calculating to obtain the concentration of the TSS in a water body to be monitored. And the concentrations of COD, nitrate nitrogen, ammonia nitrogen and total phosphorus in the to-be-monitored water body are obtained through LSTM inversion calculation. And high-precision water quality monitoring is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of water quality monitoring, and in particular to a water quality monitoring method, system and medium based on LSTM. Background Art

[0002] The scenarios for water quality monitoring are very broad, such as water quality monitoring of sewage treatment plants, water quality monitoring of natural water bodies such as rivers and lakes, water quality monitoring of aquaculture, water quality monitoring of industrial production process control, surface water quality monitoring, and water quality monitoring of drainage pipe networks.

[0003] In the process of water quality monitoring, calculating the concentration of major pollutants in water bodies is a key step in achieving monitoring. The main pollutants in water bodies include total soluble solids (TSS), chemical oxygen demand (COD), nitrate nitrogen, ammonia nitrogen, phosphorus, etc. Traditional water quality monitoring usually uses reagent spectrophotometry. However, reagent photoelectric colorimetric instruments have disadvantages such as the need for regular reagent replacement, long measurement time, high failure rate, and the need for station construction. These disadvantages result in very low monitoring efficiency, low accuracy, and a limited range of substances that can be calculated.

[0004] With the development of UV-visible full-wavelength absorption spectroscopy, spectral analysis technology, due to its high efficiency, speed, and accuracy, is being applied to water quality monitoring, enabling more efficient water quality monitoring. Long Short-Term Memory (LSTM) networks are a type of time-recurrent neural network capable of learning complex patterns and dependencies between sequential data. Combining spectral analysis with LSTM may address the limited accuracy of existing water quality monitoring. Summary of the Invention

[0005] In view of the above-mentioned deficiencies in the prior art, the object of the present invention is to provide a water quality monitoring method, system and medium based on LSTM, which can accurately calculate the concentrations of TSS, COD, nitrate nitrogen, ammonia nitrogen and total phosphorus in water.

[0006] In order to achieve the above object, the technical solution adopted by the present invention is:

[0007] A water quality monitoring method based on LSTM, comprising:

[0008] S1: The laboratory collects the absorbance of various substances at different concentrations, specifically including: preparing standard gradient concentration solutions of various substances, and calculating the corresponding absorbance of the standard gradient concentration solutions of various substances; the various substances include TSS, COD, nitrate nitrogen, total phosphorus, and ammonia nitrogen;

[0009] S2: Based on the prepared TSS standard gradient concentration solutions and the corresponding absorbance, establish the corresponding relationship between TSS concentration and absorbance; calculate the TSS concentration in the water body to be monitored based on the corresponding relationship between TSS concentration and absorbance and the absorbance of the water body to be monitored in the 400-600nm band;

[0010] S3: Calculate the absorbance of TSS in the 250-300nm band in the water to be monitored through LSTM, obtain the absorbance of COD in the 250-300nm band in the water to be monitored based on the absorbance of the water to be monitored in the 250-300nm band and the absorbance of TSS in the water to be monitored in the 250-300nm band, establish the corresponding relationship between COD concentration and absorbance, and obtain the COD concentration in the water to be monitored based on the corresponding relationship between COD concentration and absorbance and the absorbance of COD in the water to be monitored in the 250-300nm band;

[0011] S4: Calculate the absorbance of TSS and COD in the water to be monitored in the 210-250nm band respectively through LSTM, obtain the absorbance of nitrate nitrogen in the water to be monitored in the 210-250nm band according to the absorbance of the water to be monitored in the 210-250nm band and the absorbance of TSS and COD in the water to be monitored in the 210-250nm band respectively, establish the corresponding relationship between the concentration of nitrate nitrogen and absorbance, and obtain the concentration of nitrate nitrogen in the water to be monitored according to the corresponding relationship between the concentration of nitrate nitrogen and absorbance and the absorbance of nitrate nitrogen in the water to be monitored in the 210-250nm band;

[0012] S5: Calculate the absorbance of TSS, COD and nitrate nitrogen in the 200-210 nm band in the water to be monitored through LSTM, obtain the absorbance of total phosphorus in the 200-210 nm band in the water to be monitored based on the absorbance of TSS, COD and nitrate nitrogen in the 200-210 nm band in the water to be monitored, establish the corresponding relationship between the concentration of total phosphorus and the absorbance, and obtain the concentration of total phosphorus in the water to be monitored based on the corresponding relationship between the concentration of total phosphorus and the absorbance and the absorbance of total phosphorus in the water to be monitored in the 200-210 nm band;

[0013] S6: Calculate the absorbance of TSS, COD, nitrate nitrogen and total phosphorus in the water body to be monitored in the 184-194nm band respectively through LSTM, obtain the absorbance of ammonia nitrogen in the water body to be monitored in the 184-194nm band according to the absorbance of the water body to be monitored in the 184-194nm band and the absorbance of TSS, COD, nitrate nitrogen and total phosphorus in the water body to be monitored in the 184-194nm band respectively, establish the corresponding relationship between the concentration of ammonia nitrogen and absorbance, and obtain the concentration of ammonia nitrogen in the water body to be monitored according to the corresponding relationship between the concentration of ammonia nitrogen and absorbance and the absorbance of ammonia nitrogen in the water body to be monitored in the 184-194nm band.

[0014] Another technical solution adopted in the present invention is:

[0015] A water quality monitoring system based on LSTM includes a computer-readable storage medium and a processor; the computer-readable storage medium stores a computer program, and when the program is executed by the processor, it can implement the steps included in the above-mentioned water quality monitoring method based on LSTM.

[0016] Another technical solution adopted in the present invention is:

[0017] A computer-readable storage medium stores a computer program, which, when executed by a processor, can implement the steps included in the above-mentioned LSTM-based water quality monitoring method.

[0018] The beneficial effects of the present invention are:

[0019] Combining spectral water quality monitoring with LSTM and using LSTM to deduce absorbance data can achieve more accurate absorbance numerical fitting, thereby realizing high-precision monitoring of water pollutant concentrations. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 FIG2 is a flow chart of a full-spectrum water quality monitoring method according to an embodiment of the present invention;

[0021] Figure 2 Shown is the original absorbance curve of the mixed solution in a specific example of Example 1 of the present invention. DETAILED DESCRIPTION

[0022] In order to more clearly understand the technical content, achieved purposes and effects of the present invention, the present invention is described in detail below in conjunction with specific embodiments and in conjunction with the accompanying drawings. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. In the following description, many specific details are set forth in order to fully understand the present invention. The embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.

[0023] Please refer to Figure 1 and Figure 2 As shown, the first embodiment of the present invention is:

[0024] A water quality monitoring method based on LSTM, comprising:

[0025] S1: The laboratory collects the absorbance of various substances at different concentrations, specifically including: preparing standard gradient concentration solutions of various substances, and calculating the corresponding absorbance of the standard gradient concentration solutions of various substances; the various substances include TSS, COD, nitrate nitrogen, total phosphorus, and ammonia nitrogen;

[0026] Since the absorbance of the pollutants to be monitored in water changes with their concentration, that is, when the concentration of the pollutants in the water increases, the corresponding absorbance value will also increase, and this change relationship is linear. Therefore, based on this characteristic, the concentration of water pollutants can be inversely calculated.

[0027] Use a spectrometer to collect dark spectra S dark , reference spectrum S ref , spectrum S of pollutants in water mea In the determination of absorbance, in order to offset the absorption and reflection of incident light by the absorption cell and the absorption and scattering of incident light by solvents and reagents, a double-beam compensation method was adopted, and absorption cells with the same optical properties and equal thickness were selected to contain the test solution and the reference solution respectively.

[0028] After obtaining each set of spectra, the absorbance A of the single substance pollutant is calculated based on these data:

[0029]

[0030] The main pollutants in water bodies are TSS, COD, ammonia nitrogen, total phosphorus, and total nitrogen. Therefore, standard gradient concentration solutions of these substances are prepared, and the corresponding spectral data are obtained using a spectrometer, and the corresponding absorbance is calculated based on the spectral data. Figure 2 Shown are the original absorbance curves of the mixed solutions in specific examples.

[0031] S2: Calculate the concentration of TSS in the water body to be monitored.

[0032] For pollutants in water, except for TSS, the ability of other pollutants to absorb light at longer wavelengths is close to zero. Therefore, the absorbance value in the 400-600nm band is used to calculate the substance concentration of TSS. First, based on the configured TSS standard gradient concentration solution and the corresponding absorbance, a corresponding relationship between TSS concentration and absorbance is established; then, the concentration of TSS is calculated based on the aforementioned corresponding relationship. Specifically, it includes:

[0033] S21: Definition C TSS =[c1,c2,..,c i ,...,c n ], where C TSS represents the gradient concentration of TSS configuration, c i represents the concentration of the i-th gradient concentration solution, i∈n, n represents the number of gradient concentration solutions; A TSS =[a1,a2,..,a i ,...,a n ], a i =[x i,1 ,...,x i,m ], where A TSS It represents the absorbance of the gradient concentration solution of TSS in the 400-600nm band, a i represents the absorbance curve data of the i-th gradient concentration solution in the 400-600nm band, x i,m Represents the value of the i-th gradient concentration solution at wavelength m, where m∈[400,600].

[0034] S22: Calculate matrix A T CC T The eigenvector w1 corresponding to the maximum eigenvalue of A, at this time, the value of C is the gradient concentration C configured by TSS TSS , the value of A is the absorbance A of the gradient concentration solution of TSS in the 400-600nm band TSS , calculate the component vector according to the following formula and residual matrices A1, C 1,TSS :

[0035]

[0036] S23: Calculation Matrix The eigenvector w2 corresponding to the maximum eigenvalue is calculated according to the following formula to obtain the component vector and residual matrices A2, C 2,TSS :

[0037]

[0038] S24: Continue to calculate according to the method of steps S22 and S23 until the residual matrix A p+1 The absolute value of the elements in is the smallest, and the matrix The eigenvector w corresponding to the maximum eigenvalue p+1 , the component vector Residual matrix A p+1 and C p+1,TSS , the specific formula is as follows:

[0039]

[0040]

[0041] S25: Calculate A according to the following formula Ordinary least squares regression equation on :

[0042]

[0043] t k =aw k =w k,1 x 400 +…+w k,n x 600 ,(k=1,2,…,p+1)

[0044] t k Enter the following concentration calculation formula:

[0045]

[0046] The partial least squares regression equation of TSS concentration was obtained, that is, the specific formula for the corresponding relationship between TSS concentration and absorbance is as follows:

[0047]

[0048] Among them, c TSS represents the concentration of TSS, Indicates the absorbance in the 400-600nm band, D TSS represents the weight coefficient in TSS concentration calculation, Represents the weight coefficient at the m-band.

[0049] S26: Obtain the absorbance of the water to be monitored in the 400-600nm band through a spectrometer, and calculate the TSS concentration c in the water to be monitored based on the corresponding relationship between TSS concentration and absorbance and the absorbance of the water to be monitored in the 400-600nm band. TSS .

[0050] S3: Calculate the COD concentration in the water body to be monitored through LSTM inversion.

[0051] According to the additive nature of the absorbance between multi-component solutions, that is, the substances between the components do not react with each other, the absorbance value is equal to the sum of the absorbance values ​​of the components.

[0052] When inverting and calculating COD, considering that the absorbance value of TSS exists in the entire range, it is necessary to eliminate the influence of TSS absorbance in this range.

[0053] The absorbance of TSS in the water body to be monitored in the 250-300nm band is calculated by LSTM. The absorbance of COD in the water body to be monitored in the 250-300nm band is obtained according to the absorbance of the water body to be monitored in the 250-300nm band and the absorbance of TSS in the water body to be monitored in the 250-300nm band. The corresponding relationship between the concentration of COD and the absorbance is established. The concentration of COD in the water body to be monitored is obtained according to the corresponding relationship between the concentration of COD and the absorbance and the absorbance of COD in the water body to be monitored in the 250-300nm band.

[0054] In a specific embodiment, step S3 includes:

[0055] S31: Based on the concentration of TSS in the water to be monitored, the absorbance of TSS in the 400-600nm band is calculated by LSTM Among them, m is the number of data between 400 and 600 nm. express The mth absorbance value in ;

[0056] S32: Establish the absorbance of TSS in the 250-300nm band through LSTM Absorbance of TSS in the 400-600nm band The corresponding relationship is obtained to obtain the absorbance of TSS in the 250-300nm band The specific calculation formula is as follows:

[0057]

[0058] in, represents the LSTM-based encoder, represents the extracted intermediate feature state, Represents the LSTM-based decoder, n is the number of data in the 250-300nm band, express The nth absorbance value in ;

[0059] S33: Obtain the absorbance of the water to be monitored in the 250-300nm band express The nth absorbance value in ;

[0060] S34: minus Obtain absorbance in:

[0061]

[0062] In actual water quality monitoring, is approximately equal to the absorbance of COD in the water to be monitored, so As the absorbance of COD in the water to be monitored in the 250-300nm band

[0063] S35: According to the method of steps S21 to S25, a corresponding relationship between COD concentration and absorbance is established:

[0064]

[0065] Among them, c COD is the concentration of COD, D COD is the weight coefficient in COD concentration calculation.

[0066] S36: According to the corresponding relationship between COD concentration and absorbance and the absorbance of COD in the water to be monitored in the 250-300nm band Get the COD concentration c in the water to be monitored COD .

[0067] S4: Calculate the concentration of nitrate nitrogen in the water body to be monitored through LSTM inversion.

[0068] When inverting nitrate nitrogen, the calculation range is selected to be 210-250nm. Similar to the process of calculating COD, the absorbance data of TSS and COD are subtracted in this range to eliminate interference.

[0069] The absorbance of TSS and COD in the water to be monitored in the 210-250 nm band is calculated respectively by LSTM. The absorbance of nitrate nitrogen in the water to be monitored in the 210-250 nm band is obtained according to the absorbance of the water to be monitored in the 210-250 nm band and the absorbance of TSS and COD in the water to be monitored in the 210-250 nm band respectively. The corresponding relationship between the concentration of nitrate nitrogen and the absorbance is established. The concentration of nitrate nitrogen in the water to be monitored is obtained according to the corresponding relationship between the concentration of nitrate nitrogen and the absorbance and the absorbance of nitrate nitrogen in the water to be monitored in the 210-250 nm band.

[0070] In a specific embodiment, step S4 includes:

[0071] S41: Use LSTM to establish the absorbance of TSS in the 210-250nm band Absorbance of TSS in the 400-600nm band The corresponding relationship and the absorbance of COD in the 210-250nm band The absorbance of TSS in the 210-250nm band is obtained by comparing it with the absorbance of COD in the 250-300nm band. and COD absorbance in the 210-250nm band The specific calculation formula is as follows:

[0072]

[0073] in, and represents the corresponding LSTM-based encoder, and represents the corresponding extracted intermediate feature state, and represents the corresponding LSTM-based decoder, and p is the number of data in the 210-250 nm band;

[0074] S42: Obtain the absorbance of the water to be monitored in the 210-250nm band express The pth absorbance value in ;

[0075] S43: minus and The absorbance obtained by summing As the absorbance of nitrate nitrogen in the water to be monitored in the 210-250nm band in:

[0076]

[0077] S44: According to the method of steps S21 to S25, a corresponding relationship between the concentration of nitric nitrogen and the absorbance is established:

[0078]

[0079] Among them, c NO is the concentration of nitrate nitrogen, is the absorbance of nitric nitrogen in the 210-250nm band, D NO is the weight coefficient in the calculation of nitrate nitrogen concentration.

[0080] S45: According to the corresponding relationship between the concentration of nitrate nitrogen and absorbance and the absorbance of nitrate nitrogen in the water to be monitored in the 210-250nm band Obtain the concentration of nitrate nitrogen in the water to be monitored c NO .

[0081] S5: Calculate the total phosphorus concentration in the water body to be monitored through LSTM inversion.

[0082] The interval selected for inverse calculation of total phosphorus is 200-210 nm, and the absorbance data of the corresponding substances calculated in the previous steps within this interval are eliminated.

[0083] The absorbance of TSS, COD and nitrate nitrogen in the water to be monitored in the 200-210 nm band is calculated respectively by LSTM. The absorbance of total phosphorus in the water to be monitored in the 200-210 nm band is obtained according to the absorbance of the water to be monitored in the 200-210 nm band and the absorbance of TSS, COD and nitrate nitrogen in the water to be monitored in the 200-210 nm band. The corresponding relationship between the concentration of total phosphorus and the absorbance is established. The concentration of total phosphorus in the water to be monitored is obtained according to the corresponding relationship between the concentration of total phosphorus and the absorbance and the absorbance of total phosphorus in the water to be monitored in the 200-210 nm band.

[0084] In a specific embodiment, step S5 includes:

[0085] S51: Establish the absorbance of TSS in the 200-210nm band through LSTM Absorbance of TSS in the 400-600nm band The corresponding relationship between COD and the absorbance in the 200-210nm band The corresponding relationship between the absorbance of COD in the 250-300nm band and the absorbance of nitrate nitrogen in the 200-210nm band The absorbance of TSS in the 200-210nm band is obtained by the corresponding relationship with the absorbance of nitric nitrogen in the 210-250nm band. COD absorbance in the 200-210nm band and nitric nitrogen absorbance in the 200-210 nm band The specific calculation formula is as follows:

[0086]

[0087]

[0088] in, and represents the corresponding LSTM-based encoder, and represents the corresponding extracted intermediate feature state, and represents the corresponding LSTM-based decoder, q is the number of data in the 200-210 nm band;

[0089] S52: Obtain the absorbance of the water to be monitored in the 200-210nm band express The qth absorbance value in ;

[0090] S53: minus and The absorbance obtained by summing As the absorbance of total phosphorus in the water to be monitored in the 200-210nm band in:

[0091]

[0092] S54: Using the method of steps S21 to S25, establish a corresponding relationship between the concentration of total phosphorus and the absorbance:

[0093]

[0094] Among them, c TP is the total phosphorus concentration, is the absorbance of total phosphorus in the 200-210 nm band, D TP is the weight in the calculation of total phosphorus concentration.

[0095] S55: According to the corresponding relationship between total phosphorus concentration and absorbance and the absorbance of total phosphorus in the water to be monitored in the 200-210nm band Obtain the total phosphorus concentration c in the water to be monitored TP .

[0096] S6: Calculate the concentration of ammonia nitrogen in the water body to be monitored through LSTM inversion.

[0097] Similarly, the range for calculating ammonia nitrogen is 184-194 nm, and the absorbance data of the corresponding substance calculated previously needs to be eliminated.

[0098] The absorbance of TSS, COD, nitrate nitrogen and total phosphorus in the water to be monitored in the 184-194 nm band is calculated respectively by LSTM. The absorbance of ammonia nitrogen in the water to be monitored in the 184-194 nm band is obtained according to the absorbance of the water to be monitored in the 184-194 nm band and the absorbance of TSS, COD, nitrate nitrogen and total phosphorus in the water to be monitored in the 184-194 nm band. The corresponding relationship between the concentration of ammonia nitrogen and the absorbance is established. The concentration of ammonia nitrogen in the water to be monitored is obtained according to the corresponding relationship between the concentration of ammonia nitrogen and the absorbance and the absorbance of ammonia nitrogen in the water to be monitored in the 184-194 nm band.

[0099] In a specific embodiment, step S6 includes:

[0100] S61: Use LSTM to establish the absorbance of TSS in the 184-194nm band Absorbance of TSS in the 400-600nm band The corresponding relationship between COD and the absorbance in the 184-194 nm band The corresponding relationship between the absorbance of COD in the 250-300nm band and the absorbance of nitrate nitrogen in the 184-194nm band The corresponding relationship with the absorbance of nitrate nitrogen in the 210-250nm band and the absorbance of total phosphorus in the 184-194nm band The absorbance of TSS in the 184-194 nm band is obtained by comparing it with the absorbance of total phosphorus in the 200-210 nm band. COD absorbance in the 184-194 nm band The absorbance of nitrate nitrogen in the 184-194 nm band and total phosphorus absorbance in the 184-194 nm band The specific calculation formula is as follows:

[0101]

[0102]

[0103] in, and represents the corresponding LSTM-based encoder, and represents the corresponding extracted intermediate feature state, and represents the corresponding LSTM-based decoder, r is the number of data in the 184-194 nm band;

[0104] S62: Obtain the absorbance of the water to be monitored in the 184-194nm band express The rth absorbance value in ;

[0105] S63: minus and The absorbance obtained by summing As the absorbance of ammonia nitrogen in the water to be monitored in the 184-194nm band

[0106] S64: According to the method of steps S21 to S25, a corresponding relationship between the concentration of ammonia nitrogen and the absorbance is established:

[0107]

[0108] where c NH3 is the concentration of ammonia nitrogen, is the absorbance of ammonia nitrogen in the 184-194 nm band, D TP is the weight in the calculation of ammonia nitrogen concentration.

[0109] S65: According to the corresponding relationship between ammonia nitrogen concentration and absorbance and the absorbance of ammonia nitrogen in the water to be monitored in the 184-194nm band Get the concentration of ammonia nitrogen in the water to be monitored c NH3 .

[0110] In an alternative embodiment, the corresponding relationship between the concentration and absorbance of each substance can be established uniformly after step S1.

[0111] The second embodiment of the present invention is:

[0112] A water quality monitoring system based on LSTM includes a computer-readable storage medium and a processor; the computer-readable storage medium stores a computer program, and when the program is executed by the processor, it can implement the steps included in the LSTM-based water quality monitoring method described in Example 1.

[0113] The third embodiment of the present invention is:

[0114] A computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, it can implement the steps included in the LSTM-based water quality monitoring method described in Example 1.

[0115] In summary, the LSTM-based water quality monitoring method, system, and medium of the present invention establish the corresponding relationship between the absorbance and concentration of a single substance through dual-beam compensation and partial least squares method, and combine it with the LSTM inversion algorithm to achieve accurate analysis of the pollutant concentration in the water body.

[0116] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Therefore, any modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of the technical solution of the present invention.

Claims

1. A water quality monitoring method based on LSTM, characterized in that: include: S1: The laboratory collects the absorbance of various substances at different concentrations, specifically including: preparing standard gradient concentration solutions of various substances, and calculating the corresponding absorbance of the standard gradient concentration solutions of various substances; the various substances include TSS, COD, nitrate nitrogen, total phosphorus, and ammonia nitrogen; S2: Based on the prepared TSS standard gradient concentration solutions and the corresponding absorbance, establish the corresponding relationship between TSS concentration and absorbance; calculate the TSS concentration in the water body to be monitored based on the corresponding relationship between TSS concentration and absorbance and the absorbance of the water body to be monitored in the 400-600nm band; S3: Calculate the absorbance of TSS in the 250-300nm band in the water to be monitored through LSTM, obtain the absorbance of COD in the 250-300nm band in the water to be monitored based on the absorbance of the water to be monitored in the 250-300nm band and the absorbance of TSS in the water to be monitored in the 250-300nm band, establish the corresponding relationship between COD concentration and absorbance, and obtain the COD concentration in the water to be monitored based on the corresponding relationship between COD concentration and absorbance and the absorbance of COD in the water to be monitored in the 250-300nm band; S4: Calculate the absorbance of TSS and COD in the water to be monitored in the 210-250nm band respectively through LSTM, obtain the absorbance of nitrate nitrogen in the water to be monitored in the 210-250nm band according to the absorbance of the water to be monitored in the 210-250nm band and the absorbance of TSS and COD in the water to be monitored in the 210-250nm band respectively, establish the corresponding relationship between the concentration of nitrate nitrogen and absorbance, and obtain the concentration of nitrate nitrogen in the water to be monitored according to the corresponding relationship between the concentration of nitrate nitrogen and absorbance and the absorbance of nitrate nitrogen in the water to be monitored in the 210-250nm band; S5: Calculate the absorbance of TSS, COD and nitrate nitrogen in the 200-210 nm band in the water to be monitored through LSTM, obtain the absorbance of total phosphorus in the 200-210 nm band in the water to be monitored based on the absorbance of TSS, COD and nitrate nitrogen in the 200-210 nm band in the water to be monitored, establish the corresponding relationship between the concentration of total phosphorus and the absorbance, and obtain the concentration of total phosphorus in the water to be monitored based on the corresponding relationship between the concentration of total phosphorus and the absorbance and the absorbance of total phosphorus in the water to be monitored in the 200-210 nm band; S6: Calculate the absorbance of TSS, COD, nitrate nitrogen and total phosphorus in the water body to be monitored in the 184-194nm band respectively through LSTM, obtain the absorbance of ammonia nitrogen in the water body to be monitored in the 184-194nm band according to the absorbance of the water body to be monitored in the 184-194nm band and the absorbance of TSS, COD, nitrate nitrogen and total phosphorus in the water body to be monitored in the 184-194nm band respectively, establish the corresponding relationship between the concentration of ammonia nitrogen and absorbance, and obtain the concentration of ammonia nitrogen in the water body to be monitored according to the corresponding relationship between the concentration of ammonia nitrogen and absorbance and the absorbance of ammonia nitrogen in the water body to be monitored in the 184-194nm band.

2. The water quality monitoring method based on LSTM according to claim 1, characterized in that In step S2, a corresponding relationship between TSS concentration and absorbance is established based on the configured TSS standard gradient concentration solutions and the corresponding absorbance, specifically including: S21: Definition C TSS =[c1,c2,..,c i ,...,c n ], where C TSS represents the gradient concentration of TSS configuration, c i represents the concentration of the i-th gradient concentration solution, i∈n, n represents the number of gradient concentration solutions; A TSS =[a1,a2,..,a i ,...,a n ], a i =[x i,1 ,...,x i,m ], where A TSS It represents the absorbance of the gradient concentration solution of TSS in the 400-600nm band, a i represents the absorbance curve data of the i-th gradient concentration solution in the 400-600nm band, x i,m Represents the value of the solution with gradient concentration i at wavelength m, where m∈[400,600]; S22: Calculate matrix A T CC T The eigenvector w1 corresponding to the maximum eigenvalue of A, at this time, the value of C is the gradient concentration C configured by TSS TSS , the value of A is the absorbance A of the gradient concentration solution of TSS in the 400-600nm band TSS , calculate the component vector according to the following formula and residual matrices A1, C 1,TSS : S23: Calculation Matrix The eigenvector w2 corresponding to the maximum eigenvalue is calculated according to the following formula to obtain the component vector and residual matrices A2, C 2,TSS : S24: Continue to calculate according to the method of steps S22 and S23 until the residual matrix A p+1 The absolute value of the elements in is the smallest, and the matrix The eigenvector w corresponding to the maximum eigenvalue p+1 , the component vector Residual matrix A p+1 and C p+1,TSS , the specific formula is as follows: S25: Calculate A according to the following formula Ordinary least squares regression equation on : t k =aw k =w k,1 x 400 +…+w k,n x 600 ,(k=1,2,…,p+1) t k Enter the following concentration calculation formula: The partial least squares regression equation of TSS concentration was obtained, that is, the specific formula for the corresponding relationship between TSS concentration and absorbance is as follows: Among them, c TSS represents the concentration of TSS, Indicates the absorbance in the 400-600nm band, D TSS represents the weight coefficient in TSS concentration calculation, Represents the weight coefficient at the m-band.

3. The water quality monitoring method based on LSTM according to claim 2, characterized in that, According to the method of steps S21 to S25, the corresponding relationship between COD concentration and absorbance, the corresponding relationship between nitrate nitrogen concentration and absorbance, the corresponding relationship between total phosphorus concentration and absorbance, and the corresponding relationship between ammonia nitrogen concentration and absorbance are established.

4. The water quality monitoring method based on LSTM according to claim 2, characterized in that Step S3 specifically includes: S31: Based on the concentration of TSS in the water to be monitored, the absorbance of TSS in the 400-600nm band is calculated by LSTM Among them, m is the number of data between 400 and 600 nm. express The mth absorbance value in ; S32: Establish the absorbance of TSS in the 250-300nm band through LSTM Absorbance of TSS in the 400-600nm band The corresponding relationship is obtained to obtain the absorbance of TSS in the 250-300nm band The specific calculation formula is as follows: in, represents the LSTM-based encoder, represents the extracted intermediate feature state, Represents the LSTM-based decoder, n is the number of data in the 250-300nm band, express The nth absorbance value in ; S33: Obtain the absorbance of the water to be monitored in the 250-300nm band express The nth absorbance value in ; S34: minus The absorbance obtained As the absorbance of COD in the water to be monitored in the 250-300nm band; S35: establishing a corresponding relationship between COD concentration and absorbance according to the configured COD standard gradient concentration solution and the corresponding absorbance; S36: The COD concentration in the water body to be monitored is obtained according to the corresponding relationship between the COD concentration and the absorbance and the absorbance of the COD in the water body to be monitored in the 250-300 nm band.

5. The water quality monitoring method based on LSTM according to claim 4 is characterized in that, Step S4 specifically includes: S41: Use LSTM to establish the absorbance of TSS in the 210-250nm band Absorbance of TSS in the 400-600nm band The corresponding relationship and the absorbance of COD in the 210-250nm band The absorbance of TSS in the 210-250nm band is obtained by comparing it with the absorbance of COD in the 250-300nm band. and COD absorbance in the 210-250nm band The specific calculation formula is as follows: in, and represents the corresponding LSTM-based encoder, and represents the corresponding extracted intermediate feature state, and represents the corresponding LSTM-based decoder, and p is the number of data in the 210-250 nm band; S42: Obtain the absorbance of the water to be monitored in the 210-250nm band express The pth absorbance value in ; S43: minus and The absorbance obtained by summing As the absorbance of nitrate nitrogen in the water to be monitored in the 210-250nm band; S44: establishing a corresponding relationship between nitric nitrogen concentration and absorbance based on the prepared nitric nitrogen standard gradient concentration solutions and the corresponding absorbance; S45: The concentration of nitrate nitrogen in the water body to be monitored is obtained according to the corresponding relationship between the concentration of nitrate nitrogen and the absorbance and the absorbance of nitrate nitrogen in the water body to be monitored in the 210-250 nm band.

6. The water quality monitoring method based on LSTM according to claim 5, characterized in that Step S5 specifically includes: S51: Establish the absorbance of TSS in the 200-210nm band through LSTM Absorbance of TSS in the 400-600nm band The corresponding relationship between COD and the absorbance in the 200-210nm band The corresponding relationship between the absorbance of COD in the 250-300nm band and the absorbance of nitrate nitrogen in the 200-210nm band The absorbance of TSS in the 200-210nm band is obtained by the corresponding relationship with the absorbance of nitric nitrogen in the 210-250nm band. COD absorbance in the 200-210nm band and nitric nitrogen absorbance in the 200-210 nm band The specific calculation formula is as follows: in, and represents the corresponding LSTM-based encoder, and represents the corresponding extracted intermediate feature state, and represents the corresponding LSTM-based decoder, q is the number of data in the 200-210 nm band; S52: Obtain the absorbance of the water to be monitored in the 200-210nm band express The qth absorbance value in ; S53: minus and The absorbance obtained by summing As the absorbance of total phosphorus in the water to be monitored in the 200-210nm band; S54: establishing a corresponding relationship between the total phosphorus concentration and the absorbance according to the prepared total phosphorus standard gradient concentration solution and the corresponding absorbance; S55: The concentration of total phosphorus in the water body to be monitored is obtained according to the corresponding relationship between the concentration of total phosphorus and the absorbance and the absorbance of the total phosphorus in the water body to be monitored in the 200-210 nm band.

7. The water quality monitoring method based on LSTM according to claim 6 is characterized in that, Step S6 specifically includes: S61: Use LSTM to establish the absorbance of TSS in the 184-194nm band Absorbance of TSS in the 400-600nm band The corresponding relationship between COD and the absorbance in the 184-194 nm band The corresponding relationship between the absorbance of COD in the 250-300nm band and the absorbance of nitrate nitrogen in the 184-194nm band The corresponding relationship with the absorbance of nitrate nitrogen in the 210-250nm band and the absorbance of total phosphorus in the 184-194nm band The absorbance of TSS in the 184-194 nm band is obtained by comparing it with the absorbance of total phosphorus in the 200-210 nm band. COD absorbance in the 184-194 nm band The absorbance of nitrate nitrogen in the 184-194 nm band and total phosphorus absorbance in the 184-194 nm band The specific calculation formula is as follows: in, and represents the corresponding LSTM-based encoder, and represents the corresponding extracted intermediate feature state, and represents the corresponding LSTM-based decoder, r is the number of data in the 184-194 nm band; S62: Obtain the absorbance of the water to be monitored in the 184-194nm band express The rth absorbance value in ; S63: minus and The absorbance obtained by summing the two values ​​is taken as the absorbance of ammonia nitrogen in the water body to be monitored in the 184-194 nm band; S64: establishing a corresponding relationship between ammonia nitrogen concentration and absorbance based on the prepared ammonia nitrogen standard gradient concentration solution and the corresponding absorbance; S65: The concentration of ammonia nitrogen in the water body to be monitored is obtained according to the corresponding relationship between the concentration of ammonia nitrogen and the absorbance and the absorbance of ammonia nitrogen in the water body to be monitored in the 184-194 nm band.

8. The water quality monitoring method based on LSTM according to any one of claims 1 to 7, characterized in that: The absorbance was collected using dual-beam compensation.

9. A water quality monitoring system based on LSTM, characterized in that: It includes a computer-readable storage medium and a processor; the computer-readable storage medium stores a computer program, and when the program is executed by the processor, it can implement the steps included in the LSTM-based water quality monitoring method described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it can implement the steps included in the LSTM-based water quality monitoring method described in any one of claims 1 to 7.