Quantum secure direct communication provides a direct means of conveying secret information via quantum states among legitimate users. The past two decades have witnessed its great strides both theoretically and experimentally. However, the security analysis of it still stays in its infant. Some practical problems in this field to be solved urgently, such as detector efficiency mismatch, side-channel effect and source imperfection, are propelling the birth of a more impeccable solution. In this paper, we establish a new framework of the security analysis driven by numerics where all the practical problems may be taken into account naturally. We apply this framework to several variations of the DL04 protocol considering real-world experimental conditions. Also, we propose two optimizing methods to process the numerical part of the framework so as to meet different requirements in practice. With these properties considered, we predict the robust framework would open up a broad avenue of the development in the field.