Construction method of intelligent prediction model for quality of macrobrachium based on random forest algorithm

By constructing an intelligent prediction model for the quality of prawns using the random forest algorithm, the problems of accuracy and efficiency in aquatic product quality prediction were solved. This model enabled accurate prediction of freezing processes and ice crystal morphology, providing theoretical support for process optimization.

CN122346830APending Publication Date: 2026-07-07HARBIN UNIV OF COMMERCE

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HARBIN UNIV OF COMMERCE
Filing Date
2026-04-09
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing methods for predicting the quality of aquatic products are difficult to capture the accurate relationship between data indicators, resulting in low efficiency and low prediction accuracy. In particular, under freezing conditions, the quality of aquatic products is affected by a variety of factors, and the data collection process is easily affected by noise interference.

Method used

A random forest algorithm was used to construct an intelligent prediction model for the quality of prawns. Through feature evaluation and SHAP interpretation analysis, a multivariate feature prediction model was established among ultrasonic-assisted immersion freezing process parameters, ice crystal morphology parameters and quality evaluation indicators, revealing the influence weight and nonlinear response characteristics of each parameter on quality.

Benefits of technology

It achieves accurate and efficient prediction of frozen quality indicators, reveals the intrinsic mechanism of ultrasonic parameter regulation of ice crystal morphology on quality, provides a clear target for process optimization, and the model has excellent performance and good generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122346830A_ABST
    Figure CN122346830A_ABST
Patent Text Reader

Abstract

The application provides a method for constructing an intelligent prediction model for the quality of frozen prawns based on a random forest algorithm. The method combines test data of ultrasonic-assisted immersion frozen prawns, ice crystal morphology detection data, and quality index detection data, and establishes a multivariate characteristic quality prediction model based on the random forest algorithm between the ultrasonic-assisted immersion frozen process parameters, the ice crystal morphology parameters, and the quality evaluation indexes, so as to realize accurate and efficient prediction of the frozen quality indexes. In combination with SHAP explanation and analysis, the influence weight and the nonlinear response characteristics of each parameter in the prediction model on the quality indexes are quantified, the interactive influence of each parameter characteristic on the quality is analyzed, the internal mechanism that the ultrasonic parameters control the ice crystal morphology and then affect the quality is revealed, and a clear target is provided for process optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of aquatic product quality prediction technology, and in particular to a method for constructing an intelligent prediction model for the quality of prawns based on the random forest algorithm. Background Technology

[0002] Machine learning, as a core method for achieving artificial intelligence, has demonstrated powerful data processing and analytical capabilities in many fields. Based on mathematical models, machine learning can autonomously learn from massive amounts of data, discover potential correlations within the data, and complete prediction or decision-making tasks for unknown data. It has a strong fitting ability for complex nonlinear relationships and high-dimensional data, enabling accurate and efficient predictions. The Random Forest (RF) algorithm, by building a large number of differentiated and independent decision trees, aggregates the prediction results of these trees, thereby improving the model's generalization ability and reducing the risk of overfitting. It is now gradually being applied in fields such as aquaculture, environmental monitoring, and intelligent monitoring of aquatic product quality.

[0003] The quality of aquatic products is influenced by various factors, including freezing process conditions, resulting in complex relationships between indicators. Data collection is susceptible to noise interference from sensor errors, environmental fluctuations, and individual sample differences, making quality prediction challenging. Existing prediction methods struggle to accurately capture the relationships between data indicators, exhibiting low efficiency and accuracy. Utilizing the random forest algorithm to build a prediction model can establish nonlinear relationships between multi-factor data interactions, improving the accuracy of quality prediction. Furthermore, feature evaluation can analyze key factors affecting aquatic product quality, providing support for optimizing process parameters.

[0004] To further analyze the interrelationship between freezing process, ice crystal morphology, and shrimp quality, this study combines experimental data from ultrasound-assisted immersion freezing of shrimp, ice crystal morphology detection data, and quality index detection data. Based on the random forest algorithm, a multivariate characteristic quality prediction model is established to predict the freezing quality indicators accurately and efficiently. Using SHAP (SHapley Additive ex Planations) interpretation analysis, the influence weights and nonlinear response characteristics of each parameter in the prediction model on the quality indicators are quantified. The interactive influence of each parameter on quality is analyzed, revealing the intrinsic mechanism by which ultrasound parameters regulate ice crystal morphology and thus affect quality, providing a clear target for process optimization. Summary of the Invention

[0005] The purpose of this invention is to solve the problems in the prior art and to propose a method for constructing an intelligent prediction model for the quality of prawns based on the random forest algorithm.

[0006] This invention is achieved through the following technical solution: This invention proposes a method for constructing an intelligent prediction model for the quality of prawns based on the random forest algorithm, the method comprising: Data preparation and feature selection, and based on the objectives of the prediction model, data are collected and organized into a dataset in conjunction with relevant experimental and detection results, and the data in the dataset are preprocessed; A prediction model for freezing process-ice crystal equivalent diameter is constructed using ultrasonic power, freezing rate and phase transition time as inputs and ice crystal equivalent radius as output. An ice crystal morphology-water holding capacity prediction model was constructed using ice crystal equivalent diameter, roundness, and stretchability as inputs and water holding capacity as output. Principal component analysis was used to perform dimensionality reduction and classification on the freezing parameters, ice crystal morphology characteristics, and quality evaluation index data of ultrasonic-assisted immersion frozen shrimp. The dimensionality-reduced parameters were used as input features and the sensory scores of the samples were used as output variables to construct a random forest regression prediction model.

[0007] Furthermore, in the freezing process-ice crystal equivalent diameter prediction model, the random forest algorithm has 300 decision trees, and the maximum depth of each decision tree is 10; 70% of the sample data is used as the training set and 30% as the test set.

[0008] Furthermore, in the ice crystal morphology-water retention prediction model, the random forest algorithm has 300 decision trees, with a maximum depth of 7 for each decision tree; 70% of the sample data is used as the training set and 30% as the test set.

