Full-spectrum water quality multi-parameter analysis detector

The full-spectrum water quality multi-parameter analysis and detection instrument has solved the problems of insufficient stability of the spectral instrument light source and poor model generalization, and achieved high-precision water quality parameter detection and early warning, especially in high turbidity environments. It can accurately monitor multiple water quality parameters and provide effective early warnings.

CN120831331APending Publication Date: 2025-10-24WUXI DAYU TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510942403.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

Existing online spectral instruments have insufficient light source stability, weak ability to resist environmental interference, poor model generalization, and incomplete parameter coverage, making it difficult to achieve accurate monitoring of complex water bodies, and the accuracy of predicting water quality change trends is insufficient.

Method used

A full-spectrum water quality multi-parameter analysis and detection instrument is used, including a full-spectrum acquisition module, a preprocessing module and an information processing module. A light source component composed of a deuterium lamp and a halogen tungsten lamp, a dual-path differential probe and a sensor array are used. Spectral data preprocessing is performed through edge computing, and impurity concentration is calculated in combination with the CNN-attention mechanism. The mutual influence relationship between different impurities is considered in the application module.

Benefits of technology

It has achieved strong anti-interference ability under high turbidity, comprehensive parameter coverage, high detection accuracy, can monitor multiple water quality parameters in real time, and provide accurate abnormal warning based on predicted concentration values ​​to avoid misjudgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120831331A_ABST
    Figure CN120831331A_ABST
Patent Text Reader

Abstract

The invention relates to the field of water quality parameter detection, in particular to a full-spectrum water quality multi-parameter analysis detector which comprises a full-spectrum acquisition module, a preprocessing module, an information processing module and an application module. The full-spectrum acquisition module is used for transmitting a full-spectrum signal to a detection sample, detecting transmission light and scattered light signals and generating original spectrum data; the preprocessing module is used for preprocessing the original spectrum data by adopting an edge calculation mode to obtain a standardized spectrum matrix; the information processing module is used for calculating the actual concentration value of each impurity in the detection sample according to the standardized spectrum matrix; according to the method, the influence relation between different types of impurities is introduced, compared with a common prediction method, the prediction precision of the concentration of each impurity is higher, whether early warning is needed or not is judged according to the prediction precision, and the situation of misjudgment is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of water quality parameter detection, in particular to a full-spectrum water quality multi-parameter analysis detector. BACKGROUND

[0002] The existing online spectral instrument is limited by defects such as insufficient light source stability, weak environmental interference resistance (such as large scattering noise of high turbidity water body), poor model generalization, incomplete parameter coverage (such as missing total phosphorus and total nitrogen detection), insufficient dynamic calibration capability, and difficulty in realizing accurate monitoring of complex water bodies. In addition, the common water quality change trend prediction method does not consider the mutual influence between different impurity concentrations, so its prediction accuracy is insufficient, which is not conducive to analyzing the change of water quality according to the prediction result. SUMMARY

[0003] In view of the defects of the prior art, the present application provides a full-spectrum water quality multi-parameter analysis detector, which solves the technical problems in the background art.

[0004] To achieve the above purpose, the present application provides the following technical scheme: A full-spectrum water quality multi-parameter analysis detector, comprising a full-spectrum acquisition module, a preprocessing module, an information processing module and an application module; The full-spectrum acquisition module is used to emit full-spectrum signals to the detection sample, and detect the transmission light and scattering light signals to generate original spectrum data; The preprocessing module is used to preprocess the original spectrum data in an edge computing manner to obtain a standardized spectrum matrix; The information processing module is used to calculate the actual concentration value of each impurity in the detection sample according to the standardized spectrum matrix; The application module is used to upload the actual concentration value to the cloud, calculate the predicted concentration value of each substance at the target time point according to the change of the actual concentration value, and perform abnormal early warning according to the predicted concentration value.

[0005] Specifically, the impurity types include total phosphorus, total nitrogen, COD, algae and heavy metals.

