A method for detecting total phenol in NFC juice by combining conventional physicochemical indicators with super parameter optimization

By combining conventional physicochemical indicators with hyperparameter optimization and an interpretable integrated model, the problems of cumbersome operation, heavy environmental burden, and high cost in NFC juice total phenol content detection have been solved. This has enabled rapid, low-cost, green, and interpretable TPC detection of juice, which is suitable for production lines of small and medium-sized juice enterprises.

CN122468631APending Publication Date: 2026-07-28NANJING AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING AGRICULTURAL UNIVERSITY
Filing Date
2025-12-29
Publication Date
2026-07-28

AI Technical Summary

Technical Problem

Existing NFC methods for detecting total phenol content in fruit juice are cumbersome to operate, have a high environmental burden and cost, and the intelligent models lack interpretability, making it difficult to quickly and accurately evaluate the total phenol content (TPC) of fruit juice on the production lines of small and medium-sized enterprises.

Method used

A method for detecting total phenol content in fruit juice was constructed by combining conventional physicochemical indicators with hyperparameter optimization and interpretable ensemble models. This method utilizes the Optuna automatic hyperparameter optimization platform and Stacking ensemble learning, along with SHAP interpretability analysis, and employs conventional indicators such as L*, a*, b*, SSC, TA, and pH for rapid detection.

Benefits of technology

It achieves rapid, low-cost, green, and interpretable TPC detection of juice, lowers the detection threshold, and improves the prediction accuracy and robustness of the model, making it suitable for small and medium-sized juice enterprises.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122468631A_ABST
    Figure CN122468631A_ABST
Patent Text Reader

Abstract

The application discloses a NFC juice total phenol detection method combining conventional physicochemical indexes and super parameter optimization. The method is based on the CIE colorimetric L * 、 a * 、 b * , soluble solids, titration acidity and pH parameters, adopts a stacked integrated learning framework, comprehensively predict results of each basic model by using linear regression as a meta-learner, and establishes a high-precision prediction model of the NFC juice total phenol content. By introducing the SHAP explainability analysis method, the contribution of each physicochemical index to the prediction result is quantified from the model level, and the key variable combination affecting the total phenol content prediction is revealed through feature interaction analysis, so that the data acquisition cost is reduced under the premise of ensuring the prediction performance. The method overcomes the defects of low efficiency and high pollution of the determination of NFC juice total phenol by the Folin-phenol reagent colorimetric method, has the advantages of low operation cost, high prediction accuracy, strong explainability and easy industrial promotion, and provides a green and efficient solution for the rapid detection and quality control of the NFC juice total phenol content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fruit juice quality testing and intelligent food analysis, and in particular to an NFC method for detecting total phenols in fruit juice by combining conventional physicochemical indicators with hyperparameter optimization. Background Technology

[0002] With the continuous improvement of residents' living standards and the enhancement of health awareness, non-concentrated (NFC) juice has received widespread attention due to its gentle processing and better preservation of nutrition and flavor. NFC blended juice is usually made by blending various fruit juices (such as apple, mango, orange, pear, etc.) in different proportions. Its nutritional components and sensory quality depend not only on the properties of the individual juices themselves, but also on many factors such as the blending method and processing technology.

[0003] Total phenolic content (TPC) is a crucial indicator for assessing the antioxidant capacity and nutritional function of fruit juice. It is closely related to health functions such as free radical scavenging and anti-inflammatory activity, thus holding a central position in fruit juice product development and quality control. Currently, TPC is typically determined using chemical methods such as the Folin-Ciocalteu reagent colorimetric method. While this method offers high accuracy, it has several drawbacks. First, it is cumbersome and time-consuming, involving steps such as sampling, solvent extraction, colorimetric reaction, and colorimetric determination. This time-consuming process limits high-throughput detection capabilities. Second, it consumes a large amount of reagents and has a significant environmental impact. The Folin-Ciocalteu reagent contains heavy metals such as molybdenum and tungsten, and long-term, large-scale use will create significant challenges in chemical waste treatment. Finally, this method is highly dependent on laboratory conditions, operator expertise, and reagent stability. These factors can affect the reproducibility and comparability of the results, hindering small and medium-sized enterprises from rapidly evaluating fruit juice TPC on their production lines.

[0004] CIE colorimetric parameters are used in the production and quality control of fruit juice. L * , a * , b * Common physicochemical indicators (RPA) such as soluble solids content (SSC), titratable acidity (TA), and pH can be quickly obtained using inexpensive instruments such as portable colorimeters, refractometers, acidity meters, and pH meters, and are widely used in actual production. However, most existing technologies only use these physicochemical indicators for single-indicator monitoring or empirical judgment, lacking a systematic method that combines multiple common physicochemical indicators with advanced machine learning modeling methods for accurate prediction of NFC juice TPC.

