The water quality of aquaculture ponds affects the structure of biological communities and the health and survival of fish.Dissolved oxygen concentration and PH are key indicators in water,which not only affect the living environment of aquatic organisms,but also reflect the water quality.By predicting the concentration and PH of dissolved oxygen in aquaculture,the growth environment of fish can be grasped in time and effectively,and then theoretical basis and decision support can be provided for the control of aquaculture water quality and accurate industrial aquaculture.In order to improve the prediction accuracy of dissolved oxygen concentration and PH in aquaculture and improve the lag of prediction results,this thesis constructs a dissolved oxygen prediction model based on self-attention mechanism and improved KBiLSTM,and an aquaculture PH prediction model based on FFM and dual attention mechanism,and completes the prediction of dissolved oxygen and PH in Nantong Zhongyang Puffer Farm.(1)A prediction model of dissolved oxygen in aquaculture based on self-attention mechanism(ATTN)and improved K-means-BiLSTM based on residual connection and BN layer is proposed.Firstly,according to the similarity of water quality parameters,the improved K-means algorithm is used to divide water environment data into several categories.Then,based on BiLSTM,residual connection is constructed and BN layer is added to complete high-level feature extraction,and the feature information is saved by BiLSTM’s long-term memory ability.Finally,the self-attention mechanism is introduced to capture the association between different features,which further improves the performance of the model.The experimental results show that the average absolute error MAE,root mean square error RMSE and average absolute percentage error MAPE of the improved K-BiLSTM model based on self-attention mechanism are 0.291,0.369 and0.050,respectively.Compared with single BP model,CNN-LSTM model,traditional Kmeans-BiLSTM-ATTN model based on residuals and BN,it has better prediction performance and generalization ability.(2)A PH prediction model of aquaculture based on FFM and dual attention mechanism is constructed,which includes multi-scale Feature Fusion Module,FFM),Channel Attention Mechanism,CAM),Temporal Attention Mechanism,TAM)and convolution module.Firstly,multi-scale features are extracted from water quality sequence data,and then adaptive fusion is carried out to extract time series features.Then,the importance of features is calculated and the weights are assigned from the two dimensions of channel and time sequence,and the channel attention mechanism,time sequence attention mechanism and dual attention mechanism are used in turn(that is,the combination of time sequence attention mechanism and channel attention mechanism);Finally,the convolutional neural network module is used as the output part.The experimental results show that the MAE,RMSE and MAPE of the prediction model proposed in this thesis are 0.0357,0.0501 and 0.0041,and its prediction accuracy and generalization ability are better than those of single BP model,FA-SVR model,CNNLSTM model,PSO-LSTM model and Transformer comparison model,which can provide reference for PH regulation and aquaculture planning.The range of dissolved oxygen content and PH adapted to aquaculture is narrow,so the prediction of dissolved oxygen concentration and PH level in aquaculture is particularly important.Using the above model to predict dissolved oxygen and PH level in real time can effectively avoid the adverse effects caused by too low or too high content and ensure the survival and breeding environment of cultured organisms. |