[0006] Specifically, the full-spectrum acquisition module comprises a light source assembly, a double optical path difference differential probe and a sensor array. The light source assembly comprises a deuterium lamp and a halogen tungsten lamp; the deuterium lamp is used to emit 185-400nm ultraviolet band light; the halogen tungsten lamp is used to emit 400-1100nm visible-infrared band light; The double-path difference differential probe is used to emit light emitted by the light source assembly to the detection sample through the incident light path and the reference light path respectively; The sensor array is constructed based on an ultraviolet-visible spectrometer and a fluorescence detector to collect light transmitted through the detection sample and mark it as original spectral data.

[0007] Specifically, the step of preprocessing the original spectral data is specifically as follows: S11, eliminating baseline drift and background interference of the original spectral data to obtain first spectral information The calculation formula is:

[0008] In the formula, represents the light intensity of the original spectral data at wavelength ; represents the baseline spectrum; S12, Gaussian filtering is performed on the first spectral information to obtain second spectral information The calculation formula is:

[0009] In the formula, represents the standard deviation of the filter; is an integral variable, representing the wavelength range; S13, turbidity compensation is performed on the second spectral information to obtain third spectral information The calculation formula is:

[0010] In the formula, represents the dynamic calibration coefficient; represents the turbidity value of the detection sample; S14, data standardization is performed on the third spectral information to obtain fourth spectral information The calculation formula is:

[0011] In the formula, represents the max function; S15, the detection sample is detected m times, and steps S11-S14 are repeated for each detection to construct a standardized spectral matrix The expression is:

[0012] In the formula, represents the fourth spectral information corresponding to the mth detection.

[0013] Specifically, the calculation steps of the actual concentration value of each substance are specifically as follows: S21, initialize population; define population size as N, each individual represents a set of candidate wavelength combinations, and the encoding method is binary string; discretize the wavelength range 185-1100 nm into M candidate wavelength points, and the chromosome length is M; S22, fitness function; calculate the fitness of each wavelength combination , the calculation formula is:

[0014] In the formula, represents the accuracy of the classification model trained using the wavelength combination on the validation set; represents the number of wavelengths selected by the current individual; and respectively represent the first and second weight parameters of ; S23, roulette wheel selection method; calculate the probability of each individual being selected , the calculation formula is:

[0015] In the formula, and respectively represent the fitness of the i-th and j-th individuals; S24, crossover and mutation; select individuals as parent individuals according to the probability , and perform single-point crossover on the selected parent individuals according to the crossover probability to generate offspring individuals; and flip each gene position of the offspring individuals according to the mutation probability ; S25, judge whether the termination condition is met, if the iteration termination condition is met, output the optimal wavelength combination; Termination condition: reach the maximum number of iterations T or the optimal value of the fitness of the last L generations changes less than the preset threshold; S26, construct the target model, input the optimal wavelength combination into the target model, and output the actual concentration value of each impurity.

[0016] Specifically, in step S26, the specific steps of constructing the target model are as follows: S261, obtain several test optimal wavelength combinations as training samples, and take the actual concentration value of each impurity of each training sample as the sample label; S262, train the CNN-attention mechanism using the training samples and sample labels to obtain the target model; The CNN-attention mechanism includes a first hidden layer, a second hidden layer, and a fully connected layer; The first hidden layer inputs the training sample and outputs the first feature information; The second hidden layer inputs the first feature information and outputs second feature information; The full connection layer inputs the second feature information and outputs the sample label.

[0017] The impurity types include total phosphorus, total nitrogen, COD, algae and heavy metals.

[0018] Specifically, in the application module, the following steps are specifically included: S31, using the actual concentration value of each impurity to calculate the predicted concentration value of each substance at the target time point; S32, presetting a critical value for each substance, and judging whether the predicted concentration value of each substance at the target time point is higher than the critical value; If yes, a warning is given; If no, the process ends.

[0019] Specifically, in step S31, the calculation formula of the COD predicted concentration value at the i+1th time point is as follows:

[0020] In the formula, represents the COD concentration at the ith time point; represents the heavy metal concentration at the ith time point; represents the algae biomass at the ith time point; , and respectively represent the COD natural degradation rate, the heavy metal and COD complexation coefficient and the COD consumption coefficient of algae; represents the time step; The calculation formula of the total nitrogen predicted concentration value at the i+1th time point is as follows:

[0021] In the formula, represents the total phosphorus concentration at the ith time point; represents the total nitrogen concentration at the ith time point; , and respectively represent the total nitrogen consumption rate constant, the half-saturation constant and the algae death and total nitrogen release rate; The calculation formula of the total phosphorus predicted concentration value at the i+1th time point is as follows:

[0022] In the formula, and ​​​respectively represent the turbidity adsorption loss coefficient of total phosphorus and the algae death release total phosphorus rate; in the present application, and respectively are 0.028 and 0.01; The calculation formula of the algae predicted biomass of the i+1 time point is:

[0023] In the formula, and respectively represent the maximum growth rate of algae and the natural mortality rate of algae; The calculation formula of the heavy metal predicted concentration value of the i+1 time point is:

[0024] In the formula, and respectively represent the heavy metal settling rate and the turbidity contribution coefficient of heavy metal resuspension.

[0025] Compared with the prior art, the present application provides a full-spectrum water quality multi-parameter analysis detector, which has the following beneficial effects: 1、The present application introduces the influence relationship between different types of impurities, compared with the common prediction method, the prediction accuracy of each impurity concentration is higher, which is beneficial to judge whether it needs to be warned, and avoids the occurrence of misjudgment.

[0026] 2、The present application adopts full-spectrum acquisition, which can take into account high-turbidity anti-interference and multi-parameter synchronous detection, and adopts double-pass differential probe to detect light, which can eliminate scattering noise through the difference between the incident light path and the reference light path, compared with the traditional detection method, the covered parameters are more complete and the accuracy is higher. DETAILED DESCRIPTION

[0027] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the present application and serve to explain the present application, and do not limit the present application. In the drawings: Figure 1 is a schematic diagram of a full-spectrum water quality multi-parameter analysis detector of the present application. DETAILED DESCRIPTION

[0028] In order to make the above-mentioned purposes, features and advantages of the present application more apparent, specific embodiments and specific implementation manners of the present application will be described in detail below with reference to the accompanying drawings. The realization process of how to apply technical means to solve technical problems and achieve technical effects of the present application can be fully understood and implemented.

[0029] ​​Those skilled in the art can understand that all or part of the steps in the following embodiment methods can be completed by instructing the relevant hardware through programs, therefore, the present application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment in the form of a combination of software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer usable program codes.

[0030] The traditional water quality detection method is a traditional chemical detection method represented by the dichromate method COD, which has problems such as long detection period (usually several hours are needed), high risk of reagent pollution, inability to real-time early warning of illegal discharge, and difficulty in meeting the real-time monitoring demand of water quality. The existing online spectral instruments are limited by the defects of insufficient light source stability, weak environmental interference resistance (such as large scattering noise in high turbidity water), and poor model generalization, and the parameters are not fully covered (such as the absence of total phosphorus and total nitrogen detection), and the dynamic calibration capability is insufficient, which makes it difficult to realize accurate monitoring of complex water bodies. Therefore, please refer to Figure 1 As shown in the drawings, the present application provides a full-spectrum water quality multi-parameter analysis detector, which comprises a full-spectrum acquisition module, a pretreatment module, an information processing module and an application module. The full-spectrum acquisition module is used for emitting full-spectrum signals to the detection sample, and detecting transmission light and scattering light signals to generate original spectral data. Specifically, the traditional spectrometer usually uses a single wavelength or narrow band light source (such as LED or laser), which is easy to cause light intensity attenuation and wavelength drift after long-term use, resulting in fluctuation of detection signals. In addition, suspended particles in high turbidity water will cause light scattering (such as Mie scattering), and noise will cover the effective signal, resulting in deviation of the detection value from the true concentration. Moreover, most spectrometers only support COD, BOD and other conventional parameters, and total phosphorus and total nitrogen need to rely on chemical reagent method for assistance. Therefore, the full-spectrum acquisition module comprises a light source assembly, a double optical path difference differential probe and a sensor array. The light source assembly comprises a deuterium lamp and a halogen tungsten lamp. The deuterium lamp is used to emit 185-400nm ultraviolet band light. The halogen tungsten lamp is used to emit 400-1100nm visible-infrared band light. Specifically, the deuterium lamp covers the sensitive wavelength of COD, total nitrogen and other parameters, and has high stability, which is suitable for low wavelength ultraviolet light demand. The halogen tungsten lamp is used to detect chroma, turbidity and organic impurities, and has the characteristics of wide spectrum continuous output, which is complementary to the deuterium lamp to realize full-band coverage. The double-path differential probe is used to transmit the light emitted by the light source assembly to the test sample through the incident optical path and the reference optical path respectively. Specifically, since the traditional detection method is to use a single optical path probe to directly measure the intensity of the transmitted light, but light source aging, temperature drift or circuit noise can cause signal baseline drift, the present invention uses a double-path differential probe to overcome the above-mentioned problem. To this end, the incident optical path adopts an adaptive flow cell with a path length of 10mm; the reference optical path is built-in with a blank water sample or air cavity, which is symmetrically arranged with the incident optical path to ensure noise synchronization. A part of the light emitted by the light source assembly enters the test sample through the incident optical path. The light carries absorption and scattering signals (including noise) through the test sample, and the other part of the light passes through the blank water sample or air cavity and only carries light source fluctuations and circuit noise. By subtracting the two signals, the pure water absorption signal is retained and the scattering noise (such as light source fluctuations) is eliminated. The sensor array is built based on an ultraviolet-visible spectrometer and a fluorescence detector to collect light passing through the test sample and mark it as raw spectral data; specifically, the ultraviolet-visible spectrometer is used to collect the full-band transmission spectrum from 185 to 1100 nm with a resolution of 1 nm, and the fluorescence detector is used to specifically detect total phosphorus and total nitrogen.

