Water quality detection control method and equipment based on spectrophotometer, medium and product

By combining adaptive photometric scanning detection with photometric value calculation formulas, the problem of insufficient reliability of spectrophotometers in different water quality sample detection environments is solved, thereby improving the accuracy and reliability of water quality detection.

CN121298643APending Publication Date: 2026-01-09SHANGHAI YOKE INSTR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511723981.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-22
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

In existing technologies, spectrophotometers with fixed parameter configurations cannot adapt to differences in the optical properties of samples when faced with different types of water quality samples or changes in the detection environment. This leads to a decrease in the accuracy and stability of water quality detection data and affects the reliability of the detection.

Method used

By acquiring the multi-wavelength photometric value calculation formula input by the operator, a baseline photometric scan detection is performed. Combined with signal quality analysis, detection scan interval parameters are dynamically generated for adaptive photometric scan detection. The photometric value calculation formula is then used for precise calculation to generate audit trail records.

Benefits of technology

This improves the accuracy and reliability of spectrophotometer water quality testing, ensures data reliability and traceability, and solves the problem of poor testing reliability under fixed parameter configurations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121298643A_ABST
    Figure CN121298643A_ABST
Patent Text Reader

Abstract

The invention provides a water quality detection control method and device based on a spectrophotometer, a medium and a product, and relates to the technical field of water quality detection.The method comprises the steps that a luminosity value calculation formula which is input by an operator and comprises a plurality of detection wavelengths is obtained, controlling the target spectrophotometer to carry out reference luminosity scanning detection on the standard water quality sample according to a plurality of detection wavelengths to obtain an initial luminosity value under each detection wavelength; performing signal quality analysis on the initial luminosity value to obtain a detection scanning interval parameter, and controlling the target spectrophotometer to perform adaptive luminosity scanning detection on the water quality sample to be detected according to the detection scanning interval parameter to obtain a target luminosity value; and calculating the target luminosity value by using a luminosity value calculation formula to obtain a quantitative analysis result of the water quality sample to be detected. And performing time sequence permission association processing on the quantitative analysis result, the plurality of detection wavelengths, the detection scanning interval parameter and the identity information of the operator to generate an audit tracking record.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of water quality detection, and particularly relates to a water quality detection control method and device based on a spectrophotometer, a medium and a product. BACKGROUND

[0002] With the continuous enhancement of environmental protection consciousness and the increasingly strict water quality safety standards, the spectrophotometer as a core device for water quality detection plays an increasingly important role in the fields of environmental monitoring, industrial production and scientific research. The spectrophotometric technology has become an indispensable technical means in water quality analysis due to its rapid, accurate and non-destructive detection characteristics, and has important significance for ensuring drinking water safety, industrial wastewater treatment and environmental pollution monitoring.

[0003] In the related technology, the water quality detection control of the spectrophotometer usually adopts a detection control mode of fixed parameter configuration. Specifically, in the detection initialization stage, the spectrophotometer automatically configures the basic parameters of the spectrophotometer including the light source stabilization time, the detector response time and the baseline correction parameters according to a preset standard operation procedure, and then performs photometric scanning detection on the water quality sample according to a fixed wavelength sequence; in the data acquisition link, the light intensity signals under each wavelength are continuously collected according to a fixed sampling frequency, the original photoelectric signals are amplified, filtered and analog-digital converted by a signal conditioning circuit, and the digitalized absorbance data are obtained; in the data processing stage, the absorbance data are converted into concentration data of each water quality index by using a preset algorithm; and in the result output aspect, the concentration data are stored in association with the detection time stamp in a database, and the detection results are transmitted to an external system through a display interface or a communication interface.

[0004] However, when the above-mentioned detection control mode of fixed parameter configuration is used, the preset fixed parameter configuration cannot adapt to the actual detection requirements of the difference of the sample optical characteristics when facing different types of water quality samples or changes in the detection environment, thereby causing the accuracy and stability of the water quality detection data to decrease, and further causing the reliability of the water quality detection of the spectrophotometer in the related technology to be poor. SUMMARY

[0005] The present application provides a water quality detection control method and device based on a spectrophotometer, a medium and a product, for improving the reliability of the water quality detection of the spectrophotometer.

[0006] In a first aspect, this application provides a water quality detection and control method based on a spectrophotometer, applied to the aforementioned electronic device. The method includes: acquiring a photometric value calculation formula input by the operator, comprising multiple detection wavelengths, and controlling a target spectrophotometer to perform a baseline photometric scan of a standard water quality sample according to the multiple detection wavelengths, obtaining initial photometric values ​​at each detection wavelength; performing signal quality analysis on the initial photometric values ​​to obtain detection scan interval parameters, and controlling the target spectrophotometer to perform adaptive photometric scan detection of the water quality sample to be tested according to the detection scan interval parameters, obtaining a target photometric value; calculating the target photometric value using the photometric value calculation formula to obtain a quantitative analysis result of the water quality sample to be tested; and performing time-series permission association processing on the quantitative analysis result, multiple detection wavelengths, detection scan interval parameters, and the operator's identity information to generate an audit trail record.

[0007] By adopting the above technical solution, the multi-wavelength photometric value calculation formula input by the operator is obtained, enabling customized detection schemes based on the characteristics of different water quality samples. Based on signal quality analysis of the initial photometric value, the optimal detection scanning interval parameters are dynamically generated, allowing the detection process to adaptively adjust according to sample characteristics. The target photometric value obtained through adaptive photometric scanning is combined with the photometric value calculation formula for precise calculation, effectively improving the accuracy of quantitative analysis results. Through a time-series permission association processing mechanism, the entire detection process data is linked to the operator's identity information, forming a complete audit trail record to ensure data reliability and traceability. This solves the technical problem of poor reliability of spectrophotometers for water quality detection in related technologies, achieving the technical effect of improving the reliability of spectrophotometers for water quality detection.

[0008] In a second aspect, embodiments of this application provide an electronic device comprising: one or more processors and a memory; the memory is coupled to one or more processors and is used to store computer program code, the computer program code including computer instructions, wherein one or more processors invoke the computer instructions to cause the electronic device to perform the method described in the first aspect and any possible implementation thereof.

[0009] Thirdly, embodiments of this application provide a computer program product containing instructions that, when the computer program product is run on an electronic device, cause the electronic device to perform the method described in the first aspect and any possible implementation thereof.

[0010] Fourthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform the method described in the first aspect and any possible implementation thereof. Attached Figure Description

[0011] Figure 1 is a flowchart of a water quality detection control method based on a spectrophotometer in an embodiment of the present application; Figure 2 is a back structure diagram of a spectrophotometer in an embodiment of the present application; Figure 3 is a physical device structure diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0012] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification and the appended claims of the present application, the singular forms "a," "an" and "the" are intended to include both singular and plural forms, unless the context clearly indicates otherwise. It will be further understood that the terms "and / or" as used herein refers to any or all possible combinations of one or more of the associated listed items.

[0013] Hereinafter, the terms "first" and "second" are only for the purpose of description and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified.

[0014] The present application provides a water quality detection control method based on a spectrophotometer, referring to Figure 1 , Figure 1 is a flowchart of a water quality detection control method based on a spectrophotometer in an embodiment of the present application, comprising the following steps: Step S101, obtaining the photometric value calculation formula input by the operator including a plurality of detection wavelengths, and controlling the target spectrophotometer to perform reference photometric scanning detection on the standard water quality sample according to the plurality of detection wavelengths to obtain the initial photometric value under each detection wavelength; Step S102, performing signal quality analysis on the initial photometric value to obtain the detection scanning interval parameter, and controlling the target spectrophotometer to perform adaptive photometric scanning detection on the water quality sample to be measured according to the detection scanning interval parameter to obtain the target photometric value; Step S103, performing operation on the target photometric value by using the photometric value calculation formula to obtain the quantitative analysis result of the water quality sample to be measured; Step S104, performing time sequence permission association processing on the quantitative analysis result, the plurality of detection wavelengths, the detection scanning interval parameter and the identity information of the operator to generate an audit tracking record.

[0015] The photometric value calculation formula represents the mathematical expression used to convert photometric detection values ​​into water quality index concentrations; the detection wavelength refers to the specific light wave frequency used by the spectrophotometer for spectral detection, specifically including the ultraviolet band (200-400nm), the visible light band (400-700nm), and the near-infrared band (700-1000nm); the reference photometric scan detection represents the process of spectral intensity detection of standard samples with known concentrations, specifically including single-wavelength fixed-point scanning, multi-wavelength continuous scanning, and full-spectrum scanning; the initial photometric value represents the unprocessed light intensity data directly output by the spectrophotometer, specifically including transmitted light intensity, absorbed light intensity, and scattered light intensity; signal quality analysis represents the data processing process of noise assessment and validity judgment of photometric detection data, specifically including signal-to-noise ratio calculation, baseline drift analysis, and spectral interference identification; the detection scan interval parameter represents the parameters used to control the accuracy and speed of spectral scanning, specifically including wavelength step interval, product... The parameters include time settings, scanning rate parameters, etc.; adaptive photometric scanning detection refers to an intelligent detection method that dynamically adjusts detection parameters according to sample characteristics, specifically including adaptive wavelength selection, adaptive sampling time adjustment, and adaptive light source intensity control; target photometric value refers to high-quality spectral data obtained after adaptive optimization, specifically including photometric values ​​after noise suppression, photometric values ​​after baseline correction, and photometric values ​​after interference elimination; quantitative analysis results are used to represent the final detection data of target substances in water samples (corresponding to the above-mentioned water samples to be tested), specifically including concentration values, detection uncertainty assessment, and quality control level identification; time-series permission association processing represents the process of securely managing data according to time sequence and permission level, specifically including timestamp marking processing, user permission verification processing, and data access control processing; audit trail records refer to quality management records that include complete operation history and data traceability information, specifically including operation log records, data change records, and permission usage records.

[0016] In the above embodiment, it is assumed that a UV-Vis spectrophotometer is used to detect the total phosphorus content in drinking water. Operator Zhang (ID number: OP001) selects the total phosphorus detection item through the user settings module and retrieves the default calculation formula template based on the molybdenum blue colorimetric method from the standard curve library. This default calculation formula template is based on the Lambert-Beer law, and its mathematical expression is: C=(Ab) / k, where C represents the total phosphorus concentration (mg / L), A represents the absorbance value, b represents the intercept constant 0.005, and k represents the slope constant 0.0234. The operator customizes the default formula according to the laboratory standard operating procedure (SOP), adjusting the slope constant to 0.0241 and the intercept constant to 0.003, forming the photometric value calculation formula: C=(A-0.003) / 0.0241. The photometric value calculation formula was subjected to syntax and logic verification to confirm the reasonableness of the parameter range (slope constant within the range of 0.02-0.03, intercept constant within the range of 0-0.01). After successful verification, the photometric value calculation formula was stored in a custom curve library, and a unique formula identifier "TP_2024_001" was generated. Based on the multiple detection wavelength requirements for total phosphorus detection, a scanning control sequence containing three key wavelengths was generated: main detection wavelength 700nm (maximum absorption wavelength of molybdenum blue complex), reference wavelength 800nm ​​(to eliminate turbidity interference), and background wavelength 650nm (for baseline correction). The acquisition time for each wavelength was set to 2 seconds, and the scanning sequence followed an increasing wavelength order. The light source intensity parameter was set to 85% of the tungsten lamp current intensity. The tungsten lamp light source system of the target spectrophotometer was preheated and stabilized for 15 minutes. During the preheating process, the light intensity fluctuation rate was continuously monitored. When the light intensity fluctuation rate at the 700nm wavelength dropped below 0.2% and remained stable for 5 minutes, the preset stabilization condition was met. Subsequently, photometric scanning was performed on a standard water sample with a concentration of 0.5 mg / L potassium dihydrogen phosphate according to the scanning control sequence. The spectrophotometer output a raw photometric value of 1.2456 V at 700 nm, 1.1234 V at 800 nm, and 1.1890 V at 650 nm. Data quality optimization processing was performed on these multiple sets of raw photometric values, including 5-point smoothing filtering and outlier removal, resulting in initial photometric values ​​of 1.2445 V at 700 nm, 1.1228 V at 800 nm, and 1.1885 V at 650 nm.

