A small sample pork marker content prediction model under variable temperature conditions

The LAXG model, which combines Logistic and XGBoost models to predict the content of pork biomarkers under varying temperatures, solves the prediction error problem of pork biomarkers under varying temperatures, realizes real-time risk assessment and early warning in the cold chain process, and improves prediction accuracy and regulatory efficiency.

CN122240978APending Publication Date: 2026-06-19BEIJING TECH & BUSINESS UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING TECH & BUSINESS UNIV
Filing Date
2026-03-16
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing methods for predicting the content of biomarkers in pork have poor adaptability under varying temperature conditions. Mechanistic models are unable to reduce prediction errors, and the difference between cold chain environment temperature monitoring and food core temperature leads to deviations in prediction results, making it difficult to meet the needs of real-time risk identification and early warning in the cold chain process.

Method used

A small-sample pork biomarker content prediction model, LAXG, was constructed under variable temperature conditions. The variation law of biomarker content under constant temperature conditions was established by using the Logistic growth mechanism model. The residual estimation was performed by combining the XGBoost model. Continuous prediction under variable temperature conditions was achieved by using temperature dependence and core temperature conversion.

Benefits of technology

It has improved the accuracy of predicting the content of biomarkers in pork, enabled rapid assessment and real-time early warning of risk changes in the cold chain process, reduced the identification lag caused by on-site sampling, and promoted the transformation of the regulatory model from passive sampling to proactive early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240978A_ABST
    Figure CN122240978A_ABST
Patent Text Reader

Abstract

This invention discloses a small-sample pork biomarker content prediction model, LAXG, under variable temperature conditions. Based on the Logistic biomarker growth mechanism model, this model establishes the relationship between biomarker content and time changes under constant temperature conditions. Furthermore, based on experimental data of biomarker content and the biomarker growth mechanism model, it constructs temperature dependence curves for the kinetic parameters r and K. By constraining the shape of these curves and applying Arrhenius mechanism correction, a mechanistic prediction model is formed. Finally, an XGBoost model is constructed to estimate the biomarker content residuals, and these residuals are fused with the mechanistic prediction model to form a small-sample pork biomarker content prediction model under variable temperature conditions. By inputting the ambient temperature collected by a temperature sensor into this model, the content of food biomarkers can be continuously predicted under variable temperature conditions, and risk warnings can be issued based on biomarker risk thresholds. This promotes a shift in regulatory models from "passive sampling" to "proactive early warning" and continues to evolve towards non-destructive monitoring and precise control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0002] This invention relates to the field of machine learning, and in particular to LAXG, a predictive model for the content of biomarkers in small samples of pork under varying temperature conditions. Background Technology

[0004] As a typical perishable fresh food, pork's quality and safety risks change with time and temperature conditions during storage and cold chain transportation. In actual supervision and enterprise quality control, pork biomarkers such as volatile basic nitrogen and total bacterial count are often used to characterize the spoilage process and risk level. However, the content of these biomarkers usually depends on on-site sampling and laboratory testing, which has problems such as limited sampling frequency, long testing cycle, and delayed results, making it difficult to meet the needs of real-time risk identification and early warning in the cold chain process.

[0005] In existing research and engineering applications, methods for predicting changes in biomarker content are mostly based on empirical regression or mechanistic growth models under isothermal conditions. Among them, the Logistic model is currently the classic mechanistic growth model for characterizing the growth pattern of pork biomarker content over time under isothermal conditions. However, real cold chain environments are often subject to dynamic temperature fluctuations. When isothermal models are directly extrapolated to variable temperature conditions, they are prone to poor adaptability and large prediction errors. At the same time, experimental data on pork biomarkers are usually characterized by sparse temperature points and limited sample sizes, making it difficult to accurately determine the kinetic parameters of temperature-dependent mechanistic growth models, further amplifying the prediction errors under variable temperature conditions.

[0006] Furthermore, the temperatures monitored by sensors in cold chain storage and transportation are generally ambient temperatures rather than the food core temperature (i.e., the internal temperature of the food). Due to the thermal hysteresis effect of food core temperature, there is a difference between the ambient temperature and the food core temperature. If the ambient temperature is directly used to drive the biomarker mechanism growth model, additional residuals (intermediate bias) will be introduced. Residuals refer to the deviation between the observed value and the model's fitted value. At the same time, a simple mechanism growth model is difficult to cover intermediate biases caused by experimental noise, batch differences, and other conditional factors, resulting in residuals in the prediction results.

[0007] Therefore, it is necessary to construct a predictive model for the content of pork biomarkers under variable temperature conditions, which can predict changes in biomarker content based on temperature and time monitoring of the storage and transportation environment, thereby achieving real-time risk warning during the cold chain pork storage and transportation process. Summary of the Invention

[0009] The purpose of this invention is to address the common technical problems in existing methods for predicting pork biomarker content, such as poor adaptability of extrapolation from isothermal to variable-temperature conditions and the difficulty in reducing prediction errors using mechanistic models. This invention proposes a small-sample pork biomarker content prediction model, LAXG, for variable-temperature conditions. The model first uses a Logistic biomarker growth mechanism model to establish the variation law of biomarker content over time under isothermal conditions. Then, based on small-sample experimental data under isothermal conditions, it establishes the temperature dependence of parameters r and K in the mechanistic model. Based on this, XGBoost is applied to estimate the residual of biomarker content. Finally, the biomarker growth mechanism model under isothermal conditions is extrapolated to variable-temperature conditions to construct a pork biomarker content prediction model for variable-temperature conditions. This enables continuous prediction of pork biomarker content under variable-temperature conditions, improves the accuracy of pork biomarker content prediction, and allows for rapid assessment and real-time early warning of risk changes during pork storage and transportation, reducing the risk identification lag caused by on-site sampling inspections.

[0010] To achieve the above objectives, the technical solution of the present invention is as follows:

[0011] A novel LAXG model for predicting pork biomarker content under variable temperature conditions is proposed. Based on Logistic and XGBoost models and small-sample experimental data from isothermal conditions, this method constructs a predictive model for pork biomarker content under variable temperature conditions. It can continuously predict pork biomarker content based on real-time monitoring results of ambient temperature from sensors. The method includes the following steps: Figure 1 As shown:

[0012] A: Data acquisition and preprocessing.

[0013] To construct and apply a predictive model for the content of biomarkers in pork under variable temperature conditions, two types of data are required. (1) Experimental data on biomarker content under constant temperature conditions, obtained by recording experiments on biomarker detection equipment, are used to train the predictive model; (2) Monitoring records of storage and transportation environment temperature, obtained by temperature sensors, are used as input to the predictive model.

[0014] A1: Acquisition and preprocessing of experimental data on biomarker content under isothermal conditions

[0015] Experimental data on pork biomarkers under isothermal conditions are obtained by testing personnel in a laboratory using testing equipment to simulate the growth patterns of biomarkers on real samples at multiple isothermal temperatures, and the results are recorded. The isothermal experimental data mainly includes information such as set temperature, time, biomarker name, biomarker content, and its corresponding unit, used to describe the change process of pork biomarker content over time under different isothermal conditions. The field attribute names and meanings of the pork biomarker isothermal experimental data are shown in Table 1.

[0016] Table 1. Description of Fields in the Pork Biomarker Experiment Dataset