[0009] Furthermore, the freezing parameters include ultrasonic power, freezing rate, and phase transition time; ice crystal morphology characteristics include equivalent diameter, roundness, and stretchability; and quality evaluation indicators include color difference, chewiness, elasticity, hardness, cohesion, water holding capacity, TVB-N, cooking loss, and thawing loss, totaling 15 characteristic indicators.

[0010] Furthermore, the principal component analysis method specifically involves: firstly, standardizing the data to eliminate the influence of data dimensions; calculating the covariance matrix based on the obtained standardized matrix; calculating eigenvalues ​​based on the covariance matrix and arranging them in order to calculate the corresponding eigenvectors; then calculating the principal component scores, principal component contribution rates, and cumulative contribution rates; finally, selecting principal components with eigenvalues ​​greater than 1 and cumulative contribution rates greater than 85% as the new feature data results after dimensionality reduction.

[0011] Furthermore, principal components PC1 and PC2 with eigenvalues ​​greater than 1 were selected for analysis. PC1 focused on core quality deterioration and ice crystal morphology, while PC2 focused on texture and process parameters. PC1 and PC2 were used to replace the above 15 indicators to evaluate the freezing process, ice crystal morphology, and quality indicators of the shrimp.

[0012] Furthermore, using the principal component scores of PC1 and PC2 in the principal component analysis results as feature inputs and the sensory scores of ultrasonic-assisted soaking and freezing of prawns as output indicators, a comprehensive prawn quality prediction model, namely the random forest regression prediction model, is constructed.

[0013] Furthermore, in the random forest regression prediction model, the random forest algorithm has 500 decision trees, and the maximum depth of each decision tree is 10; 70% of the sample data is used as the training set and 30% as the test set.

[0014] The present invention also proposes an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method for constructing the intelligent prediction model for the quality of prawns based on the random forest algorithm.

[0015] The present invention also proposes a computer-readable storage medium for storing computer instructions, which, when executed by a processor, implement the steps of the method for constructing the intelligent prediction model for the quality of prawns based on the random forest algorithm.

[0016] The beneficial effects of this invention are: This invention studies a method for quality prediction of ultrasound-assisted frozen prawns. A quality prediction model covering freezing process, ice crystal morphology, and quality indicators is constructed using a random forest algorithm. Combined with SHAP interpretability analysis, the complex relationships and control mechanisms among various parameters are analyzed, leading to the following conclusions: 1. A model for predicting the equivalent diameter of ice crystals during freezing was constructed using ultrasonic power, freezing rate, and phase transition duration as inputs, and ice crystal equivalent radius as output. The training set R² = 0.997 and the test set R² = 0.963, indicating excellent model performance with no significant overfitting. Combined with SHAP analysis, the feature importance ranking was: freezing rate > ultrasonic power > phase transition duration. The freezing rate was negatively correlated with ice crystal diameter, with a critical threshold of 0.10℃ / s; exceeding this threshold significantly refined the ice crystals. Ultrasonic power exhibited a non-monotonic effect; below 150 W, cavitation refined the ice crystals, while above 200 W, thermal effects caused coarsening. Phase transition duration was positively correlated, but ultrasonic power could offset its negative effect on promoting ice crystal coarsening, and there was a synergistic refining effect between freezing rate and ultrasonic power.

[0017] 2. An ice crystal morphology-water-holding capacity prediction model was constructed using ice crystal equivalent diameter, roundness, and stretchability as inputs and water-holding capacity as output. The training set R² = 0.964 and the test set R² = 0.863, indicating strong model reliability and no significant overfitting. Combined with SHAP analysis, the feature importance ranking was: equivalent diameter > roundness > stretchability. Equivalent diameter is negatively correlated with water-holding capacity; roundness is positively correlated with water-holding capacity; stretchability is negatively correlated with water-holding capacity. Regarding interaction effects, roundness can buffer the negative effects of large-diameter ice crystals, while stretchability amplifies their destructive impact.

[0018] 3. Principal component analysis (PCA) was used to reduce the dimensionality of 15 feature data covering freezing processes, ice crystal morphology, and quality indicators, extracting two principal components, PC1 and PC2. PC1 focuses on core quality deterioration and ice crystal morphology, while PC2 focuses on texture and process parameters. The cumulative variance contribution rate of the two is 86.27%. A comprehensive quality prediction model was constructed using PC1 and PC2 as inputs and sensory scores as outputs. The training set R²=0.973 and the test set R²=0.917, indicating good generalization performance. Combined with SHAP analysis, PC1 has a significantly greater impact on sensory scores than PC2. An increase in PC1 value decreases the score, while the effect of PC2 is non-linear; under different combinations, it can synergistically improve sensory performance or exacerbate the score decline.

[0019] Through the construction and analysis of the above three-level models, the mechanism by which process parameters regulate ice crystal morphology during ultrasonic-assisted impregnation and freezing, and how ice crystal morphology determines quality, has been revealed. The key control nodes of key parameters have been identified, providing theoretical support for process optimization and quality assurance. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0021] Figure 1 This is a schematic diagram illustrating the principle of the Random Forest algorithm.

[0022] Figure 2 A comparison of predicted and actual values ​​from the process-diameter prediction model, along with a residual distribution diagram.

[0023] Figure 3 This is a schematic diagram illustrating the importance of features in the process-diameter prediction model.

[0024] Figure 4 The SHAP beehive diagram is used for the process-diameter prediction model.

[0025] Figure 5 The SHAP dependency graph for the process-diameter prediction model features: a) freezing rate; b) ultrasonic power; c) phase transition duration.

[0026] Figure 6 The SHAP interaction diagram for the process-diameter prediction model features: a) Ultrasonic power-freezing rate; b) Ultrasonic power-phase transition duration; c) Freezing rate-phase transition duration.

[0027] Figure 7 This is a SHAP heatmap of the process-diameter prediction model features.

