Method and system for constructing an intelligent evaluation model for yellow peach maturity based on machine learning

CN123012489APending Publication Date: 2026-10-30INST OF AGRO FOOD SCI & TECH CHINESE ACADEMY OF AGRI SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611094446.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

上述缺陷限制了成熟度判别模型的精度、泛化能力及数字化表征的可靠性

Benefits of technology

[0014]本发明至少包括以下有益效果:本发明所述基于机器学习的黄桃成熟度智能评价模型构建方法及系统,通过置信度因子自适应加权融合,使综合权重能够根据多个权重源的一致性动态调整,抑制了单一权重源失真对融合结果的负面影响,提升了权重确定的客观性和鲁棒性。通过引入交互抑制函数对硬度与糖酸比的协同变化进行非线性修正,弥补了纯线性模型在极端状态下预测偏差较大的不足。采用数据驱动与专家经验相结合的阈值确定方式,避免了单一方法的主观性。部署后通过KL散度监测分布变化并自动触发重计算,使模型具备了适应数据分布变化的自我维护能力。连续参考值为边缘样本保留和阈值边界确定提供了量化辅助,在不改变离散等级框架的前提下提升了信息粒度。Bootstrap重采样降低了小样本下统计量波动对置信度因子计算的影响。修正系数的自动拟合实现了修正幅度的自适应调节。动态更新中的加权平滑同步重聚类保证了阈值过渡的连续性。边缘样本保留策略保护了关键边界信息,有利于提升模型边界判别精度。双重漂移检测和贝叶斯增量式调整实现了轻量级模型自适应,冻结保护防止了异常漂移导致模型崩溃。不确定性量化为分级决策提供了可靠性标尺,模糊分级提示降低了边界附近误判的风险。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012489A_ABST
    Figure CN123012489A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on machine learning's yellow peach maturity intelligent evaluation model construction method and system, belong to fruit and vegetable postharvest quality evaluation technical field.It is used to solve the strong subjectivity of weight determination in existing evaluation method, linear model cannot depict index interaction effect, threshold setting lacks data support and the problem that model deployment cannot self-adaptive update.The method includes: collecting the physicochemical index of yellow peach fruit and carrying out standardization processing;Respectively using partial least squares regression, principal component analysis and random forest to extract weight information source, calculate confidence factor by Kendall rank correlation coefficient to carry out self-adaptive weighted fusion;Based on comprehensive weight, construct linear weighted base and introduce interaction inhibition function to correct the extreme value of hardness and sugar-acid ratio;K-means clustering is carried out to maturity index, and grading threshold is determined in combination with expert experience.The application can be used for the intelligent grading evaluation of yellow peach maturity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of postharvest quality evaluation of fruits and vegetables. More specifically, this invention relates to a method and system for constructing an intelligent evaluation model for the maturity of yellow peaches based on machine learning. Background Technology

[0002] Yellow peaches are typical climacteric fruits, and their harvest maturity directly determines their storage characteristics and processing quality. Harvest maturity is a key factor affecting the fresh flavor and processing quality of the fruit. Besides traditional indicators such as fruit color and single fruit weight, firmness, soluble solids, and sugar-acid content have gradually become important criteria for determining fruit maturity. Currently, there is no unified and refined standard for maturity classification in the industry. In the field, judgment is based solely on apparent indicators such as the ratio of red to green color in the peel, which has limited accuracy. After harvest, the differences in the appearance of the fruit are further weakened, and a single physicochemical or apparent indicator can no longer accurately define maturity. Traditional experience-based judgment has limitations and cannot improve the precision of fruit harvesting, storage, and processing. Therefore, establishing a multi-dimensional physicochemical indicator system to accurately determine the optimal maturity stage of the fruit has become a key direction in current postharvest biological research.

[0003] In recent years, machine learning methods have been gradually introduced into the field of fruit maturity assessment. Existing technologies include maturity assessment schemes based on multi-indicator fusion, such as using entropy methods to calculate multi-dimensional index weights and establishing a clustered fuzzy classification model to assess peach maturity. Other studies have integrated machine learning with multi-indicator weight analysis, determining index weights based on clustering and analytic hierarchy process (AHP) methods, and using ensemble learning models to predict maturity. However, these existing schemes still have significant shortcomings in weight determination. Entropy-based weight calculation relies entirely on the dispersion of the data itself, ignoring the biological correlation mechanism between indicators and maturity; AHP-based weight determination relies on expert subjective assignment, making it difficult to avoid human bias. More importantly, existing methods all employ a single-source weight determination strategy, failing to simultaneously consider multi-dimensional information such as linear correlation strength, data structure characteristics, and nonlinear prediction contributions, leading to a one-sided weight fusion result. Furthermore, the construction of maturity indices in existing schemes is mostly in the form of linear weighting, failing to consider the biological law that some physicochemical indicators tend to level off in the later stages of fruit ripening, making the index prone to over-inflation or oscillation in the maturity boundary region. The determination of grading thresholds often relies on expert experience or simple clustering, lacking purely data-driven objective calibration methods. These shortcomings limit the accuracy, generalization ability, and reliability of digital representations in maturity assessment models. Summary of the Invention

[0004] To achieve these objectives and other advantages of the present invention, the present invention provides a method for constructing an intelligent evaluation model for the maturity of yellow peaches based on machine learning, comprising the following steps: Step 1: Collect six physicochemical indicators of yellow peaches: firmness, soluble solids, L* value, a* value, b* value, and sugar-acid ratio; check the raw data for missing values, and use the Z-score method to identify and remove abnormal samples with |Z|>3 as the standard; perform Z-score standardization on the retained sample data to make its mean 0 and standard deviation 1, thus obtaining standardized data; Step 2: Extract the absolute value of regression coefficients using partial least squares regression, extract the contribution of the loading matrix using principal component analysis, and extract the feature importance using a random forest model that has been validated and selected from the training and test sets. Use these three as three weight information sources. Calculate the pairwise Kendall rank correlation coefficients between the three. Use the average rank correlation coefficient between any weight source and the other two as the confidence factor of that weight source. Perform weighted fusion according to the confidence factor ratio. When the confidence of all three is lower than the preset threshold, shrink to an equal-weight benchmark to obtain the comprehensive weight of each indicator. Step 3: Construct a linear weighted basis MI=∑(w) based on the comprehensive weights. i ×X i '), where X i 'W' represents the standardized index value. i To achieve a comprehensive weighting, an interaction suppression function is introduced for the hardness-standardized value H' and the sugar-acid ratio-standardized value SAR'. When the absolute values ​​of both the hardness-standardized value H' and the sugar-acid ratio-standardized value SAR' are greater than or equal to 2.0, it is determined that both are simultaneously at an extreme high or extreme low value, and a negative correction term λ·(|H'|·|SAR'|) is applied. λ is automatically fitted based on the residual fluctuations of the late-maturity samples in the training set to obtain the corrected maturity index MI. Step 4: Perform K-means clustering analysis on the MI values ​​of the training set samples, and determine the grading thresholds based on expert experience. The grading thresholds include a first threshold of 0.20 and a second threshold of 0.55, where MI < 0.20 corresponds to Level I, 0.20 ≤ MI < 0.55 corresponds to Level II, and MI ≥ 0.55 corresponds to Level III. Step 5: After deployment, monitor the KL divergence between the MI distribution of the newly collected validation set and the training set distribution. When the divergence exceeds the preset threshold, automatically trigger the recalculation of steps one to four above, and output the updated weights and thresholds.

[0005] Preferably, before removing abnormal samples in step one, a standard sample library establishment and label-assisted anchoring step is included: Yellow peaches are divided into three discrete grades—Grade I, Grade II, and Grade III—based on the number of days after flowering; within each grade, linear interpolation is performed based on the number of days after flowering to generate a continuous reference value between 0 and 1; this continuous reference value is used to determine whether marginal samples should be retained during Z-score outlier detection. When the absolute Z-score of a sample is between 3.0 and 3.5 and the continuous reference value of that sample deviates from the distribution of continuous reference values ​​of most samples within the same grade, the sample is combined with its numerical ranking position in Mahalanobis distance space to determine whether to remove it; after K-means clustering, this continuous reference value is used to assist experts in determining the cluster boundaries, and the accuracy of the sample labels is back-verified by statistically analyzing the consistency between the continuous reference values ​​of samples within each grade and the grade labels; this continuous reference value does not participate in model training.

[0006] Preferably, in step two, the random forest model is selected as follows: Valid samples are stratified according to maturity level and divided into training and test sets in an 8:2 ratio; prediction models are constructed using four algorithms: partial least squares regression, support vector machine, random forest, and artificial neural network. The support vector machine uses the RBF kernel function; the number of decision trees in the random forest is between 80 and 120; the number of neurons in the input layer of the artificial neural network is between 5 and 7, the number of neurons in the hidden layer is between 6 and 10, the number of neurons in the output layer is between 3 and 5, the learning rate is between 0.2 and 0.4, the momentum factor is between 0.1 and 0.3, and the maximum number of iterations is between 500 and 1500; the model with the highest accuracy, the smallest root mean square error, and the largest coefficient of determination on the test set is selected as the optimal model, using accuracy, root mean square error, and coefficient of determination as evaluation metrics.

