← USPTO Patent Applications

CODE GENERATION METHOD AND APPARATUS, STORAGE MEDIUM AND ELECTRONIC DEVICE

Application US20260099303A1 Kind: A1 Apr 09, 2026

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

G06F 8/35 G06N 3/04 G06N 3/08

Filing Date

2024-02-07

Application No.

19114774