# Efficient Mobile Vehicle Data Sharing Scheme Based on Consortium Blockchain
## 4 Problem Formulation and Solving
### Stackelberg Game Scheme Modeling  
When the data buyer \(b_{i}\) has a demand for mobile vehicle data, the buyer releases the request \(\text{Re}q\big{\{}VID_{i},\text{ }Cert_{i},\text{ }time,\text{ }p_{avg}\big{\}}\) for \(RSU_{i}\) numbered \(j\), through the analysis above. \(p_{avg}\) denotes the average price of \(b_{i}\) buyer's previous transactions with other sellers, considering that the transaction in this market is completely transparent, so the buyer can not tender fictitious \(p_{avg}\). After \(RSU_{i}\) sending the request to the mobile vehicle within its communication range \(R^{RSU}\), when the number \(k\) of the mobile vehicle \(s_{k}\) (the data seller) has made a sharing decision, it will be answered \(Ans\big{\{}VID_{k}\), _sign_, _time_, \(D_{k}\big{\}}\) for \(RSU_{i}\), where \(D_{k}\) denotes the number of resources that the seller's mobile vehicle \(s_{k}\) needs to provide. Through an analysis of previous works [12; 17; 18], \(D_{k}\) can be determined via \(s_{k}\). The maximum amount of data, \(D_{k}\) can be related to the buyer's bid directly, and it can also be restricted by the CPU performance, the remaining electrical energy and other factors of \(s_{k}\). We measure the inconvenience of sharing by the inconvenience parameter \(\alpha_{k}\) to the  
Figure 3: Block generation and link flow chart. vehicle. Based on the Stackelberg game method deployed by the smart contract DSSC in \(RSU_{j}\), it determines the number of resources that the seller \(s_{k}\) needs to provide, and the unit data price that the buyer \(b_{i}\) should actually pay. Then, it completes the derivation of the game process. Here, we use \(p_{i}\) to indicate the unit data price that seller entity \(b_{i}\) should pay. Then, to help the seller \(s_{k}\) determine the utility criteria, it should involve the following attributes of the problem:  
The higher the \(p_{i}\) value, the utility of the seller becomes higher, which means more substantial return. In addition, the higher the value of the inconvenience parameter \(\alpha_{k}\), the lower the utility of the seller. The utility function \(U_{s_{k}}\) of the seller's vehicle \(s_{k}\) is the concave function of \(d_{k}\). First, if \(d_{k}\) is higher than a certain value, the utility function \(U_{s_{k}}\) is a non-decreasing function of \(d_{k}\), because the larger the shared resource \(d_{k}\), the higher the return that the seller can obtain. However, if the \(d_{k}\) value is too high, the utility of the seller is reduced, because its resources are limited, and it is difficult to guarantee the quality of service, such as accelerating the loss of power and CPU performance. To present the concaveness of the utility function, we set the function extreme value point to be \(\frac{p_{i}D_{k}}{2\alpha_{k}}\); these two parameters \(p_{i}\) and \(D_{k}\) are positive correlations, but the relationship between the inconvenience parameter \(\alpha_{k}\) is a negative correlation. Based on the above analysis, we determine the seller's utility function of \(s_{k}\) as:  
\[U_{s_{k}}(d_{k})=p_{i}D_{k}d_{k}-\alpha_{k}{d_{k}}^{2} \tag{1}\]  
Obviously, the above Equation (1) is a concave function with \(d_{k}\). There is a maximum point of value \(\frac{p_{i}D_{k}}{2\alpha_{k}}\), which can meet the setting conditions. Next, we analyze the utility function for the buyer \(b_{i}\). The benefit that \(b_{i}\) can obtain the bid of the unit resource, that is, in the utility function of \(b_{i}\), the buyer bid is the independent variable. To effectively reduce the cost of task execution, buyers \(b_{i}\) want to reduce the price of data. However, if the price for sellers is low enough to be unattractive, it is will be difficult to achieve good performance gains.