[0017] Attribute Name Meaning Explanation Food name The food type of the sample, in this example, is pork. temperature Multiple constant temperature test temperatures (°C), corresponding to constant temperature conditions such as −20°C, 4°C, and 24°C. time Monitoring time / storage time (using standardized units for modeling), corresponding to sampling times under various temperature conditions. Logo Name Name of target pork biomarkers (e.g., volatile basic nitrogen). biomarker content Observed values ​​of biomarker content at the corresponding monitoring time Content unit Units of measurement for marker content (for unit standardization)

[0018] After data acquisition, the isothermal experimental data undergoes preprocessing. This preprocessing primarily includes: converting time units to hours and standardizing the units for biomarker content. The preprocessed isothermal experimental data serves as model training data, used for modeling the relationship between model parameters and temperature in subsequent steps C and D.

[0019] A2: Acquisition and preprocessing of temperature monitoring data for cold chain storage and transportation environments

[0020] The cold chain storage and transportation environment temperature monitoring data used in this step is obtained in real time by temperature sensors in cold chain trucks and cold storage facilities. It mainly includes the monitoring time and the corresponding ambient temperature, in °C, and is used as the original input data for the model.

[0021] (1) Standardize and preprocess the temperature monitoring data of cold chain storage and transportation environment.

[0022] Because the time recording formats in cold chain monitoring data may differ, to ensure consistency with the isothermal experiment data in terms of time scale, the monitoring time units were standardized, converting the time units corresponding to each monitoring moment to hours. After processing, a time-varying environmental temperature sequence was obtained. , For the first A standardized monitoring time, This represents the ambient temperature at that moment.

[0023] (2) Conversion from ambient temperature to core temperature of food

[0024] Because the core temperature of pork products exhibits a thermal hysteresis effect relative to the ambient temperature, there is a difference between the ambient temperature collected by the sensor and the actual core temperature of the pork products subjected to the action. If the ambient temperature is directly used as the model input, prediction bias is easily introduced. Therefore, based on the standardized ambient temperature sequence, a core temperature filtering equation is used to convert the ambient temperature into the core temperature of the pork products. The conversion relationship is shown in equation (1):

[0025]

[0026] in, For a moment The core temperature of pork products below For a moment The ambient temperature below, The thermal hysteresis time constant is used to characterize the response rate of pork core temperature to changes in ambient temperature; the initial core temperature of the pork product. Compared with the ambient temperature at the initial moment Maintain consistency. Through the above core temperature conversion, the core temperature sequence of pork products changing over time is obtained. The core temperature sequence of the pork product is used as input data for the model, and is subsequently used to calculate the predicted content of pork biomarkers.

[0027] B: Construction of a Logistic growth mechanism model under isothermal conditions

[0028] A logistic growth mechanism prediction model for pork biomarkers under isothermal conditions was established to characterize the variation of biomarker content over time, and temperature-dependent kinetic parameters were set. Specifically, for any isothermal temperature... The sample sequence below (i=1,2,...,n), where n is the number of temperatures, is given by the corresponding monitoring time series. , Let j be the j-th time point, in hours. The time series of biomarker content is as follows: , Let be the concentration of the biomarker at time j, and its unit varies depending on the biomarker. For example, the unit for the biomarker volatile basic nitrogen is mg / 100g; the unit for the biomarker total bacterial count is lg CFU / g. The initial marker content.

[0029] At constant temperature Under the conditions, the content of biomarkers The variation with time t can be expressed by the Logistic model shown in formula (1). The analytical expression is shown in formula (2):

[0030]

[0031] in, For temperature The content growth rate parameter is below. For temperature The following load-bearing capacity parameters; when At that time, the predicted value of the biomarker content at that sampling moment is obtained. .

[0032] C: Model parameters and Modeling the relationship between temperature changes.

[0033] The Logistic model established by equation (2) under isothermal conditions, and the isothermal experimental data of pork biomarkers after step A1, are used to evaluate the parameters of the Logistic model. and Model the relationship between temperature and temperature.

[0034] C1: Calculate the parameters r and K at each experimental temperature using the Logistic model.

[0035] Based on the isothermal experimental data of pork biomarkers obtained in step A1, and the Logistic model under isothermal conditions established in step B, the model was fitted at each isothermal temperature to obtain the kinetic parameters at the corresponding temperatures. and .

[0036] Let the set of temperatures for the isothermal experiment be... ,in, To determine the number of experimental temperatures, then at each temperature... Below, parameters are obtained by fitting the corresponding isothermal experimental data using a Logistic model. and ,in , .

[0037] Therefore, the corresponding relationship between experimental temperature and kinetic parameters is shown in Table 2:

[0038] Table 2. Correspondence between temperature and kinetic parameters r and K

[0039] i T r K 1 <![CDATA[T1]]> <![CDATA[r1]]> <![CDATA[K1]]> 2 <![CDATA[T2]]> <![CDATA[r2]]> <![CDATA[K2]]> … … … … n <![CDATA[T n ]]> <![CDATA[r n ]]> <![CDATA[K n ]]>

[0040] The obtained parameters and These represent the experimental temperatures. The content growth rate parameter and carrying capacity parameter under the given conditions are used to establish subsequent parameters. and The relationship between temperature and change.

[0041] C2: Parameters are obtained through interpolation. and Discrete relationship with temperature T

[0042] Based on the experimental temperatures obtained in step C1 and its corresponding parameters and The parameters are constructed using a linear interpolation method. and Discrete relationships on the temperature axis. Specifically, for any pair of adjacent experimental temperatures... and The temperature range formed According to the preset temperature step size Discrete points are selected, and linear interpolation is performed on the parameter values ​​corresponding to each discrete temperature point within the interval.

[0043] Let the first Adjacent experimental temperature ranges The number of interpolation points within is Then we have equation (3):

[0044]

[0045] in, This indicates the preset temperature interpolation step size. For intervals... Any discrete temperature point within The parameters at this temperature are calculated using a linear interpolation function. and This can be expressed as equations (4)-(5):

[0046]

[0047]

[0048] in, This represents a linear interpolation function used to calculate the parameter values ​​for discrete temperature points within an interval based on two adjacent experimental temperature points and their corresponding parameter values. In specific implementations, the... This can be achieved using linear interpolation functions in Python.

[0049] After performing the above interpolation on all adjacent experimental temperature ranges, the total number of interpolation points is... The sum of the number of interpolation points in each interval is given by equation (6):

[0050]

[0051] The parameters are obtained through the above interval-by-interval linear interpolation. and The discrete relationship between temperature changes within each adjacent experimental temperature range provides a basis for predicting the content of pork biomarkers under subsequent temperature variations.

[0052] C3: Build parameters , Relationship curve with temperature T

[0053] Based on the parameters obtained in step C2 and With temperature The initial discrete relationship between them is used to further construct parameters. and The temperature relationship curve is used to characterize the continuous law of parameter change with temperature.

[0054] Specifically, parameters are set separately. and The function is given by equations (7)-(8), that is:

[0055]

[0056] in, and The coefficients of the function to be optimized are... and These represent the function orders. Through the above construction, the initial discrete relationship in step C2 is transformed into a continuously differentiable parametric temperature function, providing a foundation for subsequent optimization by introducing shape constraints and mechanistic constraints.

[0057] D: Shape constraints and mechanism correction of model parameter curves.

[0058] To improve the stability and physical rationality of the temperature-dependent kinetic parameters, continuous parameters obtained from equations (7)-(8) are used. and Based on parametric curves, shape constraints and Arrhenius mechanism corrections are introduced. Specifically, this includes:

