Target drug detection result analysis method based on water quality parameter correction
By preparing a series of gradient water quality parameter samples and target drug standards, and combining multiple regression algorithms to optimize the fusion model, the quantitative deviation problem caused by water quality interference in traditional methods was solved, and the accurate detection of prohibited drugs in water bodies was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INST OF URBAN SAFETY & ENVIRONMENTAL SCI BEIJING ACAD OF SCI & TECH
- Filing Date
- 2025-12-23
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, the traditional calibration curve method has poor prediction accuracy and stability when detecting trace amounts of prohibited drugs in water bodies. It is also easily affected by the water sample matrix, leading to quantitative deviations and making it difficult to meet the detection requirements.
By preparing a series of water quality parameter samples and a series of target drug standard samples with different gradients, the electrochemical sensor method was used to detect the characteristic electrochemical sensing response signal. An initial prediction model was constructed using multiple regression algorithms, and then optimized and fused into a fusion regression model through grid search and cross-validation. Combined with water quality parameter correction, random errors were reduced and the model stability was enhanced.
It improves the accuracy and reliability of target drug detection, effectively removes interference from water sample matrix, and achieves more precise quantitative analysis.
Smart Images

Figure CN121899232A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of target drug detection technology, and in particular to a method for analyzing target drug detection results based on water quality parameter correction. Background Technology
[0002] Prohibited drugs typically refer to drugs produced or imported without national approval, or those lacking drug approval documents, as well as drugs whose use is explicitly prohibited. Their abuse can seriously harm human health and even trigger a series of social problems. Prohibited drugs and their metabolites enter municipal wastewater through urine and feces. Dynamically monitoring the concentration of prohibited drugs and their metabolites in municipal wastewater, based on wastewater epidemiology principles, allows for real-time monitoring of prohibited drug abuse trends. Furthermore, active substances not effectively removed by wastewater treatment processes can enter rivers, lakes, and other surface waters, even polluting groundwater and drinking water sources, posing risks to the ecological environment and human health. Since the concentration of prohibited drugs and their metabolites in water bodies is mostly at trace levels (ng / L), how to quickly and accurately quantify the concentration of prohibited drugs in water bodies has become one of the core research directions in my country's toxicology monitoring and ecological environmental protection fields. Water bodies (such as municipal wastewater, surface water, and drinking water) have complex compositions, containing a large number of endogenous and exogenous substances. These substances may interfere with the detection signals of prohibited drugs; therefore, it is necessary to effectively eliminate matrix effects during the detection process to ensure the reliability of the detection results.
[0003] Currently, commonly used methods for detecting prohibited drugs include gas chromatography-mass spectrometry (GC-MS), liquid chromatography-mass spectrometry (LC-MS), and sensor methods. Among these, electrochemical sensor analysis methods show promising application prospects for rapid detection of trace prohibited drugs in water bodies due to their advantages such as simple equipment, high sensitivity, ease of miniaturization, and online monitoring. In actual detection processes, the calibration curve method is typically used for quantitative analysis. This involves preparing a series of prohibited drug standards with known concentrations, detecting their current response or voltammetric curve characteristic values (such as peak current) at specific potentials, and establishing a linear regression equation between concentration and response signal.
[0004] However, existing methods for analyzing detection results still have certain shortcomings. On the one hand, traditional calibration curve methods often use a single linear regression algorithm to construct a prediction model. When the matrix substances in the water sample cause strong interference, the prediction accuracy and stability of the single regression model are poor, and quantitative deviations are prone to occur, affecting the accuracy of calculating the concentration of prohibited drugs and making it difficult to meet the actual needs of accurate detection of trace prohibited drugs in water bodies. Summary of the Invention
[0005] This invention provides a method for analyzing the detection results of target drugs based on water quality parameter correction, in order to solve the problem of inaccurate detection of target drugs in the prior art.
[0006] On the one hand, the present invention provides a method for analyzing the detection results of target drugs based on water quality parameter correction, comprising: Prepare a first series of samples and a second series of samples; the first series of samples consists of water quality parameter samples with gradient concentrations prepared from a blank water sample matrix, and the second series of samples consists of target drug standards with gradient concentrations added to the blank water sample matrix. The first series of samples and the second series of samples were detected by an electrochemical sensor method to obtain the characteristic electrochemical sensing response signals of the water quality parameter samples and the target drug. Calculate the average value of the characteristic electrochemical sensing response signal of the first series of samples, and determine the standard characteristic electrochemical sensing response signal of the water quality parameter sample; A calibration curve for the water quality parameter sample is established by using the gradient of the water quality parameter sample as the abscissa and the difference between the characteristic electrochemical sensing response signal of the water quality parameter sample and the standard characteristic electrochemical sensing response signal as the ordinate. Based on the characteristic electrochemical sensing response signals and target drug concentrations of the second series of samples. Several regression algorithms are used to construct initial prediction models corresponding to the regression algorithms. Grid search and cross-validation are then used to optimize and weight the parameters of the initial prediction models to form a fused regression model. The characteristic electrochemical sensing response signal of the sample to be tested is input into the fusion regression model to calculate the predicted concentration of the target drug in the sample to be tested.
[0007] Optionally, the preparation of a first series of samples and a second series of samples includes: Use the same blank water sample matrix as the base matrix; A fixed volume of the blank water sample matrix was added to a series of containers using a quantitative pipetting method. A gradient volume of water quality parameter sample adjustment solution was added to the first series of samples, and a gradient volume of target drug standard adjustment solution was added to the second series of samples. The mixtures in each container were mixed thoroughly to obtain the first series of samples and the second series of samples.
[0008] Optionally, the average value of the characteristic electrochemical sensing response signal of the first series of samples is calculated to determine the standard characteristic electrochemical sensing response signal of the water quality parameter sample, including: The sample with the lowest concentration in the first series of samples was subjected to at least three parallel tests to obtain the characteristic electrochemical sensing response signal of the water quality parameter sample. Calculate the arithmetic mean and relative standard deviation of the characteristic electrochemical sensing response signal; When the relative standard deviation is less than the standard deviation threshold, the arithmetic mean is determined as the standard characteristic electrochemical sensing response signal.
[0009] 4. The method for analyzing target drug detection results based on water quality parameter calibration according to claim 1, characterized in that, a calibration curve for the water quality parameter sample is established with the gradient of the water quality parameter sample as the abscissa and the difference between the characteristic electrochemical sensing response signal of the water quality parameter sample and the standard characteristic electrochemical sensing response signal as the ordinate, comprising: The dataset used to establish the calibration curve of water quality parameter samples is confirmed; wherein, the horizontal axis dataset is the gradient of water quality parameter samples in the first series of samples, and the vertical axis dataset is the calculated difference between the characteristic electrochemical sensing response signal corresponding to each sample and the standard characteristic electrochemical sensing response signal. Based on the distribution characteristics of the dataset, a linear or nonlinear mathematical model is selected to fit the confirmed horizontal and vertical coordinate datasets to obtain the regression equation. Calculate the goodness of fit of the linear regression equation; When the goodness of fit is greater than or equal to the preset goodness threshold, the regression equation is set as the water quality parameter sample calibration curve.
[0010] Optionally, based on the characteristic electrochemical sensing response signals and target drug concentrations of the second series of samples, several regression algorithms are used to construct initial prediction models corresponding to the regression algorithms, including: The second series of samples were randomly divided into a training subset, a validation subset, and a test subset, with a ratio of 6:2:2. The training subset, the validation subset, and the test subset are standardized, and the mean and standard deviation of the characteristic electrochemical sensing response signal are calculated. Select at least two regression algorithms with different mathematical principles from the pre-built algorithm library; The regression algorithm is trained in parallel using a standardized training subset, and its initial performance is evaluated on a validation subset. The regression algorithm is trained in parallel using the training subset to obtain the corresponding candidate prediction model; Based on the performance of the candidate prediction models on the validation subset, candidate prediction models that meet the performance criteria are selected according to preset evaluation indicators to obtain the initial prediction model corresponding to the regression algorithm.
[0011] Optionally, grid search and cross-validation are used to optimize the parameters of the initial prediction model, including: A multidimensional parameter search space is established for the hyperparameters of the initial prediction model; Within the search space, a parameter grid is generated according to a preset step size, and the parameter combinations of the initial prediction model are traversed. Perform K-fold cross-validation on the parameter combination and calculate the performance index of the parameter combination on the validation set; Based on the aforementioned performance metrics, a Pareto front is constructed to identify non-dominated solution sets. Select parameter combinations that satisfy preset complexity constraints from the non-dominated solution set as parameter configurations.
[0012] Optionally, the optimized initial prediction models are weighted and fused to form a fusion regression model, including: Based on the prediction results of each initial prediction model on the validation set, the prediction performance index of the initial prediction model is calculated; the prediction performance index includes root mean square error, mean absolute error and coefficient of determination. Based on the predicted performance index, the weight coefficients of each of the initial predicted models in the fusion regression model are determined using the entropy weight method. Based on the weight coefficients, a weighted fusion function is established to combine the predicted outputs of the initial prediction model in a weighted manner to construct a fusion regression model. The weighted fusion function is: ; in, The weights of the i-th initial prediction model are... Let be the predicted value of the i-th initial prediction model.
[0013] Optionally, the characteristic electrochemical sensing response signal of the sample to be tested is input into the fusion regression model to calculate the predicted concentration of the target drug in the sample to be tested, including: Based on the established water quality parameter sample calibration curve, the corrected concentration value of the water quality parameter in the sample to be tested is calculated by using the characteristic electrochemical sensing response signal measured in the sample to be tested. The corrected concentration value and the characteristic electrochemical sensing response signal of the sample to be tested are used as inputs to the fusion regression model, and the predicted concentration of the target drug in the sample to be tested is output.
[0014] Optionally, it also includes: The prediction results of at least two initial prediction models based on different principles are fused together to generate a single prediction result. A deep learning-based residual correction module is introduced to optimize and correct the primary prediction result, thereby obtaining a secondary prediction result after residual correction. A dynamic weight allocation mechanism is adopted to adaptively adjust the contribution weight of each initial prediction model in the prediction based on the prediction performance of each initial prediction model in different concentration ranges, resulting in three prediction results.
[0015] Optionally, it also includes: Establish a series of parallel samples under multiple temperature gradients; Based on the parallel sample series, the quantitative influence of temperature change on the characteristic electrochemical sensing response signal was obtained. Based on the aforementioned quantitative influence law, a temperature compensation factor is constructed; The temperature compensation factor is integrated into the fusion regression model to form a temperature-adaptive fusion regression model.
[0016] On the other hand, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the target drug detection result analysis method based on water quality parameter correction as described above.
[0017] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the target drug detection result analysis method based on water quality parameter correction as described above.
[0018] On the other hand, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the target drug detection result analysis method based on water quality parameter correction as described above.
[0019] The present invention provides a method for analyzing the detection results of target drugs based on water quality parameter correction. This method prepares a series of samples with different gradient water quality parameters and a series of standard samples of the target drug. After detecting the characteristic electrochemical sensing response signals of each sample, multiple regression algorithms are used to construct an initial model, which is then optimized and fused into a fusion regression model through grid search and cross-validation. The standard characteristic electrochemical sensing response signal is determined by averaging multiple detections, reducing random errors and improving the correlation of the calibration curve. The fusion optimization of multiple algorithms not only avoids the shortcomings of a single algorithm but also avoids the influence of corrected water quality parameters on the electrochemical sensing response signal of the target drug, removes the interference effect of complex sample matrices, and enhances the stability of the fusion regression model. This solves the problems of insufficient reliability and low prediction accuracy of existing methods for calibration curves, achieving more accurate quantitative detection of the target drug. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0021] Figure 1 This invention provides a method for analyzing the detection results of target drugs based on water quality parameter correction. Figure 2 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0023] Figure 1 This is a flowchart illustrating the target drug detection result analysis method based on water quality parameter correction provided in this embodiment of the invention.
[0024] like Figure 1 As shown in the embodiment of the present invention, the method for analyzing the detection results of target drugs based on water quality parameter correction mainly includes the following steps: 101. Prepare the first series of samples and the second series of samples.
[0025] The first series of samples consisted of blank water sample matrix with added gradient water quality parameter samples, while the second series of samples consisted of blank water sample matrix with added target drug standards at gradient concentrations.
[0026] The first series of samples is used to obtain the characteristic electrochemical sensing response signals of water quality parameter samples in subsequent tests. The standard characteristic electrochemical sensing response signal of the water quality parameter sample is determined by calculating the average value of the characteristic electrochemical sensing response signal of the first series of samples. The water quality parameter sample calibration curve is established by fitting regression with the gradient added as the abscissa and the difference between the response signal and the standard characteristic electrochemical sensing response signal as the ordinate. This provides a basis for eliminating interference from substances in the water sample and improving the accuracy of the target drug detection results.
[0027] Specifically, the preparation of the first series of samples and the second series of samples includes: Use the same blank water sample matrix as the base matrix; A fixed volume of blank water sample matrix was added to a series of containers using a quantitative pipetting method. A gradient volume of water quality parameter sample adjustment solution was added to the first series of samples, and a gradient volume of target drug standard adjustment solution was added to the second series of samples. The mixture in each container is vortexed to obtain the first series of samples and the second series of samples.
[0028] This includes preparing blank water sample matrix simulating wastewater to examine and correct for interferences in water quality parameters. Specifically, this includes: Prepare a pH gradient series: Adjust the pH value using dilute HNO3 or NaOH solution to cover a range of wastewater conditions. For example, prepare first and second series samples for each pH level: 5.0, 6.0, 6.5, 7.0, 8.0, 9.0.
[0029] Preparation of an ionic strength gradient series: At a fixed pH, add mixed solutions of NaCl and MgCl2 at different concentrations to make NaCl... + With Mg² + The total concentration is used to form a gradient, for example, 0, 0.5, 1, 5, 10, 30, 50 mM, and the first series of samples is prepared at each ionic strength.
[0030] Preparation of turbidity gradient series: Under fixed pH and ionic strength, different amounts of kaolin suspension were added, and samples with different turbidities were prepared by dilution. The first series of samples was prepared for each turbidity.
[0031] Preparation of dissolved organic carbon (DOC) gradient series: Under fixed pH, ionic strength and low turbidity, different amounts of mixed stock solution of humic acid, tryptophan and bovine serum albumin (BSA) were added to prepare samples with different DOC concentrations, such as 0, 0.5, 1, 5, 10, 20 and 30 mg / L. A first series of samples was prepared for each DOC concentration.
[0032] The multi-series samples prepared in this way not only contain the concentration gradient of the target substance, but also embed the gradient of key water quality parameters, which can be used to build a robust model that can resist matrix interference.
[0033] After the first series of samples was prepared, the same steps were followed to prepare the first series of samples again, and the target drug standard solution of gradient volume was added to the centrifuge tube in sequence to obtain the second series of samples with corresponding gradient concentrations.
[0034] Finally, all centrifuge tubes containing the added matrix and conditioning solution were placed on a vortex mixer and vortexed at 1500 r / min for 3 minutes to ensure that the water quality parameter samples, target drugs and blank water sample matrix were fully mixed without stratification or local concentration unevenness, thus obtaining the first series of samples and the second series of samples with concentration gradient distribution.
[0035] 102. Electrochemical methods were used to detect the first and second series of samples to obtain the characteristic electrochemical sensing response signals of the water quality parameters and the target drug.
[0036] In this process, simulated wastewater samples with varying pH values, ionic strengths, turbidities, and dissolved organic carbon concentrations were sequentially placed in a standard three-electrode electrochemical cell. Based on the electrochemical properties of the target analyte, a highly sensitive differential pulse voltammetry method was preferred, with scanning performed within a predetermined potential window. Before each scan, the measured pH, conductivity, and turbidity of the sample were recorded simultaneously. During the detection, the peak current values generated at their respective characteristic redox potentials for the water quality parameter samples and the target analyte were recorded and extracted as characteristic electrochemical sensing response signals for quantitative analysis.
[0037] 103. Calculate the average value of the characteristic electrochemical sensing response signals of the first series of samples, and determine the standard characteristic electrochemical sensing response signals of the water quality parameter samples.
[0038] The standard characteristic electrochemical sensing response signal is the stable value of the characteristic electrochemical sensing response signal exhibited by the water quality parameter sample when there is no interference from the target drug. By statistically processing the characteristic electrochemical sensing response signal data obtained from multiple tests of the first series of samples, the arithmetic mean of the characteristic electrochemical sensing response signal is calculated. This arithmetic mean can accurately represent the standard characteristic electrochemical sensing response signal of the water quality parameter sample, providing a reliable benchmark reference for subsequent accurate analysis of the target drug's detection results.
[0039] Specifically, the average value of the characteristic electrochemical sensing response signal of the first series of samples is calculated, and the standard characteristic electrochemical sensing response signal of the water quality parameter sample is determined, including: The sample with the lowest concentration in the first series of samples was subjected to at least three parallel tests to obtain the characteristic electrochemical sensing response signal of the water quality parameter sample. Calculate the arithmetic mean and relative standard deviation of the characteristic electrochemical sensing response signal; When the relative standard deviation is less than the standard deviation threshold, the arithmetic mean is determined as the standard characteristic electrochemical sensing response signal.
[0040] First, the sample with the lowest concentration of water quality parameters in the first series of samples is selected, for example, a humic acid gradient sample with a concentration of 20 ng / mL. A concentration of 20 ng / mL is closest to the background level of the blank water sample matrix, minimizing interference from the amount of water quality parameter sample itself added to the background response. At least three parallel tests are performed using the same analytical method as subsequent samples, for example, setting up three repeated injections, each with an injection volume of 10 μL, and using differential pulse voltammetry with a potential window of -0.5 V to 1.5 V and a scan rate of 50 mV / s. The characteristic electrochemical sensing response signals of the water quality parameter samples obtained from each test are recorded, such as peak current values. Next, the arithmetic mean of the characteristic electrochemical sensing response signals is calculated. Simultaneously, the relative standard deviation of these data is calculated, reflecting the degree of data dispersion. When the calculated relative standard deviation is less than 5%, it indicates that the dispersion of the multiple test data is small and the data stability is good. In this case, the arithmetic mean is determined as the standard characteristic electrochemical sensing response signal. If the relative standard deviation is greater than or equal to 5%, parallel testing must be repeated until the relative standard deviation is less than the standard deviation threshold. Determine the standard characteristic electrochemical sensing response signal of the water quality parameter sample. Subsequently, the arithmetic mean is calculated based on the valid detection data, and the relative standard deviation is also calculated. The relative standard deviation is used to evaluate the precision of parallel detection results and reflects the repeatability and stability of the detection system. Finally, a standard deviation threshold is preset. When the calculated relative standard deviation is less than the preset standard deviation threshold, it indicates that the consistency of the parallel detection results is good and the detection data is reliable. At this time, the calculated arithmetic mean is determined as the standard characteristic electrochemical sensing response signal of the water quality parameter sample. The standard characteristic electrochemical sensing response signal is used to subtract the interference of matrix background on the response value of the target analyte in the sample detection to ensure the accuracy of the detection results.
[0041] 104. Establish a calibration curve for water quality parameter samples by using the gradient of the water quality parameter sample as the abscissa and the difference between the characteristic electrochemical sensing response signal of the water quality parameter sample and the standard characteristic electrochemical sensing response signal as the ordinate.
[0042] The water quality parameter sample calibration curve represents the quantitative relationship between the concentration of the added water quality parameter sample and the characteristic electrochemical sensing response signal. This quantitative relationship is mathematically described by a regression equation. By establishing the water quality parameter sample calibration curve, the changes in the characteristic electrochemical sensing response signal of the water quality parameter sample at different concentrations can be intuitively understood. Furthermore, based on the characteristic electrochemical sensing response signal of the water quality parameter sample in the sample, the actual concentration of the water quality parameter sample in the sample can be accurately calculated using the water quality parameter sample calibration curve. This provides a basis for the detection and analysis of target drugs and helps improve the accuracy and reliability of the detection results.
[0043] Specifically, a calibration curve for water quality parameter samples is established, with the gradient of the water quality parameter sample as the x-axis and the difference between the characteristic electrochemical sensing response signal of the water quality parameter sample and the standard characteristic electrochemical sensing response signal as the y-axis. This includes: Identify the dataset used to establish the water quality parameter sample calibration curves; The horizontal axis dataset represents the gradient of water quality parameters in the first series of samples, while the vertical axis dataset represents the calculated difference between the characteristic electrochemical sensing response signal and the standard characteristic electrochemical sensing response signal for each sample. Based on the distribution characteristics of the dataset, a linear or nonlinear mathematical model is selected to fit the confirmed horizontal and vertical axis datasets to obtain the regression equation. Calculate the goodness of fit of the regression equation; When the goodness of fit is greater than or equal to the preset goodness threshold, the regression equation is set as the water quality parameter sample calibration curve.
[0044] In establishing the calibration curve for water quality parameters, the dataset used to fit the calibration curve is first identified. The horizontal axis dataset directly uses the gradient of the first series of samples, while the vertical axis dataset is obtained by calculating the difference between the characteristic electrochemical sensing response signal of each gradient sample in the first series of samples and the determined standard characteristic electrochemical sensing response signal. The difference can effectively deduct the interference of the blank water sample matrix and truly reflect the response signal corresponding to the water quality parameter gradient.
[0045] After obtaining the dataset, it is necessary to analyze the distribution trend of the data points in the scatter plot. If the data points show a clear linear trend, a linear model is selected for least-squares fitting. If the data points show a curved trend, such as logarithmic or exponential characteristics, a corresponding nonlinear mathematical model needs to be selected for fitting. Common models include polynomial functions, exponential functions, logarithmic functions, or power functions. Based on the actual distribution of the data, the most suitable function form is selected to describe the quantitative relationship between concentration and signal difference. By substituting the dataset into the selected model for calculation, a specific regression equation can be obtained. The regression equation quantifies the mapping relationship between water quality parameter concentration (x) and net response signal (y).
[0046] To evaluate the ability and reliability of the regression equation in describing the original data points, it is necessary to calculate the goodness of fit of the regression equation. The coefficient of determination can be used to reflect the degree of agreement between the curve predicted by the regression equation and the actual data points; a higher coefficient of determination indicates a better fit.
[0047] When the calculated coefficient of determination is greater than the preset goodness threshold, it indicates that the fitting effect of the regression equation meets the accuracy and requirements of quantitative analysis, and the regression equation is set as the water quality parameter sample calibration curve.
[0048] 105. Based on the characteristic electrochemical sensing response signals and target drug concentrations of the second series of samples, several regression algorithms are used to construct the initial prediction models corresponding to the regression algorithms. Grid search and cross-validation are then used to optimize and weight the parameters of the initial prediction models to form a fused regression model.
[0049] The initial prediction model corresponding to the regression algorithm can be constructed using various regression algorithms. For example, linear regression uses the target drug concentration as the independent variable and the characteristic electrochemical sensor response signal as the dependent variable, and determines the regression coefficients using the least squares method to construct the initial linear regression prediction model. Alternatively, polynomial regression can be used, considering the relationship between the polynomial term of the target drug concentration and the characteristic electrochemical sensor response signal to construct the initial polynomial regression prediction model. In addition, support vector regression can also be used to construct the initial prediction model by finding an optimal hyperplane to fit the data, thereby obtaining the initial support vector regression prediction model.
[0050] Specifically, based on the characteristic electrochemical sensing response signals and target drug concentrations of the second series of samples, several regression algorithms are used to construct initial prediction models corresponding to the regression algorithms, including: The second series of samples were randomly divided into a training subset, a validation subset, and a test subset, with a ratio of 6:2:2. The training subset, validation subset, and test subset are standardized, and the mean and standard deviation of the characteristic electrochemical sensing response signals are calculated. Select at least two regression algorithms with different mathematical principles from the pre-built algorithm library; The regression algorithm was trained in parallel using a standardized training subset, and its initial performance was evaluated on a validation subset. The regression algorithm is trained in parallel using a training subset to obtain the corresponding candidate prediction model; Based on the performance of candidate prediction models on the validation subset, candidate prediction models that meet the performance criteria are selected according to the preset evaluation indicators, and the initial prediction model corresponding to the regression algorithm is obtained.
[0051] In addition, grid search and cross-validation are used to optimize the parameters of the initial prediction model, specifically including: Establish a multidimensional parameter search space for the hyperparameters of the initial prediction model; Generate a parameter grid within the search space according to a preset step size, and traverse the parameter combinations of the initial prediction model; Perform K-fold cross-validation on the parameter combination and calculate the performance index of the parameter combination on the validation set; Construct a Pareto front based on performance metrics to identify non-dominated solution sets; Select parameter combinations that satisfy the preset complexity constraints from the non-dominated solution set as parameter configurations.
[0052] Specifically, to further improve the prediction accuracy and generalization ability of the initial prediction model and reduce the risk of overfitting, a combination of grid search and cross-validation is used to optimize the parameters of the initial prediction model. For example, a multi-dimensional parameter search space is established for the core hyperparameters of the initial prediction model. A reasonable search range is set by combining model characteristics and domain experience to ensure that the search space covers the effective value range of key parameters while avoiding computational redundancy due to an excessively large range.
[0053] Then, within the multidimensional search space, a preset step size is used to ensure that no potential optimal parameter configurations are missed. Next, K-fold cross-validation is performed on each parameter combination. The K value is usually set to 5 or 10. This optimization process uses 10 folds, which means that the initial training subset is randomly divided into 10 equally sized subsets. Nine subsets are selected in turn as the cross-validation training set and one subset is selected as the cross-validation validation set. This process is repeated 10 times to complete the full data validation. By calculating the core performance indicators of each parameter combination on all cross-validation sets, the stability and generalization ability of the parameter combination are comprehensively evaluated, avoiding performance misjudgments caused by a single validation set.
[0054] Then, a Pareto front is constructed based on the multi-dimensional performance indicators of all parameter combinations. The Pareto front consists of a set of non-dominated solutions. A non-dominated solution is one in which no other parameter combination is superior to the previous one across all optimization objectives. For example, parameter combination A has a root mean square error of 2.1% and a prediction speed of 0.8 s / test, while parameter combination B has a root mean square error of 2.3% and a prediction speed of 0.6 s / test. Neither of them can be completely dominated by the other, so both are included in the set of non-dominated solutions. The Pareto front can efficiently screen out high-quality parameter combinations with balanced performance across multiple objectives.
[0055] Finally, parameter combinations that satisfy the preset complexity constraints are selected from the non-dominated solution set, and the parameter configuration that balances prediction accuracy, generalization ability and engineering practicality is finally determined as the final parameter setting of the optimized model.
[0056] Furthermore, the optimized initial prediction models are weighted and fused to form a fusion regression model, including: Based on the prediction results of each initial prediction model on the validation set, the prediction performance index of the initial prediction model is calculated; the prediction performance index includes root mean square error, mean absolute error and coefficient of determination. Based on the prediction performance index, the entropy weight method is used to determine the weight coefficients of each initial prediction model in the fusion regression model; Based on the weight coefficients, a weighted fusion function is established to combine the predicted outputs of the initial prediction model in a weighted manner and construct a fusion regression model. The weighted fusion function is: ; in, The weights of the i-th initial prediction model are... Let be the predicted value of the i-th initial prediction model.
[0057] Specifically, for the prediction results of each initial prediction model on the validation set, the prediction performance index corresponding to each model is calculated, namely, the root mean square error, which reflects the overall deviation between the model's predicted value and the actual target drug concentration in the validation set. The smaller the value, the better the performance. The mean absolute error reflects the average absolute deviation between the model's predicted value and the actual value. Similarly, the smaller the value, the better. The coefficient of determination reflects the linear correlation between the model's predicted value and the actual value. The closer the value is to 1, the better the fitting effect. The independent performance of each initial prediction model is comprehensively quantified through multi-dimensional indicators.
[0058] Subsequently, the entropy weight method was used to determine the weight coefficients of each initial prediction model in the fusion regression model. The entropy weight method assesses the dispersion of each performance indicator by calculating its information entropy, and then converts this dispersion into weights. Specifically, the three performance indicators of each model were first standardized, and then the information entropy value of each indicator was calculated. A smaller information entropy indicates a greater performance difference among the models under that indicator, and a higher contribution of information entropy to weight allocation. Finally, the weight coefficients of each initial prediction model were derived based on the information entropy. And the sum of the weight coefficients of all models satisfies This ensures the objectivity and rationality of weighting, and avoids weight bias caused by subjective experience.
[0059] Finally, a weighted fusion function is established based on the obtained weight coefficients. By linearly weighting the predicted values of each initial prediction model according to the corresponding weight coefficients, the advantages of each model's prediction information are fully integrated, and a fusion regression model is finally constructed. The fusion regression model can effectively reduce the prediction bias and uncertainty of a single model and improve the reliability and robustness of the overall prediction results.
[0060] 106. Input the characteristic electrochemical sensing response signal of the sample to be tested into the fusion regression model to calculate the predicted concentration of the target drug in the sample to be tested.
[0061] Specifically, the characteristic electrochemical sensing response signal of the sample to be tested is input into the fusion regression model to calculate the predicted concentration of the target drug in the sample, including: Based on the established water quality parameter sample calibration curves, the corrected concentration values of water quality parameters in the sample to be tested are calculated using the characteristic electrochemical sensing response signals measured in the sample to be tested. The corrected concentration value and the characteristic electrochemical sensing response signal of the sample to be tested are used as inputs to fuse the regression model, and the predicted concentration of the target drug in the sample to be tested is output.
[0062] In this process, the characteristic electrochemical sensor response signal of the sample is measured and substituted into the regression equation corresponding to the calibration curve of the water quality parameter sample to calculate the actual interference level of the water quality parameter in the sample, i.e., the corrected concentration value. Then, the corrected concentration value and the characteristic electrochemical sensor response signal of the sample for the target drug are used as input variables and imported into a pre-trained fusion regression model. The fusion model performs comprehensive calculations and weight analysis on these two input variables through internal algorithms, ultimately outputting a more accurate predicted concentration of the target drug that eliminates the interference of water quality parameters, thus improving the reliability of drug detection results in complex water quality matrices.
[0063] In some embodiments, the present invention also provides a method for analyzing target drug detection results based on water quality parameter correction, which further includes: The prediction results of at least two initial prediction models based on different principles are fused together to generate a single prediction result. A deep learning-based residual correction module is introduced to optimize and correct the primary prediction result, thereby obtaining the secondary prediction result after residual correction. A dynamic weight allocation mechanism is adopted to adaptively adjust the contribution weight of the initial prediction model in the prediction based on the prediction performance of each initial prediction model in different concentration ranges, and the prediction results are obtained from three predictions.
[0064] Specifically, at least two initial prediction models based on different principles are used to predict the target drug concentration of the same sample to be tested, and their respective initial prediction results are obtained.
[0065] By using a weighted average method or a machine learning-based fusion algorithm, the prediction results of at least two initial prediction models are fused to generate a single prediction result. This single prediction result combines the advantages of different models, thereby improving the accuracy of the prediction.
[0066] A deep learning-based residual correction module is constructed. The residual correction module learns from the prediction error data of a large number of known target drug concentration samples to establish an error prediction model. The primary prediction result is input into the residual correction module, which outputs the prediction error value. The primary prediction result is subtracted from the prediction error value to obtain the secondary prediction result after residual correction, which effectively reduces the prediction error.
[0067] Regarding the dynamic weight allocation mechanism, historical prediction data of each initial prediction model in different concentration ranges are collected, and the prediction accuracy and recall of each model in different concentration ranges are calculated. Based on performance indicators, initial weights are set for each initial prediction model in different concentration ranges. In the actual prediction process, the contribution weights of each initial prediction model are adaptively adjusted according to the range of the target drug concentration of the current sample to be tested. The prediction results of each initial prediction model after weight adjustment are fused to obtain three prediction results, which further improves the accuracy and reliability of the prediction.
[0068] In some embodiments, the present invention also provides a method for analyzing target drug detection results based on water quality parameter correction, which further includes: Establish a series of parallel samples under multiple temperature gradients; Based on a series of parallel samples, the quantitative influence of temperature changes on the characteristic electrochemical sensing response signal was obtained. Based on the quantitative impact law, a temperature compensation factor is constructed; By integrating the temperature compensation factor into the fusion regression model, a temperature-adaptive fusion regression model is formed.
[0069] Specifically, when establishing a series of parallel samples under multiple temperature gradients, it is necessary to strictly control experimental conditions other than temperature to ensure that temperature is the only variable among the parallel samples, thus guaranteeing the accuracy of the subsequent quantitative influence law. In obtaining the quantitative influence law of temperature change on the characteristic electrochemical sensing response signal, differential pulse voltammetry is used to detect parallel samples under different temperature gradients, record the characteristic electrochemical sensing response signal data, and perform fitting analysis on the characteristic electrochemical sensing response signal data to derive the quantitative relationship between temperature change and the characteristic electrochemical sensing response signal.
[0070] When constructing a temperature compensation factor based on the quantitative influence law, a suitable mathematical model is determined according to the quantitative relationship. Through mathematical calculation, a temperature compensation factor that accurately reflects the influence of temperature on the characteristic electrochemical sensing response signal is obtained. When integrating the temperature compensation factor into the fusion regression model, the algorithm of the fusion regression model is optimized, and the temperature compensation factor is included as a parameter in the calculation process of the fusion regression model. After multiple training and verifications, a temperature-adaptive fusion regression model is formed. This temperature-adaptive fusion regression model can automatically adjust the prediction results according to the actual temperature conditions during detection, improving the accuracy of the target drug detection result analysis.
[0071] Figure 2 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention.
[0072] like Figure 2As shown, the electronic device may include a processor 210, a communications interface 220, a memory 230, and a communication bus 240. The processor 210, communications interface 220, and memory 230 communicate with each other via the communication bus 240. The processor 210 can call logical instructions from the memory 230 to execute a method for analyzing the detection results of target drugs based on water quality parameter correction.
[0073] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0074] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the target drug detection result analysis method based on water quality parameter correction provided by the above methods.
[0075] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the target drug detection result analysis method based on water quality parameter correction provided by the above methods.
[0076] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0077] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention 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; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for analyzing the detection results of target drugs based on water quality parameter correction, characterized in that, include: Prepare a first series of samples and a second series of samples; the first series of samples consists of water quality parameter samples with gradient concentrations prepared from a blank water sample matrix, and the second series of samples consists of target drug standards with gradient concentrations added to the blank water sample matrix. The first series of samples and the second series of samples were detected by an electrochemical sensor method to obtain the characteristic electrochemical sensing response signals of the water quality parameter samples and the target drug. Calculate the average value of the characteristic electrochemical sensing response signal of the first series of samples, and determine the standard characteristic electrochemical sensing response signal of the water quality parameter sample; A calibration curve for the water quality parameter sample is established by using the gradient of the water quality parameter sample as the abscissa and the difference between the characteristic electrochemical sensing response signal of the water quality parameter sample and the standard characteristic electrochemical sensing response signal as the ordinate. Based on the characteristic electrochemical sensing response signals and target drug concentrations of the second series of samples, several regression algorithms are used to construct initial prediction models corresponding to the regression algorithms. Grid search and cross-validation are then employed to optimize and weight the parameters of the initial prediction models, forming a fused regression model. The characteristic electrochemical sensing response signal of the sample to be tested is input into the fusion regression model to calculate the predicted concentration of the target drug in the sample to be tested.
2. The method for analyzing target drug detection results based on water quality parameter correction according to claim 1, characterized in that, Preparation of the first series of samples and the second series of samples, including: Use the same blank water sample matrix as the base matrix; A fixed volume of the blank water sample matrix was added to a series of containers using a quantitative pipetting method. A gradient volume of water quality parameter sample adjustment solution was added to the first series of samples, and a gradient volume of target drug standard adjustment solution was added to the second series of samples. The mixtures in each container were mixed thoroughly to obtain the first series of samples and the second series of samples.
3. The method for analyzing target drug detection results based on water quality parameter correction according to claim 1, characterized in that, Calculate the average value of the characteristic electrochemical sensing response signal of the first series of samples, and determine the standard characteristic electrochemical sensing response signal of the water quality parameter sample, including: The sample with the lowest concentration in the first series of samples was subjected to at least three parallel tests to obtain the characteristic electrochemical sensing response signal of the water quality parameter sample. Calculate the arithmetic mean and relative standard deviation of the characteristic electrochemical sensing response signal; When the relative standard deviation is less than the standard deviation threshold, the arithmetic mean is determined as the standard characteristic electrochemical sensing response signal.
4. The method for analyzing target drug detection results based on water quality parameter correction according to claim 1, characterized in that, A calibration curve for the water quality parameter sample is established, with the concentration of the added water quality parameter sample as the x-axis and the difference between the characteristic electrochemical sensing response signal of the water quality parameter sample and the standard characteristic electrochemical sensing response signal as the y-axis. This curve includes: The dataset used to establish the water quality parameter sample calibration curve is confirmed; wherein, the horizontal axis dataset is the water quality parameter gradient in the first series of samples, and the vertical axis dataset is the calculated difference between the characteristic electrochemical sensing response signal corresponding to each sample and the standard characteristic electrochemical sensing response signal. Based on the distribution characteristics of the dataset, a linear or nonlinear mathematical model is selected to fit the confirmed horizontal and vertical coordinate datasets to obtain the regression equation. Calculate the goodness of fit of the regression equation; When the goodness of fit is greater than or equal to the preset goodness threshold, the regression equation is set as the water quality parameter sample calibration curve.
5. The method for analyzing target drug detection results based on water quality parameter correction according to claim 1, characterized in that, Based on the characteristic electrochemical sensing response signals and target drug concentrations of the second series of samples, several regression algorithms are used to construct initial prediction models corresponding to the regression algorithms, including: The second series of samples were randomly divided into a training subset, a validation subset, and a test subset, with a ratio of 6:2:
2. The training subset, the validation subset, and the test subset are standardized, and the mean and standard deviation of the characteristic electrochemical sensing response signal are calculated. Select at least two regression algorithms with different mathematical principles from the pre-built algorithm library; The regression algorithm is trained in parallel using a standardized training subset, and its initial performance is evaluated on a validation subset. The regression algorithm is trained in parallel using the training subset to obtain the corresponding candidate prediction model; Based on the performance of the candidate prediction models on the validation subset, candidate prediction models that meet the performance criteria are selected according to preset evaluation indicators to obtain the initial prediction model corresponding to the regression algorithm.
6. The method for analyzing target drug detection results based on water quality parameter correction according to claim 5, characterized in that, The parameters of the initial prediction model are optimized using grid search and cross-validation, including: A multidimensional parameter search space is established for the hyperparameters of the initial prediction model; Within the search space, a parameter grid is generated according to a preset step size, and the parameter combinations of the initial prediction model are traversed. Perform K-fold cross-validation on the parameter combination and calculate the performance index of the parameter combination on the validation set; Based on the aforementioned performance metrics, a Pareto front is constructed to identify non-dominated solution sets. Select parameter combinations that satisfy preset complexity constraints from the non-dominated solution set as parameter configurations.
7. The method for analyzing target drug detection results based on water quality parameter correction according to claim 5, characterized in that, The optimized initial prediction models are weighted and fused to form a fused regression model, including: Based on the prediction results of each initial prediction model on the validation set, the prediction performance index of the initial prediction model is calculated; the prediction performance index includes root mean square error, mean absolute error and coefficient of determination. Based on the predicted performance index, the weight coefficients of each of the initial predicted models in the fusion regression model are determined using the entropy weight method. Based on the weight coefficients, a weighted fusion function is established to combine the predicted outputs of the initial prediction model in a weighted manner to construct a fusion regression model. The weighted fusion function is: ; in, The weights of the i-th initial prediction model are... Let be the predicted value of the i-th initial prediction model.
8. The method for analyzing target drug detection results based on water quality parameter correction according to claim 1, characterized in that, The characteristic electrochemical sensing response signal of the sample to be tested is input into the fusion regression model to calculate the predicted concentration of the target drug in the sample to be tested, including: Based on the established water quality parameter sample calibration curve, the corrected concentration value of the water quality parameter in the sample to be tested is calculated by using the characteristic electrochemical sensing response signal measured in the sample to be tested. The corrected concentration value and the characteristic electrochemical sensing response signal of the sample to be tested are used as inputs to the fusion regression model, and the predicted concentration of the target drug in the sample to be tested is output.
9. The method for analyzing target drug detection results based on water quality parameter correction according to claim 1, characterized in that, Also includes: The prediction results of at least two initial prediction models based on different principles are fused together to generate a single prediction result. A deep learning-based residual correction module is introduced to optimize and correct the primary prediction result, thereby obtaining a secondary prediction result after residual correction. A dynamic weight allocation mechanism is adopted to adaptively adjust the contribution weight of each initial prediction model in the prediction based on the prediction performance of each initial prediction model in different concentration ranges, resulting in three prediction results.
10. The method for analyzing target drug detection results based on water quality parameter correction according to claim 1, characterized in that, Also includes: Establish a series of parallel samples under multiple temperature gradients; Based on the parallel sample series, the quantitative influence of temperature change on the characteristic electrochemical sensing response signal was obtained. Based on the aforementioned quantitative influence law, a temperature compensation factor is constructed; The temperature compensation factor is integrated into the fusion regression model to form a temperature-adaptive fusion regression model.
Citation Information
Patent Citations
Water quality parameter correction method applied to water quality reference derivation
CN111932089A
Data processing method, device and equipment for water quality monitoring and readable storage medium
CN111965322A
Method for detecting organic pollutants in soil and underground water
CN120009456A
Rapid detection method for water pollutants
CN120741372A
Fishery breeding safe area intelligent planning method and system based on water quality change prediction
CN121146351A