Keywords

1 Introduction

Proper feeding is an important way to improve pig productivity, which increases litter size and improves disease resistance [1]. The feeding status of pigs is a very important index of health monitoring. Abnormal feeding behavior can be a sign of epidemic disease [2].

Considering the disadvantages of traditional livestock farms, such as being time-consuming, laborious and having low accuracy [3], Zhong et al. used RFID, GPRS and embedded technology to collect and analyze each pig’s feeding times, feed intake, and growth status in large-scale pig farms. They proposed a new method based on RFID and ARM embedded technology to monitor pigs’ daily behavior. Although this method can be used to collect each pig’s feeding times, food intake, and growth state, there is no monitoring of a pig’s health information and living environment information, no comprehensive analysis and reasoning with health information, no living environment information and feed intake, and no network service platform which could provide an effective way of managing pigs from multiple areas. Hence, this method cannot remotely provide accurate feeding information. Moreover, the multiple intelligent feeders from multiple areas cannot be centrally monitored and managed. We used Wireless Sensor Network, intelligent sensors, network service platform technology, and remote reasoning and decision-making [4] to achieve accurate feeding and precision management of pigs from multiple areas, which improved their productivity level.

2 System Composition

The system we built comprised two parts which were (a) the pig intelligent feeding equipment and (b) the pig health monitoring and management network service platform. The network management of the pig feeding equipment and the remote monitoring and managing of useful information, such as living environment, health information and daily feeding amount of pigs from multiple areas, was realized by using the Internet of things technology [5, 6]. Through cameras installed in pig farms in multiple areas, users could have a remote view of the pig farm and were able to remotely control the pig feeding equipment through the network service platform via mobile phone and PC [7].

The decision-making model [8] was used in the pig health monitoring and managing network service platform to obtain the precise feed amount. Then, the platform sent instructions to the feeding equipment to control the pig feeding motor to feed the precise amount. The intelligent feeding equipment from multiple areas was centrally managed through the pig health monitoring and managing network service platform via the wireless transmission network, as shown in Fig. 1. Meanwhile, users were able to access the platform service through mobile phone and PC at any time and from anywhere.

Fig. 1.
figure 1

The whole system structure

3 Pig Intelligent Feeding Equipment

3.1 Hardware of Pig Intelligent Feeding Equipment

The hardware of the feeding management equipment was composed of the core processing unit, environmental monitoring unit, process monitoring unit, health monitoring unit, execution unit, and the wireless transmission unit. The core processing unit was composed of the core processor and its peripheral circuit. The main function of the core processing unit was to manage the equipment’s other units. The sensors in the environmental monitoring unit were an ambient temperature sensor, humidity sensor, ammonia sensor [9], carbon dioxide sensor, and hydrogen sulfide sensor [10], all monitoring the gas concentration of the pigs’ living environment.

There was an entrance and exit detection in the process monitoring unit with infrared sensors which used infrared detection to determine whether a pig had passed. The RFID identifier was used to identify the identity of each pig in order to make the intelligent feeding equipment feed accurately. The RFID identifier sent the radio frequency modulation signal to the label through the antenna. At the same time, it received the RF signal which contained information from the label through the antenna [11]. Then, the RF signal was processed to be transmitted to the core processor.

The sensors in the health monitoring unit were a material level monitoring sensor, electronic scale sensor, non-contact infrared temperature measuring sensor [12], and animal ultrasonic thickness sensor [13]. The material level monitoring sensor was used to monitor the actual amount of the hopper in order to obtain the pig’s effective feeding intake. The electronic scale was used to measure the pig’s weight before feeding. Hence, the electronic scale enabled the equipment to record pig weight daily. The non-contact infrared temperature sensor was used to monitor the pig’s body temperature before eating. In addition, the temperature and humidity compensation algorithm was used to make the pig’s body temperature measurement more accurate [14]. The ultrasonic thickness sensor, which uses ultrasound to measure the thickness of mammals, was applied in our experiment.