[0007] Preferably, in the calculation of the confidence factor, Bootstrap resampling is used to generate multiple subsample sets, and the pairwise Kendall rank correlation coefficients of the three are calculated for each subsample set. The median of each correlation coefficient is taken as the final correlation coefficient, and the average rank correlation coefficient is calculated based on the median as the confidence factor. At the same time, the trigger threshold for the dynamic shrinkage regularization term is set to be triggered when the confidence of all three is less than 0.3, and the weights after shrinkage are equally weighted.

[0008] Preferably, the fitting process of λ adopts weighted least squares. The samples with maturity level III and continuous reference values ​​greater than 0.8 in the training set are used as the late-maturity sample subset. For each late-maturity sample, the residual between its linear weighted basis and the measured reference value is calculated, and the correlation coefficient between the absolute value of the residual and the absolute value of the product of the hardness standardized value and the sugar-acid ratio standardized value is used as the initial estimate of λ. Then, the leave-one-out cross-validation method is used to optimize λ. The λ value that minimizes the mean square error of the corrected MI on the validation set is selected as the final value, and the value range of λ is set to 0.05 to 0.20.

[0009] Preferably, in step five, the preset threshold for KL divergence detection is 0.05. Detection is triggered when the newly collected validation set sample size reaches 20% of the training set sample size. If the KL divergence exceeds the threshold, recalculation is initiated. During recalculation, the original weights are retained as a reference, and the new weights are updated with a weighted smoothing effect on the original weights. The smoothing coefficient is positively correlated with the KL divergence value. When recalculation is triggered, the K-means clustering algorithm is simultaneously used to perform cluster analysis on the MI values ​​of the recalculated training set samples, and the grading threshold is re-determined based on expert experience.

[0010] Preferably, in the linear interpolation of the continuous reference values, the number of days after flowering within each level is normalized, mapping the earliest number of days after flowering within the level to 0 and the latest to 1. For samples whose number of days after flowering exceeds the level range, the values ​​are truncated by the nearest neighbor level edge value. In the outlier detection process, if the continuous reference value of a sample is in the top 5% or bottom 5% and its absolute Z-score is between 2.5 and 3.0, then the sample is retained.

[0011] Preferably, the method also includes a model application domain drift detection and adaptive recalibration step: During the deployment phase, for each batch of new samples, the maximum mean difference between the feature distribution of this batch of samples and the feature distribution of the training set is calculated. If the maximum mean difference is between 0.08 and 0.12, adversarial validation is initiated, and a binary classifier is trained to distinguish between training set samples and new samples. When the area under the receiver operating characteristic curve of the classifier is between 0.65 and 0.75, it is determined to be a drift. On this basis, incremental weight adjustment is performed. Based on the training set weights, a Bayesian online learning framework is used to update the posterior distribution of each indicator weight using the gradient information of the new samples as the likelihood function, and the correction coefficients and grading thresholds are refitted. The updated weights are time-series smoothed with the historical weight sequence to form a weight evolution trajectory. When the weight change exceeds 2.5 to 3.5 times the standard deviation of the historical fluctuation, an alarm is triggered and the update is frozen. It is unfrozen after manual verification.

[0012] Preferably, the method also includes steps for quantifying the uncertainty of the maturity index and outputting graded confidence scores: while calculating the maturity index, Monte Carlo Dropout technology is used to perform multiple random inactivation predictions on the random forest model to obtain the predicted distribution of the maturity index, and its standard deviation is taken as the uncertainty measure; when the maturity index is less than 1.2 to 1.8 times the uncertainty value of any threshold boundary, the sample is determined to be in a critical state, and a critical level prompt is output; the measurement error of the six physicochemical indicators is modeled using a Bayesian neural network, and the measurement noise is transmitted to the maturity index calculation process to obtain the overall uncertainty interval of the maturity index, and the posterior probability of each level is calculated based on the area ratio of the overlap between this interval and each threshold, and the level with the highest probability and its confidence score are output.

[0013] This invention also provides a machine learning-based intelligent evaluation system for the maturity of yellow peaches, comprising: The data acquisition and preprocessing module is configured to collect six physicochemical indicators of yellow peach fruit: firmness, soluble solids, L* value, a* value, b* value, and sugar-acid ratio; perform missing value checks on the raw data, and use the Z-score method to identify and remove abnormal samples with a standard of |Z| greater than 3; perform Z-score standardization on the retained sample data to make its mean 0 and standard deviation 1, and output standardized data. The multi-source weighted adaptive fusion module is connected to the data acquisition and preprocessing module. It is configured to extract the absolute value of regression coefficients using partial least squares regression, extract the contribution of the loading matrix using principal component analysis, and extract the feature importance using a random forest model validated on the training and test sets. These three are used as three weight information sources. The pairwise Kendall rank correlation coefficients between the three are calculated. The average rank correlation coefficient between any weight source and the other two is used as the confidence factor CFi of that weight source. The weights are fused according to the CFi ratio. When the CFi of all three is lower than a preset threshold, the weights are reduced to an equal-weight benchmark, and the comprehensive weights of each indicator are output. The maturity index nonlinear correction module is connected to the multi-source weight adaptive fusion module and configured to construct a linear weighted basis MI=∑(w) based on the comprehensive weights. i ×X i '), where X i 'W' represents the standardized index value. i To achieve a comprehensive weight, an interaction suppression function is introduced for the hardness-standardized value H' and the sugar-acid ratio-standardized value SAR'. When both are at extremely high or extremely low values, a negative correction term λ·(|H'|·|SAR'|) is applied. λ is automatically fitted based on the residual fluctuations of the late-maturity samples in the training set to obtain the corrected maturity index MI, and the maturity index MI is output. The grading threshold determination module is connected to the maturity index nonlinear correction module and is configured to perform K-means clustering analysis on the MI values ​​of the training set samples and determine the grading thresholds in combination with expert experience. The grading thresholds include a first threshold of 0.20 and a second threshold of 0.55, where MI < 0.20 corresponds to level I, 0.20 ≤ MI < 0.55 corresponds to level II, and MI ≥ 0.55 corresponds to level III. The dynamic update module is connected to the data acquisition and preprocessing module, the multi-source weight adaptive fusion module, the maturity index nonlinear correction module, and the hierarchical threshold determination module, respectively. It is configured to monitor the MI distribution of the newly acquired validation set and the KL divergence of the training set distribution after deployment. When the divergence exceeds the preset threshold, it triggers the recalculation of the above four modules and outputs the updated weights and thresholds.

[0014] The present invention includes at least the following beneficial effects: The method and system for constructing an intelligent evaluation model for the maturity of yellow peaches based on machine learning, as described in this invention, enables the comprehensive weights to be dynamically adjusted according to the consistency of multiple weight sources through adaptive weighted fusion of confidence factors, suppressing the negative impact of distortion from a single weight source on the fusion results and improving the objectivity and robustness of weight determination. By introducing an interaction inhibition function to nonlinearly correct the coordinated changes in hardness and sugar-acid ratio, the shortcomings of purely linear models in predicting large biases under extreme conditions are compensated. The threshold determination method, which combines data-driven and expert experience, avoids the subjectivity of a single method. After deployment, the model has the ability to self-maintain by monitoring distribution changes through KL divergence and automatically triggering recalculation, enabling the model to adapt to changes in data distribution. Continuous reference values ​​provide quantitative assistance for edge sample retention and threshold boundary determination, improving information granularity without changing the discrete grade framework. Bootstrap resampling reduces the impact of statistical fluctuations on the calculation of confidence factors under small sample sizes. Automatic fitting of correction coefficients enables adaptive adjustment of the correction magnitude. Weighted smoothing synchronous re-clustering in dynamic updates ensures the continuity of threshold transition. Edge sample preservation strategies protect key boundary information, which helps improve the model's boundary discrimination accuracy. Dual drift detection and Bayesian incremental adjustment enable lightweight model adaptation, while freeze protection prevents abnormal drift from causing model collapse. Uncertainty quantification provides a reliability benchmark for hierarchical decision-making, and fuzzy hierarchical hints reduce the risk of misjudgment near boundaries.

[0015] Other advantages, objectives and features of the present invention will become apparent in part from the following description, and in part from those skilled in the art through study and practice of the invention. Attached Figure Description

[0016] Figure 1 Images of yellow peaches at three different ripeness levels.

[0017] Figure 2 The plot shows the cumulative variance explained by principal component analysis.

[0018] Figure 3 This is a confusion matrix diagram for a random forest model.

[0019] Figure 4 This is a weight comparison chart for different methods.

[0020] Figure 5 A graph showing the overall contribution of the indicators.

[0021] Figure 6 This is the final weighting chart for each indicator. Detailed Implementation

[0022] The present invention will now be described in further detail with reference to specific embodiments, so that those skilled in the art can implement it based on the description.

