Cold fresh beef freshness rapid detection model training method and freshness detection method

By integrating a variety of non-destructive technologies and machine learning models, the problem of poor freshness detection performance of beef is solved, and fast, accurate and non-destructive freshness detection is achieved, meeting the needs of the modern food industry.

CN119989178APending Publication Date: 2025-05-13XIHUA UNIV

Patent Information

Application Number
CN202510451965.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-11
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The existing beef freshness non-destructive testing performance is poor, which is difficult to meet the modern food industry's demand for fast, accurate and non-destructive testing methods.

Method used

By integrating near-infrared spectroscopy, hyperspectral imaging and low-field nuclear magnetic resonance technology, multimodal data is obtained, and a cold fresh beef freshness level detection model and index detection model are constructed through feature extraction, preprocessing and data fusion methods, and a one-dimensional convolutional neural network is used for detection.

Benefits of technology

The freshness detection of cold beef is achieved quickly, accurate and non-destructive. The accuracy of freshness grade reaches 98.5%, and the R²P of quantitative indicators predicts that R²P is more than 0.81, which significantly improves the detection accuracy and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119989178A_ABST
    Figure CN119989178A_ABST
Patent Text Reader

Abstract

The invention discloses a chilled beef freshness rapid detection model training method and a freshness detection method.The chilled beef freshness rapid detection model training method comprises the steps that a chilled beef sample is obtained, and the freshness index of the chilled beef sample is measured, the freshness indexes comprise the sensory score, the color a *, the pH value, the volatile basic nitrogen TVB-N, the thiobarbituric acid reactant TBARS, the total bacterial count TVC, the carbonyl content, the total sulfydryl content and the solubility of the chilled beef sample; establishing a chilled beef freshness grade evaluation standard according to the freshness index; collecting multi-modal data of the chilled beef sample, wherein the multi-modal data comprises near infrared spectrum data NIR, hyperspectral data HSI and low-field nuclear magnetic resonance LF-NMR relaxation time data; performing feature extraction on the multi-modal data through a feature extraction method to obtain multi-modal feature data; and carrying out preprocessing on the multi-modal characteristic data through a standardization SS and a Savitzky-Golay smooth filtering SG preprocessing method so as to obtain preprocessed data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of non-destructive food testing, and in particular to a rapid detection model training method for the freshness of chilled beef and a freshness detection method. Background Technology

[0002] Fresh beef has become an important product in the meat market due to its rich nutrients and high-quality taste, and is widely favored by consumers. However, due to its high moisture and protein content, beef is also prone to spoilage. This deterioration not only affects consumers' purchasing experience, but also poses a serious threat to meat safety and market competitiveness. Therefore, ensuring the freshness of fresh beef has become a crucial part of the meat production, storage, transportation and sales process.

[0003] The freshness of livestock products is usually evaluated by sensory scores, color a*, pH value, volatile basic nitrogen TVB-N, thiobarbituric acid reactants TBARS, total bacterial count TVC, carbonyl, total thiol, surface hydrophobicity and solubility. Freshness is an important factor in determining the quality and taste of livestock products. Relevant studies have shown that these parameters are closely related to the freshness of livestock products. Sensory scores are usually scored by professionals based on appearance, smell, taste, etc., but this type of subjective evaluation method is often affected by personal perception differences and external environment, and the evaluation process is time-consuming and has low repeatability. In contrast, the detection method based on objective instruments provides higher accuracy and reliability, and is less affected by human factors. Color a* value is one of the important indicators for evaluating the freshness of livestock products. It reflects the color difference change of the product, especially during the oxidation process. The change in color can directly affect consumers' perception of the freshness of the product. pH value is another key indicator. Its change reflects the change in the pH of meat during storage. Usually, the pH decreases during the deterioration of meat. Volatile basic nitrogen TVB-N and thiobarbituric acid reactants TBARS are common indicators for evaluating the quality and freshness of livestock products, which are related to protein denaturation and fat oxidation. With the extension of storage time, the values ​​of volatile basic nitrogen TVB-N and thiobarbituric acid reactants TBARS will increase, reflecting the degree of degradation and oxidation of the product. The increase in total bacterial count TVC and chemical markers such as carbonyl and total thiol also indicates the biodegradation and oxidation process of the product, both of which are closely related to the freshness of the product. Carbonyl and total thiol are often used as indicators of meat oxidation, which can reflect the degree of oxidation of meat fat and protein. Surface hydrophobicity and solubility are important physical parameters for evaluating the tissue structure of livestock products. Surface hydrophobicity and solubility are closely related to properties such as water retention, texture and storage stability, and can provide information about the structural changes of livestock products during storage. Through the comprehensive analysis of these physical and chemical properties, the freshness and quality changes of livestock products can be accurately evaluated. However, these methods require a long time and complex experimental equipment, and are somewhat destructive. Once the sample is analyzed, it can no longer be used for other evaluations. In this context, with the continuous advancement of science and technology, especially the rapid development of regression algorithms, artificial intelligence and spectroscopy technology, non-destructive, real-time and efficient detection methods have gradually become an important direction in the study of freshness assessment of chilled beef. Technologies such as near-infrared spectroscopy, hyperspectral imaging and low-field nuclear magnetic resonance have gradually become popular technologies for freshness detection due to their application advantages in food quality control. These non-destructive technologies can not only provide fast, accurate and real-time quality assessment, but also obtain multi-dimensional information of meat without destroying the sample, thereby comprehensively analyzing its freshness. By combining these technologies and supplementing them with data fusion technology, the limitations of a single data source can be effectively overcome, thereby improving the accuracy and robustness of freshness prediction.In addition, due to the complexity of spectral information and high noise, how to pre-process the spectrum and mine freshness-related features from a large amount of multimodal data is the key to improving detection accuracy. Therefore, due to the heterogeneity of samples and the complexity of processing methods, the accurate and objective evaluation of beef freshness is challenging and difficult to meet the needs of the modern food industry for fast, accurate, and non-destructive detection methods. SUMMARY OF THE INVENTION

