Abstract:With the wide application of peer-to-peer (P2P) technologies in many fields such as E-commerce, it is increasingly necessary to do aggregation queries in P2P networks. However, due to the large scale and decentralization of P2P networks it is rather difficult to do this kind of operation. Aggregation queries will become even more difficult in case that the data in P2P networks are time-varying which is often occurs in practice. The existing aggregation methods for data in P2P networks all assume that the data are time-invariant. If these methods are directly applied to P2P networks with time-varying data, some problems will arise because the data used in aggregation processing would have changed owing to the long time of aggregation. So, this paper proposes an approximate aggregation method for time-varying data in P2P networks based on uniform sampling. The theoretical analysis and experimental results show that this aggregation method outperforms the existing methods and can effectively be applied to P2P networks with time-varying data.