Due to the different action modes of communication network attacks, it is difficult to guarantee the effect of defense technology in information loss control. Therefore, a quantum secure communication network attack defense method based on AES algorithm and time window is proposed. AES algorithm is introduced to group the original quantum secure communication data plaintext to obtain the corresponding data blocks. After multi-level conversion processing, the intermediate results generated by each conversion are taken as the state parameters, and data encryption is completed through byte substitution operation, row transformation operation, column mixing operation and round key transformation operation; When defending against quantum secure communication network attacks, the network state decision time window is established. From the perspective of the traffic status in the window, the attack status and location are analyzed and judged, and the dynamic adjustment of the traffic limit strategy is adopted for attack defense. In the test results, the communication packet loss rate is the lowest, basically stable within 3.0%, which has obvious advantages compared with the control group.