[0004] The purpose of the present invention is to provide a method for training a model for rapid detection of the freshness of cold fresh beef and a method for detecting the freshness, so as to solve the problem of poor performance of the existing non-destructive detection of the freshness of beef.

[0005] The first aspect of the present invention provides a method for training a rapid detection model for freshness of fresh beef, comprising: obtaining a fresh beef sample, and determining the freshness index of the fresh beef sample, wherein the freshness index comprises: sensory score, color a*, pH value, volatile basic nitrogen TVB-N, thiobarbituric acid reactant TBARS, total bacterial count TVC, carbonyl content, total thiol content, and solubility of the fresh beef sample; Establish a freshness grade evaluation standard for chilled beef based on the freshness index; Collecting multimodal data of the chilled fresh beef sample, wherein the multimodal data includes near infrared spectral data NIR, hyperspectral data HSI and low field nuclear magnetic resonance LF-NMR data; Extracting features from the multimodal data by a feature extraction method to obtain multimodal feature data, the feature extraction method includes: random forest feature selection RF-FI and adaptive reweighted sampling CARS; preprocessing the multimodal feature data by a preprocessing method to obtain preprocessed data, the preprocessing method includes: standardization SS and Savitzky-Golay smoothing filter SG; performing feature-level data fusion on the preprocessed data to obtain a multimodal feature set; dividing the multimodal feature set into a training set and a validation set; Based on the freshness grade evaluation standard and the one-dimensional convolutional neural network 1D-CNN, a cold fresh beef freshness grade detection model is constructed; Based on the freshness index and the one-dimensional convolutional neural network 1D-CNN, a cold fresh beef freshness index detection model is constructed; The training set is respectively input into the chilled beef freshness grade detection model and the chilled beef freshness index detection model for model training; The validation set is respectively input into the trained fresh beef freshness grade detection model and the fresh beef freshness index detection model to obtain the grade detection result and index detection result of fresh beef; according to the index detection result and grade detection result, the hyperparameters of the fresh beef freshness grade detection model and the fresh beef freshness index detection model are adjusted to obtain the optimal fresh beef freshness grade detection model and fresh beef freshness index detection model.

[0006] Furthermore, a standard for judging the freshness grade of chilled beef is established based on the freshness index, including: performing Pearson correlation analysis on the freshness index and selecting two representative indexes, the representative indexes being volatile basic nitrogen TVB-N and total bacterial count TVC; dividing the freshness of beef into three grades based on the two representative indexes, namely, high-quality, good and corrupt; wherein, when TVC < ​​4 (lg CFU / g) and TVB-N < 10 (mg / 100g), the meat quality is high-quality; when 4 (lgCFU / g) ≤ TVC ≤ 6 (lg CFU / g) and 10 (mg / 100g) ≤ TVB-N < 15 (mg / 100g), the meat quality is good; when TVC>6 (lg CFU / g) and TVB-N ≥ 15 (mg / 100g), the meat quality is corrupt.

[0007] Furthermore, the multimodal data of the fresh beef sample is collected, including: collecting the near infrared data NIR of the fresh beef sample at a wavelength of 1000-1800nm ​​through a near infrared analyzer; collecting the hyperspectral data HSI of the fresh beef sample at a wavelength of 380-1015nm through a hyperspectral imager; collecting the low-field nuclear magnetic resonance LF-NMR relaxation time data of the fresh beef sample through a low-field nuclear magnetic resonance analyzer.

[0008] Furthermore, the multimodal data is subjected to feature extraction by using the random forest feature selection RF-FI feature extraction method and the adaptive reweighted sampling CARS feature extraction method, respectively, to obtain hierarchical multimodal feature data and index multimodal feature data.

[0009] Furthermore, the multimodal feature data is preprocessed by a preprocessing method to obtain preprocessed data, including: performing standardized SS preprocessing on the level multimodal feature data to obtain level preprocessed data; performing standardized SS and Savitzky-Golay smoothing filter SG preprocessing on the index multimodal feature data to obtain index preprocessed data.

[0010] Furthermore, the preprocessed data is subjected to feature-level data fusion to obtain a multimodal feature set, including: the level preprocessed data is subjected to feature-level data fusion to obtain a level multimodal feature set; the index preprocessed data is subjected to feature-level data fusion to obtain an index multimodal feature set.

[0011] Furthermore, the multimodal feature set is divided into a training set and a validation set, including: using 5-fold cross validation to divide the level multimodal feature set into a level training set and a level validation set; using 5-fold cross validation to divide the index multimodal feature set into an index training set and an index validation set.

[0012] Furthermore, the training set is respectively input into the fresh beef freshness grade detection model and the fresh beef freshness index detection model for model training, and the verification set is respectively input into the trained fresh beef freshness grade detection model and the fresh beef freshness index detection model to obtain the fresh beef grade detection result and index detection result, including: respectively inputting the grade training set and the index training set into the fresh beef freshness grade detection model and the fresh beef freshness index detection model for training; respectively inputting the grade verification set and the index verification set into the trained fresh beef freshness grade detection model and the fresh beef freshness index detection model to obtain the fresh beef grade detection result and index detection result.

[0013] Furthermore, the hyperparameters of the fresh beef freshness grade detection model and the fresh beef freshness index detection model are adjusted according to the index detection results and the grade detection results, including: calculating the classification accuracy based on the confusion matrix of the grade detection results and the true labels, performing grid search in the preset hyperparameter space, and selecting the hyperparameter combination that maximizes the classification accuracy as the hyperparameter of the fresh beef freshness grade detection model; calculating RMSEP based on the residual sum of squares between the index detection results and the measured values, grid traversing the hyperparameters, and selecting the hyperparameter configuration of the fresh beef freshness index detection model with RMSEP minimization as the convergence criterion.

