## 3 System Architecture
### Operation Flow  
In order to achieve efficient and reliable data transmission in underwater wireless sensor networks, cooperation between agents located in the edge networks is required. According to the location and function of the agent in the edge network, the agents are divided into the sensor agent, communication agent, and sink agent, corresponding to the underwater sensor node, communication node, and sink node, respectively.  
The sensor agent should complete the following actions: (1) carry out data acquisition and edge prediction, and generate prediction parameters and correction data; (2) assemble data packets, generate adaptive transmission policies, and send the packets to relay nodes according to the policies; and (3) receive the packets and update the status of transmission environment.  
The communication agent should complete the following actions: (1) repackage the data, generate an adaptive transmission strategy, and send the packet to the relay node according to the strategy; (2) receive the packets, update the status of transmission environment, and obtain the data.  
The sink agent should complete the following actions: (1) receive data packets and obtain transmission data; (2) generate the new monitoring data based on edge prediction, historical data, received prediction parameters, and correction data, and then send them to the cloud environment.  
The functions of the sensor agent, communication agent, and sink agent are composed of four basic processes, namely: (1) the data acquisition and edge prediction process; (2) the data transmission process; (3) the data receiving process; (4) and the edge prediction and data recovery process. Of these, the sensor agent needs to implement processes (1), (2) and (3); the communication agent needs to implement processes (2) and (3); and the sink agent needs to implement processes (3) and (4).  
Process (1) is shown in Figure 2(a). Based on the ARMA [49] model, it can automatically match the optimal prediction parameters, generate prediction parameters and correction data according to historical data, and provide the threshold of the maximum allowable error for the monitoring application.  
Process (2) is shown in Figure 2(b). The reinforcement learning calculates the new Q value [48] according to the status of neighbor nodes, transmission channels, and their own nodes, in addition to the V value, threshold and super-parameters, and finds the best transmission strategy, that is, the next hop node and the number of correction data. Then, the packets are generated according to the packet format and broadcast. When the sender hears that the data packet has been forwarded by the neighbor node, the sent data are deleted; otherwise, the Q value is calculated and retransmitted.  
Process (3) is shown in Figure 2(c). By monitoring and receiving the new data in the transmission environment, the status of the neighbor nodes and the transmission channels are updated. If this node is a relay node, the new data are received.  
Process (4) is shown in Figure 2(d). It is only used in the sink node and is implemented based on the ARMA model. It is used to restore the generated monitoring data according to the received prediction parameters, historical data, and correction parameters, and to send the generated monitoring data to the cloud environment.  
Next, we introduce the edge prediction algorithm based on EP-ARMA and the adaptive data transmission algorithm based on RL-ADTA.