[0017] In the above embodiment, the initial photometric values ​​are then subjected to signal quality analysis. First, based on preset signal quality indicators (signal-to-noise ratio greater than 100:1, baseline stability less than 0.001 absorbance units), the initial photometric values ​​are screened across the entire wavelength band. By calculating the signal-to-noise ratio at each wavelength, the ratios are 156:1 at 700nm, 142:1 at 800nm, and 134:1 at 650nm, all meeting the quality requirements, thus determining the effective wavelength range as 650-800nm. Signal features are extracted from the initial photometric values ​​within the effective wavelength range. Analysis using a first-order difference algorithm reveals the signal variation trend: a monotonically increasing trend in the 650-700nm range with a slope of 0.0011V / nm; and a monotonically decreasing trend in the 700-800nm ​​range with a slope of -0.0012V / nm. Power spectral density analysis reveals the noise distribution characteristics: the noise exhibits a Gaussian distribution across the entire effective wavelength range with a standard deviation of 0.0008V. Based on the signal variation trend and noise distribution characteristics, the matching relationship between the signal-to-noise ratio and the detection scanning interval at each wavelength sampling point was determined. A fine scanning interval of 0.5 nm was used near 700 nm where the signal changes drastically (absolute slope greater than 0.001 V / nm); a standard scanning interval of 2 nm was used near 650 nm and 800 nm where the signal is relatively stable. The final detection scanning interval parameters were determined as follows: 2 nm interval for the 650-690 nm range, 0.5 nm interval for the 690-710 nm range, and 2 nm interval for the 710-800 nm range. The Radio Frequency Identification (RFID) tag attached to the colorimetric tube was read to obtain the sample identification information "WS_20241015_001" and the test type label "sample test". Since the test type is marked as sample test, the previously stored reference zeroing values ​​(0.0023V at 700nm, 0.0019V at 800nm, and 0.0021V at 650nm) are retrieved from the detection buffer. Based on the reference zeroing values ​​and the detection scan interval parameters, the target spectrophotometer is controlled to perform compensated photometric scanning detection on the water quality sample to be tested. During the adaptive scanning process, the photometric value measured at 700nm is 1.3567V, which, after subtracting the reference zeroing value of 0.0023V, yields a compensated photometric value of 1.3544V; at 800nm, 1.1456V is measured, which, after compensation, becomes 1.1437V; and at 650nm, 1.2012V is measured, which, after compensation, becomes 1.1991V.

[0018] In the above embodiment, the operator Zhang's detection permission level is obtained as "Senior Analyst," and the data access permission attribute of the compensated photometric value is determined to be "Read and Write" based on this permission level. The first timestamp information "2024-10-15T14:32:18.567Z" when the compensated photometric scan detection is completed is obtained. The sample identification information, compensated photometric value, timestamp information, and identity information are uniquely encoded using the SHA256 hash algorithm to generate a unique traceability code "7A8B9C2D3E4F5G6H1I2J3K4L5M6N7O8P." An index mapping relationship is established between the unique traceability code and the data access permission attribute, and stored in a PostgreSQL-based traceability database. Using this index mapping relationship, the unique traceability code, compensated photometric value, and sample identification information are fused for permission traceability to generate a target photometric value containing sample traceability information. The target photometric value is then substituted into the photometric value calculation formula for calculation. First, convert the photometric values ​​to absorbance values: A700 = -log10(1.3544 / 1.2445) = -0.0374, A800 = -log10(1.1437 / 1.1228) = -0.0081, A650 = -log10(1.1991 / 1.1885) = -0.0039. Adaptive error correction is then applied to the absorbance values ​​based on signal variation trends and noise distribution characteristics. Temperature drift correction was performed on the current laboratory temperature of 23℃ based on a temperature coefficient of -0.002 / ℃. The corrected absorbance values ​​are: A700 correction = -0.0374 + 0.002 × (23 - 20) = -0.0314, A800 correction = -0.0081 + 0.002 × 3 = -0.0021, A650 correction = -0.0039 + 0.002 × 3 = 0.0021. Spectral separation processing was then performed on the corrected absorbance values ​​based on the spectral interference characteristics within the effective wavelength range. The turbidity interference at 800nm ​​and the organic matter interference at 650nm were eliminated by multiple linear regression algorithm, and the absorbance value after purification was obtained: Apurification = A700 correction - 0.8 × A800 correction - 0.3 × A650 correction = -0.0314 - 0.8 × (-0.0021) - 0.3 × 0.0021 = -0.0314 + 0.0017 - 0.0006 = -0.0303.

[0019] In the above embodiment, the concentration of the purified absorbance value was converted using a preset standard curve C=(A-0.003) / 0.0241: C=(-0.0303-0.003) / 0.0241=-0.0333 / 0.0241=-1.38mg / L. Since the concentration value was negative, the system determined it to be below the detection limit and corrected the concentration value to <0.01mg / L. The detection accuracy of the concentration value was evaluated using the detection scanning interval parameter. Based on the standard deviation of repeated detection (0.003mg / L) and coverage factor k=2, the detection uncertainty was calculated to be 0.006mg / L. According to the standard of relative standard deviation less than 5%, the quality control level was determined to be "Level 1". The concentration value "<0.01mg / L", the detection uncertainty "±0.006mg / L", and the quality control level "Level 1" were used as the quantitative analysis results. Finally, the second timestamp information "YYYY-10-15T14:35:42.123Z" at the time of generation of the quantitative analysis results was obtained. Based on this timestamp, the quantitative analysis results, multiple detection wavelengths (700nm, 800nm, 650nm), and detection scanning interval parameters were time-stamped to generate a detection dataset carrying the analysis process time sequence identifier "SEQ_001_002_003". The operator identity information "OP001" was used to query the preset permission database to obtain Zhang's corresponding analysis permission level "Senior Analyst" and result access scope "Department Level". Based on this permission information, the visibility permission attribute of the detection dataset was determined to be "Department Visible" and the modification permission attribute to be "Restricted Modification". The detection dataset was digitally signed and bound to the identity information to obtain a permission dataset with the operator identifier. The permission dataset was subjected to MD5 hash integrity verification according to the ISO17025 laboratory quality management system audit requirements, generating a verification result including the data integrity identifier "PASS" and the operation compliance identifier "COMPLIANT". The permission dataset, along with the visible permission attributes, modify permission attributes, and verification results, are stored in a JSON-formatted structure according to chronological order. This generates an audit trail record containing a complete operation history, data traceability information, and permission control records. This record is then stored in the audit database, completing the entire water quality testing and control process.

[0020] Through the above steps, the operator-input multi-wavelength photometric value calculation formula is obtained, enabling customized detection schemes based on the characteristics of different water quality samples. Signal quality analysis based on initial photometric values ​​dynamically generates optimal detection scanning interval parameters, allowing the detection process to adaptively adjust according to sample characteristics. The target photometric value obtained through adaptive photometric scanning is combined with the photometric value calculation formula for precise calculation, effectively improving the accuracy of quantitative analysis results. A time-series permission association mechanism links the entire detection process data with operator identity information, forming a complete audit trail record to ensure data reliability and traceability. This solves the technical problem of poor reliability of spectrophotometers for water quality detection in related technologies, achieving the technical effect of improving the reliability of spectrophotometers for water quality detection.

[0021] The entity performing the above steps may be a control system, a control device, a controller or processor in the device or system, a standalone controller or processor, or other processing devices or processing units with similar processing functions, but is not limited to these.

[0022] In an optional embodiment, signal quality analysis is performed on the initial photometric values ​​to obtain detection scanning interval parameters. Specifically, this includes: screening the initial photometric values ​​across the entire wavelength band based on preset signal quality indicators to determine the effective wavelength range matching the water quality sample to be tested from multiple detection wavelengths; extracting signal features from the initial photometric values ​​within the effective wavelength range to obtain the signal variation trend and noise distribution characteristics of the effective wavelength range; determining the matching relationship between the signal-to-noise ratio of each wavelength sampling point within the effective wavelength range and the detection scanning interval based on the signal variation trend and noise distribution characteristics; and determining the detection scanning interval parameters for each wavelength segment corresponding to each wavelength sampling point within the effective wavelength range based on the matching relationship.

[0023] Among them, the preset signal quality index represents the standard parameters used to evaluate the validity of photometric detection data, specifically including signal-to-noise ratio threshold, baseline stability index, spectral resolution requirements, etc.; full-band data screening refers to the process of quality assessment and validity judgment of data across the entire detection spectral range, specifically including outlier removal, noise point identification, and interference peak elimination; effective wavelength range represents the spectral interval most suitable for target sample detection after quality screening, specifically including characteristic absorption bands, low-interference bands, and high-sensitivity bands; signal feature extraction represents the data analysis process of identifying and quantifying key signal characteristics from spectral data, specifically including peak identification, valley location, and slope calculation; signal change trend refers to the regularity of spectral intensity changes with wavelength, specifically including monotonically increasing trends, peak-valley patterns, etc. Trends in signal strength include changing trends and stable fluctuation trends; noise distribution characteristics are used to represent the statistical properties of random errors in the detection data, specifically including Gaussian noise distribution, Poisson noise distribution, and uniform noise distribution; signal-to-noise ratio (SNR) represents the ratio of effective signal strength to background noise strength, specifically including peak signal-to-noise ratio (PSNR), root mean square signal-to-noise ratio (RMSNR), and power signal-to-noise ratio (PSNR); matching relationship refers to the corresponding correlation between signal quality parameters and detection control parameters, specifically including linear matching relationship, exponential matching relationship, and piecewise matching relationship; wavelength sampling points are used to represent discrete detection positions in the spectral scanning process, specifically including equally spaced sampling points, adaptive sampling points, and key feature sampling points; wavelength segmentation represents dividing the continuous spectral range into several independent processing intervals, specifically including equal-width segmentation, equal-weight segmentation, and feature-guided segmentation. In the above embodiment, a UV-Vis spectrophotometer was used to detect the total phosphorus content in drinking water. An initial photometric dataset of standard water samples within the 200-900 nm wavelength range was obtained, containing photometric data at 701 wavelength points. First, preset signal quality parameters were retrieved: a signal-to-noise ratio threshold of 50:1, a baseline stability requirement of a relative standard deviation (RSD) of less than 2%, and a spectral resolution of 1 nm. The 701 initial photometric values ​​within the 200-900 nm range were evaluated point-by-point. In the 200-250 nm UV region, due to insufficient deuterium lamp light intensity, the measured photometric values ​​were generally below 0.1 V, and the calculated signal-to-noise ratio was only 15:1 to 25:1, all below the 50:1 threshold requirement. This region was marked as "signal-to-noise ratio unacceptable" and removed. In the 250-350nm region, abnormally high values ​​were detected at wavelengths of 310nm, 325nm, and 340nm, with photometric values ​​of 2.8V, 3.1V, and 2.9V, respectively, while the photometric values ​​at adjacent wavelengths were all within the range of 1.2-1.4V. Assuming that statistical analysis showed the Z-scores for these three data points to be 3.2, 3.8, and 3.4, respectively, all exceeding the critical value of 2.5, they were identified as outliers and removed. In the 850-900nm near-infrared region, poor baseline stability was found. Calculating the relative standard deviation (RSD) of 50 consecutive wavelengths, the RSD value for this region was 3.2%, exceeding the 2% stability requirement. Further analysis revealed the presence of water vapor absorption interference peaks in this region, which was then marked as "baseline unstable" and excluded. After screening the entire wavelength range, the effective wavelength range was determined to be 350-850nm, encompassing 501 effective wavelength points. Within this range, the molybdenum blue complex exhibits a characteristic absorption band around 700 nm, a low-interference band between 600-650 nm, and a high-sensitivity band between 680-720 nm. A filtering algorithm was used to smooth 501 photometric values ​​within the effective wavelength range, with a filter window set to 5 data points and a polynomial order of 2. After smoothing, peak identification analysis was performed. First-order derivative calculations identified a major absorption peak at 700 nm with a peak photometric value of 1.2445 V. Second-order derivative analysis identified the peak start and end points at 685 nm and 715 nm, respectively. A minor peak was also identified at 420 nm with a photometric value of 1.1890 V, corresponding to potential organic interference in the sample. Valley location analysis identified a minimum valley at 650 nm with a photometric value of 1.1650 V and another valley at 780 nm with a photometric value of 1.1720 V. These valley points were used as reference points for baseline correction.

