A Method and System for Detecting Pork Quality Grade Index Based on Hyperspectral Analysis

CN122567555APending Publication Date: 2026-08-14SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-08
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

现有技术通常利用可见光或近红外光谱建立预测模型;然而,不同解剖部位的肌纤维组成和肌红蛋白含量存在差异,宰后过程中肌红蛋白氧化、糖原酵解、pH下降、蛋白质变性及水分迁移也会引起光谱响应变化,导致不同部位、不同宰后阶段样品之间存在系统性光谱偏差

Benefits of technology

[0016] This application utilizes a single hyperspectral image acquisition to extract the myoglobin concentration index and myoglobin oxidation ratio from the visible light band. Combined with a pre-calibrated regression model, it obtains an estimated oxidation ratio, eliminating the need for anatomical labels and post-slaughter time records on the pork being tested. During near-infrared spectral correction, differences in muscle fiber composition, changes in biochemical state, and their interaction are incorporated into wavelength-by-wavelength regression calculations. The correction amount at each wavelength point can be adjusted according to the actual state of the sample, reducing systematic spectral biases caused by different parts and post-slaughter stages, and improving the comparability of the corrected spectra. Furthermore, a unified partial least squares regression model is used to predict multiple quality parameters, and an ordered logistic regression model is used to generate a quality grade index. This approach balances continuous evaluation and discrete grading, reducing the amount of calibration data and model maintenance costs required for part-specific and time-specific modeling. This improves the consistency, accuracy, and production line applicability of pork quality testing results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122567555A_ABST
    Figure CN122567555A_ABST
Patent Text Reader

Abstract

This application discloses a method and system for detecting pork quality grade index based on hyperspectral imaging. The method includes: acquiring hyperspectral images of pork samples covering the visible and near-infrared bands; performing a standard normal transformation on the average spectrum of the region of interest; calculating the myoglobin concentration index and myoglobin oxidation ratio based on the absorbance at a preset wavelength in the visible light band, and obtaining an estimated oxidation ratio value through a pre-calibrated regression model; using the index, the estimated value, and the wavelength-wise regression coefficients corresponding to their product term to correct for differences in muscle fiber composition, biochemical state deviations, and interactive effects in the near-infrared spectrum; inputting the corrected near-infrared spectrum into a partial least squares regression model to predict multiple quality parameters, and then calculating the quality grade index through an ordered logistic regression model. This application can reduce the influence of different anatomical locations and post-slaughter conditions on the detection results, improving the consistency and applicability of comprehensive pork quality evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of hyperspectral detection technology, and more specifically, to a method and system for detecting pork quality grade index based on hyperspectral imaging. Background Technology

[0002] Pork quality is affected by factors such as anatomical location, muscle fiber composition, post-slaughter time, and cooling conditions. Commonly used evaluation indicators include meat color, pH value, and drip loss rate. Existing methods mostly use colorimeters, pH meters, weighing methods, or chemical analysis methods to measure these separately. These methods usually require testing each item individually, and some methods also involve sampling and a long processing time, which makes it difficult to meet the requirements of rapid and continuous testing in cutting and processing production lines.

[0003] Hyperspectral imaging technology combines image and spectral information, and can be used for non-destructive testing of pork quality parameters. Existing technologies typically use visible or near-infrared spectroscopy to build predictive models; however, the composition of muscle fibers and myoglobin content vary in different anatomical locations, and myoglobin oxidation, glycogenolysis, pH decrease, protein denaturation, and water migration during the post-mortem process also cause changes in spectral response, resulting in systematic spectral deviations between samples from different locations and at different post-mortem stages.

[0004] Using a uniform model directly can lead to limitations in applicability and decreased prediction accuracy across different body parts. Modeling different body parts or post-slaughter times separately relies on part labels and time information, increasing the cost of calibration data collection and model maintenance. Furthermore, existing technologies often focus on predicting single quality indicators, making it difficult to synthesize multiple indicators into stable, continuous evaluation results with hierarchical significance. Therefore, the comparability of pork spectral data under complex production conditions and the consistency of comprehensive quality grading still need improvement. Summary of the Invention

[0005] This application provides a method and system for detecting pork quality grade index based on hyperspectral imaging, in order to at least solve some of the technical problems existing in the related technologies described above.

[0006] According to a first aspect of the embodiments of this application, a method for detecting pork quality grade index based on hyperspectral imaging is provided, comprising: Hyperspectral images of pork samples covering the visible and near-infrared bands were collected. The average spectrum of the region of interest was extracted and the measured spectrum was obtained by standard normal variable transformation. The myoglobin concentration index and myoglobin oxidation ratio are calculated from the visible light band of the measured spectrum based on the absorbance at a preset wavelength. Using the myoglobin oxidation ratio, the myoglobin concentration index, and their product as independent variables, the estimated oxidation ratio is calculated using a pre-calibrated regression model. For each wavelength point in the near-infrared band of the measured spectrum, the myoglobin concentration index, the estimated oxidation ratio, and their product are used as independent variables. Using pre-calibrated wavelength-by-wavelength regression coefficients, the offsets corresponding to the muscle fiber composition difference, biochemical state deviation, and interactive correction terms are subtracted from the measured absorbance at each wavelength point to obtain the corrected near-infrared spectrum. The corrected near-infrared spectrum is input into a pre-calibrated partial least squares regression model to predict multiple quality parameters; the predicted values ​​of the multiple quality parameters are then substituted into a pre-calibrated ordered logistic regression model to calculate the quality grade index.

