Automatic software development method and device and computer program

By employing intelligent requirement analysis, finite state automata, and the collaborative execution of multi-specialized role intelligent agents, the problem of isolated stages in software development is solved, achieving full-process automation and efficient development, and ensuring the professionalism of the development process and the standardization of deliverables.

CN121657979APending Publication Date: 2026-03-13CLOUDCHAIN GRP CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202511754241.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing software development automation systems are isolated in each stage, rely on manual intervention, and lack intelligent collaboration, resulting in process breaks and low efficiency. They also lack multi-agent mechanisms that simulate deep collaboration among different professional roles, leading to numerous process breakpoints and insufficient intelligence.

Method used

By employing intelligent requirement parsing based on natural language processing, dynamic task orchestration using finite state automata, collaborative execution of multi-specialized role intelligent agents, and template-based intelligent verification mechanism, a closed-loop automated development process is constructed. Role intelligent agents search a preset knowledge graph and context database to generate the target software program and perform template file matching and verification.

Benefits of technology

It achieves full automation from product requirements to code generation, significantly reducing manual intervention, improving development efficiency, ensuring professionalism and decision-making quality in the development process, dynamically adapting to changes in the development process, and guaranteeing the standardization and consistency of deliverables.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121657979A_ABST
    Figure CN121657979A_ABST
Patent Text Reader

Abstract

According to the automatic software development method and device and the computer program, intelligent demand analysis is achieved through a natural language processing technology, dynamic task arrangement is conducted through a finite state automaton, collaborative development is completed by means of a multi-specialized role agent, intelligent verification is implemented based on a template matching mechanism, and the development efficiency is improved. And a complete automatic closed loop from demand to delivery is constructed. According to the scheme, full-process automation is realized, manual intervention is greatly reduced, and the development efficiency is remarkably improved; through division and cooperation of multiple agents, the professionality and decision-making quality of each link are ensured, and the capability limitation of a single agent is overcome; flexible and reliable process control is provided based on state machine management, and development state changes are dynamically adapted; and the standard consistency of the delivery result is ensured by combining template verification. According to the method, the problems of long development period, large quality fluctuation and the like caused by chain splitting, low intelligent level and excessive dependence on manpower of an existing development tool are effectively solved, and a feasible path is provided for comprehensive intelligence of software development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software development technology, and in particular to an automated software development method, apparatus and computer program. Background Technology

[0002] As software development becomes increasingly complex, optimizing development processes through automation has become a crucial research direction in the industry. Currently, existing technical solutions have significant limitations: traditional CI / CD systems (such as Jenkins) primarily focus on code integration and deployment, lacking intelligent processing capabilities for upstream requirements analysis and design; AI-assisted code generation tools (such as GitHub Copilot) can improve coding efficiency, but their code completion focus limits their ability to support project-level planning and cross-functional collaboration; and code quality management tools (such as SonarQube) are post-event quality inspection methods, unable to intervene early in the requirements and design phases to prevent problems.

[0003] Therefore, existing technical solutions generally suffer from functional fragmentation, process breakpoints, and insufficient intelligence. Specifically, they lack multi-agent mechanisms to simulate deep collaboration among different professional roles, rely on human experience for task decomposition and orchestration, have rigid template systems lacking adaptability, and have workflow engines that lack flexibility and cannot dynamically respond to complex and changing development scenarios. Therefore, there is an urgent need in this field for an automated software development quality assurance system that can achieve end-to-end intelligence, support multi-role professional collaboration, and possess adaptive capabilities. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide an automated software development method, apparatus, and computer program to eliminate or improve one or more defects existing in the prior art, and solve the problems of automation process disruption and low efficiency caused by isolated links, reliance on manual intervention, and lack of intelligent collaboration in existing automated software development systems.

[0005] One aspect of the present invention provides an automated software development method, the method comprising the following steps: Obtain the product requirements document, extract user scenarios, required functional modules and business rules from the product requirements document based on the natural language processing model, decompose them into one or more functionally independent user requirements and determine the priority and dependency of their development tasks. Based on the priorities and dependencies of the development tasks, a task execution plan is constructed and managed by pre-setting state transition rules and conditions using a finite state automaton model. The development tasks are distributed to corresponding specialized role agents according to the task content. The role agents include product manager agents, system architect agents, database architect agents, development engineer agents, and test engineer agents. The target software program is developed according to the task execution plan. The role agents search the preset knowledge graph and context database, and generate the target software program using a large language model combined with retrieval enhancement generation. Based on pattern matching, template files related to the development task are searched in the code repository. The template constraints and dependencies recorded in the template files are analyzed and used to verify the target software program. If the verification is successful, the program is integrated to generate a delivery package.

[0006] In some embodiments, based on a natural language processing model, user scenarios, required functional modules, and business rules are extracted from the product requirement document, decomposed into one or more functionally independent user requirements, and their development tasks are prioritized and their dependencies are determined, including: The product requirement document is formatted and plain text information is extracted. The hierarchical structure of the product requirement document is identified and a hierarchical relationship is constructed. The user scenario, the required functional modules, and the business rules are extracted from the product requirement document using a natural language processing model based on the BERT model or the DeBERTa model; or, the user scenario, the required functional modules, and the business rules are extracted from the product requirement document based on a preset regular expression. Based on a pre-set business logic rule database, the functional modules and business rules required in the user scenario are decomposed to obtain one or more functionally independent user requirements, and their priorities and dependencies are determined.

