Model enhancement method, apparatus, device, storage medium, and computer program product

By constructing a structured directed acyclic graph and using contrastive learning training, large language models can efficiently capture the deep structured logic of complex programs, solving the problem of insufficient code semantic understanding and generation capabilities, and improving the processing accuracy and efficiency of large code models.

CN122450459APending Publication Date: 2026-07-24BEIJING HONGTENG INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING HONGTENG INTELLIGENT TECH CO LTD
Filing Date
2026-04-24
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

When dealing with complex and large programs, large language models are limited by the length of the context window, making it difficult to efficiently capture the deep structural design logic of the program, resulting in insufficient code semantic understanding and generation capabilities.

Method used

The abstract syntax tree of the code is extracted by the underlying virtual machine tool, a structured directed acyclic graph is constructed, positive and negative sample pairs are generated, and a large language model is trained by contrastive learning to obtain the structured semantic embedding of the code. This is used as input to enhance the training of the large language model of the code and optimize it to adapt to the architecture of different downstream tasks.

Benefits of technology

It breaks through the limitations of context windows in processing large and complex programs, improves the processing accuracy and efficiency of large code models, achieves accurate learning of deep control flow and data flow logic of programs, and enhances code understanding and generation capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122450459A_ABST
    Figure CN122450459A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of code analysis, and discloses a model enhancement method, device, equipment, storage medium and computer program product, the method comprising the following steps: traversing a target code folder through a bottom-layer virtual machine tool, extracting an abstract syntax tree corresponding to each code, constructing a structured directed acyclic graph based on the abstract syntax tree corresponding to each code, generating a positive-negative sample pair based on the structured directed acyclic graph, training a preset large language model through contrastive learning based on the positive-negative sample pair, obtaining code structured semantic embedding output by the trained large language model, taking the structured semantic embedding as input of a code large language model, and performing enhancement training on the code large language model, so that the processing limit of a context window on a large and complex program is broken through, and the processing precision and efficiency of the code large model are improved.
Need to check novelty before this filing date? Find Prior Art