[0014] The second aspect of the present invention provides a method for rapid detection of freshness of chilled beef, comprising: sample preparation: preparing beef samples within 24 hours after slaughter in a size of 2cm×2cm×1.5cm, and storing them at a constant temperature of 4°C for 1-10 days to obtain chilled beef samples; Multimodal data acquisition: the cold fresh beef samples are scanned by a near infrared analyzer, a hyperspectral imager, and a low-field nuclear magnetic resonance analyzer to obtain multimodal data; The multimodal data are respectively input into a cold fresh beef freshness grade detection model and a cold fresh beef freshness index detection model to obtain a cold fresh beef grade detection result and an index detection result, wherein the cold fresh beef freshness grade detection model and the cold fresh beef freshness index detection model are trained according to any of the above-mentioned cold fresh beef freshness rapid detection model training methods.

[0015] The present invention includes at least the following beneficial effects: The present invention integrates three technologies, namely near-infrared spectroscopy, hyperspectral imaging and low-field nuclear magnetic resonance, to obtain near-infrared data NIR, hyperspectral data HSI and low-field nuclear magnetic resonance LF-NMR data, and comprehensively captures the physical, chemical and molecular characteristics of the quality of fresh cold beef, thereby realizing the efficient fusion of multi-dimensional information. The pre-processing method of the present invention selects standardized SS and Savitzky-Golay smoothing filter SG. Standardized SS uses Z-score standardization to make the characteristics of each spectral band meet the zero mean, eliminate the dimensional difference and numerical range bias between multimodal features, and Savitzky-Golay smoothing filter SG effectively suppresses spectral noise and enhances the resolution of characteristic peaks, thereby improving the generalization ability and detection accuracy of the detection model for multimodal data. The key variables in the data are accurately screened by random forest feature selection RF-FI and adaptive reweighted sampling CARS feature extraction method, which optimizes the data input quality, reduces the interference of redundant information, and further improves the detection accuracy of the model. By adopting the feature-level data fusion method, a complementary multimodal feature set is constructed, which further reduces data redundancy, thereby improving the detection accuracy of the model. The one-dimensional convolutional neural network model 1D-CNN breaks through the limitations of traditional detection methods in the classification of cold fresh beef grades and the accuracy of index detection. The detection process does not require complex sample pre-treatment or destructive operations, avoiding destructive waste of samples, ensuring the subsequent availability of samples, and improving the efficiency of cold fresh beef freshness detection. It shortens the time required for traditional laboratory testing from several hours to minutes, fully meeting the real-time detection needs of cold chain transportation and terminal sales.

[0016] This paper optimizes the whole process from data collection to model deployment, constructs a cold fresh beef freshness grade detection model and a cold fresh beef freshness index detection model, the freshness grade accuracy rate reaches 98.5%, and the quantitative index prediction R² P All exceeded 0.81. This significantly improved the accuracy of freshness detection of cold fresh beef and ensured the reliability and scientificity of the test results.

[0017] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments. Brief Description of the Figures

[0018] Figure 1This is a flow chart of a method for training a model for rapid detection of freshness of chilled beef in the present invention; Figure 2 The indicator data change trend diagram of beef stored at 4°C for different days provided by the present invention; Figure 3 The multimodal data map of beef stored at 4°C for different days provided by the present invention; Figure 4 This is the Pearson correlation coefficient heat map provided by the present invention.

[0019] Letter mark in the picture: Figure 2 (a) is the sensory score, (b) is the color a*, (c) is the pH value, (d) is the volatile basic nitrogen TVB-N, (e) is the thiobarbituric acid reactant TBARS, (f) is the total bacterial count TVC, (g) is the carbonyl group, (h) is the total thiol group, (i) is the surface hydrophobicity, and (j) is the solubility; Figure 3 (a) is near-infrared NIR data, (b) is hyperspectral HSI data, and (c) is low-field nuclear magnetic resonance LF-NMR data. Specific implementation method

[0020] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. It should be understood that the various steps recorded in the method implementation of the present disclosure can be executed in different orders and / or in parallel. In addition, the method implementation may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0021] Example 1 The first aspect of the embodiment of the present invention provides a method for training a model for rapid detection of freshness of fresh beef, comprising: obtaining fresh beef samples, and selecting fresh beef samples (the part of the beef) within 24 hours after slaughter to ensure the representativeness and scientificity of the experimental data. To ensure the uniformity and comparability of data collection, the beef samples are processed into standard specifications with a size of 2cm×2cm×1.5cm. After the samples are processed, they are stored under a constant temperature and refrigeration condition of 4°C, and the relevant indicators are regularly measured and analyzed from the first to the tenth day of storage, thereby comprehensively covering the key stages of beef quality from freshness to deterioration.

[0022] Determine the freshness index of the cold fresh beef sample, the freshness index includes: sensory score, color a*, pH value, volatile basic nitrogen TVB-N, thiobarbituric acid reactant TBARS, total bacterial count TVC, carbonyl, total thiol, surface hydrophobicity and solubility of the cold fresh beef sample. Figure 2 ​As shown, according to the national standards GB 2707-2016 "National Food Safety Standard for Fresh (Frozen) Livestock and Poultry Products", GB 4789.2-2022 "National Food Safety Standard for Food Microbiological Examination for Total Colony Count Determination" and related literature methods, the freshness change data of fresh beef samples stored at a constant temperature of 4°C for 1 to 10 days were collected. Through comprehensive determination of multiple indicators, the dynamic change law of quality deterioration of fresh beef samples during refrigeration is comprehensively analyzed, providing a scientific basis for optimizing cold chain storage conditions, improving meat quality and extending shelf life, while ensuring that the data collection and analysis process strictly follow the specifications, thereby ensuring the reliability and reference value of the experimental results.

