Problems exist in power grid data management that have unclear relationships, weak security and low accuracy. By analysing the knowledge graph construction characteristics of smart grid data information and knowledge extraction, the grid data management platform is reshaped architecturally, and the knowledge graph construction technology is embedded in the grid data management framework. For the aforementioned problems, the knowledge graph construction and Internet of Things optimisation framework of power grid data knowledge extraction are proposed in this article. Firstly, the semantic search (KGSS) algorithm based on the knowledge graph is used. The KGSS algorithm extracts knowledge from structured, semi-structured and unstructured grid data through the massively parallel processing acquisition model and Hadoop database, and constructs knowledge entities, attributes and inter-entity relationships. Then, it optimises and predicts through the knowledge graph construction and Internet of Things optimisation framework extracted from power grid data knowledge. Finally, the experimental results show that the accuracy rate of the KGSS algorithm is 92%. The experimental results also show that it provides new ideas and research directions for power grid data under big data in the future.