[0023] It should be understood that terms such as “having,” “comprising,” and “including” as used herein do not exclude the presence or addition of one or more other elements or combinations thereof.

[0024] It should be noted that, unless otherwise specified, the experimental methods described in the following implementation plan are all conventional methods, and the reagents and materials described are all commercially available unless otherwise specified.

[0025] This invention provides a method for constructing an intelligent evaluation model for the maturity of yellow peaches based on machine learning, comprising the following steps: Step 1: Collect six physicochemical indicators of yellow peaches: firmness, soluble solids, L* value, a* value, b* value, and sugar-acid ratio; check the raw data for missing values, and use the Z-score method to identify and remove abnormal samples with |Z|>3 as the standard; perform Z-score standardization on the retained sample data to make its mean 0 and standard deviation 1, thus obtaining standardized data; Step 2: Extract the absolute value of regression coefficients using partial least squares regression, extract the contribution of the loading matrix using principal component analysis, and extract the feature importance using a random forest model that has been validated and selected from the training and test sets. Use these three as three weight information sources. Calculate the pairwise Kendall rank correlation coefficients between the three. Use the average rank correlation coefficient between any weight source and the other two as the confidence factor of that weight source. Perform weighted fusion according to the confidence factor ratio. When the confidence of all three is lower than the preset threshold, shrink to an equal-weight benchmark to obtain the comprehensive weight of each indicator. Step 3: Construct a linear weighted basis MI=∑(w) based on the comprehensive weights. i ×X i '), where X i 'W' represents the standardized index value. iTo achieve a comprehensive weighting, an interaction suppression function is introduced for the hardness-standardized value H' and the sugar-acid ratio-standardized value SAR'. When the absolute values ​​of both the hardness-standardized value H' and the sugar-acid ratio-standardized value SAR' are greater than or equal to 2.0, it is determined that both are simultaneously at an extreme high or extreme low value, and a negative correction term λ·(|H'|·|SAR'|) is applied. λ is automatically fitted based on the residual fluctuations of the late-maturity samples in the training set to obtain the corrected maturity index MI. Step 4: Perform K-means clustering analysis on the MI values ​​of the training set samples, and determine the grading thresholds based on expert experience. The grading thresholds include a first threshold of 0.20 and a second threshold of 0.55, where MI < 0.20 corresponds to Level I, 0.20 ≤ MI < 0.55 corresponds to Level II, and MI ≥ 0.55 corresponds to Level III. Step 5: After deployment, monitor the KL divergence between the MI distribution of the newly collected validation set and the training set distribution. When the divergence exceeds the preset threshold, automatically trigger the recalculation of steps one to four above, and output the updated weights and thresholds.

[0026] In this technical solution, step one corresponds to the data acquisition and preprocessing module 100, which collects six physicochemical indicators of yellow peach fruit: hardness, soluble solids, L* value, a* value, b* value, and sugar-acid ratio. The raw data is checked for missing values, and outlier samples are identified and removed using the Z-score method with |Z| greater than 3 as the standard. The retained sample data is then standardized using Z-score to ensure a mean of 0 and a standard deviation of 1, resulting in standardized data. Step two corresponds to the multi-source weighted adaptive fusion module 200, which uses partial least squares regression to extract the absolute value of regression coefficients, principal component analysis to extract the contribution of the loading matrix, and a random forest model validated and selected from the training and testing sets to extract feature importance as three weight information sources. The pairwise Kendall rank correlation coefficients between these three sources are calculated. The average rank correlation coefficient between any weight source and the other two is used as the confidence factor for that weight source. Weighted fusion is performed according to the confidence factor ratio. When the confidence of all three is lower than a preset threshold, the weights are reduced to an equal-weight benchmark to obtain the comprehensive weight of each indicator. Step 3 corresponds to the maturity index nonlinear correction module 300, which constructs a linear weighted basis MI=∑w based on the comprehensive weights. i ×X i ', where X i 'For standardized indicator values, w i To integrate the weights, an interaction suppression function is introduced for the hardness-normalized value H' and the sugar-acid ratio-normalized value SAR'. When both are at extremely high or extremely low values, a negative correction term λ·|H'|·|SAR'| is applied.

[0027] The design of this interaction inhibition function is based on the biological patterns observed during the ripening process of yellow peaches. During fruit ripening, firmness decreases monotonically with increasing maturity, while the sugar-acid ratio increases monotonically, exhibiting good linear response characteristics within the normal ripening range. However, at both ends of the ripening process—the early stage of immaturity and the late stage of overripeness—the rates of change for both indicators tend to plateau, exhibiting a biologically significant saturation effect. Specifically: When the fruit is in the early immature stage, its firmness is extremely high and its sugar-acid ratio is extremely low. The linear weighted basis will assign a very low MI value to this state. However, the actual maturity difference between this MI value and the MI value of the moderately immature state is not as large as reflected by the linear model. This is because the conversion of starch to sugar inside the fruit has not yet started, and the decrease in firmness is limited. The two exhibit a non-linear coupling relationship. When the fruit is in the late overripe stage, its firmness is extremely low and its sugar-acid ratio is extremely high. The linear weighted basis will assign a very high MI value to this state. However, in reality, after the fruit is overripe, cell wall degradation is almost complete, sugar accumulation tends to be saturated, and changes in firmness and sugar-acid ratio tend to stagnate. At this time, further increases in the MI value can no longer truly reflect the substantial changes in maturity. The cross-inhibition function simulates the above-mentioned saturation effect by applying a negative correction when firmness and sugar-acid ratio are both at extreme values. This makes the corrected MI value tend to converge at both ends of maturity, which is more in line with the biological reality of index changes during fruit ripening. This compensates for the shortcomings of the pure linear model in predicting large biases under extreme conditions.

[0028] λ is automatically fitted based on the residual fluctuations of late-maturity samples in the training set to obtain the corrected maturity index MI. Step four corresponds to the grading threshold determination module 400, which performs K-means clustering analysis on the MI values ​​of the training set samples and determines the grading thresholds based on expert experience. The grading thresholds include a first threshold of 0.20 and a second threshold of 0.55. MI less than 0.20 corresponds to Level I, 0.20 to 0.55 corresponds to Level II, and above 0.55 corresponds to Level III. Step five corresponds to the dynamic update module 500, which monitors the KL divergence between the MI distribution of the newly collected validation set and the distribution of the training set after deployment. When the divergence exceeds the preset threshold, the recalculation of steps one to four is automatically triggered, and the updated weights and thresholds are output. These steps are sequentially linked to form a complete data processing flow. The output of step one serves as the input of step two, the output of step two serves as the input of step three, the output of step three serves as the input of step four, and step five monitors the overall running status of steps one to four and triggers a full-process recalculation when necessary. This scheme is applied to the scenario of determining the maturity of yellow peaches before harvest. It requires that the collected physicochemical index data be complete and consistent in source, and that the training set samples cover three levels: I, II, and III, with the sample size of each level meeting the basic requirements of K-means clustering.

[0029] In another technical solution, before removing abnormal samples in step one, a standard sample library establishment and label-assisted anchoring step is included: Yellow peaches are divided into three discrete grades—Grade I, Grade II, and Grade III—based on the number of days after flowering; within each grade, linear interpolation is performed based on the number of days after flowering to generate continuous reference values ​​between 0 and 1; these continuous reference values ​​are used to determine whether marginal samples should be retained during Z-score outlier detection. When the absolute Z-score of a sample is between 3.0 and 3.5 and the continuous reference value of that sample deviates from the distribution of continuous reference values ​​of most samples within the same grade, the sample is combined with its numerical ranking position in Mahalanobis distance space to determine whether to remove it; after K-means clustering, these continuous reference values ​​are used to assist experts in determining cluster boundaries, and the accuracy of the sample labels is reverse-verified by statistically analyzing the consistency between the continuous reference values ​​of samples within each grade and the grade labels; these continuous reference values ​​do not participate in model training.

[0030] In this technical solution, before removing abnormal samples in step one, a standard sample library is established and a label-assisted anchoring module 600 is used. Yellow peaches are divided into three discrete grades: Grade I, Grade II, and Grade III, based on the number of days after flowering. Within each grade, linear interpolation is performed based on the number of days after flowering to generate a continuous reference value between 0 and 1. This continuous reference value is used to determine whether marginal samples should be retained during Z-score outlier detection. When the absolute Z-score of a sample is between 3.0 and 3.5, and the continuous reference value of that sample deviates from the distribution of continuous reference values ​​of most samples within the same grade, the sample's numerical ranking position in Mahalanobis distance space is considered to determine whether to remove the sample. After K-means clustering, this continuous reference value is used to assist experts in determining the cluster boundaries, and the accuracy of the sample labels is back-verified by statistically analyzing the consistency between the continuous reference values ​​of samples within each grade and the grade labels. This continuous reference value is not used in model training. This scheme quantifies the temporal information within discrete levels into continuous values, providing a quantitative basis for the decision to remove marginal samples, and also providing auxiliary reference for determining cluster boundaries and verifying label accuracy.