[0007] As an optional approach, the calibration dataset on which the pre-calibration is based includes hyperspectral data collected from pork samples from at least four anatomical sites at at least five time points after slaughter, as well as the measured quality parameter values ​​corresponding to each sample, the proportion of muscle fiber area determined by myosin triphosphate adenosine histochemical staining, and the molar fraction of metmyoglobin determined by spectrophotometry.

[0008] As an optional approach, in the calculation of the oxidation ratio estimate using a pre-calibrated regression model, the regression model is a multiple linear regression model, and its regression coefficients are determined by fitting the calibration dataset using ordinary least squares method; and the oxidation ratio estimate is within the coverage range of the measured values ​​of ferromyosin mole fraction in the calibration dataset.

[0009] As an optional approach, pre-calibrating the wavelength-by-wavelength regression coefficients includes, for each wavelength point in the near-infrared band, using the myoglobin concentration index, the estimated oxidation ratio, and their product as independent variables, and the measured absorbance at the corresponding wavelength point as the dependent variable, fitting a multiple linear regression model on the calibration dataset using ordinary least squares, to obtain the intercept coefficient, the partial regression coefficient of the myoglobin concentration index, the partial regression coefficient of the estimated oxidation ratio, and the partial regression coefficient of the product term for each wavelength point.

[0010] As an optional approach, the subtraction of the offsets corresponding to the muscle fiber composition difference term, biochemical state deviation term, and cross-correction term from the measured absorbance at each wavelength point includes: the offset of the muscle fiber composition difference term is calculated based on the partial regression coefficient of the myoglobin concentration index at the corresponding wavelength point, the current sample myoglobin concentration index, and the reference myoglobin concentration index; the offset of the biochemical state deviation term is calculated based on the partial regression coefficient of the estimated oxidation ratio at the corresponding wavelength point, the current sample estimated oxidation ratio, and the reference estimated oxidation ratio; and the offset of the cross-correction term is calculated based on the partial regression coefficient of the product term at the corresponding wavelength point, the current sample myoglobin concentration index, the estimated oxidation ratio, the reference myoglobin concentration index, and the reference estimated oxidation ratio.

[0011] As an optional approach, the reference myoglobin concentration index is taken as the median of the myoglobin concentration index of all samples in the calibration dataset; the reference oxidation ratio estimate is taken as the average of the oxidation ratio estimates of samples under standard cooling conditions 24 hours post-slaughter in the calibration dataset.

[0012] As an optional approach, after obtaining the corrected near-infrared spectrum, the Mahalanobis distance between the corrected near-infrared spectrum and the mean of the corrected spectrum of the sample under the reference conditions in the calibration dataset is calculated. The Mahalanobis distance is calculated based on the covariance matrix and its inverse matrix of the corrected spectrum in the calibration dataset. When the Mahalanobis distance exceeds a threshold determined according to the statistical quantile of the Mahalanobis distance distribution in the calibration dataset, the corresponding sample is labeled.

[0013] As an alternative approach, the partial least squares regression model is calibrated by grouping samples by anatomical location for cross-validation. In each round, all samples from one location are used as the validation set, and samples from the remaining locations are used as the training set. The number of latent variables that minimizes the root mean square error of the cross-validation is selected.

[0014] As an optional approach, the ordered logistic regression model uses the predicted values ​​of the multiple quality parameters as the input vector and the ordered quality grade category as the dependent variable; the truncation parameter and the regression coefficient vector are determined on the calibration dataset by maximizing the log-likelihood function estimation; the quality grade index is the inner product of the regression coefficient vector and the input vector.

[0015] According to a second aspect of the embodiments of this application, a pork quality grade index detection system based on hyperspectral imaging is also provided, comprising: The image acquisition and preprocessing module is used to acquire hyperspectral images of pork samples covering the visible and near-infrared bands, extract the average spectrum of the region of interest, and obtain the measured spectrum through standard normal variable transformation. The spectral feature calculation module is used to calculate the myoglobin concentration index and myoglobin oxidation ratio from the visible light band of the measured spectrum based on the absorbance at a preset wavelength. The oxidation ratio estimation module is used to calculate the estimated value of the oxidation ratio using the myoglobin oxidation ratio, the myoglobin concentration index, and the product of the two as independent variables through a pre-calibrated regression model. The near-infrared spectral correction module is used to subtract the offsets corresponding to the muscle fiber composition difference term, biochemical state deviation term, and interactive correction term from the measured absorbance at each wavelength point of the near-infrared band of the measured spectrum, using the myoglobin concentration index, the estimated value of the oxidation ratio, and the product term of the two as independent variables, and using pre-calibrated wavelength-wise regression coefficients, to obtain the corrected near-infrared spectrum. The quality grade index calculation module is used to input the corrected near-infrared spectrum into a pre-calibrated partial least squares regression model to predict multiple quality parameters; and to substitute the predicted values ​​of the multiple quality parameters into a pre-calibrated ordered logistic regression model to calculate the quality grade index.

[0016] This application utilizes a single hyperspectral image acquisition to extract the myoglobin concentration index and myoglobin oxidation ratio from the visible light band. Combined with a pre-calibrated regression model, it obtains an estimated oxidation ratio, eliminating the need for anatomical labels and post-slaughter time records on the pork being tested. During near-infrared spectral correction, differences in muscle fiber composition, changes in biochemical state, and their interaction are incorporated into wavelength-by-wavelength regression calculations. The correction amount at each wavelength point can be adjusted according to the actual state of the sample, reducing systematic spectral biases caused by different parts and post-slaughter stages, and improving the comparability of the corrected spectra. Furthermore, a unified partial least squares regression model is used to predict multiple quality parameters, and an ordered logistic regression model is used to generate a quality grade index. This approach balances continuous evaluation and discrete grading, reducing the amount of calibration data and model maintenance costs required for part-specific and time-specific modeling. This improves the consistency, accuracy, and production line applicability of pork quality testing results.

