A method, device, equipment and medium for evaluating quality of buffalo milk mozzarella cheese
Patent Information
- Application Number
- CN202610732048.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-26
- Publication Date
- 2026-08-18
AI Technical Summary
已有研究尝试利用卷积神经网络对产品自动化生成或评估的方案出现,然而这些现有的技术在水牛奶马苏里拉奶酪品质评价中仍然面临挑战,例如:机器学习模型存在黑箱问题,仅能输出评分结果,无法量化各指标对品质的贡献度与交互作用,难以解释评价逻辑、指导工艺优化
[0018]The present invention includes, but is not limited to, the following beneficial effects: (1) This scheme selects multi-dimensional quality evaluation indicators covering sensory evaluation, texture evaluation and cheese function evaluation layers; secondly, it collects multi-dimensional quality indicator data and performs outlier removal, positiveization and dimensionless processing to obtain target input data; then, it trains and optimizes the random forest regression model based on leave-one-out method to obtain the target random forest model; then, it inputs the indicator matrix of the sample to be tested into the target random forest model and outputs the comprehensive cheese quality score of each sample; subsequently, it uses the SHAP algorithm to perform interpretability analysis on the comprehensive score and quantifies the contribution of each evaluation indicator. Contribution; Finally, the evaluation results of cheese quality are determined based on contribution. By integrating random forest regression and SHAP interpretability analysis, the problems of strong subjectivity, difficulty in capturing nonlinear relationships between indicators and uninterpretable black box model of traditional evaluation methods are solved, which significantly improves the objectivity, accuracy and process guidance value of buffalo mozzarella cheese quality evaluation; (2) This scheme obtains key indicator data such as hardness, elasticity, melting, oil exudation and stretchability by clearly adopting standardized physicochemical means such as texture analyzer, Schreiber test method and fat permeation method, which ensures the objectivity and comprehensiveness of the original evaluation data and effectively reduces This reduces the subjective fluctuations of traditional sensory evaluation and builds a solid data foundation. At the same time, outlier data points are removed by statistical methods to eliminate abnormal sample interference, and inverse indicators (such as hardness) are positively transformed to unify the contribution direction of each indicator to the comprehensive score. Combined with mean-based and dimensionless processing to eliminate the dimensional differences between different dimensional indicators, this not only improves the data quality and consistency, but also ensures that the training data input to the random forest model has a high degree of representativeness and balance, thereby greatly enhancing the stability and prediction accuracy of model training and improving the accuracy of buffalo mozzarella cheese quality evaluation. (3) This scheme is based on SH The AP algorithm calculates the Shapley value of each evaluation index for each sample under test. By distinguishing between positive and negative values, it accurately identifies the advantageous and disadvantageous contribution indicators. Furthermore, it calculates the mean absolute value of the SHAP of each index in the entire sample set to quantify its weighted contribution to the quality score. At the same time, it generates a heatmap of contribution importance and a SHAP dependency graph showing the trend of nonlinear influence. This not only transforms the complex machine learning model into a quantifiable and traceable interpretable model, but also realizes the attribution from macro-comprehensive scoring to micro-indicator contribution. It provides a quantitative tool for a deeper understanding of the nonlinear influence mechanism of each quality index on the final quality of cheese and for identifying key process control points.
Smart Images

