CODE GENERATION METHOD AND APPARATUS, STORAGE MEDIUM AND ELECTRONIC DEVICE
Inventors
Luping Liu, Qinyun Wu, Ping Yang, Landong Lin, Jie Liu, Huan Song
Abstract
The present disclosure relates to a code generation method and apparatus, a storage medium, and an electronic device, to improve the accuracy of automatically generated code. The method includes: acquiring target text, where the target text includes program code text to be supplemented or natural language text for describing a code function; and inputting the target text into a code generation model to obtain a target program code generated based on the target text, where the code generation model is obtained by training a code understanding task and a code generation task, the code understanding task is used for the code generation model to learn a syntax feature and a semantic feature of a sample program code, and the code generation task is used for the code generation model to learn a process of generating a new program code based on the sample program code.
CPC Classifications
Filing Date
2024-02-07
Application No.
19114774