Portable spectral method multi-index water quality detection method and system

CN122591559APending Publication Date: 2026-08-18杨继光
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610804549.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-05
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

但现有便携式光谱水质检测技术与设备仍存在诸多技术短板:其一,多采用单波长或窄波段检测光路,仅能实现单一或少量水质指标检测,无法同步覆盖总有机碳、化学需氧量、生化需氧量、浊度等核心指标,检测维度有限;其二,实际水体中存在悬浮物散射、共存组分交叉干扰等问题,现有技术缺乏针对性的多因子干扰修正机制,检测结果易受基体干扰影响,精度与稳定性不足;其三,现有设备多仅实现光谱类核心指标检测,未将理化扩展指标与光谱核心指标进行数据融合,无法形成全面的水质评价结果,便携化、一体化、高精度的多指标同步检测能力严重不足

Benefits of technology

[0043]The aforementioned portable spectroscopic multi-index water quality detection method, system, computer equipment, and storage medium first acquire the detection instructions for the water quality to be tested. These instructions explicitly include core index detection instructions and extended index detection instructions, providing clear guidance for subsequent detection processes. Based on the core index detection instructions, the detection equipment is controlled to emit multi-wavelength and stable-intensity detection light signals towards the water quality to be tested, ensuring the stability and specificity of the detection light signals and meeting the spectral requirements for multi-index detection. The initial electrical signal generated after the detection light signal is absorbed and scattered by the water quality to be tested is collected, and preprocessing operations such as noise reduction, signal amplification, and baseline correction are performed on the initial electrical signal. Interference signals are removed and signal quality is optimized to obtain target spectral data that meets the detection requirements. The target spectral data is then input into a pre-constructed and calibrated interference correction model. Combined with calibration data obtained from previous instrument calibration (including calibration curves and interference compensation parameters), the core indicators of the water quality to be tested are determined through processes such as spectral calculation, concentration fitting, and rationality verification. Subsequently, according to the extended indicator detection instructions, the original data of the extended indicators of the water quality to be tested are collected. After processing such as outlier removal and time synchronization, the effective extended indicator data is integrated and correlated with the core indicator detection results to generate a comprehensive detection result that fully reflects the water quality status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122591559A_ABST
    Figure CN122591559A_ABST
Patent Text Reader

Abstract

The application relates to a portable spectral multi-index water quality detection method and system. The method comprises the following steps: first, obtaining a detection instruction containing core and extended indexes; according to the core index detection instruction, emitting stable multi-wavelength detection light, collecting initial electric signals converted by optical signals, and preprocessing the initial electric signals to obtain target spectral data; inputting the target spectral data into a calibrated interference correction model, and combining calibration data to obtain a core index detection result; then, collecting extended index data, and fusing the extended index data with the core index to generate a comprehensive detection result. Through the cooperation of multi-wavelength spectral detection and the interference correction model, the method reduces the matrix scattering and component cross interference, and improves the detection precision and stability; through the fusion of the core and extended index data, multi-dimensional comprehensive detection is realized, the on-site rapid and high-precision detection demand is met, and the water environment emergency monitoring and on-site screening scene are adapted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of water quality testing technology, and in particular relates to a portable spectroscopic method and system for multi-index water quality testing. Background Technology

[0002] Water resource protection and water quality safety monitoring are core components of water environment governance, drinking water safety assurance, industrial wastewater discharge control, and urban and rural domestic sewage supervision. Rapid, accurate, and simultaneous multi-indicator on-site detection has become an important development direction for water quality monitoring technology. Traditional water quality testing largely relies on laboratory physicochemical analysis methods, which suffer from drawbacks such as long sample storage and transportation cycles, cumbersome testing procedures, high reagent consumption, and the inability to achieve in-situ real-time monitoring. These methods are insufficient to meet the practical needs of emergency monitoring and rapid on-site screening for sudden water pollution incidents.

[0003] Spectroscopic detection technology, with its advantages of being reagent-free, fast-responding, and non-destructive, is gradually being applied to the field of water quality indicator detection. However, existing portable spectroscopic water quality detection technologies and equipment still have many technical shortcomings: First, most of them use single-wavelength or narrow-band detection optical paths, which can only achieve the detection of single or a small number of water quality indicators, and cannot simultaneously cover core indicators such as total organic carbon, chemical oxygen demand, biochemical oxygen demand, and turbidity, thus limiting the detection dimensions; Second, in actual water bodies, there are problems such as suspended solids scattering and cross-interference of coexisting components, and existing technologies lack targeted multi-factor interference correction mechanisms, making the detection results susceptible to matrix interference, resulting in insufficient accuracy and stability; Third, existing equipment mostly only achieves the detection of core spectral indicators, without fusing data from physicochemical extended indicators with core spectral indicators, failing to form comprehensive water quality evaluation results, and severely lacking the ability to simultaneously detect multiple indicators with high precision in a portable, integrated, and high-precision manner. Summary of the Invention

[0004] Therefore, it is necessary to provide a portable spectroscopic multi-index water quality detection method and system that can effectively reduce the impact of water matrix scattering and cross-interference of coexisting components on the detection results, and comprehensively and accurately reflect the overall condition of the water to be tested, in order to address the above-mentioned technical problems.

[0005] Firstly, this application provides a portable spectroscopic method for multi-index water quality detection, including:

[0006] Obtain testing instructions for the water quality to be tested; testing instructions include core indicator testing instructions and extended indicator testing instructions.

