A method for measuring the degree of black and smelly water based on hyperspectral technology

By processing water spectral data using hyperspectral technology and Python programs, and combining parameters such as ammonia nitrogen, transparency, and dissolved oxygen, the problem of time-consuming and labor-intensive traditional detection methods has been solved, enabling rapid and accurate identification and management of the degree of black and odorous water bodies.

CN116952873BActive Publication Date: 2024-08-23CHONGQING ACADEMY OF SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310923495.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-26
Publication Date
2024-08-23
Estimated Expiration
2043-07-26

AI Technical Summary

Technical Problem

Traditional methods for detecting black and odorous water bodies are time-consuming and labor-intensive, have limited monitoring range, cannot provide timely feedback on the black and odorous conditions of water bodies, and cannot achieve rapid and accurate identification and management of black and odorous water bodies.

Method used

A method for measuring the degree of black and odorous water bodies based on hyperspectral technology was adopted. Water spectral data were captured by visible-infrared hyperspectral equipment, and data processing and calculation were performed using Python programs. Ammonia nitrogen, transparency, and dissolved oxygen parameters were used to quickly identify black and odorous water bodies.

Benefits of technology

It enables rapid and accurate identification of heavily polluted, lightly polluted, and general water bodies, improving detection efficiency and accuracy, and expanding the monitoring range.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116952873B
    Figure CN116952873B
Patent Text Reader

Abstract

The invention belongs to the technical field of water body black and smelly degree measurement, and specifically relates to a water body black and smelly degree measurement method based on hyperspectral technology, comprising the following steps: S10: installing a hyperspectral device on one side of a measured water body, and then making the hyperspectral device photograph the measured water body; S20: acquiring hyperspectral data of the device for processing, S30: extracting and calculating a black and smelly water body characteristic value T through the data photographed by the hyperspectral device; S40: using the S20 data to obtain average spectral difference thresholds of different black and smelly water bodies as T1 and T2; S50: using the S20 data to respectively obtain the reflectance of the transparency, dissolved oxygen, and ammonia nitrogen parameter sensitive bands, and calculate the value of the reflectance; S60: pre-judgment of the value obtained in S50; S70: using the parameters obtained in the above steps to distinguish the black and smelly degree of the measured water body; the invention can quickly complete the analysis and calculation of data through a program, and realize the rapid and refined judgment of severe black and smelly water bodies, mild black and smelly water bodies, and general water bodies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of water body black and odor degree measurement, and specifically relates to a water body black and odor degree measurement method based on hyperspectral technology. Background Art

[0002] Urban black and smelly water refers to water bodies with unpleasant colors or unpleasant odors in urban built-up areas. The black and smelly phenomenon of this water body is a biochemical phenomenon. When the water body is seriously polluted, the aerobic decomposition rate of organic matter is greater than the reoxygenation rate, resulting in hypoxia in the water body and incomplete degradation of organic matter. During the anaerobic biodegradation process, odorous substances such as hydrogen sulfide, ammonia, and mercaptans are generated, and black substances such as iron sulfide and manganese sulfide are formed at the same time, causing the water body to appear black and smelly. This is a serious water pollution phenomenon that has serious impacts on the earth's ecological environment and human life and health.

[0003] In order to control and treat this serious water pollution phenomenon, the State Council issued the "Water Pollution Prevention and Control Action Plan". The "Guidelines for the Treatment of Urban Black and Smelly Water Bodies" issued by the Ministry of Housing in September 2015 clearly stipulates the monitoring and evaluation methods of black and smelly water bodies. The evaluation indicators of urban black and smelly water bodies include transparency, dissolved oxygen, redox potential, and ammonia nitrogen. According to these evaluation indicators, the pollution degree of water bodies can be divided into severe black and smelly water bodies, mild black and smelly water bodies, and non-black and smelly water bodies.

[0004] With the rapid development of industry and agriculture in my country, the degree of black and smelly water in urban built-up areas has become increasingly serious, and there are differences in the degree of black and smelly water in different locations. Therefore, it is particularly important to quickly, accurately, and more widely identify black and smelly water bodies and take effective management measures in a timely manner. Traditional detection methods mainly rely on field sampling and bringing it back to the laboratory for water quality analysis, and finally evaluating the degree of black and smelly water bodies according to relevant standards. However, this method is time-consuming and labor-intensive, has a limited monitoring range, and cannot provide timely feedback on the black and smelly conditions of water bodies, so it needs to be improved. Summary of the invention

