An Industrial Internet Platform for Massive Pig Farming (IIP4MPF)

Pig farming is becoming a key industry of China’s rural economy in recent years. The current pig farming is still relatively manual, lack of latest Information and Communication Technology (ICT) and scientific management methods. This paper proposes an industrial internet platform for massive pig farming, namely, IIP4MPF, which aims to leverage intelligent pig breeding, production rate and labor productivity with the use of artificial intelligence, the Internet of Things, and big data intelligence. We conducted requirement analysis for IIP4MPF using software engineering methods, designed the IIP4MPF system for an integrated solution to digital, interconnected, intelligent pig farming. The practice demonstrates that the IIP4MPF platform significantly improves pig farming industry in pig breeding and productivity.


Introduction
Almost all of the pig can be used as food. There are many styles of farming: intensive commercial units, commercial free range enterprises. Although all these forms are in use today, intensive farms are the most popular due to their abilities to raise a large amount of pigs in a very cost-efficient manner. For example, only 3% of UK pigs spend their entire lives outdoors [1]. The vast majority of the pork products sold in the UK come from intensive farms [2]. There are challenges facing in intensive pig farming. For instance, hogs in intensive farms tend to produce 23.5 piglets per year. Sow death rates have nearly doubled from 5.8% -10.2% from 2013 to 2016 [3]. Researchers and veterinarians are seeking ways with genetic manipulation positively impact the health of the hogs and benefit the hog business [4].
China has the world's largest herd and has been increasing its pig imports during its economic development. Chinese pig farming industry is growing and rapidly shifting to modernization through introducing the lean production concept and embracing the ICT (Information and Communication Technology). There are many efforts made for tackling the farming challenges for the increasing competition, farming cost, and guaranteeing hog health [5] [6] [7]. The largest exporters of pigs are the United States, the European Union, and Canada [8] [9] [10] [11] [12]. A modern smart pig farming system should provide services for genetic manipulation [14], frozen sperm usage, mass production, precise feeding [15], remote diagnosis and treatment [16], daily weight gaining and cost control [17] [18], performance management, talent training, smart pig farm construction, etc. For an advanced smart pig farming system, we realize that it's better to make use of digitalization, infomatization and Internet of things to collect data on pig life cycle for pig industry. With those data to guide pig farming, a pig farm could achieve lean management with high production efficiency and quality.
Realizing the challenges faced by pig farming and the opportunities given by the next generation artificial intelligence, we design an Industrial Internet Platform for Massive Pig Farming (IIP4MPF). The implementation verifies that the application of new technology such as the Industrial Internet really promotes pig farming industry.
The remainder of this paper is organized as follows. Section 2 overviews related work. Section 3 analyzes the requirement for intelligent pig farming. Section 4 presents the platform for pig farming. Section 5 presents the system implementation and demonstrates its impacts on promoting and updating pig farming industry. Section 6 summarizes the paper and presents the future work.

