Abstract:Aiming to address the issue of decision-making errors caused by data packet loss during continuous environmental monitoring in modern poultry houses, a network disconnection detection and environmental data prediction method was proposed based on an adaptive heartbeat mechanism and a CNN – Bi – LSTM – Attention model. An adaptive heartbeat mechanism was established to dynamically adjust the network status detection interval ( ranging from 1s to 60 s). Parameters included round-trip time (RTT) and packet loss rate (PLR) were utilized to implement a three-level graded determination: a prompt warning was triggered when network quality degraded, a minor warning was issued upon the emergence of disconnection risk, and a major warning was activated upon actual network disconnection, which subsequently initiated the prediction model. The data prediction model integrated convolutional neural network (CNN), bidirectional long short-term memory ( Bi – LSTM), and attention mechanisms, thereby enhancing capabilities in local feature extraction, sequential information processing, and key-point focusing, enabling data prediction during network interruption intervals. Simulation experiments demonstrated that the heartbeat mechanism maintained a connection survival rate of 99.3% , reduced daily communication volume by approximately 81% , and achieved an anomaly detection latency of less than 5.8 s. The proposed model was employed to predict environmental parameters such as temperature, humidity, and carbon dioxide concentration during network disconnections, yielding average root mean square error (RMSE) and mean absolute error (MAE) values of 0.243℃and 0.194% , respectively, with an average coefficient of determination (R2) exceeding 0.95. The synergistic mechanism of network status monitoring and data prediction effectively ensured data integrity during network interruptions and enhanced the accuracy of environmental regulation decisions.