[0031] The present invention adopts full spectrum acquisition, which can take into account both high turbidity anti-interference and multi-parameter synchronous detection, and adopts a double-path differential probe to detect light. By differentially analyzing the incident light path and the reference light path, scattering noise can be eliminated. Compared with traditional detection methods, the coverage parameters are more complete and the accuracy is higher.

[0032] The preprocessing module is used to preprocess the raw spectral data using edge computing to obtain a standardized spectral matrix. Specifically, the steps for preprocessing the raw spectral data are as follows: S11, eliminating the baseline drift and background interference of the original spectral data to obtain the first spectral information , and its calculation formula is:

[0033] Where, Indicates the original spectrum data at wavelength The light intensity at represents the baseline spectrum; specifically, Obtained by blank water sample or dark current measurement; S12, the first spectrum information Perform Gaussian filtering to obtain the second spectrum information , and its calculation formula is:

[0034] Where, represents the standard deviation of the filter; is an integral variable, representing a wavelength range; S13, performing turbidity compensation on the second spectral information to obtain third spectral information S13, performing turbidity compensation on the second spectral information to obtain third spectral information The calculation formula is:

[0035] In the formula, represents a dynamic calibration coefficient; represents the turbidity value of the detection sample; specifically, The calculation method of is to obtain the turbidity value of each water sample detected in the history , and calculate the dynamic calibration coefficient The calculation formula is:

[0036] In the formula, represents the total number of water samples; represents the turbidity value of the i-th water sample; represents the actual spectral information of the i-th water sample (which can be measured by a standard method, such as the national standard chemical method).

[0037] S14, performing data standardization on the third spectral information to obtain fourth spectral information S14, performing data standardization on the third spectral information to obtain fourth spectral information The calculation formula is:

[0038] In the formula, represents the max function; S15, detecting the detection sample m times, repeating steps S11-S14 for each detection, and constructing a standardized spectral matrix The expression is:

[0039] In the formula, represents the fourth spectral information corresponding to the m-th detection.

[0040] The information processing module is used to calculate the actual concentration value of each impurity in the detection sample according to the standardized spectral matrix; specifically, the calculation steps of the actual concentration value of each substance are as follows: S21, initialize the population; define the population size as N, each individual represents a set of candidate wavelength combinations, the encoding method is binary string, 1 represents selecting the wavelength, and 0 represents not selecting; discretize the wavelength range 185-1100nm into M candidate wavelength points, and the chromosome length is M; specifically, M is 915; S22, fitness function; calculate the fitness of each wavelength combination , wherein the calculation formula is:

[0041] , wherein, represents the accuracy of the classification model trained using the wavelength combination on the validation set; represents the number of wavelengths selected by the current individual; and respectively represent the first and second weight parameters of In the present application, and are 0.8 and 0.2, respectively; S23, roulette wheel selection method; calculate the probability of each individual being selected , wherein the calculation formula is:

[0042] , wherein, and respectively represent the fitness of the i-th and j-th individuals; S24, crossover and mutation; select individuals as parent individuals according to the probability , and perform single-point crossover on the selected parent individuals according to the crossover probability to generate offspring individuals; and flip each gene position of the offspring individuals according to the mutation probability ; specifically, is 0.7; is 0.01; S25, determine whether the termination condition is met, and output the optimal wavelength combination if the iteration termination condition is met; Termination condition: reach the maximum number of iterations T or the optimal value of the fitness of the continuous L generations changes less than the preset threshold; specifically, T is 100; L is 20; and the preset threshold is 0.001; S26, construct the target model, input the optimal wavelength combination into the target model, and output the actual concentration value of each impurity; specifically, in step S26, the specific steps of constructing the target model are as follows: S261, obtain a plurality of test optimal wavelength combinations as training samples, and take the actual concentration value of each impurity of each training sample as a sample label; specifically, the test optimal wavelength combination is obtained by setting a control experiment and performing steps S21-S26 on each group of control experiments; S262, train the CNN-attention mechanism using the training samples and the sample labels to obtain the target model; The CNN-attention mechanism includes a first hidden layer, a second hidden layer, and a fully connected layer; The first hidden layer inputs a training sample and outputs first feature information; specifically, the first hidden layer is constructed based on a convolutional neural network; The second hidden layer inputs the first feature information and outputs second feature information; specifically, the second hidden layer is constructed based on an attention mechanism; The full connection layer inputs the second feature information and outputs a sample label.

[0043] The impurity types include total phosphorus, total nitrogen, COD, algae and heavy metals.

[0044] The application module is configured to upload the actual concentration values to the cloud, calculate the predicted concentration values of each substance at the target time point according to the change of the actual concentration values, and perform an abnormal early warning according to the predicted concentration values; specifically, the common method for predicting the concentration change trend of each substance only calculates according to the concentration change of each substance, without considering the mutual influence relationship between different types of impurities; for example, in an eutrophic water body, the increase of the total phosphorus concentration promotes the reproduction of algae, accelerates the consumption of nitrogen, and causes the total nitrogen content in the water body to decrease, while the organic nitrogen may be released after the death of the algae, causing the total nitrogen content to rise again; high turbidity (suspended particles) can scatter light signals, causing the COD spectrum detection value to be artificially high and requiring dynamic compensation; certain heavy metals (such as ) can complex with organic matter, changing the ultraviolet absorption characteristics thereof, etc. Therefore, in the application module, the following steps are specifically included: S31, using the actual concentration values of each impurity to calculate the predicted concentration values of each substance at the target time point; specifically, in step S31, the calculation formula of the COD predicted concentration value at the i+1th time point is as follows:

[0045] In the formula, represents the COD concentration at the i th time point; represents the heavy metal concentration at the i th time point; represents the algal biomass at the i th time point; , and respectively represent the COD natural degradation rate, the heavy metal and COD complexation coefficient, and the algal consumption coefficient of COD; represents the time step; in the present application, , and are 0.01, 0.05 and 0.001, respectively; the calculation formula of the total nitrogen predicted concentration value at the i+1th time point is as follows:

[0046] In the formula, represents the total phosphorus concentration at the i th time point; represents the total nitrogen concentration at the i th time point; , and respectively represent the total nitrogen consumption rate constant, the half-saturation constant and the total nitrogen release rate of algae death; in the present application, , and are respectively 0.05, 0.03 and 0.02; the predicted total phosphorus concentration value at the i+1 th time point The calculation formula is:

[0047] In the formula, and respectively represent the adsorption loss coefficient of turbidity to total phosphorus and the total phosphorus release rate of algae death; in the present application, and are respectively 0.028 and 0.01; the predicted algae biomass at the i+1 th time point The calculation formula is:

[0048] In the formula, and respectively represent the maximum growth rate of algae and the natural mortality rate of algae; in the present application, and are respectively 0.1 and 0.02; the predicted heavy metal concentration value at the i+1 th time point The calculation formula is:

[0049] In the formula, and respectively represent the heavy metal deposition rate and the contribution coefficient of turbidity to heavy metal resuspension; in the present application, and are respectively 0.01 and 0.005.

[0050] Since the common impurity concentration prediction method does not consider the mutual influence relationship between different types of impurities, the prediction accuracy will be affected, therefore in step S31 of the present application, the influence relationship between different types of impurities is introduced, compared with the common prediction method, the prediction accuracy of the concentration of each impurity is higher, which is beneficial to judge whether it needs to be warned, and avoid the misjudgment.

[0051] S32, preset a critical value for each substance, and determine whether the predicted concentration value of each substance at the target time point is higher than the critical value; If yes, a warning is given; If no, the process is ended.

[0052] The above embodiments have been described in detail, and the principles and embodiments of the present application have been described by applying specific examples. The above embodiment descriptions are only used to help understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, the specific embodiments and application scope will be changed according to the idea of the present application. In summary, the content of the present description should not be understood as a limitation of the present application.

Claims

1. A full-spectrum water quality multi-parameter analysis detector, characterized in that, The application relates to a full-spectrum acquisition module, a pretreatment module, an information processing module and an application module. The full-spectrum acquisition module is used for emitting a full-spectrum signal to a detection sample, detecting transmitted light and scattered light signals and generating original spectrum data. The pretreatment module is used for pretreating the original spectrum data in an edge computing mode to obtain a standardized spectrum matrix. The information processing module is used for calculating actual concentration values of each impurity in the detection sample according to the standardized spectrum matrix. The application module is used for uploading the actual concentration values to a cloud, calculating predicted concentration values of each substance at a target time point according to changes of the actual concentration values and performing abnormal early warning according to the predicted concentration values.

2. The full spectrum water quality multi-parameter analysis detector according to claim 1, characterized in that, The impurity types include total phosphorus, total nitrogen, COD, algae and heavy metals.

3. The full spectrum water quality multi-parameter analysis detector according to claim 1, characterized in that, The full-spectrum acquisition module comprises a light source assembly, a double-optical-path differential probe and a sensor array. The light source assembly comprises a deuterium lamp and a halogen tungsten lamp; the deuterium lamp is used for emitting 185-400nm ultraviolet waveband light; and the halogen tungsten lamp is used for emitting 400-1100nm visible-infrared waveband light. The double-optical-path differential probe is used for emitting light emitted by the light source assembly to the detection sample through an incident light path and a reference light path. The sensor array is constructed based on an ultraviolet-visible spectrometer and a fluorescence detector to collect light transmitted through the detection sample and mark the light as original spectrum data.

4. The full spectrum water quality multi-parameter analysis detector according to claim 1, characterized in that, The pretreatment steps of the original spectrum data are as follows: S11、Eliminate baseline drift and background interference of original spectral data, obtain first spectral information The calculation formula is: wherein represents the light intensity of the original spectral data at wavelength ; represents the baseline spectrum; S12、obtaining the first spectral information performing Gaussian filtering to obtain the second spectral information The calculation formula is: wherein denotes the standard deviation of the filter; is the integration variable and denotes the wavelength range; S13, the second spectral information carrying out turbidity compensation to obtain third spectral information The calculation formula is: In the formula, represents a dynamic calibration coefficient; represents a turbidity value of the detection sample; S14, the third spectral information is obtained data standardization is performed to obtain fourth spectral information The calculation formula is: In the formula, denotes the max function; S15, detecting the detection sample for m times, repeating steps S11-S14 for each detection, and constructing a normalized spectrum matrix The expression is: In the formula, represents the fourth spectral information corresponding to the mth detection.