[0024] In the above embodiments, the slope changes for each wavelength band were calculated. In the 350-600nm band, the luminous intensity value showed a slow increasing trend, with an average slope of 0.0008V / nm; in the 600-680nm band, the slope increased to 0.0025V / nm; in the 680-720nm band, the slope reached its maximum value of 0.0045V / nm; and in the 720-850nm band, the slope turned negative to -0.0018V / nm. Based on the slope calculation results, the signal variation trend within the effective wavelength range was determined: 350-600nm showed a stable fluctuation trend, 600-720nm showed a monotonically increasing trend, and 720-850nm showed a monotonically decreasing trend. Moving window analysis of variance was used to evaluate the noise distribution characteristics. A moving window with a width of 20 nm was set, and the variance of the photometric values ​​within each window was calculated. The results showed that the noise variance in the 350-600 nm range was 0.000064 V², with a standard deviation of 0.008 V; the noise variance in the 600-720 nm range was 0.000036 V², with a standard deviation of 0.006 V; and the noise variance in the 720-850 nm range was 0.000049 V², with a standard deviation of 0.007 V. Normality tests confirmed that the noise in each wavelength range conformed to a Gaussian distribution. The test statistics D values ​​were 0.08, 0.06, and 0.07, respectively, all less than the critical value of 0.15, indicating that the noise distribution conformed to the normality assumption. The signal-to-noise ratio (SNR) at each wavelength sampling point was calculated. Taking the 700nm main peak as an example, the signal intensity was 1.2445V, the noise standard deviation was 0.006V, and the calculated peak SNR was 207:1. For the 650nm valley point, the signal intensity was 1.1650V, the noise standard deviation was 0.008V, and the SNR was 146:1. A segmented matching relationship between the SNR and the detection scanning interval was established: when the SNR was ≥200:1, a fine scanning interval of 0.2nm was used to ensure the detection accuracy in the high signal region; when the SNR was between 100:1 and 200:1, a standard scanning interval of 0.5nm was used to balance accuracy and efficiency; when the SNR was between 50:1 and 100:1, a coarse scanning interval of 1.0nm was used to reduce the impact of noise; when the SNR was <50:1, this region had already been eliminated in the previous screening.

[0025] In the above embodiment, based on the matching relationship, the system divides the effective wavelength range of 350-850nm into 5 feature-guided segments: The first segment (350-600nm): This region exhibits a stable fluctuation trend with an average signal-to-noise ratio of 145:1, and the detection scanning interval parameter is determined to be 0.5nm. The wavelength range spans 250nm, and calculated at 0.5nm intervals, this segment contains 501 wavelength sampling points (250÷0.5+1=501). The second segment (600-680nm): This region is a signal rise segment with an average signal-to-noise ratio of 165:1, and the detection scanning interval parameter is determined to be 0.5nm. The wavelength range spans 80nm, and calculated at 0.5nm intervals, this segment contains 161 wavelength sampling points (80÷0.5+1=161). The third segment (680-720nm): This region contains the main characteristic peaks, with an average signal-to-noise ratio (SNR) of 195:1. The core region of 690-710nm has an SNR exceeding 200:1, thus the detection scan interval parameter is determined to be 0.2nm. The wavelength range spans 40nm, and based on a 0.2nm interval, this segment contains 201 key feature sampling points (40 ÷ 0.2 + 1 = 201). The fourth segment (720-780nm): This region is a signal decline segment, with an average SNR of 158:1, thus the detection scan interval parameter is determined to be 0.5nm. The wavelength range spans 60nm, and based on a 0.5nm interval, this segment contains 121 wavelength sampling points (60 ÷ 0.5 + 1 = 121). The fifth segment (780-850nm): This region is a low-signal plateau segment, with an average SNR of 132:1, thus the detection scan interval parameter is determined to be 1.0nm. The wavelength range spans 70nm. Calculated at 1.0nm intervals, this segment contains 71 wavelength sampling points (70÷1.0+1=71). Verification calculation: Total number of sampling points = 501+161+201+121+71=1055 sampling points, covering the effective wavelength range of 350-850nm (total span 500nm). The detection scanning interval parameters of each segment can also be stored as structured data.

[0026] In an optional embodiment, the target photometric value is calculated using a photometric value calculation formula to obtain the quantitative analysis results of the water quality sample to be tested. Specifically, this includes: substituting the target photometric value into the photometric value calculation formula to obtain the absorbance values ​​of the water quality sample to be tested at multiple detection wavelengths; performing adaptive error correction on the absorbance value according to the signal change trend and noise distribution characteristics to obtain the corrected absorbance value; performing spectral separation processing on the corrected absorbance value according to the spectral interference characteristics within the effective wavelength range to obtain the purified absorbance value; converting the purified absorbance value into concentration using a preset standard curve to obtain the concentration value of the target substance in the water quality sample to be tested; evaluating the detection accuracy of the concentration value using the detection scanning interval parameter to obtain the detection uncertainty and quality control level; and using the concentration value, detection uncertainty, and quality control level as the quantitative analysis results.

[0027] Among them, absorbance value represents a quantitative value of the degree to which a sample absorbs light of a specific wavelength, specifically including single-wavelength absorbance, differential absorbance, and integrated absorbance; adaptive error correction refers to a processing method that dynamically compensates and adjusts errors according to signal characteristics, specifically including baseline drift correction, temperature compensation correction, and light source intensity correction; corrected absorbance value is used to represent accurate photometric detection data after error compensation processing, specifically including temperature correction value, baseline correction value, and interference correction value; spectral interference characteristics represent spectral overlap phenomena that affect the accuracy of target substance detection, specifically including spectral line overlap interference, background absorption interference, and scattered light interference; spectral separation processing refers to a processing method that separates and extracts the target substance signal from the composite spectrum; purified absorbance value is used to represent the spectral response data of the pure target substance after eliminating interference effects, specifically including interference-free absorbance, pure component absorbance, and net correction value; preset standard curve represents... Establishing standardized quantitative models for the relationship between concentration and spectral response includes linear standard curves, quadratic polynomial curves, and logarithmic fitting curves. Concentration conversion refers to the calculation process of converting spectral data into concentration values ​​using standard curves, including direct interpolation conversion, regression equation conversion, and table lookup conversion. Concentration values ​​represent the content of the analyte in a sample, including mass concentration, molar concentration, and volume fraction concentration. Detection accuracy assessment represents the process of quantitatively evaluating the reliability and accuracy of detection results, including reproducibility assessment, accuracy assessment, and limit of detection assessment. Detection uncertainty represents the possible error range and confidence level of the detection result, including expanded uncertainty, standard uncertainty, and relative uncertainty. Quality control levels represent the degree to which the detection results conform to quality standards, including Level 1 accuracy, Level 2 accuracy, and Level 3 accuracy. In the above embodiments, a UV-Vis spectrophotometer is continued to be used to detect the total phosphorus content in drinking water. It is assumed that adaptive photometric scanning has been completed, obtaining a dataset of target photometric values ​​for the water sample within the effective wavelength range of 350-850 nm. The photometric value calculation formula based on Lambert-Beer's law is retrieved: A = -log 10 (I / I0), where A represents the absorbance value, I represents the transmitted light intensity, and I0 represents the incident light intensity. First, the photometric data of the reference solution are processed. The reference solution is deionized water, and its photometric value measured at a characteristic wavelength of 700 nm is 2.1450 V, corresponding to the incident light intensity I0. The target photometric value of the water sample to be tested, measured at 700 nm, is 1.2445 V, corresponding to the transmitted light intensity I. Substituting the data into the calculation formula: A 700 =-log 10 (1.2445 / 2.1450)=-log 10 (0.5802) = -(-0.2365) = 0.2365. The calculated single-wavelength absorbance of the sample at 700 nm is 0.2365. Absorbance is calculated point-by-point for 1055 target photometric values ​​within the effective wavelength range. At 680 nm, the reference photometric value is 2.1380 V, and the sample photometric value is 1.2380 V. The calculated absorbance value A is... 680 =0.2375. At 720 nm, the reference photometric value is 2.1520 V, and the sample photometric value is 1.2510 V. The absorbance value A is calculated. 720 =0.2355. The differential absorbance value was also calculated, with 700nm selected as the detection wavelength and 650nm as the reference wavelength. Differential absorbance ΔA = A 700 -A 650 =0.2365-0.1890=0.0475, which effectively eliminates the influence of background absorption.

[0028] In the above embodiment, baseline drift correction was first performed. By analyzing the time-varying trend of the baseline during the detection process, it was detected that within a 30-minute detection period, the baseline photometric value linearly decreased from 2.1450V to 2.1380V, with a drift rate of -0.0023V / min. Linear interpolation was used to correct the baseline drift. For the 700nm absorbance value at detection time t=15min, the corrected reference photometric value I0'=2.1450-0.0023×15=2.1105V. The corrected absorbance value A was then recalculated. 700 '=-log 10(1.2445 / 2.1105) = 0.2295. Temperature compensation correction was performed. During the detection process, the ambient temperature rose from 20.5℃ to 21.2℃. Based on the temperature coefficient of the molybdenum blue complex (-0.0015 / ℃), the temperature correction factor was calculated as 1 + (-0.0015) × (20.85 - 20.0) = 0.9987. The corrected absorbance value A... 700 =0.2295 × 0.9987 = 0.2292. Light source intensity correction was performed. By monitoring the changes in the operating current of the deuterium lamp and tungsten lamp, a 1.2% decrease in light source intensity at 700nm relative to the standard state was detected. The light source intensity correction factor is 1 / 0.988 = 1.0121, and the final corrected absorbance value A is... 700 =0.2292 × 1.0121 = 0.2320. Analysis of spectral interference characteristics within the effective wavelength range revealed overlapping interference from organic compounds at 420 nm, with an absorbance value of 0.1850, overlapping with the absorption spectrum of the target substance, molybdenum blue complex. Spectral separation was performed using multiple linear regression, establishing a spectral separation model: A_total = A_target + A_interference, where A_total is the total absorbance, A_target is the absorbance of the target substance, and A_interference is the absorbance of the interfering substance. Using the standard spectra of molybdenum blue complex and organic interfering substances from the pure component spectral database, the contribution coefficients of each component were determined by least squares fitting. At the main peak of 700 nm, the contribution coefficient of the molybdenum blue complex was 0.95, and the contribution coefficient of the organic interfering substance was 0.05. The purified absorbance value was calculated: A 700 Purification = 0.2320 × 0.95 = 0.2204. Spectral separation processing was performed on 201 data points within the key wavelength range of 680-720 nm to obtain a purified absorbance dataset. A preset standard curve for total phosphorus detection was retrieved. This preset standard curve uses a linear standard curve model: C = k × A + b, where C represents the total phosphorus concentration (mg / L), A represents the purified absorbance value at 700 nm, k is the slope coefficient, and b is the intercept. The standard curve parameters were established using five standard solutions: 0.00 mg / L (A = 0.0000), 0.50 mg / L (A = 0.1102), 1.00 mg / L (A = 0.2205), 1.50 mg / L (A = 0.3308), and 2.00 mg / L (A = 0.4410). Linear regression analysis yielded a slope k = 0.2205 L / mg, an intercept b = 0.0000, and a correlation coefficient R² = 0.9998. Substituting the purified absorbance value into the standard curve: C = 0.2204 / 0.2205 + 0.0000 = 0.9995 mg / L. Through conversion using the regression equation, the total phosphorus concentration in the water sample was determined to be 1.000 mg / L. In an optional embodiment, the target spectrophotometer is controlled to perform adaptive photometric scanning detection on the water quality sample to be tested according to the detection scanning interval parameters to obtain a target photometric value. Specifically, this includes: reading the wireless identification tag attached to the colorimetric tube containing the water quality sample to be tested to obtain sample identification information and test type markings pre-written on the wireless identification tag, the test type markings including sample test markings or zeroing test markings; when the test type marking is a zeroing test marking, the target spectrophotometer is controlled to perform calibration detection on the blank water quality sample contained in the colorimetric tube to obtain a baseline zeroing value, and storing the baseline zeroing value in the detection buffer; when the test type marking is a sample test marking, the baseline zeroing value is retrieved from the detection buffer, and the target spectrophotometer is controlled to perform compensated photometric scanning detection on the water quality sample to be tested according to the baseline zeroing value and the detection scanning interval parameters to obtain a compensated photometric value; the compensated photometric value is associated with the sample identification information for traceability permissions to generate a target photometric value including sample traceability information.

