## 3 Training and Testing of Algorithms  
To train the algorithm, we chose the GOT-10k [37] datasets as the training datasets of the algorithm, which have a rich variety of objects and a wide range of scenarios, so it is very suitable for the algorithm to be trained on the GOT-10k datasets, which can enhance the generalization ability of the model. Before training the network, we need to preprocess the images in the GOT-10k datasets. For preprocessing of the object template region image, an object square region is cropped out with the center of the object as the cropping center, and the cropping operation uses Equation (2). After cropping is completed, the object square region is scaled to a \(127\times 127\) object template, and the scaling operation uses Equation (3). For the preprocessing of the search region image, to maintain consistency with the scaling scale of \(z\), we crop the object search region image; after the cropping is completed, a random deflation operation is performed on the cropped region, which helps in the data enhancement, and three random deflation coefficients are selected; which are \(\{1.0375^{-1}\), \(1.0375^{0}\), and \(1.0375^{1}\)), and finally scaled to \(255\times 255\), as shown in Equation (14). \[x=\frac{255\times z}{127}\times scale_{i}, \tag{14}\]  
where \(x\) denotes the cropped search region image, \(z\) denotes the side length of the cropped object square region, and \(scale_{i}\) denotes one of the three random deflation coefficients. The loss function is defined as shown in Equation (15). \[\ell(y,v)=\log(1+\exp(-yv)), \tag{15}\]  
where \(y\) represents the true value of similarity and \(y\in\{-1,+1\}\) represents the positive and negative example pairs. \(v\) represents the similarity between the object template features and search region. Define the error function as shown in Equation (16). \[L(y,v)=\frac{1}{|D|}\sum_{u\in D}\ln(1+\exp(-y(u),v(u)), \tag{16}\]  
where \(y(u)\) represents the true value of similarity corresponding to position \(u\), \(v(u)\) is the response value corresponding to position \(u\) in the response map, \(u\in D\), and \(D\) is the set of position indices in the response map, which is determined by the Euclidean distance between position \(u\) and the center position \(c\) of the response map as shown in Equation (17). \[y(u)=\left\{ \begin{array}{l}+1\,k\|u-c\|\,\leq R\\ -1\,\,\text{Other}\end{array} \right., \tag{17}\]  
where \(R\) is the set threshold, \(R\) is taken as 16, \(k\) is the network step size, the network structure shrinks the original image eight times, and \(k\) is taken as 8. The model is optimized using the stochastic gradient descent method, and the optimized parameters of the convolutional network \(\theta\) can be obtained, as shown in Equation (18). \[\underset{\theta}{\text{argmin}}\frac{1}{|N|}\underset{z,x,y}{\text{E}}L(y,f( z,x;\theta)) \tag{18}\]  
where \(y\) represents the true value of similarity, \(\theta\) is a network parameter, and \(N\) represents the number of samples. The Siamese network single-object tracking algorithm incorporating multiple attention mechanisms and a background feature adaptive updating strategy was developed usingPython under the PyTorch framework. The hardware platform comprised a dual Intel(r) Xeon(r) E5-2696 CPU (Santa Clara, CA, USA) and an NVIDIA RTX3080 TI 16 G GPU (Santa Clara, CA, USA). The algorithm was trained on the GOT-10k dataset, and its performance was tested and verified using the object tracking benchmark datasets OTB and VOT, compared, and analyzed with other algorithms. The algorithm testing results are presented in Section 4. Training setup: The learning rate was adjusted using exponential decay; the learning rate was decayed from \(10^{-2}\) to \(10^{-5}\); the number of times the datasets were trained through the network was 50; the batch size was set to 16; the weight decay was set to \(5\times 10^{-4}\); the momentum was set to 0.9; and the window impact rate was set to 0.176.