A code detection method and device, a storage medium and an electronic device

By generating a syntax tree and constructing a hybrid dependency graph of data dependency graph and control flow graph, the false positive and false negative problems of policy code detection in existing technologies are solved, achieving efficient and accurate code risk detection and improving the reliability of code quality.

CN121579325BActive Publication Date: 2026-06-09CHONGQING ANT CONSUMER FINANCE CO LTD
2 Cites 0 Cited by

Patent Information

Application Number
CN202610041404.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-13
Publication Date
2026-06-09
Estimated Expiration
2046-01-13

AI Technical Summary

Technical Problem

In existing technologies, the detection of policy code relies on general code detection tools or simple rule matching methods, which are difficult to handle complex associations or logical relationships, leading to false positives or false negatives, long processing time, weak recognition capabilities, and inability to provide reliable quality assurance.

Method used

By generating a syntax tree, determining the data flow and control flow, constructing a data dependency graph and a control flow graph, merging them into a hybrid dependency graph, performing null value propagation, value domain conflict and redundant code detection, and generating a code risk detection report.

Benefits of technology

It improves the accuracy and efficiency of code detection, reduces false positives or false negatives, enhances the reliability of code quality assurance, and can efficiently locate risks caused by data flow and execution logic.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The specification discloses a code detection method and device, a storage medium and an electronic device, wherein the method comprises: acquiring a code to be detected, generating a syntax tree, determining a data flow and a control flow of the code to be detected based on the syntax tree, generating a data dependency graph based on the data flow, the data dependency graph comprising a plurality of nodes and data dependency edges corresponding to each node, generating a control flow graph based on the control flow, embedding the data dependency edges into the control flow graph, generating a hybrid dependency graph, performing code risk detection based on the hybrid dependency graph, and generating a code risk detection report.
Need to check novelty before this filing date? Find Prior Art