[0007] Based on the core indicator detection instructions, multi-wavelength and stable light signals are emitted to the water quality to be tested.

[0008] The initial electrical signal is generated by the detection light signal after it is processed by the water quality to be tested, and the initial electrical signal is preprocessed to obtain the target spectral data.

[0009] The target spectral data is input into the constructed interference correction model, and the core indicators of the water quality to be tested are determined by combining the calibration data.

[0010] The extended index data of the water quality to be tested are collected according to the extended index detection instructions, and the core index detection results and extended index data are integrated to generate a comprehensive detection result.

[0011] In one embodiment, an instrument calibration step is performed before emitting the probe light signal, including:

[0012] Blank baseline calibration was performed using standard blank samples to obtain blank spectral reference data for the water quality test.

[0013] Different concentration gradients of water quality standard solutions were used to perform spectral detection sequentially, and the original spectral data corresponding to each gradient standard solution were collected.

[0014] Baseline correction is performed on each original spectral data based on blank spectral reference data to obtain corrected standard spectral data.

[0015] Calibration curves for each water quality indicator are generated by fitting the corrected standard spectral data.

[0016] An interference correction model was constructed based on the corrected standard spectral data, and the interference compensation parameters corresponding to each water quality index were obtained by fitting and calculation.

[0017] A water quality standard solution of known concentration was used for spectral detection, and the measured values ​​were obtained.

[0018] The measured values ​​are compared with the calibrated concentration values ​​of the quality control standard solution. When the comparison error is within the preset allowable range, the calibration curve and interference compensation parameters are stored as calibration data.

[0019] In one embodiment, the disturbance compensation parameters corresponding to each water quality index are calculated through the following process:

[0020] An interference correction model with spectral linearity is constructed based on the corrected standard spectral data.

[0021] The expression for the interference correction model is:

[0022]

[0023] in, This indicates the absorbance after correction for the target water quality index. This represents the measured absorbance at multiple wavelengths. This indicates the absorbance affected by scattering interference from the water matrix. This represents the detection wavelength weighting coefficient. Indicates the first Cross-interference compensation coefficients for coexisting components Indicates the first Measured absorbance of the interfering components This represents the weighting coefficient of the interfering component.

[0024] Based on the corrected standard spectral data, the scattering interference value, the absorbance value of the interference component, and the wavelength characteristic value are separated and extracted, and then input into the interference correction model.

[0025] The interference compensation parameters are obtained by fitting and solving the wavelength weighting coefficient, interference compensation coefficient, and component weighting coefficient in the interference correction model.

[0026] In one embodiment, the target spectral data is input into a pre-constructed interference correction model, and the core indicators of the water quality to be tested are determined by combining the calibration data, including:

[0027] Extract the measured absorbance characteristics of the water quality under test at each detection wavelength from the target spectral data.

[0028] The measured absorbance characteristic value is input into the interference correction model, and the interference correction is calculated by combining the interference compensation parameters in the calibration data to obtain the corrected absorbance characteristic value.

[0029] Substitute the corrected absorbance characteristic value into the index calibration curve in the calibration data to calculate the initial concentration values ​​of each core index of the water quality to be tested.

[0030] The initial concentration value is compared with the preset water quality index concentration threshold range. When the initial concentration value is within the preset threshold range, the detection result of the core index of the water quality to be tested is obtained.

[0031] In one embodiment, extended index data of the water quality to be tested are collected according to the extended index detection instructions, and the core index detection results and extended index data are fused to generate a comprehensive detection result, including:

[0032] Collect extended index data of the water quality to be tested in accordance with the extended index testing instructions.

[0033] The extended indicator data is matched with the collection timestamps of the core indicator detection results to complete the time synchronization and alignment of multi-dimensional data.

[0034] Outlier removal is performed on the extended indicator data after time synchronization to obtain valid extended indicator data.

[0035] By effectively expanding the index data and linking it with the core index test results, a comprehensive test result of the water quality to be tested is generated.

[0036] Secondly, this application also provides a portable spectroscopic multi-index water quality detection system, the system comprising:

[0037] The detection instruction acquisition module is used to acquire detection instructions for the water quality to be tested; the detection instructions include core indicator detection instructions and extended indicator detection instructions.

[0038] The multi-wavelength light emission module is used to emit multi-wavelength and stable light signals to the water quality to be tested according to the core indicator detection instructions.

[0039] The spectral signal processing module is used to acquire the initial electrical signal generated by the detection light signal after it is processed by the water quality to be tested, and to preprocess the initial electrical signal to obtain the target spectral data.

[0040] The index calculation and fusion module is used to input the target spectral data into the constructed interference correction model, and combine it with calibration data to determine the detection results of the core index of the water quality to be tested; it is also used to collect the extended index data of the water quality to be tested according to the extended index detection instructions, and fuse the core index detection results and the extended index data to generate a comprehensive detection result.

[0041] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described above.

[0042] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned method.