[0059] D1: Shape constraints on the model parameter curves.

[0060] In the temperature range Select M temperature sampling points, denoted as M. And calculate the corresponding parameter values. .

[0061] in, and All parameters are given by the parameter function constructed in step C3, and their coefficients are the variables to be optimized. By constructing shape constraint terms at the temperature sampling points and incorporating each constraint term into the overall objective function, the coefficients of the parameter function are iteratively optimized to adjust the overall shape of the parameter function so that it meets the preset requirements for monotonicity, smoothness, and load-bearing capacity consistency.

[0062] The shape constraints include the following:

[0063] (1) Monotonicity constraint: Used to restrict a parameter from monotonically decreasing as temperature increases. The growth rate parameter... For example, its monotonicity constraint term is shown in equation (9):

[0064]

[0065] Load capacity parameters Monotonicity constraint terms It can be in the same form as equation (3), by The calculation shows that when the parameter function is monotonically non-decreasing between adjacent sampling points, the corresponding constraint term takes the value of 0; when a decreasing trend appears, the constraint term increases, thereby pushing the parameter function to adjust towards monotonically non-decreasing during the optimization process.

[0066] (2) Smoothness constraint: used to suppress drastic fluctuations in the parameter function as it changes with temperature. The smoothness constraint term adopts the second-order difference form, as shown in equation (10):

[0067]

[0068] When the parameter function changes relatively smoothly within the temperature range, the second-order difference is small, and the corresponding constraint term has a small value; when the parameter function has obvious reversals or severe local bending, the constraint term increases, thereby suppressing unreasonable fluctuations in the parameter function during the optimization process.

[0069] (3) Load capacity consistency constraint (K-floor constraint): used to limit The concentration should not be lower than the maximum value of the experimental marker content under the corresponding temperature conditions. Assume the constant temperature experimental temperature is... The maximum content of the marker on the surface is given by equation (11):

[0070]

[0071] And obtain by interpolation within the temperature range Then the K-floor constraint terms are as shown in equation (12):

[0072]

[0073] When parameter The constraint term is set to 0 when the content of the biomarker at each sampling point is not lower than the maximum experimental biomarker content at the corresponding temperature; when When the temperature is lower than the experimental maximum value under the corresponding temperature conditions, the constraint term increases, thereby pushing the load capacity function upward during the optimization process so that it meets the lower bound requirement of the load capacity.

[0074] Furthermore, the aforementioned constraint terms, together with the fitting error term of the parameter function to the initial discrete relationship, constitute the overall objective function. By optimizing the coefficients of the parameter function, the final parameter function that satisfies the shape constraints is obtained. and .

[0075] Furthermore, the monotonicity constraint, smoothness constraint, and load consistency constraint, together with the fitting error term of the parametric function to the initial discrete relationship, constitute the overall objective function (13):

[0076]

[0077] Among them, the fitting error term Represented as equation (14):

[0078]

[0079] in, and In equations (7)-(8), at the temperature sampling point The reference value of the parameter is obtained through interpolation. These are the weighting coefficients corresponding to each constraint term.

[0080] By minimizing the overall objective function The coefficients of the parameter function to be optimized in step C3 are iteratively optimized to obtain a parameter function that meets the requirements of monotonicity, smoothness, and load capacity consistency. and .

[0081] D2: Arrhenius mechanism correction for model parameter curves.

[0082] Based on the shape constraints in step D1, to avoid the growth rate parameter function To address the discrepancies between actual biological laws and the results of relying solely on experimental data fitting, this invention further introduces the Arrhenius mechanism for correction. The purpose of this mechanism correction is to utilize the theoretical principles governing the effect of temperature on growth rate to adjust the parameter functions... Additional constraints are imposed to ensure that, while meeting data fitting and shape constraints, it further conforms to biological principles. Specifically, an Arrhenius function is constructed. As shown in equation (15):

[0083]

[0084] in For frequency factors, As the apparent activation energy, It is a gas constant; and a mechanism fitting constraint term is introduced over the temperature range, so that... While fitting the data, it converges to the mechanistic trend, and its mechanistic correction constraint term is shown in equation (16):

[0085]

[0086] The mechanism correction constraint term is implemented through a penalty parameter function. With Arrhenius mechanism function The deviation at the experimental temperature point incorporates the Arrhenius mechanism trend into the parameter function optimization process, thereby... While maintaining the data fitting ability, adjustments were made in a direction that conforms to biological laws to obtain a kinetic parameter function that changes stably within the temperature range. and This forms a growth mechanism model (2).

[0087] E: Residual estimation using the XGBoost model:

[0088] The Logistic growth mechanism model obtained from equation (2) is mainly based on limited isothermal small sample data. Due to the sparse temperature points and limited sample size, there is still a residual between its prediction results and the actual biomarker content. To further reduce the prediction error of the Logistic growth mechanism model under isothermal small sample conditions, the LAXG model constructs an XGBoost-based residual estimation model based on the Logistic growth mechanism model obtained in step D, and integrates the residual correction term with the mechanism prediction results to obtain the final prediction value; specifically including:

[0089] E1: Residual Sample Set Construction:

[0090] For any constant temperature sequence Based on the Logistic growth mechanism model obtained from equation (2), the mechanism prediction value at each sampling time is calculated. Based on this, the temperature of each constant temperature experiment was... Next sampling time Constructing residual sample feature vectors , defined as equation (17)

[0091]

[0092] in, The rate of change of the mechanism prediction value over time is expressed by equation (18).

[0093]

[0094] The corresponding residual is defined as Equation (19).

[0095]

[0096] This forms the residual training dataset. The feature matrix is ​​obtained by stacking all samples row by row. and residual label vector ,in This represents the total number of residual samples.

[0097] E2: Residual Estimation Model Construction:

[0098] Based on the residual training dataset obtained in step E1 A residual estimation model is constructed using the XGBoost model. The XGBoost model uses feature vectors... As input, to correspond to the residual As output labels.

[0099] During model training, the parameters of the XGBoost regression model are set, including at least the number of trees. Maximum depth of the tree Learning rate Minimum child node sample weight Subsampling ratio and column sampling ratio By training and adjusting the above parameters, a residual estimation model is obtained. .

[0100] After training, for any sample feature vector The corresponding residual estimate can be obtained. , expressed as equation (20):

[0101]

[0102] in, This represents the XGBoost residual estimation model obtained after training. Indicates temperature ,time The residual estimate is given below.

[0103] E3: Fusion of Mechanism Model and Residuals

[0104] After obtaining the residual estimation model trained in step E2, the residual estimates output by it are... The prediction results are then fused with those from the Logistic growth mechanism model to obtain the final predicted value. For temperature... ,time The final predicted value for the following samples is expressed as equation (21):

[0105]

[0106] in, This indicates that the Logistic growth mechanism model is effective at different temperatures. ,time The predicted value below, This represents the residual estimate output by the XGBoost residual estimation model. This is the residual correction function.

[0107] Through steps E2–E3, the residual-corrected LAXG prediction model is obtained, which is used to predict the content of pork biomarkers under variable temperature conditions in step F.

[0108] F: Construction of biomarker prediction models under varying temperature conditions

