Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Next Article in Journal
Tomato Stem and Leaf Segmentation and Phenotype Parameter Extraction Based on Improved Red Billed Blue Magpie Optimization Algorithm
Previous Article in Journal
Bio-Recycling Hazelnut Shells to Improve Antioxidant Properties of Lentinus tigrinus Sporophore
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Decoupling and Collaboration: An Intelligent Gateway-Based Internet of Things System Architecture for Meat Processing

1
College of Artificial Intelligence, Nanjing Agricultural University, Nanjing 210031, China
2
Guangxi Key Laboratory of Digital Infrastructure, Guangxi Zhuang Autonomous Region Information Center, Nanning 530000, China
3
Institute of Agricultural Facilities and Equipment, Jiangsu Academy of Agricultural Sciences, Nanjing 210014, China
4
Institute of Agricultural Products Processing, Jiangsu Academy of Agricultural Sciences, Nanjing 210014, China
*
Author to whom correspondence should be addressed.
Agriculture 2025, 15(2), 179; https://doi.org/10.3390/agriculture15020179
Submission received: 6 November 2024 / Revised: 10 January 2025 / Accepted: 13 January 2025 / Published: 15 January 2025
(This article belongs to the Section Digital Agriculture)

Abstract

:
The complex multi-stage process of meat processing encompasses critical phases, including slaughtering, cooling, cutting, packaging, warehousing, and logistics. The quality and nutritional value of the final meat product are significantly influenced by each processing link. To address the major challenges in the meat processing industry, including device heterogeneity, model deficiencies, rapidly increasing demands for data analysis, and limitations of cloud computing, this study proposes an Internet of Things (IoT) architecture. This architecture is centered around an intelligently decoupled gateway design and edge-cloud collaborative intelligent meat inspection. Pork freshness detection is used as an example. In this paper, a high-precision and lightweight pork freshness detection model is developed by optimizing the MobileNetV3 model with Efficient Channel Attention (ECA). The experimental results indicate that the model’s accuracy on the test set is 99.8%, with a loss function value of 0.019. Building upon these results, this paper presents an experimental platform for real-time pork freshness detection, implemented by deploying the model on an intelligent gateway. The platform demonstrates stable performance with peak model memory usage under 600 MB, average CPU utilization below 20%, and gateway internal response times not exceeding 100 ms.

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.

3. Materials and Methods

3.1. Intelligent Gateway Overall Setup

The Raspberry Pi is a Single Board Computer (SBC) based on ARM architecture, equipped with a Linux operating system that provides comprehensive data processing and analysis capabilities. Its robust Linux ecosystem enables the execution of various applications, including data analysis, process control, and machine learning algorithms. The Compute Module 4 (CM4) represents an industrial variant of the Raspberry Pi 4. Compared to the standard Raspberry Pi 4, the CM4 features higher integration density and a more compact form factor, eliminating non-essential interfaces while retaining core computing functionalities. This modular design allows researchers to configure required functions through customized base boards, effectively preventing hardware redundancy or insufficiency. This characteristic is particularly well-suited for meat processing scenarios in industrial environments, ensuring both system functionality and sufficient computing power for real-time data processing and analysis tasks.
The intelligent gateway device proposed in this study is based on the Raspberry PI CM4 (Raspberry Pi Foundation, Cambridge, UK) core board and a variety of base boards applicable to different scenarios, as shown in Figure 4. ED-CM4 INDUSTRIA (Jingheng Electronic Technology, Shanghai, China) provides a variety of communication protocol interfaces to meet the various needs of meat processing scenarios. CM4-ETH-RS485-BASE-B (Waveshare, Shenzhen, China) is mainly equipped with a 4-channel 485 interface and dual network ports, which is applicable to connecting the temperature and humidity sensors in the meat processing plants, weight scales, packaging equipment, cold chain monitoring systems, etc. CM4-DUAL-ETH-4G/5G-BASE (Waveshare, Shenzhen, China) is mainly equipped with dual Gigabit Ethernet ports and 5G/4G modules, which is suitable for meat processing plant scenarios that require high-speed network connectivity and mobile communications.
This experiment uses the Raspberry Pi Compute Module 4 core board with an ED-CM4 INDUSTRIAL base board. With 8 GB of RAM and 32 GB of eMMC flash memory, the system has more than enough resources to process large data volumes and run complex edge computing algorithms smoothly. This amount of memory and storage also exceeds the needs of the software containers, ensuring stable performance and providing room for future algorithm growth and data processing demands.
The intelligent gateway’s software design employs the operation platform strategy and the containerized deployment scheme to maximize module decoupling. The platform is essentially composed of containers for data acquisition, intelligent detection, data storage, and network management, and the software system framework is shown in Figure 5. The data acquisition container enables the gateway to select various protocol drivers based on different meat processing scenarios, collect raw information, perform preliminary pre-processing, and transmit it to the cloud layer; the intelligent detection container deploys various high-confidence machine learning algorithms to perform real-time analysis of meat images, spectra, and other data; the data storage container provides persistent storage of important production data through the Node-RED low-code block; and the network management container is responsible for routing control and load balancing within the system.