[0031] In another technical solution, in step two, the random forest model is selected as follows: Valid samples are stratified according to maturity level and divided into training and test sets in an 8:2 ratio; prediction models are constructed using four algorithms: partial least squares regression, support vector machine, random forest, and artificial neural network. The support vector machine uses the RBF kernel function; the number of decision trees in the random forest is between 80 and 120; the number of neurons in the input layer of the artificial neural network is between 5 and 7, the number of neurons in the hidden layer is between 6 and 10, the number of neurons in the output layer is between 3 and 5, the learning rate is between 0.2 and 0.4, the momentum factor is between 0.1 and 0.3, and the maximum number of iterations is between 500 and 1500; the model with the highest accuracy, the smallest root mean square error, and the largest coefficient of determination on the test set is selected as the optimal model, using accuracy, root mean square error, and coefficient of determination as evaluation indicators.

[0032] In this technical solution, effective samples are stratified and sampled according to maturity level, and divided into training and test sets in an 8:2 ratio. Four algorithms—Partial Least Squares Regression, Support Vector Machine (SVM), Random Forest, and Artificial Neural Network (ANN)—are used to construct prediction models. The SVM employs the RBF kernel function, the number of decision trees in the Random Forest ranges from 80 to 120, and the number of neurons in the input layer, hidden layer, and output layer of the ANN ranges from 5 to 7, with a learning rate of 0.2 to 0.4, a momentum factor of 0.1 to 0.3, and a maximum number of iterations of 500 to 1500. Accuracy, root mean square error (RMSE), and coefficient of determination on the test set are used as evaluation metrics. The model with the highest accuracy, lowest RMS error, and highest coefficient of determination is selected as the optimal model. This solution ensures that the Random Forest model involved in weight extraction has optimal hierarchical performance through multi-model comparison and joint evaluation of complementary metrics.

[0033] In another technical solution, the confidence factor is calculated by using Bootstrap resampling to generate multiple sub-sample sets, calculating the pairwise Kendall rank correlation coefficients of the three for each sub-sample set, taking the median of each correlation coefficient as the final correlation coefficient, and calculating the average rank correlation coefficient based on the median as the confidence factor; at the same time, the trigger threshold for the dynamic shrinkage regularization term is set to be triggered when the confidence of all three is less than 0.3, and the weights after shrinkage are equally weighted.

[0034] In this technical solution, Bootstrap resampling is used to generate multiple subsample sets. For each subsample set, pairwise Kendall rank correlation coefficients are calculated, and the median of these correlation coefficients is taken as the final correlation coefficient. The average rank correlation coefficient is then calculated based on the median as the confidence factor. The trigger threshold for the dynamic shrinkage regularization term is set when the confidence levels of all three factors are less than 0.3, and the weights after shrinkage are equally weighted. This solution suppresses statistical fluctuations when the sample size is limited through Bootstrap resampling, enhances the ability to resist outliers by using the median, and prevents the risk of weight allocation distortion when all confidence factors are low.

[0035] In another technical solution, the fitting process of λ adopts weighted least squares. The samples with maturity level III and continuous reference values ​​greater than 0.8 in the training set are used as the late-maturity sample subset. For each late-maturity sample, the residual between its linear weighted basis and the measured reference value is calculated, and the correlation coefficient between the absolute value of the residual and the absolute value of the product of the hardness standardized value and the sugar-acid ratio standardized value is used as the initial estimate of λ. Then, the leave-one-out cross-validation method is used to optimize λ. The λ value that minimizes the mean square error of the corrected MI on the validation set is selected as the final value, and the value range of λ is set to 0.05 to 0.20.

[0036] In this technical solution, weighted least squares is used. Samples in the training set with maturity level III and continuous reference values ​​greater than 0.8 are selected as the final-maturity sample subset. For each final-maturity sample, the residual between its linearly weighted basis and the measured reference value is calculated. The correlation coefficient between the absolute value of this residual and the absolute value of the product of the hardness-standardized value and the sugar-acid ratio-standardized value is used as the initial estimate of λ. Then, leave-one-out cross-validation is used to optimize λ. The λ value that minimizes the mean square error of the corrected MI on the validation set is selected as the final value, and the range of λ is set to 0.05 to 0.20. This solution, through a three-stage design of initial estimation, cross-validation optimization, and value range constraint, achieves adaptive determination of λ, avoiding the subjectivity of manual setting and the risk of overfitting.

[0037] In another technical solution, in step five, the preset threshold for KL divergence detection is 0.05. Detection is triggered when the newly collected validation set sample size reaches 20% of the training set sample size. If the KL divergence exceeds the threshold, recalculation is initiated. During recalculation, the original weights are retained as a reference, and the new weights are updated by weighted smoothing with the original weights. The smoothing coefficient is positively correlated with the KL divergence value. When recalculation is triggered, the K-means clustering algorithm is used simultaneously to perform cluster analysis on the MI values ​​of the recalculated training set samples, and the grading threshold is re-determined based on expert experience.

[0038] In this technical solution, the preset threshold for KL divergence detection is 0.05. Detection is triggered when the newly collected validation set sample size reaches 20% of the training set sample size. If the KL divergence exceeds the threshold, recalculation is initiated. During recalculation, the original weights are retained as a reference, and the new weights are updated with a weighted smoothing algorithm, with the smoothing coefficient positively correlated with the KL divergence value. When recalculation is triggered, K-means clustering is simultaneously used to perform cluster analysis on the MI values ​​of the recalculated training set samples, and the grading threshold is re-determined based on expert experience. This solution ensures the continuity of threshold transition through weighted smoothing updates, avoiding instability in grading results caused by model mutations, while synchronous re-clustering ensures consistency between the threshold and the updated model.

[0039] In another technical solution, in the linear interpolation of the continuous reference values, the number of days after flowering within each level is normalized, mapping the earliest number of days after flowering within the level to 0 and the latest to 1. For samples whose number of days after flowering exceeds the level range, the values ​​are truncated by the nearest neighbor level edge value. In the outlier detection process, if the continuous reference value of a sample is in the top 5% or bottom 5% and its absolute Z-score is between 2.5 and 3.0, then the sample is retained.

[0040] In this technical solution, the number of days after flowering within each level is normalized, mapping the earliest number of days after flowering within a level to 0 and the latest to 1. For samples whose number of days after flowering exceeds the level range, truncation is performed using the nearest neighbor level edge value. During outlier detection, if a sample's continuous reference value is in the top 5% or bottom 5% and its absolute Z-score is between 2.5 and 3.0, the sample is retained. This solution addresses the issue of excessive days after flowering for boundary samples through truncation assignment and protects representative samples at the edge of the maturity stage from accidental deletion through an edge retention strategy, thus preserving key boundary information in the training set.

[0041] Another technical solution also includes model application domain drift detection and adaptive recalibration steps: During the deployment phase, for each batch of new samples, the maximum mean difference between the feature distribution of this batch of samples and the feature distribution of the training set is calculated. If the maximum mean difference is between 0.08 and 0.12, adversarial validation is initiated, and a binary classifier is trained to distinguish between training set samples and new samples. When the area under the receiver operating characteristic curve of the classifier is between 0.65 and 0.75, it is determined to be a drift. On this basis, incremental weight adjustment is performed. Based on the training set weights, a Bayesian online learning framework is used to update the posterior distribution of each indicator weight as a likelihood function, and the correction coefficients and grading thresholds are refitted. The updated weights are time-series smoothed with the historical weight sequence to form a weight evolution trajectory. When the weight change exceeds 2.5 to 3.5 times the standard deviation of the historical fluctuation, an alarm is triggered and the update is frozen. It is unfrozen after manual verification.

[0042] In this technical solution, for each batch of new samples, the maximum mean difference between the feature distribution of this batch of samples and the feature distribution of the training set is calculated. If the maximum mean difference is between 0.08 and 0.12, adversarial validation is initiated, and a binary classifier is trained to distinguish between training set samples and new samples. When the area under the receiver operating characteristic curve (AUC) of the classifier is between 0.65 and 0.75, it is considered a drift. Based on this, incremental weight adjustment is performed. Using the training set weights as a basis, a Bayesian online learning framework is adopted, and the gradient information of the new samples is used as a likelihood function to update the posterior distribution of each indicator weight.

[0043] Specifically, let the weight vector for each indicator be w = [w1, w2, ..., w6]. T , corresponding to the weights of hardness, soluble solids, L* value, a* value, b* value, and sugar-acid ratio, respectively. The prior distribution of the weights is set to a multidimensional Gaussian distribution w ~ N(μ0, Σ0), where μ0 is the original training set weight vector, Σ0 is the diagonal covariance matrix, and the diagonal elements are set to 0.01. For the newly collected batch t samples, the standardized index matrix X of that batch of samples is used... t and the corresponding maturity tag y t Construct the likelihood function p(y) t |X t The update rule for the weighted posterior distribution is: μ t =Σ t (Σ t-1 -1 μ t-1 +η t ·∇L t (w)), Σ t =(Σ t-1 -1 +η t ·I) -1 , where μ t Let Σ be the updated weight mean vector. t For the updated covariance matrix, η t Let be the learning rate for batch t, ​​and set to 0.01, ∇L t (w) represents the gradient of the log-likelihood function at the mean of the weights, and I is the identity matrix. The updated weights take the value μ. t This serves as the new comprehensive weight value. This update strategy does not require storing all historical data; it relies only on the gradient information of the current batch of samples and the posterior distribution parameters of the previous time step, achieving lightweight incremental adaptive weight adjustment.