[0109] Based on the prediction model obtained from equation (21), the content of biomarkers in pork under variable temperature conditions is continuously predicted. Specifically, the core temperature sequence of pork products obtained after preprocessing in step A2 is used. As the model input under varying temperature conditions, where, For the first Each monitoring moment, This represents the core temperature of the pork product at that specific time point. The LAXG model determines the corresponding kinetic parameters based on the core temperature at each time point and calculates the content of pork biomarkers. (Monitoring time...) Based on the function obtained in steps C–D, and As shown in equation (22)

[0110]

[0111] And based on the Logistic growth mechanism model, the content of biomarkers is iteratively predicted. Let... For a moment If the predicted value is obtained, then the predicted value of the mechanism at the next moment is as shown in equation (23):

[0112]

[0113] After obtaining the mechanism prediction result of equation (23), the residual estimation model obtained in step E is called to correct the residuals for this time period, as shown in equation (24):

[0114] Furthermore, the residual estimate is fused with the mechanism prediction to obtain the time step. The final predicted value is as follows:

[0115]

[0116] in Let be the residual estimation function given by equation (20). This is the residual correction function described in equation (12). Through the... The iteration outputs the sequence of pork biomarker content. This allows for the prediction of pork biomarker content under variable temperature conditions.

[0117] G: Evaluation of the predictive model LAXG

[0118] To evaluate the predictive performance of the LAXG model for predicting the content of biomarkers in small samples of pork under varying temperature conditions proposed in this invention, the error between the model's predicted values ​​and the actual values ​​was assessed. The evaluation metrics used included root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and weighted mean absolute percentage error (WAPE).

[0119] Let the actual value be The predicted value is The sample size is The evaluation indicators are defined as follows:

[0120] (1) Root Mean Square Error (RMSE)

[0121] The root mean square error is used to measure the overall magnitude of the deviation between the predicted value and the true value. Its calculation formula is shown in equation (25):

[0122]

[0123] (2) Mean Absolute Error (MAE)

[0124] Mean absolute error is used to measure the average level of the absolute error between the predicted value and the true value. Its calculation formula is shown in equation (26):

[0125]

[0126] (3) Mean Absolute Percentage Error (MAPE)

[0127] The mean absolute percentage error is used to measure the average level of the relative error between the predicted value and the actual value. Its calculation formula is shown in equation (27):

[0128]

[0129] (4) Weighted Average Absolute Percentage Error (WAPE)

[0130] The weighted average absolute percentage error is used to measure the level of deviation of the overall prediction error from the total true value. Its calculation formula is shown in equation (28):

[0131]

[0132] The above evaluation metrics can be used to assess the predictive performance of the LAXG model from different perspectives, including overall error, absolute error, and relative error. Specifically, the smaller the values ​​of RMSE, MAE, MAPE, and WAPE, the smaller the deviation between the model's predictions and the actual values, indicating a better predictive performance.

[0133] Compared with the prior art, the beneficial effects of the present invention are:

[0134] This invention proposes a small-sample biomarker content prediction model, LAXG, under variable temperature conditions. First, a biomarker growth simulation experiment is conducted on real food samples using detection equipment to obtain multiple sets of biomarker content experimental data under isothermal conditions. Then, a Logistic biomarker growth mechanism model is used to establish the relationship between biomarker content and time changes under isothermal conditions. Finally, based on the biomarker content experimental data and the Logistic biomarker growth mechanism model, the dependence of the kinetic parameters r and K on temperature in the mechanism model is constructed. and By analyzing the model parameter curves and Shape constraints and Arrhenius mechanism corrections were applied to form a mechanism prediction model. Finally, an XGBoost model was constructed to estimate the residuals of biomarker content, and these residuals were fused with the mechanism prediction model to form a small-sample biomarker content prediction model for pork under varying temperature conditions. Subsequently, by inputting the ambient temperature collected by a temperature sensor into this model, the content of food biomarkers can be continuously predicted under varying temperature conditions, and risk warnings can be issued based on biomarker risk thresholds.

[0135] Compared to existing methods, this invention uses a traditional Logistic biomarker growth mechanism model to reflect the growth pattern of biomarkers over time, employs an XGBoost machine learning model for residual estimation, and uses linear interpolation and other methods to extrapolate the isothermal prediction model to variable temperature conditions, enabling continuous prediction of food biomarker content under variable temperature conditions. Furthermore, by converting ambient temperature to food core temperature, and by using shape constraints on the parameter curve and Arrhenius mechanism correction, it overcomes the problems of limited training temperature points and sample size, thus improving prediction accuracy. In summary, the LAXG model for predicting pork biomarker content under variable temperature conditions proposed in this invention can continuously predict biomarker content based on sensor monitoring results of ambient temperature, thereby providing real-time early warning. This drives the regulatory model to shift from "passive sampling" to "proactive early warning," and continues to evolve towards non-destructive monitoring and precise control. Attached Figure Description

[0137] Figure 1 LAXG model framework diagram.

[0138] Figure 2 A diagram comparing the core temperature of food with the ambient temperature.

[0139] Figure 3. Comparison of biomarker content predictions between the LAXG model and the SVR model under varying temperature conditions. Detailed Implementation

[0141] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0142] The following is combined with Figure 1 —Figure 3 illustrates a temperature-varying predictive model for pork biomarkers provided in an embodiment of the present invention, namely LAXG, which focuses on predicting the volatile basic nitrogen content in pork.

[0143] A: Data Acquisition and Preprocessing

[0144] This embodiment uses volatile basic nitrogen in pork as the target biomarker to construct a predictive model for the content of pork biomarkers under varying temperature conditions. To train and predict this model, the data used includes two parts: one part is experimental data on volatile basic nitrogen in pork under constant temperature conditions, used for model training; the other part is environmental temperature monitoring data during cold chain storage and transportation, used as input for model prediction.

[0145] Among them, the constant temperature experiment data came from the detection records of volatile basic nitrogen content of pork samples under different constant temperature conditions during storage, reflecting the change law of this marker over time under different temperature conditions; the cold chain storage and transportation environment temperature monitoring data came from temperature sensors deployed in cold chain vehicles and cold storage, recording the dynamic changes of environmental temperature over time during actual storage and transportation.

[0146] Based on the two types of data mentioned above, this embodiment first preprocesses the isothermal experimental data and the cold chain storage and transportation environment temperature monitoring data. The isothermal experimental data, after preprocessing, is used as model training data, while the cold chain storage and transportation environment temperature monitoring data, after time unit standardization and core temperature conversion, is used as model input data for subsequent prediction of pork biomarker content under variable temperature conditions.

[0147] A1: Acquisition and preprocessing of experimental data on biomarker content under isothermal conditions

[0148] The experimental data on pork biomarker content under constant temperature conditions used in this embodiment are experimental data on volatile basic nitrogen in pork. This dataset was obtained by testing personnel in the laboratory using testing equipment to measure and record the volatile basic nitrogen content of four 50g pork samples of the same pork under three constant temperature storage conditions (−20℃, 4℃, and 24℃), and was used as model training data.

[0149] After data acquisition, the isothermal experiment data were preprocessed. The preprocessing mainly included: standardizing the time unit by converting the original monitoring time or storage time into hours; and standardizing the unit for volatile basic nitrogen content to ensure that the data had a consistent numerical expression. The processed data are shown in Table 3.

[0150] The preprocessed isothermal experimental data were used as model training data for the construction of the Logistic growth mechanism model under isothermal conditions in step B, and for modeling the relationship between model parameters and temperature in steps C and D.