The execution unit comprised of the hopper feed motor, entrance door motor, and exit door motor whose function was feeding, opening and closing the door of the equipment. The main function of the wireless transmission unit was to transmit the real-time data of the intelligent feeding equipment to the network service platform [15] and at the same time accept the instructions from the network service platform to collect data, feed, open and close the door, etc. The equipment hardware is shown in Fig. 2.

Fig. 2.
figure 2

The hardware of pig intelligent feeding equipment

3.2 Software Process of Pig Intelligent Feeding Equipment

The intelligent feeding equipment first initialized and then opened the entrance door to allow the pigs to enter one by one. The equipment used the entrance door sensor to detect whether a pig had entered the entrance door. When the pig entered, the core processor activated the RFID identifier to identify the electronic earmark of the pig. As the distance of the identification of the electronic earmark was relatively close, when the RFID recognized the pig ear, it meant that the pig had entered the dietary channel. At the same time, the equipment closed the entrance door to prevent other pigs from entering into the dietary channel. If other pigs were able to enter the dietary channel, then the equipment would not be able to tell which electronic ear tag belonged to the pig. When the core processor received the electronic ear tag information, then the electronic scales, non-contact infrared temperature, and fat thickness sensors began to collect data. Sensor data and environmental information together with the identity information of the RFID and the current time were then transmitted to the server through the wireless transmission module [16].

After the server received the sensor data and the other information, it then obtained the result from the forward inference [17, 18] of the server platform to determine the feeding amount of the recognized pig. The network service platform [19] sent the feeding amount instruction to the core processor module of the feeding device through the wireless module. After replying to the instruction, the core processor operated the material level motor to feed according to the amount of the instruction. During the pig’s feeding time, the core processor worked with the material level sensor to monitor whether there was residual feed. If the monitoring result was still surplus, the material level sensor would continue to monitor whether the material level was still reducing 10 min later. If the material level was still reducing, it indicated that the pig was still feeding. Then the material level sensor would keep monitoring the material level until the material level was no longer reduced, which meant that the pig had finished feeding this time. The actual feed intake would be uploaded to the platform server. Finally, the equipment would open the exit door. When the exit door sensor detected that the pig had left the exit door, the equipment would close the exit door and open the entrance door, waiting for the next pig to enter to feed. The software flow chart of the intelligent feeding equipment is shown in Fig. 3.

Fig. 3.
figure 3

The software flow chart of intelligent feeding equipment

4 Pig Network Service Platform

4.1 Network Service Platform Structure

The function of the network service platform was to monitor and manage pig health, which included basic information management, environmental information monitoring, reasoning and decision-making, and user management, as shown in Fig. 4.

Fig. 4.
figure 4

Network service platform structure

Users from multiple areas viewed the network service platform installed in the remote server either through mobile phone or PC. The network service platform was developed by using the Eclipse 8.0 development platform [20]. The foreground page and background program were written using Java language [21, 22]. The management of the relational database was realized by MySQL [23, 24], which has the most comprehensive set of advanced features, management tools, and technical support to achieve the levels of MySQL scalability, security, reliability, and uptime.

4.2 Reasoning and Decision-Making

Considering that the control targets, living environment, and growth data of individual pigs were different, it was not a simple process to determine the feed intake of individual pigs. Previous feeding methods did not consider the multiple control targets taken into account by our team. They also did not refer to expert opinion and historical data to determine the correct feed intake of a typical pig. The intelligent feeding system based on the expert system reasoning machine [25, 26] linked together the living environment, growth status, growth parameters, and growth stage by case matching, fuzzy reasoning, and decision-making to derive the pigs’ best diet condition, so as to effectively apply expert opinion and historical parameters to control the pigs’ diet.

Reasoning and decision-making were made by the inference engine [27, 28], which used certain reasoning methods and strategies in the dynamic database [29] for working memory. According to the current content of the dynamic database, the corresponding reasoning control strategy was used by the inference engine to decide how to use the knowledge in the knowledge base.

