Method and system for converting natural language demand into workable software

By integrating the Large Language Model (LLM) and DevOps tools, the problems of misunderstanding of requirements and insufficient automation in traditional development models are solved, enabling rapid and accurate software development and deployment, and improving team collaboration efficiency and iteration speed.

CN119005131AInactive Publication Date: 2024-11-22BEIJING KUAFU TECHNOLOGY CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202411220931.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-11-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional development models struggle to meet the demands of rapid iteration and high customization. DevOps practices face bottlenecks in understanding requirements and converting them into executable code, leading to misunderstandings and biases in requirement comprehension, insufficient collaboration between development and operations teams, slow iteration speed, and inadequate automation.

Method used

We employ Large Language Model (LLM) for natural language processing, transforming user requirements into structured features through semantic analysis and interactive validation. This generates code and integrates with pre-enhanced DevOps tools to achieve automated testing and deployment, building a seamless collaboration framework.

Benefits of technology

It improved the accuracy of requirement understanding, enhanced collaboration between development and operations, increased automation levels, shortened the cycle from requirement submission to software delivery, lowered the technical threshold, and reduced error propagation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119005131A_ABST
    Figure CN119005131A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a system for converting a natural language demand into workable software. The method comprises the following steps: acquiring demand content described by a user through a natural language; inputting the demand content into a large language model (LLM) for semantic analysis, and converting a natural language demand into a structured demand feature; performing demand verification with the user through natural language interaction; generating corresponding codes for the verified demand features by using a large language model (LLM); and automatically testing the codes according to a preset process by utilizing the pre-enhanced DevOps tool, and deploying the codes passing the test to obtain corresponding workable software. According to the technical scheme, the demand understanding deviation is reduced, error propagation is reduced, manual intervention is reduced, the technical threshold is lowered, the development efficiency is improved, seamless joint of development and operation and maintenance processes is achieved, the team cooperation efficiency is improved, the period from demand proposing to software delivery is shortened, and the iteration speed is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software design, and in particular to a method for converting natural language requirements into workable software and a system for converting natural language requirements into workable software. Background Art

[0002] At present, with the rapid development of the software development industry, the traditional development model has been unable to meet the market's demand for rapid iteration and high customization. In this context, DevOps, as a collection of culture and practice, aims to improve development efficiency and quality by automating the software delivery process. However, DevOps practice still has bottlenecks in the process of understanding requirements and converting them into executable code.

[0003] In the traditional development model, requirements are often communicated verbally or in writing, which can easily lead to deviations and misunderstandings in the understanding of requirements. In the case of misunderstandings of requirements, errors will propagate throughout the development process, resulting in the final product not meeting user requirements. The lack of effective communication and collaboration between the development and operation teams leads to problems in the development and deployment of software. When requirements change, the traditional development process requires manual updates of documents and codes, which leads to slow iterations and difficulty in quickly responding to market changes.

[0004] Although DevOps tools provide a certain degree of automation, the automation of requirements analysis, design, and coding stages is still insufficient. Existing automation tools and processes usually require expertise and are not friendly enough to team members with non-technical backgrounds. Summary of the invention

[0005] In response to the above problems, the present invention provides a method and system for converting natural language requirements into working software. Natural language requirements are accurately understood and converted through the natural language processing technology of the large language model (LLM), and software requirements expressed by users in natural language are converted into corresponding codes. This can reduce the deviation in understanding requirements caused by human factors, reduce the propagation of errors, reduce manual intervention, lower technical barriers, and improve development efficiency. Through the integrated collaboration framework of the large language model (LLM) and DevOps tools, the code can be quickly and reliably tested and deployed into working software, thereby achieving seamless integration of development and operation and maintenance processes, improving team collaboration efficiency, shortening the cycle from requirement proposal to software delivery, and accelerating iteration speed.

[0006] To achieve the above object, the present invention provides a method for converting natural language requirements into working software, comprising:

[0007] Obtain the user's needs described in natural language;

[0008] Input the demand content into the large language model LLM for semantic analysis, and convert the natural language demand into structured demand features;

[0009] Verifying requirements with the user through natural language interaction;

[0010] Generate corresponding code for the verified requirement features using the large language model LLM;