[0007] In some embodiments, based on the priority and dependencies corresponding to the development tasks, a task execution plan is constructed and managed by pre-setting state transition rules and conditions using a finite state automaton model, including: Build project-level states, including planning, execution, integration and verification, delivery and completion states under normal progress, as well as task pause and task failure states under abnormal progress. Construct user-requirement-level states, including: pending start state, requirement analysis state, waiting for dependencies state, agent execution state, quality check state, and completion state; Construct the working state of the role-based intelligent agent, including: created and loaded, assigned, executing, successful execution, failed execution, and retrying states; A state transition rule base is established for the project-level state, the user requirement-level state, and the role-based intelligent agent working state, so as to monitor, query, check, execute, and record the software development process based on preset rules; Build historical archives to persist records of changes to the current and historical states of various parts during software development, enabling breakpoint location and recovery of software development progress; Pre-defined exception handling and recovery logic, triggering retries for pre-defined temporary faults and establishing rollback strategies for failure scenarios of pre-defined critical tasks; A manual intervention interface is set up to introduce manual operation under preset fault conditions.

[0008] In some embodiments, the construction steps of the role-based intelligent agent include: A knowledge base and toolchain are established according to the functions of each role; the knowledge base is used to store domain knowledge corresponding to the functions of each role, including subject knowledge graphs and enterprise standard documents; the toolchain includes external tools required to implement the functions of each role. For each role-based intelligent agent, a corresponding training sample set is established for the input and output content. The input is introduced by establishing prompt word engineering to introduce role instructions, task descriptions and contextual information, and the large language model based on Transformer is trained. The target content is output by retrieval enhancement generation based on the knowledge base. The reward function is constructed for the target content of the output of each role function based on reinforcement learning, and the parameters of the large language model are updated by maximizing the expected reward value to form the corresponding role-based intelligent agent. The role instruction describes the role type, the task description describes the development task, its priority, and its dependencies, and the context information is the closest code example retrieved from the knowledge base.

[0009] In some embodiments, the method maintains the unified workflow engine to perform end-to-end coordination management: During the system initialization phase, the roles and intelligent agents are configured, loaded, self-checked, and allocated computing resources. During the intelligent task planning phase, the product requirement document is analyzed, tasks are decomposed, and a task execution plan is formulated. During the automated content generation phase, the roles and intelligent agents are scheduled to collaborate to generate software content according to user needs and are monitored. During the integration and verification phase, cross-task consistency checks, integration tests, and quality verifications are performed based on the template file. During the final delivery phase, the delivery package is integrated and completed.

[0010] In some embodiments, the role-based intelligent agents communicate asynchronously using a publish-subscribe model, and transmit data based on standardized message protocols and data formats.

[0011] In some embodiments, the method further includes: after verifying the target software program, if an anomaly is found, implementing cascading failure protection in circuit breaker mode, and performing automatic task rollback and retry according to the checkpoint mechanism.

[0012] On the other hand, the present invention also provides an automated software development apparatus, including a processor, a memory, and a computer program or instructions stored in the memory, wherein the processor is used to execute the computer program or instructions, and when the computer program or instructions are executed, the apparatus implements the steps of the above method.

[0013] On the other hand, the present invention also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.

[0014] On the other hand, the present invention also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.

[0015] The automated software development method, apparatus, and computer program described in this invention construct a complete automated development closed loop by introducing intelligent requirement parsing based on natural language processing, dynamic task orchestration using finite state automata, collaborative execution of multiple specialized intelligent agents, and a template-based intelligent verification mechanism. First, it achieves full-process automation from product requirements to code generation, significantly reducing manual intervention and improving development efficiency. Second, the multi-agent collaborative mechanism ensures the professionalism and decision-making quality of each development stage, effectively overcoming the limitations of a single intelligent agent. Third, the finite state machine-based task management provides flexible and reliable process control, dynamically adapting to state changes during development. Finally, the template-matching verification mechanism ensures the standardization and consistency of deliverables. This invention effectively solves the industry pain points of fragmented development toolchains, low levels of intelligence, and excessive reliance on human experience, leading to long development cycles and large quality fluctuations, providing a feasible technical path for achieving comprehensive intelligent software development.

[0016] Additional advantages, objects, and features of the invention will be set forth in part in the description which follows, and will also become apparent in part to those skilled in the art upon studying the text, or may be learned by practice of the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures specifically pointed out in the description and drawings.

[0017] Those skilled in the art will understand that the objectives and advantages achievable with the present invention are not limited to those specifically described above, and that the above and other objectives achievable with the present invention will become clearer from the following detailed description. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, are not intended to limit the scope of the invention. In the drawings: Figure 1 This is a flowchart illustrating an embodiment of the automated software development method of the present invention.

[0019] Figure 2 This is a schematic diagram of the structure of an automated software development system according to an embodiment of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.

[0021] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.

[0022] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.

[0023] The current state of software development automation technology is fragmented. Continuous integration tools, code generation assistants, and quality management platforms are functionally limited and independent. They generally suffer from fragmented process links, over-reliance on human experience, and a lack of cross-role intelligent collaboration mechanisms. This results in technical bottlenecks such as low automation levels throughout the software development process, limited efficiency improvements, and difficulty in ensuring consistent quality.

[0024] In view of this, the present invention provides an automated software development method, such as Figure 1 As shown, the method includes the following steps S101~S104: Step S101: Obtain the product requirements document, extract user scenarios, required functional modules and business rules from the product requirements document based on the natural language processing model, decompose them into one or more functionally independent user requirements and determine the priority and dependency relationship of their development tasks.

[0025] Step S102: Based on the priority and dependencies of the development tasks, use a finite state automaton model to preset state transition rules and conditions, and construct and manage the task execution plan.

[0026] Step S103: Distribute the development tasks to the corresponding specialized role agents according to the task content. The role agents include product manager agents, system architect agents, database architect agents, development engineer agents, and test engineer agents. Develop the target software program according to the task execution plan. The role agents search the preset knowledge graph and context database, and generate the target software program using a large language model combined with retrieval enhancement generation.

