| CPC G06F 21/577 (2013.01) [G06F 2221/033 (2013.01)] | 20 Claims |

|
1. An explainable vulnerability detection method based on dual-view causal reasoning, comprising:
S1, obtaining code samples, wherein the code samples comprise a training sample and a sample to be detected, sequentially performing data augmentation, static analysis, code property graph construction and feature extraction on the training sample, and obtaining a training data set; and sequentially performing static analysis, code property graph construction and feature extraction on the sample to be detected, and obtaining a data set to be detected;
S2, processing the training data set through a hybrid contrastive learning method, and establishing a vulnerability detection model; and inputting the data set to be detected into the vulnerability detection model, and outputting a vulnerability code; and
S3, performing causal reasoning on the vulnerability code, and outputting a vulnerability detection explanation.
|