[0043] The aforementioned portable spectroscopic multi-index water quality detection method, system, computer equipment, and storage medium first acquire the detection instructions for the water quality to be tested. These instructions explicitly include core index detection instructions and extended index detection instructions, providing clear guidance for subsequent detection processes. Based on the core index detection instructions, the detection equipment is controlled to emit multi-wavelength and stable-intensity detection light signals towards the water quality to be tested, ensuring the stability and specificity of the detection light signals and meeting the spectral requirements for multi-index detection. The initial electrical signal generated after the detection light signal is absorbed and scattered by the water quality to be tested is collected, and preprocessing operations such as noise reduction, signal amplification, and baseline correction are performed on the initial electrical signal. Interference signals are removed and signal quality is optimized to obtain target spectral data that meets the detection requirements. The target spectral data is then input into a pre-constructed and calibrated interference correction model. Combined with calibration data obtained from previous instrument calibration (including calibration curves and interference compensation parameters), the core indicators of the water quality to be tested are determined through processes such as spectral calculation, concentration fitting, and rationality verification. Subsequently, according to the extended indicator detection instructions, the original data of the extended indicators of the water quality to be tested are collected. After processing such as outlier removal and time synchronization, the effective extended indicator data is integrated and correlated with the core indicator detection results to generate a comprehensive detection result that fully reflects the water quality status.

[0044] This method effectively reduces the impact of water matrix scattering and cross-interference of coexisting components on the detection results by accurately processing the emission of multi-wavelength detection light signals and target spectral data, combined with the synergistic effect of interference correction models and calibration data. This improves the accuracy and stability of core indicator detection. At the same time, by synchronously detecting and fusing data of core and extended indicators, it overcomes the limitations of single indicator detection, and can comprehensively and accurately reflect the overall condition of the water quality to be tested. It meets the needs of rapid, multi-indicator, and high-precision water quality testing on site, and solves the problems of cumbersome process, limited detection dimensions, and insufficient accuracy of traditional detection methods. It is suitable for various application scenarios such as emergency monitoring of water environment and on-site screening. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 A flowchart of a portable spectroscopic multi-index water quality detection method provided in an embodiment of the present invention;

[0047] Figure 2The diagram below shows the structure of a portable spectroscopic multi-index water quality detection system provided in this embodiment of the invention. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0049] Secondly, the implementation environment of the embodiments of this application will be described. Exemplarily, this implementation environment includes a portable spectroscopic multi-index water quality testing instrument, a water sample to be tested, standard calibration substances, extended acquisition equipment, and auxiliary supporting devices. The various parts work together to fully realize the detection method and instrument functions of this application.

[0050] The portable spectroscopic multi-index water quality testing instrument described in this application integrates a core testing module, an expansion interface module, a data processing and storage module, a power supply module, and a human-computer interaction module. It is the core equipment for water quality testing and can be adapted to various testing scenarios such as field sites, laboratories, sewage outlets, and drinking water sources.

[0051] The substances used for testing and calibration include the water sample to be tested, standard blank samples (distilled water / deionized water), water quality index standard solutions and quality control standard solutions, which are used for instrument calibration, sample injection testing and verification of the validity of test results.

[0052] The extended acquisition equipment consists of RS-485 interface sensors adapted to the Modbus-RTU protocol, including one or more of the following: pH sensor, conductivity sensor, dissolved oxygen sensor, ammonia nitrogen sensor, and suspended solids sensor, used to extend the synchronous acquisition of water quality physicochemical indicators.

[0053] The auxiliary equipment includes a 5V / 12V external DC power supply, sample pretreatment filter, sampling instruments, detection cell cleaning solution, and data transmission terminal (computer, wireless gateway, etc.), providing support for the execution of the detection process, data storage, and transmission.

[0054] In one embodiment, such as Figure 1 As shown, this application provides a portable spectroscopic method for multi-index water quality detection, which may include the following steps:

[0055] Step S101: Obtain the testing instructions for the water quality to be tested; the testing instructions include core indicator testing instructions and extended indicator testing instructions.

[0056] Specifically, the human-machine interface module of the portable spectroscopic multi-index water quality analyzer receives and acquires the detection instructions for the water quality to be tested. These instructions can be manually set by the user through the touch screen or operation buttons, or they can be sent by an external data terminal through the communication interface. The detection instructions are parsed by the system into two categories: core index detection instructions and extended index detection instructions. The core index detection instructions are used to trigger the detection process of spectroscopically detectable indicators such as TOC, COD, BOD, TOD, color, turbidity, and sediment. The extended index detection instructions are used to trigger the acquisition process of externally detectable indicators such as pH, conductivity, dissolved oxygen, ammonia nitrogen, and suspended solids. The acquisition and parsing of instructions provide clear execution basis and target direction for subsequent modular and path-based execution of detection operations.

[0057] Step S102: Based on the core indicator detection command, a multi-wavelength and stable light detection signal is emitted to the water quality to be tested.

[0058] Furthermore, after parsing the core indicator detection command, the instrument's data processing and storage module sends a light source control signal to the core detection module, driving the multi-wavelength light source component to start working. This multi-wavelength light source component covers the deep ultraviolet 200-300nm and visible light 400-760nm ranges. Each wavelength light source is independently controllable, and the constant current drive circuit maintains the stability of the emitted light intensity, avoiding light intensity fluctuations from affecting the detection accuracy. The light source component matches the corresponding detection wavelength combination according to the core indicator detection command, and directionally emits multi-wavelength probe light signals to the water quality to be tested in the sample detection cell, so that the probe light and the water quality to be tested can fully absorb and scatter, providing stable light source input conditions for spectral signal acquisition.

[0059] Step S103: The initial electrical signal generated by the detection light signal after being converted by the water quality to be tested is collected, and the initial electrical signal is preprocessed to obtain the target spectral data.