5. The full spectrum water quality multi-parameter analysis detector according to claim 1, characterized in that, The calculation steps of the actual concentration values of each substance are as follows: S21, initializing a population; defining a population size as N, each individual representing a set of candidate wavelength combinations, and the coding mode being a binary string; discretizing the wavelength range 185-1100nm into M candidate wavelength points, and the chromosome length being M; S22, fitness function; calculate the fitness of each wavelength combination with the formula: wherein, denotes the accuracy of the classification model trained using the combination of wavelengths on the validation set; denotes the number of wavelengths selected by the current individual; and denote the first and second weight parameters with respect to , respectively. S23. Roulette wheel selection; the probability of each individual being selected is calculated The formula for calculating this is: wherein and F1and Fjrepresent the fitness of the ithand jthindividual, respectively; S24, crossover and mutation; according to probability selecting an individual as a parent individual, and performing single-point crossover to generate a child individual according to a crossover probability performing single-point crossover to generate a child individual; and performing mutation on each gene position of the child individual according to a mutation probability performing inversion; S25, judging whether a termination condition is met; if the iteration termination condition is met, outputting an optimal wavelength combination; The termination condition: reaching a maximum iteration number T or the optimal value of the fitness degree changing less than a preset threshold value for continuous L generations; S26, constructing a target model, inputting the optimal wavelength combination into the target model and outputting actual concentration values of each impurity.

6. The full spectrum water quality multi-parameter analysis detector according to claim 5, characterized in that, In step S26, the specific steps of constructing the target model are as follows: S261, obtaining a plurality of test optimal wavelength combinations as training samples, and taking the actual concentration values of each impurity of each training sample as sample labels; S262, training the CNN-attention mechanism by using the training samples and the sample labels to obtain the target model; The CNN-attention mechanism comprises a first hidden layer, a second hidden layer and a full connection layer; The first hidden layer inputs the training samples and outputs first feature information; The second hidden layer inputs the first feature information and outputs second feature information; The full connection layer inputs the second feature information and outputs sample labels. The impurity types include total phosphorus, total nitrogen, COD, algae and heavy metals.

7. The full spectrum water quality multi-parameter analysis detector according to claim 1, characterized in that, In the application module, the following steps are specifically included: S31, calculating predicted concentration values of each substance at a target time point by using the actual concentration values of each impurity; S32, presetting a critical value for each substance and judging whether the predicted concentration values of each substance at the target time point are higher than the critical value; If yes, early warning is performed; If no, the process is ended.

8. The full spectrum water quality multi-parameter analysis detector according to claim 7, characterized in that, In step S31, the COD predicted concentration value at the i+1th time point The calculation formula is: wherein, Ci represents the COD concentration at the i-th time point; Ci represents the heavy metal concentration at the i-th time point; Ci represents the algal biomass at the i-th time point; , and respectively represent the COD natural degradation rate, the heavy metal and COD complexation coefficient, and the algal consumption coefficient of COD; ti represents the time step; a total nitrogen predicted concentration value at the i+1 time point The calculation formula is: wherein denotes the total phosphorus concentration at the i-th time point; denotes the total nitrogen concentration at the i-th time point; , and denote the total nitrogen consumption rate constant, the half-saturation constant and the algal death release total nitrogen rate, respectively. the total phosphorus predicted concentration value at the i+1 time point The calculation formula is: wherein, and respectively represent the adsorption loss coefficient of turbidity to total phosphorus and the algae death release rate of total phosphorus. algae predicted biomass at the i+1 time point The calculation formula is: wherein and respectively represent the maximum growth rate of algae and the natural mortality rate of algae; a heavy metal predicted concentration value at the i+1th time point The calculation formula is: wherein and respectively represent the heavy metal settling rate and the contribution coefficient of turbidity to heavy metal resuspension.

Citation Information

Cited By

  • Crop spectrometer temperature drift calibration method based on dynamic temperature drift compensation

    CN121230870A

  • Water quality analysis method and device based on photoelectric detection

    CN121453671A

  • DOC monitoring method and device, medium and product

    CN121612822A

  • Water quality chromaticity rapid detection method with turbidity compensation function

    CN122072230A