[0005] While machine learning is increasingly used in food quality prediction, its development still faces key bottlenecks. Current research generally relies on single model architectures, such as Random Forest (RF) or Gradient Boosting Machine (GBM), leading to inherent limitations in model robustness and generalization performance. At the model optimization level, hyperparameter tuning is often dominated by subjective human experience, lacking a systematic optimization mechanism, making it difficult for the model to achieve global optimum performance. A deeper obstacle lies in the lack of transparent and interpretable mechanistic support for the "black box" decision-making mechanisms of many high-performance models, which has become a key factor restricting the widespread adoption of this technology in high-standard industrial and regulatory environments.

[0006] Therefore, there is an urgent need for a new rapid detection method for NFC fruit juice TPC that uses conventional physicochemical indicators as input, combines automatic hyperparameter optimization, integrated learning and interpretable artificial intelligence (XAI), and can effectively supplement and partially replace traditional chemical determination methods, reduce environmental burden and detection costs, and have good transparency and scalability. Summary of the Invention

[0007] (a) Purpose of the invention The purpose of this invention is to overcome the problems of cumbersome operation, high environmental burden, high cost, and lack of interpretability of intelligent models in existing NFC fruit juice total phenol content detection methods. This invention proposes an NFC fruit juice total phenol content detection method based on conventional physicochemical indicators combined with hyperparameter optimization and an interpretable integrated model.

[0008] (II) Technical Solution To achieve the above objectives, this invention provides a method for detecting the total phenolic content of NFC fruit juice based on conventional physicochemical indicators combined with hyperparameter optimization and an interpretable ensemble model, comprising the following steps: S1: Preparation and Proportioning Design of NFC Juice Samples Commercially available NFC apple juice, mango juice, orange juice and pear juice were selected as raw materials. Different proportions of compound juice were configured using mixing design software to construct a variety of mixed samples including binary, ternary and quaternary ratios, and a representative NFC compound juice sample set was obtained. S2: Determination of routine physicochemical properties and total phenol content Colorimetric parameters were measured for each NFC juice sample. L * , a * , b * Soluble solids content (SSC), titratable acidity (TA), and pH were used as routine physicochemical indicators. Meanwhile, the total phenol content (TPC) was determined using a modified Folin-Ciocalteu colorimetric method, expressed in mg GAE / mL, as a reference value for the target variable. S3: Dataset Construction and Partitioning by L * , a * , b * Using SSC, TA, and pH as input variables and TPC as the output variable, a dataset of routine physicochemical indicators for NFC juice—TPC—was constructed. The Kennard-Stone algorithm was used to divide the dataset into a calibration set and an independent prediction set in a 3:1 ratio, and k-fold cross-validation was applied to the calibration set to improve the model robustness. S4: Establishing the Basic Regression Model Based on the calibration set data, six regression algorithms, namely RF, XGB, LGBM, GBM, AdaBoost, and CatBoost, were used to establish the basic model for TPC prediction, and several candidate models with different structures and fitting capabilities were obtained. S5: Hyperparameter Optimization Using the Optuna automatic hyperparameter optimization platform, a hyperparameter search space including the number of trees, learning rate, maximum depth, and subsampling ratio is set for the above six basic models. With the root mean square error of cross-validation as the objective function, the platform automatically searches for and outputs the optimal hyperparameter combination for each basic model, and uses this combination to retrain the basic model.

[0009] S6: Stacking Integration Model Construction After obtaining the optimized base model, a stacking ensemble learning strategy is adopted, which uses k-fold cross-validation to obtain the first-level prediction values ​​of each base model on the training set, and combines these prediction values ​​as a new feature matrix. Subsequently, a linear regression model is introduced as a meta-learner to train a second-level ensemble model, realizing the weighted fusion and error correction of the prediction results of multiple models, and constructing an ensemble prediction model for NFC juice TPC. S7: Model Evaluation The performance of the NFC juice TPC prediction model was evaluated using the coefficients of determination and root mean square errors of the calibration set, cross-validation set, and independent prediction set, as well as the residual prediction bias. S8: SHAP (Explanatory Analysis and Variable Reduction) Based on the trained Stacking model and its underlying models, the SHAP framework is introduced to conduct interpretability analysis and quantification. L * , a * , b *The global importance and local contribution of SSC, TA, and pH to TPC prediction were analyzed, and bar charts, beehive plots, and dependency plots were plotted to analyze the nonlinear effects and interactions of key physicochemical indicators on TPC prediction. The physicochemical indicators were ranked according to their mean absolute SHAP values, and a stacking model with different subsets of variables was constructed using a stepwise elimination strategy. Their predictive performance was compared, and a simplified model with fewer variables but no significant performance degradation was selected.

[0010] S9: Industrial Applications and Online Inspection In practical applications, only the fresh NFC juice sample needs to be measured. L * , a * , b * By inputting SSC, TA, and pH into the Stacking ensemble model or simplified model, the TPC prediction results can be quickly obtained, enabling rapid and low-cost assessment of the antioxidant quality of fruit juice on-site.

