Device-to-Device(D2D) communication leverages the local computing and caching capabilities of the edge network to meet the demand for low-latency, energy-efficient content sharing among future mobile network users. The performance improvement of content sharing efficiency in edge networks not only depends on user social relationships, but also heavily relies on the characteristics of end devices, such as computation, storage, and residual energy resources. Therefore, a D2D content sharing mechanism was proposed to maximize energy efficiency with multidimensional association features of user-device-content, which took into account device heterogeneity, user sociality, and interest difference. Firstly, the multi-objective constraint problem about the user cost-benefit maximization was transformed into the optimal node selection and power control problem. And the multi-dimensional knowledge association features and the graph model for user-device-content were constructed by processing structurally multi-dimensional features related to devices, such as computing resources and storage resources. Then, the willingness measurement methods of users on device attributes and social attributes were studied, and a sharing willingness measurement method was proposed based on user socialization and device graphs. Finally, according to user sharing willingness, a D2D collaboration cluster oriented to content sharing was constructed, and a power control algorithm based on shared willingness for energy efficiency was designed to maximize the performance of network sharing. The experimental results on a real user device dataset and infocom06 dataset show that, compared to nearest selection algorithm and a selection algorithm without considering device willingness, the proposed power control algorithm based on shared willingness improves the system sum rate by about 97.2% and 11.1%, increases the user satisfaction by about 72.7% and 4.3%, and improves the energy efficiency by about 57.8% and 9.7%, respectively. This verifies the effectiveness of the proposed algorithm in terms of transmission rate, energy efficiency and user satisfaction.