[0029] Among them, wireless identification tags refer to electronic tags affixed to sample containers for automatic identification, specifically including RFID radio frequency tags, NFC near-field communication tags, and QR code tags; colorimetric tubes refer to transparent containers used to hold water samples for photometric detection, specifically including quartz colorimetric tubes, glass colorimetric tubes, and plastic colorimetric tubes; sample identification information is data content used to uniquely identify the sample, specifically including sample number information, sampling time information, and sampling location information; test type markings represent classification marks that distinguish different detection purposes, specifically including sample test markings, zero-calibration test markings, and quality control test markings; zero-calibration test markings are special markings that indicate the instrument calibration operation, specifically including blank zero-calibration markings, baseline calibration markings, and zero-point correction markings; blank water samples are used to represent reference samples that do not contain the target detection substance, specifically including deionized water samples, distilled water samples, and ultrapure water samples; calibration testing refers to the testing process of calibrating the instrument's zero point and response, specifically including zero-point calibration testing... The calibration data includes: measurement, full-scale calibration test, multi-point calibration test, etc.; reference zero value refers to the zero-point reference data obtained after instrument calibration, specifically including dark current zero value, blank absorbance zero value, baseline drift zero value, etc.; detection buffer area is used to represent the memory space for temporary storage of detection data, specifically including calibration data buffer area, detection result buffer area, intermediate calculation buffer area, etc.; compensated photometric scanning detection represents the detection method of using calibration data for error compensation, specifically including zero-point compensation detection, baseline compensation detection, system error compensation detection, etc.; compensated photometric value refers to the photometric detection data after calibration compensation processing, specifically including zero-point compensated value, baseline compensated value, temperature compensated value, etc.; traceability permission association processing is used to represent the process of establishing data traceability and permission control relationship, specifically including data traceability chain establishment, permission level association, access control binding, etc.; sample traceability information represents the traceability data that records the complete historical trajectory of the sample, specifically including sampling traceability information, processing traceability information, detection traceability information, etc.

[0030] In the above embodiment, it is assumed that a UV-Vis spectrophotometer is used to detect the total phosphorus content in the effluent from an urban wastewater treatment plant. Assuming the detection scanning interval parameters have been determined, adaptive photometric scanning of the water sample is required. The operator places a quartz colorimetric tube containing the water sample into the sample chamber of the spectrophotometer. This quartz colorimetric tube has a 10mm optical path length, a volume of 3.5mL, and is made of high-purity quartz glass with a transmittance greater than 90% in the wavelength range of 200-900nm. The Radio Frequency Identification (RFID) reader is activated to scan the wireless identification tag attached to the bottom of the colorimetric tube. This RFID tag operates at a frequency of 13.56MHz, conforms to the ISO14443 Type A protocol standard, has a storage capacity of 1KB, and a reading distance of 0-50mm. The RFID reader successfully read the tag data within 2 seconds, obtaining the pre-written sample identification information: sample number WW-YYYY-0927-001, sampling time YYYY-01-02 09:30:00, sampling location at the effluent outlet of a municipal wastewater treatment plant, and sample type wastewater effluent. Simultaneously, the test type marker field was read, with a value of SAMPLE_TEST, indicating a sample test marker. Based on the preset marker parsing rules, the current operation was identified as sample testing mode, not zeroing / calibration mode. Instrument calibration must be completed before sample testing. The operator replaced the colorimetric tube with a quartz colorimetric tube containing a blank water sample. This blank sample was laboratory-prepared deionized water with a conductivity of less than 1 μS / cm and a total organic carbon content of less than 50 μg / L, meeting the GB / T6682-2008 Class I water standard.

[0031] In the above embodiment, the RFID tag on the blank sample colorimetric tube is read, and the test type marker ZERO_CALIB is obtained, indicating a zero-calibration test marker. The system automatically switches to calibration detection mode and begins the zero-point calibration procedure. First, dark current calibration is performed. The light source is turned off, and the dark current response of the photomultiplier tube (PMT) is detected. At a detection wavelength of 700 nm, the dark current value is 0.0025 V, which is stored as the dark current zero-calibration value in the calibration data area of ​​the detection buffer. The deuterium lamp and tungsten lamp light sources are turned on, and after 15 minutes of preheating and stabilization, a full-wavelength scan detection is performed on the blank water sample, with a scanning range of 350-850 nm and a scanning interval of 1.0 nm. At the characteristic wavelength of 700 nm, the photometric value of the blank sample is measured to be 2.1450 V. The baseline zero-calibration value is calculated as follows: Baseline zero-calibration value = Blank photometric value - Dark current zero-calibration value = 2.1450 - 0.0025 = 2.1425 V. The reference zero-calibration value represents the instrument's zero-point response in the current operating state and is stored in the detection buffer address range of 0x1000-0x1FFF. Reference zero-calibration values ​​are calculated for each of the 501 wavelength points within the effective wavelength range of 350-850nm, establishing a complete zero-point calibration dataset. The reference zero-calibration value is 2.1380V at 680nm and 2.1520V at 720nm. After calibration, the operator reinserts the colorimetric tube containing the water sample to be tested. The RFID tag is read to confirm the test type is marked as SAMPLE_TEST, and the reference zero-calibration value dataset is retrieved from the detection buffer. Based on the previously determined detection scan interval parameters, segmented adaptive scanning is performed on the sample to be tested. In the first segment (350-600nm), a 0.5nm scan interval is used; in the third segment (680-720nm), a high-precision 0.2nm scan interval is used in the key feature region. At the characteristic wavelength of 700 nm, the original photometric value of the sample was measured to be 1.2445 V. The corresponding reference zero value of 2.1425 V was immediately retrieved from the buffer for compensation calculation.

[0032] In the above embodiment, the compensated photometric scanning detection employs a real-time compensation algorithm: compensated photometric value = original photometric value / reference zero-calibration value × normalization coefficient. The normalization coefficient is set to 2.0000V, representing the full-scale response under ideal conditions. The calculated compensated photometric value at 700nm is 1.2445 / 2.1425 × 2.0000 = 1.1620V. This value eliminates the influence of systematic errors such as light source intensity fluctuations and detector response drift. Compensation calculations are performed on each of the 1055 sampling points. At 680nm, the original photometric value is 1.2380V, the reference zero-calibration value is 2.1380V, and the compensated photometric value is 1.1580V. At 720nm, the original photometric value is 1.2510V, the reference zero-calibration value is 2.1520V, and the compensated photometric value is 1.1630V. The compensated photometric value is then associated with the sample identification information for traceability permissions. First, a data traceability chain is established, uniquely binding photometric data with sample number WW-YYYY-0927-001. A 32-bit MD5 hash value is generated as a data integrity check code: MD5(WW-YYYY-0927-001+1.1620V+YYYY-09-2710:15:30)=A7B8C9D0E1F2G3H4I5J6K7L8M9N0O1P2. This check code ensures data integrity during transmission and storage. Access control is implemented based on operator permission levels. The current operator permission level is ANALYST, possessing sample testing and data viewing permissions, but not calibration parameter modification permissions. Permission level information is marked in the data records. A sample traceability information data structure is constructed, and the compensated photometric value array is merged with the traceability information to generate a target photometric value data package. This data package includes compensated photometric values ​​for 1055 wavelength points, complete sample traceability information, detection parameter records, and quality control status. The target photometric value data packet is stored in JSON format and has a total size of approximately 150KB. A unique global identifier, "GLB-YYYY-0927-10:15:30-001", is assigned to this data packet, and an index record is created in the database to support subsequent data queries and traceability operations. The final output target photometric values ​​not only contain accurate photometric detection data but also possess complete quality traceability capabilities, meeting the requirements of the laboratory quality management system and providing a reliable data foundation for subsequent quantitative analysis and result reporting.

[0033] In an optional embodiment, the compensated photometric value and sample identification information are associated with traceability permissions to generate a target photometric value that includes sample traceability information. Specifically, this includes: obtaining the operator's detection permission level and determining the data access permission attribute of the compensated photometric value based on the detection permission level; obtaining the first timestamp information when the compensated photometric scan detection is completed, and performing unique encoding processing on the sample identification information, compensated photometric value, first timestamp information, and identity information to generate a unique traceability code; establishing an index mapping relationship between the unique traceability code and the data access permission attribute, and storing the index mapping relationship in the traceability database; and using the index mapping relationship to perform permission traceability fusion processing on the unique traceability code, compensated photometric value, and sample identification information to generate the target photometric value.

[0034] Among them, the detection permission level represents the data access level granted to the operator in the system, specifically including read-only permission level, edit permission level, administrator permission level, etc.; data access permission attributes refer to the security attributes that control data visibility and operability, specifically including readable attributes, writable attributes, and deleteable attributes, etc.; the first timestamp information is used to represent the precise time record of the detection completion moment, specifically including UTC standard timestamp, local timestamp, high-precision nanosecond timestamp, etc.; unique encoding processing represents the algorithm processing process for generating unique identifiers, specifically including hash encoding processing, UUID encoding processing, time-series encoding processing, etc.; unique traceability. A code refers to an coded identifier that can uniquely identify a detected event, specifically including MD5 hash traceability codes, SHA256 traceability codes, and custom format traceability codes; an index mapping relationship is used to represent the association and correspondence between different data elements, specifically including one-to-one mapping relationships, one-to-many mapping relationships, and many-to-many mapping relationships; a traceability database refers to a database specifically storing traceability information, specifically including relational traceability databases, NoSQL traceability databases, and blockchain traceability databases; permission traceability fusion processing refers to the comprehensive processing that combines permission control with data traceability, specifically including permission verification fusion, traceability chain fusion, and access log fusion.