[0011] (III) Beneficial Effects Compared with the prior art, the present invention has the following beneficial effects: 1. Relies only on conventional physicochemical indicators, requiring no expensive equipment: This invention utilizes conventionally measurable parameters from fruit juice production. L * , a * , b * The system can measure SSC, TA, and pH levels without requiring the purchase of complex spectroscopic instruments or expensive analytical equipment, thus lowering the detection threshold and investment costs, making it more suitable for promotion and application by small and medium-sized juice enterprises.

[0012] 2. Automatic hyperparameter optimization avoids the need for empirical parameter tuning: By using Optuna to automatically search for hyperparameters and implement early stopping strategies, the subjectivity and inefficiency of traditional manual parameter tuning are effectively avoided, enabling the basic model to achieve better performance in a shorter time.

[0013] 3. Stacking integration improves prediction accuracy and robustness: The Stacking ensemble framework organically integrates six base models with different structures. A meta-learner learns the strengths and biases of each base model to achieve high-precision prediction of TPC, with a prediction set determination coefficient R0. p 2 If the value exceeds 0.95, the residual prediction bias (RPD) is greater than 4, which has good practical application value.

[0014] 4. SHAP provides mechanistic interpretability: The introduction of SHAP interpretable analysis reveals a * , b * The dominant role of variables such as pH in TPC prediction, as well as the synergistic effect of variables such as SSC, makes the model no longer a "black box." It helps to understand the variation law of total phenol content in fruit juice from the perspective of physicochemical properties such as color, acidity, and soluble solids, and provides a scientific basis for process optimization and formulation design.

[0015] 5. Variable simplification balances performance and ease of use: The results of variable elimination based on SHAP sorting show that when the number of input variables is reduced from 6 to 4, the Stacking model's performance on the prediction set remains basically stable, providing feasibility for online detection in industrial sites with only a small number of sensors or instruments.

[0016] 6. Green and environmentally friendly, suitable for high-throughput testing: By replacing numerous repetitive chemical colorimetric experiments with intelligent models, the amount of reagents such as Folin-phenol can be significantly reduced, and the discharge of heavy metals and organic waste liquid can be reduced, which is conducive to building a green and sustainable juice quality control system. Attached Figure Description

[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.

[0018] Figure 1 This is a flowchart illustrating an NFC method for detecting total phenolic content in fruit juice based on conventional physicochemical indicators combined with hyperparameter optimization and an interpretable ensemble model, provided in an embodiment of the present invention. Figure 2 The predicted and observed values ​​of NFC juice TPC obtained using stacked ensemble models developed with different numbers of RPAs are provided for embodiments of the present invention: (A) 6 RPAs; (B) 5 RPAs; (C) 4 RPAs and (D) 3 RPAs. The solid line represents the regression fit of the calibration set and the prediction set, while the shaded area represents the 95% confidence interval.

[0019] Figure 3The (A) SHAP bar chart provided for embodiments of the present invention demonstrates the overall importance of each RPA in different base models (af) for TPC prediction. Each bar corresponds to the average absolute value of the SHAP value, reflecting the average level of influence of each feature on the model output; (B) SHAP beehive plot illustrates the specific contribution of each RPA in different base models (af) to TPC prediction. Each data point represents an independent sample, its color indicating the feature value (from low to high), and its position on the x-axis displays the SHAP value, which reflects the direction and intensity of each feature's influence on the model output. Figure 4 The SHAP hive diagram provided for embodiments of the present invention illustrates the overall feature contribution of the stacking ensemble model to TPC prediction: (A) Model hierarchy interpretation, showing the relative influence of each base model on the final ensemble output; (B) Feature hierarchy interpretation, showing the specific contribution of each RPA to the model prediction. Each data point in the diagram represents an independent sample, its color indicating the feature value (from low to high), and its position on the x-axis showing the SHAP value, which reflects the direction and intensity of each feature's influence on the model output. Figure 5 This is a SHAP dependency graph provided for embodiments of the present invention, describing the nonlinear relationship between each RPA and TPC prediction in the stacked model; Figure 6 The SHAP interaction diagram provided for embodiments of the present invention illustrates the pairwise relationships between key RPAs in a four-variable superposition model and their combined impact on TPC prediction. Detailed Implementation

[0020] To enable those skilled in the art to better understand the present invention, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or end that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or ends.

[0022] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0023] Currently, the detection of total phenolic content (TPC) in traditional NFC (Not From Concentrate) fruit juice mainly relies on chemical colorimetric methods such as Folin-Ciocalteu. While these methods are accurate and reliable, they generally suffer from problems such as cumbersome pretreatment steps, limited detection throughput, high reagent consumption, and the presence of heavy metals like molybdenum and tungsten, leading to chemical waste and a heavy environmental burden. This invention aims to provide a method for detecting TPC in NFC fruit juice based on conventional physicochemical indicators combined with hyperparameter optimization and an interpretable ensemble model. L * , a * , b * A multi-model ensemble framework with SSC, TA, and pH as inputs and TPC as output is introduced. It incorporates Optuna hyperparameter automatic optimization, Stacking ensemble learning, and SHAP interpretability analysis to achieve rapid, green, and interpretable detection of TPC in NFC compound fruit juices. Based on this, the key physicochemical indicators are simplified and screened.

