Turbidity compensation method, device, equipment and storage medium
By constructing a turbidity compensation model based on water body type, the initial spectral data of water body is compensated, and the problem of suspended particles affecting the accuracy of water quality detection is solved, and more accurate water quality detection results are achieved.
Patent Information
- Application Number
- CN202210692198.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-17
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2042-06-17
AI Technical Summary
The light scattering and absorption characteristics of suspended particles in water affect the accuracy of water quality detection results.
By collecting the initial spectral data of the water body to be tested, determining the type of water body, and building a turbidity compensation model based on this type, turbidity compensation is performed on the initial spectral data to offset the impact of suspended particles on the spectral data.
It improves the accuracy of water quality detection results and reduces the error of suspended particles in measuring water quality parameters.
Smart Images

Figure CN115266603B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water quality detection, and in particular to a turbidity compensation method, device, equipment and storage medium. Background Art
[0002] The physical properties and chemical composition of water are the comprehensive characteristics of water under the influence of the environment. Water in nature is a complex complex composed of various soluble and / or insoluble substances. Water for different purposes has different requirements for water quality. For example, domestic water, industrial water, and farmland irrigation water have different requirements for water quality. Because the water contains tiny suspended and colloidal particles, the originally colorless and transparent water becomes turbid. The degree of turbidity is called turbidity. Turbidity is an optical effect, which is the degree of obstruction when light passes through the water layer, indicating the scattering and absorption capacity of the water body to light. The turbidity of the water body is not only related to the content of suspended particles, but also to its composition, particle size, shape and its surface reflectivity to light. Turbidity will affect the absorption of light by the water body, and then affect the measurement of water quality parameters, and ultimately affect the water quality test results. Summary of the invention
[0003] The present invention provides a turbidity compensation method, device, equipment and storage medium, which are used to solve the influence of light scattering and absorption characteristics of suspended particles in water on water quality detection results and improve the accuracy of water quality detection results.
[0004] The present invention provides a turbidity compensation method, comprising:
[0005] Collecting initial spectral data of a water body to be tested, and determining the water body type of the water body to be tested according to the initial spectral data;
[0006] Constructing a turbidity compensation model corresponding to the water body to be tested based on the water body type;
[0007] The turbidity compensation model is used to perform turbidity compensation on the initial spectral data of the water body to be tested.
[0008] According to a turbidity compensation method provided by the present invention, the step of constructing a turbidity compensation model corresponding to the water body to be tested based on the water body type includes:
[0009] Acquire training spectral data corresponding to the water body to be tested according to the water body type, and perform turbidity compensation on the training spectral data to generate compensated spectral data;
[0010] A preset basic model to be trained is obtained, and the basic model to be trained is iteratively trained using the training spectrum data and the compensation spectrum data to obtain a turbidity compensation model corresponding to the water body to be tested.
[0011] According to a turbidity compensation method provided by the present invention, the step of obtaining training spectral data corresponding to the water body to be tested according to the water body type, and performing turbidity compensation on the training spectral data to generate compensated spectral data includes:
[0012] Collect spectral data of different turbidity of water samples of various water types to generate a spectral data set;
[0013] According to the water body type of the water body to be tested, acquiring spectral data corresponding to the water body to be tested from the spectral data set to obtain training spectral data corresponding to the water body to be tested;
[0014] The training spectral data is subjected to turbidity compensation using a preset turbidity compensation algorithm to obtain compensated spectral data corresponding to the water body to be tested.
[0015] According to a turbidity compensation method provided by the present invention, the basic model to be trained is a deep learning model.
[0016] According to a turbidity compensation method provided by the present invention, the step of determining the water type of the water body to be tested according to the initial spectral data comprises:
[0017] Normalizing the initial spectral data to obtain target spectral data;
[0018] The target spectral data are fitted into a spectral curve, and the water body type of the water body to be tested is determined according to the shape of the spectral curve.
[0019] According to a turbidity compensation method provided by the present invention, the step of using the turbidity compensation model to perform turbidity compensation on the initial spectral data includes:
[0020] Using the turbidity compensation model to perform scattered particle size analysis on the initial spectral data, and reconstruct the particle size distribution of suspended particles in the water body to be tested;
[0021] Based on the particle size distribution, estimating the absorbance value caused by the suspended particles in the ultraviolet to visible light band;
[0022] The absorbance value is subtracted from the initial spectral data to perform turbidity compensation on the initial spectral data of the water body to be tested.
[0023] According to a turbidity compensation method provided by the present invention, after the step of using the turbidity compensation model to perform turbidity compensation on the initial spectral data of the water body to be tested, the method further includes:
[0024] Fitting the spectral data of the water body to be tested after turbidity compensation into a spectral curve;
[0025] The water quality parameters of the water body to be tested are determined according to the spectral curve, and the water quality of the water body to be tested is determined according to the water quality parameters.
[0026] The present invention also provides a turbidity compensation device, comprising:
[0027] A spectrum acquisition module, used for acquiring initial spectrum data of the water body to be tested, and determining the water body type of the water body to be tested according to the initial spectrum data;
[0028] A model building module, used for building a turbidity compensation model corresponding to the water body to be tested based on the water body type;
[0029] The turbidity compensation module is used to perform turbidity compensation on the initial spectral data of the water body to be tested by using the turbidity compensation model.
[0030] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the turbidity compensation methods described above is implemented.
[0031] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the turbidity compensation method as described above is implemented.
[0032] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the turbidity compensation method as described above is implemented.
[0033] The turbidity compensation method, device, equipment and storage medium provided by the present invention can realize turbidity compensation for different types of water bodies by constructing a turbidity compensation model based on the water type of the water body to be tested. The turbidity compensation can offset the influence of suspended particulate matter in the water body to be tested on spectral data, improve the measurement accuracy of water quality parameters, and thus improve the accuracy of water quality detection results of the water body to be tested. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0035] Figure 1 This is one of the flow charts of the turbidity compensation method provided by the present invention;
[0036] Figure 2It is a structural schematic diagram of the turbidity compensation device provided by the present invention;
[0037] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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.
[0039] Reference Figure 1 , Figure 1 One of the flow diagrams of the turbidity compensation method provided by the present invention is based on Figure 1 The turbidity compensation method provided by the present invention comprises the following steps:
[0040] Step 100, collecting initial spectral data of a water body to be tested, and determining the water body type of the water body to be tested according to the initial spectral data;
[0041] When performing turbidity compensation, the initial spectral data of the water body to be tested is first collected. The initial spectral data can be collected based on a water sample extracted from the water body to be tested, or it can be directly collected based on the water body to be tested. The water body type of the water body to be tested is determined based on the collected initial spectral data. It is known that water bodies with different uses, such as domestic water, industrial water, and farmland irrigation water, have different standards for the physical properties of water, total mineralization, total hardness, bacteria and harmful substance content, etc. The turbidity of the water body is also different, resulting in different scattering and absorption capabilities of the water body for light. Therefore, the water body type can be classified according to different standards such as the purpose of the water body and the turbidity of the water body, which are not limited here. It can be understood that water bodies with different water body types have different spectral forms corresponding to their spectral data, that is, the spectral data have different characteristics. The water body type of the water body to be tested is determined based on the characteristics of the collected spectral data.
[0042] Furthermore, step 100 may also include:
[0043] Step 101, normalizing the initial spectrum data to obtain target spectrum data;
[0044] Step 102: Fit the target spectral data into a spectral curve, and determine the water type of the water body to be tested according to the shape of the spectral curve.
[0045] When determining the water type of the water body to be tested, the collected spectral data is first normalized, and the target spectral data obtained after the normalization is fitted, and the target spectral data is fitted into a spectral curve, and the water type of the water body to be tested is determined according to the shape of the spectral curve. The reason is that the spectral morphology corresponding to the spectral data of different types of water bodies is different. Therefore, the spectral curve obtained by fitting the spectral data has different characteristics, and the characteristics of the spectral curve are reflected in the shape of the curve. Therefore, the characteristics of the spectral curve are different, that is, the shape of the spectral curve is different, and the water body can be classified according to the shape of the spectral curve. According to the shape of the spectral curve, the spectral data of the same type of water body can basically overlap after normalization.
[0046] Step 200, constructing a turbidity compensation model corresponding to the water body to be tested based on the water body type;
[0047] After determining the water body type of the water body to be tested, the water body to be tested is modeled based on the water body type, and a turbidity compensation model corresponding to the water body to be tested is constructed. It should be noted that the turbidity compensation model corresponding to water bodies of different water body types can be the same, or each type of water body can correspond to a turbidity compensation model. That is, a multi-classification turbidity compensation model can be constructed, and the turbidity of different types of water bodies can be compensated by the multi-classification turbidity compensation model, or different types of water bodies can be compensated for turbidity by different turbidity compensation models. The constructed turbidity compensation model includes one or more of the Mie model based on Mie scattering theory, the model based on filtering, statistical principles, and the multivariate regression model, which are also not limited here.
[0048] Step 300: Use the turbidity compensation model to perform turbidity compensation on the initial spectral data of the water body to be tested.
[0049] The constructed turbidity compensation model is used to perform turbidity compensation on the initial spectral data of the water body to be tested, thereby eliminating the influence of the turbidity of the water body to be tested on the measured water quality parameters.
[0050] Specifically, step 300 may include:
[0051] Step 301, using the turbidity compensation model to perform scattered particle size analysis on the initial spectral data, and reconstruct the particle size distribution of suspended particles in the water body to be tested;
[0052] Step 302, estimating the absorbance value caused by the suspended particles in the range of ultraviolet to visible light based on the particle size distribution;
[0053] Step 303: subtract the absorbance value from the initial spectral data to perform turbidity compensation on the initial spectral data of the water body to be tested.
[0054] When turbidity compensation is performed on the initial spectral data of the water body to be tested, the pre-trained turbidity compensation model is used to perform particle size analysis of the scattered particles on the initial spectral data to reconstruct the particle size distribution of the suspended particles in the water body to be tested. Based on the particle size distribution, the content of the suspended particles in the water body to be tested, the particle size, shape and the light reflection performance of the surface, and other information related to the performance of the suspended particles in scattering and absorbing light can be determined. Therefore, based on the particle size distribution, the absorbance value caused by the suspended particles in the water body to be tested in the range of ultraviolet to visible light can be estimated using the pre-trained turbidity compensation model. On the basis of the initial spectral data, the absorbance value caused by the suspended particles can be subtracted to achieve turbidity compensation for the initial spectral data, and the spectral data after turbidity compensation can be obtained.
[0055] In a preferred embodiment, when the turbidity compensation model is used to perform particle size analysis on the initial spectral data of the water body to be tested, the spectrum of the 450-1000nm band in the spectral data is selected to perform particle size analysis on suspended particles, and the particle size distribution of suspended particles in the water body to be tested is reconstructed. Based on the reconstructed particle size distribution, the absorbance value of the suspended particles in the water body to be tested in the ultraviolet to visible light band range of 200-450nm is estimated, and the absorbance value of the corresponding band is subtracted from the initial spectral data to obtain the spectral data of the water body to be tested after turbidity compensation. The above-mentioned band range is only used for exemplary description and does not constitute a limitation on the turbidity compensation method provided in the embodiment of the present invention. In actual application, the above-mentioned band range can be appropriately adjusted according to the actual turbidity compensation needs to achieve a better compensation effect.
[0056] Furthermore, after step 300, the following steps may also be included:
[0057] Step 310, fitting the spectral data of the water body to be tested after turbidity compensation into a spectral curve;
[0058] Step 320: determine the water quality parameters of the water body to be tested according to the spectral curve, and determine the water quality of the water body to be tested according to the water quality parameters.
[0059] After turbidity compensation is performed on the initial spectral data of the water body to be tested, the turbidity-compensated spectral data is fitted into a spectral curve, and the water quality parameters of the water body to be tested are determined based on the spectral curve, thereby reducing the influence of turbidity of suspended particles in the water body to be tested on the spectral data, eliminating the measurement error of water quality parameters caused by suspended particles in the water body to be tested, and improving the accuracy of water quality parameters, thereby achieving accurate detection of water quality.
[0060] In this embodiment, by constructing a turbidity compensation model based on the water type of the water body to be tested, turbidity compensation for different types of water bodies can be achieved. The turbidity compensation can offset the influence of suspended particles in the water body to be tested on the spectral data, improve the measurement accuracy of water quality parameters, and thus improve the accuracy of the water quality detection results of the water body to be tested.
[0061] Furthermore, the water body types are classified based on the spectral morphology corresponding to the curve shape of the spectral data, and turbidity compensation models are constructed according to the spectral data of different forms, so as to achieve accurate turbidity compensation for different types of water bodies and improve the accuracy of turbidity compensation.
[0062] In one embodiment, step 200 may further include:
[0063] Step 201, acquiring training spectrum data corresponding to the water body to be tested according to the water body type, and performing turbidity compensation on the training spectrum data to generate compensated spectrum data;
[0064] Step 202: obtaining a preset basic model to be trained, and iteratively training the basic model to be trained using the training spectrum data and the compensation spectrum data to obtain a turbidity compensation model corresponding to the water body to be tested.
[0065] When constructing a turbidity compensation model for a water body to be tested based on the water body type of the water body to be tested, firstly, the training spectral data of the water body to be tested is obtained according to the water body type of the water body to be tested, and turbidity compensation is performed based on the training spectral data to generate compensation spectral data. A preset basic model to be trained is obtained, and the obtained training spectral data and compensation spectral data are used as training sample data sets to iteratively train the basic model to be trained to obtain a turbidity compensation model corresponding to the water body to be tested.
[0066] Among them, the basic model to be trained is a deep learning model, such as the semantic segmentation model unet, etc. Different types of water bodies can build turbidity compensation models based on the same or the same basic model to be trained, or they can build turbidity compensation models based on different basic models to be trained. Turbidity compensation is performed on the training spectral data to eliminate the influence of scattering on the spectrum caused by uniform particle distribution and different particle sizes, and compensated spectral data is generated. At the same time, the deep learning model is trained using the acquired training spectral data and compensated spectral data to establish the corresponding relationship between turbidity and particle size distribution and absorbance value, and the model is constructed based on different water body types, so as to obtain a turbidity compensation model for turbidity compensation of different types of water bodies.
[0067] Furthermore, step 201 may also include:
[0068] Step 211, collecting spectral data of different turbidities of water samples of various water types to generate a spectral data set;
[0069] Step 2012, according to the water body type of the water body to be tested, obtaining spectral data corresponding to the water body to be tested from the spectral data set, and obtaining training spectral data corresponding to the water body to be tested;
[0070] Step 213: Use a preset turbidity compensation algorithm to perform turbidity compensation on the training spectrum data to obtain compensated spectrum data corresponding to the water body to be tested.
[0071] When acquiring training spectral data, spectral data of water samples of different water types are collected to generate a spectral data set, which includes spectral data of water samples of different turbidities of each type of water. According to the water type of the water body to be tested, spectral data of water samples of the same type but different turbidities are obtained from the spectral data set as training spectral data of the water body to be tested. The training spectral data is turbidity compensated using a preset turbidity compensation algorithm to obtain spectral data after turbidity compensation, i.e., compensated spectral data.
[0072] Among them, the preset turbidity compensation algorithm includes one or more of Mie scattering algorithm, multivariate scattering correction algorithm (MSC), diffusion multiplicative scattering correction algorithm (EMSC), correction algorithm based on filtering and statistical principles, and multivariate regression algorithm. Taking Mie scattering algorithm as an example, when performing turbidity compensation on training spectral data, the particle size distribution of particulate matter in the water sample is reconstructed based on the original collected training spectral data of different turbidities, and the absorbance value of the particulate matter in the water sample in the visible light band is estimated based on the particle size distribution, and the absorbance value is subtracted from the original spectral data point to obtain the corresponding compensated spectral data.
[0073] Furthermore, in the stage of constructing the training sample data set, a conventional turbidity compensation method is used to perform turbidity compensation on the spectral data of the water sample to obtain compensated spectral data, and the originally collected spectral data and the compensated spectral data are used as training samples at the same time to train the basic deep learning model to be trained, and a turbidity compensation model constructed based on a preset turbidity compensation algorithm is obtained. The turbidity compensation model can determine the turbidity of the water body to be tested according to the spectral data, and determine the optimal turbidity compensation value according to the spectral curve of the water body to be tested. Based on the optimal turbidity compensation value, turbidity compensation is performed on the spectral data of the water body to be tested. Compared with the conventional turbidity compensation algorithm, the influence of turbidity on water quality detection can be eliminated to the greatest extent, thereby improving the accuracy of water quality detection results.
[0074] In this embodiment, the original spectral data of water samples of different turbidity types and the compensated spectral data obtained by turbidity compensation based on the original spectral data are used as training samples for deep learning model training, and a corresponding relationship between the spectral data and the optimal turbidity compensation value is established to obtain a turbidity compensation model. Using the trained turbidity compensation model, the optimal turbidity compensation value can be determined according to the spectral data of the water body to be tested, thereby eliminating the influence of turbidity on water quality detection to the greatest extent and improving the accuracy of water quality detection results.
[0075] The turbidity compensation device provided by the present invention is described below. The turbidity compensation device described below and the turbidity compensation method described above can be referred to each other.
[0076] Reference Figure 2 , the turbidity compensation device provided by the embodiment of the present invention includes:
[0077] The spectrum acquisition module 10 is used to acquire initial spectrum data of the water body to be tested, and determine the water body type of the water body to be tested according to the initial spectrum data;
[0078] A model building module 20, used to build a turbidity compensation model corresponding to the water body to be tested based on the water body type;
[0079] The turbidity compensation module 30 is used to perform turbidity compensation on the initial spectral data of the water body to be tested by using the turbidity compensation model.
[0080] In one embodiment, the spectrum acquisition module 10 is further used for:
[0081] Normalizing the initial spectral data to obtain target spectral data;
[0082] The target spectral data are fitted into a spectral curve, and the water body type of the water body to be tested is determined according to the shape of the spectral curve.
[0083] In one embodiment, the model building module 20 is further used to:
[0084] Acquire training spectral data corresponding to the water body to be tested according to the water body type, and perform turbidity compensation on the training spectral data to generate compensated spectral data;
[0085] A preset basic model to be trained is obtained, and the basic model to be trained is iteratively trained using the training spectrum data and the compensation spectrum data to obtain a turbidity compensation model corresponding to the water body to be tested.
[0086] In one embodiment, the model building module 20 is further used to:
[0087] Collect spectral data of different turbidity of water samples of various water types to generate a spectral data set;
[0088] According to the water body type of the water body to be tested, acquiring spectral data corresponding to the water body to be tested from the spectral data set to obtain training spectral data corresponding to the water body to be tested;
[0089] The training spectral data is subjected to turbidity compensation using a preset turbidity compensation algorithm to obtain compensated spectral data corresponding to the water body to be tested.
[0090] In one embodiment, the basic model to be trained is a deep learning model.
[0091] In one embodiment, the turbidity compensation module 30 is further used for:
[0092] Using the turbidity compensation model to perform scattered particle size analysis on the initial spectral data, and reconstruct the particle size distribution of suspended particles in the water body to be tested;
[0093] Based on the particle size distribution, estimating the absorbance value caused by the suspended particles in the ultraviolet to visible light band;
[0094] The absorbance value is subtracted from the initial spectral data to perform turbidity compensation on the initial spectral data of the water body to be tested.
[0095] In one embodiment, the turbidity compensation device further includes a water quality detection module, which is used to:
[0096] Fitting the spectral data of the water body to be tested after turbidity compensation into a spectral curve;
[0097] The water quality parameters of the water body to be tested are determined according to the spectral curve, and the water quality of the water body to be tested is determined according to the water quality parameters.
[0098] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the turbidity compensation method, which includes:
[0099] Collecting initial spectral data of a water body to be tested, and determining the water body type of the water body to be tested according to the initial spectral data;
[0100] Constructing a turbidity compensation model corresponding to the water body to be tested based on the water body type;
[0101] The turbidity compensation model is used to perform turbidity compensation on the initial spectral data of the water body to be tested.
[0102] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0103] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can perform the turbidity compensation method provided by the above methods, the method comprising:
[0104] Collecting initial spectral data of a water body to be tested, and determining the water body type of the water body to be tested according to the initial spectral data;
[0105] Constructing a turbidity compensation model corresponding to the water body to be tested based on the water body type;
[0106] The turbidity compensation model is used to perform turbidity compensation on the initial spectral data of the water body to be tested.
[0107] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the turbidity compensation method provided by the above methods, the method comprising:
[0108] Collecting initial spectral data of a water body to be tested, and determining the water body type of the water body to be tested according to the initial spectral data;
[0109] Constructing a turbidity compensation model corresponding to the water body to be tested based on the water body type;
[0110] The turbidity compensation model is used to perform turbidity compensation on the initial spectral data of the water body to be tested.
[0111] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0112] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A turbidity compensation method, characterized in that: The following steps are involved: Collecting initial spectral data of a water body to be tested, and determining the water body type of the water body to be tested according to the initial spectral data; Constructing a turbidity compensation model corresponding to the water body to be tested based on the water body type; Using the turbidity compensation model to perform turbidity compensation on the initial spectral data of the water body to be tested; The step of constructing a turbidity compensation model corresponding to the water body to be tested based on the water body type comprises: Acquire training spectral data corresponding to the water body to be tested according to the water body type, and perform turbidity compensation on the training spectral data to generate compensated spectral data; Obtaining a preset basic model to be trained, and iteratively training the basic model to be trained using the training spectral data and the compensation spectral data to obtain a turbidity compensation model corresponding to the water body to be tested; The step of acquiring the training spectral data corresponding to the water body to be tested according to the water body type, and performing turbidity compensation on the training spectral data to generate compensated spectral data comprises: Collect spectral data of different turbidity of water samples of various water types to generate a spectral data set; According to the water body type of the water body to be tested, acquiring spectral data corresponding to the water body to be tested from the spectral data set to obtain training spectral data corresponding to the water body to be tested; Performing turbidity compensation on the training spectral data using a preset turbidity compensation algorithm to obtain compensated spectral data corresponding to the water body to be tested; The step of using the turbidity compensation model to perform turbidity compensation on the initial spectral data comprises: Using the turbidity compensation model to perform scattered particle size analysis on the initial spectral data, and reconstruct the particle size distribution of suspended particles in the water body to be tested; Based on the particle size distribution, estimating the absorbance value caused by the suspended particles in the ultraviolet to visible light band; The absorbance value is subtracted from the initial spectral data to perform turbidity compensation on the initial spectral data of the water body to be tested.
2. The turbidity compensation method according to claim 1, characterized in that: The basic model to be trained is a deep learning model.
3. The turbidity compensation method according to claim 1, characterized in that: The step of determining the water type of the water body to be tested according to the initial spectral data comprises: Normalizing the initial spectral data to obtain target spectral data; The target spectral data are fitted into a spectral curve, and the water body type of the water body to be tested is determined according to the shape of the spectral curve.
4. The turbidity compensation method according to claim 1, characterized in that: After the step of using the turbidity compensation model to perform turbidity compensation on the initial spectral data of the water body to be tested, the method further includes: Fitting the spectral data of the water body to be tested after turbidity compensation into a spectral curve; The water quality parameters of the water body to be tested are determined according to the spectral curve, and the water quality of the water body to be tested is determined according to the water quality parameters.
5. A turbidity compensation device, characterized in that: include: A spectrum acquisition module, used for acquiring initial spectrum data of the water body to be tested, and determining the water body type of the water body to be tested according to the initial spectrum data; A model building module, used for building a turbidity compensation model corresponding to the water body to be tested based on the water body type; A turbidity compensation module, used for performing turbidity compensation on the initial spectral data of the water body to be tested by using the turbidity compensation model; The model building module is also used to: Acquire training spectral data corresponding to the water body to be tested according to the water body type, and perform turbidity compensation on the training spectral data to generate compensated spectral data; Obtaining a preset basic model to be trained, and iteratively training the basic model to be trained using the training spectral data and the compensation spectral data to obtain a turbidity compensation model corresponding to the water body to be tested; The model building module is also used to: Collect spectral data of different turbidity of water samples of various water types to generate a spectral data set; According to the water body type of the water body to be tested, acquiring spectral data corresponding to the water body to be tested from the spectral data set to obtain training spectral data corresponding to the water body to be tested; Performing turbidity compensation on the training spectral data using a preset turbidity compensation algorithm to obtain compensated spectral data corresponding to the water body to be tested; The turbidity compensation module is also used for: Using the turbidity compensation model to perform scattered particle size analysis on the initial spectral data, and reconstruct the particle size distribution of suspended particles in the water body to be tested; Based on the particle size distribution, estimating the absorbance value caused by the suspended particles in the ultraviolet to visible light band; The absorbance value is subtracted from the initial spectral data to perform turbidity compensation on the initial spectral data of the water body to be tested.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the turbidity compensation method according to any one of claims 1 to 4 is implemented.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the turbidity compensation method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Water quality multi-parameter ultraviolet-visible absorption spectrum quantitative inversion method
CN111157476A
Total phosphorus turbidity compensation method applied to online monitoring of high-turbidity water body
CN112098348A