To solve the problem of insufficient recognition of key nodes in the existing software defect detection process, this paper proposes a key node recognition algorithm based on node expansion degree and improved K-shell position, shortened as SDD_KNR. Firstly, the calculation formula of node expansion degree is designed to improve the degree that can measure the local defect propagation capability of nodes in the software network. Secondly, the concept of improved K-shell position of node is proposed to obtain the improved K-shell position of each node. Finally, the measurement of node defect propagation capability is defined, and the key node recognition algorithm is designed to identify the key function nodes with large defect impact range in the process of software defect detection. Using real software systems such as Nano, Cflow and Tar to design three sets of experiments. The corresponding directed weighted software function invoke networks are built to simulate intentional attack and defect source infection. The proposed SDD_KNR algorithm is compared with the BC algorithm, K-shell algorithm, KNMWSG algorithm and NMNC algorithm. The changing trend of network efficiency and the strength of node propagation force are analyzed to verify the effectiveness of the proposed SDD_KNR algorithm.