Method for quantitatively monitoring pollution degree of underground water

Through the combination of near-infrared hyperspectral imaging technology and prediction models, the problems of complexity and high cost of detecting petroleum hydrocarbon content in groundwater in the prior art are solved, and efficient, economical and convenient quantitative monitoring of the degree of groundwater pollution is achieved.

CN119643495APending Publication Date: 2025-03-18BEIJING NORMAL UNIV AT ZHUHAI
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411647393.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The prior art has problems such as complex operation, high cost, high environmental impact and dependence on operator skills in detecting petroleum hydrocarbon content in groundwater, making it difficult to achieve fast, convenient and efficient quantitative analysis.

Method used

Near-infrared hyperspectral imaging equipment was used to collect images, and spectral correction, feature extraction and linear fit were performed through prediction models to construct prediction functions to quantitatively monitor the content of petroleum hydrocarbons in groundwater.

Benefits of technology

It realizes efficient, economical, environmentally friendly and convenient quantitative monitoring of the degree of groundwater pollution, reduces detection costs and environmental impacts, and improves detection speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119643495A_ABST
    Figure CN119643495A_ABST
Patent Text Reader

Abstract

The invention relates to a method for quantitatively monitoring the pollution degree of groundwater. The method comprises the steps of near-infrared hyperspectral imaging, construction of a prediction model and fitting of a prediction function. The invention further provides a groundwater analysis system and application of the method. According to the method, a hyperspectral imaging technology is adopted to shoot a mixed sample of organic pollutants and water, key features of a sample image are obtained by combining an image preprocessing technology and a feature extraction technology, the sample features with remarkable performance are used as training data, and a machine learning algorithm is applied to obtain training data; the model can accurately predict the water-oil volume ratio in a sample, and meanwhile, provides spatial distribution of the organic pollutants in the environment, so that an efficient and innovative solution is provided for quantitative analysis of the organic pollutants.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of groundwater pollution detection, and in particular relates to a method for quantitatively monitoring the degree of groundwater pollution. Background Art

[0002] Due to the influence of human activities and natural factors, there are various pollutants in groundwater, among which halogenated compounds and petroleum hydrocarbons are common pollutants, which pose a serious threat to human health and the environment. Considering the symbiotic relationship between halogenated compounds and petroleum hydrocarbons in petroleum, detecting the content of petroleum hydrocarbons in groundwater is a prerequisite for formulating groundwater remediation plans.

[0003] However, there are still certain technical difficulties in detecting the content of petroleum hydrocarbons in groundwater. First, there are many types of petroleum hydrocarbons, and the solubility and mobility of different types of petroleum hydrocarbons in groundwater vary greatly, which makes the detection work complicated. Secondly, the complexity of the groundwater environment, such as pH value, temperature, organic matter content and other factors, will affect the detection results of petroleum hydrocarbons. Thirdly, although infrared spectroscopy, gas chromatography, mass spectrometry and fluorescence spectroscopy can be used for material detection, it is still difficult to detect the content of petroleum hydrocarbons in groundwater with existing methods. Specifically:

[0004] Gas chromatography is highly complex to operate and can only be measured in laboratories. In addition, it relies on the use of chemical reagents, which not only has potential impacts on the environment but also limits its application in environmental analysis. Therefore, gas chromatography has limitations in rapid detection and on-site application.

[0005] In mass spectrometry, mass spectrometers are usually expensive, require high operating skills, and can only be measured in laboratories. In addition, mass spectrometry analysis requires complex sample pretreatment, which not only prolongs the analysis time, but also increases the requirements for the professional skills of the operator, making it difficult to use for the analysis of complex samples or situations that require rapid analysis.

[0006] The detection process of fluorescence spectroscopy is easily interfered by other fluorescent substances in the sample, thus affecting the accuracy of the analysis results; fluorescence spectroscopy can only give the integral of the signal within the detection point, and cannot provide the spatial distribution information of petroleum hydrocarbons and water.

[0007] Infrared spectroscopy is similar to fluorescence spectroscopy in that it can only provide the signal integration result of a single measurement point and cannot provide the spatial distribution information of petroleum hydrocarbons and water.

[0008] In summary, the existing technologies have shortcomings in terms of ease of operation, cost-effectiveness, environmental impact, and dependence on operator skills. These defects have prompted researchers to seek a more efficient, economical, environmentally friendly and easy-to-operate method for quantitative analysis of halogenated compounds and / or petroleum hydrocarbons. Summary of the invention

[0009] In order to improve the deficiencies of the prior art, the present invention provides a method for quantitatively monitoring the degree of groundwater pollution, the method comprising the following steps:

[0010] Step (1): Near-infrared hyperspectral imaging

[0011] Use near-infrared hyperspectral imaging equipment to collect images, including sample images and blank images, and send them to the prediction model;

[0012] Preferably, the collected images are named and saved, and each file name contains the corresponding standard values ​​of the type, content, band information, mixture ratio of water and organic matter, etc. of the organic pollutant;

[0013] Step (2): Construction of prediction model

[0014] ①Data reading

[0015] Read the image file information sent in step (1), send the image file and its pixel values ​​to the spectral correction unit, and store the image file label information in an array as the y data set required for the fitting function;

[0016] Preferably, when the system recognizes that the format of the file is an image file (e.g., .png), the pixel value of the image file is read, and label information (such as the type, content, band information, standard values ​​of the mixture ratio of water and organic matter, etc. of the organic pollutant) is extracted from the image file name;

[0017] Preferably, when the image file is a non-grayscale image, the image file is converted into a grayscale image;

[0018] ② Spectral correction

[0019] In the spectrum correction unit, the sample image file sent in step ①b is compared with the blank image file, and the background information in the image file sent in step ①b is removed to obtain a spectrum correction image;

[0020] Preferably, the picture of the blank container refers to a picture of a blank cuvette, preferably a grayscale picture of a blank cuvette;

[0021] Preferably, the method for removing the background information in the picture file sent in step ①b includes calculating according to the following formula:

[0022]

[0023] Among them, T S is the sample transmittance, I t is the transmitted light intensity when there is a sample at point (x, y) under the wavelength band λ, I t' is the transmitted light intensity when there is no sample;

[0024] ③Effective area extraction

[0025] Perform preliminary cropping on the spectral correction image to remove some invalid areas;

[0026] For the picture where some invalid areas still exist at the edge, foreground extraction is performed (including but not limited to one, two or three selected from edge extraction, expansion filling and cuvette area extraction), so as to obtain a cuvette area picture;

[0027] Preferably, only the cuvette portion is retained in the cuvette area image, and the invalid portion at the edge of the image is removed;

[0028] ④Feature extraction

[0029] Perform contrast adjustment, binarization and pixel count on the color dish area image;

[0030] Preferably, the contrast adjustment makes the color contrast between oil and water significant, thereby performing binarization processing.

[0031] Preferably, the binarization process includes using an Ostu algorithm to obtain a black and white binary image, wherein the black area corresponds to water in the mixture, the white area corresponds to organic pollutants in the mixture, the value corresponding to the black pixel is 0, and the value corresponding to the white pixel is 1;

[0032] Preferably, the pixel counting includes: by counting the number of black pixels and the number of white pixels respectively and dividing them, the volume ratio of water to oil, i.e., the water-oil ratio, can be roughly obtained;

[0033] Step (3) Prediction function fitting

[0034] Use the acquired partial water-oil ratio data as training data set x, and the image file label information (such as the standard value of the water-oil volume ratio) as data set y;

[0035] Perform linear fitting on the data set x and the data set y to obtain a linear function (ie, a prediction function).

[0036] Preferably, step (2) may include the following steps:

[0037] S1. Mix the organic pollutant sample with water in different proportions to prepare a mixed sample;

[0038] S2. Use a near-infrared hyperspectral imaging device to photograph each mixed sample, obtain a sample image, and store the sample image information;

[0039] S3. Read the pixel values ​​of all image information, divide all sample images by the blank image pixel by pixel to eliminate the influence of illumination, and obtain a corrected spectral image;

[0040] S4. cropping the corrected spectral image to extract the effective area;

[0041] S5. performing binarization processing on the extracted effective area to estimate the water-oil mixing ratio;

[0042] S6. The water-oil ratio data is used as the training data set x, the file information is used as the data set y, and the data set x and the data set y are linearly fitted to obtain a linear function, namely, a prediction function.

[0043] According to an embodiment of the present invention, when using a near-infrared hyperspectral imaging device to photograph each mixed sample in step S2, filters of several different wavelengths are used to filter the light source to obtain images of different light sources, for example, filters of three wavelengths of 1300nm, 1350nm and 1400nm are used to filter the light source.

[0044] According to an embodiment of the present invention, the training data set includes at least 50% of the water-oil ratio data, preferably the training data set includes at least 60% of the water-oil ratio data, for example, the training data set includes 70% of the water-oil ratio data.

[0045] According to an implementation scheme of the present invention, step S6 also includes the following steps: using the remaining water-oil ratio data as a test set, inputting the original image information corresponding to the test set into the system, predicting the corresponding water-oil ratio data through a prediction function, and comparing the water-oil ratio data with the actual water-oil ratio data in the training data set x to determine the accuracy of the prediction function.

[0046] Preferably, the method further comprises processing a sample (such as a sample to be tested) using the above method, and inputting the data of the sample (such as a sample to be tested) into the above linear function to obtain the water-oil ratio (such as its volume mixing ratio) of the sample (such as a sample to be tested).

[0047] According to an embodiment of the present invention, the image preprocessing further includes an accuracy judgment step, which is used to judge the accuracy of the prediction function obtained by the prediction function fitting unit.

[0048] According to an embodiment of the present invention, the accuracy judgment step includes using 70% of the water-oil ratio data that have been obtained as a training data set x, and the remaining 30% of the water-oil ratio data as a test set. After obtaining the prediction function, the original image information corresponding to the test set is input into the system, the corresponding water-oil ratio data is predicted by the prediction function, and the water-oil ratio data is compared with the actual water-oil ratio data in the training data set x to judge the accuracy of the prediction function.

[0049] The present invention provides a groundwater analysis system, wherein the system comprises a near-infrared hyperspectral imaging device and a prediction model system, wherein the near-infrared hyperspectral imaging device is used to collect images, store images and send them to the prediction model, and the prediction model is used to determine the degree of groundwater pollution based on the current image;

[0050] The prediction model system includes an image preprocessing module and a prediction function fitting module. The image preprocessing module is used to receive image and file information sent by a near-infrared hyperspectral imaging device, preprocess the image, extract relevant information of the image and send it to the prediction function fitting module. The prediction function fitting module is used to generate a prediction function based on the image information. When the sample to be tested is input into the prediction function, the water and oil volume ratio of the sample to be tested can be obtained.

[0051] According to an embodiment of the present invention, the analysis system is a groundwater detection or monitoring system, in particular, a groundwater pollution degree detection or monitoring system of organic pollutants.

[0052] According to an embodiment of the present invention, the near-infrared hyperspectral imaging device includes an imaging module and a storage module, the imaging module is used to collect image information of the sample, and the storage module is used to store the image information.

[0053] According to an embodiment of the present invention, the imaging module includes a sample stage, an infrared camera and a light source. The sample stage is used to place the sample to be photographed. The light source is used to illuminate the sample and provide the infrared camera with the lighting conditions required for shooting. The infrared camera is used to image the sample.

[0054] According to an embodiment of the present invention, the sample stage includes a lifting platform and a reflective plate arranged on the top of the lifting platform, and a sample slot is or is not arranged on the top of the reflective plate. The sample slot is used to place the sample to be photographed, or is used for a container for loading the sample, such as a cuvette.

[0055] According to the implementation scheme of the present invention, the infrared camera is a camera known in the art. In this embodiment, LD-SW640171550-UC1-G (Xi'an Liding, receiving band: 900-1700nm) is selected.

[0056] According to an embodiment of the present invention, the light source is a light source capable of emitting visible light, for example, a xenon lamp light source of model TSL-300P with an emission wavelength of 300-2500nm.

[0057] According to an embodiment of the present invention, the imaging module also includes a filter assembly, which includes a plurality of filters and may also include a filter fixing member. The number of filters and the filtering wavelength are selected according to actual needs. In this embodiment, the filter assembly includes filters of three wavelength bands: 1300nm, 1350nm and 1400nm.

[0058] According to an embodiment of the present invention, the sample is a standard organic pollutant.

[0059] According to an embodiment of the present invention, the organic pollutant is stored in a cuvette for imaging.

[0060] According to an embodiment of the present invention, the photographing is performed under illumination of light sources of the same or different wavelength bands.

[0061] According to an embodiment of the present invention, the storage module is also used to name the collected image information, and to correspond the file name to the image one-to-one. Each file name contains the corresponding standard values ​​of the category, content, band information, mixture ratio of water and organic matter of the organic pollutant, etc., to facilitate data management and traceability.

[0062] According to an embodiment of the present invention, the image preprocessing module includes a data reading unit, a spectrum correction unit, a valid area extraction unit and a feature extraction unit which are connected in sequence.

[0063] According to an embodiment of the present invention, the data reading unit is used to read image information and file information, and identify and read pixel values ​​of the image information.

[0064] As an example, when the system recognizes that a file is a png file (jip, tif file, etc.), the data reading unit is used to convert the image into a grayscale picture, read the pixel values ​​of the grayscale picture, extract the file information from the file name, send the grayscale picture and the corresponding pixel values ​​to the spectral correction unit, and store the file information in an array as the y data set required for the fitting function.

[0065] According to an embodiment of the present invention, the spectrum correction unit is used to compare the current grayscale image with the grayscale image of the blank container, remove background information in the current grayscale image, and obtain the spectrum correction image.

[0066] According to an embodiment of the present invention, the grayscale picture of the blank container refers to a grayscale picture of a blank cuvette.

[0067] According to an embodiment of the present invention, the spectrum correction unit removes background information in the current grayscale image, including the following steps: calculating according to the following formula:

[0068]

[0069] Among them, T S is the sample transmittance, I t is the transmitted light intensity when there is a sample at point (x, y) under the wavelength band λ, I t ' is the transmitted light intensity when there is no sample.

[0070] According to an embodiment of the present invention, the effective area extraction unit is used to extract the effective area part in the spectrum correction picture, that is, the picture of the cuvette area.

[0071] According to the implementation scheme of the present invention, only a small part of the spectrum correction image is the effective part we need. Extracting the effective area can reduce the amount of calculation and improve the processing speed.

[0072] According to an implementation scheme of the present invention, in the effective area extraction unit, since the position of the cuvette on each picture is roughly the same, the spectrally corrected picture is first roughly cropped to obtain a picture with fewer invalid areas; at this time, there are still invalid areas at the edge of the picture, and the picture is subjected to foreground extraction (including edge extraction, expansion filling, and cuvette area extraction) to obtain only the cuvette portion, while the invalid edge portion is removed.

[0073] According to an embodiment of the present invention, the feature extraction unit is used to extract key features of the cuvette area image, and the extraction includes contrast adjustment, binarization processing and pixel point statistics on the cuvette area image.

[0074] According to the embodiment of the present invention, the purpose of the contrast adjustment is to make the color contrast between oil and water more prominent and to perform binarization processing better.

[0075] According to an embodiment of the present invention, the contrast adjustment is performed according to the following formula:

[0076] g(i,j)=alpha*f(i,j)+beta

[0077] Among them, alpha is the contrast control parameter, beta is the brightness control parameter, f(i,j) is the original image pixel value distribution function, g(i,j) is the adjusted image pixel value distribution function. In the test, alpha values ​​range from 1.5 to 2 and are adjusted according to different image performances. The beta value is 10.

[0078] According to an embodiment of the present invention, the binarization processing includes using the Ostu algorithm to obtain a black and white binary image, wherein the black area corresponds to the water in the mixture, the white area corresponds to the organic pollutants in the mixture, the value corresponding to the black pixel point is 0, and the value corresponding to the white pixel point is 1.

[0079] According to an embodiment of the present invention, the pixel counting includes: by counting the number of black pixels and the number of white pixels respectively and dividing them, the volume ratio of water and oil, ie, the water-oil ratio, can be roughly obtained.

[0080] According to an embodiment of the present invention, the prediction function fitting unit includes using part of the water-oil ratio data that has been obtained as a training data set x, the file information as a data set y, and linearly fitting the data set x and the data set y to obtain a linear function, namely the prediction function.

[0081] According to an embodiment of the present invention, the image preprocessing module further includes an accuracy judgment unit, which is used to judge the accuracy of the prediction function obtained by the prediction function fitting unit.

[0082] As an example, the accuracy judgment unit includes using 70% of the water-oil ratio data that has been obtained as a training data set x, and the remaining 30% of the water-oil ratio data as a test set. After obtaining the prediction function, the original image information corresponding to the test set is input into the system, the corresponding water-oil ratio data is predicted by the prediction function, and the water-oil ratio data is compared with the actual water-oil ratio data in the training data set x to judge the accuracy of the prediction function.

[0083] According to an embodiment of the present invention, the image preprocessing module further includes a prediction unit, and the prediction unit is used to determine the water-oil ratio of the current sample according to the prediction function.

[0084] The present invention also provides a method for constructing a pollution degree prediction model, comprising the following steps:

[0085] S1. Mix the organic pollutant sample with water in different proportions to prepare a mixed sample;

[0086] S2. Use a near-infrared hyperspectral imaging device to photograph each mixed sample, obtain a sample image, and store the sample image information;

[0087] S3. Read the pixel values ​​of all image information, divide all sample images by the blank image pixel by pixel to eliminate the influence of illumination, and obtain a corrected spectral image;

[0088] S4. cropping the corrected spectral image to extract the effective area;

[0089] S5. performing binarization processing on the extracted effective area to estimate the water-oil mixing ratio;

[0090] S6. The water-oil ratio data is used as the training data set x, the file information is used as the data set y, and the data set x and the data set y are linearly fitted to obtain a linear function, namely, a prediction function.

[0091] According to an embodiment of the present invention, when using a near-infrared hyperspectral imaging device to photograph each mixed sample in step S2, filters of several different wavelengths are used to filter the light source to obtain images of different light sources, for example, filters of three wavelengths of 1300nm, 1350nm and 1400nm are used to filter the light source.

[0092] According to an embodiment of the present invention, the training data set includes at least 50% of the water-oil ratio data, preferably the training data set includes at least 60% of the water-oil ratio data, for example, the training data set includes 70% of the water-oil ratio data.

[0093] According to an implementation scheme of the present invention, step S6 also includes the following steps: using the remaining water-oil ratio data as a test set, inputting the original image information corresponding to the test set into the system, predicting the corresponding water-oil ratio data through a prediction function, and comparing the water-oil ratio data with the actual water-oil ratio data in the training data set x to determine the accuracy of the prediction function.

[0094] According to an embodiment of the present invention, the above method for constructing a pollution degree prediction model is performed on the groundwater analysis system.

[0095] The present invention also provides a method for determining the degree of contamination, comprising using the above method and / or system to process a sample to be tested, obtaining the water-oil ratio of the sample to be tested, and thereby determining the degree of contamination.

[0096] According to an embodiment of the present invention, the method is a method for determining the degree of groundwater pollution, preferably a method for quantitatively detecting or monitoring the degree of groundwater pollution.

[0097] The present invention also provides the use of the above method and / or system, which is used to determine the degree of groundwater pollution, preferably for quantitative detection or monitoring of the degree of groundwater pollution.

[0098] According to an embodiment of the present invention, the pollution refers to pollution caused by organic pollutants. Specifically, the organic pollutants include but are not limited to organic substances that cause groundwater pollution, such as petroleum hydrocarbons, halogenated hydrocarbons or other organic substances that are miscible or immiscible with water.

[0099] Those skilled in the art will appreciate that when constructing a prediction model, the organic pollutants may be artificially prepared, for example, they may be obtained by mixing organic matter with water in a ratio selected from 0:1 to 1:0. When the method or system of the present invention is used for quantitative detection or monitoring of organic pollutants in a sample (or specimen), the organic pollutants may be organic pollutants that already exist in groundwater due to external factors.

[0100] Those skilled in the art should understand that organic pollutants in groundwater have different polarity and light absorption intensity from water, and therefore may present color or contrast differences due to dissolving different substances, and / or produce image differences due to different light absorption intensities in the band of the present invention, thereby facilitating the recognition of image files.

[0101] According to the embodiment of the present invention, the composition of petroleum hydrocarbons is known to those skilled in the art, for example, it can be selected from hydrocarbons, such as straight-chain or branched alkanes (such as straight-chain or branched C1-C 20 Alkanes, such as dodecane), cycloalkanes, aromatic hydrocarbons, and a mixture of one or more of sulfides, nitrides, cycloalkanes, etc.

[0102] According to an embodiment of the present invention, the halogenated hydrocarbon may be a linear or branched alkane, cycloalkane, or aromatic hydrocarbon substituted by one or more halogens, wherein the halogen is selected from F, Cl, Br, or I.

[0103] Beneficial Effects

[0104] The present invention unexpectedly achieves the following advantages:

[0105] 1. Easy to build and simple to operate: Most of the current quantitative detection technologies rely on complex chemical reagent debugging and advanced technical knowledge, which leads to high barriers to use and difficult operation. This method mainly relies on near-infrared hyperspectral imaging equipment and computer systems. The hyperspectral instrument is responsible for capturing the hyperspectral image of the sample, and the computer is used for data processing and analysis. Among them, the hyperspectral instrument is dedicated to efficiently collecting hyperspectral images of samples. The operation process only requires placing the mixed sample under the instrument, without any additional chemical reagents or complex pretreatment, which greatly simplifies the detection process. In addition, the data processing technologies involved in the model building stage of this method are all basic operations in the field of programming. These technologies are well known and easy to master, and the model building process is intuitive and easy to execute.

[0106] 2. Cost-effectiveness and environmental friendliness: Traditional detection technologies, such as gas chromatography and fluorescence spectroscopy, often rely on specific chemical reagents, especially certain higher-cost reagents, which will lead to a significant increase in the overall detection cost; and the chemical waste generated by these detection technologies will pollute the environment and introduce waste disposal costs. In comparison, the method adopted in the present invention significantly reduces the dependence on chemical reagents, thereby effectively reducing the detection cost. The equipment used in this method is durable and non-disposable, which can support multiple reuses, further amortizing fixed costs. This design not only improves economic efficiency, but also reduces the environmental burden brought by chemical reagents, achieving the dual advantages of cost-effectiveness and environmental friendliness.

[0107] 3. Detection timeliness: Existing quantitative analysis techniques usually involve multiple complex operating steps, which results in a long detection process and is difficult to meet the needs of rapid real-time monitoring. In contrast, the present invention significantly improves the detection speed by simplifying the equipment calibration process and optimizing the data processing algorithm. This method not only allows for easy equipment debugging, but also rapid data processing, thereby enabling instant and efficient quantitative analysis of samples, meeting the needs for rapid real-time detection. This feature gives the present invention significant advantages in application scenarios that require immediate feedback, such as on-site testing, online monitoring, etc.

[0108] 4. The present invention provides a high-definition and high-precision detection method. By processing the collected sample images with the model, we can directly extract the key feature images and the corresponding mixing ratio values. This process not only simplifies the data analysis, but also makes the results more intuitive and easy to understand, greatly enhancing the readability of the data.

[0109] 5. In actual tests, this method conducted a comprehensive analysis of sample images in different bands (1300nm, 1350nm, 1400nm), involving six different mixing ratios (0.0, 0.2, 0.4, 0.6, 0.8, 1.0). The test results show that the prediction accuracy exceeds 90% in all tested bands, proving the high detection accuracy of this method in quantitative analysis. This significant level of accuracy confirms the technical advantages of this invention in the field of hyperspectral imaging analysis, and is suitable for application scenarios that require precise quantitative analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0110] Figure 1 It is a structural block diagram of the prediction model in Example 1;

