Society is increasingly developing in terms of application of diverse information systems in all fields of science, industry, agriculture, economic and trade, finance, healthcare, ... which all promote security and safety. Key management has become a key security issue in the operation of wireless sensor networks today. This article studies key management solutions for wireless sensor networks from a clustering perspective. Through a brief analysis based on the relevant issues present in today's key management solutions, the application of hierarchical routing protocols is explained and then a sensor network key management solution is proposed. new wireless transformer. It is found that by using the clustering information as clustering in the base station to complete the key distribution, it can be included in the secure communication clustering between network nodes and can be applied on a large scale. Large scale for network security system of unlimited sensors.