The invention provides a code repair
verification,
knowledge base construction and
active defense method and related device.According to the scheme, a first code is subjected to dependency analysis, and a related code method, a related application program interface and a related
data entity which have dependency relations with the first code are obtained from three aspects; according to the method, accurate and comprehensive dependency analysis is realized, the three-dimensional influence matrix is constructed on the basis, the target
test case related to the first code can be accurately selected according to the three-dimensional influence matrix to perform code testing, original full-amount testing is replaced with an accurate testing mode, computing
resource consumption during testing is effectively reduced, and the testing efficiency is improved. And the
verification time is shortened. Meanwhile, by means of an active knowledge packaging mode, the
reuse rate of knowledge and the updating speed of the
knowledge base can be effectively increased, similar defects can be actively checked when developers submit codes,
active defense is achieved, and repeated occurrence of the similar defects is effectively avoided.