# Hybrid Dual-Link Data Transmission Based on Internet of Vessels
## 3 Algorithm Design
### Spatial Crowdsourcing Task Allocation
#### 3.2.2 Bayesian Reputation-Based Crowdsourcing Task Allocation Algorithm
By combining the current behavioral performance with the initial user reputation, the current instantaneous reputation is calculated. The probability density function of the Beta distribution can be expressed using the Gamma function as  
\[P(x;\alpha,\beta)=\frac{x^{\alpha-1}(1-x)^{\beta-1}}{\frac{\Gamma(\alpha) \Gamma(\beta)}{\Gamma(\alpha+\beta)}} \tag{4}\]  
where \(0<x<1\), \(\alpha>0\), \(\beta>0\). When the reputation system is initialized without other prior information, the study uses a uniform distribution as the initial prior setting for the reputation system. This choice is based on its non-informative nature. Suppose that the underwater sensor node interacts with the ship \(r+s\) times, where \(r\) represents the number of successful tasks completed by the ship, and \(s\) represents the number of tasks not completed. \(x\) represents the next event. When the shape parameters \(\alpha=1\) and \(\beta=1\), the distribution becomes a uniform distribution. The prior reputation can be represented as \(Beta(1,1)\) in the model. Then, the posterior distribution of \(x\) can be expressed as  
\[P(x)=\frac{Bin(r+s,r)Beta(1,1)}{\alpha+\beta+1}=Beta(r+1,s+1) \tag{5}\]  
From the formula, it can be seen that the posterior distribution of \(x\) is still a Beta distribution. Therefore, the reputation \(R_{i}\) of ship user \(i\) in this time segment can be expressed as  
\[R_{i}=Beta(a_{i}+1,b_{i}+1) \tag{6}\]  
\(a_{i}\) represents the total number of successful tasks completed by ship \(i\) within the time segment, and \(b_{i}\) represents the total number of tasks not completed by ship \(i\) within the time segment. The credibility value \(R_{i}\) is inherently a probability function and recognizes its non-direct observability as a physical quantity. Therefore, a new method for quantifying credibility is proposed. The credibility metric \(D_{i}\) defined by the algorithm provides a quantitative evaluation of credibility, which is calculated based on the expected value of \(R_{i}\). Through mathematical derivation, the expression for the credibility metric \(D_{i}\) is given by  
\[D_{i}=\mathbb{E}[Beta(a_{i}+1,b_{i}+1)]=\frac{a_{i}+1}{a_{i}+b_{i}+2} \tag{7}\]After assigning the corresponding weights to the credibility values of the historical time segments, the direct credibility value \(C_{i}\) of ship \(i\) is given by the formula  
\[C_{i}=\sum_{j=1}^{n}w_{ji}D_{ji} \tag{8}\]  
where \(W_{ji}\) represents the credibility value weight of ship \(i\) in time segment \(j\), and \(D_{ji}\) represents the credibility value calculated in time segment \(j\). The weight calculation formula \(W_{ji}\) is as follows:  
\[W_{ji}=\frac{\beta\cdot e^{-\alpha\cdot t_{j}}}{\sum_{k=1}^{n}e^{-\alpha\cdot t _{k}}} \tag{9}\]  
Here, the exponential decay \(e^{-\alpha\cdot t_{j}}\) ensures that as time \(t_{j}\) increases, the weight gradually decreases, with \(\alpha\) representing the time decay coefficient. If \(\alpha\) is large, the weight decays more quickly, meaning that more recent data will have a greater weight. \(\beta\) can be used to adjust the importance of the credibility score for a particular time segment.