With the growth of power demand, software development in the power industry is becoming increasingly important, but the network security problem is severe. Based on the basic principles of quantum mechanics and quantum key distribution protocol, this paper proposes a quantum key adaptive immune distribution strategy based on SDN, which is comprehensively tested and simulated to verify in the laboratory and current network environment. The experimental results show that under the condition of 15dB line loss, the key formation rate of QKD device reaches 107.014kbps, which is much higher than the standard requirement of 1kbps; in the test of overhead fiber, the cumulative loss of the quantum optical channel after adding the dispersion compensation module is only 12.02dB, which is 23.3% lower than that of the synchronous optical channel of 15.67dB. Simulation analysis shows that under the condition of service intensity of 600k and k=4, the key resource utilization of SDN-based quantum key adaptive immune distribution strategy reaches 0.536, which is about 9% higher than the classical key distribution strategy. The study shows that quantum encryption technology can effectively overcome the limitations of traditional encryption methods, provide unconditional security for software development in the power industry, with strong anti-interference ability, flexible key management and other characteristics, which can significantly improve the network security protection ability of the power system, and provide a new way of thinking for the construction of network security barriers for the security detection tools of software development in the power industry.