[0011] The code is automatically tested according to a preset process using pre-enhanced DevOps tools, and the code that passes the test is deployed to obtain the corresponding working software.

[0012] In the above technical solution, preferably, the verification of demand with the user is performed through natural language interaction, and the specific process includes:

[0013] Using the large language model LLM to perform demand analysis on the demand features, and sending the demand content obtained by the analysis to the user;

[0014] The accuracy of the demand content is confirmed with the user through natural language interaction, multiple rounds of questions and answers are conducted with the user in the form of questions and answers, and semantic analysis is performed on the user's reply content to achieve demand verification.

[0015] In the above technical solution, preferably, the process of using the large language model LLM to generate corresponding codes for the verified demand features includes:

[0016] Obtain the prompt word for generating code based on the verified requirement features;

[0017] The prompt word prompt is input into the large language model LLM to generate corresponding pseudo code or executable code.

[0018] In the above technical solution, preferably, the specific process of using the pre-enhanced DevOps tool to perform automated testing on the code according to a preset process includes:

[0019] Save the generated code to a specified file in a specified working directory;

[0020] Enhance DevOps tools by developing plugins or extensions, and unify and standardize the calling patterns of said DevOps tools;

[0021] The DevOps tool is used to perform editing checks, code scanning, security scanning, automated testing, and compilation and packaging on the code in the specified file according to a preset process.

[0022] In the above technical solution, preferably, the large language model LLM is used to construct an intelligent agent, the intelligent agent determines the information returned by the DevOps tool by obtaining logs, and the intelligent agent adjusts and arranges the execution and use of the DevOps tool through reasoning, so that the DevOps tool can obtain working software according to the code deployment.

[0023] The present invention further proposes a system for converting natural language requirements into workable software, which uses the method for converting natural language requirements into workable software disclosed in any one of the above technical solutions, including:

[0024] The demand acquisition module is used to obtain the demand content described by the user in natural language;

[0025] The requirement parsing module is used to input the requirement content into the large language model LLM for semantic analysis and convert the natural language requirements into structured requirement features;

[0026] A demand verification module, used to verify the demand with the user through natural language interaction;

[0027] A code generation module, used to generate corresponding code for the verified requirement features using the large language model LLM;

[0028] The test deployment module is used to use the pre-enhanced DevOps tool to perform automated testing on the code according to a preset process, and deploy the code that passes the test to obtain the corresponding working software.

[0029] In the above technical solution, preferably, the demand verification module is specifically used to:

[0030] Using the large language model LLM to perform demand analysis on the demand features, and sending the demand content obtained by the analysis to the user;

[0031] The accuracy of the demand content is confirmed with the user through natural language interaction, multiple rounds of questions and answers are conducted with the user in the form of questions and answers, and semantic analysis is performed on the user's reply content to achieve demand verification.

[0032] In the above technical solution, preferably, the code generation module is specifically used for:

[0033] Obtain the prompt word for generating code based on the verified requirement features;

[0034] The prompt word prompt is input into the large language model LLM to generate corresponding pseudo code or executable code.

[0035] In the above technical solution, preferably, the test deployment module is specifically used to:

[0036] Save the generated code to a specified file in a specified working directory;

[0037] Enhance DevOps tools by developing plugins or extensions, and unify and standardize the calling patterns of said DevOps tools;

[0038] The DevOps tool is used to perform editing checks, code scanning, security scanning, automated testing, and compilation and packaging on the code in the specified file according to a preset process.

[0039] In the above technical solution, preferably, the large language model LLM is used to construct an intelligent agent, the intelligent agent determines the information returned by the DevOps tool by obtaining logs, and the intelligent agent adjusts and arranges the execution and use of the DevOps tool through reasoning, so that the DevOps tool can obtain working software according to the code deployment.

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] (1) Improve the accuracy of demand understanding: Through the natural language processing capabilities of LLM, the deviation in demand understanding caused by human factors can be reduced.

[0042] (2) Strengthen the collaboration between development and operation and maintenance: LLM can be integrated with DevOps tools to achieve seamless integration of development and operation and maintenance processes and improve team collaboration efficiency.

[0043] (3) Improve the level of automation: By automating the requirements analysis, design, and coding processes, manual intervention can be reduced and development efficiency can be improved.