[0017] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Furthermore, no embodiment in this disclosure is required to achieve all the effects described above. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0019] Figure 1 This is a block diagram of a method for detecting pork quality grade index based on hyperspectral imaging according to an embodiment of the present invention.

[0020] Figure 2 A flowchart illustrating the spectral feature extraction process provided in this embodiment of the disclosure.

[0021] Figure 3 A flowchart illustrating the steps of the near-infrared spectral correction method provided in this embodiment.

[0022] Figure 4 This is a schematic block diagram of a pork quality grade index detection system based on hyperspectral imaging, provided as an embodiment of the present disclosure.

[0023] Figure 5 This is a schematic block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

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

[0025] This disclosure provides a method for detecting pork quality grade index based on hyperspectral imaging. It is applicable to scenarios in pork processing lines where online quality grade detection is performed on pork samples from different times and anatomical locations after slaughter. The hyperspectral imaging system used in this method covers the visible and near-infrared regions. For example, it can be configured as a pushbroom hyperspectral camera with a wavelength range of 400nm to 1000nm, working in conjunction with a halogen lamp or LED broadband light source and a linear conveyor belt to complete online acquisition. This method does not rely on externally provided slaughter time records and part label information; it obtains all the information required for subsequent spectral correction and quality prediction solely from the hyperspectral image data itself. Therefore, it is suitable for actual working conditions on the production line where detection time is uncontrollable and multiple parts are transported together.

[0026] The implementation process of the method described in this application will be described in detail below with reference to specific embodiments. It should be noted that this embodiment is only used to explain this application and is not intended to limit the scope of protection of this application. Conventional adjustments or substitutions of each step by those skilled in the art without departing from the concept of this application should be included in the scope of protection of this application.

[0027] Please see Figure 1 , Figure 1 This is a block diagram of a method for detecting pork quality grade index based on hyperspectral imaging according to an embodiment of the present invention, as shown below. Figure 1 As shown, the method includes the following steps: S1. Collect hyperspectral images of pork samples covering the visible and near-infrared bands, extract the average spectrum of the region of interest, and obtain the measured spectrum by standard normal variable transformation; S2, calculate the myoglobin concentration index and myoglobin oxidation ratio from the visible light band of the measured spectrum based on the absorbance at a preset wavelength; S3, using the myoglobin oxidation ratio, the myoglobin concentration index, and their product as independent variables, calculate the estimated value of the oxidation ratio through a pre-calibrated regression model; S4. For each wavelength point in the near-infrared band of the measured spectrum, the myoglobin concentration index, the estimated oxidation ratio, and their product are used as independent variables. Using the pre-calibrated wavelength-by-wavelength regression coefficients, the offsets corresponding to the muscle fiber composition difference, biochemical state deviation, and interactive correction terms are subtracted from the measured absorbance at each wavelength point to obtain the corrected near-infrared spectrum. S5, input the corrected near-infrared spectrum into a pre-calibrated partial least squares regression model to predict multiple quality parameters respectively; substitute the predicted values ​​of the multiple quality parameters into a pre-calibrated ordered logistic regression model to calculate the quality grade index.

[0028] In some embodiments, for step S1, a calibration experiment needs to be completed before the formal online detection to obtain training data for all regression models in subsequent steps. The calibration samples are selected from pork from at least four common anatomical locations, such as tenderloin, sirloin, shoulder, and hind leg. Hyperspectral data are repeatedly collected from the same batch of samples at at least five time points post-slaughter, for example, once each at 2 hours, 6 hours, 12 hours, 24 hours, and 48 hours post-slaughter. Simultaneously with each hyperspectral data acquisition, the corresponding physicochemical reference values ​​for each sample are measured, including brightness values. Redness value Yellowness value pH value and drip loss rate.

[0029] In the initial stage of the calibration experiment, muscle tissue sections from various sites were collected, and the area ratios of type I, IIA, and IIB muscle fibers were determined using the myosin triphosphate adenosine triphosphate (mATPase) histochemical staining method. During each hyperspectral data acquisition, the molar fraction of metmyoglobin in the total myoglobin of the sample was simultaneously determined spectrophotometrically; this measured value was recorded as... Trained evaluators provide quality grade assessment results for each calibrated sample according to the grading procedure. The grade labels are ordered categories, such as excellent, first grade, second grade, and ungraded, for a total of four grades. The above-mentioned physicochemical reference values, muscle fiber area ratio data, measured values ​​of metmyoglobin molar fraction, and grade labels together constitute the calibration dataset for all subsequent models.

[0030] During actual online testing, the hyperspectral imaging system acquires a complete hyperspectral image of the pork sample to be tested on the conveyor belt. First, the region of interest corresponding to the exposed muscle surface is selected in the image. For example, by thresholding the reflectance amplitude in the near-infrared band, pixels in the background, fat layer, or bone region with significantly low or high reflectance are excluded, while retaining the effective pixels in the muscle tissue region. The arithmetic mean of the spectra of all effective pixels in the region of interest is taken to obtain an average spectrum. Then, a standard normal variable transformation (SNV) is performed, which is the absorbance at each wavelength point minus the mean of the spectrum across the entire band and divided by the standard deviation of the entire band. This eliminates baseline shift and multiplicative scattering effects caused by differences in sample surface smoothness and uneven illumination. The spectrum after SNV processing is the measured spectrum of the sample.