3.2. Pork Freshness Detection and Edge Deployment

3.2.1. Data Acquisition

In this experiment, six portions of black pig ham (specifically biceps femoris muscle) were purchased from Nanwan Ying Market in Xuanwu District, Nanjing, China. These samples were sourced from 6-month-old black pigs weighing 100 ± 5 kg and had undergone a 24-h cold aging process. The samples were swiftly transported to a sterile laboratory in a temperature-controlled container (0–4 °C) to ensure the stability and integrity of the pork quality.
In the laboratory, the pork samples were randomly sliced using a sterile surgical knife to a thickness of approximately 2 cm, ensuring smooth cutting surfaces, yielding 40 samples that were individually stored in sterilized self-sealing bags. The samples were stored for 14 days under controlled temperature (0–4 °C) and humidity (relative humidity 85 ± 5%) conditions. Sampling was conducted at 12-h intervals for image acquisition and detection of physicochemical freshness indicators, including TVB-N and pH values [26], while also considering sensory factors such as odor and color.
The TVB-N content was measured using a K1160F fully automatic Kjeldahl nitrogen analyzer, and the pH values were determined with a Testo 206 handheld pH meter. In this experiment, pork freshness detection based on machine vision primarily relied on features such as color, texture, and luster. The above features are converted into feature vectors through digital image processing. Sensory evaluation results indicated that human olfactory and visual assessments were insufficient for accurately determining pork freshness, particularly in distinguishing fresh samples from half-fresh ones. Given the limitations of sensory evaluation methods, odor and color assessments were included only as supplementary auxiliary indicators and were not considered primary criteria for determining meat freshness.
If the two detected indicators for a sample fell into different freshness grades, the final freshness grade of the pork was determined by the lower grade. For instance, if the TVB-N content of a sample was classified as fresh, while the pH value was classified as semi-fresh, the sample was categorized as semi-fresh accordingly. The parameters of raw pork with different freshness grades are shown in Table 1. Temperature and humidity of the storage equipment were recorded before each sampling to ensure stable experimental conditions.
Between 17 June and 30 June 2024, the research team conducted systematic image collection of pork samples, using multi-angle shooting methods at different storage time points, capturing 6–8 images from various angles (including front, side, and 45-degree perspectives) at each sampling interval to comprehensively capture the subtle changes in meat freshness stages. A total of 2050 high-quality images were collected, including 765 fresh meat images, 720 half-fresh meat images, and 565 spoiled meat images, which were divided into training and testing sets at an approximate 8:2 ratio. The pork freshness dataset is shown in Table 2. Considering the subtle visual differences between fresh and half-fresh meat, the research team intentionally increased the sample quantity for these two categories. The image acquisition was performed using a Hikvision MV-CE100-30GC industrial camera with a 5-megapixel 16 mm lens, controlled by MVS V4.4.0 (Windows, Hikvision, Hangzhou, China) image acquisition software. The image resolution was set at 3680 × 3680 pixels. This high-resolution approach ensures a robust and representative dataset for advanced machine learning and computer vision analysis.

3.2.2. Data Pre-Processing

