Code dependency analysis method and system based on abstract syntax tree
By constructing a multi-dimensional dependency graph through a code dependency analysis method based on abstract syntax trees, the problems of time-consuming and security risks in existing technologies are solved, achieving efficient and accurate code dependency analysis and adapting to the rapid analysis needs of large-scale business projects.
CN122411985APending Publication Date: 2026-07-17BEIJING ZHONGSHURUIZHI TECH CO LTD
View PDF 0 Cites 0 Cited by
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-20
- Publication Date
- 2026-07-17
Smart Images

Figure CN122411985A_ABST
Abstract
本发明公开了一种基于抽象语法树的代码依赖分析方法及系统,通过针对现有代码依赖分析需全量扫描控制流与数据流、执行业务代码存在安全风险、依赖提取效率低的问题,通过预设装饰器对绑定本体模型的业务函数进行标记,录入三类依赖声明并封装为不可变元数据附加至对应函数,不修改业务函数原始代码与执行逻辑;通过AST模块静态解析标记源文件,仅遍历函数定义节点提取依赖声明,得到完整依赖信息;基于依赖信息构建五组关联查询索引,根据用户查询请求匹配对应索引完成检索,无需全量扫描与业务代码执行,保障代码安全,大幅提升依赖分析与查询效率。
Need to check novelty before this filing date? Find Prior Art