Research Article

A Near-Optimal Truthful Online Auction for Efficient Crowdsourced Data Trading with Dynamic Data Owners and Dynamic Data Requests

Algorithm 2

Trading price determination algorithm (for a selected bid).
Input: A selected bid , time slot that is selected (i.e.,), the set of all bids .
Output: The trading price of the data block that is associated to .
1 , ,
2 ; //Remove from the set of all bids.
3 whiledo
4  Remove expired bids (bids with ) from ;
5  Add newly active bids (bids with ) to ;
6  fortodo
7   Choose a bid from with the lowest bid price
8   ;
   /Find the highest bid price from all bids that are selected during    /
9   if and then
10     ;
11   end if
12  end for
13  ;
14 end while
15 return;