[0060] Optionally, the semiconductor photoelectric sensor chip in the core detection module continuously collects the light signal transmitted after the detection light is absorbed and scattered by the water quality to be tested, and linearly converts the light signal into an initial electrical signal. This initial electrical signal is transmitted to the signal preprocessing unit, where preprocessing operations such as noise filtering, signal amplification, baseline correction, and analog-to-digital conversion are performed in sequence to remove invalid data such as environmental electromagnetic interference, circuit drift, and background noise, thereby improving the signal-to-noise ratio and standardization of the electrical signal. The preprocessed electrical signal is then uploaded to the data processing and storage module via the data transmission line, where it is converted into target spectral data that can be used for subsequent index calculations, completing the conversion and processing from an optical signal to an effective digital signal.

[0061] Step S104: Input the target spectral data into the constructed interference correction model, and combine it with the calibration data to determine the detection results of the core indicators of the water quality to be tested.

[0062] Specifically, the microprocessor of the data processing and storage module calls the built-in detection algorithm to import the target spectral data into the pre-built and instrument-calibrated interference correction model. At the same time, it retrieves calibration data such as calibration curves and interference compensation parameters generated during the instrument calibration stage. The interference correction model is used to eliminate the influence of matrix scattering interference and multi-component cross-interference in the water quality to be tested on the detection results. The microprocessor obtains the initial concentration values ​​of each core indicator of the water quality to be tested through operations such as spectral feature value extraction, interference correction calculation, and concentration fitting solution. Then, the initial concentration values ​​are compared and verified with the preset threshold range to finally determine the detection results of core indicators such as TOC, COD, BOD, and turbidity of the water quality to be tested.

[0063] Step S105: Collect extended index data of the water quality to be tested according to the extended index detection instructions, and integrate the core index detection results with the extended index data to generate a comprehensive detection result.

[0064] Specifically, based on the extended index detection instructions, the instrument establishes data communication with external extended acquisition devices such as pH sensors, conductivity sensors, dissolved oxygen sensors, and ammonia nitrogen sensors through the RS-485 interface of the extended interface module and the Modbus-RTU communication protocol, and collects raw data of extended indexes of the water quality to be tested in real time. The system matches and aligns the core index detection results with the extended index data according to the acquisition timestamp, completes the synchronous integration of multi-dimensional detection data, removes outliers in the raw data of extended indexes, and fuses the spectral core indexes with the physicochemical extended indexes to generate a comprehensive detection result containing all detection indicators. This result can be displayed, stored, or transmitted to an external terminal through the human-computer interaction module or the communication interface.

[0065] The aforementioned portable spectroscopic multi-index water quality detection method first acquires detection commands containing core and extended indicators; based on the core indicator detection commands, it emits stable multi-wavelength probe light, collects the initial electrical signals converted from the optical signals, and preprocesses them to obtain target spectral data; the target spectral data is input into a calibrated interference correction model, and the core indicator detection results are calculated by combining the calibration data; then, extended indicator data is collected and fused with the core indicator data to generate a comprehensive detection result. This method, through the synergy of multi-wavelength spectral detection and interference correction model, reduces matrix scattering and component cross-interference, improving detection accuracy and stability; through the fusion of core and extended indicator data, it achieves multi-dimensional comprehensive detection, meeting the needs of rapid and high-precision on-site detection, and is suitable for emergency monitoring and on-site screening scenarios in the water environment.

[0066] In one embodiment, an instrument calibration step is performed before emitting the probe light signal, which may include:

[0067] Step S201: Perform blank baseline calibration using standard blank samples to obtain blank spectral reference data for the water quality test.

[0068] In step S202, standard solutions of various water quality indicators with different concentration gradients are used to perform spectral detection in sequence, and the original spectral data corresponding to each gradient standard solution are collected.

[0069] Step S203: Baseline correction is performed on each original spectral data based on blank spectral reference data to obtain corrected standard spectral data.

[0070] Step S204: Based on the corrected standard spectral data, a calibration curve for each water quality index is generated by fitting.

[0071] Step S205: Construct an interference correction model based on the corrected standard spectral data, and calculate the interference compensation parameters corresponding to each water quality index.

[0072] Step S206: Use a water quality standard solution of known concentration for spectral detection and obtain the measured value.

[0073] Step S207: Compare the measured detection value with the calibrated concentration value of the quality control standard solution. When the comparison error is within the preset allowable range, store the calibration curve and interference compensation parameters as calibration data.

[0074] Specifically, blank baseline calibration is first performed using standard blank samples such as distilled water or deionized water. Blank spectral acquisition is completed using the instrument's multi-wavelength light source component and semiconductor photoelectric sensor chip to obtain blank spectral reference data for subsequent data correction, thereby eliminating systematic errors caused by instrument optical paths, circuits, and environmental background. Then, standard solutions of water quality indicators such as TOC, COD, BOD, and turbidity at different concentration gradients are selected and sequentially placed in the sample detection cell for spectral detection, acquiring the raw spectral data of each concentration gradient standard solution at the corresponding detection wavelength. Using the blank spectral reference data as the calibration benchmark, baseline correction processing is performed on the raw spectral data of each gradient standard solution to remove background signal interference, obtaining pure corrected standard spectral data. Based on the corrected standard spectral data, a linear fitting algorithm is used to generate concentration-absorbance calibration curves for each water quality indicator, providing a quantitative basis for subsequent sample concentration calculation. Simultaneously, based on the corrected standard spectral data, an interference correction model for matrix scattering and component cross-interference is constructed, and the interference compensation parameters corresponding to each water quality indicator are calculated through numerical fitting. After the model and curves are constructed, the water quality index standard solution with known calibrated concentration is used for spectral detection to obtain the measured value of the quality control sample. The measured value is compared with the calibrated concentration value for error. When the comparison error is within the preset allowable range, the calibration process is deemed valid. The calibration curves and interference compensation parameters of each index are stored as standardized calibration data in the data processing and storage module for use in actual sample testing.