[0035] In the above embodiment, a UV-Vis spectrophotometer is used to detect the total phosphorus content in the effluent from the urban wastewater treatment plant. Assuming that compensated photometric scanning has been completed and compensated photometric data has been obtained, traceability permission association processing is required with sample identification information. The identity information of the current operator is obtained through the identity authentication module. Operator Zhang uses employee ID ANALYST_001 and password to complete login verification, and his detection permission level is queried from the user permission database. According to the permission grading system of the laboratory quality management system, Zhang is granted a Level 2 analyst detection permission level. The specific permission scope corresponding to this permission level includes: being able to perform photometric detection operations on routine water quality samples, being able to view and export his own test data results, and being able to view standard operating procedure documents, but not being able to modify instrument calibration parameters, not being able to delete historical test data, and not being able to access other operators' test records. Based on the Level 2 analyst permission level, data access permission attributes are determined for the compensated photometric values. The specific permission attribute settings are as follows: The readable attribute is set to TRUE, indicating that the operator can view the photometric value data; the writable attribute is set to FALSE, indicating that the operator cannot modify completed photometric value data; the deleteable attribute is set to FALSE, indicating that the operator cannot delete the photometric value record; the exportable attribute is set to TRUE, indicating that the operator can export the data for report compilation; and the shareable attribute is set to FALSE, indicating that the data cannot be directly accessed by other operators. The data access permission attribute is encoded as an 8-bit binary string 10010000, where the first bit represents readable permission, the second bit represents writable permission, the third bit represents deleteable permission, the fourth bit represents exportable permission, the fifth bit represents shareable permission, and bits 6-8 are reserved for extended permission control.

[0036] In the above embodiment, at the instant the compensated photometric scanning detection is completed, the first timestamp information is obtained through a high-precision clock module. This clock module is calibrated using a Global Positioning System (GPS) time signal, achieving a time accuracy at the microsecond level. The recorded first timestamp information is in Coordinated Universal Time (UTC) format: YYYY-01-02T02:15:30.123456Z, indicating that the detection completion time is 2:15:30 AM on January 2nd, YYYY year, 123456 microseconds. Simultaneously, the local timestamp information is recorded as YYYY-01-02T10:15:30.123456+08:00, representing Beijing time 10:15:30 AM on January 2nd, YYYY year, 123456 microseconds. The following basic data elements were collected for unique encoding: sample identification information WW-YYYY-0102-001, key feature data of the compensated photometric value 1.1620V@700nm, first timestamp information YYYY-01-02T02:15:30.123456Z, operator identification information ANALYST_001, and instrument identification UV-VIS-001. MD5 was used for unique encoding. First, all basic data elements were concatenated into a string in a predefined order: WW-YYYY-0102-001|1.1620V@700nm|YYYY-01-02T02:15:30.123456Z|ANALYST_001|UV-VIS-001. Perform an MD5 hash operation on the connection string to generate a 128-bit hash value: 7A8B9C0D1E2F3A4B5C6D7E8F9A0B1C2D. This hash value is unique; even slight changes in the input data will result in a completely different output hash value, ensuring the uniqueness of the traceability code. Add a timestamp prefix and a type identifier to the MD5 hash value to generate the final unique traceability code: TRC-YYYY0102-7A8B9C0D1E2F3A4B5C6D7E8F9A0B1C2D, where TRC stands for TraceabilityCode and YYYY0102 represents the detection date.

[0037] In the above embodiment, a one-to-one index mapping relationship is established between the unique traceability code and the data access permission attribute. The specific content of the mapping relationship is as follows: the unique traceability code TRC-YYYY0102-7A8B9C0D1E2F3A4B5C6D7E8F9A0B1C2D corresponds to the data access permission attribute 10010000. An index mapping table record is created in the traceability database. This traceability database can be a MySQL relational database deployed on an internal laboratory server. The database table structure includes the following fields: traceability code field (VARCHAR type, length 64 characters), permission attribute field (CHAR type, length 8 characters), creation time field (DATETIME type, precision to microseconds), operator field (VARCHAR type, length 32 characters), and sample number field (VARCHAR type, length 32 characters). Insert an index-mapped record into the traceability database: Traceability code field value is TRC-YYYY0102-7A8B9C0D1E2F3A4B5C6D7E8F9A0B1C2D, permission attribute field value is 10010000, creation time field value is YYYY-01-0210:15:30.123456, operator field value is ANALYST_001, and sample number field value is WW-YYYY-0927-001. Create a composite index for this record, including a primary traceability code index, a secondary sample number index, and a secondary operator index, to ensure efficient data retrieval. After the index is created, perform a database transaction commit operation to ensure the persistent storage of the index mapping relationship.

[0038] In the above embodiment, the established index mapping relationship is used to perform permission-based traceability fusion processing on the unique traceability code, compensated photometric value, and sample identification information. First, the unique traceability code TRC-YYYY0102-7A8B9C0D1E2F3A4B5C6D7E8F9A0B1C2D is used to query the corresponding permission attribute 10010000 from the traceability database. A permission verification fusion operation is then performed. Based on the first bit "1" of the permission attribute, it is confirmed that the current operator has data read permission; based on the fourth bit "1", it is confirmed that the operator has data export permission. After successful verification, data fusion processing is allowed to continue. A traceability chain fusion data structure was constructed, comprising a complete data traceability path: from the sample collection stage ("effluent outlet of a municipal wastewater treatment plant, YYYY-01-02 09:30:00"), to the sample processing stage ("laboratory pretreatment, YYYY-01-02 09:45:00"), and then to the detection execution stage ("UV-VIS photometric detection, YYYY-01-02 10:15:30"). The compensated photometric value data was deeply fused with the traceability chain information. At the characteristic wavelength of 700nm, the compensated photometric value of 1.1620V was bound to the traceability information, forming a traceable data unit. This data unit includes not only the value itself but also complete metadata such as the value's generation process, quality control status, and access control information. Access log fusion records were generated, recording each access operation to the target photometric value in the log: access time, access operator, access type (view, export, analysis, etc.), and access result. Log entries are written append-only using an immutable method to ensure the integrity of the audit trail. The final target photometric dataset includes complete traceability capabilities. Its overall structure comprises: core photometric data (compensated photometric values ​​for 1055 wavelengths), sample identification information (sample number, sampling information, etc.), traceability control information (unique traceability code, access permissions, etc.), quality assurance information (calibration status, testing conditions, etc.), and audit trail information (operation logs, change records, etc.). The target photometric dataset can be encrypted using the AES advanced encryption standard. Only operators with appropriate permissions can access the decrypted data after authentication and access checks. A globally unique identifier, GLB-TRC-YYYY0102-001, is assigned to each target photometric value. This identifier is associated with the unique traceability code, supporting cross-system data traceability and access control. The final target photometric dataset not only possesses high-precision detection data but also a comprehensive quality traceability system and strict access control mechanism, meeting all requirements for laboratory accreditation and quality management.

[0039] In an optional embodiment, the quantitative analysis results, multiple detection wavelengths, detection scanning interval parameters, and operator identity information are subjected to time-series permission association processing to generate an audit trail record. Specifically, this includes: obtaining the second timestamp information when the quantitative analysis results were generated, and using the second timestamp information to time-series mark the quantitative analysis results, multiple detection wavelengths, and detection scanning interval parameters to generate a detection dataset carrying an analysis process time sequence identifier; querying a preset permission database using the identity information to obtain the analysis permission level and result access scope corresponding to the operator; determining the visibility permission attribute and modification permission attribute of the detection dataset based on the analysis permission level and result access scope; binding the detection dataset with the identity information to obtain a permission dataset with an operator identifier; performing integrity verification on the permission dataset according to preset audit requirements to generate a verification result including a data integrity identifier and an operation compliance identifier; and storing the permission dataset, visibility permission attribute, modification permission attribute, and verification result in a structured manner according to the time sequence to generate an audit trail record.

[0040] Among them, the second timestamp information represents the time marker of the generation time of the quantitative analysis results, specifically including the analysis start timestamp, analysis completion timestamp, and result output timestamp; the time sequence marker refers to the processing method of identifying data according to time order, specifically including incremental sequence markers, time difference markers, and relative time sequence markers; the analysis process time sequence marker is used to represent the identifiers used to mark the time order of each stage of the analysis process, specifically including preprocessing time sequence markers, calculation time sequence markers, and postprocessing time sequence markers; the detection dataset represents a structured data set containing complete detection information, specifically including the original dataset, the processed dataset, and the result dataset; the permission database refers to... A dedicated database stores user permission information, specifically including role permission database, function permission database, and data permission database; analysis permission levels indicate the level of authorization for operators to perform data analysis, specifically including basic analysis permissions, advanced analysis permissions, and expert analysis permissions; result access scope indicates the range of result data that operators can view and use, specifically including personal result scope, departmental result scope, and global result scope; visibility permission attributes refer to permission features that control the degree of data visualization, specifically including fully visible attributes, partially visible attributes, and invisible attributes; modification permission attributes indicate permission features that control the ability to edit data, specifically including fully modify attributes, restricted modify attributes, and read-only attributes; permission identity binding indicates a security mechanism that associates data with a specific user identity, specifically including digital signature binding, identity authentication binding, and role identifier binding; permission datasets refer to data sets containing permission control information, specifically including user permission datasets, role permission datasets, and resource permission datasets; audit requirements indicate the quality management system's standardized requirements for data integrity, specifically including ISO audit requirements, GLP audit requirements, and FDA audit requirements; integrity verification indicates the technical process for verifying that data has not been tampered with, specifically including hash value verification, digital signature verification, etc. Verification and validation, etc.; Data integrity identifiers are verification marks that indicate that data has not been corrupted, specifically including integrity pass identifiers, integrity anomaly identifiers, and integrity unknown identifiers; Operational compliance identifiers are verification marks used to indicate that the operation process complies with the specifications, specifically including compliant operation identifiers, non-compliant operation identifiers, and operation pending review identifiers; Verification results represent the comprehensive evaluation results of integrity and compliance checks, specifically including verification pass results, verification failure results, and verification warning results; Structured storage refers to the storage method of organizing data according to a predetermined format and hierarchy, specifically including relational structured storage, XML structured storage, and JSON structured storage. In the above embodiment, a UV-Vis spectrophotometer is continued to be used to detect the total phosphorus content in the effluent from the urban wastewater treatment plant. Assuming the quantitative analysis results have been calculated, yielding a total phosphorus concentration of 1.000 mg / L, a detection uncertainty of ±0.025 mg / L, and a quality control level of Level 1 accuracy, time-series access control processing and audit trail generation are required. At the instant the quantitative analysis results are generated, a second timestamp is obtained using a high-precision clock synchronized via a network time protocol. The analysis start timestamp is recorded as YYYY-01-02T02:15:35.245Z, indicating the moment the photometric value calculation formula begins. The analysis completion timestamp is YYYY-01-02T02:15:37.892Z, indicating the moment the detection accuracy assessment is completed. The result output timestamp is YYYY-01-02T02:15:38.156Z, indicating the moment the quantitative analysis results are fully generated and ready for output. The quantitative analysis results are time-stamped based on the second timestamp information. The total phosphorus concentration of 1.000 mg / L is labeled T2_RESULT_001, the detection uncertainty of ±0.025 mg / L is labeled T2_RESULT_002, and the quality control level is labeled T2_RESULT_003. The time-series labeling uses an incremental numbering method to ensure the traceability of the data generation order. Multiple detection wavelengths are time-series labeled. The primary characteristic wavelength of 700 nm is labeled T2_WAVE_001, the auxiliary wavelength of 680 nm is labeled T2_WAVE_002, and the reference wavelength of 720 nm is labeled T2_WAVE_003. The detection time for each wavelength is recorded; the timestamp for the 700 nm wavelength is YYYY-01-02T02:15:30.456Z. The detection scan interval parameter is also time-series labeled. The first segment scan interval of 0.5 nm is labeled T2_PARAM_001, the third segment scan interval of 0.2 nm is labeled T2_PARAM_002, and the fifth segment scan interval of 1.0 nm is labeled T2_PARAM_003. Each parameter is associated with its usage time in the analysis flow. Analysis flow timing identifiers are generated: the preprocessing timing identifier is PREPROC_T2_YYYY0102_021535, indicating the timing position of the data preprocessing stage; the computation timing identifier is CALC_T2_YYYY0102_021536, indicating the timing position of the core computation stage; and the postprocessing timing identifier is POSTPROC_T2_YYYY0102_021537, indicating the timing position of the result postprocessing stage. All labeled information is integrated to generate a detection dataset carrying the analysis flow timing identifiers. The dataset contains 1055 photometric data points, each carrying precise time-series markers and process identifiers to ensure that the timeline of the entire analysis process is fully traceable.