[0031] In some embodiments, for step S2, the myoglobin content of different types of muscle fibers in pork varies significantly. This histological difference has a clear spectral expression in the characteristic absorption band of the visible light region. At the same time, the process of post-mortem myoglobin gradually transforming from an oxygenated state to a ferric state is also reflected in the relative intensity changes of each characteristic peak in the visible light band. In this embodiment, two spectral characteristic quantities are extracted respectively, one reflecting the compositional characteristics of muscle fibers and the other reflecting the post-mortem biochemical state.

[0032] Specifically, please refer to Figure 2 , Figure 2 A flowchart of the spectral feature extraction process provided in this disclosure is shown, as follows: Figure 2 As shown, in step 201, the myoglobin concentration index is calculated from the visible light band of the measured spectrum based on the absorbance at a preset wavelength.

[0033] Specifically, type I slow-twitch oxidative muscle fibers are rich in myoglobin, while type IIB fast-twitch glycolytic muscle fibers have a lower content. In the visible light region, myoglobin exhibits Q-band absorption at 545 nm, a wavelength that is less sensitive to changes in the oxidative state of myoglobin, as both oxymyoglobin and deoxymyoglobin show strong absorption at this wavelength. 580 nm is the characteristic absorption peak of oxymyoglobin, where the oxygenated state shows prominent absorption while the ferrous state shows weak absorption. The absorption band of ferrous myoglobin is located around 630 nm, where the ferrous state shows strong absorption while the oxygenated state shows weak absorption. The absolute absorbance values ​​at all three wavelengths increase with increasing total myoglobin concentration.

[0034] For example, the myoglobin concentration index is defined. The arithmetic mean of the absorbance at three wavelengths: 545nm, 580nm, and 630nm. ;in , , The absorbance of the spectrum was measured at corresponding wavelengths. The average of three wavelengths was chosen instead of the absorbance of a single wavelength because the distribution of absorption intensity at different wavelengths varies depending on the oxidation state of myoglobin: in the oxygenated state, absorption is stronger at 580nm and weaker at 630nm, while the opposite is true in the ferric state, and the difference is smaller at 545nm. By averaging the three wavelengths, the increase or decrease in absorbance caused by changes in oxidation state partially cancels each other out during the summation, resulting in a more balanced absorption. It mainly reflects the total molar concentration of myoglobin and does not fluctuate significantly with changes in the oxidized state distribution over time after slaughter.

[0035] Therefore, it can be used as a proxy indicator for the compositional characteristics of muscle fibers; the higher the proportion of type I fibers in a region, the higher the total concentration of myoglobin. The larger the value, the more accurate the calibration stage will be; by adjusting the values ​​of each sample... The validity of the substitution relationship was verified by Pearson correlation analysis with the area ratio of type I fibers measured by mATPase staining. Alternatively, the sum of the area ratios of type I and type IIA fibers could be used as the total proportion of oxidized fibers for verification, since type IIA fibers are also rich in myoglobin, which will not be elaborated here.

[0036] In step 202, the myoglobin oxidation ratio is calculated from the visible light band of the measured spectrum based on the absorbance at a preset wavelength. For example, on the same measured spectrum, the myoglobin oxidation ratio is defined... The ratio of absorbance at 580 nm to absorbance at 630 nm: Post-mortem, over time, myoglobin gradually transforms from an oxygenated state to a methemoglobin state. The absorbance at 580 nm decreases due to the reduction in oxygenated state, while it increases at 630 nm due to the accumulation of methemoglobin. Therefore, it continues to decrease; due to It is the ratio of the absorbance of the same sample at two wavelengths. The total concentration of myoglobin appears in both the numerator and denominator. The ratio calculation cancels out the concentration factor, making it reflect the degree of oxidation relatively independently.

[0037] In some embodiments, for step S3, according to Beer-Lambert's law, absorbance and concentration are approximately linear in the low concentration range; when the myoglobin concentration is high, the degree of deviation from linearity at different wavelengths varies due to the differences in the molar absorptivity of each oxidized form. Under these conditions, it not only reflects the degree of oxidation but is also affected by the nonlinear interference of the concentration itself; different anatomical sites have different myoglobin concentration levels, The quantitative correlation between the actual degree of oxidation and the actual degree of oxidation shows discrepancies between different sites. If only based on Single-variable prediction of metmyoglobin mole fraction is problematic because the non-linear interference of concentration means that the same degree of oxidation may correspond differently between sites with higher and lower myoglobin concentrations. The value, univariate regression model cannot distinguish this difference, so we introduce as well as and After the product term, different concentration levels can be handled in a unified model. Systematic bias in the mapping relationship of oxidation degree.

[0038] Specifically, the molar fraction of metmyoglobin measured by spectrophotometry on the calibration dataset. As the dependent variable, with , Using the product of the two as the independent variable, a multiple linear regression model is established:

[0039] in This is an estimated value for the mole fraction of metmyoglobin, ranging from 0 to 1; The intercept; , , They are respectively , Sum of product terms The partial regression coefficients were determined by fitting the data to the calibration dataset using ordinary least squares (OLS). The calibration dataset covered samples from all body parts and all post-mortem time points.