The pre-processing of the acquired image necessitates automatic cropping to retain only the region containing the pork samples and uniformly resize the image to 224 × 224 pixels. Next, a contrast-constrained adaptive histogram equalization algorithm was applied to enhance local contrast, and Gaussian filtering was performed to reduce noise. To increase data diversity, the dataset was expanded to double the original size, and data enhancement techniques such as inverting, rotating, brightness, contrast, saturation, and hue adjustments, as well as panning, were applied. Also, both the original and enhanced images were normalized to scale the pixel values to between 0 and 1. Figure 6 depicts the original and enhanced images of the pork samples.

3.2.3. Model Selection

To achieve accurate identification and lightweight deployment of pork freshness, this section employs an improved deep convolutional neural network, MobileNetV3, to detect pork freshness based on the Python environment and the TensorFlow framework. The MobileNetV3 [27] network introduces Squeeze-and-Excitation (SE) [28] in the inverted residual module to enhance the model’s ability to represent features, and uses a platform-aware network architecture for search and quantitative perception training, making the model more suitable for operation on edge devices. The module improves the model’s feature representation and uses a platform-aware network architecture for search and quantization-aware training, making it more suitable for running on edge devices. Compared to the SE module, the Efficient Channel Attention (ECA) module [29] can retain more information without dimensionality reduction by introducing the channel attention mechanism, making the model less parametric and simpler to deploy on edge devices. The improvement method mainly consists of replacing the original SE module with an ECA module in each inverted residual block of the MobileNetV3 model. In the Classification Head section, a multi-layer fully connected structure is redesigned to contain a global average pooling layer and a hidden layer, which constructs a lightweight, fast, and high-accuracy improved MobileNetV3 pork freshness detection model.

3.2.4. Edge Deployment

To validate the effectiveness and feasibility of the algorithmic model proposed in this research in a real application environment, a pork freshness detection platform for a real meat processing scenario is built in this study. The platform integrates the core components of an industrial production line with the intelligent gateway discussed above, providing an ideal test environment for the practical deployment and performance evaluation of the improved MobileNetV3 model.
As shown in Figure 7, the experimental platform primarily consists of a conveyor system, the MV-CE100-30GC industrial camera (Hikvision, Hangzhou, China), an LED fill light set, an adjustable bracket, an edge intelligent gateway, and a monitoring terminal. The experiment is conducted by exporting the trained model as a SavedModel file and deploying the file to the TensorFlow Serving environment in the intelligent gateway. First, use the official TensorFlow Serving Docker image to build up the model service environment and configure the model config file, specifying the model path and version information. Second, use the TensorFlow Serving API to install the model and parse the data from edge devices according to the predefined input format. Finally, the loaded model is used to conduct inference on the data, and the inference results are returned to the collection system container for parsing.

3.2.5. Evaluation Index

To comprehensively evaluate the intelligent gateway-based edge intelligent detection deployment scheme proposed in this section, loss function, accuracy, precision, recall, F1 score, and model size are used as the evaluation model metrics, and occupied memory, CPU utilization, and response time are used as the deployment feasibility metrics.

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.

5. Conclusions

This study proposed an intelligent gateway for meat processing and introduced edge computing technology to effectively address key technical challenges in IoT applications for the meat processing industry. Through a modular decoupled design, we overcame device heterogeneity issues, providing a standardized solution for data communication between different devices. To meet the real-time data analysis needs during meat processing, the research presented an edge-cloud collaborative intelligent detection scheme that delineates the division of labor between cloud and edge computing. The edge side focuses on real-time analysis, quickly responding to on-site data changes, while the cloud side handles complex long-term data processing and model optimization. In the pork freshness detection application, the research team deployed an optimized MobileNetV3 model using the ECA module for 72 h continuous detection. Experimental results demonstrated the intelligent detection model’s performance, with maximum memory usage below 600 MB, average CPU utilization under 20%, and response time less than 100 ms, thereby validating the feasibility and effectiveness of the proposed system in meat processing digitalization.

Author Contributions