[0044] Meanwhile, when refitting the correction coefficients λ, the updated weights μ are used. tBased on this, the linear weighted basis and residuals are recalculated, and a new value of λ is fitted using weighted least squares for the new batch of samples. The fitting method is the same as the initial fitting, and the value of λ is still limited to between 0.05 and 0.20.

[0045] The system then refits and corrects the coefficients and grading thresholds. The updated weights are then time-series smoothed against historical weight sequences to create a weight evolution trajectory. An alarm is triggered and updates are frozen when the weight change exceeds 2.5 to 3.5 times the standard deviation of historical fluctuations, pending manual verification before being unfrozen. This scheme reduces the false positive and false negative rates of drift detection through a dual detection mechanism, achieves lightweight model adaptation through Bayesian online learning, and prevents model collapse due to abnormal drift through a freeze protection mechanism.

[0046] Another technical solution also includes steps for quantifying the uncertainty of the maturity index and outputting graded confidence scores: While calculating the maturity index, Monte Carlo Dropout technology is used to perform multiple random inactivation predictions on the random forest model to obtain the predicted distribution of the maturity index, and its standard deviation is taken as the uncertainty measure; when the maturity index is less than 1.2 to 1.8 times the uncertainty value of any threshold boundary, the sample is determined to be in a critical state, and a critical level prompt is output; a Bayesian neural network is used to model the measurement error of the six physicochemical indicators, and the measurement noise is transmitted to the maturity index calculation process to obtain the overall uncertainty interval of the maturity index, and the posterior probability of each level is calculated based on the area ratio of the overlap between this interval and each threshold, and the level with the highest probability and its confidence score are output.

[0047] In this technical solution, Monte Carlo Dropout technology is used to perform multiple random deactivation predictions on the random forest model. The Dropout probability is set to 0.1, meaning that each node of each decision tree is randomly deactivated with a probability of 0.1 in each forward propagation. For each test sample, 200 random deactivation forward propagations are performed, with each propagation resulting in independent random deactivation, yielding 200 predicted values ​​for the maturity index (MI), forming the MI prediction distribution for that sample. The sample mean and standard deviation are calculated based on this distribution; the standard deviation is the uncertainty measure σ for that sample. When the maturity index MI is less than 1.5 times the uncertainty value σ from any threshold boundary, the sample is determined to be in a critical state, and a critical level indicator containing two adjacent levels is output. The predicted distribution of the maturity index is obtained, and its standard deviation is used as the uncertainty measure. When the maturity index is less than 1.2 to 1.8 times the uncertainty value from any threshold boundary, the sample is determined to be in a critical state, and a critical level indicator is output. A Bayesian neural network was used to model the measurement errors of six physicochemical indicators. The structure of the Bayesian neural network was set as follows: the input layer had 6 neurons corresponding to the six physicochemical indicators, the hidden layer had 10 neurons with the ReLU activation function, and the output layer had 6 neurons corresponding to the corrected estimates of each indicator. The network parameters were trained using variational inference, with the measurement standard deviation of each indicator as the prior information of the observation noise. The posterior distribution of the measurement error of each indicator was learned by minimizing the lower bound of evidence (ELBO). The learned noise posterior distribution was passed to the calculation process of the maturity index (MI) using a Monte Carlo sampling method. Specifically, for each test sample, 300 samples were taken from the posterior distribution of the measurement error of each indicator. Each sampling obtained a set of corrected indicator values, and 300 MI values ​​were calculated to constitute the overall uncertainty interval of the MI for that sample. Based on the proportion of the area of ​​overlap between this interval and the three threshold intervals of Level I, Level II, and Level III, the posterior probability of the sample belonging to each level was calculated, and the level with the highest probability and its confidence score were output.

[0048] Measurement noise is passed to the maturity index calculation process to obtain the overall uncertainty interval of the maturity index. The posterior probability of each level is then calculated based on the proportion of the area overlapping each threshold with this interval. The level with the highest probability and its confidence score are output. This scheme transforms the grading output from a single level judgment to a probability distribution including confidence scores, providing a reliability benchmark for grading decisions and reducing the risk of misjudgment due to measurement fluctuations or random model errors.

[0049] This invention also provides a machine learning-based intelligent evaluation system for the maturity of yellow peaches, comprising: The data acquisition and preprocessing module is configured to collect six physicochemical indicators of yellow peach fruit: firmness, soluble solids, L* value, a* value, b* value, and sugar-acid ratio; perform missing value checks on the raw data, and use the Z-score method to identify and remove abnormal samples with a standard of |Z| greater than 3; perform Z-score standardization on the retained sample data to make its mean 0 and standard deviation 1, and output standardized data. The multi-source weighted adaptive fusion module is connected to the data acquisition and preprocessing module. It is configured to extract the absolute value of regression coefficients using partial least squares regression, extract the contribution of the loading matrix using principal component analysis, and extract the feature importance using a random forest model validated on the training and test sets. These three are used as three weight information sources. The pairwise Kendall rank correlation coefficients between the three are calculated. The average rank correlation coefficient between any weight source and the other two is used as the confidence factor CFi of that weight source. The weights are fused according to the CFi ratio. When the CFi of all three is lower than a preset threshold, the weights are reduced to an equal-weight benchmark, and the comprehensive weights of each indicator are output. The maturity index nonlinear correction module is connected to the multi-source weight adaptive fusion module and configured to construct a linear weighted basis MI=∑(w) based on the comprehensive weights. i ×X i '), where X i 'W' represents the standardized index value. i To achieve a comprehensive weight, an interaction suppression function is introduced for the hardness-standardized value H' and the sugar-acid ratio-standardized value SAR'. When both are at extremely high or extremely low values, a negative correction term λ·(|H'|·|SAR'|) is applied. λ is automatically fitted based on the residual fluctuations of the late-maturity samples in the training set to obtain the corrected maturity index MI, and the maturity index MI is output. The grading threshold determination module is connected to the maturity index nonlinear correction module and is configured to perform K-means clustering analysis on the MI values ​​of the training set samples and determine the grading thresholds in combination with expert experience. The grading thresholds include a first threshold of 0.20 and a second threshold of 0.55, where MI < 0.20 corresponds to level I, 0.20 ≤ MI < 0.55 corresponds to level II, and MI ≥ 0.55 corresponds to level III. The dynamic update module is connected to the data acquisition and preprocessing module, the multi-source weight adaptive fusion module, the maturity index nonlinear correction module, and the hierarchical threshold determination module, respectively. It is configured to monitor the KL divergence between the MI distribution of the newly acquired validation set and the training set distribution after deployment. When the divergence exceeds a preset threshold, it triggers the recalculation of the above four modules and outputs the updated weights and thresholds. In this technical solution, the intelligent evaluation system for the maturity of yellow peaches based on machine learning includes five functional modules. The data acquisition and preprocessing module is configured to collect six physicochemical indicators of yellow peaches: firmness, soluble solids, L* value, a* value, b* value, and sugar-acid ratio. It checks the raw data for missing values, uses the Z-score method to identify and remove outlier samples with a |Z| greater than 3 standard, and performs Z-score standardization on the remaining sample data to make its mean 0 and standard deviation 1, outputting standardized data. The multi-source weighted adaptive fusion module is connected to the data acquisition and preprocessing module and is configured to use partial least squares regression to extract the absolute value of regression coefficients, principal component analysis to extract the contribution of the loading matrix, and a random forest model validated on the training and test sets to extract feature importance as three weight information sources. It calculates the pairwise Kendall rank correlation coefficients between these three sources, uses the average rank correlation coefficient between any weight source and the other two as the confidence factor (CFi) of that weight source, and performs weighted fusion according to the CFi ratio. When all three CFi values ​​are below a preset threshold, the weights are reduced to an equal-weight benchmark, and the comprehensive weights of each indicator are output. The maturity index nonlinear correction module is connected to the multi-source weight adaptive fusion module and configured to construct a linear weighted basis MI=∑w based on the comprehensive weights. i ×X i ', where X i 'For standardized indicator values, w i To optimize the weighting, an interaction suppression function is introduced for the hardness-standardized value H' and the sugar-acid ratio-standardized value SAR'. When both are at extremely high or low values, a negative correction term λ·|H'|·|SAR'| is applied. λ is automatically fitted based on the residual fluctuations of the late-maturity samples in the training set to obtain the corrected maturity index MI, which is then output. The grading threshold determination module is connected to the maturity index nonlinear correction module. It is configured to perform K-means clustering analysis on the MI values ​​of the training set samples and combine expert experience to determine the grading thresholds. The grading thresholds include a first threshold of 0.20 and a second threshold of 0.55. MI less than 0.20 corresponds to Level I, 0.20 to 0.55 corresponds to Level II, and MI above 0.55 corresponds to Level III. The grading thresholds and their corresponding maturity level mappings are output. The dynamic update module is connected to the data acquisition and preprocessing module, the multi-source weight adaptive fusion module, the maturity index nonlinear correction module, and the hierarchical threshold determination module. It is configured to monitor the MI distribution of the newly acquired validation set and the KL divergence between the training set distribution after deployment. When the divergence exceeds a preset threshold, it triggers the recalculation of the above four modules, outputting updated weights and thresholds. The connections between these modules form a complete data path from data acquisition to model maintenance, ensuring system integrity and scalability.