[0040] In this model structure right The effective regression slope is The slope follows Value changes; for sites with higher myoglobin concentrations, The effective slope is larger in areas with higher concentrations compared to areas with lower concentrations; therefore, the model automatically adjusts the estimation relationship based on the actual muscle fiber composition of the sample to compensate for errors caused by the deviation of the Beer-Lambert law from linearity in high-concentration regions; if the variation in myoglobin concentration within the range covered by the calibration dataset is sufficiently large, the product term... The statistical significance will be more prominent.

[0041] In one embodiment, the calibration phase can evaluate model accuracy using leave-one-out method or grouped cross-validation, and calculate... and The cross-validation coefficient of determination and root mean square error between them; if The t-test shows a significant non-zero value, indicating that the concentration does indeed correct for the oxidation ratio estimation, and retaining the product term is statistically justified. If the result is not significant, the model can be degenerated into a simplified form without the product term, retaining only the product term. and The first term; in actual testing, the sample to be tested is calculated using the terms obtained from the aforementioned steps. and Substituting into the model yields... Optionally, for the output Set upper and lower bound constraints to limit the data to the calibration dataset. Within the range covered by the measured values, unreasonable estimated values ​​are avoided due to extrapolation of individual spectral anomalies.

[0042] In some embodiments, for step S4, the objective of this step is to correct the near-infrared spectrum of the sample to be tested from its actual muscle fiber composition and biochemical state conditions to uniform reference conditions, so that samples from different parts and different post-mortem stages have comparable near-infrared spectral characteristics after correction.

[0043] Post-mortem glycogenolysis causes a sustained decrease in pH, leading to gradual denaturation of myofibrillar proteins. Changes in protein spatial structure weaken their binding capacity to water molecules, causing intracellular water to migrate to the extracellular space. These processes are reflected in changes in absorbance at the overtones of the NH stretching vibrations of proteins and the OH stretching vibrations of water in the near-infrared band. Different muscle fiber types exhibit different glycogen reserves and glycogenolysis kinetics. The thoracic muscle, dominated by type IIB fibers, has high glycogen reserves and a rapid glycogenolysis rate, resulting in a large pH decrease, deep protein denaturation, and significant near-infrared spectral changes within a certain post-mortem period. Neck and shoulder muscles, dominated by type I fibers, undergo slower glycogenolysis, with smaller spectral changes within the same timeframe. If the same set of fixed coefficients is used for all parts, based solely on… When performing biochemical state deviation correction, undercorrection may occur in areas of rapid fermentation, while overcorrection may occur in areas of slow fermentation; similarly, if only based on... Correcting for site differences while ignoring the regulatory role of biochemical state on these site differences cannot accurately eliminate the combined effects of the two types of factors.

[0044] Furthermore, the response of molecular conformational changes during protein denaturation to near-infrared spectroscopy is related to the amino acid composition of the protein itself. The myosin heavy chain subtypes of type I and type IIB fibers are different, and their denaturation temperature thresholds and denaturation rates differ. These differences at the molecular level are ultimately reflected in the different spectral response amplitudes caused by denaturation in the near-infrared absorption band. Therefore, treating myofiber composition factors and biochemical state factors as two independent variables and performing a simple linear superposition correction cannot accurately reflect the correlation effect between the two.

[0045] For this purpose, please refer to Figure 3 , Figure 3 A flowchart illustrating the steps of the near-infrared spectral correction method provided in this disclosure embodiment is shown, as follows: Figure 3 As shown, in step 301, the regression coefficients are obtained wavelength by wavelength.

[0046] To simultaneously address differences in muscle fiber composition, biochemical state biases, and the interaction between them within a unified model, each wavelength point in the near-infrared band was analyzed. On the calibration dataset , Using the product of the two as the independent variable and the measured absorbance at that wavelength as the dependent variable, we fit multiple linear regression models using ordinary least squares:

[0047] in To measure the spectrum at wavelength Near-infrared absorbance at that location The intercept at that wavelength. for The partial regression coefficient, for The partial regression coefficient, For product terms The partial regression coefficient, The residual is denoted as , where each near-infrared wavelength point is independently fitted to obtain four sets of coefficient vectors, and the length of each set of vectors is equal to the total number of near-infrared wavelength points.

[0048] Specifically, For wavelength The effective influence coefficient of absorbance at that location is ;when When it is not zero, the coefficient follows Change; in other words, when samples composed of different muscle fibers undergo the same magnitude of biochemical state change, the spectral response amplitudes at different wavelengths are different; conversely, For wavelength The effective influence coefficient of absorbance at that point can also be written as That is, the spectral deviation caused by site differences also varies under different biochemical states; the interaction between these two directions is governed by the same product term coefficient. Simultaneous characterization.

[0049] Within the ohmic absorption bands of proteins (NH and OH), the denaturation sensitivity of proteins varies considerably among different muscle fiber types. Typically, statistical significance is observed in the wavelength region corresponding to the CH absorption band of fat. However, the correlation between intramuscular fat content and muscle fiber type is relatively weak. The values ​​may be close to zero. The four coefficients at each wavelength are automatically fitted from the calibration data, without the need for manual preset of their values ​​or sign direction.

[0050] Preferably, the interaction term can be retained uniformly for all near-infrared wavelengths without performing saliency screening on a wavelength-by-wavelength basis, because At insignificant wavelength points, their absolute values ​​are already close to zero, and their contribution to the correction results is negligible. Uniform retention simplifies the procedure and avoids introducing additional human judgment through wavelength selection. In some embodiments, wavelength points can also be considered. Perform a t-test, remove insignificant wavelength point interaction terms, and retain only... and To reduce the risk of overfitting, a first-order term is added.