Conceptualization, J.L.; methodology, J.L.; software, C.Z. and H.W.; validation, J.P.; formal analysis, J.L. and J.P.; investigation, J.L. and C.Z.; resources, J.L.; data curation, C.Z. and H.W.; writing—original draft, C.Z. and J.P.; writing—review and editing, J.L.; visualization, C.Z. and H.W.; supervision, D.W.; project administration, D.W.; funding acquisition, D.W. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Key R & D Program of China (grant number 2022YFD2100505), and the Open Project Program of Guangxi Key Laboratory of Digital Infrastructure (grant number GXDIOP2024016).

Institutional Review Board Statement

Not applicable.

Data Availability Statement

Restrictions apply to the datasets. Although the datasets in this article are currently unavailable due to the ongoing research project, we commit to publicly releasing the datasets upon project completion. After the research project concludes, the datasets will be made available through a dedicated GitHub repository https://github.com/YouR-JA/pork-freshness-dataset (accessed on 30 September 2024).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Wang, M.; Li, X. Application of Artificial Intelligence Techniques in Meat Processing: A Review. J. Food Process Eng. 2024, 47, e14590. [Google Scholar] [CrossRef]
  2. Romanov, D.; Korostynska, O.; Lekang, O.I.; Mason, A. Towards Human-Robot Collaboration in Meat Processing: Challenges and Possibilities. J. Food Eng. 2022, 331, 111117. [Google Scholar] [CrossRef]
  3. Oltra-Mestre, M.J.; Hargaden, V.; Coughlan, P.; Segura-García del Río, B. Innovation in the Agri-Food Sector: Exploiting Opportunities for Industry 4.0. Creat. Innov. Manag. 2021, 30, 198–210. [Google Scholar] [CrossRef]
  4. Zeng, X.; Cao, R.; Xi, Y.; Li, X.; Yu, M.; Zhao, J.; Cheng, J.; Li, J. Food Flavor Analysis 4.0: A Cross-Domain Application of Machine Learning. Trends Food Sci. Technol. 2023, 138, 116–125. [Google Scholar] [CrossRef]
  5. Xu, W.; He, Y.; Li, J.; Zhou, J.; Xu, E.; Wang, W.; Liu, D. Robotization and Intelligent Digital Systems in the Meat Cutting Industry: From the Perspectives of Robotic Cutting, Perception, and Digital Development. Trends Food Sci. Technol. 2023, 135, 234–251. [Google Scholar] [CrossRef]
  6. Xu, L.D.; Xu, E.L.; Li, L. Industry 4.0: State of the Art and Future Trends. Int. J. Prod. Res. 2018, 56, 2941–2962. [Google Scholar] [CrossRef]
  7. Jagtap, S.; Garcia-Garcia, G.; Rahimifard, S. Optimisation of the Resource Efficiency of Food Manufacturing via the Internet of Things. Comput. Ind. 2021, 127, 103397. [Google Scholar] [CrossRef]
  8. Chamara, N.; Islam, M.D.; Bai, G.F.; Shi, Y.; Ge, Y. Ag-IoT for Crop and Environment Monitoring: Past, Present, and Future. Agric. Syst. 2022, 203, 103497. [Google Scholar] [CrossRef]
  9. Holasova, E.; Blazek, P.; Fujdiak, R.; Masek, J.; Misurec, J. Exploring the Power of Convolutional Neural Networks for Encrypted Industrial Protocols Recognition. Sustain. Energy Grids Netw. 2024, 38, 101269. [Google Scholar] [CrossRef]
  10. Jagtap, S.; Saxena, P.; Salonitis, K. Food 4.0: Implementation of the Augmented Reality Systems in the Food Industry. Procedia CIRP 2021, 104, 1137–1142. [Google Scholar] [CrossRef]
  11. Hassoun, A.; Bekhit, A.E.-D.; Jambrak, A.R.; Regenstein, J.M.; Chemat, F.; Morton, J.D.; Gudjónsdóttir, M.; Carpena, M.; Prieto, M.A.; Varela, P.; et al. The Fourth Industrial Revolution in the Food Industry—Part II: Emerging Food Trends. Crit. Rev. Food Sci. Nutr. 2024, 64, 407–437. [Google Scholar] [CrossRef] [PubMed]
  12. Dadhaneeya, H.; Nema, P.K.; Arora, V.K. Internet of Things in Food Processing and Its Potential in Industry 4.0 Era: A Review. Trends Food Sci. Technol. 2023, 139, 104109. [Google Scholar] [CrossRef]
  13. Hassoun, A.; Jagtap, S.; Trollman, H.; Garcia-Garcia, G.; Abdullah, N.A.; Goksen, G.; Bader, F.; Ozogul, F.; Barba, F.J.; Cropotova, J.; et al. Food Processing 4.0: Current and Future Developments Spurred by the Fourth Industrial Revolution. Food Control 2023, 145, 109507. [Google Scholar] [CrossRef]
  14. Jagtap, S.; Rahimifard, S. The Digitisation of Food Manufacturing to Reduce Waste—Case Study of a Ready Meal Factory. Waste Manag. 2019, 87, 387–397. [Google Scholar] [CrossRef]
  15. Muhammad, J.; Risnto, J.; Gimin, G. Drying Fresh Cassava Chip Using Biomass Energy with IoT Monitoring System. Agric. Eng. Int. CIGR J. 2022, 24, 201–213. [Google Scholar]
  16. Barbut, S. Meat Industry 4.0: A Distant Future? Anim. Front. 2020, 10, 38–47. [Google Scholar] [CrossRef]
  17. Jiang, Z.; Chang, Y.; Liu, X. Design of Software-Defined Gateway for Industrial Interconnection. J. Ind. Inf. Integr. 2020, 18, 100130. [Google Scholar] [CrossRef]
  18. 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]
  19. Zhang, J.; Yang, Y.; Zeng, L.; Wang, J. A Ratiometric Fluorescence Platform for On-Site Screening Meat Freshness. Food Chem. 2024, 436, 137769. [Google Scholar] [CrossRef] [PubMed]
  20. Fan, L.; Chen, Y.; Zeng, Y.; Yu, Z.; Dong, Y.; Li, D.; Zhang, C.; Ye, C. Application of Visual Intelligent Labels in the Assessment of Meat Freshness. Food Chem. 2024, 460, 140562. [Google Scholar] [CrossRef]
  21. Taheri-Garavand, A.; Fatahi, S.; Shahbazi, F.; de la Guardia, M. A Nondestructive Intelligent Approach to Real-Time Evaluation of Chicken Meat Freshness Based on Computer Vision Technique. J. Food Process Eng. 2019, 42, e13039. [Google Scholar] [CrossRef]
  22. Gonçalves, D.N.; de Moares Weber, V.A.; Pistori, J.G.B.; da Costa Gomes, R.; de Araujo, A.V.; Pereira, M.F.; Gonçalves, W.N.; Pistori, H. Carcass Image Segmentation Using CNN-Based Methods. Inf. Process. Agric. 2021, 8, 560–572. [Google Scholar] [CrossRef]
  23. Lim, J.; Lee, A.; Kang, J.; Seo, Y.; Kim, B.; Kim, G.; Kim, S.M. Non-Destructive Detection of Bone Fragments Embedded in Meat Using Hyperspectral Reflectance Imaging Technique. Sensors 2020, 20, 4038. [Google Scholar] [CrossRef] [PubMed]
  24. Shi, W.; Pallis, G.; Xu, Z. Edge Computing [Scanning the Issue]. Proc. IEEE 2019, 107, 1474–1481. [Google Scholar] [CrossRef]
  25. Savaglio, C.; Mazzei, P.; Fortino, G. Edge Intelligence for Industrial IoT: Opportunities and Limitations. Procedia Comput. Sci. 2024, 232, 397–405. [Google Scholar] [CrossRef]
  26. Peng, Y.; Zou, W.; Li, R.; Zuo, J.; Yao, X.; Yao, X.; Yang, D. A handheld non-destructive intelligent detection and grading device for the freshness of pork. J. Agric. Eng. 2023, 39, 262–269. [Google Scholar] [CrossRef]
  27. Howard, A.; Sandler, M.; Chen, B.; Wang, W.; Chen, L.-C.; Tan, M.; Chu, G.; Vasudevan, V.; Zhu, Y.; Pang, R.; et al. Searching for MobileNetV3. In Proceedings of the 2019 IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Republic of Korea, 27 October–2 November 2019; pp. 1314–1324. [Google Scholar] [CrossRef]
  28. Hu, J.; Shen, L.; Sun, G. Squeeze-and-Excitation Networks. In Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 7132–7141. [Google Scholar] [CrossRef]
  29. Wang, Q.; Wu, B.; Zhu, P.; Li, P.; Zuo, W.; Hu, Q. ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks. In Proceedings of the 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 13–19 June 2020; pp. 11531–11539. [Google Scholar] [CrossRef]
  30. Shyamala Devi, M.; Arun Pandian, J.; Umanandhini, D.; Sakineti, A.K.; Jeyaraj, R. Meat Freshness State Prediction Using a Novel Fifteen Layered Deep Convolutional Neural Network. In Data Science and Network Engineering, Proceedings of the International Conference on Data Science and Network Engineering, Agartala, India, 2–3 June 2023; Namasudra, S., Trivedi, M.C., Crespo, R.G., Lorenz, P., Eds.; Springer Nature: Singapore, 2024; pp. 111–123. [Google Scholar] [CrossRef]
  31. Sagiraju, B.; Casanova, N.; Chun, L.I.C.; Lohia, M.; Yoshiyasu, T. Meat Freshness Prediction. arXiv 2023, arXiv:2305.00986. [Google Scholar] [CrossRef]
  32. Alvarez-García, W.Y.; Mendoza, L.; Muñoz-Vílchez, Y.; Nuñez-Melgar, D.C.; Quilcate, C. Implementing Artificial Intelligence to Measure Meat Quality Parameters in Local Market Traceability Processes. Int. J. Food Sci. Technol. 2024, 59, 8058–8068. [Google Scholar] [CrossRef]
  33. Lee, B.; Yoon, S.; Choi, Y.M. Comparison of Marbling Fleck Characteristics between Beef Marbling Grades and Its Effect on Sensory Quality Characteristics in High-Marbled Hanwoo Steer. Meat Sci. 2019, 152, 109–115. [Google Scholar] [CrossRef] [PubMed]
  34. Du, C.-J.; Sun, D.-W. Automatic Measurement of Pores and Porosity in Pork Ham and Their Correlations with Processing Time, Water Content and Texture. Meat Sci. 2006, 72, 294–302. [Google Scholar] [CrossRef] [PubMed]
  35. Blagoveshchenskiy, I.G.; Blagoveshchenskiy, V.G.; Besfamilnaya, E.M.; Sumerin, V.A. Development of Databases of Intelligent Expert Systems for Automatic Control of Product Quality Indicators. J. Phys. Conf. Ser. 2020, 1705, 012019. [Google Scholar] [CrossRef]
  36. Geng, Z.; Wang, X.; Jiang, Y.; Han, Y.; Ma, B.; Chu, C. Novel IAPSO-LSTM Neural Network for Risk Analysis and Early Warning of Food Safety. Expert Syst. Appl. 2023, 230, 120747. [Google Scholar] [CrossRef]
  37. Syue, J.-H.; Chen, S.-L. A Multi-Layer Network Security System to Enhance Autonomous Mobile Carrier in Smart Manufacturing System. Proc. Inst. Mech. Eng. Part B J. Eng. Manuf. 2023, 237, 1326–1338. [Google Scholar] [CrossRef]
  38. Akbar, M.; Waseem, M.M.; Mehanoor, S.H.; Barmavatu, P. Blockchain-Based Cyber-Security Trust Model with Multi-Risk Protection Scheme for Secure Data Transmission in Cloud Computing. Clust. Comput. 2024, 27, 9091–9105. [Google Scholar] [CrossRef]
  39. Ghosh, S.; Verma, S.K.; Ghosh, U.; Al-Numay, M. Improved End-to-End Data Security Approach for Cloud Computing. Sustainability 2023, 15, 16010. [Google Scholar] [CrossRef]