Figure CN122598849A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of food quality evaluation technology, specifically relating to a method, apparatus, equipment, and medium for evaluating the quality of buffalo milk mozzarella cheese. Background Technology
[0002] Buffalo mozzarella cheese, due to the higher protein, fat, and mineral content of buffalo milk, is characterized by its rich creamy flavor, soft and dense texture, and excellent melting and stringing properties, making it an important category of high-end cheese products. In recent years, my country's buffalo resources and buffalo milk production have steadily increased; however, the development of a quality evaluation system for mozzarella cheese tailored to the characteristics of buffalo milk has lagged behind. Existing evaluation methods often directly borrow from those used for ordinary cow's milk mozzarella cheese, making it difficult to scientifically, comprehensively, and consistently reflect its true quality.
[0003] In existing technologies, cheese quality evaluation mainly employs methods such as sensory evaluation, texture analysis, and physicochemical index determination. Among these, sensory evaluation relies on subjective scoring by evaluators of indicators such as color, flavor, and taste, which is easily influenced by the evaluator's experience, environmental conditions, and psychological factors, resulting in significant subjectivity and variability. While texture and physicochemical indicators have better objectivity, they primarily reflect the physical or chemical properties of materials under specific test conditions, making it difficult to comprehensively characterize the overall quality performance of cheese during actual consumption. Furthermore, key processing functional indicators such as melting properties, stretchability, and oil extraction are mostly measured independently, failing to form a systematically integrated evaluation dimension.
[0004] To address the problem of comprehensive evaluation of multiple indicators, existing technologies have proposed various methods such as the analytic hierarchy process (AHP), principal component analysis (PCA), entropy weighting, and fuzzy comprehensive evaluation. However, these methods either rely excessively on expert experience, leading to subjective bias, or rely entirely on statistical data characteristics, ignoring the actual quality significance. Furthermore, many methods employ linear weighting to obtain the comprehensive score. These methods are generally based on the linear assumption, treating each evaluation indicator as independent and linearly superimposed, making it difficult to reflect the complex nonlinear coupling relationship between textural characteristics, sensory attributes, and processing functionality. This results in a discrepancy between the evaluation results and actual quality perception.
[0005] In recent years, breakthroughs in artificial intelligence technology, especially in the field of deep learning, have provided new ideas for the food industry. Existing research has attempted to utilize convolutional neural networks for automated product generation or evaluation. However, these existing technologies still face challenges in the quality evaluation of buffalo mozzarella cheese. For example, machine learning models suffer from a black-box problem, only outputting scoring results and failing to quantify the contribution and interaction of various indicators to quality, making it difficult to interpret the evaluation logic and guide process optimization.
[0006] Therefore, there is an urgent need to provide an evaluation method that can achieve multi-index nonlinear modeling and has interpretability, so as to improve the scientificity and practicality of buffalo mozzarella cheese quality evaluation. Summary of the Invention
[0007] In view of the shortcomings of the prior art, the purpose of this invention is to provide a method, apparatus, equipment and medium for evaluating the quality of buffalo milk mozzarella cheese.
[0008] According to one aspect of this application, a method for evaluating the quality of buffalo milk mozzarella cheese is disclosed, the method comprising: The quality evaluation indicators for buffalo mozzarella cheese were determined. The quality evaluation indicators include a sensory evaluation layer, a texture evaluation layer, and a cheese function evaluation layer. The sensory evaluation layer includes color, flavor, texture, mouthfeel, and heating characteristics. The texture evaluation layer includes hardness, elasticity, cohesiveness, adhesiveness, and chewiness. The cheese function evaluation layer includes melting properties, fat extraction, and stretchability. Obtain multi-dimensional evaluation index data of buffalo milk mozzarella cheese samples, including data on sensory, textural, and cheese function measurements of buffalo milk mozzarella cheese samples, which were then recorded. Outlier removal, forward processing, and dimensionless processing are performed on multi-dimensional evaluation index data to obtain target input data. The forward processing is used to convert negative indicators into positive indicators, and the dimensionless processing is used to eliminate the differences in dimensions and orders of magnitude between evaluation index data of different dimensions, so that the evaluation index data of each dimension are in a uniform numerical range. The target input data is used as input variables to feed into the original random forest model, the hyperparameters of the original random forest model are optimized, and the leave-one-out method is used to train and validate the original random forest model to obtain the target random forest model. The sample index matrix corresponding to the buffalo milk mozzarella cheese sample to be tested is input into the target random forest model to obtain the comprehensive cheese quality score of each sample output by the target random forest model. The sample index matrix is constructed based on the sample sensory index data, sample texture index data and cheese functional index data. The comprehensive cheese quality score of each sample is a comprehensive score of the sample sensory score, sample texture score and cheese functional score. The interpretability analysis of the comprehensive quality score of the cheese is performed based on the SHAP algorithm, and the contribution of each quality evaluation index to the comprehensive quality score of the cheese is quantified. Based on the contribution, the evaluation result of the quality of the buffalo mozzarella cheese is determined.
[0009] In some embodiments, obtaining multi-dimensional evaluation index data includes: Data on hardness, elasticity, cohesiveness, adhesiveness, and chewiness were obtained from texture scanning of buffalo milk mozzarella cheese samples using a texture analyzer. The melting properties of buffalo mozzarella cheese samples were obtained using the Schreiber test method, in which buffalo mozzarella cheese samples were heated in an oven at 100°C for 1 hour, and the diameter of the melted cheese was recorded to quantify the melting properties. The fat exudation property was obtained by placing a buffalo milk mozzarella cheese sample in an oven at 100°C for 1 hour and then allowing it to return to room temperature for 30 minutes. An oil ring was formed, and the diameter of the oil ring was measured with a vernier caliper. To obtain the tensile length, tensile strength, or elongation at break of buffalo milk mozzarella cheese samples in the molten state, based on the heat stretching method.
[0010] In some embodiments, the process of removing outliers, performing positive conversion, and dimensionless conversion on the multi-dimensional evaluation index data to obtain the target input data includes: Statistical methods were used to identify and remove outlier data points from the evaluation index data of each dimension; The hardness index in the multi-dimensional evaluation index data is reversed and converted to positive, while other positive indicators are kept unchanged, so as to unify the contribution direction of all evaluation indicators to the comprehensive score. The processed data is dimensionless by means of the average method to obtain the target input data. The formula for converting a reverse indicator into a positive indicator is as follows: ,in, For the a-th reverse indicator, The maximum value of the a-th inverse index across all samples. This is the new value of the a-th indicator after positive transformation; Dimensionless data processing satisfies: ,in, This is the standardized value of the b-th indicator after dimensionless processing. The original data for the b-th evaluation indicator. Let b be the average value of the b-th evaluation index across all samples.
[0011] In some embodiments, the step of inputting the target input data as an input variable into the original random forest model, optimizing the hyperparameters of the original random forest model, and training and validating the original random forest model using the leave-one-out method to obtain the target random forest model includes: Multiple training subsets are generated by sampling with replacement using Bootstrap, and feature subsets are randomly selected for partitioning during node splitting to construct multiple decision trees; The hyperparameters of the random forest model are optimized using a grid search algorithm or Bayesian optimization. The hyperparameters include at least the number of decision trees, the maximum depth, and the minimum number of split samples. With a total number of samples of n, select one sample at a time as the test set and the remaining n-1 samples as the training set. Repeat the training and prediction process n times until all samples have completed one test, and obtain the target random forest model.
[0012] In some embodiments, the interpretability analysis of the overall cheese quality score based on the SHAP algorithm, quantifying the contribution of each quality evaluation indicator to the overall cheese quality score, includes: For each sample of buffalo milk mozzarella cheese to be tested, the sapuri value of each evaluation index is calculated based on a preset characteristic function; Based on the sign of each Shapley value, the evaluation index corresponding to the Shapley value is determined as either an advantage contribution index or a disadvantage contribution index. The mean absolute value of the SHAP value of each evaluation index in the entire sample set is calculated to quantify the quantitative contribution weight of each evaluation index to the quality score. The multiple quantitative contribution weights are sorted in descending order, and the quantitative contribution of each evaluation index to the overall cheese quality score is output. A heatmap of contribution importance and a SHAP dependency graph are generated to distinguish between the advantageous and disadvantageous contribution indicators. The SHAP dependency graph is used to show the linear influence trend on the overall cheese quality score within different value ranges.
[0013] In some embodiments, determining the quality evaluation result of the buffalo mozzarella cheese based on the contribution includes: Based on the comprehensive cheese quality score, buffalo mozzarella cheese is divided into multiple quality grades according to a preset threshold range. Based on the quantitative contribution of each quality evaluation indicator, the key causal factors affecting the current cheese quality are screened out. The system retrieves a pre-defined index suggestion table, matches and outputs corresponding suggestions for adjusting cheese production process parameters for the identified key causative factors, and forms a complete evaluation result that includes quality grade, key causative factors, and process optimization solutions.
[0014] In some embodiments, before obtaining the multi-dimensional evaluation index data of the buffalo milk mozzarella cheese sample, the method further includes: Place the buffalo milk mozzarella cheese sample in an environment with a temperature of 25~30℃ and a relative humidity of 50%~55% for 30~60 minutes to equilibrate, and then perform standardized cutting or shaping.
[0015] According to another aspect of this application, a quality evaluation device for buffalo milk mozzarella cheese is also disclosed, the device comprising: The quality evaluation index determination module is used to determine the quality evaluation index of buffalo mozzarella cheese. The quality evaluation index includes a sensory evaluation layer, a texture evaluation layer, and a cheese function evaluation layer. The sensory evaluation layer includes color, flavor, texture, mouthfeel, and heating characteristics. The texture evaluation layer includes hardness, elasticity, cohesiveness, adhesiveness, and chewiness. The cheese function evaluation layer includes melting properties, fat extraction, and stretchability. The multi-dimensional evaluation index data acquisition module is used to acquire multi-dimensional evaluation index data of buffalo mozzarella cheese samples. The evaluation index data includes data on sensory, textural, and cheese function measurements of the buffalo mozzarella cheese samples, which are then recorded. The multi-dimensional evaluation index data processing module is used to perform outlier removal, forward processing, and dimensionless processing on multi-dimensional evaluation index data to obtain target input data. The forward processing is used to convert inverse indicators into positive indicators, and the dimensionless processing is used to eliminate the differences in dimensions and orders of magnitude between evaluation index data of different dimensions, so that the evaluation index data of each dimension are in a uniform numerical range. The target random forest model determination module is used to input the target input data as input variables into the original random forest model, optimize the hyperparameters of the original random forest model, and use the leave-one-out method to train and validate the original random forest model to obtain the target random forest model. The quality comprehensive score determination module is used to input the sample index matrix corresponding to the buffalo mozzarella cheese sample to be tested into the target random forest model to obtain the cheese quality comprehensive score of each sample output by the target random forest model. The sample index matrix is constructed based on the sample sensory index data, sample texture index data and cheese functional index data. The cheese quality comprehensive score of each sample is a comprehensive score of the sample sensory score, sample texture score and cheese functional score. The contribution determination module is used to perform interpretability analysis on the comprehensive quality score of the cheese based on the SHAP algorithm, and to quantify the contribution of each quality evaluation index to the comprehensive quality score of the cheese. The evaluation result determination module is used to determine the evaluation result of the quality of the buffalo mozzarella cheese based on the contribution.
[0016] According to another aspect of this application, an electronic device is also disclosed, characterized in that the electronic device includes a memory and at least one processor, the memory storing instructions; the at least one processor invokes the instructions in the memory to cause the electronic device to perform the various steps of the water buffalo mozzarella cheese quality evaluation method as described in any of the preceding claims.
[0017] According to another aspect of this application, a computer-readable storage medium is also disclosed, wherein instructions are stored on the computer-readable storage medium, characterized in that, when executed by a processor, the instructions implement the various steps of the water buffalo mozzarella cheese quality evaluation method as described in any of the preceding claims.
[0018] The present invention includes, but is not limited to, the following beneficial effects: (1) This scheme selects multi-dimensional quality evaluation indicators covering sensory evaluation, texture evaluation and cheese function evaluation layers; secondly, it collects multi-dimensional quality indicator data and performs outlier removal, positiveization and dimensionless processing to obtain target input data; then, it trains and optimizes the random forest regression model based on leave-one-out method to obtain the target random forest model; then, it inputs the indicator matrix of the sample to be tested into the target random forest model and outputs the comprehensive cheese quality score of each sample; subsequently, it uses the SHAP algorithm to perform interpretability analysis on the comprehensive score and quantifies the contribution of each evaluation indicator. Contribution; Finally, the evaluation results of cheese quality are determined based on contribution. By integrating random forest regression and SHAP interpretability analysis, the problems of strong subjectivity, difficulty in capturing nonlinear relationships between indicators and uninterpretable black box model of traditional evaluation methods are solved, which significantly improves the objectivity, accuracy and process guidance value of buffalo mozzarella cheese quality evaluation; (2) This scheme obtains key indicator data such as hardness, elasticity, melting, oil exudation and stretchability by clearly adopting standardized physicochemical means such as texture analyzer, Schreiber test method and fat permeation method, which ensures the objectivity and comprehensiveness of the original evaluation data and effectively reduces This reduces the subjective fluctuations of traditional sensory evaluation and builds a solid data foundation. At the same time, outlier data points are removed by statistical methods to eliminate abnormal sample interference, and inverse indicators (such as hardness) are positively transformed to unify the contribution direction of each indicator to the comprehensive score. Combined with mean-based and dimensionless processing to eliminate the dimensional differences between different dimensional indicators, this not only improves the data quality and consistency, but also ensures that the training data input to the random forest model has a high degree of representativeness and balance, thereby greatly enhancing the stability and prediction accuracy of model training and improving the accuracy of buffalo mozzarella cheese quality evaluation. (3) This scheme is based on SH The AP algorithm calculates the Shapley value of each evaluation index for each sample under test. By distinguishing between positive and negative values, it accurately identifies the advantageous and disadvantageous contribution indicators. Furthermore, it calculates the mean absolute value of the SHAP of each index in the entire sample set to quantify its weighted contribution to the quality score. At the same time, it generates a heatmap of contribution importance and a SHAP dependency graph showing the trend of nonlinear influence. This not only transforms the complex machine learning model into a quantifiable and traceable interpretable model, but also realizes the attribution from macro-comprehensive scoring to micro-indicator contribution. It provides a quantitative tool for a deeper understanding of the nonlinear influence mechanism of each quality index on the final quality of cheese and for identifying key process control points. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0020] Figure 1This is a flowchart of the method for evaluating the quality of buffalo milk mozzarella cheese according to an embodiment of this application; Figure 2 This is a structural block diagram of the buffalo milk mozzarella cheese quality evaluation device according to an embodiment of this application; Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0021] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0022] For ease of understanding, the specific process of the embodiments of the present invention will be described below. Figure 1 This is a flowchart of the method for evaluating the quality of buffalo milk mozzarella cheese according to an embodiment of this application. (See attached document.) Figure 1 It includes the following steps: S100. Determine the quality evaluation indicators for buffalo milk mozzarella cheese.
[0023] Specifically, the quality evaluation indicators include sensory evaluation, texture evaluation, and cheese functional evaluation. For example, the sensory evaluation layer includes color, flavor, texture, mouthfeel, and heating properties; the texture evaluation layer includes hardness, elasticity, cohesiveness, stickiness, and chewiness; and the cheese functional evaluation layer includes melting properties, fat release, and stretchability. S102. Obtain multi-dimensional evaluation index data for buffalo milk mozzarella cheese samples.
[0024] Specifically, the evaluation index data includes data from the separate measurement and recording of sensory, textural, and cheese function of buffalo mozzarella cheese samples. For example, data on hardness, elasticity, cohesiveness, adhesiveness, and chewiness can be obtained from textural scanning of buffalo mozzarella cheese samples using a texture analyzer; the melting property of buffalo mozzarella cheese samples can be obtained using the Schreiber test method, where the buffalo mozzarella cheese sample is heated in a 100°C oven for 1 hour, and the diameter of the melted cheese is recorded to quantify melting property; the fat exudation property can be obtained using the fat percolation method, where the buffalo mozzarella cheese sample is heated in a 100°C oven for 1 hour, then allowed to recover at room temperature for 30 minutes, resulting in the formation of an oil ring, and the diameter of the oil ring is measured using calipers; and the tensile length, tensile strength, or elongation at break of buffalo mozzarella cheese samples in the molten state can be obtained based on the heat stretching method.
[0025] For example, buffalo milk mozzarella cheese samples are placed in an environment with a temperature of 25-30°C and a relative humidity of 50%-55% for 30-60 minutes to equilibrate, and then subjected to standardized cutting or shaping processes to ensure that the physical state of each sample is relatively consistent.
[0026] Understandably, this method modifies the traditional Schreiber test method as follows: The traditional Schreiber test method typically involves heating at 232°C for 5 minutes. However, considering the high fat and protein content and wide melting point range of buffalo mozzarella cheese, this invention lowers the heating temperature to 100°C and extends the heating time to 1 hour to ensure the cheese is fully softened without excessive decomposition. Simultaneously, this invention uniformly presses the initial sample thickness to 17.6 mm in diameter and 7 mm in height to ensure test repeatability and comparability. The improved method more accurately reflects the melting characteristics of buffalo mozzarella cheese in actual consumption scenarios.
[0027] Understandably, traditional fat percolation methods typically involve placing cheese samples directly on filter paper and allowing them to stand at room temperature or lower, relying on gravity to naturally release the fat. However, for buffalo mozzarella cheese, due to its denser fat globule structure, relying solely on gravity for natural fat release is time-consuming and incomplete, making it difficult to accurately reflect its actual fat release behavior during high-temperature processing (such as pizza baking). This method improves upon the traditional fat percolation method by cutting the cheese sample into uniformly sized round slices (e.g., using a special punch to obtain a 17.6mm diameter, 7mm high cheese sample). The samples are then placed in 9cm diameter petri dishes lined with filter paper, allowed to recover at room temperature for 30 minutes, and then heated in a 100°C oven for 1 hour, followed by a 30-minute recovery at room temperature. This improved method, through heating, accelerates the release and percolation of milk fat, improving testing efficiency and reproducibility, and better reflecting the actual application characteristics of buffalo mozzarella cheese.
[0028] S104. Perform outlier removal, positive transformation, and dimensionless transformation on the multi-dimensional evaluation index data to obtain the target input data.
[0029] Among them, forward processing is used to convert inverse indicators into positive indicators, and dimensionless processing is used to eliminate the differences in dimensions and orders of magnitude between evaluation indicator data of different dimensions, so that the evaluation indicator data of each dimension are in a unified numerical range.
[0030] Specifically, in this example, the inverse indicator is the hardness indicator. The multi-dimensional evaluation indicator data is processed to obtain the target input data. Specifically, statistical methods can be used to identify and remove outlier data points in the evaluation indicator data of each dimension. The hardness index in the multi-dimensional evaluation index data is reversed and converted to positive, while other positive indicators are kept unchanged, so as to unify the contribution direction of all evaluation indicators to the comprehensive score. The mean value method is used to perform dimensionless processing on the processed data to obtain the target input data; The formula for converting a reverse indicator into a positive indicator is as follows: ,in, For the a-th reverse indicator, The maximum value of the a-th inverse index across all samples. This is the new value of the a-th indicator after positive transformation; Dimensionless data processing satisfies: ,in, This is the standardized value of the b-th indicator after dimensionless processing. The original data for the b-th evaluation indicator. Let b be the average value of the b-th evaluation index across all samples.
[0031] S106. Input the target input data as input variables into the original random forest model, optimize the hyperparameters of the original random forest model, and use the leave-one-out method to train and validate the original random forest model to obtain the target random forest model.
[0032] Specifically, multiple sub-training sets are generated through Bootstrap sampling with replacement. During node splitting, a subset of features is randomly selected for partitioning to construct multiple decision trees. Then, the hyperparameters of the random forest model are optimized using a grid search algorithm or Bayesian optimization. The hyperparameters include at least the number of decision trees, the maximum depth, and the minimum number of split samples. Furthermore, with a total number of samples of n, a single sample is selected sequentially as the test set, and the remaining n-1 samples are used as the training set. This process is repeated n times for training and prediction until all samples have completed one test, thus obtaining the target random forest model.
[0033] S108. Input the sample index matrix corresponding to the buffalo milk mozzarella cheese sample to be tested into the target random forest model to obtain the comprehensive cheese quality score of each sample output by the target random forest model.
[0034] The sample index matrix is constructed based on sample sensory index data, sample texture index data, and cheese functional index data. The comprehensive cheese quality score of each sample is a comprehensive score of the sample sensory score, sample texture score, and cheese functional score.
[0035] S110. Based on the SHAP algorithm, perform interpretability analysis on the comprehensive cheese quality score and quantify the contribution of each quality evaluation index to the comprehensive cheese quality score.
[0036] In some embodiments, interpretability analysis is performed on the overall cheese quality score based on the SHAP algorithm, quantifying the contribution of each quality evaluation index to the overall cheese quality score, including: For each sample of buffalo mozzarella cheese to be tested, the Shapley value of each evaluation index is calculated based on a preset characteristic function. Then, based on the sign of each Shapley value, the evaluation index corresponding to the Shapley value is determined as an advantageous contribution index or a disadvantageous contribution index. The mean absolute value of the SHAP value of each evaluation index in the entire sample set is calculated to quantify the quantitative contribution weight of each evaluation index to the quality score. Furthermore, the multiple quantitative contribution weights are sorted in descending order to output the quantitative contribution of each evaluation index to the overall cheese quality score. A heatmap of the contribution importance and a SHAP dependency plot are generated to distinguish between advantageous and disadvantageous contribution indicators. The SHAP dependency plot is used to show the semi-linear influence trend on the overall cheese quality score within different value ranges.
[0037] S112. Based on contribution, determine the evaluation results of the quality of buffalo mozzarella cheese.
[0038] Specifically, based on the comprehensive quality score of the cheese and according to a preset threshold range, buffalo mozzarella cheese can be divided into multiple quality grades. Then, based on the quantitative contribution of each quality evaluation indicator, key causal factors affecting the current cheese quality are identified. Furthermore, a preset indicator suggestion comparison table is retrieved, and for the identified key causal factors, corresponding cheese production process parameter adjustment suggestions are matched and output to form a complete evaluation result including quality grade, key causal factors, and process optimization schemes. The quality grades include, but are not limited to, excellent, good, and poor. For example, to evaluate a buffalo mozzarella cheese sample (Sample A), after positiveization and dimensionless processing, the input data for this sample is shown in Table 1: Table 1
[0039] The determined target random forest model consists of 3 decision trees (simplified example, in reality there may be 100-500 trees).
[0040] Simplified rules for decision tree 1: If hardness < 0.9 and tensile strength > 1.1, output 88; if hardness ≥ 0.9 and melting point > 1.0, output 82; otherwise, output 75. Simplified rules for decision tree 2: If elasticity > 1.1 AND cohesion > 1.0, output 90; if grease exudation < 0.9, output 85; otherwise, output 78. The rules for decision tree 3 (the order may vary): If chewiness > 0.95 AND stretchability > 1.1, then output 89; If the hardness is less than 0.9, output 84; otherwise, output 76. Further calculations will be performed to determine the overall score for Sample A. When the data of SampleA is input into Tree1, the hardness = 0.85 (<0.9) and tensile strength = 1.15 (>1.1), then it matches the first value and outputs 88; Given tree 2, with elasticity = 1.12 (> 1.1) and cohesion = 1.05 (> 1.0), the first tree is matched, and the output is 90. When inputting tree 3, if chewiness = 0.92 (not greater than 0.95), the output is 76; if hardness = 0.85 (<0.9), the second condition is matched, and the output is 84. Therefore, the comprehensive score (CQCS) = (88 + 90 + 84) / 3 = 87.33.
[0041] In summary, the calculated comprehensive score is 87.33, which meets the threshold for excellent level, so the sample is determined to be of excellent level.
[0042] Furthermore, when the cheese quality comprehensive score (CQCS) output by the model, determined based on the above scheme, is lower than the preset acceptable threshold (e.g., <70 points), or the evaluation result is poor, the previously generated SHAP contribution data can be automatically retrieved to identify the key disadvantageous contribution indicators that cause the score to drop (e.g., excessive hardness, insufficient stretchability). The current disadvantageous indicators and their specific values (e.g., hardness = 1.2, stretchability = 0.8) are then used as query input to retrieve a pre-built AI knowledge base for cheese process optimization. This knowledge base stores the mapping relationship between abnormal indicator patterns and process parameter adjustments through deep learning or association rule mining of historical production data. For example, the query reveals that historically, when hardness > 1.15 and stretchability < 0.85, lowering the curd temperature by 2°C and extending the fermentation time by 15 minutes can effectively improve quality. Therefore, the process can be optimized by combining the mapping relationship between abnormal indicator patterns and process parameter adjustments.
[0043] Furthermore, to facilitate understanding of the implementation of this solution, the following description is provided in conjunction with specific embodiments: (1) Sample preparation: Commercially available buffalo mozzarella cheese was collected. Before evaluation, the samples were thawed at 4°C from freezing, and their appearance was scored. Different test samples were placed in containers of the same size and material and equilibrated for 30-60 minutes at a temperature of 22-22°C and a relative humidity of 50%-55% to ensure the consistency of the sample state during evaluation.
[0044] (2) Determine sensory evaluation indicators: The sensory evaluation indexes for buffalo mozzarella cheese were established with reference to RHB502-2004 "Sensory Quality Evaluation Guidelines for Mozzarella Cheese" and related literature. The specific contents are shown in Table 1. A sensory evaluation group of 15 food professionals (7 men and 8 women) was invited to evaluate the samples randomly. The members did not communicate with each other and rinsed their mouths with warm water between two sample evaluations.
[0045] The evaluation method for heating characteristics is to take a small sample, heat it with hot water at 82°C, and then stretch it by hand or with the help of other tools to observe its filament shape.
[0046] Table 2 Sensory Scoring Criteria for Mozzarella Cheese
[0047] (3) Quality indicators of buffalo milk mozzarella cheese 1) Determination of texture indices Cut the sample into (2×2×2) cm pieces. 3 Small piece; Probe specifications: R36 probe, diameter 38mm; Test compression ratio 75%; Probe descent speed: 2cm / sec; Probe return speed 2cm / sec, interval between two tests 5s, trigger force 4.0g.
[0048] 2) Determination of melting properties The melting properties of cheese were determined using a modified Schreiber test method. The specific method was as follows: a cheese sample with a diameter of 17.6 mm and a height of 7 mm was taken using a special punch. The sample was placed in a 9 cm diameter petri dish lined with filter paper and allowed to recover at room temperature for 30 min. Then, it was placed in an oven at 100 °C and heated for 1 h. After removing it, it was allowed to recover at room temperature for 30 min. Finally, the diameter of the melted cheese was measured, and four values were taken, accurate to 0.1 mm. The calculated average value represents the melting properties of the cheese.
[0049] 3) Determination of oil and fat exudation The fat exudation property of cheese was determined by a modified traditional fat percolation method. The method involves taking a cheese sample with a diameter of 17.6 mm and a thickness of 7 mm using a special punch, placing the sample in a petri dish pre-lined with filter paper, allowing it to recover to room temperature for 30 minutes, and then placing it in an oven preheated to 100°C for 1 hour. After removing it, it was allowed to recover to room temperature for 30 minutes, during which time an oil ring was formed. The diameter of the oil ring was measured using vernier calipers, with four values measured to an accuracy of 0.01. The average value was calculated to represent the fat exudation property of the cheese.
[0050] 4) Determination of tensile properties Cut the cheese into (2×2×2)cm pieces. 3 Divide the sample into cubes and place them in a petri dish lined with filter paper. Equilibrate at room temperature for 30 minutes. Then place the cubes in an oven preheated to 100°C and heat for 1 hour. Remove the cubes immediately and lift them with a glass rod and stretch them upwards until the cheese breaks. Measure the stretch length of the cheese with a ruler, accurate to 0.1 cm, to indicate the cheese's stretchability.
[0051] (4) Preprocessing of raw data 1) Data forward processing Since mozzarella cheese is a soft cheese, its hardness is an inverse textural indicator, while the other indicators are positive. Therefore, we need to convert this indicator to a positive one. The formula for converting an inverse indicator to a positive one is: (1); 2) Dimensionless data processing Since different cheese quality indicators have different dimensions and orders of magnitude, in order to eliminate the influence of different data dimensions on the establishment of the subsequent evaluation system, dimensionless processing is carried out according to formula (2).
[0052] (2); The process of random forest regression modeling based on the leave-one-out method in this application is described in detail below: (1) Data input and variable definition The preprocessed multidimensional evaluation index matrix is set as the input feature matrix. , where n is the total number of samples of buffalo mozzarella cheese, and m is the number of characteristic indicators (such as hardness, elasticity, stretchability, etc.).
[0053] The overall score of each sample is set as the target output vector. ,in y n This represents the actual evaluation score of the nth sample.
[0054] (2) Construction and Ensemble Learning of Random Forest Regression Model Based on ensemble learning theory, a random forest regression model is constructed to fit the nonlinear coupling relationship between multiple indicators, specifically including the following mechanisms: Bootstrap sampling: Bootstrap sampling is an inherent construction method of random forest models. It uses sampling with replacement to randomly sample K subsets of training data from the original sample set (X,Y). Each sub-training set has the same sample size as the original sample size n, but contains approximately 63.2% of the original samples without duplication. The samples not selected constitute the out-of-bag data. This is used to construct multiple differentiated decision trees, improving the ensemble accuracy and generalization of the model.
[0055] Node splitting and feature subset selection: Construct a decision tree using each subset Sk. When splitting at each node of the decision tree, instead of traversing all m features, a node containing m features is randomly selected. A subset of features (usually set) Based on the criteria of minimizing Gini impurity or mean square error, the system selects features and segmentation thresholds that maximize the difference between the two sets of sub-node samples and have the purest internal data, thus completing the optimal node partitioning.
[0056] Integrated prediction: K The independently generated decision trees are combined into a random forest to predict the overall score of the test sample x. It is calculated by taking the arithmetic mean of the outputs of all decision trees, and its mathematical expression is: ; in, K The total number of decision trees, For the first k Each decision tree has input features x The predicted output.
[0057] (3) Hyperparameter optimization based on grid search / Bayesian During the model building process, grid search algorithm or Bayesian optimization algorithm is used to globally optimize the key hyperparameters of the random forest in order to select the parameter combination with the best prediction performance.
[0058] Number of decision trees: controls the size of the ensemble model and the smoothness of predictions; Maximum depth: Limits the growth depth of a single decision tree to prevent overfitting to local features; Minimum number of split samples: Sets the minimum number of samples required for internal nodes to be further split. The optimization objective is to minimize the model's loss function on the validation set, thereby locking in the optimal model topology with the highest prediction accuracy.
[0059] (4) Model training and prediction based on leave-one-out method Leave-one-out cross-validation is an external validation strategy for the model. It achieves unbiased and robust model performance evaluation under small sample conditions by cyclically retaining a single sample as the validation set and the rest as the training set, effectively avoiding overfitting.
[0060] The specific loop mechanism is as follows: when the total number of samples is... n In the case of execution n The independent iteration. In the... i In the next iteration ( i =1,2,…, n ), select the first i Samples (x) i ,y i As a separate test set, the rest... n -1 sample set S{(x i ,y i The training set is used as the input. The training set is then fed into a random forest model with fixed optimal hyperparameters for fitting, and the model outputs predicted scores for the test set samples. After the loop ends, the predicted scores for all n samples are obtained. .
[0061] 5) Evaluation of model prediction performance To quantitatively evaluate the generalization ability of the optimal random forest model under small sample conditions, the model predictions are calculated using the following formula. Compared with actual rating Performance metrics between: Mean Squared Error (MSE): Used to measure the absolute degree of difference between predicted and actual values. The formula is: ; The smaller the MSE value, the lower the overall prediction bias of the model.
[0062] Coefficient of determination ( ): This is used to evaluate the proportion of variance explained by the model for the characteristics of cheese quality fluctuations. The calculation formula is: ; in, This is the arithmetic mean of the actual scores for all samples. The value of is usually between [0,1]. The closer its value is to 1, the better the model fits the nonlinear relationship between multiple indicators and the stronger the prediction stability.
[0063] After training the random forest regression model, the SHAP method is introduced to enable interpretable analysis of the model's prediction results. This method aims to break the "black box" limitation of machine learning and quantitatively characterize the contribution of each evaluation index to the overall score.
[0064] Among them, (1) SHAP value calculation The SHAP value is based on the Shapley value concept in game theory. It calculates the marginal contribution of a given indicator to the model output under different feature combinations, thus obtaining the indicator's contribution value. The formula is: ; in, Let S be the set of all features (detection metrics); S represents the subset of features that does not contain feature i. Let S be the feature function, representing the model's prediction of the i-th sample when only the feature subset S is used. Let be the SHAP value of the prediction result of the j-th feature (index) for the i-th sample, and M be the total number of features in the model. For the model to have features S and features The predicted value at that time For marginal contribution.
[0065] The larger the absolute value of a feature's SHAP (Shape Up and Down) value, the greater its contribution to the model's prediction results. Furthermore, the sign of the SHAP value reflects whether the feature will increase or decrease the model's output. Therefore, the SHAP value can accurately characterize the correspondence between predicted outputs and changes in feature values, thus explaining the impact of key features.
[0066] (2) Additive feature attribution decomposition For any cheese sample, the predicted score f(x) is decomposed into the sum of the Shapley values of each input feature, expressed by the following formula: ; in, The expected baseline value representing the overall sample quality score. Representing the i The marginal contribution of each physical or sensory characteristic to the deviation of the current sample score from the benchmark value. If the value is positive, then this indicator is defined as a contribution advantage indicator, indicating that it improves the overall quality of the product; if... , is defined as the disadvantage contribution index, where P is the total amount of input features.
[0067] (3) Heatmap of the importance of the contribution of indicators To redefine the weights of the cheese evaluation system from a data perspective, this step calculates the mean absolute value of the SHAP values of each indicator within the full sample set. To quantify the weight of each indicator's impact on the final quality, the specific formula is as follows: ; Through the The indicators were sorted in descending order to generate a heatmap of their contribution importance. This heatmap identified the core dominant factors in buffalo mozzarella cheese, providing evidence for the scientific validity of the evaluation system.
[0068] (4) Results analysis and opinion generation This invention extracts the SHAP interaction values between feature pairs (xi, yi) to analyze the nonlinear coupling relationships between different indicators. It utilizes SHAP dependency graphs to further analyze the specific impact of individual indicators and combinations of indicators on the overall cheese score across different ranges. By analyzing the SHAP dependency graphs, the sensitivity of each indicator value to the overall cheese score can be identified, as well as which value ranges maximize the overall score. Furthermore, based on a pre-defined indicator suggestion reference table obtained from a large-scale artificial intelligence model, suggestions for improving cheese product processes are generated.
[0069] Furthermore, Figure 2 The structural block diagram of the buffalo milk mozzarella cheese quality evaluation device according to the application embodiment is as follows: Figure 2 As shown, the device includes: The quality evaluation index determination module is used to determine the quality evaluation index of buffalo mozzarella cheese. The quality evaluation index includes a sensory evaluation layer, a texture evaluation layer, and a cheese function evaluation layer. The sensory evaluation layer includes color, flavor, texture, mouthfeel, and heating characteristics. The texture evaluation layer includes hardness, elasticity, cohesiveness, adhesiveness, and chewiness. The cheese function evaluation layer includes melting, fat extraction, and stretchability. The multi-dimensional evaluation index data acquisition module is used to acquire multi-dimensional evaluation index data of buffalo mozzarella cheese samples. The evaluation index data includes data on sensory, textural and cheese function measurements of buffalo mozzarella cheese samples, which are recorded separately. The multi-dimensional evaluation index data processing module is used to perform outlier removal, forward processing, and dimensionless processing on multi-dimensional evaluation index data to obtain target input data. Among them, forward processing is used to convert inverse indicators into positive indicators, and dimensionless processing is used to eliminate the differences in dimensions and orders of magnitude between evaluation index data of different dimensions, so that the evaluation index data of each dimension are in a uniform numerical range. The target random forest model determination module is used to input the target input data as input variables into the original random forest model, optimize the hyperparameters of the original random forest model, and use the leave-one-out method to train and validate the original random forest model to obtain the target random forest model. The quality comprehensive score determination module is used to input the sample index matrix corresponding to the buffalo mozzarella cheese sample to be tested into the target random forest model to obtain the cheese quality comprehensive score of each sample output by the target random forest model. The sample index matrix is constructed based on the sample sensory index data, sample texture index data and cheese functional index data. The cheese quality comprehensive score of each sample is a comprehensive score of the sample sensory score, sample texture score and cheese functional score. The contribution determination module is used to perform interpretability analysis on the comprehensive cheese quality score based on the SHAP algorithm, and to quantify the contribution of each quality evaluation index to the comprehensive cheese quality score. The evaluation result determination module is used to determine the evaluation result of buffalo mozzarella cheese quality based on contribution.
[0070] The application of the relevant modules of the device in this example can be referred to the relevant introduction of the method principle above, and will not be repeated here.
[0071] above Figure 2 The quality evaluation device for buffalo milk mozzarella cheese in this embodiment of the invention will be described in detail from the perspective of modular functional entities. The electronic equipment in this embodiment of the invention will be described in detail from the perspective of hardware processing.
[0072] Figure 3This is a schematic diagram of the structure of an electronic device 300 provided in an embodiment of the present invention. The electronic device 300 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 310 (e.g., one or more processors) and a memory 320, and one or more storage media 330 (e.g., one or more mass storage devices) for storing application programs 333 or data 332. The memory 320 and storage media 330 can be temporary or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the electronic device 300. Furthermore, the processor 310 may be configured to communicate with the storage media 330 and execute the series of instruction operations in the storage media 330 on the electronic device 300.
[0073] Electronic device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input / output interfaces 360, and / or one or more operating systems 331, such as Windows Server, MacOSX, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 3 The illustrated electronic device structure does not constitute a limitation on electronic devices and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0074] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of any of the above-described methods for evaluating the quality of buffalo mozzarella cheese.
[0075] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0076] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0077] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for evaluating the quality of buffalo milk mozzarella cheese, characterized by, The method includes: The quality evaluation indicators for buffalo mozzarella cheese were determined. The quality evaluation indicators include a sensory evaluation layer, a texture evaluation layer, and a cheese function evaluation layer. The sensory evaluation layer includes color, flavor, texture, mouthfeel, and heating characteristics. The texture evaluation layer includes hardness, elasticity, cohesiveness, adhesiveness, and chewiness. The cheese function evaluation layer includes melting properties, fat extraction, and stretchability. Obtain multi-dimensional evaluation index data of buffalo milk mozzarella cheese samples, including data on sensory, textural, and cheese function measurements of buffalo milk mozzarella cheese samples, which were then recorded. Outlier removal, forward processing, and dimensionless processing are performed on multi-dimensional evaluation index data to obtain target input data. The forward processing is used to convert negative indicators into positive indicators, and the dimensionless processing is used to eliminate the differences in dimensions and orders of magnitude between evaluation index data of different dimensions, so that the evaluation index data of each dimension are in a uniform numerical range. The target input data is used as input variables to feed into the original random forest model, the hyperparameters of the original random forest model are optimized, and the leave-one-out method is used to train and validate the original random forest model to obtain the target random forest model. The sample index matrix corresponding to the buffalo milk mozzarella cheese sample to be tested is input into the target random forest model to obtain the comprehensive cheese quality score of each sample output by the target random forest model. The sample index matrix is constructed based on the sample sensory index data, sample texture index data and cheese functional index data. The comprehensive cheese quality score of each sample is a comprehensive score of the sample sensory score, sample texture score and cheese functional score. The interpretability analysis of the comprehensive quality score of the cheese is performed based on the SHAP algorithm, and the contribution of each quality evaluation index to the comprehensive quality score of the cheese is quantified. Based on the contribution, the evaluation result of the quality of the buffalo mozzarella cheese is determined.
2. The method for evaluating the quality of buffalo milk mozzarella according to claim 1, characterized by the fact that, Obtaining multi-dimensional evaluation indicator data includes: Data on hardness, elasticity, cohesiveness, adhesiveness, and chewiness were obtained from texture scanning of buffalo milk mozzarella cheese samples using a texture analyzer. The melting properties of buffalo mozzarella cheese samples were obtained using the Schreiber test method, in which buffalo mozzarella cheese samples were heated in an oven at 100°C for 1 hour, and the diameter of the melted cheese was recorded to quantify the melting properties. The fat exudation property was obtained by placing a buffalo milk mozzarella cheese sample in an oven at 100°C for 1 hour and then allowing it to return to room temperature for 30 minutes. An oil ring was formed, and the diameter of the oil ring was measured with a vernier caliper. To obtain the tensile length, tensile strength, or elongation at break of buffalo milk mozzarella cheese samples in the molten state, based on the heat stretching method.
3. The method for evaluating the quality of buffalo milk mozzarella according to claim 1, characterized by the fact that, The process of removing outliers, performing positive transformation, and dimensionless transformation on the multi-dimensional evaluation index data yields the target input data, including: Statistical methods were used to identify and remove outlier data points from the evaluation index data of each dimension; The hardness index in the multi-dimensional evaluation index data is reversed and converted to positive, while other positive indicators are kept unchanged, so as to unify the contribution direction of all evaluation indicators to the comprehensive score. The processed data is dimensionless by means of the average method to obtain the target input data. The formula for converting a reverse indicator into a positive indicator is as follows: wherein, is the a-th inverse indicator, is the maximum value of the a-th inverse indicator over all samples, is the new value of the a-th indicator after the forward transformation. Dimensionless data processing satisfies: ,in, This is the standardized value of the b-th indicator after dimensionless processing. The original data for the b-th evaluation indicator. Let b be the average value of the b-th evaluation index across all samples.
4. The method for evaluating the quality of buffalo mozzarella cheese according to claim 1, characterized in that, The process of inputting the target input data as an input variable into the original random forest model, optimizing the hyperparameters of the original random forest model, and training and validating the original random forest model using the leave-one-out method to obtain the target random forest model includes: Multiple training subsets are generated by sampling with replacement using Bootstrap, and feature subsets are randomly selected for partitioning during node splitting to construct multiple decision trees; The hyperparameters of the random forest model are optimized using a grid search algorithm or Bayesian optimization. The hyperparameters include at least the number of decision trees, the maximum depth, and the minimum number of split samples. With a total number of samples of n, select one sample at a time as the test set and the remaining n-1 samples as the training set. Repeat the training and prediction process n times until all samples have completed one test, and obtain the target random forest model.
5. The method for evaluating the quality of buffalo mozzarella cheese according to claim 1, characterized in that, The interpretability analysis of the comprehensive cheese quality score based on the SHAP algorithm quantifies the contribution of each quality evaluation indicator to the comprehensive cheese quality score, including: For each sample of buffalo milk mozzarella cheese to be tested, the sapuri value of each evaluation index is calculated based on a preset characteristic function; Based on the sign of each Shapley value, the evaluation index corresponding to the Shapley value is determined as either an advantage contribution index or a disadvantage contribution index. The mean absolute value of the SHAP value of each evaluation index in the entire sample set is calculated to quantify the quantitative contribution weight of each evaluation index to the quality score. The multiple quantitative contribution weights are sorted in descending order, and the quantitative contribution of each evaluation index to the overall cheese quality score is output. A heatmap of contribution importance and a SHAP dependency graph are generated to distinguish between the advantageous and disadvantageous contribution indicators. The SHAP dependency graph is used to show the linear influence trend on the overall cheese quality score within different value ranges.
6. The method for evaluating the quality of buffalo milk mozzarella cheese according to claim 5, characterized in that, The evaluation results for determining the quality of the buffalo mozzarella cheese based on the contribution include: Based on the comprehensive cheese quality score, buffalo mozzarella cheese is divided into multiple quality grades according to a preset threshold range. Based on the quantitative contribution of each quality evaluation indicator, the key causal factors affecting the current cheese quality are screened out. The system retrieves a pre-defined index suggestion table, matches and outputs corresponding suggestions for adjusting cheese production process parameters for the identified key causative factors, and forms a complete evaluation result that includes quality grade, key causative factors, and process optimization solutions.
7. The method for evaluating the quality of buffalo milk mozzarella cheese according to claim 5, characterized in that, Before obtaining the multi-dimensional evaluation index data of the buffalo milk mozzarella cheese sample, the method further includes: Place the buffalo milk mozzarella cheese sample in an environment with a temperature of 25~30℃ and a relative humidity of 50%~55% for 30~60 minutes to equilibrate, and then perform standardized cutting or shaping.
8. A quality evaluation device for buffalo milk mozzarella cheese, characterized in that, The device includes: The quality evaluation index determination module is used to determine the quality evaluation index of buffalo mozzarella cheese. The quality evaluation index includes a sensory evaluation layer, a texture evaluation layer, and a cheese function evaluation layer. The sensory evaluation layer includes color, flavor, texture, mouthfeel, and heating characteristics. The texture evaluation layer includes hardness, elasticity, cohesiveness, adhesiveness, and chewiness. The cheese function evaluation layer includes melting properties, fat extraction, and stretchability. The multi-dimensional evaluation index data acquisition module is used to acquire multi-dimensional evaluation index data of buffalo mozzarella cheese samples. The evaluation index data includes data on sensory, textural, and cheese function measurements of the buffalo mozzarella cheese samples, which are then recorded. The multi-dimensional evaluation index data processing module is used to perform outlier removal, forward processing, and dimensionless processing on multi-dimensional evaluation index data to obtain target input data. The forward processing is used to convert inverse indicators into positive indicators, and the dimensionless processing is used to eliminate the differences in dimensions and orders of magnitude between evaluation index data of different dimensions, so that the evaluation index data of each dimension are in a uniform numerical range. The target random forest model determination module is used to input the target input data as input variables into the original random forest model, optimize the hyperparameters of the original random forest model, and use the leave-one-out method to train and validate the original random forest model to obtain the target random forest model. The quality comprehensive score determination module is used to input the sample index matrix corresponding to the buffalo mozzarella cheese sample to be tested into the target random forest model to obtain the cheese quality comprehensive score of each sample output by the target random forest model. The sample index matrix is constructed based on the sample sensory index data, sample texture index data and cheese functional index data. The cheese quality comprehensive score of each sample is a comprehensive score of the sample sensory score, sample texture score and cheese functional score. The contribution determination module is used to perform interpretability analysis on the comprehensive quality score of the cheese based on the SHAP algorithm, and to quantify the contribution of each quality evaluation index to the comprehensive quality score of the cheese. The evaluation result determination module is used to determine the evaluation result of the quality of the buffalo mozzarella cheese based on the contribution.
9. An electronic device, characterized in that, The electronic device includes a memory and at least one processor, the memory storing instructions; the at least one processor invokes the instructions in the memory to cause the electronic device to perform the steps of the method for evaluating the quality of buffalo mozzarella cheese as described in any one of claims 1-7.
10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the various steps of the method for evaluating the quality of buffalo mozzarella cheese as described in any one of claims 1-7.