[0044] (4) Accelerate iteration speed: Enable the software to respond quickly to changes in requirements and shorten the cycle from requirement submission to software delivery.

[0045] (5) Lowering the technical threshold: Through natural language interaction, team members with non-technical backgrounds can easily participate in the software development process.

[0046] (6) Reduce the propagation of errors: Verify and correct requirements through LLM during the requirements understanding stage to reduce the propagation of errors in the development process. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 A flowchart of a method for converting natural language requirements into working software disclosed in an embodiment of the present invention;

[0048] Figure 2 A schematic diagram of modules of a system for converting natural language requirements into working software disclosed in an embodiment of the present invention.

[0049] In the figure, the corresponding relationship between each component and the reference numeral is as follows:

[0050] 1. Requirements acquisition module, 2. Requirements parsing module, 3. Requirements verification module, 4. Code generation module, 5. Test deployment module. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.

[0052] The present invention is further described in detail below in conjunction with the accompanying drawings:

[0053] like Figure 1 As shown, a method for converting natural language requirements into working software according to the present invention includes:

[0054] Obtain the user's needs described in natural language;

[0055] Input the demand content into the large language model (LLM) for semantic analysis, and convert the natural language demand into structured demand features;

[0056] Verify user requirements through natural language interaction;

[0057] Use the large language model LLM to generate corresponding code for the verified requirement features;

[0058] Use pre-enhanced DevOps tools to automatically test the code according to the preset process, and deploy the code that passes the test to obtain the corresponding working software.

[0059] In this implementation, the natural language processing technology of the large language model LLM is used to accurately understand and convert natural language requirements, and the software requirements expressed by users in natural language are converted into corresponding codes, which can reduce the deviation in demand understanding caused by human factors, reduce error propagation, reduce manual intervention, lower the technical threshold, and improve development efficiency. Through the integrated collaboration framework of the large language model LLM and DevOps tools, the code can be quickly and reliably tested and deployed into working software, achieving seamless integration of development and operation and maintenance processes, improving team collaboration efficiency, shortening the cycle from demand proposal to software delivery, and accelerating iteration speed.

[0060] During the implementation process, users describe their requirements in natural language, which can be input through voice, text, or graphical interfaces. After receiving the requirements, LLM performs semantic analysis and context understanding, and converts natural language into structured requirements descriptions. Confirm the accuracy of the requirements with users in an interactive manner to ensure that the requirements are correctly understood. Based on the structured requirements description, LLM generates corresponding pseudocode or directly generates executable code. The DevOps tool chain receives the generated code, automatically builds, tests, and deploys it to the development environment. The code is automatically deployed to the production environment through the continuous integration process, and is monitored and feedback is collected.

[0061] In the above implementation, preferably, the demand verification is performed with the user through natural language interaction, and the specific process includes:

[0062] Use the large language model LLM to analyze the demand characteristics and send the analyzed demand content to the user;

[0063] Confirm the accuracy of the demand content with the user through natural language interaction, conduct multiple rounds of question-and-answer sessions with the user, and perform semantic analysis on the user's response content to achieve demand verification.

[0064] In addition, structured requirement documents can be sent to users to verify the requirements based on the user's confirmation.

[0065] In the above implementation, preferably, the large language model LLM is used to generate corresponding codes for the verified requirement features, and the specific process includes:

[0066] Obtain the prompt word for generating code based on the verified requirement features;

[0067] Input the prompt word prompt into the large language model LLM to generate corresponding pseudo code or executable code.

[0068] In the above implementation, preferably, the specific process of using the pre-enhanced DevOps tool to perform automated testing on the code according to the preset process includes:

[0069] Save the generated code to the specified file in the specified working directory;

[0070] Enhance DevOps tools by developing plug-ins or extensions, and unify and standardize the calling modes of DevOps tools to better support the conversion process from natural language to code;

[0071] Use DevOps tools to perform editing checks, code scanning, security scanning, automated testing, and compilation and packaging on the code in specified files according to preset processes.

[0072] In the above implementation, preferably, the large language model LLM is used to construct an intelligent agent, and the intelligent agent determines the information returned by the DevOps tool by obtaining logs. The intelligent agent adjusts and arranges the execution and use of the DevOps tool through reasoning, so that the DevOps tool can obtain working software according to the code deployment.