[0151] Table 3. Dataset of volatile basic nitrogen in pork.

[0152] food temperature Time (h) Logo Name biomarker content Content unit Pork samples 24 0 Volatile basic nitrogen 6.25 mg / 100g Pork samples 24 4 Volatile basic nitrogen 7.21 mg / 100g Pork samples 24 8 Volatile basic nitrogen 8.5 mg / 100g Pork samples 24 12 Volatile basic nitrogen 10.11 mg / 100g …… …… …… …… …… …… Pork samples 4 0 Volatile basic nitrogen 6.25 mg / 100g Pork samples 4 12 Volatile basic nitrogen 7.96 mg / 100g Pork samples 4 24 Volatile basic nitrogen 7.11 mg / 100g …… …… …… …… …… …… Pork samples -20 144 Volatile basic nitrogen 16.97 mg / kg Pork samples -20 156 Volatile basic nitrogen 18.14 mg / kg Pork samples -20 168 Volatile basic nitrogen 21.99 mg / kg

[0153] A2: Acquisition and Preprocessing of Temperature Monitoring Data for Cold Chain Storage and Transportation Environments

[0154] The cold chain storage and transportation environment temperature monitoring data used in this embodiment comes from temperature sensors deployed in refrigerated trucks and cold storage facilities, containing a total of 683 environmental temperature monitoring records, which are used as the raw input data for the model. The monitoring data mainly records the environmental temperature changes at each monitoring time, reflecting the external temperature changes of pork during actual cold chain storage and transportation.

[0155] First, the 683 cold chain storage and transportation environmental temperature monitoring data points were preprocessed. To ensure consistency with the isothermal experiment data in terms of time scale, the time units corresponding to each monitoring moment were uniformly converted to hours. After processing, a time-varying environmental temperature sequence was formed. .

[0156] in, For the first A standardized monitoring time, This represents the ambient temperature at that moment.

[0157] Since the temperature sensors in refrigerated trucks and cold storage facilities collect ambient temperature data, and the core temperature of pork products exhibits a thermal hysteresis effect relative to ambient temperature, directly using ambient temperature as the model input can easily introduce prediction bias. Therefore, this embodiment uses a core temperature filtering equation to convert the ambient temperature into the core temperature of the pork products. The conversion relationship is shown in equation (29), and the converted curve is shown in... Figure 2 As shown:

[0158]

[0159] in, For a moment The core temperature of pork products below For a moment In this embodiment, considering the monitored object as a pork sample weighing approximately 1000 kg, the ambient temperature is estimated. The thermal hysteresis time constant is used to characterize the response rate of the core temperature of 1000 kg of pork to changes in ambient temperature. The initial core temperature of the pork product. Compared with the ambient temperature at the initial moment Maintain consistency.

[0160] Through the above core temperature conversion, the core temperature sequence of pork products corresponding to 683 monitoring records was obtained. The core temperature sequence of the pork products is used as input data for the model, and is subsequently used to predict and calculate the content of pork biomarkers under varying temperature conditions.

[0161] B: Construction of the Logistic growth mechanism model under isothermal conditions:

[0162] A Logistic growth mechanism prediction model for pork biomarkers under isothermal conditions was established to describe the change in biomarker content over time, and kinetic parameters corresponding to temperature were set.

[0163] Specifically, for any constant temperature The sample sequence below, in this embodiment For the three constant temperatures, let the corresponding monitoring time series be: , For the first The time series of biomarker content is given at specific times, in hours. , For the first The biomarker content at each time point, among which, The initial biomarker content.

[0164] At constant temperature Under the conditions, the content of biomarkers Over time The variation law is expressed by the Logistic model shown in equation (30):

[0165]

[0166] in, For temperature Content growth rate parameter under certain conditions For temperature Load-bearing capacity parameters under certain conditions; when At that time, the predicted value of the biomarker content at that sampling moment is obtained. .

[0167] C: Model parameters and Modeling temperature dependence

[0168] C1: Calculate the parameters at each experimental temperature using the Logistic model. and

[0169] Based on the isothermal experimental data of pork biomarkers obtained in step A1, and the Logistic model under isothermal conditions established in step B, the model was fitted at each isothermal temperature to obtain the kinetic parameters at the corresponding temperatures. and .

[0170] In this embodiment, there are a total of 3 constant temperature experimental temperatures, and the set of constant temperature experimental temperatures is as follows: , respectively , and At various temperatures Below, parameters are obtained by fitting the corresponding isothermal experimental data using a Logistic model. and ,in, , .

[0171] Thus, the correspondence between experimental temperature and kinetic parameters is obtained, as shown in Table 4.

[0172] Table 4. Specific parameter values ​​for r and K

[0173] i T(℃) r K 1 -20 0.0067 307540560118 2 4 0.0095 345753183823 3 24 0.044 377597036910

[0174] The obtained parameters and These represent the experimental temperatures. The content growth rate parameter and carrying capacity parameter under the given conditions are used to establish subsequent parameters. and The relationship between temperature and change.

[0175] C2: Parameters are obtained through interpolation. and Discrete relationship with temperature T

[0176] In this embodiment, step C1 has already obtained... , and Parameters corresponding to the three experimental temperatures and Based on this, a linear interpolation method is used to construct the parameters. and The relationship of changes along the temperature axis.

[0177] Specifically, in this embodiment, there are two adjacent experimental temperature ranges, namely the range... and interval The preset temperature interpolation step size is... .

[0178] For the first adjacent experimental temperature range Interpolation points Calculated according to formula (3):

[0179]

[0180] For the second adjacent experimental temperature range Interpolation points Calculated according to formula (3):

[0181]

[0182] Therefore, after interpolating each of the adjacent experimental temperature ranges, the total number of interpolation points is... Calculated according to formula (6):

[0183]

[0184] In the interval Inside, according to the preset temperature step size Values ​​are taken sequentially for each discrete temperature point, i.e. For any discrete temperature point within this interval ,according to and The corresponding parameter values ​​are obtained using linear interpolation functions in Python. and The calculation is expressed in the form of equation (31):

[0185]

[0186] In the interval Inside, according to the preset temperature step size Values ​​are taken sequentially for each discrete temperature point, i.e. For any discrete temperature point within this interval ,according to and The corresponding parameter values ​​are obtained using linear interpolation functions in Python. and The calculation is expressed in the form of equation (32):

[0187]

[0188] The parameters are obtained through the above method. and exist to Discrete variation relationships within a temperature range.

[0189] C3: Build parameters , With temperature Relationship curve

[0190] Based on equations (31)-(32), the parameters are obtained. and With temperature The initial discrete relationship between them is further used to construct parameters separately. and The quadratic function curve is used to characterize the continuous relationship between parameters and temperature. Specifically, and Preset as equations (33)-(34):

[0191]

[0192]

[0193] Through the above construction, the initial discrete relations in equations (31)-(32) are transformed into continuous relation curves, providing a basis for introducing shape constraints in step D1 and introducing Arrhenius mechanism correction in step D2.

[0194] D: Shape constraints and mechanism correction of model parameter curves

[0195] To improve the stability and physical rationality of temperature-dependent kinetic parameters, continuous parameter functions are obtained from equations (32)-(34). and Based on this, shape constraints on the parametric curves and Arrhenius mechanism correction are introduced. Specifically, this includes:

[0196] D1: Shape constraints on the model parameter curves

