A system and method for inverting water quality from water color based on artificial intelligence
By adopting artificial intelligence technology in the water quality counter -and system to build a water -flow CFD model and simulated pollutant diffusion, the accuracy of water quality countermeasures is solved under the condition of complex water flow, and efficient and reliable water quality monitoring is achieved.
Patent Information
- Application Number
- CN202411514942.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-29
AI Technical Summary
The existing water quality inversion technology is difficult to accurately invert water quality under complex water flow conditions, and it is difficult to accurately separate multiple pollutants when mixed, resulting in too many uncertain parameters and reducing detection efficiency.
Adopt a system based on artificial intelligence, to invest in color rendering indicators in the waters to be measured to build a water -flow CFD model, simulate pollutant diffusion, generate pollutant characteristic matrix, combined with spectral analysis and minimum secondary method, reverse water quality and speculate the pollution center Location.
Improve the accuracy and reliability of water quality, reduce the interference of external factors, can more accurately understand the trend and laws of water color, reduce errors and deviations, and ensure the quality and reliability of water -colored countermeasure monitoring.
Smart Images

Figure CN119044003B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of water quality inspection, and in particular to a system and method for water quality inversion based on water color of a water body based on artificial intelligence. Background Art
[0002] Water quality inversion refers to the process of observing and analyzing the color, transparency, turbidity and other characteristics of water bodies to infer information such as the content of pollutants in water bodies and water quality conditions. The dispersion analysis method is commonly used for water color inversion detection, that is, by irradiating light of different wavelengths, the content and proportion of water pollutants such as algae, suspended particles, dissolved substances, etc. in the water body are inferred according to the wavelength of water reflection.
[0003] Water color is affected by many factors, including water flow conditions, suspended matter, light conditions, etc. The water flow in some waters, such as tidal oceans, lakes and reservoirs, and lock rivers is complex, and pollutants are unevenly distributed at sampling points with different flow rates. The normal diffusion trajectory of water color distribution may be destroyed, causing difficulties in data processing for water color inversion of water quality and tracing the central source of water pollutants.
[0004] In addition, some water bodies contain many types of pollutants that are mixed with each other, and the optical parameter distributions of the pollutants are similar, making it impossible to accurately separate the dispersion analysis results. The more pollutants that need to be detected in the water body, the more difficult it is to separate them. When establishing an inversion model, a large number of uncertain parameters are easily generated. Eliminating the uncertain parameters requires a large number of repeated sampling, which reduces the efficiency of water body detection. Summary of the invention
[0005] The purpose of the present invention is to provide a system and method for inverting water quality from water color based on artificial intelligence to solve the problems raised in the above-mentioned background technology.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: a system for water color inversion of water quality based on artificial intelligence, comprising: a flow field establishment module, a dirt testing module, a water body sampling module, a water color analysis module and an inversion output module;
[0007] The flow field establishment module is used to put a color indicator into the water area to be tested, use a satellite or a camera to capture a diffusion image of the indicator in the water body at a fixed frame rate, identify the flow direction of the indicator in the water body through an image segmentation model, use the flow direction movement vector of each point in adjacent frames as a machine learning database, build a CFD model in the water area to be tested, classify each water flow section in the model according to the flow velocity, and select the water flow section with a stable flow velocity and a stable area length longer than the detection length as the sampling section;
[0008] The pollutant testing module is used to simulate the diffusion of each pollutant in the sampling section, simulate the pollution area centered on the pollutant placement position, and generate a binary function with the water color wavelength as the dependent variable and the distance from the pollution center and the flow direction deflection angle as the independent variables. The binary function is generated multiple times by changing the wavelength of the irradiated light, and the characteristic matrix corresponding to the pollutant is obtained by vertical arrangement;
[0009] The water body sampling module is used to select sampling points with a distance equal to the preset length in the sampling section for sampling, use a spectrum analyzer to test the water samples at each sampling point respectively, use light of different wavelengths to irradiate the water samples, test the absorption coefficient of the water body to the light and the wavelength of the reflected light, and store the test data in a database;
[0010] The water color analysis module is used to arrange the illumination wavelengths and reflection wavelengths in the database to obtain an illumination wavelength-reflection wavelength matrix, calculate the least squares solution of the wave matrix relative to each pollutant characteristic matrix using the least squares method, calculate the function difference of the least squares solution of the water color wavelength under the standard illumination light at each sampling point, and traverse the two points in the simulation area where the water color wavelength difference is equal to the function difference;
[0011] The inversion output module is used to output the pollutant concentration between two traversal points as the pollutant concentration at each sampling point according to the traversal results, and use the pollutant concentration at each point as the solution set of the binary function to infer the position coordinates of the pollution center, output the position coordinates and update the flow field.
[0012] Furthermore, the flow field establishment module includes: a color development and shooting unit, an intelligent network unit and a flow field partitioning unit;
[0013] The color development and shooting unit is used to place a color development indicator in the water area to be tested and shoot a flow image of the indicator in the water body;
[0014] The intelligent network unit is used to identify the flow direction of the indicator in the water body through an image segmentation model, and the image segmentation model is any one of a Mask R-CNN model, a DeepLab model, a U-Net model, and a Watershed segmentation model;
[0015] The flow field partitioning unit is used to construct a water flow field model, detect the flow velocity of each part of the water body in the model, and select a sampling section.
[0016] Further, the dirt testing module includes: a diffusion simulation unit and a water color feedback unit;
[0017] The diffusion simulation unit is used to perform diffusion tests on different types of pollutants using the constructed velocity field to obtain test water color data;
[0018] The water color feedback unit is used to change the wavelength of the irradiated light to perform multiple tests, and to arrange the test results vertically to obtain a characteristic matrix corresponding to the pollutant.
[0019] Further, the water body sampling module includes: a water body selection unit and a spectrum detection unit;
[0020] The water body selection unit is used to select a preset number of sampling points in the sampling section to collect water samples;
[0021] The spectrum detection unit is used to place the collected water sample into a spectrum analyzer, irradiate it with test light of different wavelengths, and obtain water sample test data.
[0022] Further, the water color analysis module includes: a dispersion arrangement unit, a ratio comparison unit and a model traversal unit;
[0023] The dispersion arrangement unit is used to generate an illumination wavelength-reflection wavelength matrix from the water color test results of the sample at different test wavelengths;
[0024] The ratio comparison unit is used to calculate the least square solution of the wave matrix relative to each pollutant characteristic matrix and to establish the solution set at each sampling point;
[0025] The model traversal unit is used to traverse the model, find each simulation point that meets the solution set, and use the concentration at the simulation point as the pollutant concentration at the sampling point.
[0026] Furthermore, the inversion output module includes: a water color inversion unit and a center tracing unit;
[0027] The water color inversion unit is used to output the water quality inversion result at the sampling point, mark it in the velocity field simulated by the computer, and update the velocity field;
[0028] The central tracing unit is used to infer the pollution center through the concentration of each pollutant at the sampling point and the pollutant diffusion test results, and output the inferred source of the pollutants.
[0029] A method for inverting water quality from water color based on artificial intelligence, comprising the following steps:
[0030] Step S1. Put a color indicator into the water area to be tested, shoot a diffusion image of the indicator in the water body at a fixed frame rate, segment and recognize the image using an image segmentation model, and the recognition results constitute a corpus. The computer learns the corpus to construct a CFD model in the water area;
[0031] Step S2. Select a flow segment with a stable flow rate in the flow field model as a sampling segment, simulate the diffusion image of various pollutants in the sampling segment, generate a binary function with the water color wavelength as the dependent variable, and the distance from the pollution center and the flow rate deflection angle as the independent variables, and change the wavelength of the irradiated light to repeat the test, arrange the test results of each pollutant vertically, and obtain the corresponding characteristic matrix of the pollutant;
[0032] Step S3. Select a preset number of sampling points in the sampling section to collect water samples, irradiate the water samples with test lights of different wavelengths, obtain the reflected light wavelengths of the water samples, and generate a corresponding irradiation wavelength-reflection wavelength matrix;
[0033] Step S4. According to the relationship between the position of the sampling point, the irradiation wavelength-reflection wavelength matrix and the characteristic matrix of each pollutant, the first matrix equation at each sampling point is listed, and the first matrix equation at each sampling point, the position equation of the same pollution source and the coefficient conservation equation of the same sampling point are combined to obtain the solution system of the pollution source proportional coefficient;
[0034] Step S5. Traverse all possible solutions in the solution system in the velocity field, output the solution closest to the constraint conditions, output the concentration of each pollutant corresponding to the solution, and mark the water quality of the sampling section in the CFD model.
[0035] Further, step S1 includes:
[0036] Step S11. Place color indicators into the waters to be tested. The color indicators must be made of harmless and recyclable materials, including: surface plastic buoys, hollow carbon balls, and suspended navigation marks;
[0037] Step S12. Using a satellite, a drone or a shore-based camera to shoot the diffusion process of the color indicator in the water body at a fixed frame rate, and identifying the flow direction of the color indicator in the water body through an image segmentation model, wherein the image segmentation model is any one of a Mask R-CNN model, a DeepLab model, a U-Net model and a Watershed segmentation model;
[0038] Step S13. Obtain the movement vectors of the same indicator in adjacent frames as a corpus for machine learning, use ANSYS Fluent or COMSOL simulation software to fit the water body dynamics, build a CFD model in the water area to be tested, and mark the water flow velocity at each point in the model.
[0039] Further, step S2 includes:
[0040] Step S21. Select a water flow section with a stable flow velocity and a length longer than a preset detection length in the flow velocity field as a sampling section, extend the sampling section in the simulation plane and set a pollution source, and simulate the diffusion of the pollution source under the flow velocity of the sampling section;
[0041] Step S22. Collect the water color wavelength of each point in the simulation plane and generate a binary function F (x, θ), where F (x, θ) represents the water color wavelength of the sampling point, x represents the distance between the sampling point and the center of the pollution source, and θ represents the angle between the vector formed by the sampling point and the center of the pollution source and the flow velocity vector;
[0042] Step S23. According to the standard irradiation light wavelength table, change the irradiation light wavelength for the simulated water sample, repeat step S22 n times, obtain n binary functions, where n is the number of irradiation lights of different wavelengths, arrange all binary functions vertically, and obtain the characteristic matrix corresponding to the pollutant.
[0043] Further, step S3 includes:
[0044] Step S31. Recover the color indicator, select m sampling points in the sampling section of the actual water area, where m is a preset value, so that each sampling point is located on the same straight line and the distance between them is equal to the preset detection length, and collect water samples at each sampling point;
[0045] Step S32. According to the standard illumination light wavelength table, use a spectrum tester to test the water color wavelength of the water sample at different illumination wavelengths. The test results are arranged horizontally according to the illumination wavelength and vertically according to the sampling position to form an illumination wavelength-reflection wavelength matrix.
[0046] Further, step S4 includes:
[0047] Step S41. List the first matrix equation according to the linear superposition effect of pollutants in the water body on the water color:
[0048] ;
[0049] in, is the coefficient solution set of the pollutant ratio, t is the number of pollutants to be detected, n is the number of irradiation lights of different wavelengths, represents the proportionality coefficient of the tth pollutant under the irradiation of the nth irradiation light wavelength, to Represent the binary functions of the first to the tth pollutants, respectively, where and They represent the distance between the sampling point and the center of the t-th pollutant and the angle between the vector formed by the sampling point and the center of the t-th pollutant and the flow velocity vector, respectively. G1 to Gn represent the reflection wavelengths of the water samples collected at the sampling point under the 1st to nth irradiation wavelengths, respectively.
[0050] Step S42. Substitute the data obtained from each sampling point into the first matrix equation to obtain k matrix equations, where k is the number of sampling points selected. Combine the k matrix equations, the position equation of the same pollution source and the coefficient conservation equation of the same sampling point to obtain the solution system R of the pollution source proportional coefficient;
[0051] The position equation of the same pollution source is:
[0052] ;
[0053] Where L is the distance between sampling points, i is the sampling point number, i∈{1, 2, …, m-1}, Xi represents the distance from the i-th sampling point to the pollutant center, Represents the angle between the vector formed by the i-th sampling point and the pollutant center and the flow velocity vector;
[0054] The coefficient conservation equation for the same sampling point is: r(b,1)=r(b,2)=…=r(b,n), where b is a constant, b∈{1, 2,…, n}.
[0055] Further, step S5 includes:
[0056] Step S51. Traverse all coefficient solution sets in the solution system R and select the coefficient solution set closest to the constraint conditions, wherein the constraint conditions include: coexistence between pollutants, known nonlinear water color reactions, and the probability of occurrence of each pollutant;
[0057] Step S52. Output the coefficient solution set that is closest to the constraint condition, output the first row in the coefficient solution set as the proportional coefficient of the appearance of the 1st to tth pollutants in the water body, multiply the proportional coefficient by the wavelength of the reflected light at the sampling point to obtain the reflected wavelength component of each pollutant, substitute it into the binary function of the pollutant to obtain the point corresponding to the reflected wavelength component, find the point in the simulation space, and output the pollutant concentration corresponding to the point;
[0058] Step S53: Mark the water quality of the sampling section in the CFD model and update the flow velocity field.
[0059] Compared with the prior art, the beneficial effects achieved by the present invention are:
[0060] 1. The present invention puts a color indicator into the water area to be tested, analyzes the diffusion process through an artificial intelligence model, establishes a water flow CFD model, and selects a water flow with a relatively stable flow rate in the flow field as the detection section, which is conducive to obtaining stable water sample data, reducing the interference of external factors on water quality detection results, and improving the accuracy and reliability of inversion data.
[0061] 2. The present invention can simulate and test the diffusion conditions under the flow field, simulate the diffusion area of water pollutants, generate a binary function of the water reflection wavelength and the sampling position coordinates, and obtain the characteristic matrix corresponding to the pollutants. It can more accurately understand the changing trends and laws of water color for different pollutants and provide a basis for water color inversion.
[0062] 3. The present invention can select two points at a fixed distance for sampling and testing, respectively obtain the illumination wavelength-reflection wavelength matrix at the two points, calculate the proportional coefficient of water pollution at the two points by the least squares method, traverse the polluted area, match the two points whose difference in proportional coefficient is equal to the measured data, and output them as the inversion result, so as to more accurately understand the changing trends and laws of water quality, which is conducive to reducing errors and deviations and ensuring the quality and reliability of water color inversion monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0064] Figure 1 It is a structural schematic diagram of a system for inverting water quality from water color based on artificial intelligence of the present invention;
[0065] Figure 2 It is a schematic diagram of the steps of a method for inverting water quality from water color based on artificial intelligence of the present invention. DETAILED DESCRIPTION
[0066] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0067] See also Figure 1 , the present invention provides a technical solution: a system for inverting water quality from water color based on artificial intelligence, comprising: a flow field establishment module, a dirt testing module, a water sampling module, a water color analysis module and an inversion output module;
[0068] The flow field establishment module is used to put a color indicator into the water area to be tested, use a satellite or a camera to capture a diffusion image of the indicator in the water body at a fixed frame rate, identify the flow direction of the indicator in the water body through an image segmentation model, use the flow direction movement vector of each point in adjacent frames as a machine learning database, build a CFD model in the water area to be tested, classify each water flow section in the model according to the flow velocity, and select the water flow section with a stable flow velocity and a stable area length longer than the detection length as the sampling section;
[0069] The flow field establishment module includes: a color development and shooting unit, an intelligent network unit and a flow field partitioning unit;
[0070] The color development and shooting unit is used to place a color development indicator in the water area to be tested and shoot a flow image of the indicator in the water body;
[0071] The intelligent network unit is used to identify the flow direction of the indicator in the water body through an image segmentation model, and the image segmentation model is any one of a Mask R-CNN model, a DeepLab model, a U-Net model, and a Watershed segmentation model;
[0072] The flow field partitioning unit is used to construct a water flow field model, detect the flow velocity of each part of the water body in the model, and select a sampling section.
[0073] The pollutant testing module is used to simulate the diffusion of each pollutant in the sampling section, simulate the pollution area centered on the pollutant placement position, and generate a binary function with the water color wavelength as the dependent variable and the distance from the pollution center and the flow direction deflection angle as the independent variables. The binary function is generated multiple times by changing the wavelength of the irradiated light, and the characteristic matrix corresponding to the pollutant is obtained by vertical arrangement;
[0074] The dirt testing module includes: a diffusion simulation unit and a water color feedback unit;
[0075] The diffusion simulation unit is used to perform diffusion tests on different types of pollutants using the constructed velocity field to obtain test water color data;
[0076] The water color feedback unit is used to change the wavelength of the irradiated light to perform multiple tests, and to arrange the test results vertically to obtain a characteristic matrix corresponding to the pollutant.
[0077] The water body sampling module is used to select sampling points with a distance equal to the preset length in the sampling section for sampling, use a spectrum analyzer to test the water samples at each sampling point respectively, use light of different wavelengths to irradiate the water samples, test the absorption coefficient of the water body to the light and the wavelength of the reflected light, and store the test data in a database;
[0078] The water body sampling module includes: a water body selection unit and a spectrum detection unit;
[0079] The water body selection unit is used to select a preset number of sampling points in the sampling section to collect water samples;
[0080] The spectrum detection unit is used to place the collected water sample into a spectrum analyzer, irradiate it with test light of different wavelengths, and obtain water sample test data.
[0081] The water color analysis module is used to arrange the illumination wavelengths and reflection wavelengths in the database to obtain an illumination wavelength-reflection wavelength matrix, calculate the least squares solution of the wave matrix relative to each pollutant characteristic matrix using the least squares method, calculate the function difference of the least squares solution of the water color wavelength under the standard illumination light at each sampling point, and traverse the two points in the simulation area where the water color wavelength difference is equal to the function difference;
[0082] The water color analysis module includes: a dispersion arrangement unit, a ratio comparison unit and a model traversal unit;
[0083] The dispersion arrangement unit is used to generate an illumination wavelength-reflection wavelength matrix from the water color test results of the sample at different test wavelengths;
[0084] The ratio comparison unit is used to calculate the least square solution of the wave matrix relative to each pollutant characteristic matrix and to establish the solution set at each sampling point;
[0085] The model traversal unit is used to traverse the model, find each simulation point that meets the solution set, and use the concentration at the simulation point as the pollutant concentration at the sampling point.
[0086] The inversion output module is used to output the pollutant concentration between two traversal points as the pollutant concentration at each sampling point according to the traversal results, and use the pollutant concentration at each point as the solution set of the binary function to infer the position coordinates of the pollution center, output the position coordinates and update the flow field.
[0087] The inversion output module includes: a water color inversion unit and a center tracing unit;
[0088] The water color inversion unit is used to output the water quality inversion result at the sampling point, mark it in the velocity field simulated by the computer, and update the velocity field;
[0089] The central tracing unit is used to infer the pollution center through the concentration of each pollutant at the sampling point and the pollutant diffusion test results, and output the inferred source of the pollutants.
[0090] like Figure 2 As shown, a method for inverting water quality from water color based on artificial intelligence includes the following steps:
[0091] Step S1. Put a color indicator into the water area to be tested, shoot a diffusion image of the indicator in the water body at a fixed frame rate, segment and recognize the image using an image segmentation model, and the recognition results constitute a corpus. The computer learns the corpus to construct a CFD model in the water area;
[0092] Step S1 includes:
[0093] Step S11. Place color indicators into the waters to be tested. The color indicators must be made of harmless and recyclable materials, including: surface plastic buoys, hollow carbon balls, and suspended navigation marks;
[0094] Step S12. Using a satellite, a drone or a shore-based camera to shoot the diffusion process of the color indicator in the water body at a fixed frame rate, and identifying the flow direction of the color indicator in the water body through an image segmentation model, wherein the image segmentation model is any one of a Mask R-CNN model, a DeepLab model, a U-Net model and a Watershed segmentation model;
[0095] Step S13. Obtain the movement vectors of the same indicator in adjacent frames as a corpus for machine learning, use ANSYS Fluent or COMSOL simulation software to fit the water body dynamics, build a CFD model in the water area to be tested, and mark the water flow velocity at each point in the model.
[0096] Step S2. Select a flow segment with a stable flow rate in the flow field model as a sampling segment, simulate the diffusion image of various pollutants in the sampling segment, generate a binary function with the water color wavelength as the dependent variable, and the distance from the pollution center and the flow rate deflection angle as the independent variables, and change the wavelength of the irradiated light to repeat the test, arrange the test results of each pollutant vertically, and obtain the corresponding characteristic matrix of the pollutant;
[0097] Step S2 includes:
[0098] Step S21. Select a water flow section with a stable flow velocity and a length longer than a preset detection length in the flow velocity field as a sampling section, extend the sampling section in the simulation plane and set a pollution source, and simulate the diffusion of the pollution source under the flow velocity of the sampling section;
[0099] Step S22. Collect the water color wavelength of each point in the simulation plane and generate a binary function F (x, θ), where F (x, θ) represents the water color wavelength of the sampling point, x represents the distance between the sampling point and the center of the pollution source, and θ represents the angle between the vector formed by the sampling point and the center of the pollution source and the flow velocity vector;
[0100] Step S23. According to the standard irradiation light wavelength table, change the irradiation light wavelength for the simulated water sample, repeat step S22 n times, obtain n binary functions, where n is the number of irradiation lights of different wavelengths, arrange all binary functions vertically, and obtain the characteristic matrix corresponding to the pollutant.
[0101] Step S3. Select a preset number of sampling points in the sampling section to collect water samples, irradiate the water samples with test lights of different wavelengths, obtain the reflected light wavelengths of the water samples, and generate a corresponding irradiation wavelength-reflection wavelength matrix;
[0102] Step S3 includes:
[0103] Step S31. Recover the color indicator, select m sampling points in the sampling section of the actual water area, where m is a preset value, so that each sampling point is located on the same straight line and the distance between them is equal to the preset detection length, and collect water samples at each sampling point;
[0104] Step S32. According to the standard illumination light wavelength table, use a spectrum tester to test the water color wavelength of the water sample at different illumination wavelengths. The test results are arranged horizontally according to the illumination wavelength and vertically according to the sampling position to form an illumination wavelength-reflection wavelength matrix.
[0105] Step S4. According to the relationship between the position of the sampling point, the irradiation wavelength-reflection wavelength matrix and the characteristic matrix of each pollutant, the first matrix equation at each sampling point is listed, and the first matrix equation at each sampling point, the position equation of the same pollution source and the coefficient conservation equation of the same sampling point are combined to obtain the solution system of the pollution source proportional coefficient;
[0106] Step S4 includes:
[0107] Step S41. List the first matrix equation according to the linear superposition effect of pollutants in the water body on the water color:
[0108] ;
[0109] in, is the coefficient solution set of the pollutant ratio, t is the number of pollutants to be detected, n is the number of irradiation lights of different wavelengths, represents the proportionality coefficient of the tth pollutant under the irradiation of the nth irradiation light wavelength, to Represent the binary functions of the first to the tth pollutants, respectively, where and They represent the distance between the sampling point and the center of the t-th pollutant and the angle between the vector formed by the sampling point and the center of the t-th pollutant and the flow velocity vector, respectively. G1 to Gn represent the reflection wavelengths of the water samples collected at the sampling point under the 1st to nth irradiation wavelengths, respectively.
[0110] Step S42. Substitute the data obtained from each sampling point into the first matrix equation to obtain k matrix equations, where k is the number of sampling points selected. Combine the k matrix equations, the position equation of the same pollution source and the coefficient conservation equation of the same sampling point to obtain the solution system R of the pollution source proportional coefficient;
[0111] The position equation of the same pollution source is:
[0112] ;
[0113] Where L is the distance between sampling points, i is the sampling point number, i∈{1, 2, …, m-1}, Xi represents the distance from the i-th sampling point to the pollutant center, Represents the angle between the vector formed by the i-th sampling point and the pollutant center and the flow velocity vector;
[0114] The coefficient conservation equation for the same sampling point is: r(b,1)=r(b,2)=…=r(b,n), where b is a constant, b∈{1, 2,…, n}.
[0115] Step S5. Traverse all possible solutions in the solution system in the velocity field, output the solution closest to the constraint conditions, output the concentration of each pollutant corresponding to the solution, and mark the water quality of the sampling section in the CFD model.
[0116] Step S5 includes:
[0117] Step S51. Traverse all coefficient solution sets in the solution system R and select the coefficient solution set closest to the constraint conditions, wherein the constraint conditions include: coexistence between pollutants, known nonlinear water color reactions, and the probability of occurrence of each pollutant;
[0118] Step S52. Output the coefficient solution set that is closest to the constraint condition, output the first row in the coefficient solution set as the proportional coefficient of the appearance of the 1st to tth pollutants in the water body, multiply the proportional coefficient by the wavelength of the reflected light at the sampling point to obtain the reflected wavelength component of each pollutant, substitute it into the binary function of the pollutant to obtain the point corresponding to the reflected wavelength component, find the point in the simulation space, and output the pollutant concentration corresponding to the point;
[0119] Step S53: Mark the water quality of the sampling section in the CFD model and update the flow velocity field.
[0120] Example: There are three pollutants in a water flow section with a flow rate of 0.1m / s. The simulation results of the three pollutants under an irradiation wavelength of 10nm are F1=10-0.1x·sinθ, F2=20-0.5x·sinθ, and F3=5-0.01x·sinθ. Three sampling points on the same straight line are found in the flow section with a distance of 10m between them. The reflection wavelengths under the irradiation wavelength of 10nm are 20nm, 15nm, and 5nm. If the pollution source is the same point, the proportional coefficients of the three pollutants are 0.06, 0.24, and 0.70, respectively.
[0121] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0122] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for inverting water quality from water color based on artificial intelligence, characterized in that: The method comprises the following steps: Step S1. Put a color indicator into the water area to be tested, shoot a diffusion image of the indicator in the water body at a fixed frame rate, use an image segmentation model to segment and recognize the image, the recognition results constitute a corpus, and the computer learns the corpus to build a CFD model in the water area; Step S2. Select a flow segment with a stable flow rate in the flow field model as a sampling segment, simulate the diffusion image of various pollutants in the sampling segment, generate a binary function with the water color wavelength as the dependent variable, and the distance from the pollution center and the flow rate deflection angle as the independent variables, and change the wavelength of the irradiated light to repeat the test, arrange the test results of each pollutant vertically, and obtain the corresponding characteristic matrix of the pollutant; Step S3. Select a preset number of sampling points in the sampling section to collect water samples, irradiate the water samples with test lights of different wavelengths, obtain the reflected light wavelengths of the water samples, and generate a corresponding irradiation wavelength-reflection wavelength matrix; Step S4. According to the relationship between the position of the sampling point, the irradiation wavelength-reflection wavelength matrix and the characteristic matrix of each pollutant, the matrix equation at each sampling point is listed, and the matrix equation at each sampling point, the position equation of the same pollution source and the coefficient conservation equation of the same sampling point are combined to obtain the solution system of the pollution source proportional coefficient; Step S5. Traverse all possible solutions in the solution system in the velocity field, output the solution closest to the constraint conditions, output the concentration of each pollutant corresponding to the solution, and mark the water quality of the sampling section in the CFD model.
2. The method for inverting water quality from water color based on artificial intelligence according to claim 1, characterized in that: Step S1 includes: Step S11. Place color indicators into the waters to be tested. The color indicators must be made of harmless and recyclable materials, including: surface plastic buoys, hollow carbon balls, and suspended navigation marks; Step S12. Using a satellite, a drone or a shore-based camera to shoot the diffusion process of the color indicator in the water body at a fixed frame rate, and identifying the flow direction of the color indicator in the water body through an image segmentation model, wherein the image segmentation model is any one of a Mask R-CNN model, a DeepLab model, a U-Net model and a Watershed segmentation model; Step S13. Obtain the movement vectors of the same indicator in adjacent frames as a corpus for machine learning, use ANSYS Fluent or COMSOL simulation software to fit the water body dynamics, build a CFD model in the water area to be tested, and mark the water flow velocity at each point in the model.
3. The method for inverting water quality from water color based on artificial intelligence according to claim 2 is characterized by: Step S2 includes: Step S21. Select a water flow section with a stable flow velocity and a length longer than a preset detection length in the flow velocity field as a sampling section, extend the sampling section in the simulation plane and set a pollution source, and simulate the diffusion of the pollution source under the flow velocity of the sampling section; Step S22. Collect the water color wavelength of each point in the simulation plane and generate a binary function F (x, θ), where F (x, θ) represents the water color wavelength of the sampling point, x represents the distance between the sampling point and the center of the pollution source, and θ represents the angle between the vector formed by the sampling point and the center of the pollution source and the flow velocity vector; Step S23. According to the standard irradiation light wavelength table, change the irradiation light wavelength of the simulated water sample, repeat step S22 n times, obtain n binary functions, where n is the number of irradiation lights of different wavelengths, arrange all binary functions vertically, and obtain the characteristic matrix corresponding to the pollutant; Step S3 includes: Step S31. Recover the color indicator, select m sampling points in the sampling section of the actual water area, where m is a preset value, so that each sampling point is located on the same straight line and the distance between them is equal to the preset detection length, and collect water samples at each sampling point; Step S32. According to the standard illumination light wavelength table, use a spectrum tester to test the water color wavelength of the water sample at different illumination wavelengths. The test results are arranged horizontally according to the illumination wavelength and vertically according to the sampling position to form an illumination wavelength-reflection wavelength matrix.
4. The method for inverting water quality from water color based on artificial intelligence according to claim 3 is characterized by: Step S4 includes: Step S41. List the first matrix equation according to the linear superposition effect of pollutants in the water body on the water color: in, is the coefficient solution set of the pollutant ratio, t is the number of pollutants to be detected, n is the number of irradiation lights of different wavelengths, represents the proportionality coefficient of the tth pollutant under the irradiation of the nth irradiation light wavelength, to Represent the binary functions of the first to the tth pollutants, respectively, where and They represent the distance between the sampling point and the center of the t-th pollutant and the angle between the vector formed by the sampling point and the center of the t-th pollutant and the flow velocity vector, respectively. G1 to Gn represent the reflection wavelengths of the water samples collected at the sampling point under the 1st to nth irradiation wavelengths, respectively. Step S42. Substitute the data obtained from each sampling point into the first matrix equation to obtain k matrix equations, where k is the number of sampling points selected. Combine the k matrix equations, the position equation of the same pollution source and the coefficient conservation equation of the same sampling point to obtain the solution system R of the pollution source proportional coefficient; The position equation of the same pollution source is: Where L is the distance between sampling points, i is the sampling point number, i∈{1, 2,…, m-1}, represents the distance between the ith sampling point and the pollutant center, Represents the angle between the vector formed by the i-th sampling point and the pollutant center and the flow velocity vector; The coefficient conservation equation for the same sampling point is: r(b,1)=r(b,2)=…=r(b,n), where b is a constant, b∈{1, 2,…, n}.
5. The method for inverting water quality from water color based on artificial intelligence according to claim 4 is characterized by: Step S5 includes: Step S51. Traverse all coefficient solution sets in the solution system R and select the coefficient solution set closest to the constraint conditions, wherein the constraint conditions include: coexistence between pollutants, known nonlinear water color reactions, and the probability of occurrence of each pollutant; Step S52. Output the coefficient solution set that is closest to the constraint condition, output the first row in the coefficient solution set as the proportional coefficient of the appearance of the 1st to tth pollutants in the water body, multiply the proportional coefficient by the wavelength of the reflected light at the sampling point to obtain the reflected wavelength component of each pollutant, substitute it into the binary function of the pollutant to obtain the point corresponding to the reflected wavelength component, find the point in the simulation space, and output the pollutant concentration corresponding to the point; Step S53: Mark the water quality of the sampling section in the CFD model and update the flow velocity field.
6. A system for inverting water quality from water color based on artificial intelligence, characterized in that: The system includes the following modules: a flow field establishment module, a dirt testing module, a water body sampling module, a water color analysis module and an inversion output module; The flow field establishment module is used to put a color indicator into the water area to be tested, use a satellite or a camera to capture a diffusion image of the indicator in the water body at a fixed frame rate, identify the flow direction of the indicator in the water body through an image segmentation model, use the flow direction movement vector of each point in adjacent frames as a machine learning database, build a CFD model in the water area to be tested, classify each water flow section in the model according to the flow velocity, and select the water flow section with a stable flow velocity and a stable area length longer than the detection length as the sampling section; The pollutant testing module is used to simulate the diffusion of each pollutant in the sampling section, simulate the pollution area centered on the pollutant placement position, and generate a binary function with the water color wavelength as the dependent variable and the distance from the pollution center and the flow direction deflection angle as the independent variables. The binary function is generated multiple times by changing the wavelength of the irradiated light, and the characteristic matrix corresponding to the pollutant is obtained by vertical arrangement; The water body sampling module is used to select sampling points with a distance equal to the preset length in the sampling section for sampling, use a spectrum analyzer to test the water samples at each sampling point respectively, use light of different wavelengths to irradiate the water samples, test the absorption coefficient of the water body to the light and the wavelength of the reflected light, and store the test data in a database; The water color analysis module is used to arrange the illumination wavelengths and reflection wavelengths in the database to obtain an illumination wavelength-reflection wavelength matrix, calculate the least squares solution of the wave matrix relative to each pollutant characteristic matrix using the least squares method, calculate the function difference of the least squares solution of the water color wavelength under the standard illumination light at each sampling point, and traverse the two points in the simulation area where the water color wavelength difference is equal to the function difference; The inversion output module is used to output the pollutant concentration between two traversal points as the pollutant concentration at each sampling point according to the traversal results, and use the pollutant concentration at each point as the solution set of the binary function to infer the position coordinates of the pollution center, output the position coordinates and update the flow field.
7. The system for inverting water quality from water color based on artificial intelligence according to claim 6 is characterized by: The flow field establishment module includes: a color development and shooting unit, an intelligent network unit and a flow field partitioning unit; The color development and shooting unit is used to place a color development indicator in the water area to be tested and shoot a flow image of the indicator in the water body; The intelligent network unit is used to identify the flow direction of the indicator in the water body through an image segmentation model, and the image segmentation model is any one of a Mask R-CNN model, a DeepLab model, a U-Net model, and a Watershed segmentation model; The flow field partitioning unit is used to construct a water flow field model, detect the flow velocity of each part of the water body in the model, and select a sampling section.
8. The system for inverting water quality from water color based on artificial intelligence according to claim 7 is characterized by: The dirt testing module includes: a diffusion simulation unit and a water color feedback unit; The diffusion simulation unit is used to perform diffusion tests on different types of pollutants using the constructed velocity field to obtain test water color data; The water color feedback unit is used to change the wavelength of the irradiated light for multiple tests, and to arrange the test results vertically to obtain a characteristic matrix corresponding to the pollutant; The water body sampling module includes: a water body selection unit and a spectrum detection unit; The water body selection unit is used to select a preset number of sampling points in the sampling section to collect water samples; The spectrum detection unit is used to place the collected water sample into a spectrum analyzer, irradiate it with test light of different wavelengths, and obtain water sample test data.
9. The system for inverting water quality from water color based on artificial intelligence according to claim 8, characterized in that: The water color analysis module includes: a dispersion arrangement unit, a ratio comparison unit and a model traversal unit; The dispersion arrangement unit is used to generate an illumination wavelength-reflection wavelength matrix from the water color test results of the sample at different test wavelengths; The ratio comparison unit is used to calculate the least square solution of the wave matrix relative to each pollutant characteristic matrix and to establish the solution set at each sampling point; The model traversal unit is used to traverse the model, find each simulation point that meets the solution set, and use the concentration at the simulation point as the pollutant concentration at the sampling point.
10. The system for inverting water quality from water color based on artificial intelligence according to claim 9, characterized in that: The inversion output module includes: a water color inversion unit and a center tracing unit; The water color inversion unit is used to output the water quality inversion result at the sampling point, mark it in the velocity field simulated by the computer, and update the velocity field; The central tracing unit is used to infer the pollution center through the concentration of each pollutant at the sampling point and the pollutant diffusion test results, and output the inferred source of the pollutants.
Citation Information
Patent Citations
Water quality detection method based on spectrum inversion analysis
CN114739919A