Abstract
The rapid chilling and aging stages following pork slaughter represent a critical window for determining final physicochemical quality and flavor development. To address the destructive nature of conventional meat quality assessment methods and the limitations of rigid spectral probes when applied to irregular biological surfaces, this study developed and validated a wireless monitoring system integrating a flexible visible/near-infrared (VIS/NIR) sensing array with ensemble learning algorithms. The proposed system enables non-destructive, continuous monitoring of pork quality during cold-chain storage. A DeepEnsemble regression model based on a stacking framework was constructed by integrating Partial Least Squares Regression (PLSR), Support Vector Regression (SVR), and Extreme Gradient Boosting (XGBoost) to predict pH, moisture content, and total amino acid concentration. During a 26 h dynamic aging experiment, the proposed model achieved coefficients of determination (R2) of 0.9019, 0.9687, and 0.9600 for pH, moisture content, and total amino acids, respectively, with prediction performance exceeding that of individual regression models. The wireless transmission module maintained stable data communication under low-temperature and high-humidity conditions (−20 °C and 0–4 °C), with packet loss rates below 0.1%. These results indicate that the proposed system can effectively capture the dynamic evolution of pork quality during aging and provides a practical non-destructive approach for intelligent pork quality evaluation, cold-chain monitoring, and digital management of meat supply chains.
1. Introduction
The pork industry, as a vital pillar of the global agricultural economy, relies on scientific assessment and precise quality monitoring to support transparency within the food supply chain and enhance consumer health and safety assurance [1]. During the critical post-slaughter stages of rapid chilling and aging, muscle tissue undergoes complex physiological and biochemical transformations. This process involves lactate accumulation triggered by glycogenolysis, leading to a characteristic decrease in tissue pH. Concurrently, endogenous enzyme-mediated protein degradation promotes the generation of free amino acids, ultimately determining the final flavour and processing quality of the meat [2]. However, as a highly heterogeneous biological tissue, meat exhibits extreme dynamism and non-linearity in its water migration and biochemical metabolism [3]. These processes are profoundly influenced by environmental temperature, slaughter stress, and individual variations. Consequently, establishing a monitoring system capable of capturing the real-time evolution of key physicochemical indicators during aging is not only an urgent requirement for optimizing meat processing techniques but also an important step toward the digital transformation of meat processing and cold-chain management.
For a considerable period, the industry has remained heavily reliant on destructive sampling and discrete physicochemical analyses for pork quality assessment [4,5,6]. While traditional methods—such as pH meter penetration measurements, high-temperature drying moisture determination, and chromatographic amino acid analysis—offer high benchmark accuracy, they exhibit significant shortcomings in practical production settings. These include inefficiency, inability to provide continuous monitoring, and damage to meat integrity. Although Vis/NIR spectroscopy has made substantial progress in agricultural product testing in recent years due to its non-destructive and rapid advantages, traditional rigid spectral probes face technical bottlenecks when addressing pork surfaces with complex geometries and elasticity [7,8,9]. These include unstable optical path coupling, severe interface scattering interference, and signal attenuation in low-temperature, high-humidity environments. These factors have constrained the in-depth application of spectral technology in slaughtering and processing facilities, making the development of a highly conformable and stable sensing device a key research challenge in this field.
The emergence of flexible electronics technology offers a novel perspective for addressing the aforementioned challenges in bio-material interface coupling. By employing polymeric substrates such as polyethylene terephthalate (PET) or polyimide (PI) (Shanghai Jiangshuo Co., Ltd.), combined with precision laser etching and encapsulation techniques, sensors can exhibit mechanical flexibility akin to an ‘electronic skin’ [10]. This characteristic enables optical sensing units to adhere closely to meat muscle fibres or even within incisions, as illustrated in Figure 1b. This significantly reduces diffuse reflection losses caused by air gaps, thereby enhancing signal capture efficiency in critical wavelength bands. Concurrently, the system architecture integrating low-power wireless transmission protocols (such as WiFi and MQTT) further liberates detection scenarios from the constraints of bulky laboratory instruments, enabling end-to-end data connectivity from processing workshops to cold-chain logistics. This hardware-level innovation provides foundational assurance for acquiring high signal-to-noise ratio, multidimensional raw spectral data of pork.
Figure 1.
Pork Cold Chain Business Process and Overall Design of Flexible Wireless Spectral Sensing System. (a) Business process; (b,c) principle of spectral data acquisition by flexible spectral sensors; (d) preparation process for flexible printed circuits; (e) sensing system logic diagram; (f) cloud platform monitoring interface.
When addressing the complex mapping relationship between multi-band spectra and physicochemical indicators, single linear regression or shallow learning models often struggle to balance predictive accuracy with generalisability [11,12,13]. Pork’s spectral characteristics are not only regulated by pH, moisture content, and amino acid levels but also subject to non-linear perturbations arising from tissue microstructural variations. Traditional PLSR demonstrates robustness in handling highly collinear data but struggles to capture local nonlinear features [14]. SVR and XGBoost can uncover nonlinear relationships yet face overfitting risks in small-sample or cross-batch predictions [15,16]. In light of this, this paper proposes a DeepEnsemble model integrating multiple heterogeneous algorithms. Leveraging the meta-learning mechanism of the Stacking architecture, this model aims to construct a decision system with high fault tolerance and precision within complex biological matrices by complementing the strengths of its base learners [17,18]. This enables deep coupling and precise inversion of multimodal pork quality data.
This paper operates at the intersection of flexible sensing and DeepEnsemble learning, aiming to develop a flexible wireless spectral sensing system for comprehensive monitoring throughout the pork aging process. The research focuses on designing flexible hardware circuits, establishing a multi-indicator physicochemical database, and optimising the DeepEnsemble algorithm. Through in-depth analysis of the evolution trajectories of pH, moisture content, and total amino acids during the aging process, this study validates the system’s predictive efficacy for complex biochemical indicators driven by multi-band data. This research not only resolves the physical challenge of stable coupling between sensors and irregular biological surfaces but also explores novel pathways at the algorithmic level to enhance the robustness of spectral detection systems. It provides both theoretical foundations and technical support for intelligent monitoring and precise grading within the meat industry.
2. Materials and Methods
2.1. Overall Architecture of the Sensing System and Data Flow Logic
The monitoring system developed in this study adopts a typical “perception-transmission-computation” integrated architecture, aiming to achieve seamless data flow from the biological tissue interface to the digital decision-making end. The system’s sensing terminal is centered on an integrated spectral sensor array based on the AS726X multispectral sensing module (AMS, Cleveland, OH, USA), which can simultaneously capture signals across 12 discrete spectral channels covering the range from 450 nm to 860 nm. The center wavelengths of the channels are approximately 450, 500, 550, 570, 600, 650, 610, 680, 730, 760, 810, and 860 nm, each with a typical full width at half maximum (FWHM) of approximately 20 nm according to the manufacturer specifications. The selected wavelengths were determined based on previous spectral studies on pork quality [19,20]. After initial encoding by a high-performance microprocessor, these raw light intensity data are remotely transmitted through the integrated wireless module using the MQTT protocol [21]. Within this architecture, the data terminal not only visualises spectral characteristics (as illustrated in Figure 1f) but, crucially, deploys a DeepEnsemble prediction engine. This engine parses incoming multimodal features in real time, integrating them with the biochemical evolution patterns of pork tissue to generate predictive outputs for pH, moisture content, and total amino acid levels. This distributed architecture design not only enhances monitoring real-time capability but also overcomes the computational limitations of standalone devices through edge-cloud collaboration, laying the foundation for multi-node parallel monitoring in industrial environments.
Concurrently, the system’s software layer architecture deeply integrates feature enhancement and automatic alignment logic. During data transmission, the system automatically appends precise timestamps and device IDs to each spectral sampling set. This ensures millisecond-level spatio-temporal alignment between every feature curve and the ground truth points obtained from laboratory physicochemical analysis throughout the 26 h dynamic monitoring cycle. This rigorous underlying architecture guarantees high confidence in the model training set, providing core logical support for the subsequent DeepEnsemble model’s stable prediction in complex aging environments. The overall logic of the sensing system is illustrated in Figure 1e.
Although the proposed system demonstrated reliable performance under the experimental conditions of this study, several factors should be considered for large-scale industrial deployment. For example, when multiple sensing units operate simultaneously, network bandwidth limitations may influence the efficiency of real-time data transmission. In addition, long-term use of spectral sensors may introduce calibration drift, which could affect measurement stability over extended periods. Variability among different pork cuts, including differences in thickness, surface moisture, and tissue structure, may also influence spectral responses. Therefore, periodic sensor calibration and further system optimization are necessary to ensure consistent performance in practical processing environments. Future work will focus on evaluating the real-time performance of the proposed architecture under industrial conditions and conducting large-scale validation in commercial meat processing facilities.
2.2. Physical Implementation and Packaging Processes for Flexible Hardware Systems
The physical implementation of the hardware system focuses on resolving the challenge of optical coupling between the sensor and the irregular surface of pork. As illustrated in Figure 1c, the system employs PI and PET as flexible substrates. Circuit fabrication utilises UV nano-laser etching technology, leveraging the cold ablation mechanism of the laser beam to precisely excise non-conductive regions from the copper-clad flexible board, as shown in Figure 1d. This micrometre-scale fabrication process yields a highly dense conductive network with line widths controlled around 120 μm, enabling the integration of multiple spectral channels and light source drive circuits within an extremely compact footprint. The welded optoelectronic components adopt a reflective configuration, wherein both the LED excitation source and spectral sensing chip face the tissue side. This design necessitates that light paths traverse scattering pathways within the tissue before capture, significantly enhancing the effective collision probability between photons and biochemical molecules such as proteins and water.
To withstand the high humidity and corrosive pork juices in the aging environment, the system employs a highly integrated monolithic encapsulation strategy. Above the component layer, a spin-coated film of polydimethylsiloxane (PDMS) with low elastic modulus and high light transmittance is applied. This film not only serves as an optical coupling interface, reducing Fresnel reflection losses between the sensor and muscle fibres, but also acts as a robust chemical barrier, effectively preventing penetration by external microorganisms and condensation [22]. The circuit’s reverse side incorporates a PET reinforcement layer to enhance shear strength, ensuring solder joints remain fatigue-resistant against tissue deformation during sensor implantation into pork incisions or conformal coating applications. This hardware implementation, combining biocompatibility with industrial robustness, constitutes the physical prerequisite for acquiring high-signal-to-noise ratio spectral data.
2.3. Construction of the DeepEnsemble Prediction Model
Addressing the highly non-linear behaviour and cross-sample heterogeneity exhibited by pork quality indicators during the aging process, this study developed a DeepEnsemble model based on the Stacking architecture, as illustrated in Figure 2. The algorithmic logic first subjects raw spectral features to advanced preprocessing: SNV transformation was applied to reduce scattering effects in the spectral signals. Subsequently, spectral derivatives were calculated using a finite-difference method to enhance spectral feature variation. Both first-order and second-order derivatives were generated from the original reflectance bands and incorporated into the feature set [23].
Figure 2.
Schematic Diagram of the DeepEnsemble Model Based on the Stacking Architecture.
The AS726X sensor outputs relative spectral intensity signals rather than absolute reflectance values. To ensure comparability and measurement stability, a calibration and normalization procedure was applied prior to spectral analysis. First, dark calibration was conducted by covering the sensor optical window to record the dark signal Id. Second, a white reference calibration was performed using a diffuse reflectance reference surface to obtain the reference signal Iw. During measurement, the raw signal Is from pork tissue was converted to a normalized reflectance-like signal using:
where R represents the normalized spectral response used for subsequent modelling. Each spectral acquisition consisted of three repeated scans, and the averaged signal was used to reduce random noise and improve measurement stability.
Subsequently, the 12 reflectance bands together with their first- and second-order derivatives were used as model input features. The model architecture comprises two tiers: Layer 0 deploys complementary base learners. PLSR captures linear spectral covariances; SVR employs radial basis function kernels to process high-dimensional non-linear features; XGBoost enhances extraction of pH and moisture-sensitive spectral bands through iterative decision tree optimisation. Through this heterogeneous integration, the model simultaneously harnesses the strengths of both linear and non-linear algorithms.
For the SVR model, the penalty parameter C, kernel width γ, and insensitive loss parameter ε were determined through preliminary parameter tuning. The parameters were explored within the ranges of C = 101–103, γ = 10−3–10−1, and ε = 0.01–0.2. The final SVR configuration adopted C = 100, γ = 0.01, and ε = 0.1.
For the XGBoost model, key parameters including the number of trees, maximum tree depth, and learning rate were tuned empirically to balance model accuracy and overfitting. The number of estimators was evaluated in the range of 50–300, with the maximum depth between 3 and 6 and the learning rate between 0.01 and 0.3. Subsampling ratios for samples and features were explored between 0.6 and 1.0. The final model employed 100 trees with a maximum depth of 4, a learning rate of 0.1, and subsampling ratios of 0.8 for both rows and features.
The meta-learner in Layer 1 employs a linear regressor with regularisation penalty. Its core task is to learn the error distribution of each base learner across cross-validation sets and dynamically assign optimal weighting coefficients. During training, a 5-fold cross-validation mechanism is implemented to prevent overfitting, with global grid search optimisation conducted for the SVR penalty parameter and XGBoost learning rate. To prevent data leakage and overestimation of predictive performance, all samples from the same carcass were strictly assigned to the same fold and were never included in both the training and validation sets simultaneously. This deeply integrated architecture significantly enhances the prediction system’s generalisation capability across diverse batches of pork samples, enabling the model to maintain precise inversion of pH variations, moisture loss, and total amino acid increase, even amidst substantial sample fluctuations.
2.4. Experimental Protocol Design and Physicochemical Monitoring Standards
The experimental protocol design strictly adheres to the logical framework of post-slaughter biological tissue evolution within meat science. It aims to capture the biochemical information flow throughout pork’s entire progression from rigor mortis, through the recovery phase, to the maturation stage (Aging) via high-frequency dynamic monitoring [24]. Healthy hind leg longissimus dorsi muscle samples sourced from standardised slaughterhouses were selected for this study. As illustrated in Figure 3a–d, post-slaughter pigs underwent rapid chilling and aging processes. To ensure samples retained their original physiological state during spectral acquisition, all meat specimens were transported to the laboratory within one hour of sampling. Superfluous connective tissue and fat layers were promptly removed, and the meat was divided into uniformly sized experimental units. To enable sensing within deep muscle tissue, researchers prepared incisions along the longitudinal fibre direction of the samples. Flexible spectral sensors encapsulated in PDMS were implanted into these incisions, as depicted in Figure 3e,f. The natural tension of the muscle tissue, combined with manual adjustment, ensured a tight conformal coupling between the sensor sensing surface and the internal tissue interface.
Figure 3.
Testing and data acquisition procedures for the flexible wireless spectral sensing system. (a,b) Pig slaughtering; (c) temperature monitoring in the rapid chilling room; (d) aging room; (e,f) adhesive mounting and calibration of flexible spectral sensors.
The spectral data acquisition protocol was configured to perform a full-band scan every two hours, with the sampling cycle covering the entire 26 h process of rapid chilling and aging. Each acquisition cycle involved the microprocessor driving 12 characteristic channels to perform three samples and calculate the mean value, thereby smoothing out system thermal noise. Concurrently with spectral acquisition, destructive sampling was synchronised according to a pre-set time sequence for determining laboratory benchmark indicators. To establish a reliable ‘spectral–physicochemical’ alignment dataset, sampling locations are strictly confined to areas adjacent to the sensor detection surface. This ensures spatial consistency between the optical characteristics reflected in the spectra and the biochemical content revealed by physicochemical analysis. In total, pigs from six carcass weight categories (under 60 kg, 60–70 kg, 70–80 kg, 80–90 kg, 90–100 kg, and over 100 kg) were included in this study. For each weight category, three pigs were selected as biological replicates. During the 26 h post-slaughter monitoring process, physicochemical measurements were conducted at ten representative time points: before rapid chilling, after rapid chilling, and during the aging process at 3 h intervals (3 h, 6 h, 9 h, 12 h, 15 h, 18 h, 21 h, and 24 h). Consequently, the dataset consisted of 6 weight categories × 3 pigs × 10 time points, resulting in 180 paired samples of spectral signals and physicochemical reference measurements used for model development. All collected spectral reflectance data is transmitted in real-time via a latency-free wireless link to the cloud platform. Indexed by timestamps, this data is correlated with subsequent physicochemical measurements, forming the foundational modal data for DeepEnsemble model training.
Physicochemical parameter determinations adhere to current national and industry standards, ensuring the authority and reproducibility of experimental data. For pH monitoring, the study employed a potentiometric glass electrode pH meter, operating in accordance with the National Food Safety Standard GB 5009.237: Determination of pH in Food [25]. During measurement, the electrode was inserted into the deep muscle layer, with readings recorded once stabilised. To mitigate biases arising from muscle tissue heterogeneity, three replicate measurements were taken at each sampling node, with the arithmetic mean calculated. The dynamic pH trajectory not only reflects the rate of lactic acid accumulation but also serves as a critical parameter for assessing meat tenderness development [26]. Quantitative analysis of moisture content and total amino acids constitutes the core basis for evaluating meat flavour and economic value. Moisture determination strictly followed the direct drying method specified in the National Food Safety Standard for Determination of Moisture in Foodstuffs (GB 5009.3) [27]. Meat samples were precisely weighed and placed in a constant-temperature drying oven until constant weight was achieved. The total tissue water content is calculated by recording the mass change before and after drying. Total amino acid content is assessed using the more precise high-performance liquid chromatography (HPLC) method [28]. Meat samples undergo acid hydrolysis to completely degrade proteins into free amino acids, followed by derivatisation with phenylisothiocyanate (PITC). Derivatised samples were eluted on a C18 column according to polarity differences, with characteristic absorption peaks recorded via ultraviolet detection. This study quantitatively determined the combined concentrations of 16 major amino acids, including glutamic acid, aspartic acid, and leucine. This quality indicator monitoring protocol provided high-quality annotated labels for the DeepEnsemble model.
3. Results and Discussion
3.1. Spectral Characteristics and Physicochemical Analysis
The post-slaughter aging process in pork involves complex biochemical transformations. This study systematically elucidated the evolution patterns of quality indicators through 26 h dynamic monitoring of samples across six weight gradients (under 60 kg, 60–70 kg, 70–80 kg, 80–90 kg, 90–100 kg, and over 100 kg).
As illustrated in Figure 4a, experimental monitoring data clearly demonstrates a characteristic downward trajectory of pH values across all weight segments. This phenomenon stems from the cessation of oxygen supply to muscle tissue post-slaughter, triggering anaerobic glycogenolysis that leads to significant lactic acid accumulation, thereby acidifying the tissue environment [29]. In-depth comparative analysis reveals that samples from large-sized pigs weighing over 90 kg exhibit a markedly steeper pH decline gradient compared to lighter weight segments. Moreover, they rapidly approach the limit pH value within the first 12 h post-slaughter. Heavier pigs exhibited a steeper pH decline during the post-mortem period. This observation indicates differences in post-mortem metabolic dynamics among weight groups. Correspondingly, as depicted in Figure 4b, moisture content exhibited a stepwise decline over time. The decrease in moisture content during the post-mortem period likely reflects changes in water distribution within muscle tissue. Previous studies have reported that post-mortem structural changes in myofibrils under acidic conditions may reduce water-holding capacity and facilitate water migration, potentially contributing to drip loss [30,31].
Figure 4.
Pork quality indicators and free amino acids. (a) pH variation; (b) moisture content variation; (c) total amino acid variation; (d–i) free amino acid content variation in pigs across six weight categories (from light to heavy: under 60 kg, 60–70 kg, 70–80 kg, 80–90 kg, 90–100 kg, and over 100 kg, corresponding to figure (d–i)). The six weight grades adhere to the carcass grading standards and industry practices widely adopted by pork processing enterprises.
Amino acid metabolism, a core indicator for evaluating meat flavour development, exhibited a scientifically significant ‘one decrease and five increases’ heterogeneous evolution pattern in this study. As illustrated in Figure 4d–i, integrating experimental data across six weight brackets reveals that while total amino acid content exhibits a marginal fluctuating decline at the macroscopic level—influenced by interstitial fluid loss and migration of protein degradation products—five key free amino acids, serving as core flavour precursors, demonstrate a pronounced linear increase across all experimental groups at the microscopic free amino acid level [32]. This evolutionary mechanism confirms the sustained degradation of structural proteins by endogenous proteases (such as calcium-activated protease systems and cathepsins) during the aging phase [33]. Statistical analysis indicates that pig samples within the 70–80 kg weight range exhibit the most stable free amino acid conversion efficiency, demonstrating optimal flavour evolution coordination. This complex biochemical transformation lays a robust physiological foundation for subsequent quality index inversion via multi-band spectral signals.
The observed variations in biochemical indicators during post-slaughter storage were analyzed based on the measured experimental data and their temporal trends. It should be noted that biochemical changes in pork may vary depending on muscle type, animal condition, and slaughter or chilling conditions, which could introduce additional variability in practical production environments. Nevertheless, these physicochemical changes are closely associated with variations in spectral reflectance characteristics, enabling the VIS/NIR monitoring system to capture relevant quality information. This relationship further supports the effectiveness of the proposed spectral sensing approach for predicting pork quality indicators.
As shown in Figure 5, the temporal evolution of the 12 discrete spectral bands exhibits a high degree of logical consistency with the fluctuations in the aforementioned physicochemical indicators. The AS726X sensor outputs relative spectral intensity signals rather than absolute reflectance values. After dark–white calibration and normalization, these signals can effectively represent the relative reflectance trends of pork tissue across different wavelengths and were therefore used for subsequent spectral analysis. The selected twelve wavelengths were chosen to reflect key physicochemical attributes of pork tissue. In the visible region (450–650 nm), spectral reflectance is highly sensitive to pH variations, with the band around 550 nm being closely associated with chemical state transitions of myoglobin from oxymyoglobin to metmyoglobin [34]. In the near-infrared region (730–860 nm), reflectance variations are primarily governed by tissue water distribution, where the bands at approximately 760 nm and 860 nm capture the third overtone vibrations of O–H stretching in water molecules. These wavelength-dependent responses provide a physicochemical basis for monitoring pork quality changes during cold-chain storage [35]. Comparing spectral fingerprints across six weight categories reveals that heavier pork samples exhibit significantly enhanced near-infrared background scattering intensity due to higher fat infiltration. Whilst this increases data nonlinearity, it also provides richer tissue structural information. The flexible wireless sensing system employed in this study leverages its full-spectrum, high spatio-temporal resolution information capture capability to ensure the DeepEnsemble model can overcome biological variations across individual weights, achieving precise reconstruction of pork quality dynamics.
Figure 5.
Spectral data variations across six weight categories of pigs (from light to heavy: under 60 kg, 60–70 kg, 70–80 kg, 80–90 kg, 90–100 kg, and over 100 kg, corresponding to figures (a–f)).
3.2. Model Evaluation and Predictive Accuracy Analysis
This study systematically compared the predictive efficacy of Partial Least Squares Regression (PLSR), Support Vector Regression (SVR), Extreme Gradient Boosting Tree (XGBoost), and the proposed DeepEnsemble ensemble model. Performance heatmaps and scatter plot analyses revealed that individual models exhibited notable robustness limitations when processing highly heterogeneous biological tissue data such as pork. Specifically, the PLSR model, representing linear regression, maintained an R2 of approximately 0.6 in predicting pH and moisture content, with its RPD value significantly below industrial detection thresholds. This strongly demonstrates the existence of deep nonlinear correlations between 12-band spectral features and meat physicochemical indicators, rendering simple linear mapping inadequate for capturing the complex biochemical evolution patterns during the aging process. Although SVR and XGBoost achieved improved accuracy through kernel spatial mapping and residual learning, their performance bottlenecks remained pronounced when predicting total amino acid content, which is severely affected by individual variations.
The DeepEnsemble model employs a stacking generalisation strategy to achieve deep compensation for prediction biases in underlying algorithms, yielding represents an effective approach across all evaluation metrics. Experimental data indicates that DeepEnsemble attained an R2 of 0.9019 in pH prediction, with RMSE reduced to 0.074 and a corresponding RPD value of 3.19, demonstrating stable predictive performance. The model’s performance is even more outstanding in predicting moisture content and total amino acid content, with R2 values climbing to 0.9687 and 0.9600, respectively. Notably, for the highly challenging metric of total amino acid content, DeepEnsemble directly elevates the RPD value from under 2.5 for a single model to approximately 5.0. This leap in performance stems from the model’s internal meta-learner mechanism. By learning the error distributions across base learners for samples across different weight segments, it dynamically optimises weight coefficients. This enables precise anchoring of key feature signals amidst the nonlinear fluctuations throughout the entire aging cycle (Figure 6).
Figure 6.
Scatter plots of prediction performance for quality indicators of different models. (a) pH; (b) moisture content; (c) total amino acids; (d) R2 heatmap.
Statistical analysis of prediction outcomes further confirms that the DeepEnsemble model not only leads in goodness-of-fit but also demonstrates robust cross-sample generalization. Mixed validation across six weight-range samples reveals the model effectively mitigates spectral baseline shifts caused by uneven fat distribution. During the rapid cooling phase with the steepest pH decline and the late maturation phase with the most active amino acid conversion, DeepEnsemble maintains consistent predictive performance. This high-precision, broadly adaptable algorithmic characteristic, coupled with the hardware foundation of 12-band spectral sensing, provides a reliable assessment method for the digital grading of pork quality. It bridges the accuracy gap in existing non-destructive testing technologies when handling complex meat quality evolution data (Table 1).
Table 1.
Coefficient of determination (R2) and relative prediction deviation (RPD) values of different machine learning models for pH, moisture content, and total amino acids prediction.
3.3. Performance Evaluation of Flexible Visible-Near Infrared Wireless Sensing System
The hardware system’s performance within the highly dynamic environment of aging constitutes another core dimension for gauging this study’s practical value. Experimental validation demonstrates that sensor patches utilising flexible printed circuit (FPC) technology exhibits good biointerface compatibility. Analysis of spectral signal trajectories across 12 bands during a 26 h continuous monitoring cycle reveals remarkably smooth reflectance curves with high signal-to-noise ratios across all frequencies, free from abrupt outliers caused by probe loosening or tissue deformation. This contact-based measurement effectively minimises diffuse reflection noise from air gaps, enabling the system to maintain constant optical coupling efficiency throughout the physical contraction process of pork muscle fibres [36]. Particularly in moisture-sensitive long wavelengths like 860 nm, the sensor precisely captures minute fluctuations in light intensity caused by water migration—a feat unattainable with conventional rigid probes.
Concurrently, the integrated wireless communication link and power management system demonstrates reliable performance under low-temperature conditions, high-humidity environments ranging from −20 °C to 0–4 °C. As illustrated in Figure 7, the system adopts the MQTT asynchronous communication protocol, ensuring that the data transmission packet loss rate consistently remains below 0.1% in the complex metal-shielded environment of the aging chamber, even with continuous changes in temperature and time. Employing a low-power design strategy enables the system to sustain high-frequency sampling (every two hours) while supporting full-cycle monitoring for at least 26 h. This enduring, stable performance allows the system to comprehensively record the complete biochemical trajectory of pigs across different weight categories during the acid drainage process, providing continuous, high-quality time-series feature inputs for subsequent DeepEnsemble modelling.
Figure 7.
Wireless communication performance of the flexible sensing system during the 26 h aging period of pork: Throughout the entire monitoring process, the received signal strength indicator (RSSI) remained stable between −60 and −75 dBm (average: −63.8 dBm), with a packet loss rate below 0.06%. There were no continuous transmission interruptions, indicating that the wireless connection was stable and reliable under refrigerated and high-humidity conditions.
Further performance evaluations demonstrated the flexible sensing system’s exceptional adaptability across diverse physiological specimens. Whether applied to smaller subjects with dense connective tissue or larger specimens exceeding 100 kg with pronounced adipose infiltration, the sensors achieved uniform, conforming distribution via their flexible substrate. This enabled acquisition of representative deep tissue information. Post-experiment integrity checks of the PDMS encapsulation layer revealed no physical degradation or biochemical erosion, demonstrating its outstanding biocompatibility and industrial robustness. Combining both hardware and software performance, this system not only achieves high-precision inversion of pork physicochemical indicators but also physically adapts well to complex meat processing environments. This establishes a robust technical paradigm for constructing comprehensive monitoring networks across the entire meat supply chain.
4. Conclusions
This study developed and validated a dynamic pork quality monitoring system integrating flexible visible–near-infrared (VIS/NIR) spectral sensing with a DeepEnsemble deep learning model. The proposed flexible sensing interface, constructed using FPCs and PDMS encapsulation, demonstrated good conformability and electrical stability under cold-chain conditions, enabling reliable spectral acquisition on irregular pork surfaces and ensuring high signal quality during continuous monitoring. Experimental results showed that the system effectively captured spectral variations across 12 characteristic bands during the 26 h post-slaughter process, enabling accurate prediction of key pork quality indicators. The DeepEnsemble model exhibited robust multi-parameter prediction performance, achieving high accuracy for pH, moisture content, and total amino acids, and outperforming conventional regression models such as PLSR, SVR, and XGBoost. These results demonstrate that the integration of flexible sensing technology with ensemble deep learning provides an effective solution for non-destructive and real-time monitoring of pork quality. The proposed approach shows strong potential for industrial applications by improving quality control efficiency, supporting food safety management, and enhancing transparency within the meat supply chain. Future work will focus on improving model interpretability through wavelength relevance analysis and further validating the system under large-scale industrial conditions.
Author Contributions
M.Y.: conceptualization, data curation, formal analysis, software, writing—original draft; D.L.: investigation, software, writing—original draft; H.Y.: investigation, software, supervision; X.S.: methodology, project administration; G.X.: resources, validation; M.Z.: project administration, resources; T.Z.: project administration, supervision; L.C.: methodology, validation; R.Z.: conceptualization, software, visualization; X.X.: methodology, project administration, supervision, writing—review and editing. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Data Availability Statement
The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.
Acknowledgments
This research was supported by the China Instrumentation Society’s ‘Challenge-Based Research Programme’ (CIS2025JBGZ-003) and the Chengdu Institute of Metrology and Testing’s research project (2024CDJL003).
Conflicts of Interest
Author Tianyu Zhu was employed by the company Beijing Lindian Weiye Electronic Technology Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
References
- Lebret, B.; Čandek-Potokar, M. Pork quality attributes from farm to fork. Part I. Carcass and fresh meat. Animal 2022, 16, 100402. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Long, V.P.; Tarrant, P.V. The effect of pre-slaughter showering and post-slaughter rapid chilling on meat quality in intact pork sides. Meat Sci. 1990, 27, 181–195. [Google Scholar] [CrossRef] [Scilit]
- Patriarca, M.; Barlow, N.; Cross, A.; Hill, S.; Robson, A.; Taylor, A.; Tyson, J. Atomic spectrometry update: Review of advances in the analysis of clinical and biological materials, foods and beverages. J. Anal. At. Spectrom. 2021, 36, 452–511. [Google Scholar] [CrossRef] [Scilit]
- Kucha, C.T.; Liu, L.; Ngadi, M.O. Non-destructive spectroscopic techniques and multivariate analysis for assessment of fat quality in pork and pork products: A review. Sensors 2018, 18, 377. [Google Scholar] [CrossRef] [Scilit]
- Wu, X.; Liang, X.; Wang, Y.; Wu, B.; Sun, J. Non-destructive techniques for the analysis and evaluation of meat quality and safety: A review. Foods 2022, 11, 3713. [Google Scholar] [CrossRef] [Scilit]
- Khaled, A.Y.; Parrish, C.A.; Adedeji, A. Emerging nondestructive approaches for meat quality and safety evaluation—A review. Compr. Rev. Food Sci. Food Saf. 2021, 20, 3438–3463. [Google Scholar] [CrossRef] [Scilit]
- Ma, L.; Wan, Z.; Yang, Z.; Chen, X.; Zhang, R.; Yin, M.; Xiao, X. Flexible Visible Spectral Sensing for Chilling Injuries in Mango Storage. Eng 2025, 6, 158. [Google Scholar] [CrossRef] [Scilit]
- Yang, Z.; Wang, Y.; Ma, L.; Chen, X.; Zhang, R.; Xiao, X. Flexible Wireless Vibration Sensing for Table Grape in Cold Chain. Eng 2025, 6, 236. [Google Scholar] [CrossRef] [Scilit]
- Zhang, R.; Zhao, W.; Yin, M.; Chen, X.; Ma, L.; Zhu, Z.; Xiao, X. In-situ flexible non-destructive wireless sensing for bagged fruits. Microchem. J. 2025, 218, 115227. [Google Scholar] [CrossRef] [Scilit]
- Wang, M.; Wang, B.; Zhang, R.; Wu, Z.; Xiao, X. Flexible Vis/NIR wireless sensing system for banana monitoring. Food Qual. Saf. 2023, 7, fyad025. [Google Scholar] [CrossRef] [Scilit]
- Emmert-Streib, F.; Dehmer, M. Evaluation of regression models: Model assessment, model selection and generalization error. Mach. Learn. Knowl. Extr. 2019, 1, 521–551. [Google Scholar] [CrossRef] [Scilit]
- Koutsoukas, A.; Monaghan, K.J.; Li, X.; Huan, J. Deep-learning: Investigating deep neural networks hyper-parameters and comparison of performance to shallow methods for modeling bioactivity data. J. Cheminform. 2017, 9, 42. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Maleki, F.; Ovens, K.; Gupta, R.; Reinhold, C.; Spatz, A.; Forghani, R. Generalizability of machine learning models: Quantitative evaluation of three methodological pitfalls. Radiol. Artif. Intell. 2022, 5, e220028. [Google Scholar] [CrossRef] [Scilit]
- Wold, S.; Sjöström, M.; Eriksson, L. PLS-regression: A basic tool of chemometrics. Chemometr. Intell. Lab. Syst. 2001, 58, 109–130. [Google Scholar] [CrossRef] [Scilit]
- El Bilali, A.; Abdeslam, T.; Ayoub, N.; Lamane, H.; Ezzaouini, M.A.; Elbeltagi, A. An interpretable machine learning approach based on DNN, SVR, Extra Tree, and XGBoost models for predicting daily pan evaporation. J. Environ. Manag. 2023, 327, 116890. [Google Scholar] [CrossRef] [Scilit]
- Ren, Y.; Lv, Z.; Xu, Z.; Wang, Q.; Wang, Z. Slurry-ability mathematical modeling of microwave-modified lignite: A comparative analysis of multivariate non-linear regression model and XGBoost algorithm model. Energy 2023, 281, 128143. [Google Scholar] [CrossRef] [Scilit]
- Ji, R.; Kumar, N.; Padha, D. Optimized Intrusion Detection Approach for Cyber-Physical System Using Meta-Learning With Stacked Generalization: An Ensemble Learning Inspired Approach. Secur. Priv. 2025, 8, e70031. [Google Scholar] [CrossRef] [Scilit]
- Freire, A.; de Andrade, J.V.R.; Fernandes, B.J.T.; Silva, L.H.D.S.; Albuquerque, G.; Guerra, M.; Balbino, I.; Tomaz, M.S.; de Oliveira, J.F.L. Dynamic Model Weighting via Stacking-Meta Learning for Multi-Class Classification. In Proceedings of the 2025 38th SIBGRAPI Conference on Graphics, Patterns and Images (SIBGRAPI), Salvador, Brazil, 30 September–3 October 2025; IEEE: New York, NY, USA, 2025; pp. 1–6. [Google Scholar]
- Monroy, M.; García-Ruiz, A.; Sánchez, M.T.; Garrido-Varo, A. Pork meat quality classification using visible/near-infrared spectroscopic data. Biosyst. Eng. 2010, 107, 271–276. [Google Scholar] [CrossRef] [Scilit]
- Balage, J.M.; da Silva, S.L.; Gomide, L.A.M.; Bonin, M.N.; de Andrade, E.N.; Ferreira, M.M.C. Predicting pork quality using Vis/NIR spectroscopy. Meat Sci. 2015, 108, 37–43. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Grgić, K.; Špeh, I.; Heđi, I. A web-based IoT solution for monitoring data using MQTT protocol. In Proceedings of the 2016 International Conference on Smart Systems and Technologies (SST), Osijek, Croatia, 12–14 October 2016; IEEE: New York, NY, USA, 2016; pp. 249–253. [Google Scholar]
- Yeh, N. Analysis of spectrum distribution and optical losses under Fresnel lenses. Renew. Sustain. Energy Rev. 2010, 14, 2926–2935. [Google Scholar] [CrossRef] [Scilit]
- Pathak, A.J.; Tamuly, D.; Thakur, B. Comparative Evaluation of Spectral Preprocessing Techniques in Soil Clay Prediction: A Study of SG PLSR and SNV PLSR Models. In Proceedings of the National Conference, Galston, Australia, 3–6 October 2025; p. 6. [Google Scholar]
- Xie, A.; Zhang, Y.; Wu, H.; Chen, M. Monitoring the Aging and Edible Safety of Pork in Postmortem Storage Based on HSI and Wavelet Transform. Foods 2024, 13, 1903. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- GB 5009.237-2016; National Food Safety Standard—Determination of Amino Acids in Foods. National Health Commission of the People’s Republic of China: Beijing, China, 2016.
- Wang, D.; Cheng, F.; Wang, Y.; Han, J.; Gao, F.; Tian, J.; Zhang, K.; Jin, Y. The changes occurring in proteins during processing and storage of fermented meat products and their regulation by lactic acid bacteria. Foods 2022, 11, 2427. [Google Scholar] [CrossRef] [Scilit]
- GB 5009.3-2016; National Food Safety Standard—Determination of Moisture in Foods. National Health Commission of the People’s Republic of China: Beijing, China, 2016.
- Ali, A.H. High-performance liquid chromatography (HPLC): A review. Ann. Adv. Chem. 2022, 6, 10–20. [Google Scholar] [CrossRef] [Scilit]
- Shen, Q.W.; Du, M.; Means, W.J. Regulation of postmortem glycolysis and meat quality. In Applied Muscle Biology and Meat Science; CRC Press: Boca Raton, FL, USA, 2009; pp. 175–194. [Google Scholar]
- Offer, G.; Cousins, T. The mechanism of drip production: Formation of two compartments of extracellular space in muscle post mortem. J. Sci. Food Agric. 1992, 58, 107–116. [Google Scholar] [CrossRef] [Scilit]
- Huff-Lonergan, E.; Lonergan, S.M. Mechanisms of water-holding capacity of meat: The role of postmortem biochemical and structural changes. Meat Sci. 2005, 71, 194–204. [Google Scholar] [CrossRef] [Scilit]
- Smit, G.; Smit, B.A.; Engels, W.J.M. Flavour formation by lactic acid bacteria and biochemical flavour profiling of cheese products. FEMS Microbiol. Rev. 2005, 29, 591–610. [Google Scholar] [CrossRef]
- van Kranenburg, R.; Kleerebezem, M.; Van Hylckama Vlieg, J.; Ursing, B.M.; Boekhorst, J.; Smit, B.A.; Ayad, E.H.E.; Smit, G.; Siezen, R.J. Flavour formation from amino acids by lactic acid bacteria: Predictions from genome sequence analysis. Int. Dairy J. 2002, 12, 111–121. [Google Scholar] [CrossRef] [Scilit]
- Springer, B.A.; Sligar, S.G.; Olson, J.S.; Phillips, G.N.J. Mechanisms of ligand recognition in myoglobin. Chem. Rev. 1994, 94, 699–714. [Google Scholar] [CrossRef] [Scilit]
- Sun, Q. The Raman OH stretching bands of liquid water. Vib. Spectrosc. 2009, 51, 213–217. [Google Scholar] [CrossRef] [Scilit]
- Sarkar, M.; Assaad, M. Noninvasive non-contact SpO2 monitoring using an integrated polarization-sensing CMOS imaging sensor. Sensors 2022, 22, 7796. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.