[0197] In this embodiment, within the temperature range 120 temperature sampling points were evenly selected within the area, denoted as And calculate the corresponding parameter values. .

[0198] in, and All parameters are given by the parameter function constructed in step C3, and their coefficients are the variables to be optimized. By constructing shape constraint terms at the temperature sampling points and incorporating each constraint term into the overall objective function, the coefficients of the parameter function are iteratively optimized to adjust the overall shape of the parameter function so that it meets the preset requirements for monotonicity, smoothness, and load-bearing capacity consistency.

[0199] The shape constraints include the following:

[0200] (1) Monotonicity constraint: Used to restrict a parameter from monotonically decreasing as temperature increases. The growth rate parameter... For example, its monotonicity constraint term is shown in equation (35):

[0201]

[0202] Load capacity parameters Monotonicity constraint terms It can be in the same form as equation (36), by The calculation shows that when the parameter function is monotonically non-decreasing between adjacent sampling points, the corresponding constraint term takes the value of 0; when a decreasing trend appears, the constraint term increases, thereby pushing the parameter function to adjust towards monotonically non-decreasing during the optimization process.

[0203] (2) Smoothness constraint: used to suppress drastic fluctuations in the parameter function as it changes with temperature. The smoothness constraint term adopts the second-order difference form, as shown in equation (36):

[0204]

[0205] When the parameter function changes relatively smoothly within the temperature range, the second-order difference is small, and the corresponding constraint term has a small value; when the parameter function has obvious reversals or severe local bending, the constraint term increases, thereby suppressing unreasonable fluctuations in the parameter function during the optimization process.

[0206] (3) Load capacity consistency constraint (K-floor constraint): used to limit The concentration should not be lower than the maximum value of the experimental marker content under the corresponding temperature conditions. Assume the constant temperature experimental temperature is... The maximum content of the marker on the surface is given by equation (37):

[0207]

[0208] And obtain by interpolation within the temperature range Then the K-floor constraint terms are as shown in equation (38):

[0209]

[0210] When parameter The constraint term is set to 0 when the content of the biomarker at each sampling point is not lower than the maximum experimental biomarker content at the corresponding temperature; when When the temperature is lower than the experimental maximum value under the corresponding temperature conditions, the constraint term increases, thereby pushing the load capacity function upward during the optimization process so that it meets the lower bound requirement of the load capacity.

[0211] Furthermore, the monotonicity constraint, smoothness constraint, and load consistency constraint, together with the fitting error term of the parametric function to the initial discrete relationship, constitute the overall objective function, as shown in equation (39):

[0212]

[0213] Among them, the fitting error term Represented as equation (40):

[0214]

[0215] in, and These represent the temperature sampling points in step C2, respectively. The parameter reference values ​​are obtained through interpolation. In this embodiment, the weight coefficients corresponding to each constraint term are taken as follows:

[0216]

[0217] By minimizing the overall objective function The coefficients of the parameter function to be optimized in step C3 are iteratively optimized to obtain a parameter function that meets the requirements of monotonicity, smoothness, and load capacity consistency. and

[0218] D2: Arrhenius mechanism correction for model parameter curves.

[0219] Based on the shape constraint in step D1, the Arrhenius parameter for the growth rate is further introduced. Corrections are then performed. Specifically, the Arrhenius function is constructed. As shown in equation (41):

[0220]

[0221] This embodiment fits the Arrhenius reference function based on isothermal temperature nodes (−20℃, 4℃, 24℃), where For frequency factors, As the apparent activation energy, The constant is the gas constant; and a mechanism fitting constraint term is introduced over the temperature range, making... While fitting the data, it converges to the mechanistic trend, and its mechanistic correction constraint term is shown in equation (42):

[0222]

[0223] By combining the experimental data fitting results, the shape constraint term in step D1, and the mechanism correction in step D2, the dynamic parameter function that changes stably within the temperature range is obtained. and This leads to the formation of a Logistic growth mechanism model.

[0224] The mechanism correction constraint term is implemented through a penalty parameter function. With Arrhenius mechanism function The deviation at the experimental temperature point incorporates the Arrhenius mechanism trend into the parameter function optimization process, thereby... While maintaining the data fitting ability, adjustments were made in a direction that conforms to biological laws, resulting in a stable relationship curve within the temperature range. and As shown in equations (43)-(44):

[0225]

[0226]

[0227] And a Logistic growth mechanism model (30) is formed.

[0228] E: Residual estimation using the XGBoost model:

[0229] Since the Logistic growth mechanism model obtained by equation (30) is mainly based on limited isothermal small sample data, there is still a certain residual between its prediction results and the actual biomarker content. In order to further reduce the prediction error of the Logistic growth mechanism model under isothermal small sample conditions, the LAXG model constructs an XGBoost-based residual estimation model based on the Logistic growth mechanism model obtained in step D, and integrates the residual correction term with the mechanism prediction results to obtain the final prediction value. Specifically, it includes:

[0230] E1: Construction of Residual Sample Set

[0231] In this embodiment, the set of constant temperature experimental temperatures is as follows:

[0232] For any constant temperature The experimental sequence below Based on the Logistic growth mechanism model obtained in step D, calculate the mechanism prediction value corresponding to each sampling time. Based on this, the temperatures of each isothermal experiment were... Next sampling time Constructing residual sample feature vectors Defined as equation (45):

[0233]

[0234] in, The rate of change of the mechanism prediction value over time is expressed by equation (46):

[0235]

[0236] The corresponding residual is defined as equation (47):

[0237]

[0238] This results in the residual training dataset: After stacking all samples row by row, the feature matrix is ​​obtained. and residual label vector Equations (48) and (49) are respectively:

[0239]

[0240]

[0241] In this embodiment, the total number of residual samples is This constitutes the supervised learning dataset used to train the XGBoost residual estimation model. .

[0242] E2: Residual Estimation Model Construction:

[0243] Based on dataset An XGBoost residual estimation model is constructed. The XGBoost model uses feature vectors... As input, to correspond to the residual As output labels.

[0244] To ensure the reproducibility of this embodiment, the key parameters of the XGBoost residual prediction model are shown in Table 5. XGBoost parameters not explicitly given in the table use the library's default settings. By training and adjusting the above parameters, the residual estimation model is obtained. .

[0245] Table 5 XGBoost Model Parameter Settings

[0246] Parameter name meaning The value in this example is... objective Regression objective function reg:squarederror n_estimators Number of base learners 800 learning_rate Learning rate 0.05 max_depth Maximum depth of a single tree 5 min_child_weight Leaf node minimum sample weight 1 subsample Row sampling ratio 0.8 colsample_bytree Column sampling ratio 0.8 reg_lambda L2 regularization coefficient 1 reg_alpha L1 regularization coefficient 0 gamma Split minimum gain 0 n_jobs Number of parallel threads 8

[0247] After training, for any sample feature vector The corresponding residual estimate can be obtained. , expressed as equation (50):

[0248]

[0249] in, This represents the XGBoost residual estimation model obtained after training. Indicates temperature ,time The residual estimate is given below.

[0250] E3: Fusion of Mechanism Model and Residuals

[0251] After obtaining the residual estimation model trained by equation (50), the residual estimate of its output is... The prediction results are then fused with those from the Logistic growth mechanism model to obtain the final predicted value. For temperature... ,time The final predicted value for the following samples is expressed as equation (51):