[0041] In the above embodiment, the operator's identity information ANALYST_001 is used to query the preset permission database. This permission database is deployed on the laboratory quality management server and includes four core data tables: user table, role table, permission table, and permission mapping table. First, the basic information of operator Zhang Moumou is queried from the user table: user identifier is ANALYST_001, real name is Zhang Moumou, department is water quality testing department, date of employment is March 15, 2017, and last login time is YYYY-01-02T02:10:00Z. The role information assigned to this operator is queried from the role table. Zhang Moumou is assigned the role of Level 2 Analyst, with the role code ANALYST_L2. The role description is a mid-level technician with routine water quality parameter testing and data analysis capabilities, and the role is valid from January 1, 2017 to December 31, 2017. The analysis permission level corresponding to the Level 2 Analyst role is queried through the permission mapping table. This role has standard analysis permissions, with the permission level code ANALYSIS_STD. Specific permissions include: performing routine testing analyses, calculating concentrations using preset standard curves, viewing and exporting self-completed analysis results, and generating standard format test reports. The query checks the operator's result access scope. According to the permission configuration, Zhang's result access scope is personal, with the scope code ACCESS_PERSONAL. Specific restrictions include: only accessing self-completed test and analysis results; not viewing other operators' work data, not accessing historical archive data, and not viewing quality control statistics. The complete permission query process is recorded. The query start time is YYYY-01-02T02:15:38.200Z, the database response time is 15 milliseconds, and the query result return time is YYYY-01-02T02:15:38.215Z. The permission verification status is VALID, indicating that the operator's permissions are valid and not frozen.

[0042] In the above embodiments, the visibility permission attribute of the test dataset is determined based on the standard analysis permission level and the access scope of individual results. Since the operator has standard analysis permissions and the data belongs to their personal operation results, the visibility permission attribute is set to fully visible, with the attribute code VISIBLE_FULL. The modification permission attribute of the test dataset is determined. According to laboratory quality management regulations, completed quantitative analysis results are final data and cannot be modified afterwards to ensure data integrity. Therefore, the modification permission attribute is set to read-only, with the attribute code READONLY_FINAL. The export permission attribute is set for the test dataset. Since the operator has report generation permissions, the export permission attribute is set to allow export, with the attribute code EXPORT_ALLOWED. The export format is restricted to PDF report format and Excel data format; raw photometric value data cannot be exported. The data sharing permission attribute is set. Based on the restrictions on the access scope of individual results, the data sharing permission attribute is set to prohibit sharing, with the attribute code SHARE_DENIED. This data cannot be directly accessed by other operators, nor can it be uploaded to external systems. Generate a summary of permission attributes. The overall permission description for the test dataset is as follows: Operator Zhang has full viewing permission for the total phosphorus test results of sample WW-YYYY-0102-001, and export permission in PDF and Excel formats. However, he does not have data modification permission or data sharing permission. Bind the test dataset to the operator's identity information to their permissions. First, generate a hash digest of the test dataset. Use the secure hash algorithm 256 to hash the complete dataset containing 1055 photometric values, generating a 256-bit hash value: E3F4A5B6C7D8E9F0A1B2C3D4E5F6A7B8C9D0E1F2A3B4C5D6E7F8A9B0C1D2E3F4. Encrypt and sign the hash digest using operator Zhang's RSA private key to generate a digital signature value. Bind the digital signature value to the operator's identity information. The binding information includes: operator employee number ANALYST_001, digital certificate serial number CERT_YYYY0101_001, signature timestamp YYYY-01-02T02:15:38.300Z, and signature algorithm identifier RSA-SHA256. An access control dataset with operator identification is generated. This dataset contains not only the original detection data but also complete access control information, identity binding information, and digital signature information. A unique identifier PERM_DS_YYYY0102_021538_001 is assigned to the access control dataset. This identifier is associated with the previously generated unique traceability code to ensure a complete traceability chain for the data.

[0043] In an optional embodiment, the operator-input photometric value calculation formula, which includes multiple detection wavelengths, is obtained, and the target spectrophotometer is controlled to perform reference photometric scanning detection on the standard water quality sample according to multiple detection wavelengths to obtain the initial photometric value at each detection wavelength. Specifically, this includes: obtaining the water quality testing item type selected by the operator through the user settings module, and retrieving the default calculation formula template from the standard curve library according to the water quality testing item type; obtaining the photometric value calculation formula generated after the operator customizes the default calculation formula template through the user settings module; performing syntax and logic verification on the photometric value calculation formula, so that if the syntax and logic verification passes, the photometric value is... The calculation formula is stored in a custom curve library, and a unique formula identifier is generated for each photometric value calculation formula. A scanning control sequence is generated based on multiple detection wavelengths, including the acquisition time, scanning order, and light source intensity parameters for each detection wavelength. The target spectrophotometer is controlled to preheat and stabilize the light source system according to the light source intensity parameters. After the light intensity fluctuation rate of the light source system meets the preset stability conditions, the standard water quality sample is scanned according to the scanning control sequence to obtain multiple sets of raw photometric values. Data quality optimization processing is performed on the multiple sets of raw photometric values ​​to obtain initial photometric values, and the initial photometric values ​​are associated with the unique formula identifier and stored in the custom curve library.

[0044] The user settings module represents the software interface for operators to configure parameters and set options, specifically including parameter setting, formula editing, and permission configuration modules. Water quality testing item types refer to different categories of water quality indicator testing, specifically including heavy metal testing, organic matter testing, and nutrient testing. The standard curve library represents a database storing various calibration curves, specifically including national standard curve libraries, industry standard curve libraries, and enterprise standard curve libraries. The default calculation formula template represents the system's pre-set standardized calculation formula framework, specifically including linear regression templates, multinomial fitting templates, and exponential function templates. Custom modification refers to the process by which operators personalize the templates according to actual needs, specifically including parameter settings. The functions include: number modification, coefficient adjustment, function change, etc.; syntax and logic verification is used to represent the process of checking the correctness and rationality of the formula, specifically including syntax error verification, logical relationship verification, numerical range verification, etc.; custom curve library represents a dedicated database storing user-built calibration curves, specifically including personal curve library, departmental curve library, project curve library, etc.; formula unique identifier code is a unique code used to distinguish different calculation formulas, specifically including UUID format identifier code, timestamp identifier code, hash value identifier code, etc.; scan control sequence is used to represent the instruction sequence for controlling the spectral scanning process, specifically including wavelength switching sequence, time control sequence, power adjustment sequence, etc.; acquisition time represents the length of time for data acquisition at each wavelength point. Specifically, this includes integration time, averaging time, and total acquisition time; scanning sequence refers to the order in which multiple wavelength points are detected, specifically including incremental scanning sequence, decremental scanning sequence, and skip scanning sequence; light source intensity parameters are used to represent the technical parameters controlling the output power of the light source, specifically including current intensity parameters, voltage intensity parameters, and power percentage parameters; the light source system refers to the hardware system in the spectrophotometer that generates the detection light, specifically including tungsten lamp light source system, deuterium lamp light source system, and LED light source system; preheating and stabilization treatment refers to the preparatory process to bring the light source to a stable working state, specifically including temperature stabilization treatment, light intensity stabilization treatment, and wavelength stabilization treatment; light intensity fluctuation rate is used to represent the degree of change in the output intensity of the light source. The metrics include short-term volatility, long-term volatility, and peak volatility; stability conditions refer to the standard requirements for judging whether a light source has reached a stable state, including volatility threshold conditions, temperature stability conditions, and time stability conditions; raw photometric values ​​refer to the detection data directly output by the spectrophotometer without any processing, including raw values ​​of transmission intensity, reflection intensity, and scattering intensity; data quality optimization processing refers to post-processing techniques used to improve the quality of detection data, including noise filtering, outlier removal, and smoothing interpolation; associative storage refers to a storage method that establishes relationships between related data and saves them uniformly, including primary key associative storage, foreign key associative storage, and index associative storage.

[0045] In the above embodiment, it is assumed that a custom detection method for total phosphorus content in the effluent of an urban wastewater treatment plant needs to be established. The operator needs to optimize and adjust the standard detection method according to the actual sample characteristics to establish a quantitative analysis method suitable for local water quality characteristics. Operator Zhang can log in to the user settings module through the laboratory information management system. In the detection item configuration page of the user settings module, the operator selects the nutrient detection item type from the water quality detection item classification list. This classification includes common nutrient indicators such as total phosphorus, total nitrogen, ammonia nitrogen, nitrate nitrogen, and nitrite nitrogen, each with a corresponding standard detection method. Based on the nutrient detection item classification, the system automatically connects to the standard curve library database for querying. This standard curve library includes three sub-libraries: national standard curve library, industry standard curve library, and enterprise standard curve library. The default calculation formula template for total phosphorus detection is retrieved from the national standard curve library. This default calculation formula template is suitable for the determination of total phosphorus content in surface water, groundwater, and wastewater. The specific content of this default calculation formula template is a linear regression template: the concentration value equals the slope coefficient multiplied by the absorbance value plus the intercept coefficient. The default calculation formula template pre-sets a detection wavelength of 700nm for single-wavelength detection, an initial slope coefficient of 1.000, an initial intercept coefficient of 0.000, and a linear correlation coefficient greater than 0.995. The template's applicable range information is displayed: detection limit of 0.01 mg / L, measurement range of 0.01-1.00 mg / L, detection accuracy of relative standard deviation less than 5%, and interfering substances including silicates and arsenates. The operator confirms that this default calculation formula template is suitable as the basic framework for custom methods.

[0046] In the above embodiment, the operator customizes the default calculation formula template using the formula editor function of the user settings module. This editor provides a visual formula construction interface, supports drag-and-drop operations, and real-time syntax checking. The operator first modifies the detection wavelength configuration. Considering the high concentration of organic matter interference in the effluent from the local wastewater treatment plant, the operator changes the single-wavelength detection to a multi-wavelength detection mode. The main detection wavelength remains unchanged at 700nm, a reference wavelength of 720nm is added to eliminate background interference, and a calibration wavelength of 680nm is added to improve detection accuracy. The operator then modifies the mathematical expression of the calculation formula, changing the original single-wavelength linear formula concentration = K × A. 700 +B is modified to the multi-wavelength difference formula: concentration = K × (A) 700 -A 720 )+C×(A 700 -A 680 )+B. Where A 700 A 720 A 680These represent the absorbance values ​​at wavelengths of 700nm, 720nm, and 680nm, respectively, with K, C, and B being the regression coefficients to be determined. The operator sets the coefficient constraints for the formula. The principal coefficient K is set to a range of 0.500-2.000, the correction coefficient C to a range of -0.500-0.500, and the intercept coefficient B to a range of -0.100-0.100. These constraints are determined based on theoretical calculations and empirical data to ensure the formula's physical meaning is reasonable. The operator configures the quality control parameters. The linear correlation coefficient is set to be greater than 0.998, the relative standard deviation to be less than 3%, and the detection limit to be less than 0.005 mg / L. These parameters are stricter than national standards to meet the needs of high-precision testing. After the operator completes the custom modifications, the final photometric value calculation formula is generated: TP_Conc=1.250×(A700-A720)+0.150×(A700-A680)-0.025. This formula includes three detection wavelengths: 700nm, 720nm, and 680nm, and three regression coefficients: 1.250, 0.150, and -0.025. A comprehensive syntax and logic check is performed on the custom-generated photometric value calculation formula. First, a syntax error check is performed to check whether the mathematical operators, parentheses matching, variable naming, and other syntactic elements in the formula conform to the specifications. The wavelength variable definitions in the formula are verified. It is checked whether the three variables A700, A720, and A680 are within the wavelength range supported by the system. It is confirmed that 700nm, 720nm, and 680nm are all within the operating wavelength range of the UV-Vis spectrophotometer (200-900nm), and the syntax check passes. A logical relationship check is performed to verify whether the mathematical logic of the formula is reasonable. The calculation of the difference between the main detection wavelength (700nm) and the reference wavelength (720nm) was checked to ensure it conformed to the basic principles of spectrophotometry. It was confirmed that the difference calculation effectively eliminated background interference, and the logic verification passed. Numerical range verification was performed to verify that the regression coefficients were within a reasonable range. The main coefficient 1.250 was within the set range of 0.500-2.000, the correction coefficient 0.150 was within the set range of -0.500-0.500, and the intercept coefficient -0.025 was within the set range of -0.100-0.100; the numerical verification passed. A physical meaning verification was performed to verify that the formula conformed to the basic requirements of the Lambert-Beer Law. It was confirmed that the linear relationship between absorbance and concentration conformed to the theoretical basis of spectrophotometry, and the physical meaning verification passed. After all syntax and logic verifications passed, the photometric value calculation formula was stored in a custom curve library. The table structure in this custom curve library includes fields such as formula identifier, formula content, creation time, operator information, and verification status. Generate a unique formula identifier for the photometric value calculation formula: 550e8400-e29b-41d4-a716-446655440000.