[0027] Step S104: Based on pattern matching, search for template files related to the development task in the code repository, analyze the template constraints and template dependencies recorded in the template files, and use them to verify the target software program. If the verification is successful, integrate and generate a delivery package.

[0028] The core of step S101 is to rely on deep PRD analysis algorithms and requirement decomposition technologies to complete the breakdown and planning from product requirement documents to executable development tasks. Implementation requires a three-tiered approach. First, Natural Language Processing (NLP) technology is used to perform structured parsing of the PRD. Semantic analysis and domain knowledge graphs are used to extract core information. For example, for a PRD for adding a membership points function to an e-commerce app, it can automatically identify user scenarios such as points inquiry, points redemption for goods, and points expiration reminders, as well as functional modules such as points calculation and membership level modules. It also identifies business rules such as a 12-month points validity period and 1 point earned for every 1 yuan spent. Second, based on the requirement decomposition algorithm, this information is broken down into functionally independent user requirements. For example, redeeming goods with points is broken down into independent user requirements such as the user selecting a product to initiate redemption, the system verifying the points balance, and deducting points upon successful redemption. Each requirement corresponds to an executable development task. Finally, dependency analysis algorithms are used to identify the relationships between tasks. For example, the task of redeeming goods with points depends on the completion of the task of querying points. Then, by using priority ranking algorithms, combined with business value (such as the high priority of points expiration reminders which directly affect user retention), technical risks (such as the high risk of the points calculation module involving integration with the old system which requires priority assessment), and resource constraints, a requirement tree, dependency graph, and priority matrix are generated. This determines that the development of the points calculation module is a high-priority task, and the design of the points mall interface is a second-priority task.

[0029] This step serves as the entry point for the "understanding-transformation" of requirements in the automated pipeline, essentially building a requirement structuring engine. The implementation requires a layered approach: First, PRDs in PDF, Word, and other formats are converted into Markdown structured text using OCR and a document parser, preserving heading levels, tables, and lists. Then, a multimodal large language model (such as Qwen-VL or GPT-4V) is used for deep semantic extraction, not only recognizing literal content but also understanding the implicit relationships between requirements. After extraction, a semantic clustering algorithm automatically aggregates hundreds of original requirements into 20-30 functionally independent user story clusters. Each story cluster needs to be analyzed using a Dependency Graph Neural Network (DNN) to determine data flow and control flow dependencies; for example, the rendering story of a payment page depends on the completion of the payment interface definition story. Finally, the Analytic Hierarchy Process (AHP) is used to calculate a priority weight matrix, comprehensively evaluating business value, technical debt, and user impact scores. This process must ensure a requirement coverage rate of over 95% and a dependency recognition accuracy rate of over 85%.

[0030] In some embodiments, user scenarios, required functional modules, and business rules are extracted from product requirement documents based on a natural language processing model, decomposed into one or more functionally independent user requirements, and their development tasks are prioritized and their dependencies are determined, including steps S1011~S1013: Step S1011: Standardize the format of the product requirement document, extract plain text information, identify the hierarchical structure of the product requirement document, and construct hierarchical relationships.

[0031] Step S1012: Use a natural language processing model based on BERT or DeBERTa to extract user scenarios, required functional modules, and business rules from the product requirements document; or, extract user scenarios, required functional modules, and business rules from the product requirements document based on preset regular expressions.

[0032] Step S1013: Based on the preset business logic rule database, decompose the functional modules and business rules required in the user scenario to obtain one or more functionally independent user requirements, and determine their priority and dependencies.

[0033] Steps S1011-S1013 construct a complete process from Product Requirements Document (PRD) preprocessing to requirement decomposition and planning. The core is to achieve intelligent transformation of the PRD into executable user requirements through standardized preprocessing, multi-method information extraction, and rule-based decomposition and planning: First, the PRD is formatted and plain text information is extracted, while its hierarchical structure is identified and hierarchical relationships are constructed, clearing format obstacles and clarifying document logic for subsequent information extraction; then, semantic information is extracted using a BERT / DeBERTa-based natural language processing model, or rule-based information capture is performed using preset regular expressions to accurately obtain user scenarios, functional modules, and business rules—this is a concrete implementation of the deep PRD analysis algorithm in the patent; finally, relying on a preset business logic rule database, the extracted information is decomposed to obtain functionally independent user requirements, and the priority of development tasks is determined by combining business value, technical risks, and other dimensions. Dependencies between tasks are identified through data flow analysis and business logic reasoning, corresponding to the requirement decomposition, dependency analysis, and priority ranking algorithms in the patent, solving the problems of manual task decomposition and low intelligence in existing technologies.

[0034] Step S102 constructs and manages a task execution plan based on finite state automata theory and task scheduling algorithms. The core is to achieve controllable transitions between task states and optimize the execution order. First, the state transition rules and conditions for tasks are defined using a finite state automata model. The core states of a task are preset to include pending execution, in progress, pending review, completed, and abnormally paused. State transition conditions are also set; for example, a "pending execution" task must have its prerequisite tasks completed and resources allocated before transitioning to "in progress." A "in progress" task will transition to "abnormally paused" if a code error or insufficient resources occur. Second, a task execution plan is constructed based on the above state rules. Priority queues and resource-aware scheduling algorithms are used to optimize the execution order. For example, high-priority tasks such as "integration calculation module development" are added to the execution queue first. Simultaneously, hardware and agent resources are allocated to tasks based on the system's current computing resources and agent load. Finally, the progress monitoring mechanism tracks the task status in real time. If a task is abnormally paused, causing subsequent tasks to be blocked, the system will automatically trigger a status warning and adjust the execution plan according to preset rules. For example, the execution time of the "points redemption for goods" task will be postponed until the preceding "points calculation module development" task resumes execution.