[0024] like Figure 1 As shown in the figure, the present invention provides a method for detecting the total phenolic content of NFC fruit juice based on conventional physicochemical indicators combined with hyperparameter optimization and an interpretable ensemble model. The specific implementation method is as follows: 1. Experimental Materials and Methods Preparation of NFC mixed fruit juice samples: Commercially available NFC apple, mango, orange, and pear juices were selected as base ingredients, representing typical juice types with significant differences in color, acidity, sugar content, and phenolic composition. The mixing ratios of the four NFC single juices were configured using the mixture design module of Minitab 21 software. The mass fraction of each component was set to be uniformly distributed within the range of 0-100%, and a simplex lattice design with a lattice order of 10 and a corresponding mass fraction gradient of 10% was adopted. NFC compound fruit juice samples were prepared according to the mixing scheme, specifically including: Binary compound fruit juices: six combinations, apple-pear (AP), apple-mango (AM), mango-pear (MP), mango-orange (MO), apple-orange (AO), and orange-pear (OP), with 9 gradients for each combination, totaling 54 samples; Three-component compound fruit juice: four combinations: apple-mango-orange (AMO), apple-mango-pear (AMP), apple-orange-pear (AOP), and mango-orange-pear (MOP), with 36 samples of each combination, for a total of 144 samples; Four-component compound juice: apple-mango-orange-pear (AMOP) combination, a total of 84 samples.

[0025] A total of 282 NFC compound fruit juice samples were obtained. Sample classification is detailed in Table 1, which lists the mixing methods and abbreviation conventions. Each sample was briefly refrigerated at 4 ℃ and equilibrated at room temperature for 30 min before measurement to avoid fluctuations in physicochemical indicators caused by temperature differences. Each formulation sample was assigned a unique code for subsequent data recording and modeling.

[0026] Measurement of conventional physicochemical indicators: In this embodiment, six conventional physicochemical indicators were selected as input variables for the model, namely CIE colorimetric parameters. L * , a * , b * Soluble solids (SSC), titratable acid (TA), and pH were measured using a CR-10 portable colorimeter (Minolta Co., Japan), a PAL-1 digital refractometer (Atago, Tokyo, Japan), a PAL-Easy ACID F5 pH meter (Atago, Tokyo, Japan), and an FP20 pH meter (METTLER TOLEDO, USA), respectively. Each sample was measured three times, and the average value was taken. First, a gallic acid standard solution with a concentration of 0.103 mg / mL was prepared and accurately transferred to 10 mL volumetric flasks in a 0–1.2 mL gradient. Deionized water, Folin-phenol reagent, and sodium carbonate solution were added, and the reaction was carried out in the dark for 60 min. The absorbance was then measured at 760 nm to plot a standard curve. NFC juice samples were extracted with ethanol, subjected to low-temperature ultrasonic disruption, and centrifuged. The supernatant was then reacted with the same system described above. The total soluble solids (TPC) of the sample was calculated using the standard curve and expressed as mgGAE / mL.

[0027] Base Model Development and Hyperparameter Optimization: In this embodiment, six commonly used machine learning regressors are constructed as base prediction models to perform TPC prediction for NFC juice, including Random Forest (RF), Extreme Gradient Boosting (XGBoost), Lightweight Gradient Boosting Machine (LightGBM), Gradient Boosting Machine (GBM), Adaptive Boosting (AdaBoost), and Category Feature Gradient Boosting (CatBoost). The model input consists of the aforementioned six conventional physicochemical indicators, and the target output is the TPC value. To improve model performance, this invention uses the Kennard-Stone (KS) sample allocation method to divide the data into a calibration set and an independent prediction set at a 3:1 ratio. Furthermore, to avoid the inefficiency of traditional grid search and random search, this invention uses the Optuna optimization framework to automatically search for the key hyperparameters of the six models. By defining the root mean square error of the cross-validation set (RMSECV) as the optimization objective, the Tree-structured Parzen Estimator algorithm is used to continuously iterate and update parameters such as learning rate, tree depth, subsampling rate, and number of weak learners, ultimately obtaining the optimal parameter set for each base model and using it for final model training. The performance of the NFC juice TPC prediction model was evaluated using the coefficients of determination and root mean square errors of the calibration set, cross-validation set, and independent prediction set, as well as the residual prediction bias, as shown in Table 2.