[0111] Figure 2 This is a schematic diagram of the structure of the near-infrared hyperspectrometer imaging device in Example 1;

[0112] Figure 3 is a flow chart of the prediction method in Example 2;

[0113] Figure 4 A graph showing the prediction of the prediction set data by the prediction function of the dodecane-1300 band in Example 2 and the comparison with the function y=x;

[0114] Figure 5 It is a linear graph of the prediction function of the dodecane-1350 band in Example 2;

[0115] Figure 6 A graph showing the prediction of the prediction set data by the prediction function of the dodecane-1350 band in Example 2 and the comparison with the function y=x;

[0116] Figure 7is a linear graph of the prediction function of the dodecane-1400 band in Example 2;

[0117] Figure 8 The prediction function of dodecane-1400 in Example 2 predicts the prediction set data and compares it with the function y=x

[0118] Fig. 9 is a linear graph of the prediction function of the dodecane-1450 band in Example 2;

[0119] Fig.10 This is a graph showing the prediction of the prediction set data using the prediction function for dodecane-1450 in Example 2 and comparing it with the function y=x. DETAILED DESCRIPTION

[0120] The following will further describe the system, method and application of the present invention in detail in conjunction with specific embodiments. It should be understood that the following embodiments are only exemplary descriptions and explanations of the present invention and should not be construed as limiting the scope of protection of the present invention. All technologies implemented based on the above content of the present invention are included in the scope of protection of the present invention.