[0005] The purpose of the present invention is to provide a method for measuring the degree of black and smelly water bodies based on hyperspectral technology. The spectral data of the measured water body photographed by the continuously detected visible-infrared hyperspectral equipment is combined with the python program to complete the extraction and calculation of the data, and then the type of water body is preliminarily judged by the spectral characteristic values ​​of the black and smelly water body, and then the degree of black and smelly water body is further identified in combination with the three parameter values ​​of ammonia nitrogen, transparency and dissolved oxygen, thereby realizing the rapid and accurate judgment of severe black and smelly water bodies, mild black and smelly water bodies and general water bodies.

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

[0007] A method for calculating the degree of black and odor in water based on hyperspectral technology comprises the following steps:

[0008] S10: installing a hyperspectral device on one side of the measured water body, and then connecting the hyperspectral device to photograph the measured water body;

[0009] S20: Using pycharm software, the hyperspectral data of the device is obtained for processing, and the hyperspectral device data is saved in csv data format, with the band corresponding to the reflectance;

[0010] S30: extracting and calculating the characteristic value T of the black and odorous water body through the data captured by the hyperspectral device;

[0011] S40: Using S20 data, the average spectral difference thresholds of different black and odorous water bodies are obtained as T1 and T2;

[0012] S50: using the data of S20, respectively obtaining the reflectance of the sensitive bands of transparency, dissolved oxygen and ammonia nitrogen parameters, and calculating the value of the reflectance;

[0013] S60: pre-judge the value obtained in S50; the pre-judged values ​​of step S60 include: the black and odorous water body difference threshold and the reflectance value of the sensitive band of transparency, dissolved oxygen and ammonia nitrogen parameters; if the black and odorous water body difference threshold does not meet the judgment conditions, return to S2; if the parameter obtained in S50 is less than zero, return to S2.

[0014] S70: Using the parameters obtained in the above steps to identify the degree of blackness and odor of the tested water body.

[0015] Method for distinguishing the degree of blackness and odor of the tested water body: the judgment values ​​of the reflectance values ​​of the sensitive bands of the transparency, dissolved oxygen and ammonia nitrogen parameters are: NH3N (8-15), transparency TURBIDITY (10-21), dissolved oxygen D0 (0.2-20), and the average spectral difference thresholds T1 and T2 are [0.00165-0.0025].

[0016] S71: If the black and odorous water body characteristic value T is greater than or equal to T2, and at least one parameter in the sensitive band constructed in S50 meets the condition of severe black and odorous water body, then the water body is severe black and odorous water body; when no parameter meets the condition of severe black and odorous water body: if at least one parameter meets the condition of mild black and odorous water body, then it is mild black and odorous water body; if no parameter meets the condition of mild black and odorous water body, then it is general water body;

[0017] S72: If the black and odorous water body characteristic value T is located at [T1-T2), and at least one parameter of the sensitive band constructed in S50 meets the general black and odorous water body condition, the measured water body is a light black and odorous water body; when no parameter meets the general black and odorous water body condition: if multiple parameters meet the severe black and odorous water body condition, it is a black and odorous water body; if only one parameter meets the severe black and odorous water body condition, it is a light black and odorous water body; if none of the parameters meet the above conditions, it is a general water body;

[0018] S73: If the characteristic value T of the black and odorous water body is less than T1, and at least one parameter of the sensitive band constructed in S50 meets the general water body conditions, it is a general water body; when no parameter meets the general water body conditions, it is a slightly black and odorous water body.

[0019] The hyperspectral device is a CMOS imager. The shooting light is provided by LED and the light is installed vertically downward. The light source is higher than the hyperspectral device. The device has a collection focal length of 20cm, a spectral range of 380nm-960nm, a resolution of 10-25nm, and an output step of 2. The data collection method of the hyperspectral device is command collection. The collection direction of the device is at an angle of 30° with the vertical LED light source, and the distance from the water surface to the measured water body is 20cm.

[0020] According to the method of calculating the characteristic value T of black and odorous water in step S30, firstly, a characteristic band is selected, and then the same band is selected for the measured water body to calculate the characteristic value T of the measured water body, and the selected characteristic bands R1 to R2 data are summed and normalized, and then the characteristic value T of the black and odorous water body is obtained. The characteristic band range R1 to R2 is selected as: 520nm-600nm (correlation coefficient R 2 Greater than 0.8), the formula is as follows:

[0021]

[0022]

[0023]

[0024] T=MAX t -MIN t .

[0025] Parameter value calculation method in S50: Use the program language of step S20 to obtain the sensitive bands of ammonia nitrogen (NH3N), dissolved oxygen (DO) and transparency (TURBIDITY) as independent variables for calculation. The calculation model formula is:

[0026]

[0027] (a=15.205, b=0.38, c=1.12)

[0028]