[0028] Figure 8 A comparison of predicted and actual values ​​from the ice crystal-water retention prediction model, along with a residual distribution diagram.

[0029] Figure 9 This is a schematic diagram illustrating the importance of features in the ice crystal-water retention prediction model.

[0030] Figure 10 The SHAP beehive diagram is used to represent the features of the ice crystal-water retention prediction model.

[0031] Figure 11 SHAP dependency plot for the ice crystal-water holding capacity prediction model: a) equivalent diameter; b) roundness; c) stretching.

[0032] Figure 12 The SHAP interaction diagram for the ice crystal-water holding capacity prediction model features: a) equivalent diameter-roundness; b) equivalent diameter-stretchability; c) stretchability-roundness.

[0033] Figure 13 The SHAP heatmap is a feature of the ice crystal-water retention prediction model.

[0034] Figure 14 This is a schematic diagram of the correlation analysis of sample indicators.

[0035] Figure 15 Here are scree plots: a) Eigenvalue scree plot; b) Variance contribution rate scree plot.

[0036] Figure 16 This is a comparison of predicted and actual values ​​from a comprehensive quality prediction model, along with a residual distribution diagram.

[0037] Figure 17 This is a schematic diagram illustrating the importance of features in the comprehensive quality prediction model.

[0038] Figure 18 The SHAP bee colony diagram is used as a feature of the comprehensive quality prediction model.

[0039] Figure 19 The SHAP dependency graph for the comprehensive quality prediction model; a) PC1; b) PC2.

[0040] Figure 20 This is an interactive diagram of the SHAP (Self-Protected Achievements and Predictions) model for comprehensive quality prediction.

[0041] Figure 21 This is a SHAP heatmap of the comprehensive quality prediction model. Detailed Implementation

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

[0043] Random forest algorithms improve model performance through collaborative decision-making across multiple decision trees; they are ensemble classification and regression methods based on the Bagging strategy. The construction of a random forest model can be divided into four steps: random sample sampling, random feature selection, parallel generation of multiple trees, and ensemble decision-making (e.g., ...). Figure 1 (As shown). Random sampling ensures sample diversity. The randomness of features further enhances the differences between decision trees, avoiding a single feature dominating the splitting process of all decision trees, reducing the model's dependence on specific features, and diversifying the overfitting tendency of individual decision trees, which can then cancel each other out after ensemble. The growth process of decision trees follows the principle of complete growth, fully fitting and training the data. The predicted values ​​of all decision trees are combined to form the final model output. The category that appears most frequently among all the predicted categories of all decision trees is used as the prediction result for the classification problem; the average of the predicted values ​​of all decision trees is used as the final result for the regression problem.

[0044] The quality of ultrasonic-assisted immersion frozen prawns is influenced by multiple factors, including the prawn's own meat characteristics and processing and storage conditions. Significant synergistic or restrictive relationships exist among the indicator parameters, making prediction difficult and complex. Analysis of previous experimental results revealed that the core process parameters of ultrasonic-assisted immersion freezing, such as ultrasonic power, freezing rate, and phase transition time, do not act independently but exhibit certain interactive effects, making them difficult to quantify using linear relationships. Ultrasonic power shows a significant threshold effect on ice crystals. Different ice crystal parameters also have synergistic effects on prawn quality. During the experiments, it was also found that the varying states of the prawns easily lead to relatively large data dispersion. Different indicators may exhibit complex patterns such as saturation and threshold effects during prawn freezing, making them unsuitable for fitting with traditional linear models. Quality indicators include both continuous and discrete variables, resulting in complex data and poor comparability between indicators. Sensory evaluation and instrument testing during quality detection also generate noisy data, affecting model accuracy. Furthermore, limited by equipment load and sample preparation costs, the collection and statistical analysis of quality prediction features are typically conducted in small-sample scenarios. These factors all make it impossible for traditional forecasting methods to meet the need for accurate forecasting.

[0045] The random forest algorithm effectively handles the synergistic effects between multiple features by constructing multiple decision trees to capture these complex interactions. It exhibits high tolerance for individual differences in frozen shrimp and detection noise, demonstrating good model stability, especially robustness when handling mixed-type features and small sample data. It requires no complex data preprocessing, directly processing raw data. Furthermore, in small sample cases, the bootstrap sampling and multi-tree combination approach helps avoid overfitting to some extent, ensuring the model's generalization ability. Therefore, the random forest algorithm has significant advantages in this invention. It effectively handles nonlinear relationships between features and small sample data for accurate prediction. Combined with SHAP interpretation, feature importance analysis and feature interaction analysis provide more valuable information for research, strongly supporting the construction of accurate quality prediction models.

[0046] Construction and evaluation of random forest algorithm prediction models 1. Data preparation and feature selection Data preparation and feature engineering are fundamental steps in building machine learning models. Through systematic feature selection and data preprocessing, raw experimental data can be transformed into structured information that meets the requirements of model input, providing high-quality data support for subsequent model training.

[0047] When constructing a random forest quality prediction model, the proper definition of input and output features is crucial to the model's predictive performance and interpretability. The selection of input features should be based on the correlation between ultrasonic power, ice crystal morphology, and product quality. The selection of output features should focus on the core qualities of the experiment, and these indicators need to comprehensively and accurately reflect the product's quality status.

[0048] 2. Data Preprocessing Data preprocessing improves data quality and usability, providing a reliable data foundation for model training and validation. Based on the predictive model's objectives, data is collected and organized into a dataset using relevant experimental and detection results. DMSAS software is used to preprocess the experimental data, performing data cleaning through methods such as missing value checking, outlier identification, and duplicate data removal. The dataset is then divided into training and test sets according to practical needs. This ensures the training set has sufficient data for model learning, while the test set effectively evaluates the model's generalization ability.

[0049] 3. Model Building In the Anaconda environment, PyCharm is used as the integrated development environment to write and run Python code to build and optimize the parameters of the random forest prediction model. Combined with the SHAP library, the prediction logic of the model is analyzed through SHAP values ​​to complete the interpretability analysis of the model and reveal the key influencing features and their laws of action.