[0028] Stacking Integration Model Development: This embodiment further constructs, as follows: Figure 1 The Stacking ensemble learning framework shown aims to improve the prediction bias that may occur with single-model predictions and fully utilize the complementarity of different base models in terms of mapping ability, nonlinear fitting ability, and generalization ability. In this framework, six base models generate first-level predictions for the training set through 5-fold cross-validation, and these predictions are recombine into a new feature matrix, which serves as the input to the second-level learner (meta-model). In this embodiment, linear regression is used as the meta-learner to integrate the prediction patterns of each base model, thereby obtaining the final TPC prediction. This method not only corrects the systematic biases of different base models but also effectively integrates the ability of different models to capture data features, improving the stability of the prediction results. The performance of the Stacking ensemble model is presented in Table 2 as the coefficients of determination and root mean square errors of the calibration set, cross-validation set, and independent prediction set, as well as the residual prediction bias values.

[0029] Model Interpretation and Variable Reduction: To enhance model interpretability, this embodiment further employs the SHAP method to analyze the contribution patterns of various physicochemical indicators to the NFC juice TPC prediction. For example... Figure 3 and Figure 4As shown, this invention uses the Kernel Explainer algorithm to calculate the Shapley value, uses representative sample points obtained by K-means clustering as background data, and estimates the average contribution of each attribute in different models through Monte Carlo sampling to obtain the ranking of the influence of each physicochemical attribute on the prediction of total phenol content. This embodiment found that SSC, TA, a * and b * It contributes significantly to TPC prediction, and the LOWESS curve illustrates the marginal impact trend of attribute value changes on the model output. Furthermore, this embodiment utilizes interaction diagrams generated by SHAP to analyze the nonlinear coupling relationships between physicochemical parameters. Figure 5 and Figure 6 For example, SSC and TA, a * and b * These indicators exhibit a synergistic pattern of improving TPC prediction within certain ranges, providing a new perspective for understanding the intrinsic relationship between the physicochemical structure of fruit juice and the content of phenolic substances. In the model optimization stage, this embodiment also performed stepwise variable reduction based on SHAP ranking to reduce model complexity and improve practical applicability. By progressively eliminating less important physicochemical attributes and retraining the Stacking ensemble model, this embodiment obtained an optimal combination of physicochemical indicators, enabling the model to maintain high predictive performance (R²). p 2 While reducing the number of measurements required for detection (only four routine physicochemical indicators are needed) (i.e., 0.913, RMSEP = 0.073 mg GAE / mL and RPD = 3.415), the method further improves its economy and practicality by reducing the number of measurements required for detection (only four routine physicochemical indicators are needed).

[0030] The advantages of this invention compared to the prior art are: 1. Comparison of physicochemical properties of different NFC juices In embodiments of the present invention, conventional physicochemical properties were measured for four types of NFC single fruit juices and their compound fruit juices prepared in different proportions. The results showed that there were differences in CIE colorimetric parameters among the different fruit juices. L * , a * , b *Significant differences were observed in soluble solids (SSC), titratable acid (TA), pH, and total phenolic content (TPC) (see Table 2). These differences constitute the key data foundation for establishing the model of this invention. Statistical analysis shows that different fruit juices exhibit representative differences in physicochemical properties due to their inherent differences in nutritional components, natural pigment content, and sweet and sour flavor characteristics. For example, among the four single NFC juices, mango juice... L * and b * The highest value indicates higher brightness and yellowness, a characteristic related to its rich content of carotenoids and other pigments; orange juice also exhibits high yellowness and high soluble solids content, reflecting its high sugar and pigment content; pear juice... L * The lower titratable acidity and total phenol content of apple juice indicate a darker color and a weaker acidity, suggesting that it has a weaker acidity and relatively limited antioxidant potential.

[0031] In binary NFC (Not From Concentrate) compound juices constructed with different proportions, most physicochemical indicators fall within the middle range of their constituent juices, exhibiting a certain synergistic or complementary effect. For example, the apple-pear (AP) and apple-mango (AM) combinations show moderate levels of soluble solids and pH, while the mango-orange juice (MO) combination exhibits higher acidity and higher total phenol content (see Table 3). This indicates that the compounding ratio can significantly alter the acid-sweet balance and antioxidant levels. In ternary and quaternary compound juices, the physicochemical indicators show a clear concentration trend; that is, as the complexity of the formulation increases, the distribution range of each indicator narrows, exhibiting a more balanced property that is closer to the average state of multiple components (see Table 4). This phenomenon suggests that the blending process of compound juices can, to some extent, weaken the differences between individual juices, making their overall physicochemical characteristics more stable.

[0032] In summary, the dataset constructed in this invention covers a wide range of physicochemical properties, from single-component juices to multi-component compound juices, demonstrating significant representativeness and diversity. This complex physicochemical characterization, comprised of color, acidity, sugar content, and antioxidant capacity, provides sufficient data variability for establishing a total phenol content prediction model based on conventional physicochemical indicators. This allows the prediction framework of this invention to adapt to different juice characteristics and blending scenarios, thereby improving the model's robustness and generalization ability.

