Software development method and device based on artificial intelligence, equipment and medium
By combining a multi-agent system with a dynamic knowledge graph and a hierarchical verification mechanism, the problem of code development in existing technologies being unable to reuse complex business logic is solved, an efficient, self-learning codeless software development platform is realized, and the efficiency and quality of code generation are improved.
Patent Information
- Application Number
- CN202511249111.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-03
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-09-03
AI Technical Summary
In the existing technology, code development solution retrieval is limited to surface syntax matching and cannot effectively reuse complex business logic in historical projects, resulting in repeated development resource waste and high error rate.
Through the multi-agent system, the natural language interactive interface is used to receive user needs, and the dynamic knowledge graph is combined to retrieve historical solutions. The architect agent generates executable code and performs hierarchical verification through the test agent. Finally, the summary agent pushes the code that meets the needs.
It improves the efficiency and quality control of code generation, enhances the reuse of historical solutions, and reduces the waste of repeated development resources and error rates.
Smart Images

Figure CN120723218A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of software development technology, and in particular to an artificial intelligence-based software development method, device, equipment and medium. Background Art
[0002] In traditional software development methods, processes such as requirements analysis, code design, writing, and testing often require manual intervention, resulting in low efficiency and proneness to errors. With the development of artificial intelligence (AI) technology, an increasing number of intelligent tools are being introduced into the software development process, particularly in the areas of automatic code generation and automated testing. Existing intelligent development tools primarily rely on rule matching and template generation. While these tools can improve code writing efficiency, they still lack flexibility and adaptability, and often fail to fully understand complex user needs and environmental context. In the field of AI-assisted software development, traditional codeless development platforms generally use a single generative model for requirements translation. While this model can achieve basic functional development, it also presents numerous issues. For example, existing code development solution retrieval is limited to surface-level syntax matching, making it impossible to effectively reuse complex business logic from previous projects. This results in wasted development resources and a high error rate in the generated code. Therefore, a new AI-based software development method is urgently needed to address the existing code issues in AI-based software development platforms. Summary of the Invention
[0003] The embodiments of the present invention provide an artificial intelligence-based software development method, apparatus, device and medium, which aim to solve the problem of waste of repeated development resources caused by the limited surface syntax matching of code development solution retrieval in the existing technology and the inability to effectively reuse the complex business logic in historical projects.
[0004] In the first aspect, an embodiment of the present invention provides an artificial intelligence-based software development method, which is applied to a multi-agent system, including a product agent, an architect agent, a test agent, and a summary agent. The method includes: receiving the user's development requirements through a natural language interactive interface, and at the same time capturing the contextual status information of the current development environment; retrieving historical solutions to the development requirements based on a dynamic knowledge graph by the product agent; when a historical solution based on the development requirement is retrieved, generating executable code based on the historical solution according to a hierarchical code generation strategy by the architect agent; performing syntax verification, operation verification and requirement compliance detection on the executable code based on a hierarchical verification mechanism combined with the contextual status information by the test agent to obtain a verification result; when the test agent determines that the verification result meets the development requirement, summarizing the executable code into a final code implementation solution by the summary agent and pushing it to the user.
[0005] In a second aspect, an embodiment of the present invention further provides an artificial intelligence-based software development device for executing the artificial intelligence-based software development method described above.
[0006] In a third aspect, an embodiment of the present invention further provides a computer device comprising a memory and a processor connected to the memory; the memory is used to store computer programs; and the processor is used to run the computer programs stored in the memory to execute the steps of the above-mentioned artificial intelligence-based software development method.
[0007] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the steps of the above-mentioned artificial intelligence-based software development method can be implemented.
[0008] Compared with the prior art, the present invention has the following beneficial effects: In the technical solution of the present invention, the user's development requirements are received through a natural language interactive interface, and the contextual state information of the current development environment is captured. Then, the product agent retrieves historical solutions to the development requirements based on the dynamic knowledge graph. When a historical solution based on the development requirements is retrieved, the architect agent generates executable code based on the historical solution according to the hierarchical code generation strategy. Afterwards, the test agent performs syntax verification, operation verification, and requirement compliance detection on the executable code based on the hierarchical verification mechanism combined with the contextual state information to obtain the verification result. When the test agent determines that the verification result meets the development requirements, the summary agent summarizes the executable code into a final code implementation solution and pushes it to the user. In this way, an efficient, self-learning, and scalable codeless software development platform is constructed, which effectively improves the reuse rate and quality control capabilities of code development. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0010] Figure 1 A flowchart of the artificial intelligence-based software development method provided by the present invention; Figure 2 The first sub-flowchart of the software development method based on artificial intelligence provided by the present invention; Figure 3A sub-flowchart of the second sub-flowchart of the software development method based on artificial intelligence provided by the present invention; Figure 4 The third sub-flowchart of the software development method based on artificial intelligence provided by the present invention; Figure 5 A fourth sub-flowchart of the artificial intelligence-based software development method provided by the present invention; Figure 6 A fifth sub-flowchart of the artificial intelligence-based software development method provided by the present invention; Figure 7 The sixth sub-flowchart of the artificial intelligence-based software development method provided by the present invention; Figure 8 A schematic block diagram of units of the artificial intelligence-based software development device provided by the present invention; Figure 9 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0011] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0012] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0013] It should also be understood that the terminology used in this specification is for the purpose of describing medical embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0014] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0015] The present invention aims to solve the problem of waste of repeated development resources caused by the limited surface syntax matching of code development solution retrieval in the existing technology and the inability to effectively reuse the complex business logic in historical projects, and provides a software development method, device, equipment and medium based on artificial intelligence. Figures 1 to 7 ,The software development method based on artificial intelligence includes the following steps.
[0016] S110, receiving the user's development requirements through a natural language interactive interface, and simultaneously capturing contextual state information of the current development environment; S120, searching, by the product agent, for historical solutions to the development requirements based on a dynamic knowledge graph; S130: When a historical solution based on the development requirement is retrieved, the architect agent generates executable code based on the historical solution according to a hierarchical code generation strategy; S140, performing syntax verification, operation verification, and requirement compliance detection on the executable code by the test agent based on a layered verification mechanism and in combination with the context state information, to obtain a verification result; S150. When the test agent determines that the verification result meets the development requirements, the summary agent summarizes the executable code into a final code implementation solution and pushes it to the user.
[0017] The present invention provides a software development method based on artificial intelligence, which is particularly suitable for a multi-agent system. The system includes a product agent, an architect agent, a test agent and a summary agent.
[0018] When users engage in codeless software development using multi-agents, the product agent first receives their development requirements through a natural language interface. These requirements are typically entered in natural language, and the system uses natural language processing technology to convert these requirements into machine-understandable structured information. Specifically, users enter their requirements through a bimodal interaction module that integrates a voice user interface (LUI) and a graphical user interface (GUI). Furthermore, the system captures the contextual state of the current development environment, including current development tools, environment configuration, and possible external dependencies. This captured contextual state information provides the necessary environmental basis for subsequent code generation and verification.
[0019] After the user's needs are parsed, the product agent will retrieve historical solutions based on a dynamic knowledge graph engine. This graph contains past solutions and their related technical implementations. Through the semantic relationships and paths between nodes in the graph, the product agent can quickly find historical solutions similar to the current needs, and use this solution as a basis to guide the code generation process. Specifically, for example, when the user selects "AI generative development mode" through the web designer, the system starts the context-aware engine, parses the current page DOM tree structure in real time, and extracts the page Schema metadata. This retrieval process is not limited to superficial syntax matching, but goes deep into the context of business logic and solutions, thereby providing more reusable and targeted solutions.
[0020] Once a historical solution has been successfully retrieved, the architect agent begins writing executable code that meets engineering specifications based on the selected historical solution and a hierarchical code generation strategy. The architect agent leverages the business logic and code templates extracted from the knowledge graph, combined with development requirements, to generate the code's foundational framework and core logic. During this process, the architect agent not only generates standard functional implementations but also focuses on the code's structure, maintainability, and extensibility, ensuring that the generated code is adaptable to potential future modifications and optimizations.
[0021] After code generation is complete, the testing agent phase begins. The testing agent first performs static analysis on the code, including syntax and logic validation, to ensure that the code executes smoothly without runtime errors. Secondly, the testing agent performs environmental compatibility testing to verify that the generated code can function properly in different development environments, such as different browsers and devices. Finally, the testing agent performs verification based on user requirements, simulating user operations in real applications to ensure that the generated code functions in accordance with user requirements.
[0022] If the test results indicate that the code meets the requirements, the Notification Summary Agent obtains the code implementation solution from the Architect Agent and pushes it to the user. If the test results indicate that the code has issues or does not fully meet the requirements, the Notification Architect Agent returns the reasons for the test failure to the Scenario Agent for further discussion. The Architect Agent will then make optimizations based on this feedback. This optimization may include fixing syntax errors, improving business logic, and enhancing code robustness, ensuring continuous improvement in code quality.
[0023] Once the Architect Agent confirms that the code meets all requirements and has passed the Test Agent's verification, the Summary Agent summarizes the final code implementation plan and generates a detailed code implementation report. This report includes not only the final code but also key decisions made during the development process, optimization steps, and suggestions for future modifications. Finally, the system pushes this code solution to the user, completing the entire software development process.
[0024] In this method, the efficient collaboration of product agents, architect agents, and test agents, along with the dynamic support of knowledge graphs, not only improves code generation efficiency but also enhances the reuse of historical solutions. The multi-agent system can perform deep semantic analysis based on historical data, avoiding reliance solely on surface-level syntax matching. This addresses the inability to reuse complex business logic in traditional approaches, improving both efficiency and accuracy.
[0025] In one embodiment, referring to Figure 2 The multi-agent system also includes a triage agent and a scene expert agent. The steps of S120 include: S121. When no historical solution to the development requirement is found, the triage agent decomposes the development requirement and identifies its awareness, and decomposes the development requirement into multiple sub-development tasks. S122: The scenario expert agents discuss the solution for each sub-development task, obtain the sub-task process solution, and hand it over to the architect agent for integration into a solution to be written; S123. The architect agent encodes the solution to be written according to a hierarchical code generation strategy to generate executable code.
[0026] In this embodiment, the multi-agent system also includes a triage agent and a scenario expert agent. After the product agent searches for historical solutions based on a dynamic knowledge graph, if the system fails to find a historical solution that meets the development requirements, it automatically enters the requirements decomposition phase. At this point, the triage agent is responsible for deeply decomposing and identifying the underlying development requirements. The requirements decomposition process first structures the requirements, breaking them down into specific subtasks while also identifying the underlying business logic and functional requirements. By analyzing the language and logical relationships within the development requirements, the triage agent automatically transforms complex requirements into multiple manageable sub-development tasks. These subtasks are further refined into independent development modules, providing clear direction for subsequent expert agent collaboration. Specifically, a semantic dependency analysis model is used to parse user requirements, extract core verb-object pairs, and construct initial task feature vectors, such as the "recognition" action and the "brainwave signal" object in "Develop → Brainwave Recognition System." A pre-trained classification model identifies the development intent's operation type (add / modify) and functional domain (biometric recognition / data security), generating a structured intent label. Then, based on the component dependencies defined in the knowledge graph, such as the chain dependency from signal acquisition module to feature extraction algorithm to database interface, the complex requirements are broken down into atomic subtasks, such as "signal acquisition module development" and "feature extraction algorithm implementation." If a missing parameter, such as an undefined sampling rate, is detected, the triage agent initiates multiple rounds of clarification dialogue, generates a parameter completion list, and provides feedback to the user through a natural language interface until all subtasks are executable.
[0027] Once the triage agent has decomposed the requirements and generated multiple sub-development tasks, these tasks are then handed over to multiple scenario expert agents for solution discussion. Each scenario expert agent, based on its domain knowledge and experience, proposes a technical solution suitable for a specific sub-task. Specifically, the scenario expert agents form specialized task forces, dynamically scheduled by the triage agent based on the technical feature labels of the sub-tasks. By integrating best practices from historical solutions, the scenario expert agents discuss multiple possible solutions, ensuring that the handling of each sub-task fully meets user needs and the complexity of the business logic.
[0028] During this process, the scenario expert agent not only relies on its knowledge in its professional field, but can also propose innovative solutions based on historical data and model analysis to improve the efficiency and feasibility of the solution. Specifically, the scenario expert agent will retrieve solutions in similar fields based on the semantic similarity algorithm of the knowledge graph. For example, it will retrieve Mel-Frequency Cepstral Coefficient (MFCC) implementation solutions in the field of speech recognition for the "feature extraction algorithm" subtask. The retrieved solution is then adapted to the current task scenario for discussion. When the architect agent reaches a consensus using a consensus voting algorithm, that is, through discussion, the obtained subtask process solution can be submitted to the architect agent for solution testing. It is important to emphasize that the output of this stage is multiple subtask solutions that have been discussed and optimized by experts.
[0029] Once the scenario expert agent completes the discussion of subtask solutions, the solution is handed over to the architect agent for further solution integration. After the solution integration is completed, the architect agent will compile the solution into code and use an incremental persistence strategy to store it in a relational database such as PostgreSQL, enabling traceability and reuse of knowledge assets.
[0030] The test agent verifies the feasibility of subtask solutions in a sandbox environment. Through this code testing phase, the test agent not only verifies the effectiveness of the integrated solution but also iteratively optimizes the solution based on the test results. For example, if a subtask solution has potential performance bottlenecks or fails to consider the operational conditions in a specific scenario, the test agent will provide feedback to the architect agent based on the test results. The reason for the failure will be returned to the scenario expert agent for further discussion, making necessary adjustments, and optimizing the solution until it fully meets the requirements.
[0031] Further, refer to Figure 3 , the steps of S121 include: S1211. The triage agent uses a natural language model to parse the development requirements, and generates semantic features of the requirements in combination with node embedding of the dynamic knowledge graph; S1212. The triage agent uses a pre-trained classification model to perform intent recognition on the development requirements and generate a structured intent label. S1213. The triage agent splits the development requirements based on the component dependencies in the dynamic knowledge graph, the requirement semantic features and the structured intent labels to obtain the multiple sub-development tasks.
[0032] If the product agent cannot find a historical solution that meets the development requirement through dynamic knowledge graph-based retrieval, the system uses a triage agent to decompose the requirement and identify potential issues, thereby breaking the original development requirement into multiple sub-tasks. First, the triage agent uses a natural language processing (NLP) model to parse the development requirement. This process uses the deep learning mechanism of the natural language model to transform the requirement text into machine-understandable structured information. Specifically, the triage agent combines node embeddings in the dynamic knowledge graph to extract the core characteristics of the requirement at a semantic level. Node embedding technology matches keywords, phrases, or concepts in the requirement with relevant nodes in the knowledge graph to generate semantic features of the requirement. This process not only improves the accuracy of requirement parsing but also ensures that implicit business logic in the requirement is identified and captured. Specifically, the triage agent uses a natural language processing model with a bidirectional Transformer architecture to semantically parse the development requirement input by the user, extracting the core verb-object structure, such as the "recognize" action and the "brainwave signal" object in "Develop → Brainwave Recognition System." During the parsing process, the dynamic knowledge graph is accessed simultaneously to obtain contextual information about the current development environment, including the DOM structure of deployed components, event binding relationships, and data flow dependencies. Graph Neural Networks (GNNs) are then used to encode relevant entity nodes, such as sensor interface components and signal processing modules, into high-dimensional vectors. The semantic parsing results are then fused with the knowledge graph node embedding vectors through an attention mechanism to generate a multidimensional requirement semantic feature vector. This vector comprises textual semantic features, graph embedding features, and contextual parameters. This feature vector serves as quantitative input for subsequent task decomposition, ensuring comprehensive understanding of requirements and contextual awareness.
[0033] Next, the triage agent uses a pre-trained classification model to identify the intent of the development requirements. Through this model, the triage agent can analyze the language features in the requirements and generate corresponding structured intent labels. These labels are used to represent the core goals and task types in the requirements, such as whether it involves data processing, interface design, performance optimization, etc. The purpose of intent recognition is to convert the abstract goals in the development requirements into specific, executable development tasks for subsequent task splitting and solution discussions. Specifically, the pre-trained classification model operates based on a hierarchical classification architecture. At the operation type recognition layer, a Softmax classifier is used to distinguish between the three basic operations of "add", "modify" and "delete", and the input is the main semantic features of the requirement semantic feature vector. At the functional domain recognition layer, the functional domain labels are annotated through a multi-label classification model, and the input is the full dimension of the feature vector.
[0034] After generating requirement semantic features and intent labels, the triage agent further splits the requirement based on component dependencies in the dynamic knowledge graph, combined with the requirement semantic features and structured intent labels. The dynamic knowledge graph provides a dependency network between components, effectively identifying the interconnections between modules within the requirement. For example, if a subtask depends on a database operation, the system automatically identifies this and splits it into subtasks containing the database operation. In this way, the system can decompose a complex development requirement into multiple smaller, independent sub-development tasks, each of which can be independently executed and optimized. Specifically, the triage agent performs atomic-level task splitting based on three core elements: component dependencies, requirement semantic features, and structured intent labels. Component dependencies are obtained by parsing the upstream and downstream connection paths of the target functional module in the knowledge graph. Requirement semantic features are used to determine task priorities based on the weight distribution in the feature vector. Within the structured intent labels, the triage agent determines the granularity of the split based on the operation type and limits the scope of the knowledge graph search based on the functional domain. The disassembly process also includes dual checks for parameter integrity and environmental compatibility, verifying that subtasks have all necessary input parameters and ensuring that their outputs match the technology stack and hardware constraints of the current development environment. The final output, an atomic subtask list, includes complete metadata descriptions, including dependency graphs, parameter constraints, and acceptance criteria, for processing by the scenario expert agent.
[0035] Further, refer to Figure 4 , the steps of S122 include: S1221, assigning a plurality of corresponding scenario expert agents to each of the sub-development tasks through the triage agent; S1222. Using each of the scenario expert agents to identify missing parameters and ambiguous parameters in the corresponding sub-development tasks, a plurality of clarification lists are generated. S1223. Obtain the clarification list through the product agent and continue to interact with the user until the supplementary clarification of the missing and ambiguous parameters is completed; S1224: Retrieve historical solutions similar to the domain of the sub-development task based on the dynamic knowledge graph and discuss solutions through the corresponding multiple scenario expert agents; S1225. When there is no conflict in the solution discussions of multiple scenario expert agents corresponding to the same sub-development task, the scenario expert agent outputs the result of the solution discussion as the sub-task process solution, and the architect agent integrates the sub-task process solution into the solution to be written.
[0036] The system uses multiple scenario expert agents to discuss solutions for each sub-development task, and then hands over the final sub-task process solution to the architect agent for solution testing. After the development requirements are broken down into multiple sub-tasks, the triage agent assigns multiple corresponding scenario expert agents to each sub-task. These expert agents handle specific task modules based on their expertise in their fields. For example, sub-tasks involving data processing may be assigned to agents with a background in data science and machine learning; while sub-tasks related to user interface design are assigned to UI design expert agents. In this way, the system ensures that each sub-task receives in-depth discussion and solution design in the professional field. Specifically, the triage agent matches the technical feature vector of the sub-development task with the capability label matrix of the scenario expert agent. The capability label matrix is dynamically updated based on the historical task execution results, and the cosine similarity algorithm is used to calculate the matching degree between the task and the expert.
[0037] After each scenario expert agent receives the assigned subtask, it will conduct a detailed analysis of the task content, especially identifying possible missing parameters and ambiguous items. Missing parameters refer to necessary inputs or information that may be missing in the subtask, and ambiguous items refer to parts of the requirements that may have multiple interpretations or are unclear. These expert agents will identify these problems based on their knowledge of their professional fields and generate multiple clarification lists, clearly indicating which parts need further clarification and supplementation. This process is an important step to ensure the completeness and accuracy of the task. Specifically, the scenario expert agent will first perform a static analysis by comparing the subtask description with the parameter templates of similar tasks in the knowledge graph, and then use the LLM reasoning engine to detect the implicit dependencies between parameters for dynamic inference, and finally generate a structured clarification list in JSON format, marking missing parameters and ambiguous items.
[0038] Next, the product agent will obtain these clarification lists and continuously interact with the user. Based on the questions listed in the clarification list, the user provides missing parameters or answers ambiguous items until the system confirms that all parameters and requirements have been fully clarified and supplemented. During this process, the product agent maintains continuous communication with the user to ensure that no critical development information is missed. Specifically, the product agent aggregates the clarification lists submitted by experts in various scenarios and uses deduplication and prioritization strategies to generate a user interaction sequence. The clarification process includes: progressive confirmation that only presents a single parameter confirmation request at a time; supports multimodal feedback through natural language responses and a visual configuration interface; and uses a conversation history LSTM model to maintain contextual memory of parameter context.
[0039] After all parameters and ambiguous items have been clarified, the system will retrieve historical solutions based on the dynamic knowledge graph. Through the information in the knowledge graph, the system can search for historical solutions similar to the current subtask domain and hand them over to multiple scenario expert agents for solution discussion. Based on its knowledge base and domain experience, the scenario expert agent combines the best practices in historical solutions to propose multiple possible solutions for discussion. These solutions will be further refined and optimized to ensure that they can solve current development needs and meet user business requirements. Specifically, the scenario expert agent performs semantic retrieval based on the completed subtask parameters, converts the task description into a SPARQL query statement, and retrieves domain-similar solutions from the dynamic knowledge graph. The parameter configuration of the historical solution is then adjusted and environmental constraints are injected. When multiple scenario expert agents reach the same conclusion, the solution discussion is integrated.
[0040] When multiple scenario expert agents propose solutions to the same subtask, if these solutions do not conflict, the system proceeds to the next stage. At this stage, the architect agent integrates the solutions proposed by the various scenario expert agents. If potential conflicts or issues exist within a solution, and the test agent fails the test, this information is fed back to the architect agent, who then discusses and adjusts or redesigns the solution to ensure its consistency and feasibility.
[0041] Further, refer to Figure 5 , after the step of S1224, the following steps are included: S1226. When a conflict arises in the discussion of solutions among multiple scenario expert agents corresponding to the same sub-development task, a group deliberation is conducted based on the context state information and the dynamic knowledge graph to obtain a consensus solution. The architect agent integrates the consensus solution and conducts solution testing.
[0042] During the solution discussion process, if multiple scenario expert agents conflict over the solution to the same subtask, such as disagreements on the choice of technical path or algorithm applicability, the system identifies these conflicts and initiates the next stage of resolution. Through collective deliberation, the system aggregates the opinions of each expert agent and analyzes them based on contextual state information to find the optimal solution. This process leverages contextual state information to analyze multiple factors, including the current development environment, evolving requirements, and technical feasibility, leveraging collective intelligence to find a consensus solution. Based on the detailed dependencies and historical solution patterns provided by the dynamic knowledge graph, the system further optimizes the conflicting areas and forms a consensus solution through multi-party discussion. Specifically, when multiple scenario expert agents propose conflicting solutions, multiple rounds of residual discussion are initiated. The discussion process consists of three phases: a hypothesis generation phase, in which each expert submits candidate solutions and their theoretical basis; an iterative verification phase, in which the core metrics of each solution are rapidly verified in a sandbox environment; and a consensus formation phase, in which a weighted voting method is used to determine the final solution. If a solution remains unresolved after 10 rounds, manual intervention is triggered. The weights in this weighted voting method are based on the historical accuracy of the scenario expert agents.
[0043] In one embodiment, referring to Figure 6 , after step S150, further comprising: S160. Receive the user's judgment result on the final code implementation solution through the thinking chain intelligent agent, and store the verification result in the correct answer knowledge base or the thinking chain knowledge base in the dynamic knowledge graph according to the judgment result.
[0044] In the method scheme of this embodiment, the multi-agent system also includes a thinking chain agent. After the architect agent completes the code generation and pushes the final code implementation plan to the user, the system receives the user's judgment result on the plan through the thinking chain agent. The user's judgment result may include feedback on the functions, performance, compatibility and other aspects of the code implementation. These feedbacks can be positive or negative, that is, the code meets the requirements or the code has defects and problems. Based on these judgment results, the thinking chain agent decides in which knowledge base to store the relevant information. Specifically, after the summary agent pushes the final code implementation plan, the thinking chain agent starts the user feedback processing flow. First, feedback information is collected, and the user's functional evaluation of the code implementation plan is collected through the natural language interface, the user operation log is captured, and the improvement suggestions provided by the user are analyzed.
[0045] Further, refer to Figure 7 , the steps of S160 include: S161. Receive, through the thinking chain agent, a user's intervention judgment result on the final code implementation solution; S162. If the intervention judgment result is that the final code implementation solution is correct, the thinking chain agent stores the final code implementation solution in the correct answer knowledge base; S163. If the intervention judgment result is that the final code implementation plan is wrong, the thinking chain agent extracts the thinking chain from the final code implementation plan and reflects on the error, and then stores the final code implementation plan and the thinking chain in the thinking chain knowledge base.
[0046] The Thinking Chain agent receives the user's intervention judgment results. If the user's intervention judgment results indicate that the pushed code implementation solution is in line with expectations, error-free and meets development requirements, the Thinking Chain agent will regard the solution as a successful code implementation and store it in the correct answer knowledge base. The correct answer knowledge base is part of the dynamic knowledge graph, which is used to store verified and required code solutions, successful test cases and best practices. These verified correct solutions will provide important references in the future development process and can be quickly matched and called by the agent to improve development efficiency and accuracy. Specifically, when the user confirms that the solution is correct, the Thinking Chain agent performs knowledge precipitation operations. This includes completing code vectorization through the Doc2Vec model, storing the relationship between the solution and the knowledge graph entity node in the form of triples for knowledge graph association, and improving the priority weight of the correct solution in semantic retrieval through retrieval optimization to ensure priority matching of subsequent similar requirements.
[0047] If the code implementation solution pushed by the user feedback contains errors or does not meet the requirements, the Thinking Chain Agent will conduct further analysis of the solution. During this process, the Thinking Chain Agent will first extract the relevant thinking chain from the erroneous code implementation solution, that is, reflect on and summarize information such as the problems involved, the type of error and its repair method. This reflection process helps the agent understand the root cause of the problem and improve the ability to identify errors in the future. Specifically, when the user determines that there is an error in the solution, the Thinking Chain Agent initiates an in-depth analysis process. This includes tracing back the entire development process log and locating key error nodes to complete error tracing, extracting the complete reasoning path of error generation and correction for structured storage to complete the thinking chain construction, using the pre-trained error classification model to attribute the error to complete the error pattern classification, and binding the thinking chain to the relevant nodes in the knowledge graph to form knowledge association storage.
[0048] These incorrect solutions and their corresponding thought chains are stored in a thought chain knowledge base. This knowledge base stores information such as failure cases, debugging logs, and error pattern classification models, helping the agent optimize the accuracy of requirements clarification and solution design. During the system's self-evolution, this stored information serves as training material, helping the agent gradually improve its code generation and debugging capabilities.
[0049] It's important to note that one of the primary functions of the Thinking Chain knowledge base is to train error pattern recognition models. By analyzing and summarizing past failure cases, the system can identify common error patterns and solidify these into static analysis rules, thereby improving the accuracy of future code development. By reflecting on and gradually correcting errors, the system avoids repeating them in subsequent development. Furthermore, by continuously learning from and summarizing failure cases, the intelligent agent gradually improves the requirements analysis and solution design process. This self-learning mechanism ensures that the software development system can continuously evolve and flexibly adapt to new requirements and challenges, providing high-quality solutions.
[0050] By leveraging the information stored in the Correct Answer Knowledge Base and the Thinking Chain Knowledge Base, the system continuously optimizes its code generation and problem-solving processes. Each time the knowledge graph engine performs semantic analysis, the system prioritizes the best practices and success stories in the Correct Answer Knowledge Base. Simultaneously, the system also leverages the failure cases in the Thinking Chain Knowledge Base for optimization, preventing the recurrence of similar errors and thus improving overall development efficiency and quality.
[0051] The method of the present invention can be applied to multiple fields, such as rapid development of enterprise-level applications, suitable for the digital transformation of traditional enterprises or the construction of cross-departmental collaboration tools, such as MES system customization for manufacturing enterprises, CRM development for the retail industry, automation of financial reimbursement processes, and HR performance management systems. It can enable non-technical department employees to directly generate applications that meet enterprise IT specifications by describing their needs in natural language. At the same time, it is also suitable for programming beginners and the development and use of management tools for teaching and educational institutions. It stores teaching cases through a powerful knowledge graph, supports users to quickly reuse and adapt them, and avoids common errors in student code through a triple verification system, thereby improving learning efficiency.
[0052] Figure 8 6 is a schematic block diagram of an artificial intelligence-based software development device 600 provided in an embodiment of the present invention. Figure 8 As shown, corresponding to the above-mentioned artificial intelligence-based software development method, the present invention also provides an artificial intelligence-based software development device 600. The artificial intelligence-based software development device 600 includes a unit for executing the above-mentioned artificial intelligence-based software development method, and the device can be configured in a terminal such as a desktop computer, a tablet computer, a smart phone, etc.
[0053] Specifically, see Figure 8 , the artificial intelligence-based software development device 600 includes: The requirement acquisition unit 610 is used to receive the user's development requirements through the natural language interaction interface and capture the context status information of the current development environment; A first historical solution retrieval unit 620 is configured to retrieve historical solutions to the development requirements through the product agent based on a dynamic knowledge graph; A first historical solution execution unit 630 is configured to, when a historical solution based on the development requirement is retrieved, generate executable code by the architect agent based on the historical solution according to a hierarchical code generation strategy; A rationality verification unit 640 is configured to perform syntax verification, operation verification, and requirement compliance detection on the executable code by the test agent based on a hierarchical verification mechanism and in combination with the context state information, and obtain a verification result; The result push unit 650 is used to summarize the executable code into a final code implementation solution and push it to the user through the summary agent when the test agent determines that the verification result meets the development requirements.
[0054] In one embodiment, the first historical solution retrieval unit 620 includes: A diagnosis and decomposition unit is configured to, when no historical solution to the development requirement is found, decompose and identify the development requirement through a triage agent, and decompose the development requirement into a plurality of sub-development tasks; A solution discussion unit is used to discuss the solution of each sub-development task through multiple scenario expert agents, obtain the sub-task process solution and hand it over to the architect agent for solution integration into a solution to be written; The test code generation unit encodes the to-be-written solution into executable code according to the hierarchical code generation strategy through the architect agent.
[0055] In one embodiment, the diagnostic decomposition unit includes: A semantic feature generation unit, configured to parse the development requirements using a natural language model through the triage agent, and generate semantic features of the requirements in combination with node embedding of the dynamic knowledge graph; An intent label generating unit, configured to identify the intent of the development requirement using a pre-trained classification model through the triage agent, and generate a structured intent label; A subtask splitting unit is used to split the development requirements through the triage agent based on the component dependencies in the dynamic knowledge graph, the requirement semantic features and structured intent labels to obtain the multiple sub-development tasks.
[0056] Furthermore, the solution discussion unit includes: A scenario expert allocation unit, configured to allocate a plurality of corresponding scenario expert agents to each sub-development task through the triage agent; a clarification list generating unit, configured to generate a plurality of clarification lists by identifying missing parameters and ambiguous parameters in the corresponding sub-development tasks through each of the scenario expert agents; An interactive clarification unit, configured to obtain the clarification list through the product agent and continuously interact with the user until the supplementary clarification of the missing and ambiguous parameter items is completed; A second historical solution retrieval unit is configured to retrieve historical solutions similar to the domain of the sub-development task based on the dynamic knowledge graph and conduct solution discussions through the corresponding multiple scenario expert agents; The second historical solution execution unit is used to, when there is no conflict in the solution discussions among the multiple scenario expert agents corresponding to the same sub-development task, enable the architect agent to integrate the results of the solution discussions and perform solution testing.
[0057] Furthermore, the second historical solution retrieval unit is also associated with: The group contemplation unit is used to output the result of the solution discussion as the subtask process solution when there is no conflict in the solution discussion of multiple scenario expert agents corresponding to the same sub-development task, and the architect agent integrates the subtask process solution into the solution to be written.
[0058] In one embodiment, the result push unit 650 is associated with: The knowledge base updating unit is used to receive the user's judgment result on the final code implementation solution through the thinking chain intelligent agent, and store the verification result into the correct answer knowledge base or thinking chain knowledge base in the dynamic knowledge graph according to the judgment result.
[0059] Furthermore, the knowledge base updating unit includes: An intervention judgment unit, configured to receive, through the thought chain agent, a user's intervention judgment result on the final code implementation solution; a correct solution updating unit, configured to store the final code implementation solution into the correct answer knowledge base through the thinking chain agent if the intervention judgment result indicates that the final code implementation solution is correct; The error solution updating unit is used to extract the thinking chain of the final code implementation solution and reflect on the error through the thinking chain agent if the intervention judgment result is that the final code implementation solution is wrong, and then store the final code implementation solution and the thinking chain in the thinking chain knowledge base.
[0060] The above-mentioned software development device 600 based on artificial intelligence can be implemented in the form of a computer program. The computer program can be used in Figure 9 Runs on the computer device shown.
[0061] See also Figure 9 , Figure 9 This is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 can be a terminal or a server. The terminal can be a desktop computer, tablet computer, smartphone, or other electronic device with communication capabilities. The server can be a standalone server or a server cluster consisting of multiple servers.
[0062] See Figure 9 The computer device 500 includes a processor 502 , a memory, and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .
[0063] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, which, when executed, can enable the processor 502 to execute an artificial intelligence-based software development method.
[0064] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
[0065] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a software development method based on artificial intelligence.
[0066] The network interface 505 is used to communicate with other devices over the network. Figure 9 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0067] The processor 502 is configured to run a computer program 5032 stored in the memory to implement the steps of the above method.
[0068] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0069] Those skilled in the art will appreciate that all or part of the steps in the method of the above-described embodiment can be implemented by instructing the relevant hardware through a computer program. The computer program includes program instructions, which can be stored in a storage medium that is computer-readable. The program instructions are executed by at least one processor in the computer system to implement the steps in the method of the above-described embodiment.
[0070] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor performs the steps of the above method.
[0071] The storage medium may be any computer-readable storage medium that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.
[0072] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0073] In the several embodiments provided herein, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the various units is merely a logical functional division, and actual implementation may employ other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented.
[0074] The steps in the methods of the embodiments of the present invention may be adjusted in order, combined, or deleted as needed. The units in the devices of the embodiments of the present invention may be combined, divided, or deleted as needed. Furthermore, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.
[0075] If this integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for enabling a computer device (such as a personal computer, terminal, or network device) to execute all or part of the steps of the method described in various embodiments of the present invention.
[0076] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A software development method based on artificial intelligence, characterized in that: Applied to a multi-agent system, including a product agent, an architect agent, a test agent, and a summary agent, the method includes: Receive user development requirements through a natural language interactive interface and capture the contextual status information of the current development environment; Retrieving historical solutions to the development requirements through the product agent based on a dynamic knowledge graph; When a historical solution based on the development requirement is retrieved, the architect agent generates executable code based on the historical solution according to a hierarchical code generation strategy; The test agent performs syntax verification, operation verification, and requirement compliance detection on the executable code based on a layered verification mechanism in combination with the context state information to obtain a verification result; When the test agent determines that the verification result meets the development requirements, the summary agent summarizes the executable code into a final code implementation solution and pushes it to the user.
2. The software development method based on artificial intelligence according to claim 1, characterized in that: The multi-agent system further includes a triage agent and a scenario expert agent. After the step of retrieving historical solutions to the development requirements based on the dynamic knowledge graph by the product agent, the system further includes: When no historical solution to the development requirement is found, the development requirement is decomposed and recognized by the triage agent, and the development requirement is decomposed into multiple sub-development tasks; A plurality of scenario expert agents discuss the solution for each sub-development task, obtain a sub-task process solution, and hand it over to the architect agent for solution integration into a solution to be written; The architect agent encodes the solution to be written according to a hierarchical code generation strategy to generate executable code.
3. The software development method based on artificial intelligence according to claim 2, characterized in that: When no historical solution to the development requirement is retrieved, the steps of decomposing and identifying the development requirement through a triage agent, and decomposing the development requirement into a plurality of sub-development tasks include: The triage agent uses a natural language model to parse the development requirements, and generates semantic features of the requirements in combination with node embedding of the dynamic knowledge graph; The triage agent uses a pre-trained classification model to identify the intent of the development requirements and generate a structured intent label; The triage agent splits the development requirements based on the component dependencies, the requirement semantic features and structured intent labels in the dynamic knowledge graph to obtain the multiple sub-development tasks.
4. The software development method based on artificial intelligence according to claim 2, characterized in that: The step of discussing the solution for each sub-development task by a plurality of the scenario expert agents, obtaining the sub-task process solution and handing it over to the architect agent for solution integration into the solution to be written includes: Allocate a plurality of corresponding scenario expert agents to each sub-development task through the triage agent; Identifying missing parameters and ambiguous parameters in the corresponding sub-development tasks by each of the scenario expert agents, and generating multiple clarification lists; Obtaining the clarification list through the product agent and continuously interacting with the user until the supplementary clarification of the missing and ambiguous parameters is completed; Retrieving historical solutions similar to the domain of the sub-development task based on the dynamic knowledge graph and conducting solution discussions through the corresponding multiple scenario expert agents; When there is no conflict in the solution discussions of multiple scenario expert agents corresponding to the same sub-development task, the scenario expert agent outputs the result of the solution discussion as the sub-task process solution, and the architect agent integrates the sub-task process solution into the solution to be written.
5. The software development method based on artificial intelligence according to claim 4, characterized in that: After the step of retrieving historical solutions similar to the scenario of the sub-development task based on the dynamic knowledge graph and discussing the solutions through the corresponding multiple scenario expert agents, the following steps are further included: When a conflict arises in the discussion of solutions among multiple scenario expert agents corresponding to the same sub-development task, a consensus solution is obtained through group deliberation based on the contextual state information and the dynamic knowledge graph, and the architect agent integrates the consensus solution and conducts solution testing.
6. The software development method based on artificial intelligence according to claim 1, characterized in that: The multi-agent system further includes a thinking chain agent, and after the step of summarizing the executable code into a final code implementation solution and pushing it to the user through the summarizing agent when the testing agent determines that the verification result meets the development requirements, the system further includes: The thinking chain agent receives the user's judgment result on the final code implementation solution, and stores the verification result in the correct answer knowledge base or the thinking chain knowledge base in the dynamic knowledge graph according to the judgment result.
7. The software development method based on artificial intelligence according to claim 6, characterized in that: The dynamic knowledge graph includes a correct answer knowledge base and a thought chain knowledge base. The steps of receiving the user's judgment result on the final code implementation solution through the thought chain agent and storing the verification result in the correct answer knowledge base or the thought chain knowledge base in the dynamic knowledge graph according to the judgment result include: Receiving, through the thought chain agent, a user's intervention judgment result on the final code implementation solution; If the intervention judgment result is that the final code implementation solution is correct, the final code implementation solution is stored in the correct answer knowledge base through the thinking chain intelligent agent; If the intervention judgment result is that the final code implementation plan is wrong, the thinking chain agent extracts the thinking chain from the final code implementation plan and reflects on the error, and then stores the final code implementation plan and the thinking chain in the thinking chain knowledge base.
8. A software development device based on artificial intelligence, characterized in that: Used to execute the artificial intelligence-based software development method according to any one of claims 1 to 7.
9. A computer device, characterized in that: The computer device includes a memory and a processor connected to the memory; the memory is used to store a computer program; the processor is used to run the computer program stored in the memory to perform the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 can be implemented.
Citation Information
Patent Citations
Code generator based on SSH (secure shell) architecture and method
CN102591654A
Multi-agent system generating method based on graphical expression
CN104978170A
Enterprise-level software development auxiliary system and method based on large model
CN117130592A
Management method for solution of artificial intelligence product of power system based on knowledge graph
CN117495335A
Code generation method and device based on agent, electronic equipment and storage medium
CN120295632A
Cited By
Design task intelligent decomposition method based on deep learning
CN120909802A
Software collaborative research and development assisting method and device, electronic equipment and storage medium
CN121051001A
Digital research and development demand automatic disassembling method based on knowledge reasoning
CN121390756A
Intelligent agent system for graphics processor development and graphics processor development method
CN121414568A
Agent system for graphics processor development and graphics processor development method
CN121414568B