Related Work
The development of smart pig farming is being enabled by many technologies such as the new generation artificial intelligence, Industrial Internet and Internet of Things.
The new generation artificial intelligence (NGAI) is evolving from simulating human intelligence to assist human intelligence through the interconnection of machines, people, and the Internet [19]. NGAI has the following major characteristics: Big data-fueled, Cross-media, Web-based group artificial intelligence, and Hybrid human-machine synergized artificial intelligence. The new genera-tion artificial intelligence provides decision-making support for pig farming management by remotely sensing data, data analysis, deep learning, expert system, decision-making and so on. The new generation artificial intelligence has been widely used in the central monitoring and data center, environmental data acquisition system, video monitoring system, automatic control system, production process management and traceability, integrated agricultural monitoring system for pests, moisture in the soil, seedling and famine. Taking pig farming as an example, we can use NGAI to manage sick pigs by visual analysis, feature extraction and training or learning. We analyze data for managing and optimizing the farming environment, monitoring pigs' growth, increasing pig production and predicting the future production. Moreover, the NGAI can make reasonable feeding automation by analyzing data on farming environments, such as collecting inner air temperature, humidity, concentrations of carbon dioxide, ammonia gas, dust and so on.
The emerging Industrial Internet is a new methodology, advances digital networked cloud manufacturing, carrying latest information and communication technology for realizing intelligent decision-making and control, improving the efficiency of manufacturing resource allocation through connecting machines, materials, people and information systems, forming in manufacturing. Its significance has been paid high attentions to leverage countries' manufacturing competition in the world [20]. The Industrial Internet should have the following three key elements: Intelligent connected machines, facilities, fleets and networks around the world with sensors, controls and software applications; Advanced analytics leverages professional knowledge, predictive algorithms, automation and materials science, electrical engineering and other disciplines to understand how machines and large systems operate; People at work. Whether working in industrial facilities, offices, hospitals or on the move, people should always be in touch to support smarter design, operation, maintenance and higher quality service and safety.
At present, GE launched Predix Industrial Internet Cloud Platform [21] and Siemens developed MindSphere Industrial Internet Platform [22]. China Aerospace Science and Industry Corporation developed China first industrial Internet platform, INDICS [23], which is an industrial Internet platform with the orientation to manufacturing cloud, targets at the innovation of manufacturing technologies and builds a new industrial Internet ecosystem with a special Data as a Service layer.
The emerging industrial Internet can share information across provinces, cities and countries for smart pig farming systems and realize information transparency and seamless supervision through a pig life cycle.
Cloud computing gathers computing and networking resource for storage, computation, communication, etc. Cloud computing applies a utility model to produce and consume computing resources, in which the Cloud abstracts all types of computing resources, including storage, as services (i.e. Cloud services).
The Cloud user (either application developer or application consumer) can access the Cloud services over the Internet, and the Cloud users pay only for time and services they need. The Cloud can also scale to support large numbers of service requests. Ultimately, Cloud computing takes care of the micro-lifecycle management of applications, and allows application managers to focus on application development and monitoring. The Cloud computing platform is designed to consist of a variety of services for developing, testing, running, deploying, and maintaining applications on the Cloud [24].
The Internet of Things mainly includes key technologies such as sensor technology, radio frequency identification (RFID), and network communication [25]. Sensor technology is considered to be one of the three pillars of modern information technology. It can be used to feel the specified measurement and convert it into a usable output signal according to a certain law. Radio frequency identification technology (RFID) uses radio frequency signals to achieve non-contact information transmission through spatial coupling (alternating magnetic field or electromagnetic field) and achieve identification purposes through the transmitted information. It is mainly used to describe the characteristics of the target object (i.e., the cargo). Network communication is the combination of communication and computer technology. Network communication enables to collect, store, process and transmit data in the form of pictures and texts so that information resources can be fully shared.
Sun [31] proposed a pig excretion behavior automatic monitoring method based on motion characteristics. This method features a pig tracking model characterized by the position of the center of mass of the moving target and the ratio of the minimum circumscribed rectangle length to diameter. Mackenzie [32] used industry data, multiple impact indicators, and system uncertainty to investigate and quantify the environmental impact of commercial pig farming in Canada for the first time. He proposed a method to determine the environmental impact of modeling pig farming. The model likely assesses whether future changes in Canadian pig production systems could significantly reduce the environmental burden of these systems.
Parsons [33] used visual image analysis to control the food quantity and pig weight, and recorded feed intake per pig per day for pig growth and pollutant discharge. Costard [34] analyzed data from 709 pig farms and proposed adjustments to livestock practices and control measures of pig farms in Madagascar using multi-factor analysis (MFA) and hierarchical cluster analysis (HCA).
Although there are many research and practical efforts made on promoting pig farming industry, smart pig farming is still in its infancy stage. This paper reviews these enabling technologies of NGAI, Industrial Internet, Internet of things and cloud computing, and revisits the requirements for developing an intelligent pig farming system with the definition of IIP4MPF platform as follows.
The IIP4MPF takes business integration platform as the carrier with the service provisions of Internet of things data management and control, vehicle logistics management, RFID middleware, electronic tags and other software and hardware support in the terms of farm, laboratory, vehicle and management office. The platform consists of services of a unified digital pig farming portal, farming management, disease surveillance, breeding management system, intelligent service management. The platform implements the digitalization of breeding elements and the digital management of breeding process so that it improves the efficiency and profitability of pig farming.

Requirement Analysis
Lean management is slowly introduced into pig farming industry. The farming mode is shifted from industrialization to digitalization and intelligentization with the development of new generation information and communication technology. There is an urgent need to develop a general digital pig farming platform, realize the automatical control of farming environment, intelligent pig breeding, and improve the intelligent pig farming and online services.
The IIP4MPF is an efficient information management platform for rapidly responding to the roles of farms, laboratories, vehicles and officers. Figure 1 illustrates the use case diagram for requirement analysis. They are the managers of an enterprise, who has a global knowledge for the overall operation of a pig farm.

1) Administration users
2) Pig farming users They are personnels for pig farming, who carry out comprehensive management such as breeding, disease monitoring.
3) Other users They are the users related to pig farming, such as personnel managing logistics vehicles, networks, laboratories, etc.

Functional Requirements
There are three core functional modules for the IIP4MPF platform. The first module is for digital farming data collection, integration and sharing; second module for unified farming data processing; third module for digital data management for a company. The platform allows the information interaction be-