[0050] 4. Model Performance Evaluation Model performance evaluation is a crucial aspect of evaluating random forest prediction models. Through scientific indicator analysis and data validation, the model's prediction accuracy, stability, and generalization ability are comprehensively measured, providing a reliable basis for its practical application.

[0051] (1) Evaluation indicators ① The coefficient of determination (R²) measures the model's ability to explain the variation in the target variable. The formula is as follows: (1) in, For the true value, For predicted values, This is the mean of the true values. The value range is (-∞, 1], and the closer it is to 1, the better the model fit. When = 1, the model perfectly fits the data; when When the value is ≤0, it indicates that the model's performance is inferior to the baseline model that simply takes the mean.

[0052] ②Mean Squared Error (MSE): Measures the average of the squared errors between the predicted and actual values. The formula is: (2) MSE is sensitive to outliers and can amplify the impact of large errors. It is suitable for scenarios where extreme deviations need to be focused on. The smaller the value, the higher the model prediction accuracy.

[0053] ③Mean Absolute Error (MAE): Measures the average absolute error between the predicted and actual values. The formula is: (3) MAE is less sensitive to outliers than MSE and better reflects the average level of prediction error; the smaller the value, the smaller the overall bias of the model.

[0054] ④ Mean Absolute Percentage Error (MAPE): This measures error as a percentage, reflecting the relative magnitude of the deviation, and allows for comparisons across orders of magnitude.

[0055] (4) (2) SHAP Interpretation and Analysis SHAP (Shape Analysis and Interpretation) is a game theory-based method for analyzing model interpretability. It transforms the model's predictions into the contribution value of each feature, quantifying the influence of individual features on the prediction results. It comprehensively analyzes the black-box model in the Random Forest algorithm from aspects such as feature importance and influence trends, feature interpretation of individual samples, and the synergistic effect of feature combinations. SHAP interpretation visualization analysis can be performed using forms such as feature importance graphs, bee colony graphs, heatmaps, feature dependency graphs, and feature interaction graphs.

[0056] I. Construction and Analysis of Predictive Model for Freezing Process and Equivalent Ice Crystal Diameter To better understand the relationship between freezing process parameters and key ice crystal indicators during ultrasonic-assisted impregnation freezing, a regression prediction model (hereinafter referred to as the process-diameter prediction model) was constructed based on freezing experiments. The model used three parameters—ultrasonic power, freezing rate, and phase transition time—as input features, and the equivalent diameter of the ice crystals as the output feature. A random forest algorithm with 300 decision trees and a maximum depth of 10 trees was used. 70% of the sample data was used as the training set, and 30% as the test set.

[0057] Predictive model performance analysis The model evaluation parameters are shown in Table 1. The comparison between model predictions and actual values, and the residual distribution are shown in Table 1. Figure 2 As shown.

[0058] Table 1 Performance Indicators of the Process-Diameter Prediction Model

[0059] As shown in the chart, the training set R 2 =0.997, test set R2 =0.963, indicating that the model fits the training data very well and adequately fits the complex relationship between input parameters and output. The error is within a reasonable range, and the overall deviation of the predicted values ​​is controllable. The small difference between the indicators of the training set and the test set indicates that the model has no obvious overfitting, good generalization ability, and relatively stable prediction ability for unknown samples, providing a relatively reliable predictive basis for the SHAP interpretation.

[0060] SHAP-based prediction model explanation By quantifying the contribution of features to the model output, the model prediction results are analyzed from three dimensions: feature importance, single feature effect, and feature interaction effect. This reveals the intrinsic relationship between freezing process parameters and ice crystal equivalent diameter, providing an interpretable basis for process optimization.

[0061] Feature Importance Analysis The influence of process parameter characteristics on equivalent diameter was quantified by the mean absolute SHAP value. The importance of the characteristics showed that the freezing rate > ultrasonic power > phase transition time. Figure 3 As shown. The importance analysis results are consistent with the experimental process and expectations. The freezing rate directly determines the ice crystal growth process, with the most significant effect on the control of the equivalent diameter. Ultrasonic power affects ice crystal growth through cavitation, but there is a power threshold limitation in actual freezing processes. Too low a power has little effect, while too high a power can easily trigger thermal effects. The phase transition duration reflects the time window for ice crystal growth; the longer the duration, the easier it is for ice crystals to grow, but its influence is relatively weak due to the indirect constraints of the freezing rate and ultrasound.

