代码重构方法、装置、设备及介质

By parsing request log files, the interface information of the target API is automatically filtered and extracted, and the refactored API implementation code is generated. This solves the problem of low code refactoring efficiency in existing technologies and achieves efficient automated code refactoring.

CN111722873BActive Publication Date: 2026-07-17TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2020-07-23
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

Existing technologies suffer from low code refactoring efficiency, requiring manual analysis of request log files to determine API interface parameters, which leads to inefficiency.

Method used

By parsing the request log file, the network requests initiated by the target API are automatically filtered out, the target interface information is extracted, and the refactored API implementation code is generated based on the second code structure, which is then processed automatically using computer equipment.

Benefits of technology

It simplifies the process of analyzing request log files, improves the efficiency of code refactoring, reduces manual intervention, and increases the automation of code refactoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111722873B_ABST
    Figure CN111722873B_ABST
Patent Text Reader

Abstract

本申请是关于一种代码重构方法、装置、设备及介质,涉及软件工程技术领域。该方法包括:获取请求记录文件,请求记录文件中包含至少一条网络请求;通过解析请求记录文件,筛选出请求记录文件中的目标网络请求,目标网络请求是通过调用目标API发起的网络请求,目标API对应的第一实现代码采用第一代码结构;从目标网络请求中提取目标API对应的目标接口信息;基于目标接口信息和第二代码结构生成目标API对应的第二实现代码,第二代码结构不同于所述第一代码结构。相比于人工分析请求记录文件,确定接口参数,本申请实施例可以自动化提取出目标API对应的目标接口信息,简化了分析请求记录文件的流程,进而提高了代码重构的效率。
Need to check novelty before this filing date? Find Prior Art