MODEL AND STRUCTURE OF THE NETWORK INTERNET OF THINGS FOR MONITORING MILK QUALITY

The quality of milk is evaluated by a number of control points, which include a number of indicators, such as fat content, protein, lactose, density, etc. It is proposed to use the Internet of things (IoT) technology to control the quality of milk from distributed dairy farms. A multiagent model of IoT network and the structure of such an IoT network for monitoring the quality of milk from different farms is presented. The model is represented by a variety of agents: milk analyzers, converter, storage of quality indicators, their processing, decisionmaking, monitoring of milk quality indicators. The structure of the IoT network includes milk analyzers, gatewaysconverters, a cloud platform, and mobile devices. The cloud platform rents a server that hosts knowledge and data bases, special software (solver) for processing and making decisions on milk quality, and a farm website. The database of the cloud structure server stores milk quality characteristics, and the knowledge base stores the rules for processing them. The solver outputs deviations from the current milk quality indicators from the standards. The site is used for communication of specialists in milk quality control. Monitoring of milk quality characteristics is implemented from mobile devices of specialists with access to the site components. The 4th generation LTE network using NB-IoT technology was chosen as the network for transmitting information from dairy farms to the cloud. The review of milk analyzers of both domestic and foreign companies is carried out. A gateway solution for querying milk analyzers and transmitting parameters to the cloud infrastructure is presented. Popular cloud platforms for building a network of IoT are presented.


Introduction
Important issues of automation of dairy production management are remote control of milk quality, which must meet international standards. One of the approaches for milk quality assessment is the calculation of indicators based on critical control points (CCP) [1]. The main indicators of milk quality can be used as such points: fat, protein, SOMO, dry matter, density, lactose, added water, etc. These metrics are collected and analyzed within a single farm using computers. Consider a more modern solution, monitoring milk quality indicators using the Internet of things (IoT). General issues of building such networks, structure, management are discussed in [2][3][4][5]. The structure of a multi-agent system for studying the quality of milk from farms in Lebanon is proposed [6]. Consider more details this approach.

IoT network models and structure
To create a model of the IoT network for monitoring milk quality (MMQ), we use a multi-agent approach [7,8]. In this multi-agent structure, select the set of agents of the milk quality sensors, agents, converters, agents, storage quality, processing agents milk quality indices for opinions, agents monitor these indicators and conclusions. This multi-agent model is represented by four: where IoTccm is a model of the IoT network, Rami is a set of sensor agents (from portable milk quality analyzers on farms), SC is a set of converter agents (network gateways of converters), CP is a cloud platform for storing milk quality indicators (quality indicator storage agents and processing agents), and MAi is a monitoring agent (mobile devices for monitoring milk quality indicators). Based on this model, the structure of the MMQ IoT network is developed. It is composed of portable analyzers for quality of milk from each of the monitored farms -AMQ. These analyzers usually send the results to a computer, then their output on printer via a serial port.
In our structure, these milk indicators send to the gateways-converters -GC. The latter are necessary for converting and transmitting the captured milk quality indicators to the cloud environment (CE). In the cloud environment, we use the server. The server in CE contains data and knowledge bases, the solver, special software and website.
The database stores data obtained from farms (milk characteristics) by time (milking number, time of day, days). Data may be from different farms, possibly from different herds of cows. This data are sent to the solver (decision maker) S. It uses the rules from knowledge base for processing milk indicators receiving from the data base and produces issues solutions for certain milk quality parameters. These solutions are also recorded in the database. The site serves is as a means of displaying the results taken and obtained on the quality of milk.
Each of the specialists use mobile devices (MA), which has an application installed that allows displaying information of interest from the cloud database via the website. On a cloud server, some can install a software system to make decisions about changing the content of cows to improve the characteristics of milk quality.

Milk analyser
The milk analyzer is a device for determining the quality characteristics of milk and products based on it (fat content, density, sample acidity, lactose, sample temperature, etc.). This device does not use chemical reagents, which ensures the environmental friendliness of the studied component. Milk analyzers are used on farms, food industry enterprises, milk receiving points, and when conducting research in the field of food industry [9].
Milk analyzers have high accuracy and allow you to make a sufficient number of measurements in the required time. Currently, the use of analyzers in farms and milk processing plants is becoming a normal process.
Let's consider some domestic milk analyzers used in the Republic of Belarus, the characteristics of which are given in [9].
"The lactan 1-4 mini ultrasonic analyzer determines the mass fraction of fat, SOMO, added water and density in a sample of whole, fresh, canned, pasteurized, normalized and skimmed milk. The average measurement time is 3 minutes, which is 2 times faster than using the traditional method of analysis, safer, more economical and easier. The accuracy of determining the parameters of milk quality at the same time completely corresponds to requirements of standard methods".
"The lactane 1-4 ISP. 220 analyzer allows you to determine the six most important parameters in 180 seconds without using chemical reagents -protein, fat, SOMO, density, temperature, and mass fraction of added water in a sample of whole fresh, canned, pasteurized normalized, skimmed, reconstituted, and long-term storage milk" [9].
"The Clover-2 milk analyzer provides rapid assessment of the percentage of fat, protein, skimmed milk powder (SOMO) and density in a single sample of fresh whole, canned milk or cream. Despite the variety of functions, the Clover-2 milk quality analyzer is easy to use, which allows unskilled personnel to perform measurements on it. The main operations on the device are to fill the sample for measurement and then drain it after measurement. Select a sample and pour it into the sample receiver-all this is a matter of seconds. The process of measuring the quality of milk or cream takes 2.5-3.5 minutes. Room temperature milk is measured in 2.5 minutes, and chilled milk is measured in 3.5 minutes. The device indicator displays all the necessary information for the operator. The measurement results are displayed in digital form with a sampling rate of 0.01 %" [9].
As foreign analogues, we present the characteristics of analyzers from Bulgaria of the Lactoscan series [10]. They can be used to measure fat, solid particles (SOMO), density, protein, lactose, salt, water content as a percentage, temperature (°C), freezing point, pH, conductivity, and total solid content of the same sample immediately after milking, collection, and during processing; somatic cell counters for detecting clinical and subclinical mastitis; temperatureregulating devices for various types of tests; highly sensitive test strips for detecting adulteration of neutralizers, hydrogen peroxide and urea adulteration of raw milk that work in an efficient and reliable way.
With high accuracy and speed, Lactoscan portable ultrasonic milk analyzers are Ekomilk is a range of ultrasonic milk quality analyzers produced in Bulgaria. The devices of this series have the following additional features: connecting a pH electrode to measure the activity of hydrogen ions in the test sample (displaying both the pH and titrated milk acidity values of °C), monitoring the falsification of the test whole milk by the parameter "Conductivity", correcting the calibration of the analyzer by introducing correction values. In addition, the Ekomilk milk analyzers are equipped with a self-diagnosis system with corresponding errors displayed on the display, have an RS-232 connector for connecting to a personal computer, and the ability to connect a compact thermal printer" [10].