[0023] Among them, the determination method of volatile basic nitrogen TVB-N is as follows: mince the beef, weigh 5g and put it in a 500 mL distillation tube, add 37.5mL distilled water, shake well, let it stand for 30 min, use distilled water as the blank control group, add 1g magnesium oxide and immediately measure it on the machine, after the reaction is completed, use 0.010 mol / L hydrochloric acid standard titration solution for calibration, and the titration is completed when the solution turns purple-red. The test parameters are set as: alkali and water volume 0 mL, 20 g / L boric acid receiving solution 30 mL, distillation time 180s, measure once a day, and repeat each sample 3 times.

[0024] The method for determining the total bacterial count TVC is as follows: mince the beef, accurately weigh 5±0.5g under sterile conditions, and add 45mL sterile saline (0.85%). After mixing evenly, dilute the dilutions by 10 times in multiple concentration gradients, take the dilutions of different concentration gradients into PCA culture medium, wait for solidification, and culture at 36±1℃ for 48±2 hours. The results are expressed in log CFU (colony forming unit) g.

[0025] Establish a freshness grade evaluation standard for chilled beef based on freshness index; extract features from multimodal data by feature extraction method to obtain multimodal feature data, the feature extraction method includes: random forest feature selection RF-FI and adaptive reweighted sampling CARS; preprocess the multimodal feature data by preprocessing method to obtain preprocessed data, the preprocessing method includes: standardized SS and Savitzky-Golay smoothing filter SG; perform feature-level data fusion on the preprocessed data to obtain a multimodal feature set; divide the multimodal feature set into a training set and a validation set; Feature extraction methods include recursive feature elimination RFE, random forest feature selection RF-FI, gradient boosting machine GBM, adaptive reweighted sampling CARS and continuous projection algorithm SPA, etc., preprocessing methods include standardized SS, multivariate scattering correction MSC, vector normalization VN, baseline correction BC and detrending DT, Savitzky-Golay smoothing filter SG, etc., data fusion methods include data-level fusion and feature-level fusion, and the present invention selects standardized SS preprocessing method, random forest feature selection RF-FI feature extraction method and feature-level data fusion method in the cold fresh beef freshness grade detection model through comparative experiments, and selects SG+SS preprocessing method, adaptive reweighted sampling CARS feature extraction method and feature-level data fusion method in the cold fresh beef freshness index detection model. Among them, standardized SS makes each spectral band feature meet zero mean through Z-score standardization, eliminates the dimensional difference and numerical range bias between multimodal features, and Savitzky-Golay smoothing filter SG effectively suppresses spectral noise and enhances the resolution of characteristic peaks, thereby improving the generalization ability and detection accuracy of the freshness detection model for multimodal data. The random forest feature selection RF-FI and adaptive reweighted sampling CARS feature extraction methods accurately screened the key variables in the data, optimized the data input quality, reduced the interference of redundant information, and further improved the model detection accuracy. By using the feature-level data fusion method to optimize the fusion of key features, a complementary multimodal feature set was constructed, which further reduced data redundancy and improved the detection accuracy of the model.

[0026] Based on the freshness grade evaluation criteria and the one-dimensional convolutional neural network model 1D-CNN, a cold fresh beef freshness grade detection model is constructed; based on the freshness index and the one-dimensional convolutional neural network model 1D-CNN, a cold fresh beef freshness index detection model is constructed. In the present invention, two detection models are constructed, namely, a cold fresh beef freshness grade detection model and a cold fresh beef freshness index detection model, which are used to detect the freshness grade of cold fresh beef and the freshness index data of cold fresh beef, respectively.

[0027] The training set is input into the fresh beef freshness grade detection model and the fresh beef freshness index detection model for model training; the validation set is input into the trained fresh beef freshness grade detection model and the fresh beef freshness index detection model to obtain the grade detection results and index detection results of fresh beef; according to the index detection results and grade detection results, the hyperparameters of the fresh beef freshness grade detection model and the fresh beef freshness index detection model are adjusted to obtain the optimal fresh beef freshness grade detection model and the fresh beef freshness index detection model.

[0028] The present invention obtains near-infrared data NIR, hyperspectral data HSI and low-field nuclear magnetic resonance data by integrating three technologies: near-infrared spectroscopy, hyperspectral imaging and low-field nuclear magnetic resonance, and comprehensively captures the physical, chemical and molecular characteristics of the quality of fresh beef, thereby realizing efficient fusion of multi-dimensional information. Through the one-dimensional convolutional neural network model 1D-CNN, the limitations of traditional detection methods in the classification of fresh beef grades and the accuracy of index detection have been broken through. The detection process does not require complex sample pretreatment or destructive operations, avoiding destructive waste of samples, ensuring the subsequent availability of samples, and improving the efficiency of freshness detection of fresh beef. The time taken by traditional laboratory detection is shortened from several hours to minutes, fully meeting the real-time detection needs of cold chain transportation and terminal sales.

[0029] This paper optimizes the whole process from data collection to model deployment, constructs a cold fresh beef freshness grade detection model and a cold fresh beef freshness index detection model, the freshness grade accuracy rate reaches 98.5%, and the quantitative index prediction R 2 P All exceeded 0.81, which significantly improved the accuracy of freshness detection of cold fresh beef and ensured the reliability and scientificity of the test results.

[0030] Furthermore, the freshness grade evaluation standard of chilled beef is established based on the freshness index, including: conducting Pearson correlation analysis on the freshness index, selecting two representative indexes, the representative indexes are volatile basic nitrogen TVB-N and total bacterial count TVC; dividing the freshness of beef into three grades according to the two representative indexes, namely high-quality, good and corrupt; among them, when TVC < ​​4 (lg CFU / g) and TVB-N < 10 (mg / 100g), the meat quality is high-quality; when 4 (lg CFU / g) ≤ TVC ≤ 6 (lg CFU / g) and 10 (mg / 100g) ≤ TVB-N < 15 (mg / 100g), the meat quality is good; when TVC> 6 (lgCFU / g) and TVB-N ≥ 15 (mg / 100g), the meat quality is corrupt. If Figure 4 , analyzed the relationship between beef freshness related indicators, and selected the two most representative indicators based on Pearson correlation analysis, among which sensory scores had a strong positive correlation with indicators such as volatile basic nitrogen TVB-N and total bacterial count TVC. By judging the values ​​of total bacterial count TVC and volatile basic nitrogen TVB-N, the freshness of beef can be divided into three categories: high quality, good and corrupt.