[0062] Feature Influence Analysis (1) The effect of a single feature on the equivalent diameter By analyzing the SHAP bee colony diagram ( Figure 4 ) and dependency graph ( Figure 5 Analysis reveals that freezing rate, ultrasonic power, and phase transition duration have significant nonlinear and critical effects on the equivalent diameter of ice crystals.

[0063] Figure 4 In the figure, freezing rate and equivalent ice crystal diameter (SHAP) show a clear negative correlation. When the freezing rate is low, the corresponding SHAP values ​​are mostly positive, indicating that the lower freezing rate prolongs the ice crystal growth time and promotes diameter increase. The SHAP values ​​corresponding to ultrasonic power in the figure are red and blue, indicating that the effect of ultrasonic power exhibits a more complex non-monotonic characteristic. Phase transition duration shows a continuous positive correlation.

[0064] Figure 5The results show that when the freezing rate exceeds the critical threshold (0.1 ℃ / s), the SHAP value turns negative, indicating that rapid freezing shortens the time, significantly inhibiting crystal growth and resulting in ice crystal refinement. This demonstrates the controlling effect of rapid freezing on the formation of small ice crystals. The effect of ultrasonic power exhibits a threshold effect. In the power range below 150 W, the SHAP value is negative, indicating that cavitation promotes nucleation and refinement. When the power is between 150 W and 200 W, the SHAP value is close to zero, indicating that the positive and negative effects are close to equilibrium. When the power exceeds 200 W, the SHAP value turns positive, reflecting that mechanical and thermal effects become the dominant factors, leading to ice crystal coarsening. This result clearly indicates that there is an optimal power range for ultrasonic power. A negative SHAP value corresponds to a phase transition time below 150 s, which is beneficial for reducing the equivalent diameter of ice crystals; exceeding this critical time, the SHAP value becomes significantly positive, indicating that prolonged time significantly promotes an increase in the equivalent diameter of ice crystals. Therefore, the influence of each process parameter on ice crystal size exhibits significant nonlinearity and criticality.

[0065] (2) The influence of interaction features on equivalent diameter Figure 6 This is a SHAP feature interaction graph. It reflects the nonlinear coupling mechanism that combines synergistic and antagonistic effects between pairs of features.

[0066] like Figure 6 As shown in Figure a), there is a significant interaction effect between ultrasonic power and freezing rate. When the ultrasonic power is low and the freezing rate is high, the SHAP value is negative, indicating that this combination reduces the ice crystal diameter. When the ultrasonic power is high and the freezing rate is low, the SHAP value is positive, indicating that this combination increases the ice crystal diameter. Therefore, ultrasonic power and freezing rate need to be controlled synergistically. To obtain smaller ice crystals, parameters of low ultrasonic power and high freezing rate should be used in combination. Figure 6 (b) There is also an interaction between ultrasonic power and phase transition duration. When the ultrasonic power is in the medium range and the phase transition duration is short, the SHAP value is mostly negative, which is beneficial for ice crystal refinement. Even when combined with a relatively short phase transition time, lower ultrasonic power results in a positive SHAP value, which is detrimental to ice crystal refinement. When high ultrasonic power is combined with a long phase transition duration, the SHAP value is positive, which may lead to ice crystal coarsening. Therefore, controlling the phase transition duration to be short and combined with medium ultrasonic power can effectively inhibit ice crystal growth. The relationship between freezing rate and phase transition duration is as follows... Figure 6 As shown in c), the combination of a high freezing rate and a short phase transition time results in a negative SHAP value, indicating a significant reduction in ice crystal size. Conversely, the combination of a low freezing rate and a long phase transition time results in a positive SHAP value, leading to an increase in ice crystal size. Therefore, increasing the freezing rate and shortening the phase transition time are key strategies for controlling ice crystal refinement.

[0067] Figure 7This is a sample SHAP heatmap. The graph reveals the contribution patterns and combined effects of various process parameters on the equivalent diameter of ice crystals. For freezing rate, the predominance of red bars indicates that some freezing rates significantly increase the predicted value. Blue bars also exist, indicating that some freezing rates decrease the predicted value. Overall, this feature has a significant impact on model predictions. The contribution of ultrasonic power exhibits a non-monotonic characteristic. The alternating red and blue bars indicate that ultrasonic power has both positive and negative effects on the prediction, with relatively moderate magnitudes. For phase transition duration, blue bars constitute a larger proportion, indicating that the phase transition duration in most cases significantly reduces the predicted value. The model's average output value f(x) decreases across all samples, corresponding to a reduction in ice crystal size, clearly pointing to a highly efficient process combination: a high freezing rate, moderate ultrasonic power, and a short phase transition duration. This result provides quantitative evidence for a process route combining rapid freezing with moderate-intensity ultrasonic treatment and a limited phase transition time, demonstrating that multi-parameter synergistic regulation can effectively suppress ice crystal growth and achieve precise tissue control.

[0068] II. Construction and Analysis of a Predictive Model for Ice Crystal Morphology and Water Holding Capacity of Prawns To analyze the impact of ice crystal morphology on key quality indicators of prawns, based on correlation analysis results, the water-holding capacity index, which has the most significant interaction with ice crystal morphology, was selected for analysis. A regression prediction model (hereinafter referred to as the ice crystal-water-holding capacity model) was constructed using ice crystal equivalent diameter, roundness, and stretchability as input features and water-holding capacity as the output indicator. A random forest algorithm with 300 decision trees and a maximum depth of 7 trees was used. 70% of the sample data was used as the training set, and 30% as the test set.

[0069] Predictive model performance analysis The model evaluation parameters are shown in Table 2. The comparison between model predictions and actual values, and the residual distribution are shown in Table 2. Figure 8 As shown.

[0070] Table 2 Performance Indicators of Ice Crystal-Water Holding Capacity Prediction Model

[0071] Training set R 2 =0.964, indicating that the model has a strong ability to explain the nonlinear relationship between input features and water-holding capacity, and can capture the core regulatory law of the three factors on water-holding capacity; test set R 2=0.863, proving the model's good generalization performance. Although the error index increased, the overall bias remained within a reasonable range, demonstrating the model's reliable predictive performance. The scatter plots of predicted and true values ​​closely followed the fitted line, showing no significant deviation trend. The residual distribution shows that the absolute values ​​of the residuals are concentrated in a small range and are symmetrically distributed, indicating that the model's prediction error is stable and there is no systematic bias. This lays a reliable foundation for subsequent analysis of feature effects.

[0072] SHAP-based prediction model explanation Feature Importance Analysis The influence of ice crystal morphology on water-holding capacity was quantified by mean absolute SAP value (e.g.) Figure 9 As shown in the figure, the importance of features is as follows: equivalent diameter > roundness > stretchability. This indicates that the size of ice crystals directly determines the degree of mechanical damage to cells, while the influence of shape parameters (roundness, stretchability) is more indirect.

[0073] Feature Influence Analysis (1) The influence of a single characteristic on water holding capacity Single-feature effect analysis revealed the mechanism by which ice crystal morphology parameters affect water holding capacity. Equivalent diameter, as a key feature, showed a significant negative correlation with water holding capacity: [Honeycomb diagram (...]] Figure 10 The SAP values ​​corresponding to high equivalent diameters are mostly negative, indicating that the equivalent diameter reduces water-holding capacity. Roundness shows a positive effect, with high roundness samples in the swarm diagram mostly having positive SAP values. Stretchability, on the other hand, is negatively correlated with water-holding capacity, with high stretchability corresponding to negative SAP values ​​in the swarm diagram.