[0050] Example 1 The tested yellow peach variety was the superior insoluble fruit line 05-6-39, collected from the Beijing Forestry and Fruit Tree Research Institute. Sampling covered the period from one week after flowering to one week after maturity, with a total of 320 fruit samples collected. Fruits without disease spots, mechanical damage, and uniform size were selected. Immediately after harvesting, the fruits were temporarily stored in a 4℃ cold storage, and index measurements were completed within 24 hours. Based on the number of days after flowering, the fruits were divided into three discrete grades: Grade I, Grade II, and Grade III. Linear interpolation of the number of days after flowering was performed within each grade to generate continuous reference values ​​between 0 and 1, which were used as auxiliary criteria for subsequent marginal sample determination. Representative appearances of fruits at the three maturity grades are shown below. Figure 1 As shown.

[0051] GY-4 digital fruit firmness tester; PAL-1 digital refractometer; CN-5 spectrophotometer (Konica Minolta, Japan); automatic potentiometric titrator (Switzerland); 5804R general-purpose benchtop low-temperature high-speed centrifuge (Eppendorf, Germany); tissue grinder.

[0052] 1. Determination of soluble solids content (SSC) Fruit pulp tissue was quartered, chopped, homogenized, filtered, and the filtrate was prepared for analysis. The refractometer was calibrated with distilled water, 2-3 drops of sample solution were added, and the reading was recorded. The result was expressed as the arithmetic mean of three parallel measurements.

[0053] 2. Color and hardness measurement The L*, a*, and b* values ​​were measured using a CN-5 spectrophotometer. Four measurement points were evenly selected at the equator of each peach fruit, and four parallel measurements were performed. The texture of the peach fruit was determined using a GY-4 fruit firmness tester. Four measurement points were evenly selected at the equator of each peach fruit, and the firmness of the flesh was measured with a puncture depth of approximately 1 mm. The maximum force required to pierce the flesh was recorded.

[0054] 3. Determination of total sugar content The phenol-sulfuric acid method was used for determination. Glucose was used as the standard substance. A 1 mg / mL glucose stock solution was prepared and diluted to a 0.1 mg / mL standard working solution. At the same time, a 5% phenol solution was prepared. Three 2 g samples were taken, and each was boiled in 30 mL of distilled water at 100 °C for 30 min. After cooling, the samples were centrifuged at 12000 r / min for 10 min. The supernatant was filtered and diluted to 100 mL. Then, 1 mL of this solution was taken and diluted to 100 mL to prepare the test solution. Prepare a 0-2.0 mL gradient of 0.1 mg / mL glucose standard solution and add distilled water to 2 mL. Add 1 mL of 5% phenol solution and 5 mL of concentrated sulfuric acid sequentially, mix well, let stand for 5 min, then heat in a boiling water bath for 15 min. After cooling, take 200 μL and transfer it to an ELISA plate. Measure the absorbance at 490 nm. Plot a standard curve with glucose content as the x-axis and average absorbance as the y-axis. Take 2 mL of the sample solution and develop the color and measure the absorbance in the same way. Find the sugar content m1 (μg) of the sample solution from the standard curve. Finally, calculate the total sugar content according to the formula: total sugar content (g / mg) = 5m1 / m0 (m0 is the sample mass in g).

[0055] 4. Determination of titratable acid content Mix 1.0 g of thawed peach homogenate with 30 mL of distilled water and heat at 80 °C for 30 minutes. After filtration, adjust the volume to 100 mL. Titrate the filtrate to pH 8.2 with 0.05 mol / L sodium hydroxide solution. TA is expressed as citric acid equivalent and calculated using the formula: Titratable acid (%) = V1 × C × (1 / m) × 100%. Where V1 is the volume of sodium hydroxide solution, C is the molar concentration of sodium hydroxide, and m is the sample mass.

[0056] 5. Determination of sugar-acid ratio Sugar-acid ratio = total sugar content / titratable acid content.

[0057] Outlier detection was performed on 320 original peach fruit samples. First, marginal sample identification was performed based on continuous reference values. If a sample's absolute Z-score was between 3.0 and 3.5 and its continuous reference values ​​deviated from the distribution of continuous reference values ​​of most samples in the same category, its numerical ranking in Mahalanobis distance space was considered to determine whether to remove it. If a sample's continuous reference values ​​were in the top 5% or bottom 5% and its absolute Z-score was between 2.5 and 3.0, it was retained. Under these rules, 22 outlier samples with absolute values ​​greater than 3 were ultimately removed using the Z-score method, resulting in 298 valid samples. Z-score standardization was then performed on the retained valid sample data.

[0058] PCA analysis was performed on the six standardized indicators. The results showed that the eigenvalues ​​of the first four principal components were greater than 1, and the cumulative variance contribution rate reached 90.76%. The 298 valid samples were labeled according to maturity level and stratified sampling was used to divide them into a training set of 238 samples and a test set of 60 samples at an 8:2 ratio. The cumulative variance explained by PCA is shown below. Figure 2 As shown.

[0059] Four algorithms were used to construct prediction models: Partial Least Squares Regression (PLSR), Support Vector Machine (SVM), Random Forest (RF), and Backpropagation (BP) Neural Network. PLSR was performed using SIMCA-P software, SVM used the RBF kernel function, the number of decision trees in RF was set to 100, and the BP Neural Network had 6 neurons in the input layer, 8 neurons in the hidden layer, and 3 neurons in the output layer, with a learning rate of 0.3, a momentum factor of 0.2, and a maximum iteration count of 1000.

[0060] The performance comparison results of the models are shown in Table 1 below.

[0061] Table 1. Performance comparison of different models on the test set. SVM 0.8500 0.3873 0.7627 RF 0.9167 0.2887 0.8682 BP 0.8667 0.4282 0.7100 PLSR <![CDATA[- 1 ]]> 0.3626 0.7921 Note: 1 PLSR is a linear regression model that extracts the absolute values ​​of regression coefficients as a weight source. It does not directly output classification accuracy. Its predictive performance is measured by RMSE and R². 2 measure.

[0062] The results show that the Random Forest (RF) model performed best, achieving a maturity level prediction accuracy of 91.67%, an RMSE of 0.2887, an R² of 0.8682, and precision, recall, and F1-score all exceeding 0.88. The confusion matrix of the Random Forest model on the test set is shown below. Figure 3 As shown.

[0063] PLSR was used to extract the absolute values ​​of regression coefficients, PCA to extract the contribution of the loading matrix, and the optimal RF model to extract feature importance, respectively. These three methods were used as three sources of weight information. The comparison of the index weights extracted by the three methods is shown below. Figure 4As shown, PLSR, PCA, and RF methods all assigned high weights to the two indicators of firmness and sugar-acid ratio, indicating that these two indicators are the core factors affecting the maturity of yellow peaches. The pairwise Kendall rank correlation coefficients among the three methods were calculated. Bootstrap resampling was used to generate 500 subsets, each with the same size as the original subset, obtained through sampling with replacement. The median of each correlation coefficient was taken as the final correlation coefficient, and the average rank correlation coefficient was calculated based on the median as the confidence factor for each weight source. The calculated confidence factors for the three methods were 0.21, 0.18, and 0.24, respectively, all below the preset threshold of 0.3, triggering a dynamic shrinkage regularization term. The weights were shrunk to an equal-weighted baseline and then weighted and fused in a 1:1:1 ratio to obtain the comprehensive weights for each indicator: firmness 0.2352, soluble solids 0.1238, L value 0.1393, a value 0.1468, b* value 0.1089, and sugar-acid ratio 0.2461.

[0064] The overall contribution of each indicator accounts for, for example Figure 5 As shown, hardness contributes approximately 23.5%, soluble solids approximately 12.4%, L-value approximately 13.9%, a-value approximately 14.7%, b*-value approximately 10.9%, and sugar-acid ratio approximately 24.6%, with hardness and sugar-acid ratio contributing a combined total of approximately 48.1%. The final weights of each indicator are as follows: Figure 6 As shown.