Gateways-converters
The end hardware (our analyzers) can use different interfaces and protocols, which makes it difficult to connect and query them with infrastructure tools in a cloud environment. In our case, the information from the analyzers can be received via parallel or serial ports. Therefore, we need gateways-converters to interact with the hardware of the cloud platform. Let's look at possible solutions.
One of them is equipment from MOXA, which has been creating communication solutions for more than 30 years and using its experience in the field of Ethernet to COM port converters. It has developed a solution for connecting devices with a COM port to cloud environments. MOXA offers solutions for connecting COM devices directly to the cloud [11]. Let's look at some of these converters: "The NPort IA5000A-I/O, NPort IA-W5000A-I/O series converters and the MGate 5105-MB-EIP gateway support integration with the Alibaba Cloud IoT Platform, Azure IoT Hub, or private cloud via the MQTT Protocol.
The NPort IA5000A-I/O and NPort IA-W5000A-I/O converters allow you to transmit not only raw data from the COM port, but also manage built-in discrete I/O channels. Data is transmitted over the MQTT Protocol in JSON format".

IoT cloud platforms
These platforms support Internet functions for IoT applications -launch, maintenance, analytics, data storage, and security measures. Let's consider the most famous of them [12].
"AWS IoT Core is the foundation on which any IoT application can be built. Еhrough AWS IoT Core various devices can connect to Internet, to each other and exchange data. The platform supports various communication protocols, including custom ones, which allows to communicate between devices from different manufacturers.
AWS IoT Device Management allows to add and organize devices. It provides secure and scalable performance with the ability to monitor, troubleshoot, and update device functionality. AWS IoT Analytics is designed to automatically analyze large amounts of various IoT data, including unstructured data from various types of devices. The data collected and processed by the service is ready for use in machine learning. AWS IoT Device Defender service supports configuring security mechanisms for IoT systems. AWS IoT Device Defender allows to configure and manage security policies, controlling device authentication and authorization, and providing encryption mechanisms".
"The Google Cloud IoT platform includes a number of services that can use to create IoT networks. Cloud IoT Core is a fully managed service for easy and secure connection, as well as managing and receiving data from various devices. Cloud Pub/Sub is a service that processes event data and provides real -time flow analytics. Cloud Machine Learning Engine that allows to create machine learning models and use data collected from IoT devices" [12].
"The Microsoft Azure IoT Suite platform offers both pre-configured solutions and the ability to customize them and create new ones according to the project requirements. It can get security mechanisms, high scalability and integration with any existing or future systems. The platform allows to connect hundreds of devices from various manufacturers, collect analytical data and use IoT data for machine learning purposes".

Organization of communication in IoT network
The communication technology recommended for this Internet of things network farm monitoring milk quolity requires covering a significant distance [13]. We propose decision which is called LPWAN (Low-power Wide-area Network -energy-efficient long-range network) [14]. As a network for transmitting information from dairy farms to the cloud, we will choose the 4th generation LTE network, which has already been tested and has proven itself well in the Republic. However, it is used for Internet clients. However, its component -NB-IoT Technology, as part of LTE, has a low data transfer rate, but a large coverage-thanks to the use of LTE network capabilities [15].
NB-IoT provides data transfer rates from 20 to 250 Kbit/s, depending on which LTE network resources are used. Since this is only an extension of existing standards, testing equipment and software to verify NB-IoT compliance are already available.

Conclusion
It is proposed to use the Internet of things technology for remote monitoring and control of milk quality of dairy farms distributed throughout the district. A model of such an IoT network based on multi-agent technology is presented. The structure of this IoT network is proposed, which includes milk analyzers, gateways-converters and a cloud structure where the server platform is rented. The server components are discussed. The server database stores the quality indicators of milk. These indicators can be monitored from mobile devices of specialists.
The most popular cloud platforms are considered. The 4th generation LTE network using the technology for the IV-NB -IoT network was chosen as the network for transmitting information from dairy farms to the cloud environment.