2) Disease surveillance
It is responsible for provides reports on pig production, health inspection, veterinary safety, biosafety, etc. The biosafety assessment is automatically generated in the way of information, and the biosafety of pig farm is strictly controlled.

3) Digital breeding management
It is responsible for providing data entries, statistical reports, breeding analysis, production plans, system settings and various other reports.

4) Intelligent service system
It is responsible for providing business support for digital farm design, the intercommunication among farms, laboratories and vehicles.

Non-Functional Requirements
The IIP4MPF platform has the following multiple non-functional requirements: 1) Authority management Each user should operate with independent and different authority settings to prevent access security risks according to the principle of minimum authorization.
2) Communication security TLS (Transport Layer Security) is used for transmission encryption Encryption and decryption is controlled by programs, and the IIP4MPF platform itself does not own communication related data.
3) Audit and supervision support Log information consists of each user's operations and security events, such as user identification and authentication, access control operation records, user behavior, etc. 4) Human-computer interaction It should have a good graphical user interface for human-computer interaction. The user interface should be modular, maintainable, expandable and easy to interact. Figure 2 presents the Industrial Internet-based Platform for Massive Pig Farming (IIP4MPF), which consists of five layers-the perception, control, facility, information system, and application layer with the additional services for system standardization, security, and operation and maintenance.

System Architecture
Application Layer: This layer consists of five application systems: farming mng, disease surveillance, digital breeding management, intelligent service management, and user portal. The Application Layer is based on a unified PAAS/DAAS (Platform As A Service/Data As A Service) providing users with several authoritative interfaces and information release channels for digital pig farming. The Application Layer supports user access to multiple businesses, and provides different access permissions for different types of users. The PAAS provides applications with a variety of public and common services which are encapsulated in a certain form into independent modules. Through the PAAS, each application system only needs to focus on its own core businesses while ignoring irrelative business functions. The DAAS manages and provides a shared database while integrating multi-source and heterogeneous data involved in pig farming. The DAAS enables to configure a specific database dedicated to a special application and performs unified database management through metadata and information resource directories.

System Implementation
We have preliminarily designed and implemented the IIP4MPF with the following subsystems, including farming management, disease surveillance, digital breeding management and intelligent service system. Figure 3 presents the functional structure of the farming mng system, which is mainly composed of two sub-systems: farm intelligence management and pig farming management. The farm intelligence management consists of fixed asset, material, employee, pig, sales management, monitoring and auditing, query and Journal of Computer and Communications statistics. The farming management system is responsible for comprehensively monitoring farm assets, personnel, sales, and pig through standardization and precise management.

Farming Management
The implementation of the farming management system is specified as follows: 1) Fixed asset management It is responsible for the registration of asset information such as farm facilities, equipment, tools and environmental protection devices in a pig farm, and the daily operations such as asset query and statistics, adding, deleting, and modifying. In addition, it is responsible for equipment warranty, maintenance, inspection, and repairmen.
2) Material management It is responsible for the inbound, outbound, and allotment of all materials used in a pig farm, and supports the batch import, export, and printing of material data.
3) Employee management It is responsible for recording basic information on farm employees, and their attendance and performance. 4) Pig management It is responsible for sharing information on pig production and disease with breeding management system and epidemic surveillance system for realizing workshop, batch and veterinary management. 5) Sales management It is responsible for the CRM (Customer Relationship Management), digital transaction and sales statistics.

6) Monitoring and auditing
It is responsible for the supervision and auditing of pig production and farm situations. Through this module, the administrator can query and make a stats on a user's monthly login history, audit information on materials, pig, and sales etc. 7) Nursery farm management It is responsible for managing the information on nursery householders such as their basic information, pigs raw materials, expenses. It supports batch import, generation and export of tables of householder, pig, raw material, expense, etc.
8) Query and stats management It is responsible for generating reports on farm business and finance. The farm business reports the statistics on pig population, deaths, and sales; the finance reports monthly incomes and costs. 9) System management It is responsible for managing pig farms and workshops, users, rights for accessing functions and data. Figure 4 presents the disease surveillance system, which provides services such as pig production management, pig health management, veterinary and biological safety for automatically generating farm biosafety assessment through using big data analysis and epidemic control system. 1) Pig production management It is responsible for recording the status of abnormal pigs. It consists of the following tables: pig change, treatment record, immunization record, death record, treatment record, and anatomy record. It shares information with the digital breeding management system.

Disease Surveillance
2) Pig health management It is responsible for recording pig health information on boars, breeding, delivery, and rearing houses, etc. The information consists of feeding status, environment, sperm harvesting, drinking water, body appearance, digestion, reproduction, respiratory, and nervous conditions, etc.
3) Veterinary safety It is responsible for uploading information on pig epidemics and supervising the use of clinical drugs and equipment, assisting veterinarians to monitor pig farms, estimate the risk of farm biosafety, and issue clinical programs for pig farming.