[0047] In the above embodiments, a detailed scanning control sequence is generated based on multiple detection wavelengths (700nm, 720nm, and 680nm) in the photometric value calculation formula. This sequence includes specific detection parameters and control commands for each wavelength. The acquisition time parameters for each detection wavelength are determined. For the main detection wavelength of 700nm, the integration time is set to 100 milliseconds, the average number of scans is 5, and the total acquisition time is 500 milliseconds. For the reference wavelength of 720nm, the integration time is set to 80 milliseconds, the average number of scans is 3, and the total acquisition time is 240 milliseconds. For the calibration wavelength of 680nm, the integration time is set to 120 milliseconds, the average number of scans is 4, and the total acquisition time is 480 milliseconds. The scanning sequence is arranged to optimize detection efficiency. An incremental scanning sequence is adopted, performing detection in the order of 680nm, 700nm, and 720nm. This sequence arrangement reduces grating rotation time and improves scanning efficiency; a single complete scan takes approximately 1.5 seconds. The light source intensity parameters for each wavelength are calculated. Based on the spectral characteristic curve of the tungsten lamp light source, the light source current was set to 6.5 amps at 680 nm, 6.2 amps at 700 nm, and 5.8 amps at 720 nm. These parameters ensure that the light intensity at each wavelength reaches the optimal signal-to-noise ratio. A complete scan control sequence instruction set was generated. The first instruction was to rotate the grating to the 680 nm position, set the light source current to 6.5 amps, and perform 4 integration detections over 120 milliseconds. The second instruction was to rotate the grating to the 700 nm position, set the light source current to 6.2 amps, and perform 5 integration detections over 100 milliseconds. The third instruction was to rotate the grating to the 720 nm position, set the light source current to 5.8 amps, and perform 3 integration detections over 80 milliseconds. The light source system of the target spectrophotometer was preheated and stabilized according to the light source intensity parameters. This spectrophotometer is equipped with a dual light source system, including a tungsten lamp light source and a deuterium lamp light source, with a working wavelength range of 190-900 nm. The tungsten lamp light source is turned on, with the operating current set to 6.5 amps, the operating voltage to 12.0 volts, and the power to approximately 78 watts. The tungsten lamp filament temperature gradually rises to 2800 Kelvin, and the spectral output gradually stabilizes. Real-time parameters of the light source are monitored, including current stability, voltage fluctuation, and light intensity output. Temperature stabilization processing is performed; the tungsten lamp filament temperature requires 15 minutes to reach thermal equilibrium, and the system continuously monitors the temperature change of the light source cavity. When the temperature change rate is less than 0.1 Kelvin per minute, the temperature stabilization condition is considered met. Light intensity stabilization processing is then performed, using a built-in silicon photodiode monitor to detect the light source output intensity in real time and calculate the light intensity fluctuation rate. At a reference wavelength of 700 nm, the short-term fluctuation rate of light intensity (within 1 minute) is required to be less than 0.1%, and the long-term fluctuation rate (within 30 minutes) is required to be less than 0.5%.After monitoring the achievement of preset stability conditions and undergoing 18 minutes of preheating, the light intensity fluctuation rate of the tungsten lamp light source dropped to 0.08%, meeting the stability requirement of less than 0.1%. This confirmed that the light source system had reached a stable working state, and formal photometric scanning and testing could begin.

[0048] In the above embodiment, the target spectrophotometer is controlled to perform photometric scanning on the standard water sample according to the scanning control sequence. The standard water sample is a potassium dihydrogen phosphate standard solution with a total phosphorus concentration of 0.500 mg / L, which has been treated with ammonium molybdate colorimetric reaction. The first scan command is executed, rotating the monochromator grating to the 680 nm position. The grating rotation accuracy is ±0.1 nm, and the rotation time is 0.8 seconds. After reaching the target position, the light source current is set to 6.5 amperes, and integration detection begins. Four repeated detections are performed at the 680 nm wavelength, with each integration time being 120 milliseconds. The first detection yields a light intensity value of 2.1450 volts, the second 2.1465 volts, the third 2.1440 volts, and the fourth 2.1455 volts. The average value of the four detections is calculated to be 2.1453 volts. The second scan command is executed, rotating the grating to the 700 nm position. The rotation time is 0.6 seconds, and the position accuracy is ±0.1 nm. The light source current was adjusted to 6.2 amps, and five repeated detections were performed, each with an integration time of 100 milliseconds. Five detection results were obtained at the main detection wavelength of 700 nm: 2.0850 volts, 2.0865 volts, 2.0845 volts, 2.0860 volts, and 2.0855 volts. The calculated average value was 2.0855 volts, with a relative standard deviation of 0.38%, meeting the accuracy requirements. The third scan command was executed, rotating the grating to the 720 nm position. The rotation time was 0.5 seconds. The system adjusted the light source current to 5.8 amps and performed three repeated detections, each with an integration time of 80 milliseconds. Detection results were obtained at the 720 nm reference wavelength: 2.1520 volts, 2.1535 volts, and 2.1525 volts, with an average value of 2.1527 volts. A complete multi-wavelength scan was completed in approximately 3.2 seconds. The obtained raw photometric values ​​are: A680 = 2.1453V, A700 = 2.0855V, and A720 = 2.1527V. These values ​​represent the light intensity response of the standard sample at three characteristic wavelengths.

[0049] In the above embodiment, data quality optimization processing was performed on multiple sets of raw photometric values. First, noise filtering was performed, using a 5-point moving average filtering algorithm to eliminate high-frequency noise interference. Since this detection was a discrete wavelength point detection, statistical filtering was applied to the repeated detection results for each wavelength. Outlier removal was performed using the 3σ criterion to detect abnormal data points. The standard deviation of each set of detection data was calculated, and outliers deviating from the average by more than 3 times the standard deviation were removed. After verification, all detection data were within the normal range, and no outliers needed to be removed. At a wavelength of 680nm, the standard deviation of the four detections was 0.0010 volts, and 3 times the standard deviation was 0.0030 volts. All detection values ​​deviated from the average value of 2.1453 volts by less than 0.0030 volts. At a wavelength of 700nm, the standard deviation of the five detections was 0.0008 volts, and 3 times the standard deviation was 0.0024 volts. All detection values ​​were within the normal range. The standard deviation of the three measurements at 720 nm was 0.0008 volts, and the three-fold standard deviation was 0.0024 volts, with no outliers. Smoothing interpolation was performed to improve data quality. Although the measurements were performed at discrete wavelengths, cubic spline interpolation smoothing was applied to the time series data at each wavelength to eliminate data jitter caused by minor fluctuations in the light source and detector noise. Baseline correction was performed using the results of the blank control sample (deionized water treated with the same colorimetric method) as a baseline reference. The light intensity values ​​of the blank sample at wavelengths of 680 nm, 700 nm, and 720 nm were 2.1580 volts, 2.1720 volts, and 2.1650 volts, respectively. The corrected net light intensity values ​​are calculated as follows: 2.1453 - 2.1580 = -0.0127 volts at 680 nm, 2.0855 - 2.1720 = -0.0865 volts at 700 nm, and 2.1527 - 2.1650 = -0.0123 volts at 720 nm. Negative values ​​indicate positive absorbance of the standard sample, conforming to the Lambert-Beer Law. The net light intensity values ​​are then converted to absorbance values ​​using the absorbance calculation formula A = -log[…]. 10 (I / I0), where I is the transmitted light intensity and I0 is the incident light intensity. The absorbance A at a wavelength of 680 nm. 680 =0.0057, absorbance A at 700nm wavelength 700 =0.0389, absorbance A at 720nm wavelength 720 =0.0055. After completing data quality optimization, the final initial photometric value is obtained: A. 680 =0.0057, A 700 =0.0389, A 720=0.0055. These values ​​have undergone multiple optimization processes including noise filtering, outlier removal, smoothing interpolation, and baseline correction. The initial photometric value is stored in association with the formula's unique identifier. A new data record is created in the custom curve library, with the primary key being the formula's unique identifier 550e8400-e29b-41d4-a716-446655440000. The associated fields include: detection timestamp YYYY-01-02T02:20:15.456Z, standard sample concentration 0.500 mg / L, and initial photometric value A. 680 =0.0057, A 700 =0.0389, A 720 =0.0055, Operator ID ANALYST_001, Instrument Number UV-VIS-001. A foreign key association is established, linking the initial photometric value record with the photometric calculation formula record through a unique formula identifier. This associated storage method ensures a complete traceability chain between the calculation formula and its corresponding calibration data, providing a reliable data foundation for subsequent quantitative analysis. A data integrity check code is generated. A SHA-256 hash operation is performed on the complete record containing the initial photometric value to generate the check code A1B2C3D4E5F6789012345678901234567890ABCDEF1234567890ABCDEF12, ensuring the integrity and tamper-proof nature of the stored data. The associated storage operation is completed, the database transaction is successfully committed, and the initial photometric value has been securely stored in the custom curve library, establishing a complete association with the photometric calculation formula.

[0050] It should also be noted that the embodiments described above are only some embodiments of this application, and not all embodiments. The present application will be described in detail below with reference to specific embodiments.

[0051] This application provides a spectrophotometer, see reference. Figure 2 , Figure 2 This is a schematic diagram of the rear structure of a spectrophotometer according to an embodiment of this application. The rear of the spectrophotometer includes a power switch, a power interface, an RS232 interface, a square USB interface, and a USB interface. These interfaces can be used for power connection, data transmission, and other operations, providing support for power supply, communication with external devices (such as computers), and data storage. The spectrophotometer includes the following functions: Water quality analysis function: Utilizing the different absorption degrees of different substances to different wavelengths of light, quantitative analysis of target substances is performed (including NFC rapid water quality analysis function). It has more than 40 built-in water quality items and nearly 100 quantitative curves that can be directly called up. Sample analysis can be performed directly with reagents.

[0052] Multi-wavelength detection function: used to detect the photometric value of the sample. The photometric value can be calculated using a custom method, and up to 9 wavelengths can participate in the test simultaneously.

[0053] The software utilizes NFC tags to store information and enable automatic identification, data reading, and result saving: During colorimetric tube testing, attach the NFC tag to the upper 1 / 3 of the test tube and write the NFC tag information. Depending on whether the test sample is a sample or a blank sample, select [Sample] or [Zeroing], enter the NFC tag information to be saved, and click [Write] to save directly. For the next test, simply insert the colorimetric tube into the software's main interface, quickly close the sample chamber lid, and the software will automatically read the data from the written NFC tag and save the test results.

