Water quality detection data processing method and device, computer equipment and storage medium
By building a regression prediction model in water quality testing and utilizing the transmitted light intensity data during the digestion temperature drop process, the predicted transmitted light intensity of the water body at room temperature can be quickly obtained, solving the problems of long cooling time and unstable results in the existing technology, and achieving fast and accurate water quality testing.
Patent Information
- Application Number
- CN202510917892.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-09-26
AI Technical Summary
Existing water quality testing methods take a long time to cool down to room temperature after high-temperature digestion, which leads to a longer detection cycle and reduced response efficiency. In addition, when measuring the transmitted light intensity before cooling, the analysis results are inaccurate and unstable, making it difficult to meet the real-time requirements of automated online analysis.
By obtaining the reference transmitted light intensity at multiple temperature points during the process of decreasing the digestion temperature to room temperature, a regression prediction model is constructed to perform linear regression prediction to obtain the predicted transmitted light intensity of the water body at room temperature. The water quality test results are determined based on the difference between the predicted transmitted light intensity and the reference absorbance.
It achieves rapid and stable water quality detection and judgment without waiting for natural or controlled cooling, improving detection efficiency and accuracy of results.
Smart Images

Figure CN120703012A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of water quality detection, and in particular to a water quality detection data processing method, device, computer equipment and storage medium. Background Art
[0002] In the field of water quality testing technology, it involves analyzing the concentration of pollutants in water samples through optical measurement, thereby achieving quantitative assessment of water pollution levels.
[0003] Related water quality detection methods directly measure the transmitted light intensity of water after high-temperature digestion and cooling to room temperature, and then combine it with the transmitted light intensity of pure water at room temperature to analyze the concentration of pollutants in the water sample. However, this method has the disadvantage of a long cooling process, which leads to an extended detection cycle and reduced response efficiency. Furthermore, if the corresponding transmitted light intensity is measured in advance before slowly dropping to room temperature, and used together with the transmitted light intensity of pure water at room temperature as the basis for analysis, the analysis results will be inaccurate and unstable. Based on this, this method is difficult to meet real-time requirements in automated online analysis scenarios. Summary of the Invention
[0004] Based on this, it is necessary to provide a water quality detection data processing method, device, computer equipment and computer-readable storage medium to address the above technical problems, so as to realize rapid and stable water quality detection and judgment of water bodies without waiting for natural or controlled cooling.
[0005] In a first aspect, the present application provides a water quality detection data processing method, comprising: After the current water body is digested by the digestion liquid at a preset digestion temperature, obtaining the reference transmitted light intensities corresponding to the current water body at multiple temperature points during the process of cooling from the digestion temperature to room temperature; Obtaining a regression prediction model for transmitted light intensity prediction, inputting a plurality of reference transmitted light intensities into the regression prediction model for linear regression prediction processing, and obtaining a predicted transmitted light intensity of the current water body at room temperature; The predicted absorbance of the current water body is determined based on the predicted transmitted light intensity, the reference absorbance of pure water at room temperature is obtained, and the water quality test result is obtained based on the difference between the predicted absorbance and the reference absorbance.
[0006] In a second aspect, the present application further provides a water quality detection data processing device, comprising: An acquisition module, configured to obtain, after the current water body is digested by a digestion solution at a preset digestion temperature, reference transmitted light intensities corresponding to the current water body at multiple temperature points during a process in which the current water body is cooled from the digestion temperature to room temperature; a prediction module, configured to obtain a regression prediction model for predicting transmitted light intensity, input a plurality of reference transmitted light intensities into the regression prediction model for performing linear regression prediction processing, and obtain a predicted transmitted light intensity of the current water body at room temperature; The comparison module is used to determine the predicted absorbance of the current water body according to the predicted transmitted light intensity, obtain the reference absorbance of pure water at room temperature, and obtain the water quality detection result according to the difference between the predicted absorbance and the reference absorbance.
[0007] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the above steps when executing the computer program.
[0008] In a fourth aspect, the present application also provides a computer-readable storage medium on which a computer program is stored, and the computer program implements the above steps when executed by a processor.
[0009] The above-mentioned water quality detection data processing method, device, computer equipment and computer-readable storage medium first obtain the reference transmitted light intensity at multiple temperature points in the process of the current water body dropping from the digestion temperature to room temperature, thereby obtaining optical response data with temperature distribution characteristics; secondly, by inputting multiple reference transmitted light intensities into a regression prediction model for linear regression prediction processing, the predicted transmitted light intensity of the current water body under room temperature conditions can be obtained by data extrapolation without actual measurement; thirdly, the predicted absorbance is obtained based on the predicted transmitted light intensity, and then the water quality detection result of the current water body can be quantified based on the difference between the predicted absorbance and the reference absorbance; based on this, by constructing a temperature-light intensity data sequence and combining it with the regression prediction method, the water body absorption behavior is indirectly quantified, thereby achieving rapid and stable water quality detection and judgment of the water body without waiting for natural or controlled cooling. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0011] Figure 1 Schematic diagram of a flow chart of a water quality detection data processing method in one embodiment; Figure 2 1 is a structural block diagram of a water quality detection data processing device in one embodiment. DETAILED DESCRIPTION
[0012] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0013] In one embodiment, Figure 1 As shown, a water quality detection data processing method is provided. This embodiment uses the method applied to a server as an example for illustration. It is understandable that the method can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps S101 to S103.
[0014] Step S101 , after the current water body is digested by a digestion solution at a preset digestion temperature, the reference transmitted light intensities corresponding to the current water body at multiple temperature points in the process of decreasing from the digestion temperature to room temperature are obtained.
[0015] Among them, the digestion solution refers to a mixture of chemical reagents used to assist in the release or transformation of specific components in water quality testing; the digestion temperature refers to the temperature threshold set for the heating reaction after the current water body and the digestion solution are mixed, in order to accelerate the chemical reaction process.
[0016] Among them, the current water body refers to the liquid sample to be tested, which usually comes from natural waters, industrial drainage or intermediates in the treatment process.
[0017] The reference transmitted light intensities corresponding to the multiple temperature points represent a set of transmitted light intensity values collected at each set temperature point during the process of the current water body temperature gradually decreasing from the digestion temperature.
[0018] For example, first, under specific digestion temperature conditions, the current water body is digested for a period of time using a digestion solution to ensure that the specific components in the current water body can be fully released or converted in the chemical reaction. Then, after the digestion process is completed, the overall temperature of the current water body will be in a preset high temperature state. At this time, a temperature drop process is set, that is, the current water body is naturally or controlled to cool to an ambient temperature close to room temperature. During the cooling process, the reference transmitted light intensity at multiple moments is recorded according to the set temperature intervals. Specifically, during the process of gradual temperature drop, several temperature nodes are set, for example, the reference transmitted light intensity of the current water body at the corresponding temperature is measured once every certain temperature interval, thereby establishing a discrete correspondence between temperature and reference transmitted light intensity. Finally, during the entire stage of the current water body temperature gradually dropping from the initial digestion temperature to close to room temperature, a set of reference data containing multiple temperature points and corresponding reference transmitted light intensities is formed. Based on this, a set of stable light intensity response data under the temperature gradient is obtained to accurately reflect the trend of optical characteristic changes of the current water body with temperature changes after the digestion process.
[0019] Step S102 , obtaining a regression prediction model for transmitted light intensity prediction, inputting a plurality of reference transmitted light intensities into the regression prediction model for linear regression prediction processing, and obtaining the predicted transmitted light intensity of the current water body at room temperature.
[0020] Among them, the regression prediction model represents a mathematical model used to establish a functional mapping relationship between input variables and target output variables, so as to infer the transmitted light intensity of the current water body at room temperature based on the reference transmitted light intensity values at multiple temperature points.
[0021] Among them, the predicted transmitted light intensity at room temperature represents an estimated value of the transmitted light intensity that the current water body may exhibit under room temperature conditions, calculated by the regression prediction model based on multiple reference transmitted light intensities, so as to avoid directly waiting for the water body to cool to room temperature before actual measurement.
[0022] For example, since it is not advisable to wait for the water body to cool naturally or under controlled conditions to room temperature before taking measurements in practical applications, a regression prediction method based on existing data is used to infer the corresponding light intensity under room temperature conditions. In this process, first, a regression prediction model is obtained based on the response relationship between temperature change and transmitted light intensity. The model form can be a linear structure to ensure the stability of the calculation and the controllability of the prediction. Then, multiple previously collected reference transmitted light intensities are input into the regression prediction model. The regression prediction model uses internal weight parameters and, based on the temperature-light intensity change trend learned from the response relationship between temperature change and transmitted light intensity during the training phase, maps the current input value to an estimated value of the light intensity under room temperature conditions, that is, the predicted transmitted light intensity. Based on this, the data source of the predicted transmitted light intensity has a clear temperature change background, thereby maintaining a certain degree of physical rationality.
[0023] Step S103, determining the predicted absorbance of the current water body according to the predicted transmitted light intensity, obtaining the reference absorbance of pure water at room temperature, and obtaining the water quality test result according to the difference between the predicted absorbance and the reference absorbance.
[0024] Among them, the predicted absorbance represents the absorption parameter converted based on the logarithmic relationship between the predicted transmitted light intensity and the corresponding incident light intensity, which is used to indirectly characterize the degree of light absorption of the current water body under room temperature conditions.
[0025] The reference absorbance refers to the room temperature absorbance benchmark value measured using a pure water sample under standard measurement conditions. It is used as a comparison item and compared with the predicted absorbance of the current water body to determine whether its optical response is abnormal.
[0026] Among them, the water quality test result represents the current water state classification result determined based on the difference between the predicted absorbance and the reference absorbance, such as light pollution, moderate pollution or heavy pollution, etc., which is used to reflect whether the current water body is polluted or has abnormal concentration.
[0027] For example, first, in a preset water quality analyzer, the incident light intensity of the fixed light source is determined. Then, based on the logarithmic relationship between the predicted transmitted light intensity and the incident light intensity, the predicted absorbance of the current water body at room temperature is converted. Furthermore, in order to determine whether the optical state of the current water body has changed, a standard reference is introduced, namely the reference absorbance value obtained from pure water under the same measurement conditions and ambient temperature. Next, the difference between the predicted absorbance value and the reference absorbance value is calculated to obtain the absorbance offset value between the two. The absorbance offset value represents the magnitude of the change in the optical characteristics of the current water body due to changes in the contents. Finally, by analyzing the magnitude and direction of the absorbance offset value, it is possible to further determine whether the current water body contains dissolved impurities, reaction residues, or other factors that cause increased or decreased light absorption. Then, based on the preset water quality determination rules, the current water body can be classified into the corresponding water quality grade or pollution state, which is used to assess whether the current water body meets the standard or exceeds the standard, as the water quality test result of the current water body.
[0028] In the above-mentioned water quality detection data processing method, first, by obtaining the reference transmitted light intensity at multiple temperature points in the process of the current water body dropping from the digestion temperature to room temperature, optical response data with temperature distribution characteristics are obtained; secondly, by inputting multiple reference transmitted light intensities into the regression prediction model for linear regression prediction processing, the predicted transmitted light intensity of the current water body under room temperature conditions is obtained by data extrapolation without the need for actual measurement; thirdly, the predicted absorbance is obtained based on the predicted transmitted light intensity, and then the water quality detection result of the current water body can be quantified based on the difference between the predicted absorbance and the reference absorbance; based on this, by constructing a temperature-light intensity data sequence and combining it with the regression prediction method, the light absorption behavior of the water body is indirectly quantified, thereby realizing rapid and stable water quality detection and judgment of the water body without waiting for natural or controlled cooling.
[0029] In an exemplary embodiment, a plurality of reference transmitted light intensities are input into a regression prediction model for linear regression prediction processing to obtain the predicted transmitted light intensity of the current water body at room temperature, including steps S201 to S202.
[0030] In step S201 , a plurality of reference transmitted light intensities are input into a regression prediction model, and each reference transmitted light intensity is weighted according to an adaptive weighting coefficient corresponding to each reference transmitted light intensity in the regression prediction model to obtain an initial predicted transmitted light intensity.
[0031] Among them, the adaptive weighting coefficient represents the dynamically adjusted parameter used in the regression prediction model to perform differential weighting processing on multiple reference transmitted light intensities. It is used to reflect the relative contribution of each input data point to the overall prediction. For example, light intensity data close to room temperature will be assigned a larger adaptive weighting coefficient to enhance its impact on the prediction results.
[0032] The initial predicted transmitted light intensity represents an aggregated result obtained by weighted summing of multiple reference transmitted light intensities and their corresponding adaptive weighting coefficients, and is used as an estimated value of the initial predicted transmitted light intensity of the current water body under room temperature conditions.
[0033] For example, in the regression prediction model, different adaptive weighting coefficients are set for each input temperature point corresponding to the reference transmitted light intensity. These adaptive weighting coefficients are not static parameters, but are adjusted in real time based on the proximity of each input temperature point to the room temperature point, the response trend change rate, or the historical fitting error statistics. Furthermore, when performing specific operations, the model multiplies each reference transmitted light intensity by its adaptive weighting coefficient, and all product values are summed across the entire dimension to form a preliminary weighted aggregation result. Ultimately, the obtained preliminary weighted aggregation result is used as the initial predicted transmitted light intensity, representing the regression prediction model's initial predicted estimated value of the transmitted light intensity at room temperature for the current water body, without subsequent error compensation correction.
[0034] Optionally, the adaptive weighting coefficient may be adjusted with reference to the following factors: for example, if the temperature difference between the input temperature point corresponding to a certain reference transmitted light intensity and the room temperature point is smaller, it means that its optical behavior is closer to the environmental state to be finally predicted, and therefore a greater weight should be given, otherwise, the weight should be reduced; for another example, if a certain input temperature point is at a position where the rate of change is relatively stable or the trend is continuous, it means that its data is more representative, and therefore a greater weight should be given, otherwise, if a certain input temperature point changes drastically or there is a mutation, it means that its data is not representative enough and may be abnormal data, and the weight should be reduced; for another example, if the data of a certain input temperature point has a smaller error in previous predictions, it means that its reliability is high, and therefore a greater weight should be given, otherwise, the weight should be reduced.
[0035] Step S202 : Compensating the initial predicted transmitted light intensity according to the adaptive compensation coefficient in the regression prediction model to obtain the compensated initial predicted transmitted light intensity as the predicted transmitted light intensity of the current water body at room temperature.
[0036] Among them, the adaptive compensation coefficient represents the deviation correction parameter generated in the regression prediction model based on the distribution characteristics of the input data and historical sample data. It is used to compensate for the error of the initial predicted transmitted light intensity, so that the final prediction result is closer to the actual optical measurement value at room temperature. For example, when the input data is unevenly distributed, the prediction output is adjusted by setting a positive or negative compensation coefficient to reduce systematic errors.
[0037] For example, after obtaining the initial predicted transmitted light intensity, it is necessary to perform a deviation correction based on the adaptive compensation coefficient in the regression prediction model to compensate for prediction deviations caused by uneven distribution of reference data, insufficient temperature range coverage, nonlinear perturbations in the optical response, and other factors, thereby making the final prediction closer to the actual optical measurement value at room temperature. Specifically, the adaptive compensation coefficient is not a static parameter but is dynamically adjusted based on the temperature distribution range of the input data, the gradient change of the adaptive weighting coefficient, and the residual statistical characteristics of historical samples. It is embedded in the regression prediction model as part of the error function. Furthermore, after generating the initial predicted transmitted light intensity, the corresponding adaptive compensation coefficient is calculated in combination with the error function. This adaptive compensation coefficient is then used to perform a forward or reverse compensation operation with the initial predicted transmitted light intensity to output the final predicted transmitted light intensity.
[0038] Optionally, the adjustment method of the adaptive compensation coefficient can refer to the following factors: for example, if multiple input temperature points are relatively concentrated, it means that the temperature range they cover together is relatively narrow, and the support for the room temperature point during prediction may be insufficient, which is prone to deviation. At this time, the adaptive compensation coefficient should be appropriately increased to correct the error. Conversely, if multiple input temperature points cover a wide range and include points close to room temperature, the deviation is small, and a smaller compensation amplitude can be set; for another example, if the aforementioned multiple adaptive weighting coefficients change drastically between adjacent input temperature points, it means that the regression prediction model has an obvious preference or bias for the trust in the input data, which may cause the prediction to be biased towards certain local information. At this time, the impact of this imbalance should be corrected by compensation. Conversely, if these adaptive weighting coefficients change smoothly, it indicates that the input structure is relatively balanced, and a smaller compensation amplitude can be set; for another example, if a certain type of input structure has often had systematic deviations in a certain direction in history, the adaptive compensation coefficient needs to be adjusted in a targeted manner with reference to these historical deviation trends to prevent similar errors from occurring again in the current prediction.
[0039] For example, the numerical representation of the regression prediction model can refer to the following formula: (1) In formula (1), It indicates the reference transmitted light intensity obtained by the nth acquisition during the process of the current water body decreasing from the digestion temperature to room temperature. represents the predicted transmitted light intensity of the current water body at room temperature, Expressed as a reference transmitted light intensity The adaptive weighting coefficient set at the corresponding input temperature point, Represents the adaptive compensation coefficient.
[0040] Furthermore, in the process of the current water body self-digestion temperature dropping to room temperature, m input temperature points are selected at equal intervals, and the reference transmitted light intensity corresponding to each of the m input temperature points is recorded as 、 ... Based on this, Indicates the intensity of transmitted light for each reference According to the corresponding adaptive weighting coefficient The initial predicted transmitted light intensity is obtained after weighted processing. Indicates that the initial predicted transmitted light intensity is adjusted according to the adaptive compensation coefficient The predicted transmitted light intensity of the current water body at room temperature obtained after compensation processing.
[0041] In this embodiment, first, multiple reference transmitted light intensities are weighted and aggregated according to corresponding adaptive weighting coefficients to obtain an initial predicted transmitted light intensity, so that the initial prediction result can comprehensively consider the correlation and data contribution between each input temperature point and the room temperature point; secondly, the initial predicted transmitted light intensity is compensated and corrected according to the adaptive compensation coefficient to obtain the predicted transmitted light intensity of the current water body at room temperature, thereby effectively correcting the systematic error in the prediction process; based on this, by introducing a data-adaptive weight and compensation mechanism, it is possible to output a predicted transmitted light intensity with physical consistency and numerical stability without waiting for the sample to actually cool to room temperature, thereby enhancing the flexibility and accuracy of the prediction process.
[0042] In an exemplary embodiment, before obtaining the regression prediction model for transmitted light intensity prediction, the method further includes steps S301 to S303.
[0043] Step S301: After the reference water body is digested by the digestion liquid at a preset digestion temperature, different water quality analyzers are used to obtain sets of transmitted light intensities of the reference water body during the process of decreasing from the digestion temperature to room temperature. Each set of transmitted light intensity includes the transmitted light intensities at multiple temperature points obtained by the corresponding water quality analyzer during the process of decreasing from the digestion temperature to room temperature, as well as the transmitted light intensity at room temperature.
[0044] Among them, the reference water body refers to the standardized water body sample used to train and fit the model parameters in the process of building the regression prediction model. It is usually a representative liquid with known and controllable water quality. It is used for digestion treatment and light intensity collection through different water quality analyzers to provide a stable and reliable data basis for model learning.
[0045] Among them, the transmitted light intensity set represents a set of transmitted light intensity data measured by a corresponding water quality analyzer at multiple set input temperature points during the process of cooling the reference water body from the digestion temperature to room temperature, as well as the final transmitted light intensity data at room temperature, which is used as the input and output variable set of the regression prediction model.
[0046] For example, a representative sample of reference water is first treated with a standard digestion solution at a uniformly set digestion temperature to complete the chemical reaction at high temperature. After the digestion process, the reference water is gradually cooled to room temperature through natural or controlled cooling. Furthermore, during this cooling process, transmitted light intensities of different reference waters are collected at multiple temperature points using multiple water quality analyzers of the same equipment type. This ensures that multiple sets of data with similar structures but slight differences are obtained under different instrument characteristics, namely, transmitted light intensity sets. Specifically, each transmitted light intensity set must include transmitted light intensity data at multiple input temperature points, as well as transmitted light intensity data collected when fully cooled to room temperature. The former serves as the input variable for fitting, and the latter serves as the target output variable for fitting. The input temperature set for sampling must be consistent across different transmitted light intensity sets. This acquisition method not only expands the temperature coverage of the input data but also captures differences in light intensity response between different equipment due to differences in measurement paths and detection sensitivity, providing a diverse input basis for the model.
[0047] In step S302 , the plurality of transmitted light intensity sets are input into a regression prediction model of parameters to be determined for linear regression analysis, thereby obtaining a linear regression relationship between the plurality of transmitted light intensity sets in the regression prediction model.
[0048] For example, first, the transmitted light intensities corresponding to multiple input temperature points in each transmitted light intensity set are used as input variables, and then the transmitted light intensities at room temperature in the same transmitted light intensity set are used as target output variables, and are input together into the regression prediction model; wherein, within the model, a linear structure of parameters to be determined is constructed, and the linear structure will fit the model parameters according to the numerical relationship between the input variables and the target output variables through the minimum residual principle or the minimum square error criterion. Furthermore, during the fitting process, the linear structure continuously adjusts the weight parameters so that the error between the predicted output and the actual light intensity value at room temperature is gradually reduced, so that the regression prediction model finally forms a mathematical mapping relationship that can reflect the distribution characteristics of the reference data and the light intensity response trend. Based on this, the process is not limited to a single data set, but performs regression analysis on multiple transmitted light intensity sets at the same time to ensure that the model parameters still have generalization ability and stability under different instrument characteristic conditions.
[0049] Step S303 , based on the linear regression relationship of the multiple transmitted light intensity sets in the regression prediction model, determine the adaptive compensation coefficient in the regression prediction model and the adaptive weighting coefficient corresponding to each transmitted light intensity in the transmitted light intensity set to obtain a regression prediction model with determined parameters.
[0050] For example, the linear regression relationship formed in the regression prediction model based on multiple sets of transmitted light intensities is decomposed and analyzed: on the one hand, it is necessary to analyze the data distribution and gradient changes of each input temperature point during the fitting process, and assign different adaptive weighting coefficients based on their influence on the final output error, so that they can be weighted according to their actual contribution during prediction; on the other hand, an evaluation is conducted from the perspective of the systematic offset of the overall regression curve to identify whether there is an error of fixed direction or magnitude between the predicted output under multiple sets of input data and the actual light intensity value at room temperature, and accordingly define the error function and the corresponding adaptive compensation coefficient. Finally, these two types of parameters are structurally integrated into the regression prediction model to form a complete prediction model structure with fixed weights and compensation capabilities; this model can be directly applied to the input prediction of new data in subsequent use without retraining parameters, thereby significantly improving the model response efficiency and prediction stability, and can be applied to the rapid processing requirements in batch or online water quality testing processes.
[0051] In this embodiment, multiple water quality analyzers are used to collect the transmitted light intensity at multiple temperature points in the process of the reference water body decreasing from the digestion temperature to room temperature, as well as the transmitted light intensity at the room temperature point, to construct a data set with temperature gradient characteristics, thereby enhancing the model's ability to express the input distribution; furthermore, by inputting multiple transmitted light intensity sets into the regression prediction model to be trained and performing linear regression analysis, the linear regression relationship between the input and output is extracted, and the adaptive weighting coefficient and the adaptive compensation coefficient are determined therefrom, thereby obtaining a trained regression prediction model; based on this, by combining multi-source light intensity data for regression modeling analysis, the model has stability and generalization capabilities for actual prediction scenarios, thereby improving the availability and accuracy of water body transmitted light intensity prediction.
[0052] In an exemplary embodiment, after determining the adaptive compensation coefficient in the regression prediction model and the adaptive weighting coefficient corresponding to each transmitted light intensity in the transmitted light intensity set to obtain the regression prediction model with determined parameters, the method further includes steps S401 to S403.
[0053] Step S401, based on the numerical relationship between each temperature point in the transmitted light intensity set and the corresponding adaptive weighting coefficient, curve fitting processing is performed on each adaptive weighting coefficient to construct a first mapping function for determining the corresponding adaptive weighting coefficient according to any temperature point between the self-digestion temperature and room temperature.
[0054] Among them, the first mapping function represents a function structure fitted by the numerical relationship between multiple known temperature points and their corresponding adaptive weighting coefficients, which is used to obtain the adaptive weighting coefficient corresponding to any temperature point in the prediction process to realize the distribution and functionization of the weighting coefficient.
[0055] For example, to enable the regression prediction model to automatically determine weighting factors for any temperature point, the adaptive weighting coefficients corresponding to known temperature points in the transmitted light intensity set must be functionally modeled. First, each clearly calibrated temperature point and its corresponding adaptive weighting coefficient are extracted to form a set of discrete data points with temperature as the independent variable and the adaptive weighting coefficient as the dependent variable. Furthermore, by analyzing the distribution of the discrete data points along the preset coordinate axes, the curve trend of the adaptive weighting coefficient as it changes with temperature can be observed. Based on this, a fitting method is used to smooth each data point to form a continuous mathematical expression curve. Finally, after fitting is completed, the mathematical expression curve is defined as a first mapping function. This first mapping function is used to map any input temperature point (e.g., a new temperature point that appears in the actual prediction) to the corresponding adaptive weighting coefficient. This allows the appropriate adaptive weighting coefficient to be automatically obtained even for temperature points that are not clearly calibrated in the training set. This shifts the regression prediction model's adaptability to temperature input from discrete to continuous, thus supporting weighted combination prediction of transmitted light intensity at any temperature point.
[0056] Step S402 , performing segmented fitting processing on the adaptive compensation coefficient according to the prediction errors generated in different temperature sections, and constructing a second mapping function for determining the corresponding adaptive compensation coefficient according to any temperature section between the self-digestion temperature and room temperature.
[0057] The prediction error represents the difference between the room temperature transmitted light intensity predicted by the regression prediction model with determined parameters based on a certain temperature range input and the transmitted light intensity measured at the actual room temperature.
[0058] Among them, the second mapping function represents the function structure generated by segmented fitting based on the relationship between the prediction error and the adaptive compensation coefficient in different temperature segments, which is used to obtain the adaptive compensation coefficient corresponding to any temperature segment during the prediction process to achieve distribution and functionalization of error correction.
[0059] For example, to further improve the linear regression model's ability to adaptively correct prediction errors, it is necessary to perform functional modeling on the adaptive compensation coefficients originally obtained in the regression analysis. Specifically, the prediction errors generated in different temperature ranges are segmented and then locally fitted with the original adaptive compensation coefficients. Specifically, based on the predicted deviations between the room temperature transmitted light intensity predicted by the regression prediction model and the actual room temperature transmitted light intensity in different temperature ranges, the original adaptive compensation coefficients are combined to construct modified compensation intensity samples to form response data pairs between temperature points and compensation intensities. Next, these response data pairs are divided into temperature ranges, and within each temperature range, a fitting function is constructed with the temperature point as input and the compensation intensity as output to express the error compensation relationship within that temperature range. Finally, all fitting functions are unified into a second mapping function in the form of piecewise functions. This second mapping function can accept any temperature range as input and autonomously output the corresponding adaptive compensation coefficient, thereby replacing the fixed compensation coefficient. This achieves dynamic adaptive adjustment of the model's error correction capability within the temperature range, enabling the compensation process to have universal response capabilities covering all temperature ranges.
[0060] Step S403: The first mapping function and the second mapping function are integrated into the regression prediction model with determined parameters to obtain the regression prediction model with globally determined parameters.
[0061] For example, first, a function entry is set in the model structure so that when the regression prediction model receives new transmitted light intensity data, it can automatically call the first mapping function to generate the adaptive weighting coefficient required for the current prediction based on the temperature point corresponding to each data point. At the same time, based on the temperature range to which the temperature point belongs, it automatically calls the second mapping function to generate the adaptive compensation coefficient required for the current prediction. Based on this, the entire regression prediction process no longer relies on static parameters, but instead achieves a full dynamic response through function calls. The regression prediction model with globally determined parameters can automatically perform weighting and compensation when faced with any temperature point input without retraining or manual intervention. This expands the local response capability of the original model into a full-range resolvable capability, giving it the complete ability to perform light intensity prediction tasks in actual continuous temperature distribution scenarios.
[0062] In this embodiment, first, a first mapping function is constructed by performing function fitting on multiple temperature points and their corresponding adaptive weighting coefficients, thereby realizing the ability of the regression prediction model to dynamically obtain the adaptive weighting coefficient under the input of any temperature point; secondly, a sample is constructed by combining the prediction deviation and the original adaptive compensation coefficient and performing piecewise function fitting, thereby realizing the ability of the regression prediction model to dynamically obtain the adaptive compensation coefficient under the input of any temperature segment; thirdly, the above two mapping functions are integrated into a regression prediction model with determined parameters, thereby enabling the regression prediction model to have the adaptive processing capability of weighting and compensation under the temperature input of the entire interval; based on this, by constructing a weighting function and a compensation function covering a continuous temperature interval and integrating them into the regression prediction model, the responsiveness to the entire input temperature domain and the flexibility of numerical adjustment in the prediction process of the transmitted light intensity are realized, thereby enhancing the applicability and prediction accuracy of the regression prediction model under non-constant temperature input.
[0063] In an exemplary embodiment, the method also includes step S501; based on the linear regression relationship of multiple transmitted light intensity sets in the regression prediction model, determining the adaptive compensation coefficient in the regression prediction model and the adaptive weighting coefficient corresponding to each transmitted light intensity in the transmitted light intensity set to obtain a regression prediction model with determined parameters, including steps S502 to S504.
[0064] Step S501 : determining a target digestion solution currently used for digestion processing from a plurality of candidate digestion solutions with different configuration parameters.
[0065] The configuration parameters represent a set of structured variables used to describe the components of various candidate digestion solutions and their ratios, including, for example, the concentration, volume ratio, pH value, redox potential, preset reaction temperature, and other indicators of each chemical reagent in the digestion solution.
[0066] Step S502 , in the target digestion solution, according to the linear regression relationship of multiple transmitted light intensity sets in the regression prediction model, determine the adaptive compensation coefficient and adaptive weighting coefficient corresponding to the target digestion solution to obtain a regression prediction model with determined parameters corresponding to the target digestion solution.
[0067] Step S503 : determining digestion solutions other than the target digestion solution from each candidate digestion solution for digestion treatment, until a regression prediction model with determined parameters corresponding to all candidate digestion solutions is obtained.
[0068] Exemplarily, after the reference water body is digested by the target digestion solution at the digestion temperature, different water quality analyzers are used to obtain sets of transmitted light intensities of the reference water body during the process of decreasing from the digestion temperature to room temperature. Each set of transmitted light intensity includes the transmitted light intensities at multiple temperature points during the process of decreasing from the digestion temperature to room temperature obtained by the corresponding water quality analyzer and the transmitted light intensity at room temperature. Furthermore, the multiple sets of transmitted light intensity are input into the regression prediction model of the parameters to be determined for linear regression analysis, and the linear regression relationship of the multiple sets of transmitted light intensity in the regression prediction model is obtained. Then, based on the linear regression relationship of the multiple sets of transmitted light intensity in the regression prediction model, the adaptive compensation coefficient in the regression prediction model and the adaptive weighting coefficient corresponding to each transmitted light intensity in the set of transmitted light intensity are determined, thereby obtaining a regression prediction model suitable for predicting light intensity data of the target digestion solution.
[0069] For example, in order to further expand the adaptability of the regression prediction model, the above-mentioned light intensity data modeling process needs to be performed one by one on other candidate digestion solutions that are not selected as target digestion solutions until multiple regression prediction models suitable for light intensity data prediction for each candidate digestion solution are obtained.
[0070] Step S504 , determining the optical response characteristics reflected by the configuration parameters of each digestion solution, performing similarity correlation processing on each regression prediction model based on the configuration parameters and optical response characteristics of the corresponding digestion solution, and obtaining a regression prediction model applicable to the digestion solution with any configuration parameters.
[0071] Among them, the optical response characteristics reflected by the configuration parameters represent the change pattern of the transmitted light intensity of the water sample in the process of decreasing from the digestion temperature to room temperature under the control of specific digestion solution configuration parameters, such as the rate of change of the transmitted light intensity, the curve trend, the light intensity stability at the final room temperature point, and other optical behavior characteristics.
[0072] Exemplarily, in order to achieve model prediction capabilities under cross-digestion conditions, it is necessary to perform structural-level similarity fusion processing on the regression prediction models corresponding to the established multiple digestion solutions. Specifically, the configuration parameters of each digestion solution are first extracted, and the component feature vector of the corresponding digestion solution is constructed in vector form. Then, in each regression prediction model, the optical response characteristics reflected by the configuration parameters of the corresponding digestion solution are extracted, and the optical response feature vector of the corresponding regression prediction model is constructed in vector form. Furthermore, after the two types of vectors are standardized, a cross-model similarity measurement mechanism is constructed to jointly match the component feature vector of each digestion solution with the optical response feature vector of the corresponding regression prediction model, thereby identifying the structural similarity between different digestion solutions in parameter space and response space. Furthermore, based on the evaluation results of the structural similarity obtained above, multiple regression prediction models are weighted fused or mapped, thereby constructing a mapping mechanism that supports the input of any digestion solution configuration parameters to generate corresponding model parameters. Finally, based on the above mapping mechanism, a global regression prediction model that can adapt to different digestion solution configuration parameter conditions is formed. This global regression prediction model can dynamically determine the adaptive weighting coefficients and adaptive compensation coefficients required for prediction according to the actual configuration parameters of the digestion solution, thereby improving the adaptability and application value of the regression prediction model in complex chemical environments.
[0073] In this embodiment, first, a target digestion solution is selected from multiple candidate digestion solutions to perform digestion treatment on a reference water body, and then, based on the set of transmitted light intensities obtained during the cooling process, adaptive weighting coefficients and compensation coefficients are determined to construct a regression prediction model suitable for the target digestion solution. Secondly, the modeling process is repeated for the remaining digestion solutions to form multiple regression prediction models suitable for different digestion solutions. Furthermore, by performing similarity correlation processing on the digestion solution configuration parameters and the optical response characteristics, a regression prediction model that supports the input of arbitrary configuration parameters is generated. Based on this, by establishing a mapping mechanism between the digestion solution configuration parameters and the model response structure, unified fitting and generalized modeling of the regression prediction model under the conditions of multiple digestion solution configuration parameters are achieved, thereby improving the adaptability and application value of the regression prediction model in complex chemical environments.
[0074] In an exemplary embodiment, obtaining the reference transmitted light intensities corresponding to multiple temperature points in the process of the current water body decreasing from the digestion temperature to room temperature includes steps S601 to S604.
[0075] Step S601 : in the process of the self-digestion temperature dropping to room temperature, obtaining the temperature change trend and the light intensity response trend monitored at the current sampling moment.
[0076] Among them, the temperature change trend represents the temperature change curve characteristics composed of the temperature values obtained at multiple consecutive time points during the cooling process, including the direction of change, slope, etc., which is used to reflect the temperature stability of the current water body in the process of decreasing from the digestion temperature to room temperature.
[0077] Among them, the light intensity response trend represents the characteristics of the light intensity change curve composed of the transmitted light intensity collected at multiple time points synchronized with temperature monitoring, including the direction of change, slope size and degree of fluctuation, etc., which is used to reflect whether the optical response of the current water body during temperature changes is continuous and regular.
[0078] For example, at each sampling moment, the temperature variation trend formed by the current sampling moment and its adjacent moments is obtained, and the light intensity variation trend formed by the current sampling moment and its adjacent moments is also obtained. The temperature variation trend can be reflected as a temperature decrease curve over a period of time, whose slope represents the rate of temperature decrease; while the light intensity response trend is reflected as the response change state of the light signal over a period of time, whose slope represents the magnitude of the light intensity change between adjacent temperature points. Thus, based on the obtained trend characteristics, a multidimensional time series structure that can reflect the dynamic process is formed.
[0079] Step S602 , according to a preset sampling judgment rule jointly constructed based on the temperature change rate and the light intensity change slope, the temperature change trend and the light intensity response trend at the current sampling moment are jointly judged to obtain a sampling judgment result at the current sampling moment.
[0080] The sampling decision rule represents a set of logical conditions for comprehensively judging whether the current sampling moment is suitable for acquiring effective transmitted light intensity, so as to constrain data collection behavior and avoid collecting unstable data during the interference phase.
[0081] The sampling determination result represents the decision output generated after judging the temperature change trend and the light intensity response trend at the current sampling moment according to the sampling determination rule, and is used to control whether to collect the reference transmitted light intensity at that moment.
[0082] Step S603: If the sampling determination result indicates that the sampling is valid, then the reference transmitted light intensity at the corresponding temperature point is obtained at the current sampling moment.
[0083] Step S604: If the sampling determination result indicates that the sampling is invalid, the acquisition of the reference transmitted light intensity is stopped at the current sampling moment.
[0084] Exemplarily, a preset sampling judgment rule is obtained, that is, a joint sampling judgment standard established by combining the coupling relationship between the temperature change rate and the light intensity change slope, and a joint judgment is made on the temperature change trend and the light intensity response trend at the current sampling moment. Specifically, if the temperature change rate is within an expected range, it means that the current water body is in a relatively uniform and continuous cooling stage, and has a certain time resolution basis; at the same time, if the light intensity change slope shows a relatively smooth or monotonic trend, it means that the optical response at this time is relatively stable, with continuity and regularity; based on this, if the temperature change trend and the light intensity response trend at the current sampling moment both meet the above-mentioned set conditions, the current sampling moment is determined to be a valid sampling point, otherwise it is invalid. Finally, the sampling judgment result exists in the form of a flag bit or logic output, which is used to guide whether the light intensity data at the specified sampling moment will be included in the data set in the future, so as to ensure that the sampling behavior is based on the premise that the temperature control process and the optical response process are both reasonable, and effectively avoid the risk of missampling during periods of drastic temperature changes or large light intensity disturbances.
[0085] In this embodiment, first, during the cooling process, the temperature change trend and the light intensity response trend monitored at the current sampling moment are synchronously acquired, thereby providing dynamic data support for judging data continuity and sampling stability; secondly, according to the sampling judgment rule jointly constructed based on the temperature change rate and the light intensity slope, the temperature change trend and the light intensity response trend are judged and processed, thereby realizing accurate identification of the effective sampling moment, ensuring that the reference transmitted light intensity is obtained at the effective sampling moment, and terminating the acquisition of the reference transmitted light intensity at the invalid sampling moment, thereby avoiding data interference in the discontinuous or abnormal response stage; based on this, by constructing a trend joint judgment and dynamic sampling mechanism, refined control of the reference transmitted light intensity data acquisition process is realized, and the stability of the data quality and the reliability of the model input are enhanced.
[0086] In an exemplary embodiment, obtaining the reference transmitted light intensities corresponding to multiple temperature points in the process of the current water body decreasing from the digestion temperature to room temperature includes steps S701 to S703.
[0087] Step S701 , in the process of decreasing the self-digestion temperature to room temperature, obtaining light intensity vectors corresponding to multiple temperature points, each light intensity vector corresponding to the transmitted light intensity of multiple wavelengths at the corresponding temperature point.
[0088] Exemplarily, a multi-wavelength parallel acquisition method is adopted to obtain the light intensity vectors corresponding to each temperature point in the process of the current water body dropping from the digestion temperature to room temperature. This is no longer limited to the measurement of the transmitted light intensity at a single wavelength, but rather captures the complete response of each temperature point within the spectral range. Specifically, in the process of gradual temperature reduction, for all temperature points used for sampling, the transmitted light intensity values corresponding to multiple wavelengths are collected at each temperature point, and organized according to the wavelength dimension to form the light intensity vector at the current temperature point. Based on this, each light intensity vector contains the transmitted intensity of multiple spectral channels, and the vector structure is constructed in the order of wavelengths, which can more comprehensively describe the response behavior of the current water body to light of different wavelengths under the corresponding temperature conditions.
[0089] Step S702 , performing feature analysis on each light intensity vector, extracting the response distribution trend between wavelengths, and obtaining spectral feature parameters characterizing the digestion solution at different temperature points.
[0090] Among them, the response distribution trend between wavelengths indicates the relative change relationship of the transmitted light intensity collected by different wavelengths at a certain temperature point, such as the relative high and low, change gradient, peak-valley distribution, slope characteristics, etc. between the transmitted light intensities of each wavelength, to reflect the difference in the transmission behavior of the current water body in different spectral regions at this temperature point.
[0091] Among them, the spectral characteristic parameters represent a set of parameters used to describe the spectral morphology, distribution structure or change characteristics in the spectral region at a certain temperature point, such as the wavelength response value, spectral slope, principal component score, etc., to quantitatively express the structural evolution state of the spectrum during temperature change.
[0092] Exemplarily, among each light intensity vector, a characteristic analysis is performed on any light intensity vector to obtain its response distribution trend in the wavelength dimension, that is, the response distribution trend between wavelengths, and based on this, spectral characteristic parameters characterizing the overall spectral structure of the light intensity vector are generated to reflect the overall performance of the interaction between the digestate and the current water body in the spectral response at this temperature point; based on this, by arranging the spectral characteristic parameters extracted from multiple light intensity vectors in chronological order, it can be observed how the spectral response evolves continuously as the temperature decreases.
[0093] Step S703 , obtaining a preset spectrum variation analytical model, combining the spectrum characteristic parameters and the spectrum variation analytical model, and performing feature fusion processing on the light intensity vector at each temperature point to obtain the corresponding reference transmitted light intensity at different temperature points.
[0094] Among them, the spectral change analysis model represents a mathematical mapping relationship model trained based on historical spectral data or constructed according to preset rules. It can predict the representative reference transmitted light intensity based on the spectral characteristic parameters and light intensity vector, that is, it is used to fuse and compress multidimensional spectral data at a certain temperature point and output a single light intensity data for modeling.
[0095] For example, first, a pre-built spectral change analysis model is obtained. The spectral change analysis model is used to describe the variation patterns and mutual relationships of spectral responses at different temperatures. The spectral change analysis model can be trained based on historical spectral data and has the ability to infer representative light intensity data from spectral characteristic parameters. Furthermore, in the actual processing process, the spectral characteristic parameters at each temperature point are input into the spectral change analysis model, and the fusion reconstruction of the original light intensity vector is achieved through the mapping mechanism or function transformation within the model. Specifically, in the fusion process, the spectral change analysis model not only considers the relative relationship between each wavelength based on the input spectral characteristic parameters, but also comprehensively considers its overall response structure, thereby fusing a certain light intensity vector to form a representative transmission intensity result at the corresponding temperature point. The representative transmission intensity result is regarded as the most reference-meaningful transmission light intensity at this temperature point and can be used for subsequent model training or evaluation. Based on this, the high-dimensional spectral response information that may contain noise or redundancy is compressed and converted into a reference transmission light intensity with a stable structure and clear expression, thereby improving the expression efficiency and numerical stability of the subsequent modeling input.
[0096] In this embodiment, first, the light intensity vector composed of the transmitted light intensity of each wavelength is collected at multiple temperature points, so as to obtain complete optical response data covering the spectral dimension; secondly, the response distribution trend between the wavelengths within the light intensity vector is subjected to feature analysis processing, so as to extract the spectral characteristic parameters that can reflect the spectral region of each temperature point; thirdly, the spectral change analysis model fuses the corresponding light intensity vectors according to the spectral characteristic parameters, so as to obtain the structurally compressed reference transmitted light intensity while retaining the spectral response information; based on this, by introducing multi-wavelength parallel acquisition and feature fusion mechanism, the high-dimensional perception and dimensionality reduction expression of the current water body transmitted light intensity are realized, thereby enhancing the stability of the reference data and the accuracy of the modeling effect.
[0097] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0098] Based on the same inventive concept, embodiments of the present application also provide a water quality detection data processing device for implementing the aforementioned water quality detection data processing method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more water quality detection data processing device embodiments provided below can be found in the above-described limitations of the water quality detection data processing method and will not be further elaborated here.
[0099] In an exemplary embodiment, Figure 2 As shown, a water quality detection data processing device is provided, including: an acquisition module 201, a prediction module 202 and a comparison module 203, wherein: An acquisition module 201 is configured to obtain reference transmitted light intensities corresponding to a plurality of temperature points of the current water body during a process of the current water body being cooled from the digestion temperature to room temperature after the current water body is digested by a digestion solution at a preset digestion temperature; The prediction module 202 is used to obtain a regression prediction model for predicting the transmitted light intensity, input a plurality of reference transmitted light intensities into the regression prediction model for linear regression prediction processing, and obtain the predicted transmitted light intensity of the current water body at room temperature; The comparison module 203 is used to determine the predicted absorbance of the current water body according to the predicted transmitted light intensity, obtain the reference absorbance of pure water at room temperature, and obtain the water quality test result according to the difference between the predicted absorbance and the reference absorbance.
[0100] In an exemplary embodiment, the prediction module 202 is further used to: input multiple reference transmitted light intensities into a regression prediction model, and perform weighted processing on each reference transmitted light intensity according to the adaptive weighting coefficient corresponding to each reference transmitted light intensity in the regression prediction model to obtain an initial predicted transmitted light intensity; and perform compensation processing on the initial predicted transmitted light intensity according to the adaptive compensation coefficient in the regression prediction model to obtain a compensated initial predicted transmitted light intensity as the predicted transmitted light intensity of the current water body at room temperature.
[0101] In an exemplary embodiment, the device also includes a construction module, which is used to: after the reference water body is digested by the digestion liquid at a preset digestion temperature, obtain the transmitted light intensity sets of the reference water body in the process of decreasing from the digestion temperature to room temperature through different water quality analyzers, each transmitted light intensity set includes the transmitted light intensity at multiple temperature points in the process of decreasing from the digestion temperature to room temperature obtained by the corresponding water quality analyzer and the transmitted light intensity at room temperature; input the multiple transmitted light intensity sets into the regression prediction model of the parameters to be determined for linear regression analysis and processing, and obtain the linear regression relationship of the multiple transmitted light intensity sets in the regression prediction model; according to the linear regression relationship of the multiple transmitted light intensity sets in the regression prediction model, determine the adaptive compensation coefficient in the regression prediction model and the adaptive weighting coefficient corresponding to each transmitted light intensity in the transmitted light intensity set to obtain the regression prediction model of the determined parameters.
[0102] In an exemplary embodiment, the construction module is also used to: perform curve fitting processing on each adaptive weighting coefficient according to the numerical relationship between each temperature point in the transmitted light intensity set and the corresponding adaptive weighting coefficient, and construct a first mapping function for determining the corresponding adaptive weighting coefficient according to any temperature point between the self-digestion temperature and room temperature; perform segmented fitting processing on the adaptive compensation coefficient according to the prediction error generated in different temperature segments, and construct a second mapping function for determining the corresponding adaptive compensation coefficient according to any temperature segment between the self-digestion temperature and room temperature; and fuse the first mapping function and the second mapping function into a regression prediction model with determined parameters to obtain a regression prediction model with globally determined parameters.
[0103] In an exemplary embodiment, the construction module is also used to: determine a target digestion liquid currently used for digestion treatment from multiple candidate digestion liquids with different configuration parameters; in the target digestion liquid, determine an adaptive compensation coefficient and an adaptive weighting coefficient corresponding to the target digestion liquid based on the linear regression relationship of multiple transmitted light intensity sets in the regression prediction model to obtain a regression prediction model with determined parameters corresponding to the target digestion liquid; determine a digestion liquid other than the target digestion liquid for digestion treatment from each candidate digestion liquid until regression prediction models with determined parameters corresponding to all candidate digestion liquids are obtained; determine the optical response characteristics reflected by the configuration parameters of each digestion liquid, perform similarity association processing on each regression prediction model based on the configuration parameters and optical response characteristics of the corresponding digestion liquid, and obtain a regression prediction model applicable to digestion liquids with arbitrary configuration parameters.
[0104] In an exemplary embodiment, the acquisition module 201 is also used to: acquire the temperature change trend and light intensity response trend monitored at the current sampling moment during the process of the self-digestion temperature dropping to room temperature; perform a joint judgment on the temperature change trend and light intensity response trend at the current sampling moment according to a preset sampling judgment rule jointly constructed based on the temperature change rate and the light intensity change slope, and obtain a sampling judgment result at the current sampling moment; if the sampling judgment result indicates that the sampling is valid, obtain the reference transmitted light intensity at the corresponding temperature point at the current sampling moment; if the sampling judgment result indicates that the sampling is invalid, terminate the acquisition of the reference transmitted light intensity at the current sampling moment.
[0105] In an exemplary embodiment, the acquisition module 201 is also used to: obtain the light intensity vectors corresponding to multiple temperature points in the process of decreasing the digestion temperature to room temperature, each light intensity vector corresponding to the transmitted light intensity of multiple wavelengths at the corresponding temperature point; perform feature analysis on each light intensity vector, extract the response distribution trend between wavelengths, and obtain spectral characteristic parameters characterizing the digestion solution at different temperature points; obtain a preset spectral change analysis model, combine the spectral characteristic parameters and the spectral change analysis model, and perform feature fusion processing on the light intensity vectors at each temperature point to obtain the reference transmitted light intensity corresponding to the different temperature points.
[0106] Each module in the water quality testing data processing device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0107] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in any of the above embodiments when executing the computer program.
[0108] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in any of the above embodiments are implemented.
[0109] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.
[0110] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0111] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A water quality detection data processing method, characterized in that: The method comprises: After the current water body is digested by the digestion liquid at a preset digestion temperature, obtaining the reference transmitted light intensities corresponding to the current water body at multiple temperature points during the process of cooling from the digestion temperature to room temperature; Obtaining a regression prediction model for transmitted light intensity prediction, inputting a plurality of reference transmitted light intensities into the regression prediction model for linear regression prediction processing, and obtaining a predicted transmitted light intensity of the current water body at room temperature; The predicted absorbance of the current water body is determined based on the predicted transmitted light intensity, the reference absorbance of pure water at room temperature is obtained, and the water quality test result is obtained based on the difference between the predicted absorbance and the reference absorbance.
2. The method according to claim 1, characterized in that Inputting the plurality of reference transmitted light intensities into the regression prediction model for linear regression prediction processing to obtain the predicted transmitted light intensity of the current water body at room temperature includes: Inputting a plurality of reference transmitted light intensities into the regression prediction model, and performing weighted processing on each reference transmitted light intensity according to an adaptive weighting coefficient corresponding to each reference transmitted light intensity in the regression prediction model to obtain an initial predicted transmitted light intensity; The initial predicted transmitted light intensity is compensated according to the adaptive compensation coefficient in the regression prediction model to obtain the compensated initial predicted transmitted light intensity as the predicted transmitted light intensity of the current water body at room temperature.
3. The method according to claim 1, characterized in that Before obtaining the regression prediction model for transmitted light intensity prediction, the method further includes: After the reference water body is digested by the digestion liquid at a preset digestion temperature, sets of transmitted light intensities of the reference water body during a process of decreasing from the digestion temperature to room temperature are respectively obtained by different water quality analyzers, each set of transmitted light intensities including the transmitted light intensities at multiple temperature points during the process of decreasing from the digestion temperature to room temperature, as well as the transmitted light intensity at room temperature, obtained by the corresponding water quality analyzer; Inputting the multiple transmitted light intensity sets into a regression prediction model of parameters to be determined to perform linear regression analysis and processing, thereby obtaining a linear regression relationship between the multiple transmitted light intensity sets in the regression prediction model; According to the linear regression relationship of multiple transmitted light intensity sets in the regression prediction model, the adaptive compensation coefficient in the regression prediction model and the adaptive weighting coefficient corresponding to each transmitted light intensity in the transmitted light intensity set are determined to obtain a regression prediction model with determined parameters.
4. The method according to claim 3, characterized in that After determining the adaptive compensation coefficient in the regression prediction model and the adaptive weighting coefficient corresponding to each transmitted light intensity in the transmitted light intensity set to obtain a regression prediction model with determined parameters, the method further includes: performing curve fitting on each adaptive weighting coefficient based on the numerical relationship between each temperature point in the set of transmitted light intensities and the corresponding adaptive weighting coefficient, thereby constructing a first mapping function for determining the corresponding adaptive weighting coefficient according to any temperature point between the self-digestion temperature and room temperature; According to the prediction errors generated in different temperature sections, the adaptive compensation coefficient is subjected to segmented fitting processing to construct a second mapping function for determining the corresponding adaptive compensation coefficient according to any temperature section between the self-digestion temperature and room temperature; The first mapping function and the second mapping function are integrated into a regression prediction model with determined parameters to obtain a regression prediction model with globally determined parameters.
5. The method according to claim 3, characterized in that The method further comprises: Determining a target digestion solution currently used for digestion processing among a plurality of candidate digestion solutions with different configuration parameters; The step of determining, based on a linear regression relationship between multiple transmitted light intensity sets in the regression prediction model, an adaptive compensation coefficient in the regression prediction model and an adaptive weighting coefficient corresponding to each transmitted light intensity in the transmitted light intensity set to obtain a regression prediction model with determined parameters includes: In the target digestion solution, an adaptive compensation coefficient and an adaptive weighting coefficient corresponding to the target digestion solution are determined according to a linear regression relationship of multiple transmitted light intensity sets in the regression prediction model to obtain a regression prediction model with determined parameters corresponding to the target digestion solution; Determining digestion solutions other than the target digestion solution from each candidate digestion solution for digestion treatment until a regression prediction model with determined parameters corresponding to all candidate digestion solutions is obtained; The optical response characteristics reflected by the configuration parameters of each digestion solution are determined, and each regression prediction model is subjected to similarity association processing based on the configuration parameters and optical response characteristics of the corresponding digestion solution to obtain a regression prediction model applicable to the digestion solution with any configuration parameters.
6. The method according to claim 1, characterized in that The obtaining of the reference transmitted light intensities corresponding to the current water body at multiple temperature points during the process of the water body being cooled from the digestion temperature to the room temperature comprises: In the process of decreasing from the digestion temperature to room temperature, obtaining the temperature change trend and the light intensity response trend monitored at the current sampling time; According to the preset sampling judgment rule jointly constructed based on the temperature change rate and the light intensity change slope, the temperature change trend and the light intensity response trend at the current sampling moment are jointly judged to obtain the sampling judgment result at the current sampling moment; If the sampling determination result indicates that the sampling is valid, then obtaining the reference transmitted light intensity at the corresponding temperature point at the current sampling moment; If the sampling determination result indicates that the sampling is invalid, the acquisition of the reference transmitted light intensity is stopped at the current sampling moment.
7. The method according to claim 1, characterized in that The obtaining of the reference transmitted light intensities corresponding to the current water body at multiple temperature points during the process of the water body being cooled from the digestion temperature to the room temperature comprises: In the process of decreasing the temperature from the digestion temperature to room temperature, obtaining light intensity vectors corresponding to a plurality of temperature points, each light intensity vector corresponding to the transmitted light intensity of a plurality of wavelengths at the corresponding temperature point; Performing characteristic analysis on each light intensity vector and extracting the response distribution trend between wavelengths to obtain spectral characteristic parameters characterizing the digestion solution at different temperature points; A preset spectrum change analysis model is obtained, and the spectrum characteristic parameters and the spectrum change analysis model are combined to perform feature fusion processing on the light intensity vector at each temperature point to obtain the reference transmitted light intensity corresponding to the different temperature points.
8. A water quality detection data processing device, characterized in that: The device comprises: An acquisition module, configured to obtain, after the current water body is digested by a digestion solution at a preset digestion temperature, reference transmitted light intensities corresponding to the current water body at multiple temperature points during a process in which the current water body is cooled from the digestion temperature to room temperature; a prediction module, configured to obtain a regression prediction model for predicting transmitted light intensity, input a plurality of reference transmitted light intensities into the regression prediction model for performing linear regression prediction processing, and obtain a predicted transmitted light intensity of the current water body at room temperature; The comparison module is used to determine the predicted absorbance of the current water body according to the predicted transmitted light intensity, obtain the reference absorbance of pure water at room temperature, and obtain the water quality detection result according to the difference between the predicted absorbance and the reference absorbance.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method for rapidly determining COD in domestic sewage containing seawater
CN102628793A
Method for measuring low-range COD in water body by dual wavelength internal standard method
CN108956495A
Water quality detection method and device for eliminating temperature influence and computer equipment
CN111678877A
Water sample high-precision COD detection device and method
CN113406032A
Sewage treatment effect detection method based on spectral analysis
CN118794923A
Cited By
Method and system for automatically detecting concentration of drawing oil
CN122130652A