Construction method and device of source code vulnerability detection model, equipment and storage medium
The invention provides a source code vulnerability detection model construction method and device, equipment and a storage medium, a code structure diagram is constructed, and the code structure diagram comprises nodes, side information, node types and side types; a meta-path graph is constructed ba...
Gespeichert in:
Hauptverfasser: | , , , , , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention provides a source code vulnerability detection model construction method and device, equipment and a storage medium, a code structure diagram is constructed, and the code structure diagram comprises nodes, side information, node types and side types; a meta-path graph is constructed based on the code structure graph, and meta-paths in the meta-path graph are used for representing heterogeneous relations from source nodes to target nodes connected by side information; and learning a heterogeneous relationship of each meta-path in the meta-path graph based on a meta-path attention mechanism, and learning a dependency relationship between nodes exceeding a preset distance based on a hierarchical attention mechanism, so that the graph neural network can learn grammatical structure information of codes, and the performance of code vulnerability detection is improved.
本公开提供了一种源代码漏洞检测模型的构建方法、装置、设备及存储介质,通过构建代码结构图,所述代码结构图包括节点、边信息、节点类型以及边类型;基于所述代码结构图构建元路径图,其中,所述元路径图中的元路径用于代表由边信息连接的源节点到目标节点的异构关系;基于元路径注意力机制 |
---|