In the realm of the development of a Smart City Library, the integration of robust edge computing is vital. The research suggests a novel task-scheduling model for edge computing, leveraging user’s social relationships. Analyzing these connections involves constructing a user’s social relationship graph by implementing mathematical convolution and the Jaccard similarity ratio. This precise quantification of social ties ensures secure and reliable task scheduling. An equipment connection graph of a user equipment service is also crafted based on Euclidean distance, aligning task scheduling with device-to-device (D2D) communication conditions. Combining a user’s social relationship graph and a user’s device-service device connection graph creates a task-device bipartite graph. On the other hand, the calculation of a task execution cost and edge weight determination finalize a scheduling model. Implementing the proposed method for constructing a model for edge computing task scheduling based on utilizing the Kuhn–Munkres (KM) algorithm demonstrates positive impacts, which are few delays and less energy consumption, on edge computing task scheduling. For instance, when the social threshold score changes from 02. To 0.6, the total task execution delay time increases from 23 to 32, which is the best when compared with other algorithms. The approach strengthens security and reliability while decreasing task execution delays and energy consumption. This research advances edge computing for Smart City Libraries, promising transformative implications.