Figure 1. Intelligent gateway scheme schematic.
Figure 1. Intelligent gateway scheme schematic.
Agriculture 15 00179 g001
Figure 2. Intelligent detection with side cloud collaboration.
Figure 2. Intelligent detection with side cloud collaboration.
Agriculture 15 00179 g002
Figure 3. IoT architecture for meat processing.
Figure 3. IoT architecture for meat processing.
Agriculture 15 00179 g003
Figure 4. Intelligent gateway combinable schematic.
Figure 4. Intelligent gateway combinable schematic.
Agriculture 15 00179 g004
Figure 5. Software systems framework.
Figure 5. Software systems framework.
Agriculture 15 00179 g005
Figure 6. Original and enhanced images of pork samples. (a) Fresh. (b) Half-Fresh. (c) Spoiled. (d) Translation. (e) Inversion. (f) Rotation.
Figure 6. Original and enhanced images of pork samples. (a) Fresh. (b) Half-Fresh. (c) Spoiled. (d) Translation. (e) Inversion. (f) Rotation.
Agriculture 15 00179 g006
Figure 7. Pork freshness testing experimental platform. (a) Test platform. (b) Algorithmic container. (c) Acquisition interface.
Figure 7. Pork freshness testing experimental platform. (a) Test platform. (b) Algorithmic container. (c) Acquisition interface.
Agriculture 15 00179 g007
Figure 8. Model iteration curves. (A) Accuracy iteration curve and (B) Loss value iteration curve.
Figure 8. Model iteration curves. (A) Accuracy iteration curve and (B) Loss value iteration curve.
Agriculture 15 00179 g008
Table 1. Pork freshness grade classification.
Table 1. Pork freshness grade classification.
FreshnessTVB-N/(mg·(100 g)−1)pH Value
Fresh TVB-N ≤ 135.45 ≤ pH ≤ 5.8
Half-fresh 13 < TVB-N < 155.8 < pH < 6.2
SpoiledTVB-N ≥ 15pH ≥ 6.2
Table 2. Pork dataset partition.
Table 2. Pork dataset partition.
DatasetFreshHalf-FreshSpoiledTotal
Train set6155804551650
Test set 150140110400
Total7657205652050
Table 3. Comparison of the improved model and the original model.
Table 3. Comparison of the improved model and the original model.
ModelAccuracyLossPrecisionRecallF1-ScoreSize (MB)
Improved0.9980.0190.9980.9980.9987.59
Original0.9970.0210.9970.9980.99713.31
ResNet50V20.9760.1290.9770.9770.97693.98
VGG190.9230.2230.9280.9270.92777.39
DenseNet1210.9660.0980.9660.9670.96728.85
Table 4. Comprehensive ablation experiments.
Table 4. Comprehensive ablation experiments.
Attention
Mechanism
Hidden LayerAccuracyLossPrecisionRecallF1
Score
Size (MB)
OriginalSE10.9970.0210.9970.9980.99713.31
ImprovedECA30.9920.0330.9930.9920.99317.34
ECA20.9960.0830.9960.9950.99613.72
ECA10.9980.0190.9980.9980.9987.59
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.

Share and Cite

MDPI and ACS Style

Liu, J.; Zhou, C.; Wei, H.; Pi, J.; Wang, D. Decoupling and Collaboration: An Intelligent Gateway-Based Internet of Things System Architecture for Meat Processing. Agriculture 2025, 15, 179. https://doi.org/10.3390/agriculture15020179

AMA Style

Liu J, Zhou C, Wei H, Pi J, Wang D. Decoupling and Collaboration: An Intelligent Gateway-Based Internet of Things System Architecture for Meat Processing. Agriculture. 2025; 15(2):179. https://doi.org/10.3390/agriculture15020179

Chicago/Turabian Style

Liu, Jun, Chenggang Zhou, Haoyuan Wei, Jie Pi, and Daoying Wang. 2025. "Decoupling and Collaboration: An Intelligent Gateway-Based Internet of Things System Architecture for Meat Processing" Agriculture 15, no. 2: 179. https://doi.org/10.3390/agriculture15020179

APA Style

Liu, J., Zhou, C., Wei, H., Pi, J., & Wang, D. (2025). Decoupling and Collaboration: An Intelligent Gateway-Based Internet of Things System Architecture for Meat Processing. Agriculture, 15(2), 179. https://doi.org/10.3390/agriculture15020179

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop