A system and method for automated code generation

By employing multimodal input, a pluggable template library, and deep semantic parsing, combined with code style and dependency checks, the system addresses the issues of understanding user intent and adaptability in traditional code generation systems, achieving efficient and intelligent code generation and optimization.

CN121387267BActive Publication Date: 2026-07-10BEIJING INTEGRATED CHINA SERVICE TECH SERVICE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING INTEGRATED CHINA SERVICE TECH SERVICE CO LTD
Filing Date
2025-10-22
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Traditional code generation systems suffer from problems such as inaccurate understanding of user intent, limited input methods, poor template adaptability, lack of validation mechanisms, and insufficient automation throughout the entire process.

Method used

By introducing multimodal input methods, pluggable template libraries, deep semantic parsing, code style and dependency checking tools, combined with modular design and feedback iteration mechanisms, we achieve user-friendliness, template library flexibility, code quality and full-process automation.

Benefits of technology

It improves user-friendliness and template selection accuracy, ensures the quality and maintainability of generated code, reduces developer debugging costs, and achieves full-process intelligence and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121387267B_ABST
    Figure CN121387267B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of code automatic generation, in particular to a system and method for automatic code generation, which comprises the following steps: a requirement analysis module receives user requirements through multi-modal input, and extracts formatted requirement information by using a BERT language model; a template selection module selects a code template from a plug-in template library; a parameter extraction module extracts and verifies key parameters by using a machine learning algorithm; a template filling module fills the parameters into the template and generates a code framework; a framework verification module verifies and corrects the code framework; a code generation module outputs the corrected code framework as a code file and integrates the code file into a development environment of a user project; and a feedback iteration module receives user feedback, analyzes and optimizes system performance. Through full-process automation and intelligent design, the application greatly improves the efficiency and accuracy of code generation, optimizes user operation experience, and can be widely applied to various programming languages and various development scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automatic code generation technology, and in particular to a system and method for automated code generation. Background Technology

[0002] In traditional code generation systems, users typically can only describe their code generation needs through text input, which has several limitations. First, the ambiguity and diversity of natural language make it difficult for the system to accurately understand the user's true intent. Second, the single text input method cannot meet the needs of different user groups (such as users who are not good at text description or have language barriers).

[0003] Most existing code generation systems use fixed template libraries. Updating and expanding the templates requires large-scale modifications to the entire system, making it difficult for the template library to quickly adapt to the emergence of new programming languages, functional modules, or code structures. In addition, traditional systems usually rely on simple keyword matching when selecting templates, which cannot fully consider the multi-dimensional characteristics of user needs, resulting in low accuracy and efficiency in template selection.

[0004] In traditional code generation systems, the generated code framework often lacks an effective verification mechanism, which may lead to problems such as syntax errors, inconsistent coding style, and unresolved dependencies. Furthermore, code verification usually relies on manual inspection or simple static analysis tools, which cannot achieve automated verification and correction. This not only affects the quality and maintainability of the code, but also increases the debugging costs for developers.

[0005] Traditional code generation systems typically lack end-to-end automation and effective collaborative mechanisms between modules, leading to poor information flow. The generated code framework fails to accurately reflect user needs, and traditional systems lack feedback mechanisms after code generation, making it difficult to meet users' ever-changing requirements. Summary of the Invention

[0006] This invention provides a system and method for automated code generation to solve the problems of inaccurate understanding of user intent, limited input methods, poor template adaptability, lack of verification mechanisms, and insufficient full-process automation in existing code generation systems.

[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0008] A system for automated code generation, comprising:

[0009] Requirements parsing module: Used to receive user-input code to generate requirements and extract formatted requirement information;

[0010] Template selection module: used to select a code template from a preset code template library based on the formatting requirements information;

[0011] Parameter extraction module: used to extract key parameters from the formatted requirement information;

[0012] Template filling module: used to fill the key parameters into the code template to generate a code framework;

[0013] Framework validation module: Used to check and correct the syntax and dependencies of the code framework to obtain the corrected code framework;

[0014] Code generation module: Used to output the corrected code framework as a code file;

[0015] Feedback and Iteration Module: This module receives user feedback on code files and iteratively optimizes the automated code generation system based on that feedback.

[0016] A method for automated code generation, applicable to the automated code generation system described above, includes the following steps:

[0017] Step S1: Receive the code generation requirements input by the user, perform formatting preprocessing and semantic analysis on the code generation requirements, and generate formatted requirement information;

[0018] Step S2: Based on the formatting requirement information, select the corresponding code template from the preset code template library;

[0019] Step S3: Extract key parameters from the formatted requirement information;

[0020] Step S4: Fill the key parameters into the selected code template to generate the code framework;

[0021] Step S5: Check and correct the syntax and dependencies of the code framework to obtain the corrected code framework;

[0022] Step S6: Output the revised code framework as a code file;

[0023] Step S7: Receive feedback information from the user regarding the code file. The feedback information is used to iteratively optimize the automated code generation system.

[0024] The beneficial effects of the technical solution provided by this invention include at least the following:

[0025] This invention introduces multimodal input methods, allowing users to generate code through voice, gestures, and text input, greatly enriching the ways users interact with the system and improving the system's user-friendliness. At the same time, it improves the accuracy and flexibility of requirement parsing through model-based deep semantic parsing methods, enabling the system to better understand users' complex needs and generate code that better meets user expectations.

[0026] The plug-in template library proposed in this invention allows users to extend or update the template library through plug-ins, enabling it to quickly adapt to new programming languages, functional modules, or code structures, greatly improving the flexibility and scalability of the template library. At the same time, the system uses keyword matching algorithms and fast retrieval algorithms to match user needs and templates from multiple dimensions, significantly improving the accuracy and efficiency of template selection and ensuring that the generated code framework is more in line with user needs.

[0027] This invention introduces code style checking and dependency checking tools to automatically verify and correct the syntax, style, and dependencies of the generated code framework, and generates detailed verification reports. This automated verification and correction mechanism not only improves code quality and maintainability but also reduces debugging costs for developers, enabling the generated code to be directly used in development practices.

[0028] This invention, through modular design, organically combines multiple stages such as requirement analysis, template selection, parameter extraction, template filling, framework verification, code generation, and feedback iteration to form an efficient, intelligent, and scalable code generation system. At the same time, the feedback iteration module dynamically optimizes the system, continuously improving system performance and user experience, and realizing a fully automated and intelligent system solution from user requirement input to code generation and system optimization. Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1 This is a system structure diagram provided in an embodiment of the present invention;

[0031] Figure 2 This is a flowchart of a method provided in an embodiment of the present invention. Detailed Implementation

[0032] The technical solutions in the embodiments of this application will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0033] In this document, the term "comprising" is intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0034] The first aspect of this embodiment discloses as follows: Figure 1 The system shown is an automated code generation system, which includes:

[0035] I. Requirements Parsing Module: Used to receive user-input code to generate requirements and extract formatted requirement information;

[0036] The requirements parsing module includes a user interface submodule, a preprocessing submodule, and a requirements parsing submodule;

[0037] The user interface submodule includes a speech recognition unit, a gesture recognition unit, and a graphical user interface. It supports users to input code generation requirements through three methods: voice, gesture, and text. The code generation requirements are in the form of natural language text.

[0038] The preprocessing submodule is used to format and preprocess the code generation requirements input by the user to obtain formatted text data, and to perform integrity and consistency checks on the formatted text data. The formatting preprocessing includes text conversion, text cleaning and text formatting.

[0039] The requirement parsing submodule is used to perform semantic parsing on formatted text data using a pre-trained BERT language model, extract and store formatted requirement information, which includes the target programming language, functional module descriptions, and constraints for code generation.

[0040] It should be noted that text conversion involves converting the user's voice input into natural language text using acoustic and language models, mapping the user's gesture input to corresponding text commands using gesture recognition technology, and directly obtaining the natural language text input by the user for text input.

[0041] Text cleaning: Remove redundant whitespace, line breaks, and other formatting symbols in the code generation requirements, as well as remove special symbols, emojis, and other non-text content in the text;

[0042] Text formatting: Uniformly convert the letters in the text to lowercase or uppercase, and convert the numbers, dates, and other information in the text to a unified format (for example, convert the date "2025-08-12" to "August 12, 2025" or "2025 / 08 / 12").

[0043] BERT (Bidirectional Encoder Representations from Transformers) is a pre-trained language model based on the Transformer architecture. It learns the general representation of language through unsupervised learning on a large-scale text corpus, enabling it to capture the context information and semantic relationships in the text and can be directly used for natural language processing tasks.

[0044] II. Template Selection Module: Used to select code templates from a preset code template library according to the formatting requirement information;

[0045] The template selection module includes three sub-modules: template library management, requirement matching, and template retrieval and adaptation;

[0046] The template library management sub-module is used to provide a pluggable template library. The pluggable template library is used to store code templates in multiple programming languages and supports users to expand or update it in the form of plugins. The code templates include functional modules or code structures;

[0047] The requirement matching sub-module receives the formatting requirement information, performs multi-dimensional matching of it with the templates in the template library through a keyword matching algorithm, and returns the matching result. The matching result includes the template with the highest matching degree and its related information;

[0048] The template retrieval and adaptation sub-module is used to retrieve the corresponding code template from the template library through a fast retrieval algorithm according to the matching result. If multiple code templates are retrieved, a template selection interface will be provided to the user.

[0049] It should be noted that the pluggable template library is a flexible code template storage and management mechanism. It supports storing and updating code templates in the form of plugins. This mechanism enables the template library to quickly adapt to the emergence of new programming languages, new functional modules, or new code structures. Users can add new code templates to the template library or update existing templates in the form of plugins without making large-scale modifications to the entire system.

[0050] Keyword matching algorithms are used to find specific keywords or combinations of keywords in text. They can match formatted requirements and code templates from multiple dimensions, including the target programming language, functional module description, and constraints for code generation. Using keyword matching algorithms, the requirement matching submodule can return the code template with the highest matching degree and its related information based on the keyword weight and matching degree.

[0051] The fast retrieval algorithm is a high-efficiency search algorithm used to quickly retrieve code templates that meet specific requirements from a template library. This algorithm can find the target code template from a large number of templates in a short time. When multiple suitable code templates are found, it returns all target code templates and provides a template selection interface for the user to choose from.

[0052] The template selection interface provides a user-friendly interactive environment, displaying detailed information for each template in the form of cards or lists, including template name, applicable language, feature description, and template code snippets.

[0053] III. Parameter Extraction Module: Used to select a code template from a preset code template library based on formatting requirements;

[0054] The parameter extraction module includes a parameter identification submodule, a parameter extraction submodule, and a parameter verification submodule;

[0055] The parameter recognition submodule is used to identify key parameters in formatted requirement information according to predefined rules. Key parameters include variable names, data types, function interfaces, and logical flow descriptions.

[0056] The parameter extraction submodule is used to extract key parameters from formatted requirement information using predefined regular expressions and to display the extracted key parameters to the user through a visual interface.

[0057] The parameter verification submodule is used to verify the completeness and rationality of key parameters using a regression algorithm based on support vector machines. If the verification fails, i.e. the key parameters are incomplete or unreasonable, an error message is sent to the user through a visual interface to guide the user to supplement or correct them. If the verification passes, the key parameters that have passed the verification are stored in the system database and memory and passed to the template filling module.

[0058] It should be noted that a variable name is a name used in programming languages ​​to identify variables. It is used to identify the location of data stored in the code and to express the purpose and meaning of the variable. Different programming languages ​​have different naming rules for variable names. For example, in Python, variable names can only contain letters, numbers, and underscores, and must start with a letter or underscore. They cannot start with a number (such as my_variable).

[0059] Data types are used in programming languages ​​to define the kinds of data that variables can store. Common data types include integer (int), floating-point (float), string (string), and boolean (bool).

[0060] A function interface is a specification in a programming language used to define the input parameters and return values ​​of a function. It describes the function's name, parameter types, number of parameters, and return type, enabling other code to call the function correctly.

[0061] The logic flow description is a description of the program logic in the code generation requirements. It includes the program's control flow, conditional judgments, and loop structures, which can help other developers better understand and maintain the operation of the code.

[0062] Regular expressions are a pattern description language used to match combinations of characters in a string. Predefined regular expression rules are regular expression patterns predefined according to specific needs and contexts, used to extract specific information from text. Examples of regular expressions are as follows:

[0063] Variable name: ;

[0064] Data type: ;

[0065] Function interface: ;

[0066] Conditional statements: .

[0067] Support Vector Machine (SVM) is a powerful machine learning algorithm, mainly used for classification and regression tasks. The regression algorithm (SVR) based on support vector machine is used to build a regression model to predict the target value. In the parameter validation submodule, it is used to verify whether the extracted key parameters are complete and reasonable.

[0068] IV. Template Filling Module: Used to fill key parameters into the code template and generate the code framework;

[0069] The template filling module includes a template loading submodule, a parameter mapping submodule, and a parameter filling submodule;

[0070] The template loading submodule is used to read the code template selected by the template selection module and load the code template into the system memory;

[0071] The parameter mapping submodule is used to analyze placeholders in code templates, establish a mapping relationship between key parameters and placeholders based on the name and type of key parameters, and dynamically adjust the parameter mapping logic in combination with the context information of the user's project;

[0072] The parameter filling submodule is used to fill key parameters into the placeholder positions in the code template according to the mapping relationship, and then format and integrate the data in the filled code template to generate a code framework.

[0073] It should be noted that placeholders are markers in the code template used to identify locations where content needs to be dynamically populated. They are typically special symbols or strings used to be replaced by actual parameter values ​​during code generation. Types of placeholders include:

[0074] Variable placeholders: used to replace variable names or variable values, for example, ${username};

[0075] Function placeholders: used to replace function names or function calls, for example, ${function_name}();

[0076] Logical placeholders: used to replace logical structures, such as ${if_condition}.

[0077] Mapping relationships refer to the correspondence established between key parameters and placeholders in the code template. This relationship defines how to populate the extracted key parameters into the corresponding positions in the code template (for example, if the placeholder in the code template is ${username} and the extracted key parameter is username, then a mapping relationship of username -> ${username} is established).

[0078] Mapping logic refers to the rules and logic followed when establishing mapping relationships. It defines how to dynamically adjust and optimize mapping relationships based on the names and types of key parameters, as well as the context information of the user project.

[0079] The context information of a user's project includes the target programming language, project structure, or existing variables and functions. For example, if the target programming language is Java, but the template is designed for Python, the parameter mapping needs to be adjusted to conform to Java syntax. If a variable with the same name has already been defined in the project, the parameter name needs to be adjusted to avoid conflicts.

[0080] V. Framework Validation Module: Used to check and correct the syntax and dependencies of the code framework, resulting in a corrected code framework;

[0081] The framework validation module includes a code style check submodule, a dependency check submodule, and a validation result summary submodule;

[0082] The code style check submodule is used to check the code framework according to predefined code style rules using the code style check tool ESLint, identify style errors and attempt to automatically correct them or provide correction suggestions. The predefined code style rules include indentation rules, naming conventions and comment formats.

[0083] The dependency inspection submodule is used to analyze the external libraries and modules referenced in the code framework, extract unresolved dependencies in the code framework, and provide users with automatic dependency management functions;

[0084] The validation result summary submodule is used to summarize the validation results of all submodules of the framework validation module, and generate a validation report and the corrected code framework. The validation results include syntax errors, code style errors and unresolved dependencies. The validation report is displayed to the user through a visual interface.

[0085] It should be noted that ESLint is an open-source, rule-based JavaScript code style checker that can automatically detect and fix syntax errors and style issues in code, and provide fix suggestions.

[0086] Indentation rules specify how and how much code should be indented. For example, using 4 spaces as the indentation unit;

[0087] Naming conventions refer to the naming methods for variable names, function names, and class names. Commonly used methods are camelCase or snake_case.

[0088] Comment formatting refers to the specification of the format and content of comments. For example, it may require adding a function description comment above the function, which includes information about the function's purpose, parameters, and return value.

[0089] Automatic dependency management can detect unresolved dependencies in a code framework and automatically install or update necessary external libraries and modules, reducing runtime errors caused by dependency version mismatches or missing components. This ensures the code runs correctly, allowing users to focus on implementing the code logic and reducing the time and effort spent manually managing dependencies. A specific implementation example is shown below:

[0090] By parsing the import or require statements in the code framework, analyzing the external libraries and modules they reference, extracting unresolved dependencies, and automatically detecting and installing missing external libraries and modules or automatically updating installed external libraries and modules to the latest versions based on the unresolved dependencies, these dependencies are managed using the npm dependency management tool.

[0091] VI. Code Generation Module: Used to output the corrected code framework as a code file;

[0092] The code generation module includes a code output submodule and a code integration submodule;

[0093] The code output submodule is used to output the corrected code framework as a code file, and allows users to customize the name and storage path of the code file;

[0094] The code integration submodule prompts the user whether to integrate the code files. If the user confirms that integration is required, the code files will be automatically imported into the user's project's integrated development environment. If the user chooses not to integrate, the import will not occur.

[0095] It should be noted that an Integrated Development Environment (IDE) is a comprehensive software application used for software development. It integrates multiple development tools into a unified user interface. IDEs provide various functions such as code editing, debugging, compilation, and testing to help developers complete software development tasks efficiently. Common IDEs include Visual Studio Code (VSCode), WebStorm, and PyCharm.

[0096] VII. Feedback and Iteration Module: This module receives user feedback on code files and iteratively optimizes the automated code generation system based on that feedback.

[0097] The feedback iteration module includes a feedback receiving submodule, a feedback analysis submodule, and a system optimization submodule;

[0098] The feedback receiving submodule is used to provide users with a feedback entry point through a visual interface and to receive user feedback.

[0099] The feedback analysis submodule is used to perform statistical analysis on feedback data using data analysis tools to obtain feedback analysis results, which include a list of user issues, user needs and suggestions, and user satisfaction trend charts.

[0100] The system optimization submodule is used to formulate optimization strategies based on feedback analysis results. Optimization strategies include fixing known errors, improving the operating logic of each module, and adding new functions. The system's modules are optimized according to the optimization strategies and tested and verified. After verification, the optimized system version is released.

[0101] It should be noted that a visual interface refers to a graphical representation of feedback analysis results (such as a list of user issues, suggestions for improvement, and satisfaction trend charts) to help users quickly understand the system's performance and areas for improvement. Through elements such as graphics, charts, and virtual buttons, it provides users with an intuitive way to interact, enabling them to easily input feedback information.

[0102] Data analytics tools are software tools used to collect, process, analyze, and visualize data. These tools help users extract valuable information from large amounts of data to support decision-making, and specifically include:

[0103] Use a database (such as MySQL) to store user feedback data, and store user feedback data in the database through form submission;

[0104] Use data processing tools (such as Pandas) to remove duplicate data, fill in missing values, and transform data formats;

[0105] Use statistical analysis tools (such as Python's SciPy library) to perform data analysis, calculate the distribution of user questions, the frequency of user needs and suggestions, and the average satisfaction level and trend curve.

[0106] Optimization strategies refer to a series of improvement measures formulated based on feedback analysis results, aimed at improving system performance and user experience, specifically including:

[0107] Fix known bugs: For example, if users report syntax errors in the code generation module, the development team can fix the relevant code;

[0108] Improve operational logic: For example, if users report that the code generation speed is slow, the development team can modify the code generation algorithm to improve the generation speed;

[0109] Adding new features: For example, if users suggest adding a code comment generation feature, the development team can develop a module with that feature and integrate it into the system.

[0110] The second aspect of this embodiment discloses as follows: Figure 2 The method shown is an automated code generation method applicable to the aforementioned automated code generation system. The method includes the following steps:

[0111] Step S1: Receive the code generation requirements input by the user, perform formatting preprocessing and semantic analysis on the code generation requirements, and generate formatted requirement information;

[0112] Step S2: Select the appropriate code template from the preset code template library according to the formatting requirements;

[0113] Step S3: Extract key parameters from the formatted requirements information;

[0114] Step S4: Fill the key parameters into the selected code template to generate the code framework;

[0115] Step S5: Check and correct the syntax and dependencies of the code framework to obtain the corrected code framework;

[0116] Step S6: Output the revised code framework as a code file;

[0117] Step S7: Receive user feedback on the code files. The feedback is used to iteratively optimize the automated code generation system.

[0118] Furthermore, it should be noted that the present invention can be provided as a method, apparatus, or computer program product. Therefore, embodiments of the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.

[0119] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0120] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing terminal equipment to cause a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0121] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0122] Finally, it should be noted that the above description represents a preferred embodiment of the present invention. It should be pointed out that although preferred embodiments have been described, those skilled in the art, once they understand the basic inventive concept of the present invention, can make various improvements and modifications without departing from the principles described herein. These improvements and modifications should also be considered within the scope of protection of the present invention. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present invention.

Claims

1. A system for automated code generation, characterized in that, include: Requirements parsing module: Used to receive user-input code to generate requirements and extract formatted requirement information; Template selection module: used to select a code template from a preset code template library based on the formatting requirements information; Parameter extraction module: used to extract key parameters from the formatted requirement information; Template filling module: used to fill the key parameters into the code template to generate a code framework; Framework validation module: Used to check and correct the syntax and dependencies of the code framework to obtain the corrected code framework; Code generation module: Used to output the corrected code framework as a code file; Feedback and Iteration Module: Used to receive user feedback on code files and iteratively optimize the automated code generation system based on the feedback. The requirement parsing module includes a user interface submodule, a preprocessing submodule, and a requirement parsing submodule. The user interface submodule includes a voice recognition unit, a gesture recognition unit, and a graphical user interface, which supports users to input code generation requirements through three methods: voice, gesture, and text. The code generation requirements are in the form of natural language text. The preprocessing submodule is used to perform formatted preprocessing on the code generation requirements input by the user to obtain formatted text data, and to perform integrity and consistency checks on the formatted text data. The formatted preprocessing includes text conversion, text cleaning and text formatting. The requirement parsing submodule is used to perform semantic parsing on the formatted text data using a pre-trained BERT language model, extract and store the formatting requirement information, which includes the target programming language, functional module description and code generation constraints. The template selection module includes a template library management submodule, a demand matching submodule, and a template retrieval and adaptation submodule. The template library management submodule is used to provide a pluggable template library, which stores code templates for multiple programming languages ​​and supports users to extend or update the pluggable template library through plug-ins. The code templates include functional modules or code structures. The requirement matching submodule is used to receive formatted requirement information, perform multi-dimensional matching between the formatted requirement information and templates in the template library using a keyword matching algorithm, and return the matching results, which include the template with the highest matching degree and its related information. The template retrieval and adaptation submodule is used to retrieve the corresponding code template from the template library based on the matching result using a retrieval algorithm. If multiple code templates are retrieved, a template selection interface is provided to the user. The framework verification module includes a code style checking submodule, a dependency checking submodule, and a verification result summarization submodule. The code style checking submodule is used to check the code framework according to predefined code style rules using the code style checking tool ESLint, identify style errors and attempt to automatically correct them or provide correction suggestions. The predefined code style rules include indentation rules, naming conventions and comment formats. The dependency checking submodule is used to analyze the external libraries and modules referenced in the code framework, extract unresolved dependencies in the code framework, and provide users with automatic dependency management functions. The verification result aggregation submodule is used to aggregate the verification results of all submodules of the framework verification module, and generate a verification report and a corrected code framework. The verification results include syntax errors, code style errors and unresolved dependencies. The verification report is displayed to the user through a visual interface.

2. The automated code generation system according to claim 1, characterized in that, The parameter extraction module includes a parameter identification submodule, a parameter extraction submodule, and a parameter verification submodule; The parameter identification submodule is used to identify key parameters in the formatted requirement information according to predefined rules. The key parameters include variable names, data types, function interfaces, and logical flow descriptions. The parameter extraction submodule is used to extract key parameters from the formatted requirement information using predefined regular expressions, and to display the extracted key parameters to the user through a visual interface. The parameter verification submodule is used to verify the completeness and rationality of the key parameters through a regression algorithm based on support vector machines. If the verification fails, that is, the key parameters are incomplete or unreasonable, an error message is sent to the user through a visual interface to guide the user to supplement or correct them. If the verification passes, the key parameters that have passed the verification are stored in the system database and memory and passed to the template filling module.

3. The automated code generation system according to claim 1, characterized in that, The template filling module includes a template loading submodule, a parameter mapping submodule, and a parameter filling submodule; The template loading submodule is used to read the code template selected by the template selection module and load the code template into the system memory; The parameter mapping submodule is used to analyze placeholders in the code template, establish a mapping relationship between key parameters and placeholders through the name and type of key parameters, and dynamically adjust the parameter mapping logic in combination with the context information of the user project; The parameter filling submodule is used to fill key parameters into the placeholder positions in the code template according to the mapping relationship, and to format and integrate the filled code template to generate a code framework.

4. The automated code generation system according to claim 1, characterized in that, The code generation module includes a code output submodule and a code integration submodule; The code output submodule is used to output the corrected code framework as a code file, and allows users to customize the name and storage path of the code file; The code integration submodule is used to ask the user whether to integrate the code file. If the user confirms that integration is required, the code file will be automatically imported into the user's project's integrated development environment. If the user chooses not to integrate, the import will not be performed.

5. The automated code generation system according to claim 1, characterized in that, The feedback iteration module includes a feedback receiving submodule, a feedback analysis submodule, and a system optimization submodule; The feedback receiving submodule is used to provide users with a feedback entry point through a visual interface and to receive user feedback. The feedback analysis submodule is used to perform statistical analysis on the feedback data using data analysis tools to obtain feedback analysis results, which include a list of user questions, user needs and suggestions, and a user satisfaction trend chart. The system optimization submodule is used to formulate optimization strategies based on feedback analysis results. The optimization strategies include fixing known errors, improving the operating logic of each module, and adding new functions. The system modules are optimized according to the optimization strategies and tested and verified. After verification, the optimized system version is released.

6. A method for automated code generation, applicable to the automated code generation system as described in any one of claims 1-5, characterized in that, The method includes the following steps: Step S1: Receive the code generation requirements input by the user, perform formatting preprocessing and semantic analysis on the code generation requirements, and generate formatted requirement information; Step S2: Based on the formatting requirement information, select the corresponding code template from the preset code template library; Step S3: Extract key parameters from the formatted requirement information; Step S4: Fill the key parameters into the selected code template to generate the code framework; Step S5: Check and correct the syntax and dependencies of the code framework to obtain the corrected code framework; Step S6: Output the revised code framework as a code file; Step S7: Receive feedback information from the user regarding the code file. The feedback information is used to iteratively optimize the automated code generation system.