[0075] This embodiment eliminates instrument system errors at the source through blank baseline calibration, ensuring the accuracy of the data benchmark. It relies on fitting calibration curves with multi-concentration gradient standard solutions to ensure the linearity and accuracy of actual sample concentration calculations. An interference correction model quantifies the fitting interference compensation parameters and pre-anchors correction rules for water matrix scattering and multi-component cross-interference, providing core support for interference elimination in actual detection. An added quality control verification step directly verifies the validity of calibration data, avoiding deviations in detection results caused by invalid calibration data. This continuously ensures the detection accuracy, stability, and repeatability of the portable spectroscopic water quality testing instrument, providing standardized data support for simultaneous multi-indicator detection in the field, and adapting to the long-term stable use requirements of various field testing environments such as the field, sewage outlets, and drinking water sources.

[0076] In one embodiment, the disturbance compensation parameters corresponding to each water quality index can be calculated through the following process:

[0077] Step S301: Construct a spectral linearity interference correction model based on the corrected standard spectral data.

[0078] The expression for the interference correction model is as follows:

[0079]

[0080] in, This indicates the absorbance after correction for the target water quality index. This represents the measured absorbance at multiple wavelengths. This indicates the absorbance affected by scattering interference from the water matrix. This represents the detection wavelength weighting coefficient. Indicates the first Cross-interference compensation coefficients for coexisting components Indicates the first Measured absorbance of the interfering components This represents the weighting coefficient of the interfering component.

[0081] Step S302: Based on the corrected standard spectral data, separate and extract the scattering interference value, the absorbance value of the interference component and the wavelength characteristic value, and input them into the interference correction model.

[0082] Step S303: Fit and solve the wavelength weighting coefficient, interference compensation coefficient and component weighting coefficient in the interference correction model to obtain the interference compensation parameters.

[0083] Specifically, based on the standard spectral data after baseline correction and background removal, a spectral linear interference correction model suitable for multi-wavelength spectral detection is constructed. This model is used to simultaneously eliminate the dual interference caused by matrix scattering and coexisting components in water quality detection. From the corrected standard spectral data, the scattering interference values, absorbance values ​​of various coexisting interference components, and characteristic values ​​of each detection wavelength are extracted from the spectral feature separation algorithm. The extracted feature data are then used as inputs into the interference correction model. The model is iteratively solved using numerical fitting algorithms such as the least squares method to calculate the wavelength weight coefficient, the coexisting component cross-interference compensation coefficient, and the interference component weight coefficient. These coefficients are then standardized into interference compensation parameters for subsequent interference correction calculations in actual water sample detection.

[0084] This embodiment's interference correction model is based on spectral linearity and designed for practical scenarios of portable multi-wavelength water quality testing. It can simultaneously quantify and correct both water matrix scattering interference and multi-component cross-interference, overcoming the limitations of traditional single-factor correction models. By setting dual coefficients for wavelength and component weights, it adapts to the multi-wavelength detection characteristics from deep ultraviolet to visible light, improving the model's compatibility with multi-index detection processes. Feature extraction and coefficient fitting are performed using standard spectral data, ensuring the accuracy and reliability of interference compensation parameters. In actual water sample testing, these parameters can be directly called to complete rapid interference correction, effectively reducing the interference of complex aquatic environments on detection results. This significantly improves the accuracy, stability, and repeatability of water quality index detection, providing stable algorithmic support for the field application of portable spectroscopic multi-index water quality testing.

[0085] In one embodiment, inputting the target spectral data into the constructed interference correction model and combining it with calibration data to determine the detection results of the core indicators of the water quality to be tested may include the following steps:

[0086] Step S401: Extract the measured absorbance characteristic values ​​of the water quality to be tested at each detection wavelength from the target spectral data.

[0087] Step S402: Input the measured absorbance characteristic value into the interference correction model, and perform interference correction calculation by combining the interference compensation parameters in the calibration data to obtain the corrected absorbance characteristic value.

[0088] Optionally, the microprocessor of the data processing and storage module extracts the multi-wavelength measured absorbance characteristic values ​​from the target spectral data. Import the pre-built and calibrated spectral linear interference correction model, and simultaneously retrieve the detection wavelength weighting coefficients contained in the calibration data. , No. Cross-interference compensation coefficient of coexisting components Interference component weighting coefficient Equal interference compensation parameters, combined with the water matrix scattering interference absorbance built into the model. , No. Measured absorbance of interfering components According to the model expression The quantization process eliminates the effects of matrix scattering and multi-component cross-interference in the water sample, outputting accurate corrected absorbance characteristic values. .

[0089] Step S403: Substitute the corrected absorbance characteristic value into the index calibration curve in the calibration data to calculate the initial concentration values ​​of each core index of the water quality to be tested.