[0031] Furthermore, the multimodal data of the fresh beef samples are collected, including: collecting the near infrared data NIR of the fresh beef samples at a wavelength of 1000-1800nm ​​through a near infrared analyzer; collecting the hyperspectral data HSI of the fresh beef samples at a wavelength of 380-1015nm through a hyperspectral imager; and collecting the low-field nuclear magnetic resonance LF-NMR relaxation time data of the fresh beef samples through a low-field nuclear magnetic resonance analyzer. Figure 3 , SupNIR-2720 near-infrared analyzer was used to collect near-infrared data NIR, and the wavelength range was set to 1000-1800nm. Infrared spectroscopy is mainly used to capture the dynamic changes of chemical components in beef, including indicators such as moisture, protein and lipids, and can quickly characterize the molecular structure characteristics of the sample. Hyperspectral data HSI was collected using V10E-HR hyperspectral imager, and the wavelength range was set to 380-1015nm. Hyperspectral imaging generates hyperspectral images of samples by capturing spatial and spectral information at the same time, which can sensitively reflect color changes, surface uniformity and texture characteristics. The MesoMR23-040V-I low-field nuclear magnetic resonance analyzer was used to measure the internal LF-NMR relaxation time data of beef samples, thereby capturing the moisture state of the sample and its molecular motion characteristics.

[0032] Furthermore, feature extraction is performed on multimodal data by using the random forest feature selection RF-FI feature extraction method and the adaptive reweighted sampling CARS feature extraction method, respectively, to obtain hierarchical multimodal feature data and index multimodal feature data. In the present invention, feature extraction is performed on multimodal data by using the random forest feature selection RF-FI and the adaptive reweighted algorithm CARS feature extraction method, respectively, to obtain corresponding hierarchical multimodal feature data and index multimodal feature data; wherein, the random forest feature selection RF-FI improves the classification contribution of each variable based on the purity of the decision tree nodes, and realizes the quantitative ranking of feature importance. The adaptive reweighted sampling CARS accurately extracts the key spectral bands that reflect the dynamics of material decay through Monte Carlo sampling and iterative optimization of PLS ​​regression weights.

[0033] ​Furthermore, the grade multimodal feature data is subjected to standardized SS preprocessing to obtain grade preprocessed data; the indicator multimodal feature data is subjected to standardized SS and Savitzky-Golay smoothing filter SG preprocessing to obtain indicator preprocessed data. The grade preprocessed data is subjected to feature-level data fusion to obtain a grade multimodal feature set; the indicator preprocessed data is subjected to feature-level data fusion to obtain an indicator multimodal feature set. The grade multimodal feature set is divided into a grade training set and a grade verification set by 5-fold cross validation; the indicator multimodal feature set is divided into an indicator training set and an indicator verification set by 5-fold cross validation. The grade training set is input into the cold fresh beef freshness grade detection model for training; the indicator training set is input into the cold fresh beef freshness indicator detection model for training. The training set is respectively input into the cold fresh beef freshness grade detection model and the cold fresh beef freshness index detection model for model training, and the verification set is respectively input into the trained cold fresh beef freshness grade detection model and the cold fresh beef freshness index detection model to obtain the grade detection result and the index detection result of the cold fresh beef, including: the grade training set and the index training set are respectively input into the cold fresh beef freshness grade detection model and the cold fresh beef freshness index detection model for training; the grade verification set and the index verification set are respectively input into the trained cold fresh beef freshness grade detection model and the cold fresh beef freshness index detection model to obtain the grade detection result and the index detection result of the cold fresh beef.

[0034] Furthermore, the hyperparameters of the fresh beef freshness grade detection model and the fresh beef freshness index detection model are adjusted according to the index detection results and the grade detection results, including: calculating the classification accuracy based on the confusion matrix of the grade detection results and the true labels, performing grid search in the preset hyperparameter space, and selecting the hyperparameter combination that maximizes the classification accuracy as the hyperparameter of the fresh beef freshness grade detection model; calculating the RMSEP based on the residual sum of squares between the index detection results and the measured values, traversing the hyperparameters in the grid, and selecting the hyperparameter configuration of the fresh beef freshness index detection model with RMSEP minimization as the convergence criterion.

[0035] In the optimization stage of the cold fresh beef freshness grade detection model, the classification accuracy is calculated based on the grade detection results of the grade verification set and the confusion matrix of the true label. An exhaustive search is performed in the preset hyperparameter space, and the hyperparameter combination that maximizes the classification accuracy is selected as the parameter of the cold fresh beef freshness grade detection model, thereby ensuring the best match between the grade discrimination boundary and the data distribution and improving the accuracy of grade detection. In the optimization process of the cold fresh beef freshness index detection model, the residual sum of squares of the index detection results of the index verification set and the measured value of the cold fresh beef freshness index is used to calculate the root mean square error RMSEP, and the hyperparameters of the cold fresh beef freshness index detection model are grid traversed, and the optimal hyperparameter configuration is determined by minimizing the root mean square error RMSEP as the convergence criterion, thereby reducing the systematic deviation and random error of the cold fresh beef freshness index detection model and improving the index regression accuracy.

[0036] Example 2 The second aspect of the embodiment of the present invention provides a method for rapid detection of freshness of chilled beef, comprising: sample preparation: preparing beef samples within 24 hours after slaughter in a size of 2cm×2cm×1.5cm, and storing them at a constant temperature of 4°C for 1-10 days to obtain chilled beef samples; Multimodal data acquisition: The cold fresh beef samples were scanned by near infrared analyzer, hyperspectral imager and low field nuclear magnetic resonance analyzer to obtain multimodal data; The multimodal data are respectively input into the fresh beef freshness grade detection model and the fresh beef freshness index detection model to obtain the fresh beef grade detection result and the index detection result, wherein the fresh beef freshness grade detection model and the fresh beef freshness index detection model are trained according to a fresh beef freshness rapid detection model training method in the above embodiment.