[0065] Based on comprehensive weighting, the formula for the Yellow Peach Maturity Index (MI) is constructed as follows: MI base =0.2352×H'+0.1238×SSC'+0.1393×L'+0.1468×a'+0.1089×b'+0.2461 ×SAR' Where H', SSC', L', a', b', and SAR' represent the standardized values ​​of hardness, soluble solids, L* value, a* value, b* value, and sugar-acid ratio, respectively.

[0066] A cross-suppression function is introduced between the hardness-standardized value H' and the sugar-acid ratio-standardized value SAR'. A negative correction term is applied when both are at extremely high or low values ​​simultaneously. The correction coefficient λ is fitted using weighted least squares. Samples in the training set with maturity level III and continuous reference values ​​greater than 0.8 are used as the subset of samples at the end of maturity. The residuals between the linear weighted basis and the measured reference values ​​of each end-stage sample are calculated. The correlation coefficient between the absolute value of the residual and the absolute value of the product of H' and SAR' is used as the initial estimate of λ. Then, leave-one-out cross-validation is used for optimization to select the λ value that minimizes the mean square error of the corrected MI on the validation set. After fitting and optimization, the value of λ is set to 0.12. The formula for calculating the corrected maturity index MI is: MI=MI base -0.12×|H'|×|SAR'|.

[0067] While calculating the maturity index, Monte Carlo Dropout was used to quantify the uncertainty of the selected random forest model. With a Dropout probability of 0.1, 200 random inactivation forward propagations were performed on each test sample to obtain the predicted distribution of the maturity index (MI). The standard deviation was taken as the uncertainty measure σ for that sample. Taking a sample in the test set as an example, the mean predicted MI was 0.45, the standard deviation σ was 0.04, and the distance from the threshold boundary between Level II and Level III (0.55) was 0.10. Since this distance was greater than 1.5 times σ (0.06), it was classified as a non-critical state. Among the 60 samples in the test set, 8 samples had an MI less than 1.5 times σ from any threshold boundary, and were classified as critical states. Of these, 5 samples were actually in the adjacent level boundary region, and 3 samples were misclassified due to measurement fluctuations. The accuracy rate for indicating critical states was 62.5%.

[0068] A Bayesian neural network was used to model the measurement errors of six physicochemical indicators. The standard deviation of each indicator was used as the observation noise input to the Bayesian neural network. The network structure was set to 6-10-6, meaning that the input layer has 6 neurons corresponding to the six indicators, the hidden layer has 10 neurons, and the output layer has 6 neurons corresponding to the corrected estimates of each indicator. The posterior distribution of the measurement noise was learned through variational inference. The measurement error was propagated to the maturity index calculation process to obtain the overall uncertainty interval of the MI for each test sample. Taking the same test sample as an example, after considering the propagation of measurement error, the overall uncertainty interval of its MI is 0.41 to 0.49. The overlap area ratios of this interval with the three threshold intervals of Level I (0~0.20), Level II (0.20~0.55), and Level III (0.55~1.0) are 0%, 94.3%, and 5.7%, respectively. Therefore, the output confidence score of Level II is 0.943. The average output confidence score of the 60 samples in the test set was 0.914, with the average confidence score of correctly classified samples being 0.935 and the average confidence score of incorrectly classified samples being 0.712.

[0069] Based on the correspondence between the MI value distribution of the training set samples and the original levels, combined with K-means clustering and expert experience, the three-level classification thresholds are determined as shown in Table 2: Table 2. Threshold Classification for Maturity Prediction Levels Level I 0~0.20 Level II 0.20~0.55 Level III 0.55~1.0 After deployment, the system continuously monitors the MI distribution of the newly collected validation set and the KL divergence between the training set and the training set distribution. A detection is triggered when the validation set sample size reaches 20% of the training set sample size, with a preset threshold of 0.05. If the KL divergence exceeds the threshold, a full recalculation of the data preprocessing, weight fusion, exponent correction, and threshold determination steps is automatically triggered. During recalculation, the original weights are retained as a reference, and the new weights are updated with a weighted smoothing factor that is positively correlated with the KL divergence value. Simultaneously, the K-means clustering algorithm is used to perform cluster analysis on the MI values ​​of the recalculated training set samples, and the hierarchical thresholds are re-determined based on expert experience, outputting the updated weights and thresholds.

[0070] During the model's deployment and operation, an additional domain drift detection was performed. The second batch of yellow peach samples collected in mid-July 2025 was used as the validation batch, comprising 60 samples. The maximum mean difference (MMD) between the six indicator feature distributions of this batch and the feature distributions of the original training set was calculated. Using a radial basis function kernel with a bandwidth parameter set to 1.0, the calculated MMD value was 0.097, falling between 0.08 and 0.12, thus initiating adversarial validation. A logistic regression binary classifier was trained to distinguish between the training set samples and the new batch samples. The 238 training samples and the 60 new batch samples were merged, and the training and validation sets were randomly divided. After training, the area under the receiver operating characteristic (AUC) curve on the validation set was calculated to be 0.714, falling between 0.65 and 0.75, indicating distribution drift.

[0071] After determining the drift, incremental weight adjustment is performed. Based on the original training set weights (hardness 0.2352, soluble solids 0.1238, L value 0.1393, α value 0.1468, b value 0.1089, sugar-acid ratio 0.2461), a Bayesian online learning framework is used, employing the gradient information of the new batch of 60 samples as the likelihood function to update the posterior distribution of each indicator weight. The learning rate is set to 0.01, and the prior distribution of the weights is a Gaussian distribution with a mean equal to the original weights and a variance of 0.01. After incremental update, the new weights are obtained: hardness 0.2405, soluble solids 0.1201, L value 0.1376, α value 0.1452, b value 0.1078, sugar-acid ratio 0.2488. Simultaneously, the correction coefficient λ was refitted, and the residuals between the linear weighted basis and the measured reference values ​​were calculated for the new batch of samples. The weighted least squares method was used to fit the updated value of λ, which was 0.11. K-means clustering was then used to perform cluster analysis on the MI values ​​of the recalculated training set samples. Based on expert experience, the grading thresholds were redefined: the first threshold was 0.19, and the second threshold was 0.54.

[0072] The updated weights were smoothed over time with the historical weight sequence to form the weight evolution trajectory. The historical standard deviation of hardness in the original weight sequence was 0.008, and the change in hardness weight after the update was 0.0053, which did not exceed 2.5 times the standard deviation of 0.02. The changes in the weights of other indicators were also within the normal range, and no freeze update was triggered. The model continued to run normally.

[0073] Although embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. They can be applied to various fields suitable for the present invention. For those skilled in the art, other modifications can be easily made. Therefore, without departing from the general concept defined by the claims and their equivalents, the present invention is not limited to the specific details and examples shown and described herein.

Claims

1. A method for constructing an intelligent evaluation model for the maturity of yellow peaches based on machine learning, characterized in that, Includes the following steps: Step 1: Collect six physicochemical indicators of yellow peach fruit: firmness, soluble solids, L* value, a* value, b* value, and sugar-acid ratio; check the raw data for missing values, and use the Z-score method to identify and remove abnormal samples with |Z|>3 as the standard; The retained sample data are Z-score standardized to make the mean 0 and the standard deviation 1, thus obtaining standardized data; Step 2: Extract the absolute value of regression coefficients using partial least squares regression, extract the contribution of the loading matrix using principal component analysis, and extract the feature importance using a random forest model that has been validated and selected from the training and test sets. Use these three as three weight information sources. Calculate the pairwise Kendall rank correlation coefficients between the three. Use the average rank correlation coefficient between any weight source and the other two as the confidence factor of that weight source. Perform weighted fusion according to the confidence factor ratio. When the confidence of all three is lower than the preset threshold, shrink to an equal-weight benchmark to obtain the comprehensive weight of each indicator. Step 3: Construct a linear weighted basis MI=∑(w) based on the comprehensive weights. i ×X i '), where X i 'W' represents the standardized index value. i To achieve a comprehensive weighting, an interaction suppression function is introduced for the hardness-standardized value H' and the sugar-acid ratio-standardized value SAR'. When the absolute values ​​of both the hardness-standardized value H' and the sugar-acid ratio-standardized value SAR' are greater than or equal to 2.0, it is determined that both are simultaneously at an extreme high or extreme low value, and a negative correction term λ·(|H'|·|SAR'|) is applied. λ is automatically fitted based on the residual fluctuations of the late-maturity samples in the training set to obtain the corrected maturity index MI. Step 4: Perform K-means clustering analysis on the MI values ​​of the training set samples, and determine the grading thresholds based on expert experience. The grading thresholds include a first threshold of 0.20 and a second threshold of 0.55, where MI < 0.20 corresponds to Level I, 0.20 ≤ MI < 0.55 corresponds to Level II, and MI ≥ 0.55 corresponds to Level III. Step 5: After deployment, monitor the KL divergence between the MI distribution of the newly collected validation set and the training set distribution. When the divergence exceeds the preset threshold, automatically trigger the recalculation of steps one to four above, and output the updated weights and thresholds.

