Due to the continuous expansion of sharing economy, the diversification of users and the heterogeneity of resources and needs on P2P platform are speeding up, which makes it difficult to match the supply and demand of P2P platform effectively. Therefore, how to achieve effective matching between service providers and customers in an increasingly complex market is a question worthy of study. In order to achieve more effective matching of heterogeneous resources and requirements, this paper focuses on P2P sharing accommodation platform, advances a theoretical framework of fair matching and builds a matching model which considering fairness. First, we analyze the transaction mode of P2P sharing accommodation platform, proposed the framework of fair matching based on preferences consistency and fairness of matching. Second, we build a matching model based on fair matching, to maximize the consistency of preference and minimize the difference between supply and demand, the fair matching framework deals with heterogeneous resources and needs by matching diversified preferences. Finally, the effectiveness and feasibility of the strategy are verified by example and sensitivity analysis. This strategy provides optimization ideas for the matching issue of P2P sharing accommodation.