[0090] Optionally, the microprocessor will correct the absorbance characteristic value. Substitute the concentration-absorbance calibration curves of the corresponding water quality indicators into the calibration data one by one. These calibration curves are the standard linear equations obtained in the previous step by fitting with gradient standard solutions. (in For water quality index concentration, To calibrate the slope of the curve, The initial concentration values ​​of the core indicators of the water quality to be tested, such as TOC, COD, BOD, turbidity, and color, were obtained by calculating the intercepts of the calibration curves (all of which are fixed fitting coefficients determined during the calibration phase) through equations. .

[0091] Step S404: Compare the initial concentration value with the preset water quality index concentration threshold range. When the initial concentration value is within the preset threshold range, the detection result of the core index of the water quality to be tested is obtained.

[0092] The microprocessor sets the initial concentration values ​​of various core indicators. Compared with the system's preset water quality index concentration threshold range Perform a step-by-step comparison of the values, when the initial concentration value meets the requirements... If the initial concentration value exceeds the preset threshold range, it is determined to be valid data, and the valid initial concentration value is determined as the final core indicator detection result of the water quality to be tested. If the initial concentration value exceeds the preset threshold range, it is determined to be abnormal data, so as to ensure the validity and reliability of the final test result.

[0093] Specifically, from the target spectral data of the water quality under test, after noise cancellation, signal amplification, and baseline correction, the spectral feature extraction algorithm of the data processing and storage module accurately extracts the measured absorbance feature values ​​corresponding to each detection wavelength of the water quality under test at deep ultraviolet 200-300nm and visible light 400-760nm. These measured absorbance feature values ​​are then input into a pre-constructed and calibrated spectral linear interference correction model. The model calls upon interference compensation parameters, including wavelength weighting coefficients, coexisting component cross-interference compensation coefficients, and interfering component weighting coefficients, from the calibration data. The model then performs calculations to correct water matrix scattering interference and multi-component cross-interference. The quantitative correction calculation for interference eliminates the influence of interference factors on the optical signal, resulting in a pure corrected absorbance characteristic value. This corrected absorbance characteristic value is then substituted one by one into the concentration-absorbance calibration curve of the corresponding water quality indicator in the calibration data. Linear fitting is used to calculate the initial concentration values ​​of various core indicators of the water quality to be tested, including TOC, COD, BOD, turbidity, color, and sediment. The initial concentration values ​​of each core indicator are then compared one by one with the system's preset water quality indicator concentration threshold range. When the initial concentration value is within the preset threshold range, the set of detection data is deemed valid. Finally, the detection results of various core indicators of the water quality to be tested are determined and output.

[0094] This embodiment ensures the matching of detection data and indicators through multi-wavelength absorbance feature extraction, and achieves accurate elimination of dual interference from complex water bodies by relying on interference correction models and interference compensation parameters, thereby improving the accuracy of basic detection data from the source. The calibration curve completes the standardized conversion from optical feature values ​​to concentration values, ensuring the consistency and comparability of multi-indicator detection results. The automatic screening and elimination of abnormal data is achieved through concentration threshold range comparison and verification, avoiding invalid data from affecting the final detection conclusion. The entire process is logically rigorous and has a closed data loop, which significantly improves the detection accuracy, data stability and result reliability of portable spectroscopic multi-indicator water quality detection, and can be adapted to the needs of simultaneous multi-indicator detection in complex water environments such as field sites, sewage outlets, and drinking water sources.

[0095] In one embodiment, collecting extended index data of the water quality to be tested according to the extended index detection instruction, and integrating the core index detection results with the extended index data to generate a comprehensive detection result may include the following steps:

[0096] Step S501: Collect extended index data of the water quality to be tested according to the extended index detection instructions.

[0097] Step S502: Match the collection timestamps of the extended indicator data with the core indicator detection results to complete the multi-dimensional data time synchronization alignment.

[0098] Step S503: Perform outlier removal processing on the time-synchronized extended indicator data to obtain valid extended indicator data.

[0099] Optionally, the system performs outlier identification and removal processing on the extended index data that has completed the time stamp synchronization matching. Based on the rated detection range, preset data fluctuation range and normal signal characteristics of external sensors such as pH, conductivity, and dissolved oxygen, abnormal data such as exceeding the range, instantaneous changes, continuous missing data, and transmission interference are screened out. Invalid data points are removed through numerical verification and filtering algorithms, and extended index data that meet the detection standards and are stable are retained, thus obtaining valid extended index data.

[0100] Step S504 involves integrating and correlating the effective extended indicator data with the core indicator test results to generate a comprehensive test result for the water quality to be tested.

[0101] The system uses the same test sample and the same collection timestamp as the basis for association, and integrates the effective extended index data with the test results of the core index of the water quality to be tested one by one. According to the standardized data structure, the spectral core index and the physicochemical extended index are classified, collected and formatted in a unified manner, and the multi-dimensional test data is organically bound together. Finally, a comprehensive test result containing core index and extended index is generated, which can comprehensively reflect the overall condition of the water quality to be tested, and is used for subsequent display, storage and data transmission.

[0102] Specifically, following the extended index detection instructions parsed by the system, the extended interface module of the portable spectroscopic multi-index water quality testing instrument establishes a data transmission link with external extended acquisition devices for pH, conductivity, dissolved oxygen, ammonia nitrogen, suspended solids, etc., using the Modbus-RTU communication protocol, to collect the raw data of the extended indexes corresponding to the water quality to be tested in real time. The acquisition timestamps of the acquired extended index data are precisely matched with the acquisition timestamps of the core index detection results to achieve multi-dimensional data time synchronization and alignment of the spectral core indexes and physicochemical extended indexes, ensuring that the detection sequence of the two sets of detection data is consistent with the detection object. Outlier identification and rejection processing is performed on the time-synchronized extended index data to filter out invalid data such as those exceeding the equipment detection range, data mutations, and signal missing, obtaining valid extended index data that meets the detection standards. The valid extended index data and the core index detection results are integrated and associated one by one according to the detection sample and detection time to construct a complete data set containing multiple types of detection indicators, generating detection results that comprehensively reflect the overall condition of the water quality to be tested.

[0103] This embodiment ensures the stability of extended indicator data acquisition through standardized communication and interface design, eliminates timing deviations in multi-module and multi-device detection by relying on timestamp matching, and improves the effectiveness of extended indicator data by outlier removal. By fusing core indicators and extended indicators, it compensates for the lack of indicator dimensions in single-spectrum detection, forming a comprehensive and integrated water quality detection result, improving the comprehensiveness and practicality of the detection data. It can meet the needs of simultaneous detection of multiple indicators on site, providing complete and reliable data support for water environment monitoring, pollution source tracing, and water quality assessment.

[0104] In one embodiment, such as Figure 2 As shown, this application also provides a portable spectroscopic multi-index water quality detection system, which may include:

[0105] The detection instruction acquisition module 601 is used to acquire the detection instructions for the water quality to be tested; the detection instructions include core indicator detection instructions and extended indicator detection instructions.

[0106] The multi-wavelength light emission module 602 is used to emit multi-wavelength and stable light signals to the water quality to be tested according to the core indicator detection command.

[0107] The spectral signal processing module 603 is used to acquire the initial electrical signal generated after the detection light signal is converted by the water quality to be tested, and to preprocess the initial electrical signal to obtain the target spectral data.

[0108] The index calculation and fusion module 604 is used to input the target spectral data into the constructed interference correction model, and combine it with calibration data to determine the detection results of the core index of the water quality to be tested; it is also used to collect the extended index data of the water quality to be tested according to the extended index detection instructions, and fuse the core index detection results and the extended index data to generate a comprehensive detection result.

[0109] The aforementioned portable spectroscopic multi-index water quality detection system adopts a modular functional design, including a detection command acquisition module, a multi-wavelength light emission module, a spectral signal processing module, and an index calculation and fusion module. The detection command acquisition module is responsible for acquiring the detection commands for the water quality to be tested and breaking them down into core indicator detection commands and extended indicator detection commands, providing a clear execution basis for subsequent detection processes. The multi-wavelength light emission module emits multi-wavelength probe light signals with stable intensity, covering the deep ultraviolet to visible light range, to the water quality to be tested based on the core indicator detection commands, providing a stable light source input for spectral absorption detection. The spectral signal processing module collects the initial electrical signal generated after the probe light signal is absorbed and scattered by the water quality to be tested, performs preprocessing operations such as noise filtering, signal amplification, and baseline correction on the initial electrical signal, and outputs standardized target spectral data that can be used for indicator calculation. The indicator calculation and fusion module inputs the target spectral data into a pre-built interference correction model, combines it with calibration data to complete the calculation of the core indicator detection results of the water quality to be tested, and simultaneously completes the acquisition of extended indicator data based on the extended indicator detection commands. Through data time synchronization, outlier processing, and multi-dimensional data correlation and fusion, a comprehensive detection result reflecting the water quality status to be tested is generated.

[0110] This embodiment's system architecture achieves seamless collaboration across the entire process, from detection command parsing and light source control to spectral signal processing, index calculation, and data fusion. Each module has a clear division of labor, and data transmission is seamless, enhancing system stability and maintainability. Through multi-wavelength stable light source emission and standardized spectral signal preprocessing, the accuracy of basic detection data is ensured. Combined with interference correction models and calibration data, detection interference is effectively reduced, improving the accuracy of core index detection. The integrated calculation and fusion of core and extended indices expands the dimensions of water quality detection, enabling simultaneous detection of multiple indices on a single device. This meets the needs for portable, rapid, and comprehensive water quality testing on-site, providing efficient and reliable system support for on-site water environment monitoring and water quality assessment.

[0111] In one embodiment, this application also provides a portable spectroscopic method for on-site measurement of multiple water quality indicators, which may include:

[0112] First, a blank baseline calibration is performed using distilled water. Then, calibration curve fitting and interference correction model parameter calibration are completed using COD and turbidity gradient standard solutions. After the calibration data is verified to be valid by quality control standard solutions, the detection command for the water sample to be tested is obtained. The command includes the detection of core indicators such as COD and turbidity, as well as extended indicators such as pH and conductivity. The instrument is controlled to emit stable multi-wavelength probe light at 254nm and 546nm, and the initial electrical signal converted from the optical signal is collected. After noise filtering and baseline correction, the target spectral data is obtained. The target spectral data is substituted into the interference correction model to complete the correction calculation, and the detection results of the core indicators of COD and turbidity are obtained by combining the calibration curve. The pH and conductivity extended indicator data are collected through the RS-485 interface. After time synchronization and outlier removal, the data are fused with the core indicator data to generate a comprehensive detection result including spectral and physicochemical indicators, which is displayed in real time.

[0113] In one embodiment, this application also provides a portable method for automatic archiving and tracing of multi-index water quality test results using spectroscopic methods, which may include:

[0114] After generating comprehensive test results, the system automatically binds the sampling time, sampling location, instrument number, and calibration status information to the data set. The core indicator test results, effective extended indicator data, and comprehensive test results are classified and stored in the data processing and storage module according to a standardized format, supporting historical data retrieval by time, indicator type, and sampling point. At the same time, an exportable test report is generated, recording the complete test process and parameter information, realizing full archiving and traceability management of test data.

[0115] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0116] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the portable spectroscopic multi-index water quality detection method as described above.