2. The method for constructing an intelligent evaluation model for the maturity of yellow peaches based on machine learning as described in claim 1, characterized in that, Before removing outlier samples in step one, the process includes establishing a standard sample library and label-assisted anchoring: Yellow peaches are divided into three discrete levels (Level I, Level II, and Level III) based on the number of days after flowering; within each level, linear interpolation is performed based on the number of days after flowering to generate a continuous reference value between 0 and 1; this continuous reference value is used to determine whether marginal samples should be retained during Z-score outlier detection. When the absolute Z-score of a sample is between 3.0 and 3.5 and the continuous reference value of that sample deviates from the distribution of continuous reference values ​​of most samples within the same level, the sample's numerical ranking position in Mahalanobis distance space is used to determine whether to remove the sample; after K-means clustering, this continuous reference value is used to assist experts in determining cluster boundaries, and the accuracy of the sample labels is back-verified by statistically analyzing the consistency between the continuous reference values ​​of samples within each level and the level labels; this continuous reference value does not participate in model training.

3. The method for constructing an intelligent evaluation model for the maturity of yellow peaches based on machine learning as described in claim 1, characterized in that, In step two, the random forest model is selected as follows: Valid samples are stratified according to maturity level and divided into training and test sets in an 8:2 ratio; prediction models are constructed using four algorithms: partial least squares regression, support vector machine, random forest, and artificial neural network. The support vector machine uses the RBF kernel function; the number of decision trees in the random forest is between 80 and 120; the number of neurons in the input layer of the artificial neural network is between 5 and 7, the number of neurons in the hidden layer is between 6 and 10, and the number of neurons in the output layer is between 3 and 5; the learning rate is between 0.2 and 0.4; the momentum factor is between 0.1 and 0.3; and the maximum number of iterations is between 500 and 1500. The model with the highest accuracy, the smallest root mean square error, and the largest coefficient of determination on the test set is selected as the optimal model, using accuracy, root mean square error, and coefficient of determination as evaluation metrics.

4. The method for constructing an intelligent evaluation model for the maturity of yellow peaches based on machine learning as described in claim 1, characterized in that, In the calculation of the confidence factor, Bootstrap resampling is used to generate multiple subsample sets. For each subsample set, the pairwise Kendall rank correlation coefficients of the three are calculated. The median of each correlation coefficient is taken as the final correlation coefficient, and the average rank correlation coefficient is calculated based on the median as the confidence factor. At the same time, the trigger threshold for the dynamic shrinkage regularization term is set to be triggered when the confidence of all three is less than 0.3, and the weights after shrinkage are equally weighted.

5. The method for constructing an intelligent evaluation model for the maturity of yellow peaches based on machine learning as described in claim 2, characterized in that, The fitting process for λ employs weighted least squares. Samples in the training set with a maturity level of III and continuous reference values ​​greater than 0.8 are used as a subset of samples in the late maturity stage. For each late maturity sample, the residual between its linear weighted basis and the measured reference value is calculated. The correlation coefficient between the absolute value of this residual and the absolute value of the product of the hardness standardized value and the sugar-acid ratio standardized value is used as the initial estimate of λ. Then, leave-one-out cross-validation is used to optimize λ. The λ value that minimizes the mean square error of the corrected MI on the validation set is selected as the final value, and the range of λ is set to 0.05 to 0.

20.

6. The method for constructing an intelligent evaluation model for the maturity of yellow peaches based on machine learning as described in claim 1, characterized in that, In step five, the preset threshold for KL divergence detection is 0.

05. Detection is triggered when the newly collected validation set sample size reaches 20% of the training set sample size. If the KL divergence exceeds the threshold, recalculation is initiated. During recalculation, the original weights are retained as a reference, and the new weights are weighted and smoothed with the original weights. The smoothing coefficient is positively correlated with the KL divergence value. When recalculation is triggered, the K-means clustering algorithm is used simultaneously to perform cluster analysis on the MI values ​​of the recalculated training set samples, and the grading threshold is re-determined based on expert experience.

7. The method for constructing an intelligent evaluation model for the maturity of yellow peaches based on machine learning as described in claim 2, characterized in that, In the linear interpolation of the continuous reference values, the number of days after flowering within each level is normalized, mapping the earliest number of days after flowering within each level to 0 and the latest to 1. For samples whose number of days after flowering exceeds the level range, the values ​​are truncated by the nearest neighbor level edge value. In the outlier detection process, if the continuous reference value of a sample is in the top 5% or bottom 5% and its absolute Z-score is between 2.5 and 3.0, the sample is retained.

8. The method for constructing an intelligent evaluation model for the maturity of yellow peaches based on machine learning as described in claim 1, characterized in that, It also includes model application domain drift detection and adaptive recalibration steps: During the deployment phase, for each batch of new samples, the maximum mean difference between the feature distribution of this batch of samples and the feature distribution of the training set is calculated. If the maximum mean difference is between 0.08 and 0.12, adversarial validation is initiated, and a binary classifier is trained to distinguish between training set samples and new samples. When the area under the receiver operating characteristic curve of the classifier is between 0.65 and 0.75, it is determined to be a drift. On this basis, incremental weight adjustment is performed. Based on the weights of the training set, a Bayesian online learning framework is used to update the posterior distribution of each indicator weight as a likelihood function, and the correction coefficients and grading thresholds are refitted. The updated weights are time-series smoothed with the historical weight sequence to form a weight evolution trajectory. When the weight change exceeds 2.5 to 3.5 times the standard deviation of the historical fluctuation, an alarm is triggered and the update is frozen. It is unfrozen after manual verification.

9. The method for constructing an intelligent evaluation model for the maturity of yellow peaches based on machine learning as described in claim 1, characterized in that, It also includes steps for quantifying the uncertainty of the maturity index and outputting graded confidence scores: While calculating the maturity index, Monte Carlo Dropout technology is used to perform multiple random inactivation predictions on the random forest model to obtain the predicted distribution of the maturity index, and its standard deviation is taken as the uncertainty measure; when the maturity index is less than 1.2 to 1.8 times the uncertainty value of any threshold boundary, the sample is determined to be in a critical state, and a critical level prompt is output; Bayesian neural network is used to model the measurement error of the six physicochemical indicators, and the measurement noise is transmitted to the maturity index calculation process to obtain the overall uncertainty interval of the maturity index, and the posterior probability of each level is calculated according to the area ratio of the overlap between this interval and each threshold, and the level with the highest probability and its confidence score are output.

10. A machine learning-based intelligent evaluation system for the maturity of yellow peaches, characterized in that, include: The data acquisition and preprocessing module is configured to collect six physicochemical indicators of yellow peach fruit: firmness, soluble solids, L* value, a* value, b* value, and sugar-acid ratio; the raw data is checked for missing values, and the Z-score method is used to identify and remove abnormal samples with |Z| greater than 3 as the standard. Perform Z-score standardization on the retained sample data to make its mean 0 and standard deviation 1, and output the standardized data; The multi-source weighted adaptive fusion module is connected to the data acquisition and preprocessing module. It is configured to extract the absolute value of regression coefficients using partial least squares regression, extract the contribution of the loading matrix using principal component analysis, and extract the feature importance using a random forest model validated on the training and test sets. These three are used as three weight information sources. The pairwise Kendall rank correlation coefficients between the three are calculated. The average rank correlation coefficient between any weight source and the other two is used as the confidence factor CFi of that weight source. The weights are fused according to the CFi ratio. When the CFi of all three is lower than a preset threshold, the weights are reduced to an equal-weight benchmark, and the comprehensive weights of each indicator are output. The maturity index nonlinear correction module is connected to the multi-source weight adaptive fusion module and configured to construct a linear weighted basis MI=∑(w) based on the comprehensive weights. i ×X i '), where X i 'W' represents the standardized index value. i To achieve a comprehensive weight, an interaction suppression function is introduced for the hardness-standardized value H' and the sugar-acid ratio-standardized value SAR'. When both are at extremely high or extremely low values, a negative correction term λ·(|H'|·|SAR'|) is applied. λ is automatically fitted based on the residual fluctuations of the late-maturity samples in the training set to obtain the corrected maturity index MI, and the maturity index MI is output. The grading threshold determination module is connected to the maturity index nonlinear correction module and is configured to perform K-means clustering analysis on the MI values ​​of the training set samples and determine the grading thresholds in combination with expert experience. The grading thresholds include a first threshold of 0.20 and a second threshold of 0.55, where MI < 0.20 corresponds to level I, 0.20 ≤ MI < 0.55 corresponds to level II, and MI ≥ 0.55 corresponds to level III. The dynamic update module is connected to the data acquisition and preprocessing module, the multi-source weight adaptive fusion module, the maturity index nonlinear correction module, and the hierarchical threshold determination module, respectively. It is configured to monitor the MI distribution of the newly acquired validation set and the KL divergence of the training set distribution after deployment. When the divergence exceeds the preset threshold, it triggers the recalculation of the above four modules and outputs the updated weights and thresholds.