[0051] In step 302, the reference conditions for correction are determined. Specifically, the myoglobin concentration index is used as a reference. Take all samples from the calibration dataset The median of the values; the median was chosen instead of the mean to reduce the influence of individual extreme samples on the reference point location; the reference oxidation ratio estimate. Standardized samples were taken 24 hours after slaughter and calibrated under standard cooling conditions. The average value is used because 24 hours is the standard evaluation time point commonly used in pork quality assessment; selecting the value near the distribution center as a reference condition can reduce the offset of most samples during correction and reduce the additional error that may be introduced due to excessive correction.

[0052] Optionally, Alternatively, the part corresponding to the largest number of samples in the calibration dataset can be selected. The mean; Alternatively, the time period corresponding to the most common post-slaughter time on the production line can be used. The mean value of the reference condition is chosen. The specific value of the reference condition only affects the absolute baseline level of the corrected spectrum. Since the subsequent quality prediction model is also calibrated under the same reference condition, the validity of the prediction results is not affected no matter where the reference point is taken.

[0053] In step 303, the offsets corresponding to the muscle fiber composition difference term, biochemical state deviation term, and interactive correction term are subtracted from the measured absorbance at each wavelength point to obtain the corrected near-infrared spectrum.

[0054] Specifically, for each wavelength point in the near-infrared band Perform the following correction calculations one by one:

[0055] middle wavelength The corrected absorbance. The formula is to subtract three offset terms from the measured absorbance at that wavelength: the first subtraction term... To eliminate absorbance shifts between the current sample and reference conditions caused by differences in muscle fiber composition, the correction magnitude is... The degree of deviation from the reference value and the wavelength The sensitivity coefficients together determine the second subtraction term. To eliminate absorbance shifts caused by biochemical state biases, the third subtraction term, the interactive correction term, has a shift equal to... Multiply by the current sample and The product under the same reference conditions and The difference between the products, the corrected absorbance is equivalent to the near-infrared spectral response of the sample under reference muscle fiber composition and reference biochemical conditions.

[0056] For the interactive correction term, omitting it degenerates the correction into a superposition of two independent linear corrections for muscle fiber composition deviation and biochemical state deviation. Independent linear correction implicitly assumes that the effects of the two factors on the spectrum are independent, meaning that muscle fiber composition does not change the spectral response amplitude caused by changes in biochemical state. However, as mentioned earlier, protein denaturation kinetics differ among different muscle fiber types, and the same magnitude of biochemical state change does not cause equal near-infrared spectral changes in different muscle regions. Retaining the interactive correction term, the effective coefficients for biochemical state correction at each wavelength become... This coefficient varies with the actual sample being tested. The values ​​change automatically. For sites with high myoglobin concentration and slow glycolysis rate, the model provides a matching biochemical state correction range, rather than applying the same fixed coefficients as other sites. This adaptive adjustment retains the effect of the product term, avoiding overcorrection for some sites or undercorrection for others.

[0057] Optionally, in some embodiments, anomaly detection can be performed on the corrected spectrum. Specifically, the Mahalanobis distance between the corrected spectrum and the mean of the corrected spectrum of the sample under the reference conditions in the calibration dataset is calculated. The Mahalanobis distance is calculated based on the covariance matrix and its inverse matrix of the corrected spectrum in the calibration dataset. It comprehensively considers the correlation between wavelengths in a multidimensional space to measure the degree to which a sample deviates from the distribution center. If the Mahalanobis distance of a sample exceeds the threshold determined according to the statistical quantile of the Mahalanobis distance distribution in the calibration dataset, for example, the 97.5th quantile, then the correction result of the sample is marked as deviating from the normal range, and it can be individually marked or removed in subsequent processing.

[0058] In some embodiments, for step S5, the output corrected near-infrared spectral vector is used as input to predict five quality parameters; wherein, for the brightness value... Redness value Yellowness value pH value and drip loss rate were each independently modeled using a partial least squares (PLS) regression model. During calibration, the calibrated spectra of all parts and time points of the calibration dataset after processing were used as the independent variable matrix, and the corresponding measured quality parameters were used as the dependent variables. PLS regression establishes a linear relationship between the independent and dependent variables by projecting high-dimensional spectral data onto a small number of latent variables. The number of latent variables in each PLS model was selected through cross-validation, and the number that minimizes the root mean square error of the cross-validation was chosen.

[0059] In this process, cross-validation is grouped by anatomical location. Specifically, in each round, all samples from a certain location are used as the validation set, while samples from other locations are used for training. The validation set comes from locations not included in the training set, thus directly verifying whether the correction steps described above have effectively eliminated systematic bias between locations. If the prediction accuracy on the validation sets of each location is comparable and there is no systematic tendency for a particular location to be higher or lower, it indicates that the near-infrared spectra of different locations after correction are comparable in terms of quality prediction. In actual testing, the corrected near-infrared spectra of the samples to be tested are input into five PLS models, each of which outputs the predicted values ​​of the corresponding quality parameters.

[0060] In one embodiment, the obtained predicted values ​​of the five quality parameters are used to form an input vector. The quality grade index is calculated by substituting the values ​​into an ordered logistic regression model pre-trained on a calibrated dataset. The ordered logistic regression utilizes the ordered nature of the grade labels, assuming that there is a continuous underlying quality variable behind the linear combination of each quality parameter. This variable is divided into intervals corresponding to each grade by a set of cutoff points.

