Multi-light-source scattering water turbidity detection method, system, equipment and medium
Through multi-light source scattering technology, the wavelength combination and light source strategy are optimized using the fitness function and reward function, and data preprocessing is carried out in combination with wavelet multi-scale decomposition and soft threshold filtering, and a quantitative relationship model is established, which solves the accuracy of water pollutant detection and Efficiency issues have achieved intelligent water quality monitoring.
Patent Information
- Application Number
- CN202411542408.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-31
AI Technical Summary
The prior art is difficult to achieve rapid, accurate identification and quantitative analysis of water pollutants, especially in real-time online monitoring, and it is difficult to achieve system optimization under the constraints of limited hardware resources and computing power.
Through multi-light source scattering technology, the recognition performance of wavelength combinations is evaluated using a preset fitness function, the optimal wavelength combination is obtained, and the reward function is used to learn to determine the light source switching and irradiation strategies. Then, wavelet multi-scale decomposition and soft threshold filtering are used to pre-process the scattering spectral data, and finally a quantitative relationship model is established to achieve accurate determination of pollutant concentration.
It significantly improves the accuracy and efficiency of water quality pollutant detection, realizes an intelligent solution for water quality monitoring, and can provide reliable data support in real-time online monitoring.
Smart Images

Figure CN119470349A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of turbidity detection, and in particular to a method, system, equipment and medium for detecting turbidity of a water body scattered by multiple light sources. Background Art
[0002] The rapid and accurate identification and quantitative analysis of water pollutants are important challenges for environmental monitoring. Traditional methods often require complex sample pretreatment and expensive instruments and equipment, making it difficult to achieve real-time online monitoring. How to use multi-wavelength spectroscopy technology to achieve efficient identification and quantitative analysis of water pollutants is a technical problem that needs to be solved urgently. The core of this problem lies in how to extract the characteristic information of pollutants from the complex water scattering spectrum. This involves multiple key technical links: first, how to determine the optimal excitation wavelength combination to obtain the characteristic scattering spectrum of pollutants. Secondly, how to design the control strategy of the light source to achieve efficient excitation of the target pollutant. Thirdly, how to effectively preprocess the acquired scattering spectrum data to improve the signal-to-noise ratio and feature extraction effect. Finally, how to establish an accurate quantitative analysis model to achieve accurate determination of pollutant concentrations. These technical links are interrelated and influence each other, constituting a complex system optimization problem. How to achieve the coordinated optimization of these technical links under the constraints of limited hardware resources and computing power is the key to this problem. At the same time, due to the complexity and variability of the water environment, how to ensure the robustness and versatility of the identification and quantitative analysis methods is also a problem that needs to be considered. In addition, how to apply this technology to actual online monitoring systems to achieve long-term stable and reliable operation is also a problem that must be solved for this technology to move from the laboratory to practical applications. Summary of the invention
[0003] The present invention provides a method for detecting water turbidity by multi-light source scattering, which mainly includes:
[0004] The influence of wavelength combination on pollutant identification performance is evaluated according to the preset fitness function to obtain the optimal wavelength combination;
[0005] For the optimal wavelength combination, a reward function is used to learn the light source switching and illumination strategy, and a light source control strategy is determined;
[0006] The light source control strategy is used to control the multi-wavelength light source to irradiate the water sample to obtain scattering spectrum data;
[0007] Performing wavelet multi-scale decomposition and soft threshold filtering on the scattering spectrum data to obtain pre-processed scattering spectrum data;
[0008] The pre-processed scattering spectrum data is used to establish a quantitative relationship model to determine the pollutant concentration.
[0009] As a preferred solution of the water turbidity detection method of multi-light source scattering of the present invention, wherein: the influence of the wavelength combination on the pollutant identification performance is evaluated according to the preset fitness function to obtain the optimal wavelength combination, including:
[0010] Obtaining a set of preset wavelength combinations as initial candidate wavelength combinations;
[0011] For each candidate wavelength combination, the support vector machine model is used to identify pollutants based on the corresponding spectral data to obtain the identification results;
[0012] According to a preset fitness function, the fitness value of each candidate wavelength combination is calculated, and if the optimal fitness value is greater than a preset threshold, the corresponding candidate wavelength combination is determined as the optimal wavelength combination;
[0013] Otherwise, the candidate wavelength combination is optimized using a genetic algorithm until the optimal fitness value condition is met or the maximum number of iterations is reached;
[0014] The optimal wavelength combination is output for subsequent pollutant identification tasks.
[0015] As a preferred solution of the water turbidity detection method using multi-light source scattering of the present invention, wherein: for the optimal wavelength combination, a reward function is used to learn the light source switching and illumination strategy, and the light source control strategy is determined, including:
[0016] The Q-learning reinforcement learning algorithm is used to learn the light source switching and irradiation strategies under different wavelength combinations to obtain the light source control strategy with the maximum reward value.
[0017] According to the optimal wavelength combination, combined with a preset plant growth model and historical data, the optimal irradiation intensity parameters of the light sources of each wavelength are determined;
[0018] If the power range of the light source cannot meet the optimal illumination intensity, the light source type with the optimal illumination intensity is selected according to the preset light source replacement rule;
[0019] Plant growth status parameters are collected in real time through environmental sensors and compared with the preset plant growth model. If the actual growth status and the model prediction value have a deviation greater than the preset threshold, the lighting strategy re-optimization process is triggered.
[0020] As a preferred solution of the water turbidity detection method of multi-light source scattering of the present invention, it is judged whether the predicted deviation of the plant growth state parameters collected in real time by the environmental sensor and the preset growth model exceeds the threshold value, and if it exceeds, the lighting strategy is triggered to optimize again, and the optimal illumination intensity parameters of each wavelength light source are determined by the optimal wavelength combination and historical data, which specifically includes:
[0021] Obtain a preset plant growth model, determine the optimal growth parameter prediction value for the current growth stage, compare it with the parameters collected in real time, and obtain a deviation value;
[0022] If the deviation value exceeds the preset threshold, the lighting strategy optimization process is triggered; if the deviation value does not exceed the preset threshold, the current lighting strategy is maintained;
[0023] According to the lighting strategy optimization process, plant physiology literature and historical planting data are obtained to determine the proportion of light requirements of plants at different growth stages for each wavelength and obtain the optimal wavelength combination;
[0024] According to the optimal wavelength combination, the optimized lighting strategy parameters are transmitted to the lighting control module to adjust the illumination intensity of each wavelength light source in the LED lamp array to form a new lighting environment.
[0025] As a preferred solution of the water turbidity detection method using multi-light source scattering of the present invention, the light source control strategy is used to control the multi-wavelength light source to irradiate the water sample to obtain scattering spectrum data, including:
[0026] Acquire scattered spectrum data of multiple wavelengths, use wavelet transform and least square method to remove noise, and use maximum and minimum value normalization method to normalize the data to obtain preprocessed scattered spectrum data;
[0027] Inputting the preprocessed scattering spectrum data into a pre-trained support vector machine regression model, wherein the model uses a radial basis kernel function, optimizes hyperparameters through grid search, and is trained using historical water quality data;
[0028] If the water quality parameters of multiple water samples exceed the standard continuously, the ARIMA time series model is used to analyze the changing trend of water quality parameters, and the water quality changes in the future period are predicted through model fitting and parameter optimization.
[0029] As a preferred solution of the water turbidity detection method using multi-light source scattering of the present invention, the scattering spectrum data is subjected to wavelet multi-scale decomposition and soft threshold filtering to obtain pre-processed scattering spectrum data, including:
[0030] Acquiring scattered spectrum data, and performing denoising and normalization preprocessing on the scattered spectrum data to obtain preprocessed scattered spectrum data;
[0031] For the pre-processed scattering spectrum data, a wavelet transform method is used to perform multi-scale decomposition to obtain wavelet coefficients at multiple scales;
[0032] Obtaining preset scattering spectrum template data, using a Euclidean distance calculation method to compare the reconstructed scattering spectrum data with the scattering spectrum template data, and calculating the similarity between the two;
[0033] If the similarity is greater than a preset similarity threshold, the reconstructed scatter spectrum data is determined as the preprocessed scatter spectrum data.
[0034] As a preferred solution of the water turbidity detection method using multi-light source scattering of the present invention, wherein: a quantitative relationship model is established using the pre-processed scattering spectrum data to determine the pollutant concentration, including:
[0035] Acquire the preprocessed scattering spectrum data, and establish a quantitative relationship model between the scattering spectrum data and the pollutant concentration using a support vector regression algorithm according to the characteristics of the scattering spectrum data;
[0036] Acquire newly collected scattered spectrum data, preprocess the newly collected scattered spectrum data, input the preprocessed new scattered spectrum data into the quantitative relationship model, and obtain the corresponding pollutant concentration prediction value;
[0037] The predicted pollutant concentration value is compared with the preset environmental quality standard threshold. If the predicted pollutant concentration value exceeds the threshold, the corresponding area is determined to be an area where the pollutant concentration exceeds the threshold, and pollution control measures are taken for the area where the pollutant concentration exceeds the threshold.
[0038] A water turbidity detection system with multi-light source scattering, based on the water turbidity detection method with multi-light source scattering, characterized by: a wavelength combination optimization module, a light source control strategy module, a light data acquisition module, a data preprocessing module and an over-standard determination and management module;
[0039] A wavelength combination optimization module is used to evaluate the influence of wavelength combination on pollutant identification performance according to a preset fitness function to obtain the optimal wavelength combination;
[0040] The light source control strategy module is used to learn the light source switching and irradiation strategy based on the optimal wavelength combination and determine the light source control strategy;
[0041] The illumination data acquisition module is used to control the multi-wavelength light source to illuminate the water sample using a light source control strategy to obtain scattered spectrum data;
[0042] A data preprocessing module is used to perform wavelet multi-scale decomposition and soft threshold filtering on the scattering spectrum data to obtain preprocessed scattering spectrum data;
[0043] The module for judging and treating pollutants exceeding the standard is used to establish a quantitative relationship model using the pre-processed scattering spectrum data to determine the pollutant concentration.
[0044] A computer device comprises: a memory and a processor; the memory stores a computer program, and the processor implements the steps of the water turbidity detection method using multi-light source scattering when executing the computer program.
[0045] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the water turbidity detection method using multi-light source scattering.
[0046] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:
[0047] The present invention discloses a method for detecting water pollutants based on a multi-wavelength light source. Aiming at the difficult problems of wavelength selection and optimization of light source control strategy in water pollutant detection, the influence of wavelength combination on pollutant identification is evaluated by a preset fitness function, the optimal wavelength combination is obtained, and the light source switching and irradiation strategy is determined by reward function learning. On this basis, a multi-wavelength light source is used to irradiate the water sample according to the optimized control strategy to obtain scattering spectrum data, and data preprocessing is performed through wavelet multi-scale decomposition and soft threshold filtering, and finally a quantitative relationship model is established to achieve accurate determination of pollutant concentrations. The present invention significantly improves the accuracy and efficiency of water pollutant detection through intelligent learning of wavelength combination optimization and light source control strategy, and provides an intelligent solution for water quality monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 The present invention is a flow chart of a method, device and medium for detecting turbidity of a water body using multi-light source scattering.
[0049] Figure 2 The present invention is a schematic diagram of a method, device and medium for detecting turbidity of a water body using multi-light source scattering.
[0050] Figure 3 It is another schematic diagram of a method, device and medium for detecting turbidity of a water body using multi-light source scattering according to the present invention. DETAILED DESCRIPTION
[0051] In order to further understand the content of the present invention, the present invention is described in detail in conjunction with the accompanying drawings and embodiments. The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant inventions, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.
[0052] like Figure 1-Figure 3 In this embodiment, a method for detecting turbidity of a water body using multi-light source scattering may specifically include:
[0053] Step S101 : evaluating the influence of wavelength combination on pollutant recognition performance according to a preset fitness function to obtain an optimal wavelength combination.
[0054] A set of preset wavelength combinations is obtained as the initial candidate wavelength combinations. For each candidate wavelength combination, the support vector machine model is used to identify pollutants on the corresponding spectral data to obtain the identification result. According to the preset fitness function, the fitness value of each candidate wavelength combination is calculated. If the optimal fitness value is greater than the preset threshold, the corresponding candidate wavelength combination is determined as the optimal wavelength combination; otherwise, the genetic algorithm is used to optimize the candidate wavelength combination until the optimal fitness value condition is met or the maximum number of iterations is reached. The optimal wavelength combination is output for subsequent pollutant identification tasks.
[0055] Specifically, a set of preset wavelength combinations is obtained as the initial candidate wavelength combinations. For each candidate wavelength combination, the support vector machine (SVM) model is used to identify pollutants in the corresponding spectral data to obtain the identification results. According to the preset fitness function, the fitness value of each candidate wavelength combination is calculated. The fitness function comprehensively considers the recognition accuracy of the SVM model and the number of wavelengths in the wavelength combination. The higher the recognition accuracy and the fewer the number of wavelengths, the greater the fitness value. It is judged whether the current optimal fitness value is greater than the preset threshold (such as 9). If it is satisfied, the corresponding candidate wavelength combination is determined as the optimal wavelength combination; if it is not satisfied, the following steps are performed for further optimization. The candidate wavelength combination is optimized using a genetic algorithm. According to the fitness value, the roulette wheel selection strategy is used to select the parent wavelength combination, and then a new child wavelength combination is generated through random crossover and mutation operations. The crossover operation randomly selects some wavelengths from the two parent combinations for exchange; the mutation operation randomly selects a wavelength for replacement. The generated child wavelength combination is added to the candidate wavelength combination set, and the second step is returned to the SVM model to evaluate the updated candidate set and calculate the fitness value. Repeat steps 4 to 6 until the optimal fitness value is greater than the threshold or the preset maximum number of iterations is reached. Output the optimal wavelength combination and use it for subsequent pollutant identification tasks. Use the optimal wavelength combination to select the corresponding spectral band and build a SVM model for pollutant identification, which can be used for pollutant detection and identification in actual environments.
[0056] Step S102: for the optimal wavelength combination, a reward function is used to learn a light source switching and illumination strategy to determine a light source control strategy.
[0057] The Q-learning reinforcement learning algorithm is used to learn the light source switching and illumination strategies under different wavelength combinations to obtain the light source control strategy with the maximum reward value. According to the optimal wavelength combination, combined with the preset plant growth model and historical data, the optimal illumination intensity parameters of each wavelength light source are determined. If the power range of the light source cannot meet the optimal illumination intensity, the light source type with the optimal illumination intensity is selected according to the preset light source replacement rules. The plant growth state parameters are collected in real time through environmental sensors and compared with the preset plant growth model. If the actual growth state and the model prediction value have a deviation greater than the preset threshold, the illumination strategy re-optimization process is triggered.
[0058] Specifically, according to the preset reward function, the Q-learning reinforcement learning algorithm is used to learn the light source switching and irradiation strategies under different wavelength combinations to obtain the light source control strategy with the maximum reward value. For the optimal control strategy obtained by learning, the corresponding optimal wavelength combination, light source switching time and irradiation time are obtained by looking up the strategy table, and the switching timing of each wavelength light source is determined. According to the optimal wavelength combination, combined with the plant growth model and historical data, the optimal irradiation intensity parameters of each wavelength light source are obtained, and the actual light source irradiation intensity is determined according to the power range of the light source type. If the power range of the current light source cannot meet the optimal irradiation intensity, the light source type closest to the optimal irradiation intensity is selected according to the preset light source replacement rule, and the irradiation time is adjusted accordingly to ensure that the total amount of light meets the plant growth requirements. The optimal wavelength combination, light source switching time, irradiation time and irradiation intensity are used as control parameters to generate a light source control strategy, and the strategy is sent to the light source control unit. According to the received control strategy, the light source control unit controls each wavelength light source to switch and irradiate according to the specified timing and intensity, and collects the state parameters such as the light source voltage and current in real time. According to the preset light source working status judgment rules, it is judged in real time whether each light source is working normally. If it is found that the voltage, current and other parameters are beyond the normal range, the alarm information is triggered, and according to the preset emergency processing process, the backup light source is switched to ensure that the plant lighting is not interrupted. During the lighting process, the plant growth status parameters such as plant height, leaf area, chlorophyll content, etc. are collected in real time through environmental sensors, and compared with the preset plant growth model. If there is a large deviation between the actual growth state and the model prediction value, the re-optimization process of the lighting strategy is triggered. By adjusting the lighting time, intensity and other parameters, the lighting conditions are dynamically optimized to promote the healthy growth of plants and improve the yield and quality. When the preset plant growth cycle is reached, the lighting is stopped, and the optimized light source control strategy is saved in the strategy library to guide the subsequent plant cultivation process. At the same time, according to the harvested plant yield and quality, the plant growth model is optimized and updated to continuously improve the intelligent level of light source control.
[0059] According to the plant growth status parameters collected in real time by the environmental sensor, it is judged whether the predicted deviation from the preset growth model exceeds the threshold. If exceeded, the lighting strategy is triggered to be re-optimized. The optimal illumination intensity parameters of each wavelength light source are determined through the optimal wavelength combination and historical data.
[0060] Obtain a preset plant growth model, determine the optimal growth parameter prediction value for the current growth stage, compare it with the parameters collected in real time, and obtain a deviation value. If the deviation value exceeds the preset threshold, the lighting strategy optimization process is triggered; if the deviation value does not exceed the preset threshold, the current lighting strategy is maintained. For the lighting strategy optimization process, obtain plant physiology literature and historical planting data, determine the proportion of plant demand for each wavelength of light at different growth stages, and obtain the optimal wavelength combination. According to the optimal wavelength combination, the optimized lighting strategy parameters are transmitted to the lighting control module, and the illumination intensity of each wavelength light source in the LED light array is adjusted to form a new lighting environment.
[0061] Specifically, according to the real-time collection of plant growth state parameters, including temperature, humidity, light intensity, carbon dioxide concentration, etc., the collected data is transmitted to the data processing module. The data processing module obtains the optimal growth parameter prediction value of the current growth stage according to the preset plant growth model, and compares it with the parameters collected in real time to calculate the deviation value. It is judged whether the deviation value exceeds the preset threshold. If it exceeds the threshold, the lighting strategy optimization process is triggered; if it does not exceed the threshold, the current lighting strategy is maintained unchanged and the plant growth state parameters are continued to be monitored. When triggering the lighting strategy optimization, it is first necessary to obtain the optimal wavelength combination required for plant growth. By consulting plant physiology literature and historical planting data, the demand ratio of plants for each wavelength of light at different growth stages is determined to form the optimal wavelength combination. According to the optimal wavelength combination, the optimal irradiation intensity parameters of each wavelength light source are screened from the historical irradiation data. Using data mining technology, such as association rule analysis, the association pattern between light intensity and plant growth state in historical data is found, and the optimal irradiation intensity range of each wavelength light source is determined. Through machine learning algorithms, such as support vector machines or BP neural networks, an association model between light intensity and plant growth state is established. The historical data is divided into a training set and a test set. The training set data is used to train the model, and the test set data is used to evaluate the model's prediction performance. By continuously adjusting the model parameters, such as the kernel function type of the support vector machine, the number of hidden layers and nodes of the neural network, the model's fitting effect is optimized and the optimization accuracy of the lighting strategy is improved. The optimized lighting strategy parameters are transmitted to the lighting control module to adjust the illumination intensity of each wavelength light source in the LED light array to form a new lighting environment. The lighting control module controls the switch and brightness of the LED light according to the optimized parameters to implement the lighting strategy. The changes in the plant growth state parameters are continuously monitored, and the change trend of the plant growth state parameters is displayed in real time through data visualization technology, such as line charts and radar charts. The plant growth state parameters before and after optimization are compared and analyzed to evaluate the effect of the lighting strategy optimization. If the optimization effect is not ideal, a new round of lighting strategy optimization process is triggered; if the optimization effect meets expectations, the current lighting strategy is maintained, and the plant growth status is continuously monitored to form a closed-loop feedback control.
[0062] Step S103, using the light source control strategy to control the multi-wavelength light source to irradiate the water sample to obtain scattered spectrum data.
[0063] Acquire scattering spectrum data of multiple wavelengths, use wavelet transform and least square method to denoise, and use maximum and minimum normalization method to normalize the data to obtain preprocessed scattering spectrum data; input the preprocessed scattering spectrum data into a pre-trained support vector machine regression model, the model uses radial basis kernel function, optimizes hyperparameters through grid search, and is trained using historical water quality data; if water quality parameters of multiple water samples exceed the standard continuously, use ARIMA time series model to analyze the changing trend of water quality parameters, and predict water quality changes in the future through model fitting and parameter optimization.
[0064] Specifically, according to the multi-wavelength light source control strategy, the multi-wavelength light source is controlled to irradiate the water sample in turn to obtain the scattering spectrum data of the water sample at each wavelength. For the scattering spectrum data of multiple wavelengths obtained, wavelet transform and least squares method are used for denoising, and then the maximum and minimum normalization method is used to normalize the data to obtain the pre-processed scattering spectrum data. The pre-processed scattering spectrum data is input into the pre-trained support vector machine regression model, which uses radial basis kernel function, optimizes the model hyperparameters through grid search, and uses historical water quality data for training. The water quality parameters such as turbidity and suspended matter concentration of the water sample are calculated by the model. The water quality parameters are compared with the preset thresholds. If the water quality parameters exceed the threshold range, the water quality of the water sample is judged to be abnormal and an early warning is triggered. When the water quality parameters of multiple water samples exceed the standard continuously, the ARIMA time series model is used to analyze the changing trend of the water quality parameters, and the water quality changes in the future are predicted through model fitting and parameter optimization. According to the water quality prediction results, the control strategy of the multi-wavelength light source is automatically adjusted. If the water quality is predicted to continue to deteriorate, the detection frequency of water samples will be increased within a specific time period, such as once an hour, to improve the timeliness of water quality detection. If the water quality is predicted to gradually improve, the normal detection frequency will be restored. The water quality test results and warning information are sent to the monitoring platform. Through visualization libraries such as Echarts or Highcharts, bar charts, line charts and other charts are designed to display the changing trends of water quality parameters in real time. When water quality is abnormal, a red warning icon is displayed on the interface, and a warning description text is attached to facilitate management personnel to grasp the water quality dynamics in a timely manner.
[0065] Step S104, performing wavelet multi-scale decomposition and soft threshold filtering on the scattering spectrum data to obtain pre-processed scattering spectrum data.
[0066] Acquire scattered spectrum data, perform denoising and normalization preprocessing on the scattered spectrum data, and obtain preprocessed scattered spectrum data; for the preprocessed scattered spectrum data, use the wavelet transform method to perform multi-scale decomposition to obtain wavelet coefficients at multiple scales; acquire preset scattered spectrum template data, use the Euclidean distance calculation method to compare the reconstructed scattered spectrum data with the scattered spectrum template data, and calculate the similarity between the two; if the similarity is greater than a preset similarity threshold, determine the reconstructed scattered spectrum data as the preprocessed scattered spectrum data.
[0067] Specifically, the scattered spectrum data is obtained, and the scattered spectrum data is denoised and normalized to obtain the preprocessed scattered spectrum data. For the preprocessed scattered spectrum data, the wavelet transform method is used to select a suitable wavelet basis function, such as Daubechies wavelet, and the scattered spectrum data is decomposed at multiple scales, with the decomposition layer number being 5 layers, to obtain wavelet coefficients at multiple scales. For the wavelet coefficients at multiple scales, the adaptive soft threshold method is used to automatically set the soft threshold according to the statistical characteristics of the wavelet coefficients, and the wavelet coefficients less than the soft threshold are set to zero to obtain the wavelet coefficients after threshold processing. According to the wavelet coefficients after threshold processing, the inverse wavelet transform is used to reconstruct the wavelet coefficients at multiple scales to obtain the reconstructed scattered spectrum data. The preset scattered spectrum template data is obtained, and the Euclidean distance calculation method is used to compare the reconstructed scattered spectrum data with the scattered spectrum template data to calculate the similarity between the two. If the similarity is greater than the preset similarity threshold, such as 9, the reconstructed scattered spectrum data is determined as the preprocessed scattered spectrum data. If the similarity is less than or equal to the preset similarity threshold, the soft threshold is adaptively adjusted according to the difference between the current similarity and the target similarity, and the threshold processing is repeated in the third step until the similarity is greater than the preset similarity threshold or the maximum number of iterations is reached. The preprocessed scattering spectrum data is output for subsequent scattering spectrum feature extraction and material component identification analysis.
[0068] Step S105, using the pre-processed scattering spectrum data to establish a quantitative relationship model to determine the pollutant concentration.
[0069] Acquire preprocessed scattered spectrum data, and establish a quantitative relationship model between the scattered spectrum data and pollutant concentrations using a support vector regression algorithm based on the characteristics of the scattered spectrum data; acquire newly acquired scattered spectrum data, preprocess the newly acquired scattered spectrum data, and input the preprocessed new scattered spectrum data into the quantitative relationship model to obtain a corresponding pollutant concentration prediction value; compare the pollutant concentration prediction value with a preset environmental quality standard threshold value; if the pollutant concentration prediction value exceeds the threshold value, determine that the corresponding area is an area where the pollutant concentration exceeds the standard, and take pollution control measures for the area where the pollutant concentration exceeds the standard.
[0070] A water turbidity detection system with multi-light source scattering, comprising: a wavelength combination optimization module, a light source control strategy module, a light data acquisition module, a data preprocessing module and an over-standard determination and management module;
[0071] A wavelength combination optimization module is used to evaluate the influence of wavelength combination on pollutant identification performance according to a preset fitness function to obtain the optimal wavelength combination;
[0072] The light source control strategy module is used to learn the light source switching and irradiation strategy based on the optimal wavelength combination and determine the light source control strategy;
[0073] The illumination data acquisition module is used to control the multi-wavelength light source to illuminate the water sample using a light source control strategy to obtain scattered spectrum data;
[0074] A data preprocessing module is used to perform wavelet multi-scale decomposition and soft threshold filtering on the scattering spectrum data to obtain preprocessed scattering spectrum data;
[0075] The module for judging and treating pollutants exceeding the standard is used to establish a quantitative relationship model using the pre-processed scattering spectrum data to determine the pollutant concentration.
[0076] A computer device comprises: a memory and a processor; the memory stores a computer program, and when the processor executes the computer program, the steps of a water body turbidity detection method using multi-light source scattering are implemented.
[0077] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for detecting turbidity of a water body using multi-light source scattering.
[0078] Specifically, after obtaining the original scattering spectrum data, the original data is preprocessed, including removing noise and outliers. Common denoising methods include wavelet transform denoising and Fourier transform denoising. Outliers can be eliminated by setting thresholds or using statistical methods such as the 3σ principle to obtain preprocessed scattering spectrum data. According to the characteristics of the preprocessed scattering spectrum data, support vector regression (SVR) is selected as the machine learning algorithm to establish a quantitative relationship model between scattering spectrum data and pollutant concentration. Using the 10-fold cross-validation method, the preprocessed scattering spectrum data is randomly divided into 10 subsets, 9 of which are selected as training sets each time, and the remaining 1 subset is used as a test set. The SVR model is trained and the performance of the model is evaluated on the test set. The grid search method is used to optimize the hyperparameters of SVR, such as the penalty coefficient C and the kernel function type, and the parameter combination with the smallest average prediction error is selected as the optimal model. The established SVR model is used to predict the newly collected scattering spectrum data. The new spectrum data is preprocessed in the same way as the training data and input into the trained SVR model to obtain the corresponding pollutant concentration prediction value. In order to further improve the accuracy of pollutant concentration prediction, more scattering spectrum data and the corresponding true values of pollutant concentration can be obtained by deploying more scattering spectrum sensors and pollutant concentration monitoring points. The newly acquired data is added to the original training set, the SVR model is retrained, and the model is continuously updated and optimized. The predicted pollutant concentration value is compared with the environmental quality standard to determine whether it exceeds the standard. For areas where pollutant concentration exceeds the standard, timely pollution control measures are taken, such as limiting pollution source emissions and adding pollutant treatment facilities. At the same time, the pollutant concentration prediction results are presented to environmental management departments and the public in the form of charts and reports to provide a basis for environmental decision-making and improve the public's environmental awareness and participation.
[0079] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for detecting water turbidity by multi-light source scattering, characterized in that: The method comprises: The influence of wavelength combination on pollutant identification performance is evaluated according to the preset fitness function to obtain the optimal wavelength combination; For the optimal wavelength combination, a reward function is used to learn the light source switching and illumination strategy, and a light source control strategy is determined; The light source control strategy is used to control the multi-wavelength light source to irradiate the water sample to obtain scattering spectrum data; Performing wavelet multi-scale decomposition and soft threshold filtering on the scattering spectrum data to obtain pre-processed scattering spectrum data; The pre-processed scattering spectrum data is used to establish a quantitative relationship model to determine the pollutant concentration.
2. The method according to claim 1, characterized in that The method of evaluating the influence of the wavelength combination on the pollutant identification performance according to the preset fitness function to obtain the optimal wavelength combination includes: Obtaining a set of preset wavelength combinations as initial candidate wavelength combinations; For each candidate wavelength combination, the support vector machine model is used to identify pollutants based on the corresponding spectral data to obtain the identification results; According to a preset fitness function, the fitness value of each candidate wavelength combination is calculated, and if the optimal fitness value is greater than a preset threshold, the corresponding candidate wavelength combination is determined as the optimal wavelength combination; Otherwise, the candidate wavelength combination is optimized using a genetic algorithm until the optimal fitness value condition is met or the maximum number of iterations is reached; The optimal wavelength combination is output for subsequent pollutant identification tasks.
3. The method according to claim 2, characterized in that For the optimal wavelength combination, a reward function is used to learn the light source switching and illumination strategy, and a light source control strategy is determined, including: The Q-learning reinforcement learning algorithm is used to learn the light source switching and irradiation strategies under different wavelength combinations to obtain the light source control strategy with the maximum reward value. According to the optimal wavelength combination, combined with a preset plant growth model and historical data, the optimal irradiation intensity parameters of the light sources of each wavelength are determined; If the power range of the light source cannot meet the optimal illumination intensity, the light source type with the optimal illumination intensity is selected according to the preset light source replacement rule; Plant growth status parameters are collected in real time through environmental sensors and compared with the preset plant growth model. If the actual growth status and the model prediction value have a deviation greater than the preset threshold, the lighting strategy re-optimization process is triggered.
4. The method according to claim 3, characterized in that According to the plant growth status parameters collected in real time by the environmental sensor, it is judged whether the predicted deviation from the preset growth model exceeds the threshold. If it exceeds, the lighting strategy is triggered to optimize again. The optimal irradiation intensity parameters of each wavelength light source are determined through the optimal wavelength combination and historical data, including: Obtain a preset plant growth model, determine the optimal growth parameter prediction value for the current growth stage, compare it with the parameters collected in real time, and obtain a deviation value; If the deviation value exceeds the preset threshold, the lighting strategy optimization process is triggered; if the deviation value does not exceed the preset threshold, the current lighting strategy is maintained; According to the lighting strategy optimization process, plant physiology literature and historical planting data are obtained to determine the proportion of light requirements of plants at different growth stages for each wavelength and obtain the optimal wavelength combination; According to the optimal wavelength combination, the optimized lighting strategy parameters are transmitted to the lighting control module to adjust the illumination intensity of each wavelength light source in the LED lamp array to form a new lighting environment.
5. The method according to claim 3, characterized in that: The light source control strategy is used to control the multi-wavelength light source to irradiate the water sample and obtain scattered spectrum data, including: Acquire scattered spectrum data of multiple wavelengths, use wavelet transform and least square method to remove noise, and use maximum and minimum value normalization method to normalize the data to obtain preprocessed scattered spectrum data; Inputting the preprocessed scattering spectrum data into a pre-trained support vector machine regression model, wherein the model uses a radial basis kernel function, optimizes hyperparameters through grid search, and is trained using historical water quality data; If the water quality parameters of multiple water samples exceed the standard continuously, the ARIMA time series model is used to analyze the changing trend of water quality parameters, and the water quality changes in the future period are predicted through model fitting and parameter optimization.
6. The method according to claim 5, characterized in that The scattering spectrum data is subjected to wavelet multiscale decomposition and soft threshold filtering to obtain preprocessed scattering spectrum data, including: Acquiring scattered spectrum data, and performing denoising and normalization preprocessing on the scattered spectrum data to obtain preprocessed scattered spectrum data; For the pre-processed scattering spectrum data, a wavelet transform method is used to perform multi-scale decomposition to obtain wavelet coefficients at multiple scales; Obtaining preset scattering spectrum template data, using a Euclidean distance calculation method to compare the reconstructed scattering spectrum data with the scattering spectrum template data, and calculating the similarity between the two; If the similarity is greater than a preset similarity threshold, the reconstructed scatter spectrum data is determined as the preprocessed scatter spectrum data.
7. The method according to claim 6, characterized in that The pre-processed scattering spectrum data is used to establish a quantitative relationship model to determine the pollutant concentration, including: Acquire the preprocessed scattering spectrum data, and establish a quantitative relationship model between the scattering spectrum data and the pollutant concentration using a support vector regression algorithm according to the characteristics of the scattering spectrum data; Acquire newly collected scattered spectrum data, preprocess the newly collected scattered spectrum data, input the preprocessed new scattered spectrum data into the quantitative relationship model, and obtain the corresponding pollutant concentration prediction value; The predicted pollutant concentration value is compared with the preset environmental quality standard threshold. If the predicted pollutant concentration value exceeds the threshold, the corresponding area is determined to be an area where the pollutant concentration exceeds the threshold, and pollution control measures are taken for the area where the pollutant concentration exceeds the threshold.
8. A water turbidity detection system using multiple light source scattering, based on the water turbidity detection method using multiple light source scattering as claimed in any one of claims 1 to 7, characterized in that: Wavelength combination optimization module, light source control strategy module, illumination data acquisition module, data preprocessing module and over-standard determination and management module; A wavelength combination optimization module is used to evaluate the influence of wavelength combination on pollutant identification performance according to a preset fitness function to obtain the optimal wavelength combination; The light source control strategy module is used to learn the light source switching and irradiation strategy based on the optimal wavelength combination and determine the light source control strategy; The illumination data acquisition module is used to control the multi-wavelength light source to illuminate the water sample using a light source control strategy to obtain scattered spectrum data; A data preprocessing module is used to perform wavelet multi-scale decomposition and soft threshold filtering on the scattering spectrum data to obtain preprocessed scattering spectrum data; The module for judging and treating pollutants exceeding the standard is used to establish a quantitative relationship model using the pre-processed scattering spectrum data to determine the pollutant concentration.
9. A computer device comprising: A memory and a processor; the memory stores a computer program, wherein the processor implements the steps of the water turbidity detection method with multi-light source scattering according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for detecting turbidity of a water body by multi-light source scattering according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Dynamic monitoring system for pollutants of water supply network and monitoring and early warning method thereof
CN112966409A
Method and system for detecting agricultural pollutants in water environment
CN115494047A
Vision measurement control system and method
CN117850244A
IoT-based intelligent water quality monitoring method and system
CN117990628A
Water contamination measurement apparatus
US20080030730A1
Cited By
Blood component collection method
CN119909858A
Water quality monitoring method and system for water conservancy pump station
CN119985359A
Measurement device, measurement method, measurement program, and water treatment system
EP4806850A1