[0033] 2. Construction and Performance Evaluation of NFC Fruit Juice Total Phenolic Content Prediction Model In this invention, based on the six conventional physicochemical indicators obtained ( L * , a * ,b * Multiple regression models (SSC, TA, pH) and a second-level ensemble model based on a stacked ensemble strategy were constructed to quantitatively predict the total phenol content in NFC compound fruit juice samples. This invention systematically compared the prediction accuracy, robustness, and generalization performance of each model to verify the feasibility of determining total phenol content using conventional physicochemical indicators.

[0034] First, at the basic model level, six regression algorithms—RF, XGBoost, LGBM, GBM, AdaBoost, and CatBoost—were used as base learners. Modeling results show that all algorithms can establish stable input-output mappings, but boosting models (especially CatBoost and GBM) perform better in handling multivariate coupling, nonlinear data relationships, and variable collinearity, with significantly higher predictive performance than traditional ensemble methods such as RF and AdaBoost. The determination coefficients of the basic models all reached high levels (R²). p 2 The model exhibited a low prediction error (RMSEP ≤ 0.090 mg GAE / mL) and good residual prediction bias (RPD > 2.6), indicating that conventional physicochemical indicators can adequately characterize the model input features related to total phenol content in NFC juice. Among the six basic models, the CatBoost model achieved the best prediction results, with a determination coefficient reaching R0.850. p 2 = 0.925, RMSEP = 0.078 mg GAE / mL, and RPD = 3.675, fully demonstrating its advantages in handling complex nonlinear relationships and interaction effects between variables. Based on the above results, it can be confirmed that conventional physicochemical indicators can reflect properties closely related to total phenol content in physical and chemical dimensions, and therefore have the potential to replace traditional detection methods.

[0035] Building upon this foundation, to further improve prediction accuracy, this invention constructs a two-level ensemble model based on a stacking strategy. By performing a secondary combination of the cross-validation prediction outputs of the six basic models and utilizing a linear regression algorithm as a meta-learner, the advantages of multiple models are complemented, significantly reducing the systematic bias that might be introduced by a single algorithm. Modeling results show that the prediction performance of the stacked model is significantly improved compared to all the basic models, with the stacked model based on physicochemical indicators achieving an R0. p 2= 0.956, RMSEP = 0.058 mg GAE / mL, RPD = 4.825, achieving the best performance among all prediction models in this invention. Furthermore, the predicted values ​​show a high degree of linear consistency with the measured values, with data points closely distributed near the 1:1 ideal fitting line and a narrow confidence interval (see...). Figure 2 This further demonstrates that the model has good generalization ability and stability, and verifies the effectiveness of the ensemble strategy.

[0036] 3. SHAP-based model interpretability analysis This invention employs the SHAP framework to conduct a systematic interpretability analysis of the Stacking model constructed based on physicochemical indicators, in order to reveal the role mechanism of each feature variable in TPC prediction. By analyzing the SHAP results at both the basic model and the ensemble model levels, the contribution ranking, direction of action, and potential variable interaction relationships of different physicochemical indicators to the prediction results can be clarified.

[0037] At the basic model level, multiple algorithms exhibit a consistent feature importance structure, among which... b * and a * The two colorimetric parameters are the most important, followed by pH and SSC. L * The average contribution of TA is relatively low (see Figure 3 Local SHAP distribution shows that higher b * Values ​​and lower a * Higher values ​​typically correspond to higher SHAP contributions, indicating that samples with a yellowish hue and lower redness tend to have higher predicted TPC; lower pH and lower SSC typically correspond to negative contributions, reflecting the influence of changes in acidity level and sugar content on the prediction of total phenols.

[0038] At the ensemble model level, SHAP analysis of meta-learners shows that they primarily rely on the outputs of foundational models such as CatBoost, LGBM, and GBM as key information sources (see [link to ensemble model analysis]). Figure 4 This indicates that gradient boosting models are superior in extracting nonlinear feature relationships, and their prediction patterns are preferentially integrated by the Stacking framework. The SHAP interpretation of physicochemical indicators further confirms this. b * , a * pH remains one of the three most influential variables, consistent with the analysis results at the basic model level.

[0039] This invention also analyzes the nonlinear interaction patterns of key physicochemical indicators using SHAP dependency graphs. The results show... a * and b * The color change trend closely mirrored that of the SHAP value, indicating a significant functional relationship between color change and total phenol levels. The role of SSC is more complex, and its contribution may indirectly affect the model output through interactions with other physicochemical indicators. Correlation analysis results show that color, acidity, and SSC together constitute the main variable system influencing TPC prediction in fruit juice.

[0040] 4. A method for screening physicochemical indicators and optimizing model structure based on feature importance ranking In the method of this invention, to further verify the stability and practical application feasibility of the proposed model under different input dimensions, a variable reduction study based on feature importance was conducted on the constructed interpretable ensemble model, and a multivariate interaction analysis was performed on the prediction mechanism of the reduced model. The variable reduction process, based on the aforementioned SHAP-based feature importance ranking, progressively eliminates conventional physicochemical indicators with lower importance, constructing different sub-models containing six, five, four, and three physicochemical indicators respectively, and evaluating the predictive performance of these sub-models.

[0041] By comparing the cross-validation and independent prediction results of the model under different input dimensions, this invention found that although the model constructed using all six physicochemical indicators has good predictive performance, its overall advantage is not significant compared to the model using five or four indicators (Table 6). When the input variables are reduced to five or four, the model's cross-validation determination coefficient and root mean square error remain highly similar to the complete model, indicating that moderately reducing the input dimensions does not adversely affect the model's generalization ability. However, when the input variables are further reduced to three, the model's predictive performance declines significantly, manifested in a significant decrease in the prediction determination coefficient and a significant increase in error, indicating that oversimplifying the input variables weakens the model's stability and robustness.

[0042] Based on the above results, this invention further determines that a feature subset composed of four physicochemical indicators can achieve the optimal balance between predictive performance and the cost and operability of practical applications. To further elucidate the internal prediction mechanism of this four-variable model, this invention conducts a bivariate dependency analysis based on the SHAP method to reveal how the interaction between different physicochemical indicators affects the predicted output of total phenol content. Figure 6 ).

[0043] Analysis of the SHAP bivariate dependencies of various features reveals significant synergistic effects among different color parameters and variables such as soluble solids content and acidity. For example, combinations of color parameters exhibit typical nonlinear interaction characteristics, where certain chromaticity ranges, when occurring simultaneously with specific ranges of another chromaticity parameter, produce higher predictive contributions. Combinations of acidity and chromaticity show different trends, with different pH ranges enhancing or weakening the model predictions under combined effects. The interaction results of soluble solids with other variables indicate that this indicator mainly affects the prediction results indirectly through its combination with color or acidity parameters, rather than acting as an independent, dominant factor.

[0044] The aforementioned multivariate interaction patterns reflect a complex control mechanism in the NFC juice system where color attributes, acidity levels, and soluble solids content jointly influence the prediction of total phenol content. This indicates that the four-variable ensemble model established in this invention not only effectively compresses the input dimensions but also accurately captures higher-order correlations between physicochemical indicators. This result further demonstrates that a variable reduction strategy based on interpretive analysis can significantly reduce the complexity of the detection system while maintaining essentially unchanged model performance, thereby improving the feasibility and efficiency of the model in food industry quality monitoring.

[0045] Table 1. Classification of NFC compound fruit juices.

[0046]

[0047] Table 2. Physicochemical properties of four non-mixed NFC juices.

[0048]

[0049] Note: Different lowercase letters within the same column indicate statistically significant differences. p < 0.05).