[0037] Example 3 This embodiment provides a method for rapid detection of the freshness of fresh beef, wherein the preparation of beef samples, determination of beef freshness index, and collection of beef data are the same as in Example 1. The multimodal data of the collected fresh beef samples are preprocessed by different preprocessing methods, and fresh beef freshness grade detection models based on different data sources and different regression algorithm models are established, and compared and verified. The results are shown in Tables 1 to 5.

[0038] Table 1 Performance comparison of freshness grade detection models for cold fresh beef based on NIR single data source

[0039] Table 2 Performance comparison of freshness grade detection models for cold fresh beef based on HSI single data source

[0040] Table 3 Performance comparison of freshness grade models for cold fresh beef based on LF-NMR single data source

[0041] Table 4 Performance of freshness grade model of chilled beef based on NIR+HSI data source

[0042] Table 5 Performance of the freshness grade detection model for cold fresh beef based on NIR+HSI+LF-NMR data sources

[0043] In the table, NP means no preprocessing method; SS means standardization preprocessing; MSC means multivariate scattering correction preprocessing, which is used to eliminate the spectral baseline offset and drift caused by the scattering effect by fitting the linear relationship between each sample and the reference spectrum; VN means vector normalization preprocessing, which is used to eliminate the interference of optical path or scattering; BC means baseline correction preprocessing, which is used to eliminate low-frequency drift or background signal in the spectrum; SG means Savitzky-Golay smoothing filter preprocessing; NIR means near-infrared data, HSI means hyperspectral data, and LF-NMR means low-field nuclear magnetic resonance data; KNN means K-nearest neighbor algorithm, SVM means support vector machine, 1D-CNN means one-dimensional convolutional neural network, ANN means artificial neural network, RNN means recurrent neural network, and LSTM means long short-term memory network; From Tables 1 to 5, we can see that the accuracy of the NIR+HSI+LF-NMR data source combined with the standardized SS preprocessing method and the one-dimensional convolutional neural network 1D-CNN in the training set is 0.9912, and the accuracy of the validation set is 0.9750, which is significantly better than other solutions. It shows that combining multiple data sources and using appropriate preprocessing methods can greatly improve the performance of the cold fresh beef freshness grade detection model, and the optimal data source is NIR+HSI+LF-NMR, the optimal preprocessing method is standardized SS, and the optimal regression algorithm model is the one-dimensional convolutional neural network 1D-CNN.

[0044] Example 4 This embodiment provides a method for rapid detection of the freshness of chilled beef, wherein the preparation of beef samples, determination of beef freshness indexes, and collection of beef data are the same as those in Embodiment 1. This embodiment is to establish a chilled beef freshness grade detection model, the difference being that this embodiment uses the gradient boosting classifier GBM, recursive feature elimination RFE, and random forest feature selection RF-FI feature extraction methods to extract features from NIR+HSI+LF-NMR data sources respectively, and compares them. The results are shown in Table 6.

[0045] Table 6 Performance comparison of fresh beef freshness grade detection models based on NIR+HSI+LF-NMR data sources

[0046] In Table 6, the effects of different feature extraction methods on the accuracy of the 1D-CNN model are analyzed. The accuracy of the gradient boosting classifier GBM and the random forest feature selection RF-FI method on the validation set both reached 0.9850, and the validation set accuracy of the recursive feature elimination RFE method was 0.9750. In this scheme, the random forest feature selection RF-FI method is selected as the feature extraction method used in the chilled beef freshness grade model, and the GBM feature extraction method can be used as a supplementary scheme.

[0047] Example 5 This embodiment provides a method for rapid detection of the freshness of fresh beef, wherein the preparation of different beef samples, determination of beef freshness index, and collection of beef data are the same as in Example 1, except that this embodiment establishes a detection model for the freshness index of fresh beef, and compares the performance of different regression algorithm models under different pretreatment methods in detecting the freshness index of fresh beef. The results are shown in Tables 7 to 9.

[0048] Table 7 Performance analysis of the training and validation sets of the PLSR model in beef freshness index detection

[0049] Table 7 (Continued 1)

[0050] Table 7 (Continued 2)

[0051] Table 8 Performance analysis of training and validation sets of ANN model in beef freshness index detection

[0052] Table 8 (Continued 1)

[0053] Table 8 (Continued 2)

[0054] Table 9 Performance analysis of 1D-CNN model in beef freshness index detection on training and validation sets

[0055] Table 9 (Continued 1)

[0056] Table 9 (Continued 2)

[0057] In the table, FD represents the first-order derivative, which is used to calculate the first-order derivative of the spectral data to eliminate baseline drift and enhance the resolution of peak position and peak shape; R²c is the calibration set determination coefficient, which represents the goodness of fit of the model to the calibration set data, and the value range is 0≤ R² ≤ 1, the closer R²c is to 1, the better the model fits the calibration set; RMSEC is the root mean square error of the calibration set, which indicates the average error between the model prediction value and the true value of the calibration set. The smaller RMSEC is, the more accurate the model's prediction of the training data is; RPDC is the residual prediction deviation of the calibration set, which is used to measure the model's prediction ability for the calibration set data. The larger the RPDC is, the stronger the model's prediction ability for the training data is; R²p is the prediction set determination coefficient, which indicates the model's explanatory power for the prediction set data. The closer R²p is to 1, the more reliable the model's prediction of unknown data is; RMSEP is the root mean square error of the prediction set, which indicates the average prediction error of the model for the prediction set. The smaller RMSEP is, the higher the accuracy of the model in practical applications; RPDP is the residual prediction deviation of the prediction set, which is used to evaluate the model's prediction ability for unknown data. The larger the RPDP is, the better the generalization performance of the model is.

