一种融合传统深度学习与LLM的API补全方法

By integrating traditional deep learning with LLM methods, and combining semantic analysis and inverted rank fusion algorithms, this approach addresses the shortcomings of existing API completion techniques in handling complex semantics and long-distance dependencies, achieving more efficient and accurate API recommendations.

CN121300847BActive Publication Date: 2026-07-17HUNAN UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUNAN UNIV OF SCI & TECH
Filing Date
2025-11-12
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

Existing API completion technologies perform poorly when dealing with complex semantic relationships and long-distance dependencies. Traditional deep learning methods struggle to understand the logical connections between API calls, and LLM suffers from the problem of generating irrelevant or incorrect "illusions," affecting developer trust.

Method used

This paper integrates traditional deep learning and LLM methods. It generates preliminary API candidates through deep learning models, combines semantic analysis and optimization screening with large language model LLM, and uses the inverted rank fusion algorithm to fuse the ranking results to generate the final API completion list.

Benefits of technology

It significantly improves the accuracy and reliability of API recommendations, provides more accurate and efficient API call support, and reduces the risk of LLM generating irrelevant APIs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121300847B_ABST
    Figure CN121300847B_ABST
Patent Text Reader

Abstract

本发明公开了一种融合传统深度学习与LLM的API补全方法,包括:获取源代码片段;利用深度学习模型对所述源代码片段进行处理,获取第一排序结果,其中,所述第一排序结果包括:预设数量待补全的API候选项和所述API候选项对应的概率分数;将待补全的API候选项嵌入至所述源代码片段的原始位置,获取包含API候选项及API候选项上下文信息的重构代码序列;基于所述重构代码序列,结合大语言模型LLM的预设提示词,对所述API候选项进行排序,获取第二排序结果;对所述第一排序结果和第二排序结果进行融合,获取API补全列表。本发明能够有效提升API推荐的质量,为开发者提供更加精准、高效的API调用支持。
Need to check novelty before this filing date? Find Prior Art