[0061] Let the quality grades be total There are ordered categories, with larger values ​​representing higher levels. The model will assign sample levels no higher than the [number]th [order]. The cumulative probability model for level is as follows:

[0062] in For grade category variables; For the first There are several truncation parameters, and each truncation parameter satisfies... ,common indivual; This is a regression coefficient vector, with each component corresponding to the weights of the five quality parameters. All grades share the same set of weights. ;Truncation parameters and regression coefficient vector All were estimated on the calibrated dataset by maximizing the log-likelihood function.

[0063] In actual testing, the predicted values ​​of the five quality parameters of the sample to be tested are substituted into the model, and the inner product of the regression coefficient vector and the input vector is calculated. This value is the quality grade index; the higher the value, the better the overall quality. Using the cutoff parameter... The cumulative probability of a sample belonging to each level can be further calculated to obtain the probability distribution of each level, and the level with the highest probability is taken as the discrete classification result; in some embodiments, it can also be directly... It is used as a continuous scoring output without being discretized and graded, and is subsequently used by the quality management system as needed.

[0064] According to the method described in this disclosure, the pork sample to be tested only requires a single hyperspectral image acquisition to simultaneously obtain muscle fiber composition characteristics and post-mortem biochemical state information from the visible light band. Based on this, systematic biases in the near-infrared spectrum caused by differences in location and post-mortem time are jointly corrected. The correction model retains the interaction term between muscle fiber composition and biochemical state, allowing the correction amplitude at each wavelength to be automatically adjusted according to the actual combination of the sample's location and biochemical state. This provides higher correction accuracy compared to independently correcting the two types of biases. Furthermore, a single PLS quality prediction model can be applied to samples from multiple locations and different post-mortem stages, reducing the amount of calibration data acquisition and model maintenance. Finally, an ordered logistic regression model outputs a continuous quality grade index, simultaneously meeting the application requirements of both continuous scoring and discrete grading, improving the consistency and repeatability of the quality grade index across different batches and testing conditions.

[0065] Please see Figure 4 , Figure 4 This is a structural block diagram of a pork quality grade index detection system based on hyperspectral imaging, provided in an embodiment of this application. Figure 4 As shown, the system includes: The image acquisition and preprocessing module 401 is used to acquire hyperspectral images of pork samples covering the visible light and near-infrared bands, extract the average spectrum of the region of interest, and obtain the measured spectrum by standard normal variable transformation. The spectral feature calculation module 402 is used to calculate the myoglobin concentration index and myoglobin oxidation ratio from the visible light band of the measured spectrum based on the absorbance at a preset wavelength. The oxidation ratio estimation module 403 is used to calculate the oxidation ratio estimate using the myoglobin oxidation ratio, the myoglobin concentration index and their product as independent variables through a pre-calibrated regression model. The near-infrared spectral correction module 404 is used to take the myoglobin concentration index, the estimated oxidation ratio and their product as independent variables, and use pre-calibrated wavelength-wise regression coefficients to subtract the offsets corresponding to the muscle fiber composition difference, biochemical state deviation and interactive correction terms from the measured absorbance of each wavelength point of the measured spectrum near-infrared band, so as to obtain the corrected near-infrared spectrum. The quality grade index calculation module 405 is used to input the corrected near-infrared spectrum into a pre-calibrated partial least squares regression model to predict multiple quality parameters; and to substitute the predicted values ​​of the multiple quality parameters into a pre-calibrated ordered logistic regression model to calculate the quality grade index.

[0066] Each processing unit and / or module in the embodiments of this application can be implemented by an analog circuit that implements the functions described in the embodiments of this application, or by software that executes the functions described in the embodiments of this application.

[0067] Based on the same inventive concept, this application also provides an electronic device, the method corresponding to which can be the method in the foregoing embodiments, and its problem-solving principle is similar to that method. For example... Figure 5 As shown, Figure 5 This is a schematic block diagram of an electronic device provided in an embodiment of the present disclosure. The device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the methods and / or technical solutions of the foregoing embodiments of the present application.

[0068] In particular, the methods and / or embodiments in this application can be implemented as computer software programs. For example, the embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. When the computer program is executed by a processor, it performs the functions defined in the methods of this application.

[0069] Another embodiment of this application provides a storage medium storing computer program instructions thereon, which can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of this application.

[0070] In the above embodiments, the descriptions of each embodiment have different focuses. Parts not described in detail in a certain embodiment can be referred to in the relevant descriptions of other embodiments. The above descriptions are merely preferred embodiments of this application and explanations of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solutions formed by specific combinations of the above technical features, but should also cover other technical solutions formed by arbitrary combinations of the above technical features or their equivalent features without departing from the inventive concept.

Claims

1. A method for detecting pork quality grade index based on hyperspectral imaging, characterized in that, include: Hyperspectral images of pork samples covering the visible and near-infrared bands were collected. The average spectrum of the region of interest was extracted and the measured spectrum was obtained by standard normal variable transformation. The myoglobin concentration index and myoglobin oxidation ratio are calculated from the visible light band of the measured spectrum based on the absorbance at a preset wavelength. Using the myoglobin oxidation ratio, the myoglobin concentration index, and their product as independent variables, the estimated oxidation ratio is calculated using a pre-calibrated regression model. For each wavelength point in the near-infrared band of the measured spectrum, the myoglobin concentration index, the estimated oxidation ratio, and their product are used as independent variables. Using pre-calibrated wavelength-by-wavelength regression coefficients, the offsets corresponding to the muscle fiber composition difference, biochemical state deviation, and interactive correction terms are subtracted from the measured absorbance at each wavelength point to obtain the corrected near-infrared spectrum. The corrected near-infrared spectrum is input into a pre-calibrated partial least squares regression model to predict multiple quality parameters; the predicted values ​​of the multiple quality parameters are then substituted into a pre-calibrated ordered logistic regression model to calculate the quality grade index.

