Visual intelligent programming method based on large language model

Through the semantic analysis of the user visual interface and large language model, combined with the feedback mechanism, the problem of insufficient code quality and readability in the visual intelligent programming method based on large language model is solved, and efficient and accurate code generation and user satisfaction are achieved. promote.

CN119045806AActive Publication Date: 2024-11-29深圳科盾量子信息科技有限公司

Patent Information

Application Number
CN202411523222.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2024-11-29
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

The visual intelligent programming method based on the large language model is difficult to accurately express the needs when users enter natural language, resulting in insufficient quality and readability of generated codes, imperfect feedback mechanisms, and affecting project progress and user trust.

Method used

The user visual interface collects natural language descriptions and related information, uses large language models to perform semantic analysis, generates a preliminary code framework, calculates a comprehensive evaluation index, provides a feedback interface to allow users to score and comment code, performs iterative optimization, and dynamically adjusts the generation algorithm.

Benefits of technology

It improves the quality of code generation and user satisfaction, improves programming efficiency and availability, reduces development error rate and maintenance costs, and enhances user participation and system self-optimization capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119045806A_ABST
    Figure CN119045806A_ABST
Patent Text Reader

Abstract

The invention discloses a visual intelligent programming method based on a large language model, and relates to the technical field of intelligent programming. During system operation, natural language description input by a user and related context information are collected through a user visual interface, and key parameters in the generation process are recorded at the same time; the method comprises the following steps: preprocessing a natural language description input by a user, carrying out semantic analysis on the input by the user by utilizing a large language model to extract key information and generate a preliminary code framework, calculating a comprehensive evaluation index Etotal, comparing the comprehensive evaluation index Etotal with a preset threshold A to obtain an evaluation scheme, the generated code and the evaluation scheme are presented to a user in a visual form, a feedback interface is provided, the user is allowed to score and comment the generated code and the evaluation scheme, the user can point out the advantages and disadvantages of the code and improvement suggestions, and iterative optimization is performed according to the feedback of the user and the quality of the generated code.
Need to check novelty before this filing date? Find Prior Art

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: 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 ; 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.

[0007] 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 ; 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.

[0008] 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 ; The comprehensive evaluation index E total Calculated by the following formula: ; 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 .

[0009] Preferably, 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.

[0010] Preferably, 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, and n represents the total number of feedback items.

[0011] Preferably, the code quality coefficient 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.

[0012] 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; 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 .

[0013] Preferably, the system will use the comprehensive evaluation 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 totalIf it is ≥A, it means that the quality of the generated code and user satisfaction meet the standards. The system marks this code snippet as "qualified" and records it in the project document; 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.

[0014] Preferably, format and display the generated code snippet 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; In the visualization 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 usage of the element, including the comprehensive evaluation index E total , the preset threshold A, and the comparison result, which are marked with different colors (e.g., green indicates compliance, red indicates non-compliance, highlighting the result; When 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 in the evaluation scheme at any time total , and automatically feedback the new evaluation result to the user.

[0015] Preferably, set a feedback entry at a prominent position in the visualization 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 scheme, and provide example instructions 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. Structurally process 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 a feedback analysis report according to the analysis results, including the distribution of user ratings, the main negative feedback, and improvement suggestions; According to the feedback analysis results, dynamically adjust the parameters of the code generation algorithm. After each code generation, implement a new optimization strategy and recalculate the comprehensive evaluation index E total , and regularly feedback the improvement situation of the system to users through the visualization interface or email.

[0016] The present invention provides a visualization intelligent programming method based on a large language model, having the following beneficial effects: (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.

[0017] (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.

[0018] (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.

[0019] (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

[0020] 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

[0021] 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.

[0022] Example 1 The present invention provides a visual intelligent programming method based on a large language model. Figure 1 , including the following steps: 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 ; 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.

[0023] 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 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. 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.

[0024] Example 2 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 ; 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; 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; 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; 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; 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.

[0025] 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 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 .

[0026] 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.

[0027] 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, and n represents the total number of feedback items.

[0028] 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.

[0029] 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.

[0030] Example 3 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; 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 .

[0031] 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 totalIf <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.

[0032] 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 by the user, 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 includes not only common library functions and APIs but also can quickly generate complete code snippets according to the user's needs. Combining with the quality inspection 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 evaluates the quality of the code and user satisfaction in real time by comparing the comprehensive evaluation index E total with the preset threshold A. 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.

[0033] Embodiment 4 This embodiment is an explanatory description based on Embodiment 1. Please refer to Figure 1 , specifically: 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; In the visual interface, provide a tree structure view to display the hierarchical relationship of the code. Users can expand or collapse nodes to view the content, facilitating quick understanding of 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, detailing the function and usage 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; 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.

[0034] 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.

[0035] Example 5 This embodiment is explained in Example 1, please refer to Figure 1 Specifically: 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; 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.

[0036] 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.

[0037] 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 ; 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 number of successfully generated codes N is recorded through logging and parameter statistics. success and the total number of generated requests N total ; 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 2, characterized in that: 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 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 .

4. The visual intelligent programming method based on a large language model according to claim 3, characterized in that: 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.

5. The visual intelligent programming method based on a large language model according to claim 3, characterized in that: 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.

6. The visual intelligent programming method based on a large language model according to claim 3, characterized in that: 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.

7. 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 .

8. 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. The system marks it as "needs optimization" and enters the feedback collection and regeneration process for adjustment.

9. 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 function and structure 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.

10. 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

  • Visual programming method based on large language model, medium, device and equipment

    CN117667054A

  • Semi-automatic demand modeling method and system based on low-code platform

    CN118245022A

  • Low-code application development method and system based on AI auxiliary generation model

    CN118760427A

  • Software comprehensive quality evaluation method and system based on deep learning

    CN118796678A

Cited By

  • Robot control method and system based on large language model

    CN119871428A

  • Code generation method and device based on multiple agents, medium and program product

    CN120315688A

  • Automatic code programming method

    CN120335783A

  • A method of automatic programming of code

    CN120335783B

  • Code generation method and device based on natural language and medium

    CN120469666A