[0058] According to the data in Tables 7-9, when SG+SS pretreatment was used, the validation set R²p of the corresponding freshness indexes were 0.8761, 0.9600, 0.7969, 0.9532, 0.9062, 0.9365, 0.9482, 0.8247, 0.9570 and 0.7373 respectively. The R²p of most indicators exceeded 0.87, and many indicators even exceeded 0.95, indicating that the detection model of freshness index of cold fresh beef constructed based on 1D-CNN regression algorithm model has higher detection accuracy, stronger explanatory ability and better stability.

[0059] Example 6 This embodiment provides a method for rapid detection of the freshness of chilled beef, wherein the preparation of beef samples, determination of beef freshness index, and collection of beef data are the same as in Example 1. This embodiment is to establish a chilled beef freshness index detection model, the difference being that this embodiment uses different feature selection methods and SG+SS pretreatment methods to conduct experimental comparisons on the collected near infrared spectrum, hyperspectral spectrum, and low-field nuclear magnetic resonance LF-NMR relaxation time data, respectively. The results are shown in Tables 10 to 12.

[0060] Table 10 Comparison of the number of eigenvalues ​​extracted by different feature extraction methods in multimodal data

[0061] Table 10 (Continued 1)

[0062] Table 11 Performance evaluation of 1D-CNN model under different feature extraction methods

[0063] Table 11 (Continued 1)

[0064] Table 12 Performance comparison of 1D-CNN model under feature-level and data-level fusion methods

[0065] Combined with the comprehensive evaluation of Tables 10 and 11, the combination of CARS+SG+SS was confirmed as the optimal method system for multi-index detection of freshness of chilled beef. The experimental results show that the adaptive reweighted sampling CARS algorithm achieved an average feature number reduction ratio of 61.3% on the NIR, HSI and LF-NMR feature sets, which is lower than the dimensionality reduction strategies of random forest feature selection RF-FI (90.5%) and gradient boosting classification tree GBM (86.6%), but it retains the key spectral response range (such as 21.2% of NIR features in color a*) through the dynamic weight optimization mechanism, avoiding the mistaken elimination of high-information bands. The RPDP of CARS+SG+SS in the validation set in spectrally sensitive indicators (color a*, thiobarbituric acid reactant TBARS) reached 6.8117 and 4.3529 respectively, and 80% of the 10 indicators achieved RPDP>3.0 and R²p>0.90, which was significantly higher than other methods, indicating that SG+SS effectively improved the correlation strength between features and biochemical indicators by eliminating high-frequency noise through spectral smoothing and dimensional differences through standardization.

[0066] Based on the comparative analysis of feature-level and data-level fusion methods in Table 12, the feature-level fusion model using adaptive reweighted sampling CARS feature extraction showed significant advantages in the prediction of key corruption indicators such as color a* (R²p=0.9748), volatile basic nitrogen TVB-N (R²p=0.9427), thiobarbituric acid reactants TBARS (R²p =0.9330), total bacterial count TVC (R²p =0.9448) and carbonyl (R²p=0.9468). Its validation set R²p was improved by an average of 0.02-0.05 compared with the data-level fusion method, and the RMSEP was reduced by 12.3%-38.6%, indicating that adaptive reweighted sampling CARS can effectively eliminate redundant information of multimodal data and improve the sensitivity of the model to core quality indicators. Feature-level fusion combined with the adaptive reweighted sampling CARS feature extraction method reduces the modeling feature dimension by 52.4%-79.6%, significantly improving the model calculation efficiency and industrial applicability.

[0067] It should also be noted that the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device that includes a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, commodity or device. In the absence of further restrictions, the elements defined by the sentence "includes one..." do not exclude the existence of other identical elements in the process, method, commodity or device that includes the elements. The words first, second, etc. are used to indicate names, and do not indicate any particular order. The above schematically describes the invention and its implementation methods, which is not restrictive. The invention can be implemented in other specific forms without departing from the spirit or basic characteristics of the invention.

Claims

1. A method for rapid detection model training of freshness of chilled beef, characterized in that: include: Obtain a chilled fresh beef sample, and determine the freshness index of the chilled fresh beef sample, wherein the freshness index includes: sensory score, color a*, pH value, volatile basic nitrogen TVB-N, thiobarbituric acid reactant TBARS, total bacterial count TVC, carbonyl content, total thiol content, and solubility of the chilled fresh beef sample; Establishing a freshness grade evaluation standard for chilled beef based on the freshness index; Collecting multimodal data of the chilled fresh beef sample, wherein the multimodal data includes near infrared spectral data NIR, hyperspectral data HSI and low field nuclear magnetic resonance LF-NMR data; Extracting features from the multimodal data by a feature extraction method to obtain multimodal feature data, the feature extraction method includes: random forest feature selection RF-FI and adaptive reweighted sampling CARS; preprocessing the multimodal feature data by a preprocessing method to obtain preprocessed data, the preprocessing method includes: standardization SS and Savitzky-Golay smoothing filter SG; performing feature-level data fusion on the preprocessed data to obtain a multimodal feature set; dividing the multimodal feature set into a training set and a validation set; A chilled beef freshness grade detection model is constructed based on the freshness grade evaluation standard and a one-dimensional convolutional neural network 1D-CNN; a chilled beef freshness index detection model is constructed based on the freshness index and a one-dimensional convolutional neural network 1D-CNN; The training set is respectively input into the chilled beef freshness grade detection model and the chilled beef freshness index detection model for model training; The validation set is respectively input into the trained fresh beef freshness grade detection model and the fresh beef freshness index detection model to obtain the grade detection result and index detection result of the fresh beef; and the hyperparameters of the fresh beef freshness grade detection model and the fresh beef freshness index detection model are adjusted according to the index detection result and the grade detection result to obtain the optimal fresh beef freshness grade detection model and the fresh beef freshness index detection model.