[0035] Step S102 aims to construct a controllable, predictable, and fault-tolerant execution plan for the task set output from S101. This is specifically implemented using a finite state automaton (FSM) model. In this model, each development task is defined as a state node, such as "pending," "ready," "in execution," "blocked," "completed," or "failed." The state transition rules and conditions are preset and managed by the FSM's transition functions.

[0036] During implementation, the system initializes a state machine instance, initially in the "Pending" state. The engine drives state transitions based on the dependencies defined in S101: for example, when all prerequisite tasks of a task are in the "Completed" state, the task's state automatically transitions from "Pending" to "Ready." The task scheduler prioritizes tasks with high priority that are in the "Ready" state, transitions their state to "Executing," and allocates execution resources. If an exception is encountered during execution (such as a dependent service becoming unavailable), the task state can transition to "Blocked" or "Failed," triggering pre-defined exception handling logic, such as rollback or retry mechanisms. Through this state machine-based management, the task execution plan is no longer a static list but an intelligent agent capable of dynamically responding to internal system events and external environmental changes, ensuring the orderly and robust nature of the entire development process.

[0037] In some embodiments, based on the priority and dependencies corresponding to the development tasks, a task execution plan is constructed and managed by pre-setting state transition rules and conditions using a finite state automaton model, including steps S1021~S1027: Step S1021: Construct project-level states, including planning state, execution state, integration and verification state, delivery state, and completion state under normal progress, as well as task paused state and task failed state under abnormal progress.

[0038] Step S1022: Construct user requirement-level states, including: pending start state, requirement analysis state, waiting for dependencies state, agent execution state, quality check state, and completion state.

[0039] Step S1023: Construct the working state of the role intelligent agent, including: created and loaded, assigned, executed, executed successfully, executed unsuccessfully, and retryed.

[0040] Step S1024: Establish a state transition rule base for the project-level state, the user requirement-level state, and the role-based intelligent agent working state, so as to monitor, query, check, execute, and record the software development process based on preset rules.

[0041] Step S1025: Build a history archive to persist the current state and historical state change records of each part during the software development process, so as to realize the breakpoint location and recovery of the software development progress.

[0042] Step S1026: Preset exception handling and recovery logic, trigger retries for preset temporary faults and establish rollback strategies for preset critical task failure scenarios.

[0043] Step S1027: Set up a manual intervention interface to introduce manual operation under preset fault conditions.

[0044] Steps S1021-S1027, based on the finite state automaton model, establish a comprehensive task execution plan construction and management mechanism, encompassing hierarchical state construction, rule system establishment, state persistence, exception handling, and manual intervention as a safety net. First, a three-tiered state system is built: project-level (including normal and abnormal progress states), user requirement-level, and role-based intelligent agent work-level. This covers all levels of state dimensions in software development, from the overall project to the execution of specific intelligent agents. Then, a unified state transition rule library is established for these three levels, enabling full-process control over software development, including monitoring and querying. Simultaneously, persistent state storage and breakpoint location and recovery are achieved through historical archive construction, ensuring the continuity of development progress. Exception handling and recovery logic is pre-set to handle temporary fault retries and critical task failure rollbacks. Finally, a manual intervention interface is set up to introduce manual operation under pre-set fault conditions where the system automatically handles failures, forming an automated control and manual safety net task execution plan management model. This solves the problems of insufficient workflow orchestration flexibility and weak state management and exception handling capabilities in existing technologies.

[0045] The core of step S103 is to rely on the collaborative mechanism of specialized role intelligent agents and combine it with retrieval-enhanced generation (RAG) technology to complete the development of the target software program. Specific implementation revolves around two main stages: task distribution and agent execution. First, based on the content characteristics of the development task, it is distributed to the corresponding specialized role intelligent agents. For example, for the development task of "e-commerce APP member points function," "detailing the points function PRD" is distributed to the product manager intelligent agent, "designing the overall architecture of the points system" is distributed to the system architect intelligent agent, "designing the points database table structure" is distributed to the database architect intelligent agent, "writing points calculation code" is distributed to the development engineer intelligent agent, and "designing points function test cases and executing tests" is distributed to the test engineer intelligent agent. Secondly, when each intelligent agent performs a task, it first retrieves relevant information from a pre-defined professional knowledge graph and context database using vector databases and semantic search. For example, the development engineer agent retrieves "Java language points calculation code template" and "e-commerce points business logic case". These search results are then input into a large language model, and the target code is generated using a search-enhanced generation method. Simultaneously, agents synchronize information through standardized collaboration interfaces. For instance, the system architect agent synchronizes the architecture design document with the development engineer agent to ensure consistency throughout the development process. Taking "points calculation module development" as an example, after retrieving relevant code templates and business rules, the development engineer agent generates runnable points calculation code. The test engineer agent then designs test cases based on this code, completes functional testing, and reports any issues.

[0046] Step S103 is the core of achieving specialized division of labor and collaboration. It intelligently distributes the tasks managed by the state machine in S102 to the corresponding specialized intelligent agents based on their content attributes. Each intelligent agent is not a general-purpose chatbot, but a virtual expert integrating professional domain knowledge and large language model capabilities.

