Chickens raised for meat (also known as broiler chickens) arrive at the farm around 21 days of after hatching and it typically takes around 7 weeks until animals reach the proper size and weight to be sent to the slaughterhouse
https://www.chickencheck.in. In order to ensure adequate growth and welfare, there are dietary needs and comfort requirements that need to be fulfilled. On the one hand, these comfort requirements vary with age. For example, the first days of breeding, poultry require a higher ambient temperature because their body temperature, metabolic rate, insulation from feathering and thermoregulatory ability are relatively low [
46,
47]. On the other hand, these comfort requirements may also change if, for certain reasons, the growth of the poultry flock is slower or faster than expected. This phase, where poultry are raised, is referred to as the breeding phase. Once the flock reaches the determined size and weight and they are ready to be sent to the slaughterhouse, farm operators catch and load them into holding cages or modular bins. These cages are specifically designed to ensure that birds cannot hurt themselves or other birds, and that the air is able to circulate. This phase is referred to as the loading phase. These cages are then placed on a truck which transports the flock from farms to the slaughterhouse. This is the transport phase. Finally, once the animals arrive at the slaughterhouse, they are unloaded and handled by slaughterhouse operators in the phase referred to as the slaughterhouse phase.
The variety of situations that may occur throughout the different phases has a direct impact on the health and welfare of animals, as well as on the quality of their meat by the time they arrive at the slaughterhouse. Therefore, monitoring each of these phases can provide relevant data that can later be exploited to detect causalities behind these issues and adopt measures towards the holistic improvement of the poultry production chain. Therefore, a platform that collects and manages information across the whole production chain is considered of utmost importance.
3.1. The PCM Platform Workflow
The PCM is a cloud-based platform supported by FIWARE open-source components, and implemented based on open standards in charge of collecting, processing and storing data coming from different phases of the poultry production chain in a secure way. The PCM platform is divided into four different stages as can be seen in
Figure 3. It is worth mentioning that the exploitation of the collected information is left out of the architecture.
Data Sources
This is the first stage of the platform where methods to access, assess, convert and aggregate signals are employed by different devices, machines or systems to represent real-world parameters as communicable data assets. In the context of the poultry production chain, data sources are heterogeneous ranging from sensors to measure the environmental conditions within farms or trucks, to wristbands measuring the way operators handle animals. Furthermore, each data source may have its own method to collect the information.
Data Acquisition
This is the stage where the data coming from the various monitoring devices and systems is received. This stage consists of different agents and components to enable the adequate data handling coming from heterogeneous data sources.
The central component is the FIWARE Orion Context Broker
https://fiware-orion.readthedocs.io/ (OCB), a C++ implementation of the NGSIv2 REST API binding. The OCB allows the management of the entire lifecycle of context information including updates, queries, registrations and subscriptions.
The recurrent news about security breaches, private data leaks and the inappropriate use of data, makes the security of the IoT platforms a vital requisite nowadays. Therefore, the security of the PCM platform is of utmost importance. Due to the multitude of different devices, sensors and services involved in the data flow, the security of the PCM platform has to be handled by different agents. FIWARE Keyrock
https://fiware-idm.readthedocs.io/ is responsible for identifying, authenticating and authorizing devices and systems to publish their information in the OCB, by associating them rights and restrictions with established identities. It is based on OpenStack Keystone
https://docs.openstack.org/keystone, a service that provides API client authentication, service discovery, and distributed multi-tenant authorization by implementing OpenStack’s Identity API, and OpenStack Horizon
https://docs.openstack.org/horizon/, which provides a web-based user interface to OpenStack Keystone. Additionally, to complete the security module of the PCM platform, the FIWARE PEP Proxy
https://fiware-pep-proxy.readthedocs.io/ provides a security layer for adding authentication and authorization filters, and it is combined with Keyrock to enforce access control to backend applications.
Furthermore, data coming from IoF environmental sensors (explained in
Section 3.2) is collected by a FIWARE IoT Agent
https://fiware-iotagent-json.readthedocs.io/, which has a Mosquitto MQTT broker
https://mosquitto.org/ embedded. The MQTT protocol is envisioned as a high performing solution for data acquisition, not only because of the low power and memory needed for the implementation of different clients in small devices, but also due to the low bandwidth needed. The FIWARE IoT Agent is used as a bridge to publish sensor data to the central OCB.
Last but not least, there is an Apache Tomcat server in charge of executing periodic tasks for sending CSV-like files to store them in file structures, and get data from external sources (e.g., meteorological prediction from weather forecasting services) in order to publish it in the central OCB.
Data Processing
This is the stage where the data acquired in the previous stage is sent to be stored in the corresponding data repository. The main component of this stage is a FIWARE Cygnus
https://fiware-cygnus.readthedocs.io/ agent. Cygnus is a connector in charge of storing certain sources of data in certain configured third-party storage, creating a historical view of such data. Internally, Cygnus is based on Apache Flume
http://flume.apache.org/, a technology addressing the design and execution of data collection and storage agents. An agent is composed of a listener or source in charge of receiving the data, a channel where the source puts the data once it has been transformed into a Flume event, and a sink, which takes Flume events from the channel in order to store the data within its body into a third-party storage.
Data Storage
This is the stage where the collected data is stored and remains accessible for its future exploitation. Two main data storage repositories are considered in this stage. On the one hand, MongoDB
https://www.mongodb.com/, a NoSQL database which uses JSON-like documents and is the adequate option to store data coming from heterogeneous sources. On the other hand, a file structure to store files created in the different poultry production chain phases and that are not considered to be worth passing through the OCB for various reasons. For example, the amount of data acquired during the loading of the animals with the wearable devices is too big, and in this case, the CSV structure is more suitable for data analysis tasks.
3.2. the Information Collection from the Different Phases
The poultry production chain is characterized by four phases: breeding, loading, transport and slaughterhouse phases. In each of these phases, different information is retrieved, which could potentially be exploited to both evaluate the quality of each phase and support the decision-making towards improving the final meat quality while ensuring animal welfare. This section explains the information collected from each phase, and the way in which data from each phase is obtained and stored in the PCM platform.
Breeding Phase
This is the phase where chickens arrive at the farm 21 days after hatching and spend around 7 weeks until they reach the required weight and size. During these 7 weeks the comfort requirements of the flock including temperature and humidity vary, and if they are not satisfied, animals may be exposed to stressful situations that may result in deficient growth. For example, if relative humidity is too low, there is a higher production of dust and an increase in the number of airborne microorganisms, which may increase susceptibility to respiratory diseases especially during the early days of the broiler. However, if relative humidity levels which are too high are combined with high temperatures, broilers may die from hyperthermia or hypoxia [
26]. Although there are different guidelines to set minimum comfort requirements, in the context of the IoF2020 project, they are defined by farmers, and they can be modified at any moment during the breeding phase for different reasons, including a slower or faster rate of flock growth.
The information generated in the breeding phase is retrieved from different data sources. On the one hand, IoF environmental sensors are installed throughout the farm to measure the climatic conditions in different points of the farm. In the initial deployment plan of IoF2020 project, Tibucon sensors (which were developed as part of the TIBUCON FP-7 project
https://cordis.europa.eu/project/rcn/95501/en) were deployed, which measured temperature, humidity and luminosity values. These sensors were then upgraded in terms of hardware and software, and CO
2 and ammonia level measurement capabilities were added. The resulting IoF environmental sensors are easy-to-install, have a battery supply and offer wireless connectivity. They measure farm conditions every 30 s and this data is sent through a low-power multi-hop wireless network based on the standard IEEE 802.15.4
https://standards.ieee.org/standard/802_15_4-2015-Cor1-2018.html) to a gateway installed in the control room next to the farm. The gateway then sends the data to the Mosquitto MQTT Broker of the PCM platform which will in turn send it to the central OCB.
In addition, there is an existing third-party Farm Management System deployed within farms. This system collects information from different devices and sensors installed within farms, including weight scales, temperature and humidity sensors. The information collected by these sensors is stored in a centralized database. In order to integrate this information within the PCM platform, a Visual Basic application periodically retrieves the latest data stored in the central database of the Farm Management System and sends it to the FIWARE PEP Proxy. Once this Proxy authenticates and authorizes the data delivery, it is forwarded to the central OCB.
The external weather conditions have a direct impact on the indoor conditions of the farm. Therefore, a weather forecasting service is leveraged to retrieve this information. More precisely, Tiempo.com
https://www.tiempo.com/ service’s API is accessed executing a Java-based periodic task which collects the weather forecasting for the location where the IoF2020 project’s use case farms are located. Tiempo.com offers predictions with different time-horizons and formats, among which XML files with hourly predictions for the next 5 days are leveraged. These files include the predicted temperature, relative humidity, sky status (e.g., cloudy or sunny) and wind speed for a given location, and this data is sent to the central OCB.
Loading Phase
In most European countries, poultry loading is performed by catching the birds by one or two legs and carrying three or four birds in each hand [
48,
49]. The poultry handling is recommended to be carried out in a careful and conscientious way in order to avoid stressful situations, injuries and subsequent downgrading of the meat. However, in practice, the loading phase is often rather rough due to the poor working conditions of the personnel, consisting of arduous and repetitive work in a dusty environment [
50]. In summary, the loading of animals into transport trucks has a direct effect on the final quality of the meat and its supervision may ensure poultry welfare and prevent injuries.
In order to monitor how the flock is loaded into trucks, operators wear electronic wristbands which measure arm sway acceleration. It is worth mentioning that operators work in an environment without connectivity, so wristbands cannot send data periodically and are required to have large data storage capabilities. Initially, operators used Wear OS smart watches
https://wearos.google.com/, however, they were later replaced by Axivity AX3 3-axis logging accelerometer wristbands
https://axivity.com/product/wrist-band due to difficulties capturing data at a continuous rate. The wristbands collect information during the whole loading phase (which may last from 3 to 5 h) , and then these wristbands are sent to the slaughterhouse in the transport trucks. Once they arrive at the slaughterhouse, a farm operator plugs the wristbands into the USB port of a PC and the collected information is managed using the OMGUI (Open Movement GUI) software. This software allows both the visualization and the download of the collected data into a CWA binary format file. This file is not compatible with Microsoft Excel or other third-party software, so the collected data needs to be exported into a CSV file using the OMGUI. As these CSV files may be too large (up to 4 GBs of data), the storage of information through the OCB is discarded. Instead, these CSV files are sent via WeTransfer to the PCM platform managers. Next, they store these files in the adequate folder of a file structure where they remain accessible to be exploited.
Transport Phase
This is the phase where the poultry flock is transported from farms to slaughterhouses. The transport phase has become a cause for concern because of animal welfare consideration, associated chicken mortality and consequential economic losses [
9,
51]. The transport journey duration is directed linked to the fasting duration of the poultry , so it has to be correctly estimated to ensure that the feed privation will be as short as possible. As a matter of fact, domestic birds can be transported without food and water up to 12 h [
52]. Furthermore, the transport vehicle must ensure the safety of the animals and their welfare [
53], for example by using side covers to protect birds from cold and wet weather while not impeding the air circulation. Last but not least, the driving style is directly related to the amount of stress perceived by poultry. Smooth and consistent speed driving habits allow the poultry to relax more during a journey, thus ensuring their welfare and the final meat quality [
54]. Therefore, a good transport preparation is essential to avoid causing different degrees of injuries and stress to poultry, ranging from mild discomfort to more severe situations that may terminate in death.
Trucks transporting animals from farms to slaughterhouses are equipped with sensors that measure certain environmental properties. These are IoF transport sensors (similar to the IoF environmental sensors installed within farms) and they are attached to the cages or modular bins where poultry is previously loaded. The IoF transport sensors measure temperature, humidity, acceleration, ammonia and CO2 values. Taking into account that the transport trucks are vehicles without connectivity, sensors cannot send the collected information to the MQTT broker in real-time, but instead, they record all the information until the trucks arrive at the slaughterhouse. Once there, sensors are unloaded from the truck and placed near the slaughterhouse gateway. When the sensor detects the wireless network created by the gateway, the previously recorded information is sent to it, and afterwards, to the MQTT broker. From there, to the OCB and then, data is stored in MongoDB.
Slaughterhouse Phase
This is the phase where, once the poultry flock is unloaded from transport trucks, they are processed and packaged. This stage includes, in turn, different sub stages [
55]. First of all, chickens are slaughtered and completely bleed. Then, in the scalding step, carcasses are immersed into hot water to ease the elimination of feathers. Afterwards, the carcasses are submitted to gutting and washing processes, and carcasses are classified according to their weights and quality. This process is followed by the chilling of carcasses and entrails. Finally, the carcasses are sent to the cutting stage where different pieces or products of poultry meat (e.g., wings and breasts) are produced and packaged. Therefore, the overall quality of the slaughterhouse phase is based on the quality of the final poultry meat.
Once the transported poultry flock is unloaded in the slaughterhouse, operators evaluate their state. They take a random sample of 200 chickens of which the number of dead animals and physical conditions (e.g., broken wings and bruises) are assessed. When the flock is processed and packaged, the status of the plucking or evisceration is also evaluated. The overall quality of the slaughterhouse phase is assessed based on the aforementioned criteria and it is registered in an Excel file. This file contains information of flocks coming from different farms and belonging to different poultry production chains and it is sent to the PCM platform managers once a week. Afterwards, this file is stored in the file structure of the platform. It is worth mentioning that, within this file, each flock is correctly identified so that it can be related to the corresponding information of the previous phases.