At the same time, the rules in the rule base were controlled to match the data and facts in the dynamic database. When the match was a success, the corresponding rules were triggered to modify the dynamic database. Using the decision-making model, the final result was obtained. Expert system inference engine [30] was used in this paper, as shown in Fig. 5.

Fig. 5.
figure 5

Expert system inference engine

5 Experiment

5.1 Feeding Accuracy Experiment for Pig Feeding Equipment

Experiment equipment: Pig intelligent feeding equipment, high-precision electronic scale.

Measured material: Powder concentrated feed.

Experimental purpose: To detect the feeding accuracy of pig intelligent feeding equipment.

Considering the intake amount of a pig is about 2 kg–4 kg per day, we set the feed target values as 2 kg, 3 kg and 4 kg, which were each measured 5 times using a high-precision electronic scale whose precision is 0.2 g and range 10 kg. The target value was the theoretical value computed according to the relationship between design volume and pulse equivalent. There was some error of drop feeder assembly and pulse equivalent, which is inevitable. After correcting the error by the averaging algorithm, the actual value and target value were as follows (Table 1):

Table 1. Target value, measured value and average value

It was obvious that the average value was approximate to the target value, concluding that the feeding container was the key factor that influenced the precision of the intelligent feeding equipment.

5.2 Reasoning and Decision-Making Test

The experiment was carried out by pig intelligent feeding equipment on one pig. The decision-making was obtained through the network service platform. The server received a pig’s electronic ear tag information, DBZRSQU3041. After comparing the ear tag information to the database on the server, the equipment derived the following information: the large white variety, pregnancy status, and gestational age of 20 days. The data collected by the sensors were: body weight, 95 kg; body temperature, 38.7 °C; and fat thickness, 16 mm. The living environment parameters were: temperature, 30 °C; humidity, 25%; ammonia concentration, 25 ppm; CO2 concentration, 356 ppm; and hydrogen sulfide concentration, 3 ppm. According to the information on pig varieties and breeding stages of pigs, the network service server obtained the knowledge base of the ideal physical parameters: body weight, 90 kg–100 kg; body temperature, 38.3–39.1 °C; and fat thickness, 15.0–21.0 mm. The ideal living environment parameters were: temperature, 25°; humidity 50%–60%; ammonia concentration, 0–30 ppm; carbon dioxide concentration in the air, 300–450 ppm; and hydrogen sulfide concentration, less than 10 ppm. After comparing the physical parameters and preset parameters, the reasoning and decision-making model concluded that weight, body temperature, fat thickness, and physical condition were normal. After comparing the collected environmental parameters to the ideal environmental parameters, the reasoning and decision-making model concluded that the temperature was high, humidity was low, and gas concentration was normal. Hence, the environment parameters were not suitable for this pig. Thus, when the forward reasoning and the contrast of the knowledge base model were finished, the forward reasoning machine model in the network service platform made a decision that the current recommended intake was 2.8 kg.

6 Conclusion

Proper feeding is an important condition for the growth of pigs. The difference in the growth period, health status, and environmental parameters make the daily intake of feed of each pig different. Proper feeding can effectively avoid the waste of feed and maintain pigs’ health condition. At present, there is a lack of an effective health monitoring network service platform for large-scale and multiple areas pigs’ precision feeding. Previous research did not do an effective reasoning and analysis based on pigs’ living environment and physical status. Previous research also did not use an effective reasoning and decision-making model that considered pigs’ living environment and physical status. We combined with the Internet of things technology, network service platform technology, sensor technology, and reasoning and decision making to make an intelligent feeding equipment and network service platform which can provide a convenient and intelligent feeding method as well as multiple areas pig management. The average value of the equipment was approximate to the target value, which meant that the accuracy of the equipment was high, and the feeding container was the key factor that influenced the precision of the intelligent feeding equipment. Decision-making was obtained through the network service platform which was able to monitor and manage the health status of pigs. In the future, on the basis of the accumulation of data, we can use machine learning to analyze big data to enrich and improve the reasoning and decision-making model and forecast the future of pigs’ feeding status.