[0073] In the above implementation, in addition to the large language model LLM, other types of artificial intelligence models, such as decision trees, support vector machines (SVM) or neural networks, may also be considered to handle specific demand parsing tasks.

[0074] In addition, machine learning models can be used for demand forecasting. The machine learning model is trained to predict user needs, and then code is generated based on the prediction results. This method can automatically complete the remaining needs and generate corresponding code after the user enters part of the needs.

[0075] In the code generation process, low-code or no-code development platforms are used to allow users to implement requirements through graphical interfaces and configurations rather than coding. These platforms usually provide natural language processing capabilities to assist in the understanding and implementation of requirements.

[0076] In a specific domain, a domain specific language (DSL) is developed and used to describe requirements more accurately. Domain specific language DSL is usually closer to the problem domain and can provide a more precise way to express requirements.

[0077] According to the method for converting natural language requirements into working software disclosed in the above implementation mode, the above method is specifically described below by taking the development of an online library management system as an example.

[0078] Suppose a user needs to develop an online book management system. The requirement is described in natural language as follows: "I need a system where users can browse books, search for specific books, and borrow and return books."

[0079] Requirements collection: Users input the above requirements through the graphical interface.

[0080] Requirements analysis: LLM analyzes requirements and identifies key functional points: "browse books", "search books", "borrow" and "return".

[0081] Requirements verification: The system generates a structured requirements document and requests user confirmation.

[0082] Code generation: LLM generates corresponding pseudocode or code framework based on the confirmed requirements.

[0083] Automated build and testing: DevOps tools automatically build code and perform unit and integration testing.

[0084] Continuous integration and deployment: After the test passes, the code is automatically deployed to the server and monitored in real time.

[0085] like Figure 2 As shown, the present invention also proposes a system for converting natural language requirements into workable software, which applies the method for converting natural language requirements into workable software disclosed in any one of the above embodiments, including:

[0086] Demand acquisition module 1, used to acquire demand content described by users in natural language;

[0087] Demand parsing module 2 is used to input demand content into the large language model LLM for semantic analysis and convert natural language requirements into structured demand features;

[0088] The requirement verification module 3 is used to verify the requirements with the user through natural language interaction;

[0089] A code generation module 4 is used to generate corresponding codes for the verified requirement features using a large language model LLM;

[0090] The test deployment module 5 is used to use the pre-enhanced DevOps tool to perform automated testing on the code according to the preset process, and deploy the code that passes the test to obtain the corresponding working software.

[0091] In the above implementation, preferably, the requirement verification module 3 is specifically used for:

[0092] Use the large language model LLM to analyze the demand characteristics and send the analyzed demand content to the user;

[0093] Confirm the accuracy of the demand content with the user through natural language interaction, conduct multiple rounds of question-and-answer sessions with the user, and perform semantic analysis on the user's response content to achieve demand verification.

[0094] In the above implementation, preferably, the code generation module 4 is specifically used for:

[0095] Obtain the prompt word for generating code based on the verified requirement features;

[0096] Input the prompt word prompt into the large language model LLM to generate corresponding pseudo code or executable code.

[0097] In the above implementation, preferably, the test deployment module 5 is specifically used for:

[0098] Save the generated code to the specified file in the specified working directory;

[0099] Enhance DevOps tools by developing plugins or extensions, and unify and standardize the calling modes of DevOps tools;

[0100] Use DevOps tools to perform editing checks, code scanning, security scanning, automated testing, and compilation and packaging on the code in specified files according to preset processes.

[0101] In the above implementation, preferably, the large language model LLM is used to construct an intelligent agent, and the intelligent agent determines the information returned by the DevOps tool by obtaining logs. The intelligent agent adjusts and arranges the execution and use of the DevOps tool through reasoning, so that the DevOps tool can obtain working software according to the code deployment.

[0102] According to the system for converting natural language requirements into working software disclosed in the above-mentioned implementation mode, the functions to be implemented by each module thereof correspond to the specific steps of the method for converting natural language requirements into working software disclosed in the above-mentioned implementation mode. During the implementation process, operations are performed with reference to the above-mentioned implementation mode, which will not be repeated here.