[0074] Dependency graph ( Figure 11 Further analysis shows that as the equivalent diameter increases from 60 μm to 180 μm, the SHAP value decreases from 6 to -4, indicating that with the increase of equivalent diameter, the effect of this characteristic on water-holding capacity changes from positive promotion to negative inhibition. The mechanism is that larger diameter ice crystals are more likely to mechanically compress or even puncture cell membranes during freezing, leading to loss of cell structural integrity, outflow of intracellular water, and thus weakening water-holding capacity. When roundness increases from 0.2 to 0.9, the SHAP value changes from negative to positive, indicating that improved roundness helps maintain or improve water-holding capacity. High roundness represents ice crystal morphology tending towards regularity (e.g., approximately spherical), and these ice crystals have a more moderate interfacial effect in tissues, reducing cell wall scratches and structural tears, which is beneficial for water retention. Strength, on the other hand, is negatively correlated with water-holding capacity. As the dependence figure shows, with the increase of stretchness, the SHAP value changes from positive to negative, indicating that this morphological characteristic exacerbates the loss of water-holding capacity. It is likely that the irregular shapes represented by high tensile strength (such as needle-shaped or elongated ice crystals) are more likely to penetrate cells, expand the damaged area, and promote water exudation.

[0075] (2) The influence of interaction characteristics on water holding capacity Interaction effect analysis further revealed the synergistic or antagonistic effects between ice crystal morphological characteristics, such as Figure 12 As shown.

[0076] The interaction between equivalent diameter and roundness is as follows: Figure 12 As shown in (a), when ice crystals are small and highly rounded, the SHAP value is positive, which is most beneficial to water retention. Small, round ice crystals cause the least damage to cell structure. When ice crystals are large and have low roundness, the SHAP value is negative, which is most detrimental to water retention. Large, irregular ice crystals are the most harmful. For large ice crystals, improving their roundness can partially offset the negative effects of their size. This indicates that roundness is an important compensating factor. Therefore, when ice crystal growth cannot be avoided, their shape should be made as round as possible to reduce damage to water retention.

[0077] The interaction between equivalent diameter and tensile strength, such as Figure 12 As shown in b), when the ice crystal size is small, even with changes in stretchability, the SAP value remains close to or slightly above zero, indicating a neutral or slightly positive effect on water retention. Small ice crystals are inherently beneficial for water retention. When the ice crystal size is large and the stretchability is also high, the SAP value decreases significantly, having a strong negative impact on water retention. Large and long ice crystals are more likely to puncture cell structures, leading to water loss. Therefore, avoiding the formation of large and long ice crystals is key to maintaining high water retention. Since the negative impact of large ice crystals is more significant, controlling ice crystal size is more important than controlling shape.

[0078] The interaction between roundness and stretchability, such as Figure 12 As shown in c), high roundness can almost offset the negative impact of stretching. The most detrimental situation to water retention is low roundness and high stretching, i.e., long and irregular ice crystals, which will lead to a sharp drop in water retention. In process control, ensuring the roundness of ice crystals should be prioritized, as this can effectively buffer the problems caused by other morphological defects.

[0079] Model Feature SHAP Heatmap ( Figure 13Further verification clarified the core role of equivalent diameter in predicting water-holding capacity. The color gradient change corresponding to equivalent diameter in the heatmap was the most significant, intuitively reflecting the large fluctuation range of its SHAP value, and highly synchronized with the fluctuations of the model's predicted output curve. This indicates that the predicted changes in water-holding capacity among different samples are mainly driven by differences in equivalent diameter, further confirming the status of equivalent diameter as the most critical influencing factor. The coloring of roundness and stretchability in the heatmap is relatively flat, indicating their weak independent effects, but their color distribution still shows a coupling pattern with equivalent diameter, suggesting that roundness and stretchability regulate the intensity of the equivalent diameter's effect through an interaction mechanism. Therefore, the core source of fluctuation in the water-holding capacity model is ice crystal size, while shape features (roundness, stretchability) indirectly affect the final water-holding performance by modulating the manifestation of the size effect. This finding is also consistent with the previous results of feature importance ranking.

[0080] III. Construction and Analysis of a Comprehensive Model for Predicting the Quality of Ultrasonic-Assisted Immersion-Frozen Prawns Predictive model construction and index analysis revealed a complex nonlinear interaction between freezing parameters, ice crystal morphology characteristics, and shrimp quality indicators. To further understand the mutual influence between various parameters and shrimp quality, principal component analysis (PCA) was used to perform dimensionality reduction and classification on the data of freezing parameters, ice crystal morphology characteristics, and quality evaluation indicators of ultrasonically assisted frozen shrimp. Using the dimensionality-reduced main parameters as input features and the sensory scores of the samples as output variables, a random forest regression prediction model was constructed.

[0081] Original data sources and data processing To comprehensively cover the quality evaluation indicators of ultrasound-assisted immersion frozen shrimp, this invention selects specific characteristic indicators from three aspects: freezing process, ice crystal morphology, and quality evaluation indicators. The freezing process parameters include ultrasonic power, freezing rate, and phase transition time; ice crystal morphology characteristics include equivalent diameter, roundness, and stretchability; and the quality evaluation indicators include color difference, chewiness, elasticity, hardness, cohesion, water holding capacity, TVB-N, cooking loss, and thawing loss, totaling 15 characteristic indicators. Principal component analysis was performed using DMSAS.

[0082] Statistical descriptive analysis of data Statistical descriptive analysis was performed on the measured data of various indicators of the samples, and the results are shown in Table 3.

[0083] Table 3 Statistical Descriptive Analysis of Sample Indicators

[0084] As can be seen from Table 3, the indicators of each type of sample cover a wide range of values ​​and are relatively continuous in distribution, which are representative of the processing parameters, ice crystal morphology and quality indicators of ultrasonic-assisted immersion frozen shrimp.

[0085] Correlation analysis Correlation analysis was performed on 15 indicators related to freezing process, ice crystal morphology, and quality evaluation. The results are as follows: Figure 14 As shown in the figure, most of the pairwise correlation coefficients of the sample indicators are greater than 0.7, indicating multicollinearity among the features and redundancy among the feature data. Although the random forest model has a high tolerance for feature multicollinearity, it may still increase the computational load, slow down the model training speed, and cause inaccurate importance assessment. Therefore, it is necessary to perform dimensionality reduction on the data.

[0086] Principal component analysis PCA is a commonly used data processing method that projects high-dimensional data into a lower-dimensional space, extracts the main features, reduces model complexity, and transforms data that originally had some correlation into a set of uncorrelated principal components. These principal components retain most of the information from the original data while eliminating redundancy and noise. If the parameters obtained from principal component analysis are used as input features for random forests, most of the data information can be preserved while reducing model complexity, making model training faster and more stable.

[0087] The PCA algorithm is implemented through the following steps: First, the data is standardized to eliminate the influence of data dimensions; then, the covariance matrix is ​​calculated based on the standardized matrix; eigenvalues ​​are calculated based on the covariance matrix and arranged in order to calculate the corresponding eigenvectors; next, the principal component scores, principal component contribution rates, and cumulative contribution rates are calculated; finally, principal components with eigenvalues ​​greater than 1 and cumulative contribution rates greater than 85% are selected as the new feature data results after dimensionality reduction. The PCA analysis results are shown in Table 4.

[0088] Table 4 Principal Component Eigenvalues

[0089] The principal components were sorted based on the calculated eigenvalues. The cumulative variance contribution rate of the top eight principal components reached 99%, and these top eight principal components are listed in Table 4. The larger the eigenvalue, the more original information the principal component contains. Principal components with eigenvalues ​​greater than 1 (PC1 and PC2) were selected for analysis. Their cumulative variance contribution rate reached 86.27%, indicating that these two principal components can explain most of the data. The eigenvalue scree plot (…) Figure 15 As can be seen in section a), the eigenvalues ​​of PC1 to PC2 drop sharply, while the decrease from PC2 to PC3 slows down, and the eigenvalue of PC3 is less than 1. (Variance contribution rate scree plot) Figure 15After the first two principal components in (b)), the cumulative curve growth rate decreases significantly and tends to flatten, indicating that the first two components have captured the core information of the data. Therefore, PC1 and PC2 can be used to replace the above 15 indicators to evaluate the freezing process, ice crystal morphology, and quality indicators of the prawns.