[0050] Table 3 Physicochemical properties of binary NFC compound fruit juice.

[0051]

[0052] Note: Different lowercase letters within the same column indicate statistically significant differences. p < 0.05).

[0053] Table 4 Physicochemical properties of ternary and quaternary NFC compound fruit juices.

[0054]

[0055] Note: Different lowercase letters within the same column indicate statistically significant differences. p< 0.05).

[0056] Table 5. Performance comparison of RPA-based base models and Stacking ensemble models in NFC compound fruit juice TPC prediction.

[0057]

[0058] Note: RPA: Conventional physicochemical index; TPC: Total phenol content; R c 2 : Coefficients of determination of the calibration set; R cv 2 R: Coefficient of determination of the cross-validation set; p 2 : Coefficient of determination for the prediction set; RMSEC: Root mean square error for the calibration set; RMSECV: Root mean square error for the cross-validation set; RMSEP: Root mean square error for the prediction set; RPD: Residual prediction bias for the prediction set.

[0059] Table 6. Performance of the Stacking ensemble model for NFC compound juice TPC prediction using different numbers of RPAs as input variables.

[0060]

[0061] Note: RPA: Conventional physicochemical index; TPC: Total phenol content; R c 2 : Coefficients of determination of the calibration set; R cv 2 R: Coefficient of determination of the cross-validation set; p 2 : Coefficient of determination for the prediction set; RMSEC: Root mean square error for the calibration set; RMSECV: Root mean square error for the cross-validation set; RMSEP: Root mean square error for the prediction set; RPD: Residual prediction bias for the prediction set.

[0062] The beneficial effects of this invention are reflected in: Basic input variables can be quickly obtained using conventional physicochemical analysis instruments, without the need for expensive spectroscopic equipment; The introduction of Optuna automatic hyperparameter search automates and optimizes the model training process. By employing a Stacking ensemble model and SHAP interpretive analysis, high accuracy and interpretability are achieved simultaneously. The method is stable, requires no chemical reagents or destructive treatment, and is suitable for real-time quality monitoring and juice formulation development on actual production lines. This invention provides a scalable, economical, accurate, and transparent intelligent detection solution for total phenol content in NFC juice.

[0063] The above descriptions are merely embodiments of the present invention. Commonly known technical solutions or characteristics are not described in detail here. It should be noted that those skilled in the art can make various modifications and improvements without departing from the present invention, and these should also be considered within the scope of protection of the present invention. These modifications and improvements will not affect the effectiveness of the present invention or the practicality of the patent. The scope of protection claimed in this application should be determined by the content of its claims, and the specific embodiments described in the specification can be used to interpret the content of the claims.