[0029] (a=-670.86,b=683.76

[0030]

[0031] (a=250.865, b=1.476, c=0.435)

[0032] When the independent variable of the sensitive band is an odd-numbered band, the average value of the values ​​before and after the current band is taken as the actual sensitive band and substituted into the formula for calculation.

[0033] The present invention uses the visible-infrared hyperspectral device to continuously detect the measured water body, and uses the measured spectral data in combination with the python program to complete the extraction and calculation of the data, and then makes a preliminary judgment on the water body type through the spectral characteristic values ​​of the black and odorous water body, and then further distinguishes the black and odorous water body in combination with the three parameter values ​​of ammonia nitrogen, transparency, and dissolved oxygen, thereby realizing the rapid and accurate judgment of severe black and odorous water bodies, mild black and odorous water bodies and general water bodies. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The present invention is further illustrated by means of the non-limiting examples given in the accompanying drawings.

[0035] Figure 1 It is a schematic flow chart of a method for calculating the degree of black and smelly water based on hyperspectral technology of the present invention;. DETAILED DESCRIPTION

[0036] In order to enable those skilled in the art to better understand the present invention, the technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0037] like Figure 1 As shown, a method for calculating the degree of black and odor in water based on hyperspectral technology of the present invention comprises the following steps:

[0038] Step 10: When in use, first provide shooting light through LED, and the LED light source should be emitted slightly higher than the hyperspectral device and vertically downward. The acquisition focal length of the hyperspectral device CMOS imager is 20cm, the spectral range includes 380nm-960nm, the resolution is 10-25nm, and the output step size is 2. The acquisition direction of the device is 30° with the vertical LED light source, and the distance from the collection water surface is 20cm.

[0039] Step 20: Use the continuous detection visible-infrared hyperspectral device to continuously shoot the water body under test, complete the shooting by sending the acquisition command in a loop, and use pycharm software combined with python language to complete the data analysis. And save the captured spectral data as a csv file in the format of a value pair (i.e., the reflectance corresponding to the band).

[0040] Step 30: According to the characteristic calculation of the spectrum curve of the black and odorous water body, the data is first summed and normalized, and the characteristic band i = 520nm-600nm is selected. The formula is as follows:

[0041]

[0042]

[0043]

[0044] T=MAX t -MIN t .

[0045] Step 40: Obtain the average spectral difference thresholds of different black and odorous water bodies as T1 and T2 through the data captured by the hyperspectral device;

[0046] Step 50: Use the spectral data to complete the calculation of the independent variables of other parameters. Use the program to read the ammonia nitrogen, dissolved oxygen, and transparency sensitive bands and (correlation coefficient R 2 greater than 0.8).

[0047] Ammonia nitrogen sensitive band R1 (NH3N) = = 560nm, R2 (NH3N) = = 650nm;

[0048] Dissolved oxygen sensitive band R1(DO)==665nm, R2(DO)==490nm;

[0049] Transparency sensitive bands R1 (turbidity) == 646nm, R2 (turbidity) == 857nm; (when an odd-numbered band is used, the average value of the values ​​before and after the current band is calculated).

[0050] Substitute the sensitive bands into the model formula:

[0051]

[0052]

[0053]

[0054] Step 60: If the calculated ammonia nitrogen, transparency, and dissolved oxygen are less than zero, an abnormality is output and the data is discarded, and the process returns to step 20 to read the next data. If the black and odorous water body difference threshold does not meet the discrimination condition and the data is error data, the process returns to step 20 to calculate another data.

[0055] Step 70: Bring T, ammonia nitrogen, dissolved oxygen, and transparency parameters into the judgment. If T≥0.0025, and (NH3N>15, transparency TURBIDITY<10, dissolved oxygen DO<0.2; one or more of the conditions are met), the water body is a severely black and smelly water body; otherwise it is other polluted water body.

[0056] If 0.00165≤T<0.0025, and (8<NH3N<15, 10<TURBIDITY<21, 0.2<dissolved oxygen D0<20, one or more of the conditions are met), the water body is a slightly black and smelly water body, otherwise it is other polluted water body.

[0057] If T < 0.00165, and (NH3N < 8, 21 < TURBIDITY, 20 < dissolved oxygen DO, one or more of the conditions are met), then the water body is a general water body;

[0058] The present invention uses the visible-infrared hyperspectral device to continuously detect the measured water body, and uses the measured spectral data in combination with the python program to complete the extraction and calculation of the data, and then makes a preliminary judgment on the water body type through the spectral characteristic values ​​of the black and odorous water body, and then further distinguishes the black and odorous water body in combination with the three parameter values ​​of ammonia nitrogen, transparency, and dissolved oxygen, thereby realizing the rapid and accurate judgment of severe black and odorous water bodies, mild black and odorous water bodies and general water bodies.

[0059] It should be noted that the values ​​of T1 and T2 mentioned above and the multiple coefficients in the inversion formulas for ammonia nitrogen, dissolved oxygen and transparency are empirical values ​​obtained after fitting a large amount of spectral data through the neural network training model, and are applicable to all models.