[0252]

[0253] in, This indicates that the Logistic growth mechanism model is effective at different temperatures. ,time The predicted value below, This represents the residual estimate output by the XGBoost residual estimation model. This is the residual correction function.

[0254] Through steps E2–E3, the residual-corrected LAXG prediction model is obtained, which is used to predict the content of pork biomarkers under variable temperature conditions in step F.

[0255] F: Construction of biomarker prediction models under varying temperature conditions

[0256] Based on the prediction model obtained from equation (51), the content of biomarkers in pork under variable temperature conditions is continuously predicted. Specifically, the core temperature sequence of pork products obtained after preprocessing in step A2 is used as the basis for prediction. As the model input under varying temperature conditions, where, For the first Each monitoring moment, This represents the core temperature of the pork product at that given time. The LAXG model determines the corresponding kinetic parameters based on the core temperature at each time point and calculates the content of pork biomarkers. (Monitoring time...) Based on the function of equations (43)-(44), we obtain and As shown in equation (52):

[0257]

[0258] And based on the Logistic growth mechanism model, the content of biomarkers is iteratively predicted. Let... For a moment If the predicted value is obtained, then the predicted value of the mechanism at the next moment is as shown in equation (53):

[0259]

[0260] After obtaining the mechanism prediction result of equation (53), the residual estimation model obtained in step E is called to correct the residuals for this time period, as shown in equation (54):

[0261]

[0262] in Let be the residual estimation function given by equation (50). Through the analysis of... The iteration outputs the sequence of pork biomarker content. This allows for the prediction of pork biomarker content under variable temperature conditions.

[0263] G: Evaluation of the LAXG biomarker content prediction model:

[0264] To verify the prediction accuracy of the LAXG model proposed in this invention under small sample conditions, this embodiment evaluates the model from two aspects: fitting accuracy under isothermal conditions and prediction results under variable temperature conditions.

[0265] Under isothermal conditions, classic biomarker growth models and commonly used machine learning models were selected as comparison objects, including the Logistic growth model, Gompertz growth model, multiple linear regression model, support vector regression (SVR) model, and XGBoost model. The Logistic and Gompertz models were used to characterize traditional growth kinetics modeling methods, while the multiple linear regression, SVR, and XGBoost models were used to characterize common data-driven prediction methods. The overall error index was calculated by comparing the predicted values ​​of each model with the measured values ​​of volatile basic nitrogen on isothermal experimental data to quantitatively evaluate the fitting performance of each model.

[0266] This embodiment uses root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and weighted average absolute percentage error (WAPE) as model evaluation metrics. The lower the value of these metrics, the closer the model's predicted values ​​are to the actual values, and the better the model's fit. Let the... The true biomarker content of each sample is The model predicts the value. With a total sample size of 37, the four evaluation indicators are defined as shown in equations (55)-(58):

[0267]

[0268]

[0269]

[0270]

[0271] Based on the above evaluation indicators, the prediction performance of each model on the isothermal pork volatile basic nitrogen dataset was compared. The results are shown in Table 6. Among the selected comparison models, the SVR model achieved the best results in RMSE, MAE, MAPE, and WAPE, indicating its strong nonlinear fitting ability under isothermal conditions. This is because SVR, through its kernel function, can better characterize the nonlinear mapping relationship between temperature and time and the change in biomarker content, thus overcoming the limitations of the linear assumption compared to multiple linear regression models; and compared to Logistic and Gompertz models, it does not require a strictly defined fixed growth curve shape beforehand, thus exhibiting higher fitting accuracy on the current small sample isothermal data.

[0272] Table 6 Performance Comparison of Predictive Models for Isothermal Biomarker Content

[0273] Model metrics RMSE MAE MAPE WAPE LAXG 1.11 0.94 9.8% 9.08% LAXG-w / oXGB 1.2106 1.0189 10.57% 8.00% Logistic 1.5 1.11 10.4% 9.45% Gompertz 1.3225 1.1243 11.38% 8.83% Multiple linear regression 3.3469 2.6953 24.70% 21.16% SVR 1.0406 0.4925 3.79% 3.87% XGBoost 2.3342 1.8020 16.32% 14.15%

[0274] However, high fitting accuracy under isothermal conditions does not necessarily mean the model has good predictive ability under varying temperatures. Isothermal modeling essentially reflects the change in biomarker content over time under stable conditions, while the temperature in actual cold chain processes is usually in a dynamic fluctuation state. Although the SVR model has achieved good results on isothermal data, it is difficult to reflect the continuous impact of temperature changes on biomarker content under varying temperatures, and it is also difficult to apply it to predict biomarker content under varying temperature conditions.

[0275] Therefore, after comparing the isothermal models, this embodiment further selects the SVR model, which performs best under isothermal conditions, and compares its prediction results with the LAXG model proposed in this invention under variable temperature conditions. Specifically, cold chain storage and transportation monitoring data are input into each model to obtain the prediction curves of volatile basic nitrogen content changing with time, and then compared and analyzed. As shown in Figure 3 of the invention, although the SVR model can make predictions within a local range, its prediction curves are more of an empirical fit to the "current temperature-time" relationship, making it difficult to stably describe the continuous growth process of biomarker content under variable temperature scenarios. In the temperature fluctuation range, the predicted biomarker content is prone to inconsistency with the actual mechanism. In contrast, the LAXG model, by introducing a Logistic model, temperature-related parameter functions, and XGBoost residual correction mechanism, can effectively characterize the dynamic impact of temperature changes on the biomarker accumulation process while maintaining the interpretability of the mechanism. Its prediction curves under variable temperature conditions are more continuous and smoother, and more consistent with the actual law of gradual accumulation and change of biomarker content with temperature disturbances in cold chain food.

[0276] In summary, while the SVR model achieves superior error metrics in the isothermal data fitting stage, its advantages are primarily limited to static sample fitting; its applicability is significantly restricted for variable-temperature prediction tasks. In contrast, the LAXG model proposed in this invention not only maintains prediction accuracy under small sample conditions but also more reasonably reflects the dynamic evolution trend of biomarker content in variable-temperature scenarios. This demonstrates that the model possesses greater practical application value and can provide more reliable technical support for predicting and warning of quality changes in cold chain food.

[0277] It should be noted that the purpose of disclosing the embodiments is to help further understand the present invention. However, those skilled in the art will understand that various substitutions and modifications are possible without departing from the scope of the present invention and the appended claims. Therefore, the present invention should not be limited to the content disclosed in the embodiments, and the scope of protection of the present invention is defined by the scope of the claims.

Claims