4) Biosafety
It is responsible for a risk assessment for pig farms. It shares information with the epidemic control laboratory.   pig ear tag management, and system settings for improving the quality, productivity and efficiency of pig farms. 1) Data entry Data on a pig farm covers the pig life cycle such as breeding, sperm harvest-ing, pregnancy, delivery, nursing, etc. It audits all saved data, and authorizes users to verify whether the recorded data is consistent with the actual ones.

Digital Breeding Management
2) Stats It is responsible for carrying out statistics on pig farm data and supporting pig farm management. Stats provides users with sow reports, boar reports, lactation & fatten reports and other reports according to the user's business needs.
3) Breeding analysis It is responsible for providing analysis reports for pig breeders. These reports include common selection and matching plans, active elimination, genetic gain analysis reports, and performance assessment for breeders. 4) Production planning It is responsible for arranging on-site work for farm users based on data analysis. It generates pig production, breeding, immunization, and breeding determination plans. In addition, it informs the user of the abnormal situation in time so that the user can deal with the problem for avoiding production losses. 5) Electronic pig ear tag management It provides the system with digital farm management, mainly includes tag management, data entry, pig barn, pig batch, data export, etc. 6) System setting It is responsible for the system administrator to set the system such as pig farms, employees, customers, facilities, and materials. Figure 6 presents the intelligent service management system, it consists of services for epidemic control laboratory, breeding laboratory, IOT management, logistics vehicle management, etc. The system aims to provide data and decision-making support for the pig farm platform, to meet the requirements of integration and interoperability among farming services such as lab, vehicle management, etc.

1) Services for the epidemic control laboratory
The services for the epidemic control laboratory are responsible for the samples life cycle management which are collected from pig farm, while maintaining laboratory instruments, materials and documents and undertakes the biosafety supervision and inspection of the farm disease control laboratory. It provides an electronic workbench for business testing, experimental instrument, material, quality monitoring, etc. Therefore, it improves the quality of immunity and ensures the healthy development of a pig farm.
2) Services for the breeding laboratory software The services for the breeding laboratory system are responsible for the feed samples life cycle management and control. It manages information on manufacturers, indicators, first-level test reports, risks, and sample allocation etc. The service ensures the efficiency and accuracy of feed testing, and detects nutritional deviations, and gives guidance timely.
3) Internet of Things device management The IOT device management is responsible for connecting hardware such as sensors, IOT gateways, controllers. It monitors and controls pig farm environment in real time and remotely through organization management, information query, data and equipment management. 4

) The logistics management
The logistics management mainly consists of four-wheel weight calibration, weight reporting, traffic statistics, in-transit prevention and control, routing plan, video monitoring, unloading, vehicle selection and dispatching, real-time positioning, parking/departure line snapping, and intelligent data analysis, etc.

Conclusions and Future Work
The intensive and intelligent pig-raising model is gradually emerging. The intelligent pig farming fully applies information and telecommunication technology, artificial intelligence, and the Internet of Things into pig production management for improving farming efficiency and reducing farming costs. Although the traditional pig industry has entered the on-stock stage, there are still many pain points in the industrial supply chain. Based on a review of existing reports on modern pig research and practice, this paper defines an Industrial Internet-based Platform for Massive Pig Farming (IIP4MPF) through integrating advanced artificial intelligence, the Internet of Things, cloud computing, industrial Internet.
We analyzed the requirements for the IIP4MPF in detail with a case study, and designed and practiced the IIP4MPF system using software engineering methods. The IIP4MPF brings pig farming the following core values: 1) Production efficiency. The IIP4MPF can reduce invalid feeding through precise coordination and automatic warning, and further improve the pig production efficiency of upstream and downstream with the use of Industrial Internet.
2) Scientific management. The IIP4MPF can improve the efficiency of matching the supply and demand, and reduce information asymmetry using big data technology.
3) Reduce costs. The IIP4MPF can reduce farming costs, build an efficient Internet-based farming system. 4) Reduce waste. The IIP4MPF can reduce waste through real-time monitoring inventories through big data and the Internet of Things for adjusting purchase strategies and reducing waste. 5) Historical data analysis. The IIP4MPF can reasonably make a prediction for pig production and farming management through analyzing historical data, In the future, we will further apply the Industrial Internet such as artificial intelligence and big data into the IIP4MPF for penetrating the entire pig industrial supply chain and enable intelligent pig breeding, production, and trading.

Fund Program
Chinese Academy of Engineering Consulting Project "Application of artificial intelligence scene" 2018-ZD-14. Chinese Academy of Engineering Consulting Project "Research on The Overall Innovative Development Strategy of Industrial Internet" 2019-ZD-12.