A visual intelligent programming method based on large language model
By collecting user natural language description and context information in the intelligent programming system, using large language models to generate a preliminary code framework, and optimizing through comprehensive evaluation index and user feedback, the problems of insufficient code generation and low quality in the existing technology are solved, and an efficient and usable intelligent programming experience is achieved.
Patent Information
- Application Number
- CN202411523222.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-10-30
AI Technical Summary
Existing visual intelligent programming methods based on large language models are problematic inadequate code generation, low quality and imperfect feedback mechanisms caused by user expression ambiguity and model limitations.
Natural language description and context information are collected through the user visual interface, and semantic analysis is performed using a large language model, a preliminary code framework is generated, and the comprehensive evaluation index Etotal is calculated. Code generation and iterative optimization are carried out based on the evaluation plan and user feedback.
It realizes the entire process from natural language description to high-quality code, improves programming efficiency and code availability, and continuously optimizes code generation through dynamic feedback mechanisms, improving user satisfaction and system adaptability.
Smart Images

Figure CN119045806B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent programming technology, and in particular to a visual intelligent programming method based on a large language model. Background Art
[0002] Programming, as the core of computer science, was initially characterized by complex lines of code and grammatical structures, requiring developers to have a solid technical foundation. With the advancement of technology, traditional programming has gradually evolved into visual programming, where users can design and implement functions through a graphical interface, lowering the threshold for programming. Today, the visual intelligent programming method based on a large language model combines the powerful capabilities of natural language processing, allowing users to describe their needs in natural language, and the system can automatically generate code, thereby achieving a more efficient and intuitive programming experience.
[0003] Although the visual intelligent programming method based on large language models has significant advantages in improving programming efficiency and usability, it still has some shortcomings. First, when users input natural language, they may not be able to accurately express their needs, resulting in the generated code failing to meet the actual functions. In addition, the quality and readability of the generated code often depend on the model's ability to understand. If the model fails to correctly parse the user's intent, it may lead to inefficient or lengthy code structures. Furthermore, the existing systems are often not perfect in the design of feedback mechanisms, and lack effective user interaction and iterative optimization processes.
[0004] The above shortcomings are mainly due to the ambiguity of user expressions and the limitations of large language models in specific situations. When users fail to clearly express their needs, the generated code may not achieve the expected functions, which in turn affects the project progress and development efficiency. More seriously, if user feedback is not processed in a timely manner, it may cause the system to generate low-quality code for a long time, affecting user trust and user experience. In this way, not only development resources are wasted, but also users' acceptance of intelligent programming tools may be reduced, limiting their promotion and application in a wider range of application scenarios. Summary of the invention
[0005] In view of the deficiencies in the prior art, the present invention provides a visual intelligent programming method based on a large language model, which solves the problems mentioned in the background technology.
[0006] The following steps are involved:
[0007] S1: Collect the natural language description and related context information input by the user through the user visualization interface, and record the key parameters in the generation process at the same time;
[0008] S2: Preprocess the natural language description of the user input, use the large language model to perform semantic analysis on the user input to extract key information and generate a preliminary code framework, and calculate the comprehensive evaluation index E total ;
[0009] S3: Based on the analysis results, the corresponding programming elements are called from the knowledge base to generate corresponding code snippets;
[0010] S4: The comprehensive evaluation index E total Compare with the preset threshold A to obtain an evaluation plan to determine whether the generated code quality and user satisfaction meet the project requirements;
[0011] S5: Present the generated code and evaluation scheme to the user in a visual form to facilitate user understanding and operation;
[0012] S6: Provide a feedback interface that allows users to rate and comment on the generated code and evaluation scheme. Users can point out the advantages and disadvantages of the code and provide suggestions for improvement. Iterative optimization is performed based on user feedback and the quality of the generated code.
[0013] Preferably, an interactive user interface is created for the user to input its natural language description and related context information. When the user submits the input, the system records the relevant generation parameters in real time, including the number of successfully generated codes N. success , readability score C readability , Efficiency score C efficiency and complexity score C complexity ;
[0014] The natural language description input by the user is used to describe the function or logic that he wants to implement, and the relevant context information includes project background, target users and usage environment.
[0015] Preferably, the natural language description input by the user is cleaned to remove invalid symbols, stop words and other noises, and the pre-processed user input is deeply analyzed using a large language model to extract key information, including variables, functions, control structures and logical relationships, generate a preliminary code framework, and calculate the comprehensive evaluation index E. total , generation effect coefficient E gen , Feedback influence coefficient F impact and code quality factor Q code ;
[0016] The comprehensive evaluation index E total Calculated by the following formula:
[0017] ;
[0018] In the formula, Etotal Indicates comprehensive evaluation index, E gen represents the generation effect coefficient, F impact Denotes the feedback influence coefficient, Q code represents the code quality coefficient, Respectively represent the generation effect coefficient E gen , Feedback influence coefficient F impact and code quality factor Q code The weight coefficient of .
[0019] Preferably, the generation effect coefficient E gen Calculated by the following formula:
[0020] ;
[0021] Where N success Indicates the number of successfully generated codes, N total Indicates the total number of generated requests.
[0022] Preferably, the feedback influence coefficient F impact Calculated by the following formula:
[0023] ;
[0024] In the formula, R i is the user's rating of the i-th feedback, W i is the weight of the feedback, and n represents the total number of feedback items.
[0025] Preferably, the code quality coefficient Q code Calculated by the following formula:
[0026] ;
[0027] In the formula, C readability Indicates the readability score, C efficiency represents the efficiency score, C complexity Represents the complexity score.
[0028] Preferably, based on the context information and requirements input by the user, the system automatically identifies the required programming language and configures the corresponding programming environment, including a compiler, an interpreter, and a knowledge base;
[0029] The system retrieves programming elements that match the analysis results from the built-in programming knowledge base. A knowledge base containing commonly used programming elements is pre-built, including library functions, APIs, modules, and code templates. Based on the key information extracted from the analysis results, the system retrieves matching programming elements from the knowledge base.
[0030] Combine the retrieved programming elements with the preliminary code framework to generate complete code snippets. After the code generation is completed, use static analysis tools to check the quality of the generated code, including syntax errors, potential logical problems, and security risks. The system records the number N of successfully generated codes success 。
[0031] Preferably, the system will comprehensively evaluate the index E total and compare it with the preset threshold A to determine whether the quality of the generated code and user satisfaction meet the project requirements;
[0032] The system sets the preset threshold A according to industry standards, project requirements, or historical data, and compares the calculated E total with the preset threshold A to judge the result:
[0033] If E total ≥A, it means that the quality of the generated code and user satisfaction meet the standards. The system marks the code snippet as "qualified" and records it in the project document;
[0034] If E total <A, it means that the generated code fails to meet the quality standards. The system marks it as "needs optimization" and enters the feedback collection and regeneration process for adjustment.
[0035] Preferably, format and display the generated code snippets according to the rules of syntax highlighting, including variables, functions, control structures, and comments. Different elements are displayed in different colors to enhance readability and enable clear identification of the functions and structures of each code element;
[0036] In the visual interface, provide a tree structure view to display the hierarchical relationship of the code. Users can view the content by expanding or collapsing nodes, which is convenient for quickly understanding the overall logic of the code. Add tooltips to key code elements. When the user hovers the mouse over an element, a description box pops up, introducing in detail the function and purpose of the element, including the comprehensive evaluation index E total 、the preset threshold A, and the comparison result, which are identified with different colors (e.g., green indicates compliance, red indicates non-compliance, highlighting the result;
[0037] While displaying the generated code, provide an editor interface where users can directly modify the generated code in this interface, allowing users to adjust the code content according to their needs and update the comprehensive evaluation index E total in the evaluation scheme at any time, and automatically feedback the new evaluation result to the user.
[0038] Preferably, a feedback entry is set in a prominent position on the visual interface, and a user feedback form is designed, including a 1-5 star rating system and a comment input box, allowing users to provide detailed feedback on the code and evaluation plan, and providing example instructions to guide users on how to fill in the feedback form;
[0039] The system records the feedback data submitted by users in real time, including ratings, comments and timestamps, and stores them in the database. It structures the collected feedback data, including standardizing the ratings, using data analysis tools to process the collected user feedback, identifying common problems and specific improvement suggestions of users, and generating feedback analysis reports based on the analysis results, including the distribution of user ratings, major negative feedback and improvement suggestions;
[0040] According to the feedback analysis results, the parameters of the code generation algorithm are dynamically adjusted. After each code generation, a new optimization strategy is implemented and the comprehensive evaluation index E is recalculated. total , regularly provide users with feedback on system improvements through a visual interface or email.
[0041] The present invention provides a visual intelligent programming method based on a large language model, which has the following beneficial effects:
[0042] (1) When the system is running, the natural language description and related context information of the user input are collected through the user visualization interface, and the key parameters in the generation process are recorded at the same time. The natural language description of the user input is preprocessed, and the user input is semantically analyzed using a large language model to extract key information and generate a preliminary code framework, and the comprehensive evaluation index E is calculated. total , the comprehensive evaluation index E total The code is compared with the preset threshold A to obtain the evaluation plan, and the generated code and the evaluation plan are presented to the user in a visual form. A feedback interface is provided to allow the user to rate and comment on the generated code and the evaluation plan. The user can point out the advantages and disadvantages of the code and make suggestions for improvement, and iterative optimization is performed based on user feedback and the quality of the generated code.
[0043] (2) The visual intelligent programming method based on the large language model successfully completed the whole process from user input of natural language description to generation of high-quality code through a user-friendly interface and intelligent analysis process. This method extracts key requirements and generates a preliminary code framework through natural language processing and deep analysis, providing users with a fast and efficient programming method. By calculating the comprehensive evaluation index Etotal, the system can evaluate the quality of the code and user satisfaction in real time to ensure that the generated results meet the project requirements, thereby improving programming efficiency and code usability.
[0044] (3) Compared with traditional programming techniques, this intelligent programming method has made significant improvements in the intelligence and automation of code generation. By building a knowledge base containing a variety of programming elements, the system can automatically select the most suitable programming language and environment based on user input, further improving the speed and accuracy of code generation. In addition, through a real-time feedback mechanism, user suggestions and ratings can directly affect the subsequent generation process, allowing the system to continuously optimize its own generation algorithm, improving user participation and satisfaction.
[0045] (4) This intelligent programming method based on a large language model not only improves the programming efficiency of individual users, but also brings new possibilities to the entire software development industry. Through system feedback and dynamic adjustment, the quality of the generated code and user experience are continuously improved, thereby reducing the error rate and maintenance costs in software development. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 The present invention is a schematic diagram of the steps of a visual intelligent programming method based on a large language model. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] Example 1
[0049] The present invention provides a visual intelligent programming method based on a large language model. Figure 1 , including the following steps:
[0050] S1: Collect the natural language description and related context information input by the user through the user visualization interface, and record the key parameters in the generation process at the same time;
[0051] S2: Preprocess the natural language description of the user input, use the large language model to perform semantic analysis on the user input to extract key information and generate a preliminary code framework, and calculate the comprehensive evaluation index E total ;
[0052] S3: Based on the analysis results, the corresponding programming elements are called from the knowledge base to generate corresponding code snippets;
[0053] S4: The comprehensive evaluation index E totalCompare with the preset threshold A to obtain an evaluation plan to determine whether the generated code quality and user satisfaction meet the project requirements;
[0054] S5: Present the generated code and evaluation scheme to the user in a visual form to facilitate user understanding and operation;
[0055] S6: Provide a feedback interface that allows users to rate and comment on the generated code and evaluation scheme. Users can point out the advantages and disadvantages of the code and provide suggestions for improvement. Iterative optimization is performed based on user feedback and the quality of the generated code.
[0056] In this embodiment, the natural language description and related context information input by the user are collected through the user visualization interface, and the key parameters in the generation process are recorded at the same time. The natural language description input by the user is preprocessed, and the user input is semantically analyzed using a large language model to extract key information and generate a preliminary code framework, and the comprehensive evaluation index E is calculated. total According to the analysis results, the corresponding programming elements are called from the knowledge base, the corresponding code snippets are generated, and the comprehensive evaluation index E total Compare with the preset threshold A to obtain an evaluation plan to determine whether the generated code quality and user satisfaction meet the project requirements. Present the generated code and evaluation plan to the user in a visual form for easy understanding and operation. Provide a feedback interface to allow users to rate and comment on the generated code and evaluation plan. Users can point out the advantages and disadvantages of the code and suggestions for improvement. Iterative optimization is performed based on user feedback and the quality of the generated code.
[0057] Example 2
[0058] This embodiment is explained in Example 1, please refer to Figure 1 Specifically: Create an interactive user interface for users to enter their natural language descriptions and related context information. When the user submits the input, the system records the relevant generation parameters in real time, including the number of successfully generated codes N success , readability score C readability , Efficiency score C efficiency and complexity score C complexity ;
[0059] The number of successfully generated codes N success : Every time the system successfully generates and displays a piece of code, the count is automatically increased;
[0060] Readability score C readability : After the code is generated, the system uses static code analysis tools to analyze the generated code to evaluate its readability and obtain a corresponding score;
[0061] Efficiency score C efficiency : Use performance analysis tools to evaluate the running efficiency of the generated code, calculate its time complexity and space complexity, and obtain an efficiency score;
[0062] Complexity score C complexity :Based on the control structure and function call depth of the code, complexity measurement tools (such as cyclomatic complexity) are used to evaluate the complexity of the generated code and obtain a complexity score;
[0063] The natural language description input by the user is used to describe the function or logic that he wants to implement, and the relevant context information includes project background, target users and usage environment.
[0064] Perform text cleaning on the natural language description of user input, remove invalid symbols, stop words and other noise, use the large language model to deeply analyze the pre-processed user input, extract key information, including variables, functions, control structures and logical relationships, generate a preliminary code framework, and calculate the comprehensive evaluation index E total , generation effect coefficient E gen , Feedback influence coefficient F impact and code quality factor Q code ;
[0065] The comprehensive evaluation index E total Calculated by the following formula:
[0066] ;
[0067] In the formula, E total Indicates comprehensive evaluation index, E gen represents the generation effect coefficient, F impact Denotes the feedback influence coefficient, Q code represents the code quality coefficient, Respectively represent the generation effect coefficient E gen , Feedback influence coefficient F impact and code quality factor Q code The weight coefficient of .
[0068] The generation effect coefficient E gen Calculated by the following formula:
[0069] ;
[0070] Where N success Indicates the number of successfully generated codes, N total Indicates the total number of generated requests.
[0071] The feedback influence coefficient F impact Calculated by the following formula:
[0072] ;
[0073] In the formula, R i is the user's rating of the i-th feedback, W i is the weight of the feedback, and n represents the total number of feedback items.
[0074] The code quality factor Q code Calculated by the following formula:
[0075] ;
[0076] In the formula, C readability Indicates the readability score, C efficiency represents the efficiency score, C complexity Represents the complexity score.
[0077] In this embodiment, by creating an interactive user interface, users can describe their needs in natural language, and the system records the generation parameters in real time, providing the convenience of feedback. This design not only simplifies the programming process, but also allows users to participate in code generation during the input stage, thereby enhancing the user's sense of participation and satisfaction. The system performs text cleaning and in-depth analysis on the user input, extracts key variables, functions and logical relationships, and generates a preliminary code framework. By calculating the comprehensive evaluation index Etotal and its various components (Egen, Fimpact, Qcode), the system can quantitatively evaluate the quality and effect of the generated code. This process makes code generation more efficient and accurate, reducing the necessity of human errors and modifications. The introduction of the feedback impact coefficient Fimpact enables the user's rating and suggestions to directly affect the adjustment of the generation algorithm. This dynamic feedback mechanism not only improves the system's responsiveness to user needs, but also promotes the continuous optimization of the algorithm, ensuring that the generated code can continuously adapt to user feedback while meeting project requirements, thereby enhancing the overall programming experience.
[0078] Example 3
[0079] This embodiment is explained in Example 1, please refer to Figure 1 ,Specifically: Based on the context information and requirements input by the user, the system automatically ,identifies the required programming language and configures the corresponding ,programming environment, including compiler, interpreter and knowledge base;
[0080] The system retrieves programming elements that match the analysis results from the built-in programming knowledge base. A knowledge base containing commonly used programming elements is pre-built, including library functions, APIs, modules, and code templates. Based on the key information extracted from the analysis results, the system retrieves matching programming elements from the knowledge base.
[0081] Combine the retrieved programming elements with the preliminary code framework to generate complete code snippets. After the code generation is completed, use a static analysis tool to check the quality of the generated code, including syntax errors, potential logical problems, and security hazards. The system records the number N of successfully generated codes success .
[0082] The system will comprehensively evaluate the index E total Compare it with the preset threshold A to determine whether the quality of the generated code and user satisfaction meet the project requirements;
[0083] The system sets the preset threshold A according to industry standards, project requirements, or historical data, and compares the calculated E total with the preset threshold A, and the judgment result:
[0084] If E total ≥A, it means that the quality of the generated code and user satisfaction meet the standards. The system marks the code snippet as "qualified" and records it in the project document;
[0085] If E total <A, it means that the generated code fails to meet the quality standards. The system marks it as "to be optimized" and enters the feedback collection and regeneration process for adjustment.
[0086] In this embodiment, the system automatically identifies the required programming language and configures the corresponding programming environment according to the user's context information and requirements. This automated configuration significantly reduces the time and complexity of manual environment setup for users, making the development process smoother. Especially for beginners and non-professional developers, it lowers the entry threshold. Through the built-in programming knowledge base, the system can quickly retrieve programming elements that match the analysis results. This pre-built knowledge base not only includes common library functions and APIs, but also can quickly generate complete code snippets according to user needs. Combining the quality check of the generated code by the static analysis tool ensures that the code meets the standards both syntactically and logically, greatly improving the accuracy and reliability of the code. The system compares the comprehensive evaluation index E total with the preset threshold A to evaluate the quality of the code and user satisfaction in real time. This dynamic evaluation mechanism can effectively identify the deficiencies of the generated code. When the generated result fails to meet the standards, the system will automatically enter the feedback collection and regeneration process. This mechanism ensures the possibility of continuous improvement, enabling the generated code to be continuously optimized in actual applications to adapt to the changing needs of users and projects.
[0087] Embodiment 4
[0088] This embodiment is an explanatory description carried out in Embodiment 1. Please refer to Figure 1,Specifically: The generated code snippets are formatted and displayed according to the rules of syntax highlighting, ,including variables, functions, control structures and comments, and different elements are displayed in different colors, ,to enhance readability and enable clear identification of the functions and structures of ,each code element;
[0089] In the visual interface, a tree structure view is provided to show the hierarchical relationship of the code. Users can view the content by expanding or collapsing nodes, which facilitates quick understanding of the overall logic of the code. Tooltips are added to key code elements. When the user hovers the mouse over an element, a description box pops up to introduce the function and purpose of the element in detail, including the comprehensive evaluation index E. total , preset threshold A and comparison results, marked with different colors (e.g. green for reaching the standard, red for failing to reach the standard, highlighting the results;
[0090] While displaying the generated code, an editor interface is provided, where users can modify the generated code directly, allowing users to adjust the code content according to their needs and update the comprehensive evaluation index E in the evaluation scheme at any time. total , and automatically feed back new evaluation results to users.
[0091] In this embodiment, the generated code snippets are formatted using syntax highlighting rules, and different elements are displayed in different colors, greatly enhancing the readability of the code. Users can more clearly identify elements such as variables, functions, control structures, and comments, thereby understanding the function and structure of the code more quickly and reducing the cognitive burden of understanding the code. The tree structure view provided allows users to easily expand or collapse nodes to view the hierarchical relationship of the code. This intuitive display method helps users quickly grasp the overall logic and quickly locate key parts, further improving learning and usage efficiency. The design of the tooltip also provides users with instant information feedback, so that the function and purpose of each code element can be effectively explained. While displaying the generated code, the integrated editor interface allows users to directly modify the code to meet personalized needs. User modifications can instantly update the comprehensive evaluation index E total , and automatically feedback new evaluation results. This dynamic interactive design not only enhances user participation, but also promotes iterative optimization of the code. Such flexibility makes the system closer to practical applications and can adapt to rapidly changing development needs.
[0092] Example 5
[0093] This embodiment is explained in Example 1, please refer to Figure 1Specifically: set up a feedback entry in a prominent position on the visual interface, design a user feedback form, including a 1-5 star rating system and a comment input box, allowing users to provide detailed feedback on the code and evaluation plan, and provide examples to guide users on how to fill in the feedback form;
[0094] The system records the feedback data submitted by users in real time, including ratings, comments and timestamps, and stores them in the database. It structures the collected feedback data, including standardizing the ratings, using data analysis tools to process the collected user feedback, identifying common problems and specific improvement suggestions of users, and generating feedback analysis reports based on the analysis results, including the distribution of user ratings, major negative feedback and improvement suggestions;
[0095] According to the feedback analysis results, the parameters of the code generation algorithm are dynamically adjusted. After each code generation, a new optimization strategy is implemented and the comprehensive evaluation index E is recalculated. total , regularly provide users with feedback on system improvements through a visual interface or email.
[0096] In this embodiment, by setting up a prominent feedback entrance and a detailed user feedback form, users can easily provide ratings and comments on the code and evaluation plan. This design not only enhances user participation, but also encourages active expression of opinions, so that the user's voice is valued in system optimization. The system records user feedback in real time and performs structured processing, which can effectively identify common problems and specific improvement suggestions. The feedback analysis report generated by this data-driven analysis method provides valuable insights for the development team, making future optimization more targeted and effective, thereby continuously improving the user experience. Based on the feedback analysis results, the system can dynamically adjust the parameters of the code generation algorithm and implement new optimization strategies. By regularly calculating the comprehensive evaluation index E total And provide feedback on improvements to ensure that the system always remains efficient and adaptable, enhancing the competitiveness of the product and meeting the ever-changing needs of users.
[0097] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A visual intelligent programming method based on a large language model, characterized by: The following steps are involved: S1: Collect the natural language description and related context information input by the user through the user visualization interface, and record the key parameters in the generation process at the same time; S2: Preprocess the natural language description of the user input, use the large language model to perform semantic analysis on the user input to extract key information and generate a preliminary code framework, and calculate the comprehensive evaluation index E total ; Perform text cleaning on the natural language description of user input, remove invalid symbols, stop words and other noise, use the large language model to deeply analyze the pre-processed user input, extract key information, including variables, functions, control structures and logical relationships, generate a preliminary code framework, and calculate the comprehensive evaluation index E total , generation effect coefficient E gen , Feedback influence coefficient F impact and code quality factor Q code ; The comprehensive evaluation index E total Calculated by the following formula: ; In the formula, E total Indicates the comprehensive evaluation index, E gen represents the generation effect coefficient, F impact Denotes the feedback influence coefficient, Q code represents the code quality coefficient, Respectively represent the generation effect coefficient E gen , Feedback influence coefficient F impact and code quality factor Q code The weight coefficient of The generation effect coefficient E gen Calculated by the following formula: ; Where N success Indicates the number of successfully generated codes, N total Indicates the total number of generated requests; The feedback influence coefficient F impact Calculated by the following formula: ; In the formula, R i is the user's rating of the i-th feedback, W i is the weight of the feedback; The code quality factor Q code Calculated by the following formula: ; In the formula, C readability Indicates the readability score, C efficiency represents the efficiency score, C complexity represents the complexity score; S3: Based on the analysis results, the corresponding programming elements are called from the knowledge base to generate corresponding code snippets; S4: The comprehensive evaluation index E total Compare with the preset threshold A to obtain an evaluation plan to determine whether the generated code quality and user satisfaction meet the project requirements; S5: Present the generated code and evaluation scheme to the user in a visual form to facilitate user understanding and operation; S6: Provide a feedback interface that allows users to rate and comment on the generated code and evaluation scheme. Users can point out the advantages and disadvantages of the code and provide suggestions for improvement. Iterative optimization is performed based on user feedback and the quality of the generated code.
2. The visual intelligent programming method based on a large language model according to claim 1, characterized in that: Create an interactive user interface for users to enter their natural language descriptions and related context information. When the user submits the input, the system records the relevant generation parameters in real time, including the number of successfully generated codes N success , readability score C readability , Efficiency score C efficiency and complexity score C complexity ; The natural language description input by the user is used to describe the function or logic that he wants to implement, and the relevant context information includes project background, target users and usage environment.
3. The visual intelligent programming method based on a large language model according to claim 1, characterized in that: Based on the contextual information and requirements input by the user, the system automatically identifies the required programming language and configures the corresponding programming environment, including the compiler, interpreter, and knowledge base; The system retrieves programming elements that match the analysis results from the built-in programming knowledge base. A knowledge base containing commonly used programming elements is pre-built, including library functions, APIs, modules, and code templates. Based on the key information extracted from the analysis results, the system retrieves matching programming elements from the knowledge base. Combine the retrieved programming elements with the preliminary code framework to generate a complete code snippet. After the code generation is completed, use static analysis tools to check the quality of the generated code, including syntax errors, potential logic problems and safety hazards. The system records the number of successfully generated codes N success .
4. The visual intelligent programming method based on a large language model according to claim 1, characterized in that: The system will comprehensively evaluate the index E total Compare with the preset threshold A to determine whether the generated code quality and user satisfaction meet the project requirements; The system sets a preset threshold A based on industry standards, project requirements or historical data, and calculates the E total Compare with the preset threshold A and judge the result: If E total ≥A, it means that the generated code quality and user satisfaction meet the standards, and the system marks the code snippet as "qualified" and records it in the project document; If E total <is less than A, it means that the generated code fails to meet the quality standard, and the system is marked as "to be optimized" and enters the feedback collection and regeneration process for adjustment.
5. The visual intelligent programming method based on a large language model according to claim 1, characterized in that: The generated code snippets are formatted and displayed according to the rules of syntax highlighting, including variables, functions, control structures and comments. Different elements are displayed in different colors to enhance readability and make it possible to clearly identify the functions and structures of each code element. In the visual interface, a tree structure view is provided to show the hierarchical relationship of the code. Users can view the content by expanding or collapsing nodes, which facilitates quick understanding of the overall logic of the code. Tooltips are added to key code elements. When the user hovers the mouse over an element, a description box pops up to introduce the function and purpose of the element in detail, including the comprehensive evaluation index E. total , preset threshold value A and comparison result, marked with different colors, green for reaching the standard, red for failing to reach the standard, highlighting the result; While displaying the generated code, an editor interface is provided, where users can modify the generated code directly, allowing users to adjust the code content according to their needs and update the comprehensive evaluation index E in the evaluation scheme at any time. total , and automatically feed back new evaluation results to users.
6. The visual intelligent programming method based on a large language model according to claim 1, characterized in that: Set up a feedback entry in a prominent position on the visual interface and design a user feedback form, including a 1-5 star rating system and a comment input box, allowing users to provide detailed feedback on the code and evaluation plan, and provide examples to guide users on how to fill out the feedback form; The system records the feedback data submitted by users in real time, including ratings, comments and timestamps, and stores them in the database. It structures the collected feedback data, including standardizing the ratings, using data analysis tools to process the collected user feedback, identifying common problems and specific improvement suggestions of users, and generating feedback analysis reports based on the analysis results, including the distribution of user ratings, major negative feedback and improvement suggestions; According to the feedback analysis results, the parameters of the code generation algorithm are dynamically adjusted. After each code generation, a new optimization strategy is implemented and the comprehensive evaluation index E is recalculated. total , regularly provide users with feedback on system improvements through a visual interface or email.
Citation Information
Patent Citations
Programming practice assisting method and system based on large natural language processing model
CN117171305A
Low-code application development method and system based on AI auxiliary generation model
CN118760427A