[0117] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0118] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0119] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.

Claims

1. A portable multi-index water quality detection method by spectroscopy, characterized in that, The method includes: Obtain the testing instructions for the water quality to be tested; the testing instructions include core indicator testing instructions and extended indicator testing instructions; According to the core indicator detection command, a multi-wavelength and stable light detection signal is emitted to the water quality to be tested; The initial electrical signal generated by the detection light signal after being processed by the water quality to be tested is collected, and the initial electrical signal is preprocessed to obtain the target spectral data; The target spectral data is input into the constructed interference correction model, and the core indicator detection results of the water quality to be tested are determined by combining the calibration data. The extended index data of the water quality to be tested are collected according to the extended index detection instructions, and the core index detection results and the extended index data are integrated to generate a comprehensive detection result.

2. The method of claim 1, wherein, Before emitting the probe light signal, an instrument calibration procedure is also performed, including: Blank baseline calibration was performed using standard blank samples to obtain blank spectral reference data for the water quality test. Different concentration gradients of water quality standard solutions were used to perform spectral detection in sequence, and the original spectral data corresponding to each gradient standard solution were collected. Based on the blank spectral reference data, baseline correction is performed on each of the original spectral data to obtain the corrected standard spectral data; Calibration curves for each water quality index are generated by fitting the corrected standard spectral data. Based on the corrected standard spectral data, an interference correction model is constructed, and the interference compensation parameters corresponding to each water quality index are calculated by fitting. Spectroscopic detection was performed using water quality standard solutions of known concentrations to obtain measured values. The measured detection value is compared with the calibrated concentration value of the quality control standard solution. When the comparison error is within the preset allowable range, the calibration curve and the interference compensation parameter are stored as calibration data.