[0121] Unless otherwise specified, the raw materials and reagents used in the following examples are commercially available or can be prepared by known methods.

[0122] The near-infrared hyperspectrometer imaging device of this embodiment has a simple structure. The sample stage, infrared camera, filter assembly, light source and signal processor can be placed separately and assembled at the site of use. Therefore, it can be used in deep well environment and groundwater detection, which are difficult to test using infrared spectroscopy, gas chromatography, mass spectrometry and fluorescence spectroscopy. Therefore, the present invention can reduce the risk of contamination that may occur during sample transportation and reduce transportation costs, thereby ensuring the accuracy and reliability of the test results and reducing the detection cost. Therefore, while improving the detection efficiency, the present invention also improves the applicability and flexibility of the detection process.

[0123] The present invention constructs an innovative technology that uses hyperspectral imaging technology to shoot mixed samples of organic pollutants and water, combines image preprocessing and feature extraction technology to obtain key features of sample images, and uses significant sample features as training data. By applying a machine learning algorithm, the model can accurately predict the water-oil volume ratio in the sample and give the spatial distribution of organic pollutants in the environment, thereby providing an efficient and innovative solution for the quantitative analysis of organic pollutants.

[0124] Example 1: System for monitoring groundwater contamination

[0125] This embodiment provides a system for monitoring the degree of groundwater pollution, which includes a near-infrared hyperspectral imaging device and a prediction model system. The near-infrared hyperspectral imaging device is used to collect images, store images and send them to the prediction model, and the prediction model is used to determine the degree of groundwater pollution based on the current image.

[0126] See also Figure 2 As shown, the near-infrared hyperspectral imaging device used in the present invention includes a sample stage, an infrared camera, a filter assembly, and a light source, wherein the sample stage includes a lifting platform and a reflector arranged on the top of the lifting platform, a sample slot is arranged or not arranged on the top of the reflector, and the sample slot is used to place the sample to be photographed, or a container for loading the sample, such as a cuvette; the light source irradiates the sample to provide the infrared camera with the lighting conditions required for shooting, the filter assembly is arranged on the optical path of the infrared camera shooting the sample, and the infrared camera is connected to the signal processor to send the shot picture to the prediction model for processing.