[0103] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for converting natural language requirements into working software, characterized in that: include: Obtain the user's needs described in natural language; Input the demand content into the large language model LLM for semantic analysis, and convert the natural language demand into structured demand features; Verifying requirements with the user through natural language interaction; Generate corresponding code for the verified requirement features using the large language model LLM; The code is automatically tested according to a preset process using pre-enhanced DevOps tools, and the code that passes the test is deployed to obtain the corresponding working software.

2. The method for converting natural language requirements into working software according to claim 1, characterized in that: The process of verifying the needs with the user through natural language interaction includes: Using the large language model LLM to perform demand analysis on the demand features, and sending the demand content obtained by the analysis to the user; The accuracy of the demand content is confirmed with the user through natural language interaction, multiple rounds of questions and answers are conducted with the user in the form of questions and answers, and semantic analysis is performed on the user's reply content to achieve demand verification.

3. The method for converting natural language requirements into working software according to claim 1, characterized in that: The specific process of using the large language model LLM to generate corresponding codes for the verified demand features includes: Obtain the prompt word for generating code based on the verified requirement features; The prompt word prompt is input into the large language model LLM to generate corresponding pseudo code or executable code.

4. The method for converting natural language requirements into working software according to claim 1, characterized in that: The specific process of using the pre-enhanced DevOps tool to perform automated testing on the code according to a preset process includes: Save the generated code to a specified file in a specified working directory; Enhance DevOps tools by developing plugins or extensions, and unify and standardize the calling patterns of said DevOps tools; The DevOps tool is used to perform editing checks, code scanning, security scanning, automated testing, and compilation and packaging on the code in the specified file according to a preset process.

5. The method for converting natural language requirements into working software according to any one of claims 1 to 4, characterized in that: The large language model LLM is used to construct an intelligent agent, and the intelligent agent determines the information returned by the DevOps tool by obtaining logs. The intelligent agent adjusts and arranges the execution and use of the DevOps tool through reasoning, so that the DevOps tool can obtain working software according to the code deployment.

6. A system for converting natural language requirements into working software, characterized in that: The method for converting a natural language requirement into working software according to any one of claims 1 to 5 comprises: The demand acquisition module is used to obtain the demand content described by the user in natural language; The requirement parsing module is used to input the requirement content into the large language model LLM for semantic analysis and convert the natural language requirements into structured requirement features; A demand verification module, used to verify the demand with the user through natural language interaction; A code generation module, used to generate corresponding code for the verified requirement features using the large language model LLM; The test deployment module is used to use the pre-enhanced DevOps tool to perform automated testing on the code according to a preset process, and deploy the code that passes the test to obtain the corresponding working software.

7. The system for converting natural language requirements into working software according to claim 6, characterized in that: The requirement verification module is specifically used for: Using the large language model LLM to perform demand analysis on the demand features, and sending the demand content obtained by the analysis to the user; The accuracy of the demand content is confirmed with the user through natural language interaction, multiple rounds of questions and answers are conducted with the user in the form of questions and answers, and semantic analysis is performed on the user's reply content to achieve demand verification.

8. The system for converting natural language requirements into working software according to claim 6, characterized in that: The code generation module is specifically used for: Obtain the prompt word for generating code based on the verified requirement features; The prompt word prompt is input into the large language model LLM to generate corresponding pseudo code or executable code.

9. The system for converting natural language requirements into working software according to claim 6, characterized in that: The test deployment module is specifically used for: Save the generated code to a specified file in a specified working directory; Enhance DevOps tools by developing plugins or extensions, and unify and standardize the calling patterns of said DevOps tools; The DevOps tool is used to perform editing checks, code scanning, security scanning, automated testing, and compilation and packaging on the code in the specified file according to a preset process.

10. The system for converting natural language requirements into working software according to any one of claims 6 to 9, characterized in that: The large language model LLM is used to construct an intelligent agent, and the intelligent agent determines the information returned by the DevOps tool by obtaining logs. The intelligent agent adjusts and arranges the execution and use of the DevOps tool through reasoning, so that the DevOps tool can obtain working software according to the code deployment.

Citation Information

Cited By

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

    CN120469666A

  • Natural language based code generation method, device and medium

    CN120469666B

  • Software engineering management method and system based on structured engineering file and medium

    CN122411900A

  • Data product interactive intelligent creation method and system

    CN122491357A

  • System for designing large language model application workflows

    TWI911018B