[0060] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by those with ordinary knowledge in the technical field without departing from the spirit and technical ideas disclosed by the present invention should still be covered by the claims of the present invention.

Claims

1. A method for measuring the degree of blackness and odor of water based on hyperspectral technology, characterized in that: The steps include: S10: Installing a hyperspectral device on one side of the measured water body, and then connecting the hyperspectral device to photograph the measured water body; S20: Using pycharm software, obtain the hyperspectral data of the device for processing, and save the hyperspectral device data in csv data format, with the band corresponding to the reflectance; S30: extracting and calculating the characteristic value T of the black and odorous water body through the data captured by the hyperspectral device; S40: Using S20 data, the average spectral difference thresholds of different black and odorous water bodies are obtained as T1 and T2; S50: using the data from S20, respectively obtaining the reflectance of the sensitive bands of transparency, dissolved oxygen, and ammonia nitrogen parameters, and calculating the value of the reflectance; S60: Pre-judge the value obtained in S50; S70: using the parameters obtained in the above steps to identify the degree of blackness and odor of the tested water body; Method for identifying the degree of blackness and odor of the tested water: S71: If the black and odorous water body characteristic value T is greater than or equal to T2, and at least one parameter in the sensitive band constructed in S50 meets the condition of severe black and odorous water body, then the water body is a severe black and odorous water body; when no parameter meets the condition of severe black and odorous water body: if at least one parameter meets the condition of mild black and odorous water body, then it is a mild black and odorous water body; if no parameter meets the condition of mild black and odorous water body, then it is a general water body; S72: If the black and odorous water body characteristic value T is located in [T1-T2), and at least one parameter of the sensitive band constructed in S50 meets the general black and odorous water body condition, the measured water body is a light black and odorous water body; if no parameter meets the general black and odorous water body condition: if multiple parameters meet the severe black and odorous water body condition, it is a black and odorous water body; if only one parameter meets the severe black and odorous water body condition, it is a light black and odorous water body; if none of the parameters meet the above conditions, it is a general water body; S73: If the black and odorous water characteristic value T is less than T1, and at least one parameter of the sensitive band constructed in S50 meets the general water body conditions, then it is a general water body; if no parameter meets the general water body conditions, then it is a slightly black and odorous water body; The reflectance values ​​of the transparency, dissolved oxygen, and ammonia nitrogen parameter sensitive bands are: NH3N (8-15), TURBIDITY (10-21), and dissolved oxygen D0 (0.2-20). The average spectral difference thresholds T1 and T2 are [0.00165-0.0025]. The values ​​pre-judged in step S60 include: transparency of the black and odorous water body, and reflectance values ​​of the sensitive bands of dissolved oxygen and ammonia nitrogen parameters; If the parameter obtained in S50 is less than zero, return to S20; According to the method of calculating the characteristic value T of black and odorous water in step S30, a characteristic band is first selected, and then the same band is selected for the measured water body to calculate the characteristic value T of the measured water body. The data of the selected characteristic band are summed and normalized, and then the characteristic value T of the black and odorous water body is obtained. The range of the selected characteristic band i is: 520nm-600nm (correlation coefficient R 2 Greater than 0.8), the formula is as follows: T=MAX t -MIN t 。 2. The method for calculating the degree of blackness and odor of water bodies based on hyperspectral technology according to claim 1, characterized in that: The hyperspectral device is a CMOS imager. The shooting light is provided by LED and the light is installed vertically downward. The light source is higher than the hyperspectral device. The device has a collection focal length of 20cm, a spectral range of 380nm-960nm, a resolution of 10-25nm, and an output step size of 2.

3. The method for calculating the degree of blackness and odor of water bodies based on hyperspectral technology according to claim 2, characterized in that: The data collection method of the hyperspectral equipment is command collection. The collection direction of the equipment is at an angle of 30° to the vertical LED light source, and the distance from the water surface to the measured water body is 20 cm.

4. The method for calculating the degree of blackness and odor of water bodies based on hyperspectral technology according to claim 1, characterized in that: Parameter value calculation method in S50: Use the programming language of step S20 to obtain the sensitive bands of ammonia nitrogen (NH3N), dissolved oxygen (DO) and transparency (TURBIDITY) as independent variables for calculation. The calculation model formula is: a=15.205, b=0.38, c=1.12; a=-670.86, b=683.76; a=250.865, b=1.476, c=0.

435.

5. The method for calculating the degree of blackness and odor of water bodies based on hyperspectral technology according to claim 4 is characterized in that: When the independent variable of the sensitive band is an odd-numbered band, the average value of the previous and next values ​​of the current band is taken as the actual sensitive band and substituted into the formula for calculation.