2. The method according to claim 1, characterized in that, The calibration dataset on which the pre-calibration is based includes hyperspectral data collected from pork samples from at least four anatomical sites at at least five time points after slaughter, as well as the measured quality parameter values ​​corresponding to each sample, the proportion of muscle fiber area determined by myosin triphosphate adenosine histochemical staining, and the molar fraction of metmyoglobin determined by spectrophotometry.

3. The method according to claim 2, characterized in that, In the process of calculating the estimated oxidation ratio using a pre-calibrated regression model, the regression model is a multiple linear regression model, and its regression coefficients are determined by fitting the calibration dataset using ordinary least squares method; and the estimated oxidation ratio is within the coverage range of the measured values ​​of ferromyosin mole fraction in the calibration dataset.

4. The method according to claim 1, characterized in that, The pre-calibration of the wavelength-by-wavelength regression coefficients includes, for each wavelength point in the near-infrared band, using the myoglobin concentration index, the estimated oxidation ratio, and their product as independent variables, and the measured absorbance at the corresponding wavelength point as the dependent variable, fitting a multiple linear regression model on the calibration dataset using ordinary least squares, to obtain the intercept coefficient, the partial regression coefficient of the myoglobin concentration index, the partial regression coefficient of the estimated oxidation ratio, and the partial regression coefficient of the product term for each wavelength point.

5. The method according to claim 4, characterized in that, The offsets corresponding to the muscle fiber composition difference term, biochemical state deviation term, and interactive correction term are subtracted from the measured absorbance at each wavelength point. The offset of the muscle fiber composition difference term is calculated based on the partial regression coefficient of the myoglobin concentration index at the corresponding wavelength point, the current sample myoglobin concentration index, and the reference myoglobin concentration index. The offset of the biochemical state deviation term is calculated based on the partial regression coefficient of the estimated oxidation ratio at the corresponding wavelength point, the estimated oxidation ratio of the current sample, and the estimated oxidation ratio of the reference. The offset of the interaction correction term is calculated based on the partial regression coefficient of the product term at the corresponding wavelength point, the myoglobin concentration index of the current sample, the estimated oxidation ratio, the estimated myoglobin concentration index of the reference, and the estimated oxidation ratio of the reference.

6. The method according to claim 5, characterized in that, The reference myoglobin concentration index is the median of the myoglobin concentration indices of all samples in the calibration dataset; the reference oxidation ratio estimate is the average of the oxidation ratio estimates of samples under standard cooling conditions 24 hours post-mortem in the calibration dataset.

7. The method according to claim 1, characterized in that, After obtaining the corrected near-infrared spectrum, the Mahalanobis distance between the corrected near-infrared spectrum and the mean of the corrected spectrum of the sample under the reference conditions in the calibration dataset is calculated. The Mahalanobis distance is calculated based on the covariance matrix and its inverse matrix of the corrected spectrum in the calibration dataset. When the Mahalanobis distance exceeds the threshold determined according to the statistical quantile of the Mahalanobis distance distribution in the calibration dataset, the corresponding sample is marked.

8. The method according to claim 1, characterized in that, The partial least squares regression model is calibrated by grouping samples by anatomical location for cross-validation. In each round, all samples from one location are used as the validation set, and samples from the remaining locations are used as the training set. The number of latent variables that minimizes the root mean square error of the cross-validation is selected.

9. The method according to claim 1, characterized in that, The ordered logistic regression model uses the predicted values ​​of the multiple quality parameters as the input vector and the ordered quality grade category as the dependent variable; the truncation parameter and the regression coefficient vector are determined on the calibration dataset by maximizing the log-likelihood function estimation; the quality grade index is the inner product of the regression coefficient vector and the input vector.

10. A pork quality grade index detection system based on hyperspectral imaging, characterized in that, include: The image acquisition and preprocessing module is used to acquire hyperspectral images of pork samples covering the visible and near-infrared bands, extract the average spectrum of the region of interest, and obtain the measured spectrum through standard normal variable transformation. The spectral feature calculation module is used to calculate the myoglobin concentration index and myoglobin oxidation ratio from the visible light band of the measured spectrum based on the absorbance at a preset wavelength. The oxidation ratio estimation module is used to calculate the estimated value of the oxidation ratio using the myoglobin oxidation ratio, the myoglobin concentration index, and the product of the two as independent variables through a pre-calibrated regression model. The near-infrared spectral correction module is used to subtract the offsets corresponding to the muscle fiber composition difference term, biochemical state deviation term, and interactive correction term from the measured absorbance at each wavelength point of the near-infrared band of the measured spectrum, using the myoglobin concentration index, the estimated value of the oxidation ratio, and the product term of the two as independent variables, and using pre-calibrated wavelength-wise regression coefficients, to obtain the corrected near-infrared spectrum. The quality grade index calculation module is used to input the corrected near-infrared spectrum into a pre-calibrated partial least squares regression model to predict multiple quality parameters; and to substitute the predicted values ​​of the multiple quality parameters into a pre-calibrated ordered logistic regression model to calculate the quality grade index.