3. The method of claim 2, wherein, The disturbance compensation parameters corresponding to each water quality indicator are calculated through the following process: An interference correction model for spectral linearity is constructed based on the corrected standard spectral data; The expression for the interference correction model is: wherein, represents the target water quality index corrected absorbance, represents the multi-wavelength measured absorbance, represents the water quality matrix scattering interference absorbance, represents the detection wavelength weight coefficient, represents the first coexisting component cross interference compensation coefficient, represents the first interfering component measured absorbance, represents the interfering component weight coefficient; Based on the corrected standard spectral data, the scattering interference value, the absorbance value of the interference component, and the wavelength characteristic value are separated and extracted, and then input into the interference correction model. The interference compensation parameters are obtained by fitting and solving the wavelength weighting coefficient, interference compensation coefficient, and component weighting coefficient in the interference correction model.

4. The method of claim 1, wherein, The step of inputting the target spectral data into the constructed interference correction model and combining it with calibration data to determine the detection results of the core indicators of the water quality to be tested includes: Extract the measured absorbance characteristic values ​​of the water quality to be tested at each detection wavelength from the target spectral data; The measured absorbance characteristic value is input into the interference correction model, and the interference correction is calculated by combining the interference compensation parameters in the calibration data to obtain the corrected absorbance characteristic value. Substitute the corrected absorbance characteristic value into the index calibration curve in the calibration data to calculate the initial concentration values ​​of each core index of the water quality to be tested. The initial concentration value is compared with the preset water quality index concentration threshold range. When the initial concentration value is within the preset threshold range, the detection result of the core index of the water quality to be tested is obtained.

5. The method of claim 1, wherein, The step of collecting extended index data of the water quality to be tested according to the extended index detection command, and integrating the core index detection results with the extended index data to generate a comprehensive detection result includes: Collect extended index data of the water quality to be tested according to the extended index detection instructions; The extended indicator data is matched with the collection timestamp of the core indicator detection results to complete the multi-dimensional data time synchronization and alignment. Outlier removal is performed on the time-synchronized extended indicator data to obtain valid extended indicator data. The effective extended indicator data is integrated and correlated with the core indicator detection results to generate a comprehensive detection result for the water quality to be tested.

6. A portable multi-index water quality detection system based on spectroscopy, characterized in that, The system includes: The detection instruction acquisition module is used to acquire the detection instructions for the water quality to be tested; the detection instructions include core indicator detection instructions and extended indicator detection instructions. A multi-wavelength light emission module is used to emit multi-wavelength and stable light signals to the water quality to be tested according to the core indicator detection command. The spectral signal processing module is used to acquire the initial electrical signal generated after the detection light signal is processed by the water quality to be tested, and to preprocess the initial electrical signal to obtain the target spectral data; The index calculation and fusion module is used to input the target spectral data into the constructed interference correction model, and combine it with calibration data to determine the detection results of the core index of the water quality to be tested; it is also used to collect the extended index data of the water quality to be tested according to the extended index detection instructions, and fuse the core index detection results with the extended index data to generate a comprehensive detection result. 7.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-6 when the computer program is executed by the processor. When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.