[0090] To further analyze the influence of each indicator on principal components PC1 and PC2, the principal component loading matrix needs to be used for interpretation. The larger the absolute value of the loading, the stronger the correlation between the indicator and the principal component, and the higher its contribution. The sign of the loading indicates whether the indicator is positively or negatively correlated with the principal component. The results of the principal component loading matrix analysis are shown in Table 5.

[0091] Table 5 Principal Component Loading Matrix

[0092] Table 5 shows that the positive loads closely related to PC1 include ΔE, TVB-N, thawing loss, equivalent diameter, and tensile strength; the loads related to PC2 include elasticity and water holding capacity. The positive loads closely related to PC2 include cooking loss, phase transition time, and roundness; the loads related to PC2 include chewiness, cohesion, ultrasonic power, hardness, and freezing rate. PC1 focuses on core quality deterioration and ice crystal morphology, while PC2 focuses on texture and freezing process parameters. These two principal components can reflect the quality of frozen shrimp to a certain extent.

[0093] Construction and evaluation of random forest models A comprehensive quality prediction model for prawns was constructed using the principal component scores of PC1 and PC2 in the principal component analysis results as feature inputs and the sensory scores of ultrasound-assisted soaking and freezing prawns as output indicators. A random forest algorithm with 500 decision trees and a maximum depth of 10 per tree was used. 70% of the sample data was used as the training set, and 30% as the test set.

[0094] Predictive model performance analysis The model evaluation parameters are shown in Table 6. The comparison between model predictions and actual values, and the residual distribution are shown in Table 6. Figure 16 As shown.

[0095] Table 6 Performance Indicators of the Comprehensive Quality Prediction Model

[0096] Training set R 2 =0.973, indicating that the model has a strong ability to explain the nonlinear relationship between input features and sensory ratings, and can capture the core regulatory laws of principal components on sensory ratings. Test set R 2=0.917, proving the model's good generalization performance. The error index is within a reasonable range, proving the model's reliable predictive performance. The scatter plots of predicted and true values ​​closely follow the fitted line, with no obvious deviation trend. The absolute values ​​of the residuals are concentrated in a small range and are symmetrically distributed, indicating that the model's prediction error is stable and there is no systematic bias. The model can effectively capture the nonlinear relationship between PC1, PC2, and sensory ratings, providing a reliable basis for subsequent interpretation.

[0097] SHAP-based prediction model explanation (1) Feature Importance Analysis like Figure 17 As shown, the average absolute SHAP value of PC1 is much higher than that of PC2, indicating that its impact on sensory scores is more significant. Combining the principal component loading data in Table 5, PC1 focuses primarily on core quality deterioration and ice crystal morphology, directly relating to ice crystal size and the appearance, freshness, and physical integrity of the shrimp, thus having a more critical impact. PC2 focuses on texture and freezing process parameters, which are mostly indirectly related to sensory scores. In particular, freezing process parameters have a high correlation with ice crystal morphology, influencing quality indicators through ice crystals. Therefore, PC2 has a lower overall average absolute SHAP value.

