# Research on the Lossless Data Compression System of the Argo Buoy Based on BiLSTM-MHSA-MLP
## 3 Data Compression and Decompression
### Compression and Decompression Model
Then, the probability of the timesteps+1 st character is output by the prestored probability predictor on the basis of the first timestep characters. The probability distribution and cumulative frequency table are updated using this probability and the character, and the character is decoded according to the probability interval into which it falls. This process can be repeated to decompress N characters. The decompression process is shown in Figure 6. Finally, the decompressed characters are restored to the original deep-sea profile txt file through the previously constructed dictionary. The overall decompression process is shown in pseudocode as Algorithm 2. ```
1:Input:
2: com_data: compressed data
3: timesteps: number of timesteps in each sequence
4: model: probability prediction model
5: params: model parameters
6:Output:
7:decom_data: decompressed data
8:Initializeparameters:
9:char2 id_dict, id2 char_dict, len_series \(\leftarrow\) params[0], params[1], params[2]
10:Decode the initial timesteps with a uniform distribution:
11:for i \(\leftarrow\) 0 to timesteps do
12: data \(\leftarrow\) ArithmeticDecoder (com_data, uniform)
13:endfor
14:Process remaining data:
15:for j \(\leftarrow\) timesteps to len_series do
16: train_x \(\leftarrow\) data (j--timesteps, j)
17: prob \(\leftarrow\) model.predict (train_x)
18: data.append (ArithmeticDecoder(com_data, prob))
19:endfor
20:Transform decoded data:
21:decom_data \(\leftarrow\) transform (data)
22:End:
23:Return decom_data

### Argo Buoy Data Compression System Design

The Jetson nano development board is a low-cost AI computer launched by NVIDIA, which has high performance and energy efficiency, as shown in Figure 7.

In data compression algorithms, a lower compression ratio results in more compact data, but it usually means a more complex computational process is required, which increases computational overhead. However, considering that the single batch profile data from Argo buoys is typically smaller than 5000 bytes, the data volume is relatively small, and the Jetson nano can efficiently handle such data without facing significant computational resource bottlenecks. The Jetson nano is equipped with a quad-core ARM Cortex-A57 CPU and a 128-core NVIDIA Maxwell GPU, with excellent performance in processing small-scale data, particularly in deep learning inference tasks, ensuring efficient computation. Although BiLSTM and MHSA modules are computationally intensive, for a small dataset of only 5000 bytes, the Jetson nano's GPU effectively reduces computation time, keeping the computational overhead within an acceptable range and avoiding issues like memory shortages or overload. In the compression task, the BiLSTM and MHSA models have been pre-trained on the Argo buoy's training data, and the model weights and structure are stored on the SD card. During inference, Jetson Nano loads the pre-trained model into the main memory for computation. Since the data size for each batch is small, Jetson Nano can efficiently load and execute the inference tasks, ensuring that the computational resource requirements for the data compression process are low, with short runtime, thus resulting in the limited consumption of battery and computational resources. As a low-power edge

Figure 6: Decompression process. Figure 7: Jetson nano development board. computing platform, Jetson nano can execute computationally intensive tasks while saving energy. In the application of Argo buoys in ocean exploration, Jetson nano, with efficient compression technology, reduces bandwidth demands, lowers transmission costs, and enhances data transmission efficiency. This is particularly advantageous for floats with limited battery and bandwidth resources, significantly improving the efficiency of data collection and transmission. Therefore, the Jetson nano development board is selected as the hardware environment for buoy lossless data compression. It configures the software environment for deep learning and lossless data compression by loading the Ubuntu 18.04 LTS system.