2. A method for rapid detection model training of freshness of chilled fresh beef according to claim 1, characterized in that: According to the freshness index, the freshness grade evaluation criteria of chilled beef are established, including: Pearson correlation analysis was performed on the freshness indexes, and two representative indexes were selected, the representative indexes being volatile basic nitrogen TVB-N and total bacterial count TVC; According to the two representative indicators, the freshness of beef is divided into three levels, namely, high-quality, good and rotten; among them, when TVC < ​​4 (lg CFU / g) and TVB-N < 10 (mg / 100g), the meat quality is high-quality; when 4 (lg CFU / g) ≤ TVC ≤ 6 (lg CFU / g) and 10 (mg / 100g) ≤ TVB-N < 15 (mg / 100g), the meat quality is good; when TVC>6 (lgCFU / g) and TVB-N ≥ 15 (mg / 100g), the meat quality is rotten.

3. A method for rapid detection model training of freshness of chilled fresh beef according to claim 1, characterized in that: The multimodal data of the fresh beef sample is collected, including: collecting near infrared data NIR of the fresh beef sample at a wavelength of 1000-1800nm ​​by a near infrared analyzer; collecting hyperspectral data HSI of the fresh beef sample at a wavelength of 380-1015nm by a hyperspectral imager; and collecting low-field nuclear magnetic resonance LF-NMR relaxation time data of the fresh beef sample by a low-field nuclear magnetic resonance analyzer.

4. A method for rapid detection model training of freshness of chilled fresh beef according to claim 3, characterized in that: Extracting features from the multimodal data using a feature extraction method to obtain multimodal feature data includes: The multimodal data are respectively subjected to feature extraction by a random forest feature selection RF-FI feature extraction method and an adaptive reweighted sampling CARS feature extraction method to obtain hierarchical multimodal feature data and index multimodal feature data.

5. A method for rapid detection model training of freshness of chilled fresh beef according to claim 4, characterized in that: Preprocessing the multimodal feature data by a preprocessing method to obtain preprocessed data includes: Performing standardized SS preprocessing on the hierarchical multimodal feature data to obtain hierarchical preprocessed data; The multimodal feature data of the indicator is subjected to standardization SS and Savitzky-Golay smoothing filter SG preprocessing to obtain the indicator preprocessing data.

6. A method for rapid detection model training of freshness of chilled beef according to claim 5, characterized in that: Performing feature-level data fusion on the preprocessed data to obtain a multimodal feature set includes: performing feature-level data fusion on the level preprocessed data to obtain a level multimodal feature set; performing feature-level data fusion on the indicator preprocessed data to obtain an indicator multimodal feature set.

7. A method for rapid detection model training of freshness of chilled fresh beef according to claim 6, characterized in that: The multimodal feature set is divided into a training set and a validation set, including: using 5-fold cross validation to divide the hierarchical multimodal feature set into a hierarchical training set and a hierarchical validation set; using 5-fold cross validation to divide the index multimodal feature set into an index training set and an index validation set.

8. A method for rapid detection model training of freshness of chilled fresh beef according to claim 7, characterized in that: The training set is respectively input into the cold fresh beef freshness grade detection model and the cold fresh beef freshness index detection model for model training, and the validation set is respectively input into the trained cold fresh beef freshness grade detection model and the cold fresh beef freshness index detection model to obtain the grade detection result and the index detection result of the cold fresh beef, including: the grade training set and the index training set are respectively input into the cold fresh beef freshness grade detection model and the cold fresh beef freshness index detection model for training; The grade verification set and the index verification set are respectively input into the trained freshness grade detection model for chilled fresh beef and the freshness index detection model for chilled fresh beef to obtain the grade detection result and the index detection result of chilled fresh beef.

9. A method for rapid detection model training of freshness of chilled fresh beef according to claim 8, characterized in that: The hyper parameters of the chilled beef freshness grade detection model and the chilled beef freshness index detection model are adjusted according to the index detection result and the grade detection result, including: The classification accuracy is calculated based on the confusion matrix of the grade detection result and the true label, a grid search is performed in a preset hyperparameter space, and a hyperparameter combination that maximizes the classification accuracy is selected as the hyperparameter of the chilled beef freshness grade detection model; The RMSEP is calculated based on the residual sum of squares between the index detection result and the measured value, the hyperparameters are grid traversed, and the hyperparameter configuration of the chilled beef freshness index detection model is selected with RMSEP minimization as the convergence criterion.

10. A method for rapid detection of freshness of chilled beef, characterized in that: include: Sample preparation: beef samples within 24 hours after slaughter were prepared in a size of 2 cm × 2 cm × 1.5 cm, and stored at a constant temperature of 4°C for 1-10 days to obtain chilled fresh beef samples; Multimodal data acquisition: scanning the fresh beef sample by a near infrared analyzer, a hyperspectral imager, and a low-field nuclear magnetic resonance analyzer to obtain multimodal data; The multimodal data are respectively input into a chilled beef freshness grade detection model and a chilled beef freshness index detection model to obtain a chilled beef grade detection result and an index detection result, wherein the chilled beef freshness grade detection model and the chilled beef freshness index detection model are trained according to a chilled beef freshness rapid detection model training method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Low field nuclear magnetic resonance-applied frozen beef freshness nondestructive testing method

    CN109444199A

  • Method for detecting total number of bacteria on surface of cooled mutton

    CN117169150A

  • Nondestructive testing method for freshness of chicken

    CN117953490A

  • Chicken freshness detection method and device based on spectrum fusion and medium

    CN118671013A

  • Multi-modal fusion detection method for freshness of pork tenderloin based on deep learning

    CN119691509A

Cited By

  • Fresh beef quality analysis system suitable for beef jerky processing factory

    CN121090442A

  • Food colony detection and analysis method and system based on artificial intelligence

    CN121521798A