1. A predictive model for the content of biomarkers in small samples of pork under variable temperature conditions, characterized in that, Based on experimental data of pork biomarker content under isothermal conditions, a predictive model for pork biomarker content was established. This model is based on the Logistic biomarker growth mechanism model, constructing the dependence of kinetic parameters r and K on temperature. A mechanistic prediction model is formed by shape constraints and Arrhenius mechanism correction on the parameter curves, and further combined with XGBoost for residual estimation and correction. In the variable-temperature prediction stage, the ambient temperature is converted into the food core temperature, and this temperature is input into the prediction model to achieve continuous prediction of pork biomarker content under variable-temperature conditions. The method includes the following steps: A. Data Acquisition and Preprocessing: A1. Obtain experimental data on the content of pork biomarkers under constant temperature conditions, and preprocess the experimental data to obtain model training data; A2. Obtain ambient temperature monitoring data during cold chain storage and transportation, and preprocess and convert the ambient temperature monitoring data to core temperature to obtain model input data; B. Construction of Logistic Growth Mechanism Model under Isothermal Conditions: Based on the model training data described in A1, a Logistic growth mechanism model under isothermal conditions is constructed; based on the change data of pork biomarker content under different isothermal conditions, the kinetic parameters corresponding to each temperature are determined; based on the kinetic parameters, the change law of pork biomarker content under isothermal conditions is characterized. C. Modeling the temperature dependence of K(T) on the model parameter r(T): C1. Calculate the parameters r and K at each experimental temperature based on the Logistic model: Based on the Logistic growth mechanism model under isothermal conditions in step B, calculate the corresponding kinetic parameters r and K at each experimental temperature; C2. Obtain parameters through interpolation and Discrete relationship with temperature T: Based on the kinetic parameters r and K obtained at each experimental temperature, establish the discrete relationship between parameters r and K and temperature; C3 Build Parameters , Relationship curve with temperature T: By extending the dynamic parameters at discrete temperature points to a continuous form, the relationship curves of dynamic parameters r and K as a function of temperature are obtained. D. Shape constraints and mechanism correction of model parametric curves: D1. Shape constraints on model parametric curves: Construct shape constraint terms based on parametric functions, and optimize and adjust the overall shape of parametric functions to meet the requirements of monotonicity, smoothness and load consistency, so as to obtain parametric functions that satisfy shape constraints; D2. Based on step D1, perform Arrhenius mechanism correction on the model parameter curves: incorporate the Arrhenius mechanism trend into the parameter function optimization process, so that the parameter function not only meets the data fitting requirements and shape constraint requirements, but also further conforms to biological laws, forming a Logistic growth mechanism model; E. Residual estimation using the XGBoost model: E1. Residual Sample Set Construction: Based on the Logistic growth mechanism model obtained in step D, calculate the mechanism prediction values ​​at each sampling time under each isothermal experimental condition, and construct the corresponding residual sample set; the residual sample set is used to characterize the deviation between the mechanism prediction results and the actual biomarker content; E2. Residual estimation model construction: Based on the residual sample set constructed in step E1, an XGBoost residual estimation model is established; the XGBoost residual estimation model takes the residual sample feature vector as input and the corresponding residual as output label; E3. Mechanism Model and Residual Fusion: The residual estimate obtained in step E2 is fused with the mechanism fusion prediction result obtained in step D to obtain the prediction model after residual correction; F. Construction of biomarker prediction model under variable temperature conditions: Based on the prediction model with residual correction obtained in step E, the core temperature sequence of pork obtained in step A2 is used as the model input to continuously predict the content of pork biomarkers under variable temperature conditions. The LAXG model determines the corresponding kinetic parameters based on the core temperature of pork products at each monitoring time, and performs iterative prediction based on the Logistic growth mechanism model. Furthermore, the residual estimation model obtained in step E is called to perform residual correction on the mechanism prediction results, and the residual estimates are fused with the mechanism prediction values ​​to output the predicted sequence of pork biomarker content under variable temperature conditions. G. Evaluation of the LAXG prediction model: The prediction results of the constructed LAXG prediction model are evaluated, and the model prediction performance is assessed based on the error between the model prediction value and the actual value. The evaluation metrics used include root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and weighted average absolute percentage error (WAPE). The model prediction performance is evaluated from the perspectives of overall error, absolute error, and relative error using these metrics. Through the above steps, a predictive model for the content of biomarkers in small samples of pork under variable temperature conditions is realized.

2. The predictive model for the content of biomarkers in small samples of pork under variable temperature conditions as described in claim 1, characterized in that, The experimental data on the content of pork biomarkers under constant temperature conditions were obtained by testing personnel in the laboratory by conducting a simulation experiment on the growth law of biomarkers on real samples using testing equipment and recording the experimental results. The constant temperature experimental data includes at least temperature, time, biomarker name, biomarker content and its corresponding unit.

3. The predictive model for the content of biomarkers in small samples of pork under variable temperature conditions as described in claim 1, characterized in that, In steps B and C, the kinetic parameters of the Logistic growth mechanism model include the content growth rate parameter r and the carrying capacity parameter K; the experimental data under each isothermal temperature condition are fitted to obtain the kinetic parameters r and K at the corresponding temperature, and the correspondence between the kinetic parameters r and K and the temperature is established.

4. The predictive model for the content of biomarkers in small samples of pork under variable temperature conditions as described in claim 1, characterized in that, The shape constraints in step D1 include: monotonicity constraints, used to limit the parameter from monotonically decreasing as the temperature increases; smoothness constraints, used to suppress drastic fluctuations in the parameter function as the temperature changes; and load capacity consistency constraints, used to limit the load capacity parameter from being lower than the maximum value of the experimental marker content under the corresponding temperature conditions. in, For data fitting terms, and This is a monotonicity constraint term. and For smoothness constraint terms, This is a load capacity consistency constraint; the parameter value is... This is to ensure that the growth rate parameter function and the carrying capacity parameter function not only meet the data fitting requirements and shape constraints, but also further conform to biological laws.

5. The predictive model for the content of biomarkers in small samples of pork under variable temperature conditions as described in claim 1, characterized in that, In step D2, based on the shape constraints in step D1, Arrhenius mechanism correction is further introduced to impose additional constraints on the growth rate parameter function, so that it not only meets the data fitting requirements and shape constraint requirements, but also conforms to biological laws.

6. The predictive model for the content of biomarkers in small samples of pork under variable temperature conditions as described in claim 1, characterized in that, In step E, based on the Logistic growth mechanism model obtained in step D, the mechanism prediction values ​​at each sampling time under various isothermal experimental conditions are calculated, and residual sample feature vectors and corresponding residuals are constructed to form a residual training dataset. Based on the residual training dataset, an XGBoost model is used to construct a residual estimation model, wherein the parameters of the XGBoost model are set as follows: the regression objective function is reg:squarederror, the number of trees n_estimators is 800, the learning rate is 0.05, the maximum depth of a single tree max_depth is 5, the minimum sample weight of a leaf node min_child_weight is 1, the row sampling ratio subsample is 0.8, the column sampling ratio colsample_bytree is 0.8, the L2 regularization coefficient reg_lambda is 1, the L1 regularization coefficient reg_alpha is 0, the minimum split gain gamma is 0, and the number of parallel threads n_jobs is 8. The residual estimates are then fused with the prediction results of the Logistic growth mechanism model to obtain the final prediction value.

7. The predictive model for the content of biomarkers in small samples of pork under variable temperature conditions as described in claim 1, characterized in that, In steps A2 and F, the ambient temperature monitoring data for cold chain storage and transportation is converted into the core temperature of pork products after the time unit is standardized, using a core temperature filtering equation. The thermal hysteresis time constant in the core temperature filtering equation is estimated and determined based on the thermal hysteresis effect of 1000 kg of pork during actual cold chain storage and transportation. The core temperature of the pork product is used as the temperature input of the model for subsequent prediction and calculation of pork biomarker content under varying temperature conditions.

8. As described in claim 1, characterized in that A predictive model for the content of biomarkers in small samples of pork under variable temperature conditions, wherein the pork biomarkers are chemical or biological biomarkers used to characterize pork quality, including at least volatile basic nitrogen and total bacterial count biomarkers.