[0098] (2) Characteristic Influence Analysis ① The influence of single principal component features on sensory scores From the bee colony diagram ( Figure 18 As can be seen, when the PC1 eigenvalue is high, the SHAP value is mostly negative; when the eigenvalue is low, the SHAP value is mostly positive. Overall, there is a trend of "indicator deterioration → score reduction". The PC2 eigenvalue distribution is relatively concentrated, and the SHAP values ​​are alternating between positive and negative, making the impact more complex and requiring analysis in conjunction with dependency graphs.

[0099] SHAP Dependency Graph Figure 19 This indicates that the SHAP value decreases as PC1 increases, meaning that the deterioration of the indicator leads to a lower score, reflecting a linear negative relationship. The SHAP value of PC2 fluctuates more significantly, reflecting a more complex nonlinear interaction, and cannot be optimized by considering only one indicator.

[0100] ② The impact of interaction features on sensory ratings The interaction between PC1 and PC2, such as Figure 20As shown, when PC1 is low (indicator optimization) and PC2 is high (greater roundness, etc.), the SHAP value is positive (improving the score), indicating that the combination of "quality optimization + improved roundness" effectively enhances sensory performance. When PC1 is high (indicator deterioration) and PC2 is low (lower chewiness, lower cohesion, etc.), the SHAP value is negative (reducing the score), indicating that the synergistic effect of "quality deterioration + texture degradation" impairs sensory score characteristics. Core quality degradation, ice crystal morphology, texture, and freezing process parameters synergistically antagonize each other through indicators, jointly affecting sensory scores.

[0101] Figure 21 This is a heatmap of the SHAP features of the comprehensive quality prediction model. The horizontal axis shows the SHAP contributions of PC1 and PC2. PC1 has a stronger color contrast, while PC2 is generally lighter, indicating that the fluctuation of PC1's SHAP value has a greater impact and a much stronger influence on the model's prediction than PC2. The left half shows a predominantly negative contribution from PC1, resulting in lower model predictions. The right half shows a predominantly positive contribution from PC1, driving up model predictions. This indicates that changes in PC1 values ​​are the core driving factor behind the improvement in model predictions.

[0102] The present invention also proposes an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method for constructing the intelligent prediction model for the quality of prawns based on the random forest algorithm.

[0103] The present invention also proposes a computer-readable storage medium for storing computer instructions, which, when executed by a processor, implement the steps of the method for constructing the intelligent prediction model for the quality of prawns based on the random forest algorithm.

[0104] The memory in this application embodiment can be volatile memory or non-volatile memory, or it can include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory used in the methods described in this invention is intended to include, but is not limited to, these and any other suitable types of memory.

[0105] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).

[0106] In implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software. The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware processor, or by a combination of hardware and software modules in the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, detailed descriptions are omitted here.

[0107] It should be noted that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiments can be completed by the integrated logic circuitry in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied as execution by a hardware decoding processor, or as a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above methods.

[0108] The above provides a detailed description of the intelligent prediction model construction method for the quality of prawns based on the random forest algorithm proposed in this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A method for constructing an intelligent prediction model for the quality of prawns based on the random forest algorithm, characterized in that, The method includes: Data preparation and feature selection, and based on the objectives of the prediction model, data are collected and organized into a dataset in conjunction with relevant experimental and detection results, and the data in the dataset are preprocessed; A prediction model for freezing process-ice crystal equivalent diameter is constructed using ultrasonic power, freezing rate and phase transition time as inputs and ice crystal equivalent radius as output. An ice crystal morphology-water holding capacity prediction model was constructed using ice crystal equivalent diameter, roundness, and stretchability as inputs and water holding capacity as output. Principal component analysis was used to perform dimensionality reduction and classification on the freezing parameters, ice crystal morphology characteristics, and quality evaluation index data of ultrasonic-assisted immersion frozen shrimp. The dimensionality-reduced parameters were used as input features and the sensory scores of the samples were used as output variables to construct a random forest regression prediction model.

2. The method according to claim 1, characterized in that, In the freezing process-ice crystal equivalent diameter prediction model, the random forest algorithm has 300 decision trees, and the maximum depth of each decision tree is 10. 70% of the sample data is used as the training set and 30% as the test set.

3. The method according to claim 1, characterized in that, In the ice crystal morphology-water retention prediction model, the random forest algorithm has 300 decision trees, and the maximum depth of each decision tree is 7. 70% of the sample data is used as the training set and 30% as the test set.

4. The method according to claim 1, characterized in that, The freezing parameters include ultrasonic power, freezing rate, and phase transition time; ice crystal morphology characteristics include equivalent diameter, roundness, and stretchability; quality evaluation indicators include color difference, chewiness, elasticity, hardness, cohesion, water holding capacity, TVB-N, cooking loss, and thawing loss, totaling 15 characteristic indicators.

5. The method according to claim 4, characterized in that, The principal component analysis method is as follows: First, the data is standardized to eliminate the influence of data dimensions; based on the obtained standardized matrix, the covariance matrix is ​​calculated; based on the covariance matrix, eigenvalues ​​are calculated and arranged in order, and the corresponding eigenvectors are calculated; then, the principal component scores, principal component contribution rates, and cumulative contribution rates are calculated; finally, the principal components with eigenvalues ​​greater than 1 and cumulative contribution rates greater than 85% are selected as the new feature data results after dimensionality reduction.

6. The method according to claim 5, characterized in that, Principal components PC1 and PC2 with eigenvalues ​​greater than 1 were selected for analysis. PC1 focused on core quality deterioration and ice crystal morphology, while PC2 focused on texture and process parameters. PC1 and PC2 were used to replace the above 15 indicators to evaluate the freezing process, ice crystal morphology, and quality indicators of the shrimp.

7. The method according to claim 6, characterized in that, Using the principal component scores of PC1 and PC2 in the principal component analysis results as feature inputs, and the sensory scores of ultrasonic-assisted soaking and freezing shrimp as output indicators, a comprehensive prediction model for shrimp quality, namely the random forest regression prediction model, is constructed.

8. The method according to claim 7, characterized in that, In the random forest regression prediction model, the random forest algorithm has 500 decision trees, and the maximum depth of each decision tree is 10. 70% of the sample data is used as the training set and 30% as the test set.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-8.

10. A computer-readable storage medium for storing computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the method according to any one of claims 1-8.