[0047] Specifically, when the development engineer agent receives a task to implement a user login interface, it first accesses a pre-defined knowledge graph (which stores technology stack documents, design patterns, coding standards, etc.) and a context database (which stores the current project's architectural decisions, implemented code modules, etc.). Then, it utilizes a large language model, combined with retrieval-enhanced generation techniques, inputting relevant specifications, API documents, and code snippets retrieved from the knowledge base as enhanced context into the LLM. The LLM then generates code that meets project requirements, technical specifications, and is syntactically correct, such as Java code for a Spring Boot controller class. Similarly, the product manager agent generates user story details and acceptance criteria based on the business knowledge base; the system architect agent generates microservice partitioning schemes and technology selection recommendations; the database architect agent generates SQL table structure scripts; and the test engineer agent generates corresponding unit test cases. All these agents work in parallel or sequentially, communicating and exchanging data through standardized message interfaces to collaboratively generate the target software program.

[0048] In some embodiments, the construction step of the role-based intelligent agent includes steps S1031 to S1032: Step S1031: Establish a knowledge base and toolchain according to the functions of each role; the knowledge base is used to store domain knowledge corresponding to the functions of each role, including subject knowledge graphs and enterprise standard documents; the toolchain includes external tools required to implement the functions of each role.

[0049] Step S1032: Establish corresponding training sample sets for the input and output content of each role agent. The input is introduced by establishing prompt word engineering to introduce role instructions, task descriptions and context information, and the large language model based on Transformer is trained. The target content is output by retrieval enhancement generation based on knowledge base. The reward function is constructed for the target content of the output of each role function based on reinforcement learning and the parameters of the large language model are updated by maximizing the expected reward value to form the corresponding role agent.

[0050] Among them, the role instruction is used to describe the role type, the task description is a description of the development task, its priority and dependencies, and the context information is the closest code example retrieved from the knowledge base.

[0051] Specifically, firstly, a hierarchical knowledge base and extensible toolchain are established for each role-based intelligent agent. The bottom layer of the knowledge base uses Neo4j to construct a subject-specific knowledge graph to solidify domain entity relationships. For example, the system architect intelligent agent needs to store professional constraints such as microservice decomposition principles and database paradigm theory. The middle layer uses the Milvus vector database to accumulate code snippets from historical projects and architectural decision cases to achieve experience reuse. The top layer encapsulates documented systems such as enterprise coding standards and security red lines based on a rules engine to form hard constraints. At the same time, the toolchain needs to encapsulate external tools such as Jenkins API, SonarQube scanning, and Swagger generation, and use standardized REST interfaces or Python. The SDK is provided for the intelligent agent to call. Then, high-quality input and output samples are collected for each role to build a training set. On the input side, a prompt template is dynamically constructed by combining three elements: role instructions (e.g., "You are a senior architect who strictly follows SOLID principles"), structured task descriptions (including the priority, dependencies, and technical constraints of the S102 state machine output), and contextual information (Top-5 similar code examples retrieved from the knowledge base and their corresponding acceptance criteria). The output consists of standardized code, design documents, or test cases reviewed by human experts. Subsequently, a RAG-enhanced Transformer architecture is used for supervised fine-tuning, such as based on CodeT5 or StarCoder. During training, the underlying parameters are frozen, and only the top-level adapter is updated to retain general coding capabilities. Finally, a reward function is built based on the PPO reinforcement learning framework, setting dynamic scores of +5 to -10 for the three dimensions of standardization, completeness, and maintainability of the generated content. Standardization is reflected in whether it matches the enterprise code scan pass rate; completeness is reflected in whether it meets all interface definitions that the task depends on; and maintainability is reflected in cyclomatic complexity and code duplication. By continuously updating model parameters through self-play and human feedback data, a specialized intelligent agent with precise domain knowledge retrieval, dynamic tool invocation, and self-optimization of generation quality is ultimately formed. Its decision accuracy must reach more than 85% and pass A / B testing before it can be connected to the S103 distributed collaborative pipeline.

[0052] In some embodiments, the method maintains the unified workflow engine to perform full-process coordination and management: during the system initialization phase, the role-based intelligent agents are configured, loaded, self-checked, and computing resources are allocated; during the intelligent task planning phase, the product requirement document is analyzed, tasks are decomposed, and a task execution plan is formulated; during the automated content generation phase, the various role-based intelligent agents are scheduled to collaborate to generate software content according to user needs and are monitored; during the integration and verification phase, cross-task consistency checks, integration tests, and quality verification are performed based on the template file; and during the final delivery phase, the delivery package is integrated and completed.

[0053] Step S104 involves using an intelligent template processing system and quality verification technology to complete the verification and delivery package integration of the target software program. This process is divided into three stages: template retrieval, verification, and delivery. First, file system scanning and pattern matching algorithms are used to retrieve template files related to the development task from the code repository. For example, for a points database table structure development task, e-commerce database table structure templates and points system field design templates are automatically matched. Next, a YAML / JSON parser analyzes the constraints (e.g., points fields must be positive integers, user ID fields must be associated with the user table) and dependencies (e.g., the points record table depends on the primary key of the user table) in the template files. Second, these template constraints and dependencies are used to perform multi-dimensional verification of the target software program, including structural integrity checks (e.g., verifying whether the database table contains required fields such as points balance and accumulated points), syntax and format verification (e.g., checking whether the code conforms to Java coding standards), and business logic consistency verification (e.g., verifying whether the points calculation code conforms to the business rule of accumulating 1 point for every 1 yuan spent). If the verification fails, the system will provide specific feedback and require the agent to be refactored; if the verification passes, the system will proceed to the final delivery stage, where the target software program, design documents, test reports, and other deliverables will be integrated according to a unified delivery standard to generate a delivery package. For example, the code package for the points function, the database design document, and the test case report will be integrated into a delivery package for the e-commerce APP member points function, and delivery confirmation will be completed.

[0054] Step S104, based on pattern matching technology, searches for template files most relevant to the current development task in a predefined code repository or template library. These template files are high-quality code or documentation paradigms that conform to best practices, such as standard RESTful API interface templates, database table structure design templates, or project documentation templates. During implementation, the system analyzes these template files, extracting the template constraints and dependencies recorded within them. Subsequently, the system compares and verifies the target software program generated by the agent in S103 with the matched templates. This verification is not only a simple syntax check but also a structural and logical consistency check. For example, it verifies whether the generated API interface contains all the required fields required by the template, whether the data format conforms to the constraints, and whether the necessary dependencies are declared. If the verification passes, the system integrates all the verified modules, documents, and configuration scripts and packages them into a final deployable delivery package; if the verification fails, an error report is generated and fed back to the corresponding agent for correction, forming a closed-loop quality control process.

[0055] In some embodiments, the role-based intelligent agents communicate asynchronously using a publish-subscribe model, and transmit data based on standardized message protocols and data formats.

[0056] Specifically, collaboration between role-based intelligent agents is achieved through an asynchronous communication mechanism using a publish-subscribe pattern. A central message broker acts as the communication intermediary, and each specialized role-based intelligent agent subscribes to specific message topics according to its functional role. When an agent completes its task or generates an event requiring collaboration, it acts as a publisher, encapsulating the execution result or status update into a message conforming to a standardized protocol (such as JSON or Protocol Buffers format) and publishing it to the corresponding topic. Simultaneously, all other intelligent agents subscribed to that topic will automatically receive this message and perform subsequent processing. This communication architecture effectively decouples system components, ensuring the reliability and timeliness of information transmission in high-concurrency task environments, while also guaranteeing interoperability between heterogeneous intelligent agents through standardized data formats. This provides underlying communication support for large-scale, multi-role automated collaborative development.

[0057] In some embodiments, the method further includes: after verifying the target software program, if an anomaly is found, implementing cascading failure protection in circuit breaker mode, and implementing automatic task rollback and retry according to the checkpoint mechanism.

[0058] In this embodiment, the system constructs a robust exception handling system by introducing a circuit breaker pattern and a checkpoint mechanism: when the verification process detects an anomaly in the target software program, the circuit breaker immediately interrupts the execution link to prevent the anomaly from spreading to upstream and downstream tasks and causing cascading failures; simultaneously, the system quickly locates the nearest valid state node based on pre-set checkpoints, automatically triggers task rollback to that stable state, and initiates a controllable retry after eliminating the cause of the anomaly. This protection mechanism not only effectively curbs the impact of local anomalies on the overall project progress, but also significantly reduces the cost of manual intervention through state restoration and automated recovery processes, thereby improving the fault tolerance and continuity of complex software development processes while ensuring system stability.

[0059] On the other hand, the present invention also provides an automated software development apparatus, including a processor, a memory, and a computer program or instructions stored in the memory, wherein the processor is used to execute the computer program or instructions, and when the computer program or instructions are executed, the apparatus implements the steps of the above method.

[0060] On the other hand, the present invention also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.

[0061] On the other hand, the present invention also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.

[0062] The present invention will now be described in conjunction with specific embodiments: This embodiment provides an automated software development system, such as Figure 2 As shown, it includes the following: 1. Hierarchical intelligent agent orchestration subsystem, which adopts a three-layer architecture design: The first layer: Full Requirement Orchestrator, used for overall project planning and batch task management.

[0063] Equipped with a deep PRD analysis algorithm, it uses natural language processing technology to parse product requirement documents and extract functional modules, user scenarios, and business rules. It also features a requirement decomposition algorithm that automatically breaks down complex requirements into a set of executable user stories based on semantic analysis and domain knowledge. Furthermore, it employs a dependency analysis algorithm to automatically identify dependencies between tasks through data flow analysis and business logic reasoning. Finally, it utilizes a priority ranking algorithm to automatically determine task execution priorities based on business value, technical risks, and resource constraints. The second layer is the Automation Orchestrator, which is used for automated orchestration and state management in a single story development cycle.

[0064] Specifically, state machine-based management, based on finite state automata theory, defines the state transition rules and conditions for tasks. It incorporates a task scheduling algorithm, employing priority queues and resource-aware scheduling to optimize task execution order. Based on an agent communication protocol, it defines standardized message formats and communication interfaces to ensure reliable communication between agents. With a progress monitoring mechanism, it tracks task execution status in real time, providing progress prediction and risk warnings.

[0065] The third layer consists of role-specific agents, which are used for specialized task execution and decision-making.

[0066] Establish a professional knowledge base, building a dedicated knowledge graph and skill set for each role. Construct a context management system, maintaining task execution context information through vector databases and semantic search. Train decision-making models based on reinforcement learning and expert systems, training role-specific decision-making models. Agent types include product manager agents, system architect agents, database architect agents, development engineer agents, and test engineer agents. Build collaboration interfaces with standardized input / output interfaces to support seamless collaboration with other agents.

[0067] 2. Intelligent template processing subsystem, used for intelligent understanding, adaptation and content generation of templates.

[0068] Template discovery and structure parsing are performed: Template files are automatically discovered using file system scanning and pattern matching algorithms. A YAML / JSON parser is used to analyze the template structure, extracting field hierarchy and validation rules. A template metadata model is built, including field types, constraints, dependencies, etc.

[0069] Execution Requirements Understanding and Mapping: Analyze project requirements and context using natural language processing technology, match requirements to template fields through semantic similarity algorithms, establish a requirement-template mapping table, and support dynamic field binding.

[0070] Execute intelligent content generation: Build a database design generator that automatically generates database table structures, relationships, and constraints based on domain modeling and paradigm theory. Build an API specification generator that automatically generates RESTful API interface definitions based on business logic and data models. Build a task decomposition generator that automatically decomposes functional requirements into specific development tasks based on software engineering methodologies.

[0071] Perform content quality verification: Check the structural integrity to ensure the generated content conforms to the template structure requirements. Perform syntax and format verification to check the correctness of Markdown, YAML, and other formatting. Perform business logic consistency verification to ensure the generated content is consistent and reasonable in terms of business logic.

[0072] 3. A unified workflow engine for unified coordination and control of the entire system. Specifically, it implements the following functions: 3.1 Implement five-stage workflow control: System initialization phase: system health check, resource pre-allocation, configuration loading.

[0073] Intelligent task planning phase: requirements analysis, task decomposition, and execution strategy formulation.

[0074] Automated content generation phase: intelligent agents collaborate in execution, content generation, and real-time monitoring.

[0075] Integration verification phase: cross-task consistency check, integration test, quality verification.

[0076] Final delivery phase: results integration, delivery package generation, and completion confirmation.

[0077] 3.2 State Machine Management: The system uses a finite state automaton model to describe the state transitions, implements state persistence and recovery mechanisms, and supports concurrent state management and deadlock detection.

[0078] 3.3 Anomaly Handling and Recovery: Implement an anomaly detection mechanism to monitor system operation status and identify abnormal situations. Implement an automatic recovery strategy, using a checkpoint mechanism to achieve automatic rollback and retries. Implement cascading failure protection, employing a circuit breaker pattern to prevent anomaly propagation.

[0079] 3.4 Resource Management and Optimization: Perform dynamic resource allocation, allocating computing resources dynamically based on task requirements and system load. Perform load balancing, distributing agent workloads using round-robin and weighted algorithms. Perform performance monitoring, collecting and analyzing system performance metrics in real time.

[0080] 3.5 System Integration and Collaboration Mechanism Construct an inter-agent communication architecture, adopt a publish-subscribe pattern to achieve asynchronous communication, use message queues (such as Apache Kafka) to ensure reliable message delivery, and define standardized message protocols and data formats.

[0081] Build a data management architecture, use a distributed database to store project data and execution status, adopt a version control mechanism to manage document and code changes, and implement data backup and disaster recovery mechanisms.

[0082] Build a security and access control architecture, manage agent permissions based on role-based access control (RBAC), protect sensitive data transmission with encrypted communication, and deploy audit logs to record all critical operations.

[0083] Compared with the prior art, this embodiment has the following significant advantages: 1. Significantly improved intelligent multi-agent coordination capabilities Traditional project management tools and workflow platforms primarily rely on preset rules and manual allocation, lacking intelligent decision-making capabilities. This embodiment achieves intelligent task decomposition, allocation, and coordination through a three-layer intelligent agent orchestration architecture. The full-requirement orchestrator can automatically analyze the PRD and generate a complete task set, improving efficiency by over 80% compared to manual decomposition. The automated orchestrator can intelligently coordinate multiple specialized intelligent agents, increasing parallel processing capabilities by 3-5 times compared to traditional sequential execution. Specialized role agents possess domain-specific knowledge and skills, improving decision-making accuracy by over 40% compared to general-purpose tools.

[0084] 2. Leading in task decomposition and orchestration capabilities Existing tools primarily rely on human experience for task planning, while the intelligent task decomposition system in this embodiment offers unprecedented automation capabilities. The PRD deep analysis algorithm automatically identifies all functional modules and user scenarios, achieving a requirement coverage rate of over 95%. The dependency analysis algorithm automatically identifies complex dependencies between tasks, improving accuracy by over 60% compared to manual analysis. The priority ranking algorithm, based on multi-dimensional evaluation, optimizes project execution paths and shortens project cycles by 20-30%.

[0085] 3. The template processing is highly intelligent. Traditional template systems use static templates, while the intelligent template processing system in this embodiment boasts powerful adaptive capabilities. The intelligent template adapter understands template structure and requirements, automatically adapting to different business scenarios. Template understanding accuracy exceeds 95%, improving application efficiency by more than 5 times compared to static templates. Automatic content generation reduces document writing workload by 80% and improves document quality consistency.

[0086] 4. Flexibility and intelligence of workflow orchestration Existing workflow systems mostly employ fixed processes; this embodiment achieves truly intelligent workflow orchestration. The five-stage workflow can automatically adjust execution strategies based on project characteristics. State machine management ensures reliable execution of complex processes, improving system stability by over 90%. An exception handling and recovery mechanism can automatically respond to various abnormal situations, achieving 99.9% system availability.

[0087] 5. Significantly enhanced professional collaboration capabilities Traditional tools lack specialized role collaboration mechanisms. This embodiment achieves this by using specialized intelligent agents, each with knowledge and skills in a specific field, increasing the level of specialization by more than 50% compared to general AI assistants. Standardized collaboration interfaces ensure seamless collaboration between intelligent agents, improving collaboration efficiency by more than 3 times. Context management mechanisms ensure the consistency and continuity of information, reducing information loss by 90%. 6. System scalability and maintainability advantages Through modular design and standardized interfaces, this embodiment offers significant advantages in system scalability. New intelligent agents can be quickly integrated via standard interfaces, reducing system expansion costs by 70%. The modular architecture supports independent upgrades and maintenance, reducing system maintenance costs by 50%. The unified workflow engine simplifies system management, reducing operational complexity by 60%.

[0088] Corresponding to the above method, the present invention also provides an apparatus / system including a computer device, the computer device including a processor and a memory, the memory storing computer instructions, the processor executing the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the apparatus / system performs the steps of the method as described above.

[0089] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned edge computing server deployment method. The computer-readable storage medium can be a tangible storage medium, such as random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disks, removable storage disks, CD-ROMs, or any other form of storage medium known in the art.

[0090] In summary, the automated software development method, apparatus, and computer program of this invention construct a complete automated development closed loop by introducing intelligent requirement parsing based on natural language processing, dynamic task orchestration using finite state automata, collaborative execution of multi-specialized intelligent agents, and a template-based intelligent verification mechanism. First, it achieves full-process automation from product requirements to code generation, significantly reducing manual intervention and improving development efficiency. Second, the multi-agent collaborative mechanism ensures the professionalism and decision-making quality of each development stage, effectively overcoming the limitations of a single intelligent agent. Third, the finite state machine-based task management provides flexible and reliable process control, dynamically adapting to state changes during development. Finally, the template-matching verification mechanism ensures the standardization and consistency of deliverables. This invention effectively solves the industry pain points of fragmented development toolchains, low levels of intelligence, and excessive reliance on human experience, leading to long development cycles and large quality fluctuations, providing a feasible technical path for achieving comprehensive intelligent software development.

[0091] Those skilled in the art will understand that the exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention. When implemented in hardware, it can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the desired tasks. The programs or code segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave.

[0092] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.

[0093] In this invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or in place of features of other embodiments.

[0094] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations of the embodiments of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An automated software development method, characterized in that, The method includes the following steps: Obtain the product requirements document, extract user scenarios, required functional modules and business rules from the product requirements document based on the natural language processing model, decompose them into one or more functionally independent user requirements and determine the priority and dependency of their development tasks. Based on the priorities and dependencies of the development tasks, a task execution plan is constructed and managed by pre-setting state transition rules and conditions using a finite state automaton model. The development tasks are distributed to corresponding specialized role agents according to the task content. The role agents include product manager agents, system architect agents, database architect agents, development engineer agents, and test engineer agents. The target software program is developed according to the task execution plan. The role agents search the preset knowledge graph and context database, and generate the target software program using a large language model combined with retrieval enhancement generation. Based on pattern matching, template files related to the development task are searched in the code repository. The template constraints and dependencies recorded in the template files are analyzed and used to verify the target software program. If the verification is successful, the program is integrated to generate a delivery package.

2. The automated software development method according to claim 1, characterized in that, Based on a natural language processing model, user scenarios, required functional modules, and business rules are extracted from the product requirements document. These are then broken down into one or more functionally independent user requirements, and their development tasks are prioritized and their dependencies are determined, including: The product requirement document is formatted and plain text information is extracted. The hierarchical structure of the product requirement document is identified and a hierarchical relationship is constructed. The user scenario, the required functional modules, and the business rules are extracted from the product requirement document using a natural language processing model based on the BERT model or the DeBERTa model; or, the user scenario, the required functional modules, and the business rules are extracted from the product requirement document based on a preset regular expression. Based on a pre-set business logic rule database, the functional modules and business rules required in the user scenario are decomposed to obtain one or more functionally independent user requirements, and their priorities and dependencies are determined.

3. The automated software development method according to claim 1, characterized in that, Based on the priorities and dependencies of the development tasks, a task execution plan is constructed and managed using a finite state automaton model with preset state transition rules and conditions, including: Build project-level states, including planning, execution, integration and verification, delivery and completion states under normal progress, as well as task pause and task failure states under abnormal progress. Construct user-requirement-level states, including: pending start state, requirement analysis state, waiting for dependencies state, agent execution state, quality check state, and completion state; Construct the working state of the role-based intelligent agent, including: created and loaded, assigned, executing, successful execution, failed execution, and retrying states; A state transition rule base is established for the project-level state, the user requirement-level state, and the role-based intelligent agent working state, so as to monitor, query, check, execute, and record the software development process based on preset rules; Build historical archives to persist records of changes to the current and historical states of various parts during software development, enabling breakpoint location and recovery of software development progress; Pre-defined exception handling and recovery logic, triggering retries for pre-defined temporary faults and establishing rollback strategies for failure scenarios of pre-defined critical tasks; A manual intervention interface is set up to introduce manual operation under preset fault conditions.

4. The automated software development method according to claim 1, characterized in that, The steps for constructing the role-based intelligent agent include: A knowledge base and toolchain are established according to the functions of each role; the knowledge base is used to store domain knowledge corresponding to the functions of each role, including subject knowledge graphs and enterprise standard documents; the toolchain includes external tools required to implement the functions of each role. For each role-based intelligent agent, a corresponding training sample set is established for the input and output content. The input is introduced by establishing prompt word engineering to introduce role instructions, task descriptions and contextual information, and the large language model based on Transformer is trained. The target content is output by retrieval enhancement generation based on the knowledge base. The reward function is constructed for the target content of the output of each role function based on reinforcement learning, and the parameters of the large language model are updated by maximizing the expected reward value to form the corresponding role-based intelligent agent. The role instruction describes the role type, the task description describes the development task, its priority, and its dependencies, and the context information is the closest code example retrieved from the knowledge base.

5. The automated software development method according to claim 1, characterized in that, The method maintains a unified workflow engine for end-to-end coordination and management. During the system initialization phase, the roles and intelligent agents are configured, loaded, self-checked, and allocated computing resources. During the intelligent task planning phase, the product requirement document is analyzed, tasks are decomposed, and a task execution plan is formulated. During the automated content generation phase, the roles and intelligent agents are scheduled to collaborate to generate software content according to user needs and monitor the process. During the integration and verification phase, cross-task consistency checks, integration tests, and quality verification are performed based on the template file. In the final delivery phase, the delivery package is integrated and completed.

6. The automated software development method according to claim 1, characterized in that, The intelligent agents communicate asynchronously using a publish-subscribe model, and transmit data based on standardized message protocols and data formats.

7. The automated software development method according to claim 1, characterized in that, The method further includes: after verifying the target software program, if an anomaly is found, cascading failure protection is performed using circuit breaker mode, and automatic task rollback and retry are implemented according to the checkpoint mechanism.

8. An automated software development apparatus, comprising a processor, a memory, and a computer program or instructions stored in the memory, characterized in that, The processor is configured to execute the computer program or instructions, and when the computer program or instructions are executed, the device implements the steps of the method as described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method as described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • A software development collaboration method and device based on a multi-agent system

    CN122219885A

  • A software development collaboration method and device based on a multi-agent system

    CN122219885B

  • Multi-role agent collaboration automatic software development method, system, device and medium

    CN122219895A