1. Introduction
Global meat production shows a steady growth trend, with the Food and Agriculture Organization of the United Nations (FAO) data indicating that global meat production in 2024 is expected to reach 371 million tons (carcass weight equivalent). To meet the growing demand for meat, the meat processing industry faces significant challenges, requiring innovative technological solutions and efficient quality control strategies.
Meat processing is a complex multi-stage process incorporating key stages such as slaughtering, cooling, cutting, packaging, warehousing, and logistics [
1]. Traditional meat processing relies largely on manual operations, which often results in high labor intensity, time consuming, and relatively low efficiency processes [
2]. In the context of the fourth industrial revolution (Industry 4.0), automation technologies have been widely used in livestock processing. The introduction of innovative technologies such as mechanical cutting, intelligent detection, and automatic boning can substantially improve product quality, yield, and processing efficiency, providing new possibilities for the sustainable development of the industry [
3,
4,
5]. As automation increases, the equipment in the meat processing chain presents diversified characteristics, employing a variety of hardware interfaces and communication protocols, such as Modbus, RS485, RS232, OPC, TCP, various types of PLC, and ZigBee. This heterogeneity considerably increases the complexity of meat processing data acquisition and device integration, and becomes a major obstacle to achieving full interconnectivity [
6,
7,
8,
9].
With the rapid development of IoT technology, its application in the field of food processing is becoming more prevalent, playing a key role in improving production efficiency and product quality [
10,
11,
12]. IoT systems can accomplish several functions such as data collection, real-time monitoring, precise control, and safety alarms by integrating sensors, communication networks, and data analysis technologies [
13]. Jagtap and Rahimifard [
14] proposed an innovative food waste monitoring system, whereby food factories digitize their manufacturing through digital food waste tracking systems to reduce waste. Muhammad et al. [
15] facilitated real-time monitoring of processing equipment like ovens, mixers, dryers, and conveyors through IoT technology. However, compared to other food processing areas, the application of IoT in the meat processing industry is still in the stage of innovation and change, and lacks an ideal, comprehensive solution [
16].
In meat processing production environments, IoT gateways are essential [
17]. Gateways are not only a bridge between field devices and upper layer applications, but also a vital node for realizing the interoperability of heterogeneous systems. In the meantime, the demand for data processing and analysis in the meat processing industry has given rise to a wide range of applications for computer vision and artificial intelligence technologies. The development of more efficient algorithmic models can facilitate the rapid and precise identification of foreign objects, meat quality, and shape [
18,
19,
20]. Taheri-Garavand et al. [
21] proposed a reliable, fast, non-destructive, and online method for assessing chicken freshness by combining computer vision and artificial intelligence techniques. Gonçalves et al. [
22] used two segmentation methods, Superpixel + CNN and SegNet, aiming at recognizing the regions of carcasses in meat images. Lim et al. [
23] utilized hyperspectral reflectance imagery and machine learning for the detection of alien objects embedded in meat. However, current intelligent detection usually relies on cloud computing for data processing and analysis, and this traditional cloud computing centralized processing model suffers from limitations such as response latency, bandwidth pressure, and energy efficiency, which are unable to satisfy the real-time line demand of the processing. The real-time demand has driven the development of edge computing, a model that emphasizes processing data at the edge of the network, close to the data source [
24,
25]. Edge computing effectively mitigates the above problems by decentralizing part of the computing and storage capacity to the network edge, providing a new technical path for the application of IoT systems in the meat processing industry.
Intelligent gateway not only inherits the fundamental functions of traditional gateway, but also incorporates edge computing and machine learning capabilities, and is capable of real-time processing and analyzing at the data source. This study focuses on intelligent gateway technology, which seeks to address the multiple challenges encountered by the meat processing industry in IoT applications, such as device heterogeneity, lack of modeling with surging demand for data analytics, and cloud computing limitations.
2. Proposed Architecture
2.1. Intelligent Gateway with Modular Decoupled Design
In this study, the intelligent gateway scheme with modular decoupled design is proposed (
Figure 1). The intelligent gateway defines the functions, interfaces, and parameters of the system from both the software and hardware levels, aiming to improve the flexibility, scalability, and maintainability of the system.
At the software level, the application of containerization technology is a key feature of this solution, where various functional applications are encapsulated in independent containers, such as data acquisition, intelligent detection, data storage, and network management. Each container communicates with each other through API according to requirements, realizing decoupling and flexible combination of functional applications. Aiming at the diversified characteristics of device protocols in the meat processing chain, the internal driver for data acquisition employs a modularized design. This design allows the driver to serve as a manageable asset for the user, while also flexibly responding to the needs of various meat processing processes. The gateway layer solves the issue of inconsistent data formats among diverse devices and provides a unified data interface for the upper layer applications through data conversion and standardization. The introduction of containerization technology significantly reduces the complexity of deployment and maintenance.
At the hardware level, the intelligent gateway employs a modular design of core board and base board. The core board integrates the main computing and communication functions, while the base board corresponds to the driver, providing various interfaces and extended functions according to different meat processing segments. This multi-combination design allows the system to quickly adapt to various hardware requirements, while reducing overall development and maintenance costs.
2.2. Intelligent Detection with Edge-Cloud Collaboration
Artificial intelligence technology has tremendous potential to improve meat processing productivity, product quality, and production safety. The meat whole-chain intelligent inspection system under edge-cloud collaboration proposed in this study combines the advantages of edge computing and cloud computing, providing strong technical support for realizing efficient and high-precision online inspection across the entire processing chain. This effectively overcomes the limitations of the traditional cloud computing model in meat processing scenarios.
As shown in
Figure 2, several key factors determine the quality and safety of meat products. Meat freshness is the primary quality indicator, directly affecting taste, flavor, and shelf life. Fat and meat color, as well as marbling, are important bases for consumers’ sensory evaluation, influencing the product’s appearance, attractiveness, and marketplace acceptance. Additionally, the prevention and control of foreign matter is crucial for ensuring food safety, as contaminants can originate from a wide range of sources, including suppliers, the environment, preparation, ingredients, tools, packaging, personnel, and logistics.
To effectively detect and control these critical quality and safety factors, a comprehensive quality management system must be established. This system should rely not only on advanced testing equipment and instruments, but also on a real-time data processing system that incorporates high-confidence artificial intelligence algorithms. The containerized intelligent gateway proposed in this study provides an ideal platform to achieve this objective. According to the specific requirements of meat production sites, the intelligent gateway can flexibly deploy the corresponding AI-powered inspection algorithms through frameworks like TensorFlow 2.15.0 or PyTorch 1.10. At the same time, these algorithm containers work seamlessly with the collection system interface via a standardized API interface. The freshness detection module in the intelligent gateway can directly transmit meat images collected by industrial cameras to the corresponding algorithm containers through the API, realizing millisecond-level real-time data processing, providing timely feedback on abnormal freshness indicators at the meat processing site, and improving production efficiency and quality. The edge-based containerized algorithm deployment not only realizes efficient use of computing resources, but also enables rapid response and real-time processing to meet the stringent requirements for intelligent detection timeliness in meat processing.
At the edge layer, an intelligent gateway solves the needs of real-time data processing and intelligent analysis, filters out key information, and carries out preliminary processing, which largely reduces the pressure of network transmission. At the same time, the cloud platform assumes the important roles of data aggregation, in-depth analysis, and global decision-making. After preliminary inspection and processing, the data are sent to the cloud platform through the intelligent gateway. On the cloud platform, advanced big data analytics and artificial intelligence algorithms are used to perform complex trend forecasting duties, such as market demand, production optimization, quality grading, and abnormality warning. The cloud platform can construct multi-dimensional parametric analysis models that integrate online and offline meat data from various sources, covering sensory, physicochemical, microbiological, and safety indicators. This enables a comprehensive assessment of meat quality and grading based on factors like color, odor, texture, moisture content, pH, lipid content, protein content, total bacteria, coliforms, salmonella, and antibiotic residues. Furthermore, the cloud platform can analyze and compare historical data and real-time information using time-series analysis and anomaly warning models. This allows for the timely detection of subtle anomalies, such as temperature control failures, equipment performance degradation, and processing parameter deviations.
2.3. IoT Architecture for Meat Processing
The IoT architecture for meat and meat processing proposed in this paper is realized based on the intelligent gateway of the above modular decoupling design and the intelligent detection of the whole chain of meat under the edge-cloud synergy, and the IoT architecture model for meat and meat processing is shown in
Figure 3, which can be divided into the perception layer, the edge layer, and the cloud layer from the bottom to the top.
- (1)
Perception Layer
The sensing layer is the foundation of the whole system, which consists of environment monitoring, apparatus groups, and intelligent detection devices aimed at the meat processing process. In the key links of slaughtering, cooling, cutting, packaging, warehousing, and logistics, sensors such as temperature and humidity sensors and high-definition cameras acquire changes in the processing environment in real time; production equipment such as robotic arms, conveyor belts, and operating tables continuously generate operational data; and intelligent detection devices such as advanced industrial cameras, X-ray machines, and hyper-spectral imagers are able to provide feedback on image and spectral data. These diversified sensing units work together to acquire massive multi-dimensional data from every aspect of meat processing and transmit them to the intelligent gateway, providing high-quality data support for subsequent intelligent decision-making, precise control, and quality management.
- (2)
Edge layer
The edge layer consists of clusters of intelligent gateways, which are the key to the whole system. Each intelligent gateway is endowed with powerful computing capability, capable of filtering, compressing, and analyzing the massive multi-dimensional data in the sensing layer in real time. The intelligent gateway adopts a decoupled modular design, which can flexibly configure the functional modules according to various processing links and inspection requirements. To meet the real-time requirements of intelligent detection of quality, shape, and foreign objects, the edge layer can be combined with complex intelligent sensing devices, establish and deploy corresponding algorithmic models, analyze the collected data in real time, and make rapid responses based on the results. In addition, in the multi-link meat processing scenario, the edge intelligent gateway plays the role of data administrator, which is both the data owner and the data visitor. The gateway administrator can precisely set the data access rights of different staff members according to their duties and needs to ensure data security and improve work efficiency.
- (3)
Cloud layer
The cloud layer is composed on the premise of the perception layer and the edge layer and is equipped with gateway management, data management, a large screen for configuration, and cloud computing. The edge layer transmits the processed data to the cloud layer through API. In the cloud layer, powerful computing resources with advanced algorithms and big models further analyze and process these data to accomplish market demand, production optimization, quality grading, and abnormality warning. The cloud layer analyzes online and offline meat data by establishing a multi-dimensional parameter analysis model and realizes quality grading of meat through sensory, physical and chemical, microbiological, and safety indicators. The cloud layer can also make use of historical data to dig out the common law of meat processing, discover subtle anomalies in a timely manner, and provide accurate early warnings.
4. Results and Discussion
4.1. Model Training and Comparison
The improved MobileNetV3 model for pork freshness detection achieved an impressive 99.8% accuracy on the test set, with a loss function value of 0.019. The model iteration curve is shown in
Figure 8, and the precision, recall, and F1-score all reached 0.998. More importantly, the model size has been successfully compressed to 7.59 MB, a reduction of approximately 43% from the initial 13.31 MB, without any impact on performance. As shown in
Table 3, the introduction of the ECA module not only maintained the model’s outstanding performance on the pork freshness detection task, but also further improved its deployment flexibility on resource-constrained devices, reflecting the achievement of realizing model compression while maintaining high performance. Furthermore, we compared the improved model with other mainstream models, including ResNet50V2, VGG19, and DenseNet121, while ensuring that all models had consistent training parameter settings. Across various metrics, the improved MobileNetV3 model outperformed the other models, not only in terms of higher accuracy and lower loss function value, but also with a significantly smaller model size. This demonstrates the comprehensive advantages of the improved model in terms of performance and deployment flexibility.
Experimental results demonstrate that, compared to the residual connections of ResNet50V2, the deep and wide network structure of VGG19, and the dense connectivity of DenseNet121, MobileNetV3 adopts lightweight inverted residual blocks and attention mechanisms, enabling more precise feature extraction with significantly reduced computational complexity. The model’s unique architectural design allows for intelligent feature selection and compression, thereby achieving superior performance across multiple metrics, while maintaining a remarkably compact model size.
In this study, we conducted comprehensive ablation experiments on the improved MobileNetV3 model, analyzing various aspects including attention mechanisms and the number of hidden layers, with results shown in
Table 4. The results demonstrate that the ECA module exhibits superior advantages compared to the SE module while maintaining model performance. With a single hidden layer, the model achieves optimal performance with an accuracy of 0.998 and a loss value of only 0.019, while significantly reducing the model size to 7.59 MB, making it more suitable for applications requiring higher frame rates. As the number of hidden layers increases from 1 to 3, the model performance slightly decreases, while the model size substantially increases to 17.34 MB. This indicates that a simpler network structure yields better results for this task. Notably, the ECA model with a single hidden layer achieves optimal values across all evaluation metrics, with the accuracy, precision, recall, and F1 score all reaching 0.998, while maintaining the smallest model size, demonstrating the best comprehensive performance.
We compared our approach with existing literature on pork freshness image detection. Shyamala Devi et al. [
30] developed a 15 L-DCNN model achieving 98.33% accuracy on the training set but only 87% on the test set, while Sagiraju et al. [
31] fine-tuned the ResNet18-FT model, reaching a peak performance of 93.13% accuracy. In contrast, our improved MobileNetV3 not only outperforms these existing methods in accuracy but also undergoes optimization in lightweight design. Moreover, our study places a stronger emphasis on enabling edge deployment, ensuring the model can efficiently operate in real-time, resource-constrained environments.
Image detection technology offers significant advantages in assessing pork freshness, particularly in industrial meat processing lines, providing rapid, non-destructive, and cost-effective monitoring. Its non-contact nature and real-time capabilities make it especially suitable for continuous production environments. This study’s lightweight model maintains high detection accuracy while reducing computational complexity through optimized network structure, facilitating edge device deployment, and real-time processing. Although the current model primarily focuses on the single dimension of pork freshness, the potential of image detection technology remains largely untapped. By integrating high-resolution cameras and advanced deep learning algorithms, this technology shows promise in simultaneously analyzing multiple meat quality parameters, including color, texture, intramuscular fat, moisture distribution, and marbling [
32,
33,
34]. Future research will aim to develop multi-dimensional quality detection models, enhance cross-species adaptability, integrate multi-modal data, and achieve real-time quality change tracking and prediction, with the goal of providing more comprehensive and accurate quality control solutions for the meat processing industry.
4.2. Deployment Testing
To validate the reliability of our pork freshness detection platform in industrial environments, we conducted a comprehensive 72 h system test that simulated an actual pork freshness detection production line. The platform integrates advanced image acquisition equipment with optimized deep learning models to achieve rapid and accurate freshness assessments. During testing, we employed an MV-CA013-A0GC industrial camera equipped with a 5-megapixel 16 mm lens (Hikvision, Hangzhou, China) for image acquisition, triggered by a photoelectric switch at a fixed frame rate of 60 fps. System performance metrics were continuously monitored through a comprehensive data collection pipeline. We deployed CAdvisor to gather container-level metrics, including CPU utilization, memory consumption, and network statistics. These metrics were stored in InfluxDB, a time-series database optimized for high-throughput data ingestion and real-time monitoring. We utilized Grafana for real-time visualization and analysis of the collected metrics at 5-s intervals. This monitoring architecture enabled us to track system performance with high temporal resolution while maintaining detailed logs for subsequent analysis.
Test results demonstrated that the model’s maximum memory usage on the intelligent gateway remained consistently below 600 MB, with average CPU utilization not exceeding 20%. The end-to-end response time from image acquisition to freshness assessment inference remained under 100 ms, ensuring the system’s real-time processing capabilities. In terms of stability, we achieved a 100% model inference success rate throughout the testing period with no instances of data packet loss. These comprehensive performance metrics conclusively demonstrate that the system maintains satisfactory real-time performance, accuracy, and stability in industrial environments. The data collected during this test will be used to further optimize system performance, expand its application scope, and ultimately provide more efficient and reliable quality control solutions for the meat processing industry.
This study employs intelligent gateway technology, using pork freshness detection during processing as a specific case to implement the deployment of edge models. This approach effectively overcomes the limitations of traditional cloud computing regarding real-time performance and bandwidth usage, allowing cloud resources to focus more on the overall management of meat processing. As a future research direction, we plan to enhance our edge computing capabilities by integrating more advanced detection technologies into the gateway architecture. For the meat freshness assessment, we will combine features from hyperspectral imaging and chromameter measurements to establish a multi-feature fusion model for meat quality evaluation. Additionally, we can develop a cloud-based intelligent expert system [
35] based on machine learning for comprehensive monitoring and precise grading of meat products. This system will be capable of real-time quality assessment and predictive analysis based on historical data and current market demands. Additionally, we are considering combining Particle Swarm Optimization (PSO) algorithms with LSTM networks [
36] to construct an efficient risk analysis and early warning model. This model will accurately identify potential quality issues and predict possible processing risks, helping managers to make timely decisions and further enhance the safety and efficiency of the meat processing process.
4.3. System Discussion
4.3.1. Adaptability Study
The proposed system, built on containerized technology, demonstrates strong potential for technological adaptation and migration. It integrates two primary core functionalities: data acquisition and edge-intelligent detection.
The data acquisition module adopts a modular design, enabling drivers to function as manageable assets and flexibly adapt to the specific requirements of different meat processing workflows. While the current intelligent detection capabilities are focused on pork freshness assessment, the system’s design principles and underlying infrastructure can be seamlessly extended to other meat products and even broader applications in the food processing industry. For instance, it could be applied to evaluate beef freshness, marbling, and tenderness.
Key challenges in achieving such adaptations include retraining algorithmic models and customizing datasets for specific products. By reconstructing the feature extraction layers of neural networks, the system can be incrementally adapted to meet the detection requirements of different meat products. Furthermore, the edge computing architecture enables real-time local detection, significantly reducing data transmission costs while ensuring immediate feedback in critical production processes.
4.3.2. Technology Comparison
Compared to traditional methods, this system offers significant advantages in scalability and intelligence. The intelligent gateway not only performs basic functions like collecting and controlling environmental and equipment parameters across the production line, but also integrates advanced deep learning algorithms for edge-based intelligent detection. This design addresses connectivity and equipment compatibility issues, ensuring smooth data flow and processing. By embedding intelligent detection within the production line, the system improves efficiency, reliability, and quality control, supporting the digital transformation of the meat processing industry.
4.3.3. Cost Analysis
The cost of the proposed intelligent gateway system mainly includes initial investment and operating costs. The initial investment covers hardware components such as the Raspberry Pi CM4 module (8 GB RAM, 32 GB eMMC, $83) and the ED-CM4 INDUSTRIAL baseboard ($58), as well as a high-performance computer for algorithm development. The hardware selection can be adjusted flexibly based on actual requirements to reduce costs.
Operating costs mainly include energy consumption, system maintenance, and data storage fees. Although the initial investment is relatively high, the system offers significant economic benefits. Compared to traditional gateways, the intelligent gateway not only enables device interconnectivity but also continuously optimizes production processes through edge intelligent detection technology, ensuring higher product quality and enhancing brand competitiveness.
Through automation and intelligent detection, the system can significantly reduce labor costs, lower defect rates, and enable more precise production control. In the long term, the intelligent gateway system will bring considerable economic returns and competitive advantages to enterprises.
4.3.4. Environmental Impact
The intelligent gateway system not only improves production efficiency but also effectively reduces its environmental impact. By adopting an edge computing architecture, the system significantly lowers energy consumption for data transmission and cloud computing, thereby reducing carbon emissions. Intelligent detection technology enhances the accuracy of meat freshness detection, reducing food waste and optimizing resource utilization. The system’s modular design and efficient algorithms not only improve production processes but also reflect careful management of energy and resources.
4.3.5. Potential Security Threat
In the meat processing environment, IoT devices face security risks related to the storage, backup, and transmission of critical production data. To address these potential risks, the system needs to incorporate multi-layered cybersecurity measures [
37,
38]. It implements a comprehensive data backup strategy to ensure secure storage and rapid recovery of critical production data. Additionally, strict access control and authentication mechanisms are enforced, allowing only authorized devices and users to access the system. To protect data communication, the system employs end-to-end encryption technology [
39], effectively preventing data theft and tampering during transmission.