[0127] Among them, the infrared camera selects a camera known in the art. In this embodiment, LD-SW640171550-UC1-G (Xi'an Liding, receiving band: 900-1700nm) is selected; the filter assembly includes a plurality of filters and can also include a filter fixing. The number of filters and the filtering wavelength are selected according to actual needs. In this embodiment, the filter assembly includes filters of three bands of 1300nm, 1350nm and 1400nm; the light source selects a light source that can emit visible light, for example, a xenon lamp light source with a model of TSL-300P and an emission wavelength of 300-2500nm is selected.

[0128] Among them, the storage of images is realized through a storage module, which is used to name the collected images and correspond the file names to the images one by one. Each file name contains the corresponding hydrocarbon identification, band information and standard mixing ratio to facilitate data management and traceability.

[0129] When in use, the present invention takes multiple standard petroleum hydrocarbon mixtures according to a mixing ratio within a numerical range of 0 to 1, configures multiple groups of samples according to the ratio, places them in a cuvette, uses light sources of different bands to irradiate the cuvette, and uses the near-infrared hyperspectral imaging device in this embodiment to collect images, obtain petroleum hydrocarbon mixture sample pictures in different bands and different mixing ratios, and store them in a storage module.

[0130] The prediction model system includes an image preprocessing module and a prediction function fitting module. The image preprocessing module is used to receive the image and file information sent by the storage module, preprocess the image, extract the relevant information of the image and send it to the prediction function fitting module. The prediction function fitting module is used to generate a prediction function based on the image information. When the sample to be tested is input into the prediction function, the water and oil volume ratio of the sample to be tested can be obtained.

[0131] The image preprocessing module comprises a data reading unit, a spectrum correction unit, an effective area extraction unit and a feature extraction unit which are connected in sequence.

[0132] The data reading unit is connected to the storage module, and is used to read image information and file information, identify and read the pixel value of the image information. For example, when the program recognizes that the file is a png file (jip, tif file, etc.), the image is converted into a grayscale picture, the pixel value of the grayscale picture is read, the file information is extracted from the file name, the grayscale picture and the corresponding pixel value are sent to the spectral correction unit, and the file information is stored in an array as the y data set required for the fitting function.

[0133] The spectral correction unit is used to compare the grayscale image of the current sample with the grayscale image of the blank container, remove the background information in the grayscale image of the current sample, and obtain a spectral correction image, wherein the grayscale image of the blank container refers to the grayscale image of the blank cuvette; specifically, the calculation is performed according to the following formula:

[0134]

[0135] Among them, T S is the sample transmittance, I t is the transmitted light intensity when there is a sample at point (x, y) under the wavelength band λ, I t ' is the transmitted light intensity when there is no sample. We know that due to the different wavelengths of light used, the sample images may have deviations in pixel values. In order to eliminate the influence of light and obtain the accurate pixel value of the sample (the expression of transmittance), the spectral correction unit reads a blank cuvette grayscale image and divides the pixel values ​​of the corresponding positions of the grayscale image of the sample and the grayscale image of the blank cuvette one by one.

[0136] The effective area extraction unit is used to extract the effective area part in the spectrum correction picture, that is, the picture of the cuvette area. Specifically, in the spectrum correction picture, only a small part is the effective part we need. Extracting the effective area part can reduce the amount of calculation and improve the processing speed. In the effective area extraction unit, since the position of the cuvette on each picture is roughly the same, the spectrum correction picture is first roughly cropped to obtain a picture with fewer invalid areas; at this time, there are still invalid areas on the edge of the picture, and the foreground extraction (including edge extraction, expansion filling, and cuvette area extraction) of the picture is performed to obtain only the cuvette part, and the invalid edge part is removed to optimize the performance of the binarization result in the feature extraction module.

[0137] The feature extraction unit is used to extract key features of the cuvette area image, and the extraction includes contrast adjustment, binarization processing and pixel point statistics on the cuvette area image.

[0138] The purpose of contrast adjustment is to make the color contrast between oil and water more obvious and to perform binarization better. The contrast adjustment is performed according to the following formula:

[0139] g(i,j)=alpha*f(i,j)+beta

[0140] Among them, alpha is the contrast control parameter, beta is the brightness control parameter, f(i,j) is the original image pixel value distribution function, g(i,j) is the adjusted image pixel value distribution function. In the test, alpha values ​​range from 1.5 to 2 and are adjusted according to different image performances. The beta value is 10.

[0141] The binarization process includes using the Ostu algorithm to obtain a black and white binary image, wherein the black area corresponds to the water in the mixture, the white area corresponds to the petroleum hydrocarbons in the mixture, the value corresponding to the black pixel is 0, and the value corresponding to the white pixel is 1.

[0142] Pixel counting includes: by counting the number of black pixels and white pixels respectively and dividing them, the volume ratio of water and oil, that is, the water-oil ratio, can be roughly obtained.

[0143] Through the processing of these three parts, the key features of the image required for prediction can be extracted and data that can be used for training can be obtained.

[0144] The prediction function fitting unit includes using part of the water-oil ratio data that has been obtained as a training data set x, using the file information as a data set y, performing linear fitting on the data set x and the data set y to obtain a linear function, namely the prediction function.

[0145] In this embodiment, an accuracy judgment unit is also included, which is used to judge the accuracy of the prediction function obtained by the prediction function fitting unit. The accuracy judgment unit includes using 70% of the water-oil ratio data that has been obtained as a training data set x, and the remaining 30% of the water-oil ratio data as a test set. After obtaining the prediction function, the original image information corresponding to the test set is input into the system, the corresponding water-oil ratio data is predicted by the prediction function, and the water-oil ratio data is compared with the actual water-oil ratio data in the training data set x to judge the accuracy of the prediction function.

[0146] By inputting new sample data into this prediction function, the water-oil volume ratio of the new sample can be predicted. So far, the model has realized the function of predicting the volume ratio of water and oil in petroleum hydrocarbon mixtures.

[0147] Example 2: Method for quantitatively monitoring / detecting the degree of groundwater contamination

[0148] 1. Sample preparation: In this example, dodecane is used as a petroleum hydrocarbon sample and mixed with water in different proportions to prepare a mixed sample.

[0149] Mixed samples of dodecane and water were prepared: the mixing ratios were 0.0:1, 0.2:1, 0.4:1, 0.6:1, 0.8:1 and 1.0:1, respectively. The mixed samples were placed in a transparent cuvette (the volume of petroleum hydrocarbon was 1 ml. When adjusting the mixing ratio, 0.1 ml of water was added to the cuvette each time. The test volume was changed discontinuously each time until the total volume was 2 ml). Each mixed sample was photographed using a near-infrared hyperspectral imaging device. During the shooting, filters of three bands, 1300 nm, 1350 nm and 1400 nm, were used to filter the light source to ensure the purity of the light source band, which was convenient for subsequent spectral correction. Five near-infrared spectral images were obtained for each ratio and each filtering condition, and a total of 90 sample images were obtained.

[0150] 2. Image storage: The collected images are named and saved. Each file name contains the corresponding hydrocarbon identification (i.e. the category of organic pollutants), band information and standard mixing ratio (i.e. the mixing ratio of water and organic matter) to facilitate data management and traceability.

[0151] 3. Read information: The pixel values ​​of all sample images are read through the model, and the pixel values ​​of the blank cuvette are read. In addition, the standard mixing ratios (i.e., the above-mentioned mixing ratios 0.0:1, 0.2:1, 0.4:1, 0.6:1, 0.8:1, and 1.0:1) are extracted from the file name and stored as labels.

[0152] 4. Spectral correction: Divide all sample images by the blank cuvette image pixel by pixel to eliminate the influence of illumination and obtain a corrected spectral image.

[0153] 5. Image cropping: Crop the corrected spectral image to extract the effective area (cuvette area), reduce redundant calculations, and improve processing efficiency.

[0154] 6. Contrast adjustment: Perform contrast enhancement on the cropped image to make the oil-water separation more obvious.

[0155] 7. Edge extraction and area cleaning: For contrast-enhanced images, edge detection and morphological operations are used to extract the cuvette area, remove invalid areas, obtain the extracted image, and improve the accuracy of binarization processing.

[0156] 8. Binarization: Binarize the extracted image to make the water and oil in the image appear black and white respectively. The water-oil mixing ratio is estimated by calculating the ratio of black and white pixels.

[0157] 9. Model training and testing: All estimated water-oil mixing ratio values ​​are used as the independent variable x data set, and the independent variable x data set is randomly divided into 70% training set and 30% test set. The prediction model (for example, y=x) is trained using the training set and the corresponding labels (y data set, the image corresponding to the standard mixing ratio is obtained through steps 4-8) to obtain the prediction function, and then the test set is input into the prediction function for verification. The comparison between the prediction results and the test set labels shows that the model accuracy exceeds 90%.

[0158] See also Figure 4 As shown, the prediction function (y=0.938x+0.064) of the dodecane-1300 band is predicted, and the test set is input into the test function for verification. Compared with the function y=x, the results are shown in Table 1, and the accuracy of the prediction result is 0.96.

[0159] Table 1 Comparison of prediction results of dodecane-1300 band with test set

[0160] Test Set 0.22 1.82 0.35 0.48 0.47 1.54 0.4 0.48 Prediction results 0.27 1.77 0.40 0.51 0.50 1.51 0.44 0.51 Test Set 0.64 0.99 2.52 0.35 0.94 0.24 1.29 …… Prediction results 0.66 0.99 2.42 0.40 0.95 0.29 1.28

[0161] See also Figure 5 As shown, the fitting function of the training set is used with the dodecane-1350 band, and the prediction function is y=0.76x+0.18. The test set is input into the test function for verification. The accuracy of the training data set is 0.966, and the accuracy of the prediction data set is 0.944.

[0162] See Table 2 and Figure 6 As shown, the fitting function of the dodecane-1350 band is used for prediction. Compared with the function y=x, the accuracy of the prediction result is 0.944.

[0163] Table 2 Comparison of prediction results and prediction set for dodecane-1350 band

[0164] Prediction Set 0.38 0 0.37 1.05 1.01 0.13 Prediction results 0.47 0.18 0.47 0.99 0.95 0.28 Prediction Set 0.69 1.58 0.12 0.30 1.79 …… Prediction results 0.71 1.38 0.27 0.41 1.54 ……

[0165] See also Figure 7 As shown, it is the fitting function of the dodecane-1400 band for the training set, the prediction function y=1.2x-0.05, and the test set is input into the test function for verification. The accuracy of the training data set is 0.906, and the accuracy of the prediction data set is 0.975.

[0166] See also Figure 8 As shown, the fitting function of the dodecane-1400 band is used for prediction. Compared with the function y=x, the accuracy of the prediction result is 0.97.

[0167] See also Fig. 9As shown, it is the fitting function of the dodecane-1450 band for the training set, the prediction function y=0.8x-0.16, and the test set is input into the test function for verification. The accuracy of the training data set is 0.966, and the accuracy of the prediction data set is 0.969.

[0168] See also Fig.10 As shown, the fitting function of the dodecane-1400 band is used for prediction. Compared with the function y=x, the accuracy of the prediction result is 0.97.

[0169] The above experimental results show that the method and system of the present invention can quantitatively monitor / detect the degree of groundwater pollution efficiently and accurately, with an accuracy of more than 90%, significantly improving the detection speed and accuracy. This makes the solution of the present invention have significant advantages in application scenarios that require instant feedback (such as on-site detection, online monitoring, etc.), and significantly reduces the reliance on complex pretreatment and chemical reagents. The model building process is intuitive and easy to execute, thereby effectively reducing the detection cost.

[0170] The above examples are used to illustrate the specific implementation of the present invention. However, the protection scope of the present invention is not limited to the above exemplary implementation. Any modification, equivalent substitution, improvement, etc. made by those skilled in the art within the spirit and principle of the present invention shall be included in the protection scope of the claims of the present invention.

Claims

1. A method for quantitatively monitoring the degree of groundwater contamination, the method comprising the following steps: Step (1): Near-infrared hyperspectral imaging Use near-infrared hyperspectral imaging equipment to collect images, including sample images and blank images, and send them to the prediction model; Step (2): Image processing ①Data reading Read the image file information sent in step (1), the file information only includes the water-oil ratio data and the image file label information, send the image file and its pixel values ​​to the spectrum correction unit, and store the image file label information in an array as the y data set required for the fitting function; ② Spectral correction Compare the sample image sent in step ① with the blank image, remove the background information in the image file sent in step ①, and obtain a spectral correction image; ③Effective area extraction Perform preliminary cropping on the spectral correction image to remove some invalid areas; For images with some invalid areas still on the edge, foreground extraction is performed to obtain a cuvette area image; ④Feature extraction Perform contrast adjustment, binarization and pixel count on the color dish area image; Step (3): Prediction function fitting Use the known partial water-oil ratio data as the training data set x, and the image file label information as the data set y; Perform linear fitting on the data set x and the data set y to obtain a linear function, that is, the prediction function.

2. The method according to claim 1, wherein: In step (1), the collected images are named and saved, and each file name contains the corresponding standard values ​​such as the type, content, band information, and mixture ratio of water and organic matter of the organic pollutant; and / or In step (2) ①, when the system recognizes that the file format is an image file, the pixel value of the image file is read, and label information is extracted from the image file name, the label information includes but is not limited to the type, content, band information, water and organic matter mixture ratio and other standard values ​​of organic pollutants; and / or In step (2) ②, the image of the blank container refers to an image of a blank cuvette, preferably a grayscale image of a blank cuvette; and / or In step (2) ②, the method for removing the background information in the image file sent in step b includes calculating according to the following formula: Among them, T S is the sample transmittance, I t is the transmitted light intensity when there is a sample at point (x, y) under the wavelength band λ, I t ' is the transmitted light intensity when there is no sample; and / or In step (2) (3), only the cuvette portion is retained in the cuvette area image, and the invalid portion at the edge of the image is removed; and / or In step (2) ④, the contrast adjustment makes the color contrast between oil and water significant, thereby performing binarization processing; as an example, the contrast adjustment is specifically performed according to the following formula: g(i,j)=alpha*f(i,j)+beta Where alpha is the contrast control parameter, beta is the brightness control parameter, f(i,j) is the original image pixel value distribution function, g(i,j) is the adjusted image pixel value distribution function. In the test, alpha values ​​range from 1.5 to 2 and are adjusted according to different image performances. The beta value is 10; and / or In step (2) (4), the binarization process includes using the Ostu algorithm to obtain a black and white binary image, wherein the black area corresponds to the water in the mixture, the white area corresponds to the organic pollutants in the mixture, the value corresponding to the black pixel is 0, and the value corresponding to the white pixel is 1; and / or In step (2) ④, the pixel counting includes: by counting the number of black and white pixels respectively and dividing them, the volume ratio of water and oil, that is, the water-oil ratio, can be roughly obtained.

3. The method according to claim 1 or 2, wherein: In step (2) ①, when the image file is a non-grayscale image, convert the image file into a grayscale image; and / or In step (2) (3), the foreground extraction includes but is not limited to one, two or three selected from edge extraction, expansion filling, and cuvette area extraction.

4. The method according to any one of claims 1 to 3, wherein the method further comprises using the above method to process a sample (such as a sample to be tested), and inputting the data of the sample (such as a sample to be tested) into the above linear function to obtain the water-oil ratio (such as its volume mixing ratio) of the sample (such as a sample to be tested).

5. A groundwater analysis system, wherein the system comprises a near-infrared hyperspectral imaging device and a prediction model unit, wherein the near-infrared hyperspectral imaging device is used to collect images, store images and send them to the prediction model, and the prediction model is used to determine the degree of groundwater pollution based on the current image; The prediction model unit includes an image preprocessing module and a prediction function fitting module. The image preprocessing module is used to receive image and file information sent by the near-infrared hyperspectral imaging device, preprocess the image, extract relevant information of the image and send it to the prediction function fitting module. The prediction function fitting module is used to generate a prediction function based on the image information. When the sample to be tested is input into the prediction function, the water and oil volume ratio of the sample to be tested can be obtained. Preferably, the system is used to run the method according to any one of claims 1 to 4; Preferably, the analysis system is a groundwater detection or monitoring system, in particular a groundwater pollution degree detection or monitoring system of organic pollutants.

6. A method for constructing a pollution degree prediction model, the method comprising the following steps: S1. Mix the organic pollutant sample with water in different proportions to prepare a mixed sample; S2. Use a near-infrared hyperspectral imaging device to photograph each mixed sample, obtain a sample image, and store the sample image information; S3. Read the pixel values ​​of all image information, divide all sample images by the blank image pixel by pixel to eliminate the influence of illumination, and obtain a corrected spectral image; S4. cropping the corrected spectral image to extract the effective area; S5. performing binarization processing on the extracted effective area to estimate the water-oil mixing ratio; S6. Using the water-oil ratio data as the training data set x and the file information as the data set y, linearly fitting the data set x and the data set y to obtain a linear function, ie, a prediction function; Preferably, when using a near-infrared hyperspectral imaging device to photograph each mixed sample in step S2, filters of several different wavelengths are used to filter the light source to obtain images of different light sources, for example, filters of three wavelengths of 1300nm, 1350nm and 1400nm are used to filter the light source; Preferably, the training data set includes at least 50% of the water-oil ratio data, preferably the training data set includes at least 60% of the water-oil ratio data, for example, the training data set includes 70% of the water-oil ratio data; Preferably, step S6 also includes the following steps: using the remaining water-oil ratio data as a test set, inputting the original image information corresponding to the test set into the system, predicting the corresponding water-oil ratio data through a prediction function, and comparing the water-oil ratio data with the actual water-oil ratio data in the training data set x to determine the accuracy of the prediction function.

7. A method for determining the degree of contamination, comprising treating a sample to be tested by the method according to any one of claims 1 to 4, the system according to claim 5, and / or the method according to claim 6 to obtain a water-oil ratio of the sample to be tested, thereby determining the degree of contamination; Preferably, the method is a method for determining the degree of groundwater pollution, preferably a method for quantitatively detecting or monitoring the degree of groundwater pollution.

8. Use of the method according to any one of claims 1 to 4, the system according to claim 5 and / or the method according to claim 6 for determining the degree of groundwater contamination, preferably for quantitatively detecting or monitoring the degree of groundwater contamination.

9. The method according to any one of claims 1 to 4, the system according to claim 5, the method according to claim 6, the method according to claim 7 or the use according to claim 8, wherein the organic pollutants include but are not limited to organic matter that causes groundwater pollution, such as petroleum hydrocarbons, halogenated hydrocarbons or other organic matter that is miscible or immiscible with water.

10. The use according to claim 9, wherein the petroleum hydrocarbon is selected from hydrocarbons, such as straight-chain or branched alkanes (such as straight-chain or branched C1-C 20 Alkanes, such as dodecane), cycloalkanes, aromatic hydrocarbons, and mixtures of one or more of sulfides, nitrides, cycloalkanes, etc.; The halogenated hydrocarbon can be a straight-chain or branched alkane, cycloalkane or aromatic hydrocarbon substituted by one or more halogens, wherein the halogen is selected from F, Cl, Br or I.

Citation Information

Cited By

  • Oil gas cylinder liquid discharging method and system based on machine vision

    CN120431425A

  • Oil and gas cylinder drainage method and system based on machine vision

    CN120431425B