Claims

1. A method for detecting total phenols in NFC fruit juice based on conventional physicochemical indicators combined with hyperparameter optimization, characterized in that, The method includes: S1: Commercially available NFC apple juice, mango juice, orange juice, and pear juice were selected, and compound juice samples with different ratios were prepared according to the principle of mixture design to obtain multiple groups of NFC juice samples. The CIE colorimetric parameters of the NFC juice samples were measured. L * , a * , b * The study included conventional physicochemical indicators (RPA) such as soluble solids (SSC), titratable acid (TA), and pH, and used the Folin-phenol reagent method to determine the total phenol content (TPC) as the target variable. 2.S2: Random Forest (RF), Extreme Gradient Boosting (XGBoost), Lightweight Gradient Boosting Machine (LightGBM), Gradient Boosting Machine (GBM), Adaptive Boosting (AdaBoost), and Category Feature Gradient Boosting (CatBoost) are used as base learners. The Kennard-Stone method is used to divide the calibration set and the independent prediction set, and the Optuna hyperparameter optimization framework is used to define the hyperparameter search space, including learning rate, tree depth, and the number of base learners. Using the root mean square error of cross-validation (RMSECV) as the optimization objective, multiple iterations are performed to automatically search for the optimal hyperparameter combination, and each base learner is trained based on the optimization results. 3.S3: Perform K-fold cross-validation on the optimized base learners to obtain the first-layer prediction output. Construct a new feature matrix from the prediction output, input it into the linear regression model as a meta-learner, train it to obtain the Stacking ensemble model, and then make the final prediction for TPC. 4.S4: Based on the SHAP framework, feature contribution analysis is performed on the base learner and meta-learner to calculate the contribution of each common physicochemical indicator to TPC prediction. Stepwise variable elimination is performed according to the importance ranking of SHAP to reduce the number of input variables, and the Stacking model is retrained based on the optimized variable combination to obtain an interpretable total phenol content prediction model.

5. The method for detecting total phenols in NFC fruit juice by combining conventional physicochemical indicators with hyperparameter optimization according to claim 1, characterized in that, The compound fruit juice samples were constructed using a Simplex Lattice mixing design, with a component ratio range of 0-100% and a grid degree of 10. The resulting samples included binary, ternary, and quaternary mixed systems.

6. The method for detecting total phenolic content in NFC fruit juice by combining conventional physicochemical indicators with hyperparameter optimization according to claim 1, characterized in that, The determination of the conventional physicochemical indicators includes: CIE colorimetric parameters were measured using a colorimeter. L * , a * , b * SSC was measured using a digital refractometer, TA was measured using a pH meter, pH was measured using a pH meter, and TPC was determined using the Folin-phenol reagent colorimetric method and expressed as gallic acid equivalents.

7. The method for detecting total phenols in NFC fruit juice by combining conventional physicochemical indicators with hyperparameter optimization according to claim 1, characterized in that, The base models include RF, XGBoost, LGBM, GBM, AdaBoost, and CatBoost regression models. The performance of the NFC juice TPC prediction model was evaluated using the coefficients of determination and root mean square errors of the calibration set, cross-validation set, and independent prediction set, as well as the residual prediction bias.

8. The method for detecting total phenols in NFC fruit juice by combining conventional physicochemical indicators with hyperparameter optimization according to claim 1, characterized in that, The meta-learner of the Stacking ensemble model employs a linear regression algorithm to ensure the interpretability of the model structure and the quantifiability of the contributions of each base model.

9. The method for detecting total phenolic content in NFC fruit juice by combining conventional physicochemical indicators with hyperparameter optimization according to claim 1, characterized in that, The SHAP interpretation process uses the KernelExplainer algorithm and the 50 centroids obtained from k-means clustering as background data to reduce the computational complexity of Shapley values.

10. The method for detecting total phenols in NFC fruit juice by combining conventional physicochemical indicators with hyperparameter optimization according to claim 1, characterized in that, The SHAP interpretation process includes generating feature importance histograms, beehive diagrams, dependency graphs, and interaction dependency graphs to demonstrate the contributions of univariate and bivariate features to TPC predictions and their nonlinear interactions.

11. The method for detecting total phenols in NFC fruit juice by combining conventional physicochemical indicators with hyperparameter optimization according to claim 1, characterized in that, The variable selection adopts a stepwise elimination strategy based on SHAP importance ranking. Each time, the physicochemical indicators with the lowest contribution are eliminated and the Stacking model is retrained to determine the optimal combination of variables that can maintain predictive performance.

12. The method for detecting total phenols in NFC fruit juice by combining conventional physicochemical indicators with hyperparameter optimization according to claim 1, characterized in that, The prediction model output by the method can achieve rapid, non-destructive, and interpretable quantitative prediction of the total phenol content of NFC juice.