Frontiers in Computing and Intelligent Systems ISSN: 2832-6024 | Vol. 8, No. 2, 2024 34 Indoor Breeding Environment Monitoring System Chaoji Wan 1, Chao Chen 2, *, Weiwei Zhong 2 1 Mining Safety College, North China Institute of Science and Technology, Langfang, Hebei, China 2 School of Computer Science, North China Institute of Science and Technology, Langfang, Hebei, China * Corresponding Author: Chao Chen Abstract: In response to the problems of low survival rate, high labor cost, and difficult environmental monitoring in modern indoor aquaculture, cloud server technology combined with Arduino related hardware equipment is adopted to achieve real-time monitoring, automatic control, and automatic alarm functions of indoor environmental data. A human-machine interaction interface is provided on the server and mobile phone, providing a good environmental monitoring platform for breeders. By utilizing automation technology, intelligent devices can automatically collect environmental data and control equipment to perform corresponding actions based on changes in the environment, effectively improving the survival rate of aquaculture and reducing labor costs. Keywords: Internet of Things; Indoor Breeding; Environmental Monitoring; Cloud Server; Arduino. 1. Introduction With the rapid development of Internet of Things technology and the popularization of computer technology, its combination with aquaculture has become an important trend of industry innovation and development. Especially in the background of increasingly tight land resources in China, indoor farming as an important way to solve the problem of land resources, its intelligent and automated demand is becoming more and more urgent. The introduction of the Internet of Things technology enables the aquaculture industry to achieve real-time monitoring and intelligent regulation, which greatly improves the efficiency of farming and reduces labor costs. Although the domestic intelligent aquaculture started late, it is developing rapidly. Many scholars and practitioners have conducted in-depth research and practice around the application of Internet of Things technology in the aquaculture industry, and achieved remarkable results.Han Shouzhen [1] summarized the development status of smart agriculture. As a basic industry in China, agriculture plays an important role in the food and clothing of the whole people. With the improvement of the level of agricultural mechanization, agricultural production is transforming to the direction of automation and intelligence. In order to develop smart agriculture, it is necessary to fully apply intelligent technology to agricultural production, use big data, the Internet of things, intelligent agricultural machinery and other facilities, so as to change the production mode of traditional agriculture and achieve the long-term development of smart agriculture; Due to certain differences in the heat exchange between different floors and the external environment, these differences may lead to differences in the environmental control effect of different floors with the same area and similar ventilation system, thus causing a great impact on pig production. Gao Yun [2] further adjusted and optimized the design and operation mode of the ventilation system of the pig house according to the characteristics of different floors. The security monitoring technology of the traditional fishery aquaculture system is of low intelligence level and the node positioning accuracy is not enough. Therefore, Zhang Jifei [3] tailored a security monitoring technology of Internet of Things equipment based on node optimization of sensor network for the intelligent fishery aquaculture system, and finally improved the monitoring, deployment and positioning capability of the system and enhanced the stability of data transmission. Modern agricultural science and technology is the fundamental way for agricultural development and farmers' income increase [4]. The big data platform built based on the Internet of Things and sensors can replace the traditional agricultural production mode with high energy consumption and low income, thus improving the utilization rate of agricultural resource information. At the same time, the experience of mechanization and digital development of agriculture in developed countries abroad has also provided references for the development of intelligent aquaculture in China. In September 2017, Harp Adamms University in the UK worked with Precision Decision to harvest wheat without direct human intervention [5]. The machines and equipment used in this test field are all modified from traditional machines. Drones in this project performance is brilliant, in addition to mapping paths, GPS positioning, but also in conjunction with other equipment for a lot of farming work. This project proves that there is no technical problem with fully automated farming activities. American John Deere S790 combine harvester, equipped with AutoTrac(ATU) automatic navigation system [6,7], so as to achieve automatic navigation driving; The use of electro-hydraulic differential lock provides more traction for the machine in the muddy environment, and the closed-core hydraulic system reduces the standby pressure of the system and improves the overall reliability. The integrated electronic sensors realize multiple functions such as crop moisture detection, loss monitoring and adjustment, and yield monitoring, making agricultural production more accurate and intelligent. This paper aims to explore the application of Internet of Things technology in indoor farming environment monitoring system, analyze its important role in improving farming efficiency and reducing labor costs, and look forward to the future development prospects of intelligent farming system. Through this study, it is expected to promote the development of aquaculture industry to a more efficient and intelligent 35 direction, and contribute to the process of agricultural modernization. 2. Overall Design The hardware of the system uses Arduino mega 2560 motherboard and its expansion board. The powerful library files of Arduino provide support for the construction of the underlying logic. The data collected by the DHT11 temperature and humidity monitoring module embedded on the expansion board is sent to the upper computer through WIFI, and the upper computer is connected to the cloud server. And provide PC and Android data monitoring interface. 2.1. System Function Overview As shown in Figure 1, the system realizes environmental monitoring function based on Internet of Things technology. The field environment data is collected in real time by the temperature and humidity sensor, and the data is processed by the Arduino control board and uploaded to the cloud server. The cloud server displays data in real time in the form of a large digital screen, and synchronizes it to the mobile phone for users to view at any time. The user can send the control command through the digital large screen or mobile phone, and the control board receives and executes the command to realize the remote control of the light bulb and the motor switch. In addition, the system has an alarm warning mechanism, when the ambient temperature exceeds the set threshold, the control board will automatically start the fan to cool down, and send an alarm notification to the user. The entire system combines sensor technology, network communication and automated control for efficient and intelligent environmental monitoring and response. Figure 1. System function diagram 2.2. Overall System Design The indoor breeding environment monitoring system adopts the design and implementation based on cloud server, and designs the two-end human-computer interaction interface of PC side and mobile side respectively. Both sides provide temperature and humidity display function and downward control light button on the human-computer interaction interface to realize remote lighting control. In addition, the alarm function is set extra on the mobile side, and a warning will pop up when the temperature and humidity is abnormal. The Arduino-based hardware system is used locally to realize the functions of data acquisition, data upload, abnormal alarm and data reception. Among them, data acquisition refers to the DHT11 temperature and humidity sensor module regularly collecting data and uploading it to the Arduino chip. Data upload refers to the Arduino chip through the esp8266 WIFI module to upload data to the AP, and further through the network to the cloud server. 3. System Function Module This system has a total of three large functional modules, which are hardware module, server module and mobile module. 3.1. Hardware System Module The hardware system module mainly realizes the collection, upload, downward control and alarm functions of temperature and humidity data. Before the ambient temperature and humidity data is officially uploaded, you need to compare the set threshold. If the ambient temperature and humidity data exceeds the threshold, it is considered that the data is abnormal and the hardware alarm function is directly enabled. The hardware alarm is divided into two parts: first, the abnormal data is reported, and the server starts the software alarm function after receiving the abnormal data, that is, the alarm on the mobile terminal; On the other hand, the control command is automatically issued to turn on the motor and drive the fan to rotate, simulating the cooling and humidification function in the real environment. If the data is normal, it is reported normally and the threshold is not triggered. If a downward control command is received from the server during the normal running of the system, the command is immediately received and delivered. The specific flow chart is shown in Figure 2 below: 36 Figure 2. Hardware flow chart 3.2. Server-side Module The server provides a front-end interface, which can realize the function of temperature and humidity data display and downward control. The main function of the server side is to realize data storage, transfer and display, that is, when the temperature and humidity data sent by Arduino is received, it will be displayed on the digital large screen and sent to the mobile end; When a downward control command is received from the front-end interface or mobile end, it is sent to the Arduino and further control is sent. Figure 3 is the flowchart of the server-side program: Figure 3. Flowchart of the server side 3.3. Mobile Module The mobile terminal also displays a front-end interface for interacting with users, providing line charts to realize real- time display of temperature and humidity data, and buttons to realize downward control of lighting. The mobile terminal is equipped with the automatic alarm function. If the alarm information sent by the server is detected, it will prompt the alarm information in the notification bar and keep vibrating. Figure 4. Flowchart of the mobile terminal 4. Test 4.1. Test Content 4.1.1. Functional Testing (1) Whether the data displayed on the front-end interface is correct; (2) Whether the button function of the front interface can work normally; (3) Whether the alarm function can work normally. 4.1.2. Correctness Test (1) First power on the hardware to see whether the hardware system can be initialized normally and automatically connected to the network. After the initialization is complete, check whether the status indicator of the hardware is evergreen, and then check whether the data on the server interface starts to upload in real time. (2) Test the function of sending instructions down on the server side and the control button on the mobile side respectively to see whether the controlled small light will make corresponding controlled actions according to the control instruction. (3) Increase the ambient temperature or reduce the ambient humidity, and check whether the automatic alarm system will issue an alarm message according to the set rules. 4.2. Unit Test Cases Table 1. Test case 1 Test case number 1001 Test item server Test title Green on the server Importance level high input Green light on the server sends down 1 Expected result Controlled light turns green Execution result Controlled light turns green 37 Table 2. Test case 2 Test case number 1002 Test item server Test title The server is off green Importance level high input The green light on the server sends 0 downwards Expected result The controlled light goes off Execution result The controlled light goes off Table 3. Test case 3 Test case number 1003 Test item server Test title The server turns red Importance level high Controls The server sends the red light down 1 Expected result The controlled light turns red Execution result The controlled light turns red Table 4. Test case 4 Test case number 2003 Test item Mobile terminal Test title Red light on mobile Importance level high Controls Click on the red light button Expected result The controlled light turns red Execution result The controlled light turns red Table 5. Test case 5 Test case number 2004 Test item Mobile terminal Test title Mobile end turn off the red light Importance level high input Click the red light off button Expected result The controlled light goes off Execution result The controlled light goes off Table 6. Test case 6 Test case number 3001 Test item Alarm system Test title The temperature is too high and the humidity is too low Importance level high input Lighter grill DHT11 sensor periphery Expected result Light turns red, fan start, sent alert to the mobile terminal Execution result Light turns red, fan start, sent alert to the mobile terminal 5. Conclusion As a typical iot application model, this system has shown potential in intelligent farming and other fields. It uses smart devices to collect environmental data, expands the range of human perception, and optimizes farming conditions through data analysis. However, although this system has been successfully implemented, there are still many problems. When it is for the actual farm, the function needs to be expanded, such as increasing the heating equipment to cope with the low temperature environment. In addition, thresholds need to be adjusted with expert advice, and smart facilities need to be increased or decreased according to different needs. In short, the system still needs to be further improved and perfected to adapt to the complex environment of the actual farm, achieve more efficient and accurate breeding management, increase production and reduce management difficulty. References [1] HAN Shouzhen, Liu Hongfang, Liu Hongde. Development Status and research of smart agriculture [A] Modern Agriculture, 2022, 2:42-43. [2] Gao Yun, Diao Yaping, Lin Changguang, et al. Monitoring and Analysis of Thermal Environment and harmful Gases in pig houses with mechanical ventilation [A]. Transactions of the Chinese Society of Agricultural Engineering, 2018,34 (4): 239- 240. [3] Zhang Jifei, Wei Maochun, Lin Chao. Security monitoring technology of iot equipment in intelligent fishery aquaculture system [A] Information Technology, 2022,4:97-98. [4] Jia J X. Application of big data in agricultural production under the background of smart agriculture [J]. Modern Agricultural Science and Technology, 2020 (13): 228,231. [5] LUCINDA DAN. Hands Free Hectare brings in first robot wheat harvest. Farmers Weekly,2018,169(24). [6] JIA Quan. Research on Key Technologies of Tractor Automatic Navigation System [D]. Beijing: Chinese Academy of Agricultural Mechanization Sciences,2013. [7] Wu Baochuan, Ma Liping. Discussion on the promotion and application of GPS Automatic Navigation in Agricultural tractors [J]. Agricultural Machinery,2012(25):125-127.