[0054] To address the issue that traditional spectrophotometers cannot meet the needs of users who define photometric value calculation formulas, thus limiting their application in innovative research and specialized calculations, this embodiment also provides a control flow for the spectrophotometer control system that allows for the customization of photometric value calculation formulas. This flow specifically includes the following steps: S1. The user settings module allows users to create or edit custom calculation formulas for photometric values, with up to 9 wavelengths of photometric value calculations set. S2. The set formulas are saved to the curve library and can be directly called in subsequent quantitative measurements or multi-wavelength tests; S3. Curve fitting supports multiple methods, including linear fitting, linear zero-crossing fitting, exponential fitting, and logarithmic fitting, to meet the needs of different scenarios; S4. The photometer control software integrates a user management module with audit trail functionality, distinguishing between administrator and operator roles to ensure data security and instrument operation safety.

[0055] In practice, users can freely set custom formulas. For example, for measuring the concentration of specific biological samples, users can create complex formulas that include photometric values ​​calculated at multiple wavelengths based on sample characteristics and preliminary experimental results, and apply them to the multi-wavelength measurement module to obtain more accurate concentration data. Furthermore, the system's built-in audit trail function records every operation and parameter adjustment, facilitating traceability and management. Further, to address data security and instrument flexibility, the functionality of user management and the user center can be improved to enhance both. Specifically, the audit trail function is enhanced by recording detailed information on every login, operation, and parameter change, ensuring traceability at every step; user permission allocation is optimized by introducing a more granular permission control mechanism, allowing administrators to customize access permissions for each operator to adapt to different laboratory workflows; and the system's self-checking function is strengthened by automatically performing instrument status checks each time the software is started, quickly locating potential fault points and ensuring the instrument is in optimal working condition. To improve measurement accuracy and user experience, intelligent algorithms can be used to optimize spectral scanning interval settings to reduce data processing errors. This involves intelligently analyzing full-band scanning data and automatically identifying the optimal scanning interval to minimize signal noise and improve measurement accuracy. Specifically, preliminary full-band scanning data is collected, and a suitable wavelength range is selected based on preset signal quality indicators; intelligent algorithms are applied to analyze the signal variation trend within the selected wavelength range to determine the relationship between signal quality and scanning interval; based on the analysis results, the scanning interval is dynamically adjusted to achieve the optimal balance between signal quality and measurement speed.

[0056] This application's embodiments enable real-time acquisition of the operator-input photometric value calculation formula, allowing comprehensive control of the target spectrophotometer for baseline photometric scanning. The photometric value calculation formula contains rich detection parameter information, generating a scanning control sequence based on multiple detection wavelengths. This allows for clear planning of the acquisition time, scanning sequence, and light source intensity parameters for each wavelength, while also clarifying the stability conditions of the light source system and accurately controlling the spectrophotometer's operating status. Furthermore, based on the scanning control sequence, photometric scanning of standard water samples is performed, rationally acquiring the raw photometric values ​​at each detection wavelength, and optimizing the data quality. This comprehensive and orderly acquisition of initial photometric values ​​provides a solid data foundation for subsequent quantitative analysis, ensuring the accuracy and reliability of the analytical results.

[0057] The electronic device in the embodiments of this invention is described below from the perspective of hardware processing. (See attached document.) Figure 3 , Figure 3 This is a schematic diagram of the physical device structure of an electronic device in an embodiment of this application.

[0058] It should be noted that, Figure 3The structure of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0059] like Figure 3 As shown, the electronic device includes a Central Processing Unit (CPU) 301, which can perform various appropriate actions and processes according to a program stored in Read-Only Memory (ROM) 302 or a program loaded from storage portion 308 into Random Access Memory (RAM) 303, such as performing the methods described in the above embodiments. The RAM 303 also stores... It contains various programs and data required for system operation. The CPU 301, ROM 302, and RAM 303 are interconnected via bus 304. The input / output (I / O) interface 305 is also connected to bus 304.

[0060] The following components are connected to I / O interface 305: input section 306 including audio input devices, push-button switches, etc.; output section 307 including a liquid crystal display (LCD) and audio output devices, indicator lights, etc.; storage section 308 including a hard disk, etc.; and communication section 309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. Communication section 309 performs communication processing via a network such as the Internet. Drive 310 is also connected to I / O interface 305 as needed. Removable media 311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 310 as needed so that computer programs read from them can be installed into storage section 308 as needed.

[0061] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 309, and / or installed from removable medium 311. When the computer program is executed by central processing unit (CPU) 301, it performs the various functions defined in the present invention.

[0062] It should be noted that specific examples of computer-readable storage media may include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0063] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those shown in the drawings.

[0064] Specifically, the electronic device in this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, it implements the water quality detection and control method based on a spectrophotometer provided in the above embodiment.

[0065] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The storage medium carries one or more computer programs that, when executed by a processor of the electronic device, cause the electronic device to implement the spectrophotometer-based water quality detection and control method provided in the above embodiments.

[0066] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0067] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A water quality detection and control method based on a spectrophotometer, characterized in that, include: The operator inputs a photometric value calculation formula including multiple detection wavelengths, and controls the target spectrophotometer to perform a reference photometric scan on the standard water quality sample according to the multiple detection wavelengths to obtain the initial photometric value at each detection wavelength. Signal quality analysis is performed on the initial photometric value to obtain the detection scanning interval parameter, and the target spectrophotometer is controlled to perform adaptive photometric scanning detection on the water quality sample to be tested according to the detection scanning interval parameter to obtain the target photometric value. The target photometric value is calculated using the aforementioned photometric value calculation formula to obtain the quantitative analysis results of the water quality sample to be tested. The quantitative analysis results, the multiple detection wavelengths, the detection scanning interval parameters, and the operator's identity information are processed by time-series permission association to generate an audit trail record.

2. The method according to claim 1, characterized in that, The step of performing signal quality analysis on the initial photometric value to obtain the detection scanning interval parameter specifically includes: The initial photometric value is screened across the entire wavelength range based on a preset signal quality index in order to determine the effective wavelength range that matches the water quality sample to be tested from the multiple detection wavelengths. Signal features are extracted from the initial photometric values ​​within the effective wavelength range to obtain the signal variation trend and noise distribution characteristics within the effective wavelength range; The matching relationship between the signal-to-noise ratio and the detection scanning interval at each wavelength sampling point within the effective wavelength range is determined based on the signal variation trend and the noise distribution characteristics. The detection scanning interval parameter for each wavelength segment corresponding to each wavelength sampling point within the effective wavelength range is determined based on the matching relationship.

3. The method according to claim 2, characterized in that, The step of calculating the target photometric value using the photometric value calculation formula to obtain the quantitative analysis results of the water quality sample to be tested specifically includes: Substitute the target photometric value into the photometric value calculation formula to obtain the absorbance value of the water quality sample to be tested at the multiple detection wavelengths; Based on the signal change trend and the noise distribution characteristics, the absorbance value is adaptively corrected to obtain the corrected absorbance value. The corrected absorbance value is subjected to spectral separation processing based on the spectral interference characteristics within the effective wavelength range to obtain the purified absorbance value. The concentration of the target substance in the water sample to be tested is obtained by converting the purified absorbance value into a concentration using a preset standard curve. The detection accuracy of the concentration value is evaluated using the detection scanning interval parameter to obtain the detection uncertainty and quality control level. The concentration value, the detection uncertainty, and the quality control level are used as the results of the quantitative analysis.

4. The method according to claim 1, characterized in that, The target spectrophotometer performs adaptive photometric scanning detection on the water quality sample to be tested according to the detection scanning interval parameters to obtain the target photometric value, specifically including: The wireless identification tag attached to the colorimetric tube containing the water quality sample to be tested is read to obtain the sample identification information and test type mark pre-written on the wireless identification tag. The test type mark includes a sample test mark or a zeroing test mark. When the test type is marked as zero calibration test, the target spectrophotometer is controlled to calibrate and test the blank water sample contained in the colorimetric tube to obtain the reference zero calibration value, and the reference zero calibration value is stored in the detection buffer area; When the test type is marked as sample test mark, the reference zero value is retrieved from the detection buffer, and the target spectrophotometer is controlled to perform compensated photometric scanning detection on the water quality sample to be tested according to the reference zero value and the detection scanning interval parameter to obtain the compensated photometric value. The compensated photometric value is associated with the sample identification information for traceability permissions to generate the target photometric value that includes sample traceability information.

5. The method according to claim 4, characterized in that, The step of associating the compensated photometric value with the sample identification information for traceability permissions to generate the target photometric value including sample traceability information specifically includes: Obtain the operator's detection permission level, and determine the data access permission attribute of the compensated photometric value based on the detection permission level; Obtain the first timestamp information when the compensated photometric scanning detection is completed, and perform unique encoding processing on the sample identification information, the compensated photometric value, the first timestamp information and the identity information to generate a unique traceability code; Establish an index mapping relationship between the unique traceability code and the data access permission attribute, and store the index mapping relationship in the traceability database; The unique traceability code, the compensated photometric value, and the sample identification information are fused using the index mapping relationship to generate the target photometric value.

6. The method according to claim 1, characterized in that, The step of performing time-series permission association processing on the quantitative analysis results, the multiple detection wavelengths, the detection scanning interval parameters, and the operator's identity information to generate an audit trail record specifically includes: The second timestamp information of the quantitative analysis result is obtained, and the quantitative analysis result, the multiple detection wavelengths and the detection scanning interval parameters are time-series marked according to the second timestamp information to generate a detection dataset carrying the analysis process time sequence identifier; The identity information is used to query a preset permission database to obtain the analysis permission level and result access scope corresponding to the operator; The visibility permission attribute and modification permission attribute of the detection dataset are determined based on the analysis permission level and the result access scope; The detection dataset is bound to the identity information for permission identification to obtain a permission dataset with operator identifier; The integrity of the permission dataset is verified according to the preset audit requirements, and a verification result including data integrity identifier and operation compliance identifier is generated. The permission dataset, the visible permission attribute, the modify permission attribute, and the verification result are stored in a structured manner according to the chronological order to generate the audit trail record.

7. The method according to claim 1, characterized in that, The process of acquiring the operator-input photometric value calculation formulas for multiple detection wavelengths and controlling the target spectrophotometer to perform reference photometric scanning detection on the standard water quality sample according to the multiple detection wavelengths to obtain the initial photometric values ​​at each detection wavelength specifically includes: The system obtains the water quality testing item type selected by the operator through the user settings module, and retrieves the default calculation formula template from the standard curve library according to the water quality testing item type. Obtain the photometric value calculation formula generated by the operator after customizing the default calculation formula template through the user settings module; The photometric value calculation formula is subjected to syntax and logic verification. When the syntax and logic verification passes, the photometric value calculation formula is stored in a custom curve library, and a unique formula identifier is generated for the photometric value calculation formula. A scanning control sequence is generated based on the multiple detection wavelengths, and the scanning control sequence includes the acquisition time, scanning order and light source intensity parameters for each detection wavelength; The target spectrophotometer is controlled to preheat and stabilize the light source system according to the light source intensity parameters. After the light intensity fluctuation rate of the light source system meets the preset stability conditions, the standard water quality sample is scanned according to the scanning control sequence to obtain multiple sets of original photometric values. The multiple sets of original photometric values ​​are subjected to data quality optimization processing to obtain the initial photometric values, and the initial photometric values ​​are associated with the formula unique identifier and stored in the custom curve library.

8. An electronic device, characterized in that, The electronic device includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the electronic device to perform the method as described in any one of claims 1-7.

9. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on an electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1-7.

10. A computer program product, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-7.