Software development method, system and equipment
By constructing dedicated intelligent agents at each stage of software development and using rule sets to parse development documents, the instability of large inference models throughout the entire software development process is solved, achieving efficient and stable code generation for embedded software development.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-13
- Publication Date
- 2026-03-13
AI Technical Summary
In existing technologies, large inference models are rarely used in the entire software development process, and the output results are unstable, especially in embedded software development. This is mainly due to the reliance on natural language descriptions, which leads to unstable code generation and low efficiency.
By integrating large-scale inference models with the entire software development process, and by building dedicated intelligent agents at different development stages and using rule sets to parse development documents, the influence of natural language descriptions is reduced, ensuring the stability and consistency of the output.
It improves the overall efficiency of software development and the stability of output results, reduces repeated corrections and instability in code generation, and enhances the reliability and efficiency of the development process.
Smart Images

Figure CN121657968A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software development, specifically to a software development method, system, and device. Background Technology
[0002] In recent years, large-scale inference models, represented by ChatGPT and DeepSeek, have experienced explosive growth, driven by leaps and bounds in artificial intelligence technology. With the maturity of the Transformer architecture, the exponential growth of computing power, and the accumulation of massive amounts of data, large-scale models have demonstrated powerful capabilities in natural language processing, multimodal understanding, and other fields, providing new possibilities for the intelligent upgrading of various industries. In the software development field, this technology is reshaping traditional development models and driving the industry towards greater intelligence.
[0003] With its deep understanding of code logic and natural language interaction capabilities, large models have demonstrated significant value in certain aspects of software development. At the code generation level, large models can automatically generate grammatically correct code snippets based on natural language descriptions; at the testing level, they can quickly scan for code vulnerabilities and generate test cases; and in document parsing, they can transform complex technical documents into concise development guidelines.
[0004] However, these applications are still limited to specific stages of software development (such as code generation) and single-point integration with large models. Exploration of large models serving the entire software development process is still shallow, especially in the field of embedded software development, where applications are extremely rare. At the same time, code generation for inference large models heavily relies on contextual understanding and multi-turn dialogues, which can easily lead to meaningless and iterative code corrections due to ambiguity in the developer's intentions, and even cause instability in the output results due to subtle differences in natural language descriptions.
[0005] It should be noted that the information disclosed in the background section of this application is intended only to enhance the understanding of the general background of this application, and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention
[0006] This application provides a software development method, system, and device to address the problems in the prior art where the large inference model is not integrated with the entire software development process and where natural language descriptions lead to unstable output results of the large inference model.
[0007] In a first aspect, embodiments of this application provide a software development method, including: The requirements analysis agent receives a set of requirements analysis rules and a functional specification document, parses the functional specification document according to the set of requirements analysis rules, and outputs a requirements document. The set of requirements analysis rules is used to standardize the output of the requirements document. The software design intelligent agent receives the software design rule set and the requirement document, parses the requirement document according to the software design rule set, and outputs the software design document. The software design rule set is used to standardize the output of the software design document. The code generation agent receives a code generation rule set, the requirements document, and the software design document. It parses the requirements document and the software design document according to the code generation rule set and outputs application layer code. The code generation rule set is used to standardize the content of code generation. The software testing agent receives the software testing rule set, the requirements document, and the application layer code. It parses the requirements document and the application layer code according to the software testing rule set and generates code scanning results and test cases. The software testing rule set is used to standardize software testing. Output the thought process of the requirements analysis agent, the software design agent, the code generation agent, and / or the software testing agent.
[0008] In one possible implementation, the step of parsing the functional specification document according to the requirements analysis rule set and outputting a requirements document includes: The functional specification document is broken down into atomic components that meet the requirements of embedded software development, and a requirements document is written based on the atomic component format.
[0009] In one possible implementation, following the output requirements document, the following is also included: The requirements analysis agent receives the modified functional specification document and generates a modified requirements document and a change history based on the modified functional specification document and the already generated requirements document.
[0010] In one possible implementation, the step of parsing the requirements document and the software design document according to the code generation rule set and outputting application layer code includes: The code generation agent parses the requirements document and software design document according to the code generation rule set, and generates header file code and C file code that meet the requirements of embedded software development.
[0011] In one possible implementation, the code scanning results include logical problem scanning results and static problem scanning results. The step of parsing the requirements document and the application layer code according to the software testing rule set to generate code scanning results and test cases includes: The software testing agent uses a code segmentation and extraction tool to break down the application layer code into individual components and functions for logical problem scanning, and generates logical problem scanning results. The software testing agent performs static problem scanning on the application layer code according to the software testing rule set and generates static problem scanning results. The software testing agent writes test cases that conform to the specified testing tools based on the software testing rule set and the requirements document.
[0012] One possible implementation also includes: When the software design agent encounters a problem while parsing the requirements document, it submits the problem to the requirements analysis agent to obtain a solution. When the code generation agent encounters a problem while parsing the requirements document, it submits the problem to the requirements analysis agent to obtain a solution; when the code generation agent encounters a problem while parsing the software design document, it submits the problem to the software design agent to obtain a solution. When the software testing agent encounters a problem while parsing the requirements document, it submits the problem to the requirements analysis agent to obtain a solution; when the software testing agent encounters a problem while parsing the application layer code, it submits the problem to the code generation agent to obtain a solution.
[0013] In one possible implementation, after generating the code scan results and test cases, the following is also included: The code generation agent receives the code scanning results and the test results of the test cases, and iteratively updates the application layer code based on the code scanning results and the test results of the test cases.
[0014] In one possible implementation, after the output application layer code, the following is also included: The code generation agent submits the application layer code to the software design agent generation flowchart.
[0015] Secondly, embodiments of this application provide a software development system, including: The requirements analysis intelligent agent unit is used to receive the requirements analysis rule set and the functional specification document, parse the functional specification document according to the requirements analysis rule set, and output the requirements document. The requirements analysis rule set is used to standardize the output of the requirements document. A software design intelligent agent unit is used to receive a software design rule set and the requirement document, parse the requirement document according to the software design rule set, and output a software design document. The software design rule set is used to standardize the output of the software design document. The code generation intelligent agent unit is used to receive the code generation rule set, the requirements document, and the software design document, parse the requirements document and the software design document according to the code generation rule set, and output application layer code. The code generation rule set is used to standardize the content of code generation. A software testing intelligent agent unit is used to receive a software testing rule set, the requirements document, and the application layer code; parse the requirements document and the application layer code according to the software testing rule set; and generate code scanning results and test cases. The software testing rule set is used to standardize software testing. The agent thinking process output unit is used to output the thinking processes of the requirement analysis agent, the software design agent, the code generation agent, and / or the software testing agent.
[0016] Thirdly, embodiments of this application provide an electronic device, including: processor; Memory; And a computer program, wherein the computer program is stored in the memory, and when the computer program is executed by the processor, causes the electronic device to perform the method described in any one of the first aspects.
[0017] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the method described in any one of the first aspects.
[0018] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any one of the first aspects.
[0019] In this embodiment, the large inference model is integrated with the entire software development process. The development document is parsed based on the rule set, which reduces the impact of natural language description on the content generated by the large inference model, solves the problem of unstable output results of the large inference model, and improves software development efficiency. Attached Figure Description
[0020] Figure 1 This is a flowchart illustrating a software development method provided in an embodiment of this application.
[0021] Figure 2 This is a schematic diagram of an interaction process between intelligent agents provided in an embodiment of this application.
[0022] Figure 3 This is a schematic diagram of the structure of a software development system provided in an embodiment of this application.
[0023] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0024] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0025] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0026] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0027] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0028] The core process of software development encompasses key stages such as requirements analysis, software design, code writing, and software testing. Each stage plays a decisive role in the quality, functionality, and user experience of the final software product.
[0029] In the requirements analysis phase, product managers communicate with clients to capture their needs, transforming vague business ideas into clear functional specifications. Developers then write requirements analysis documents based on these specifications. The software design phase translates these requirements into system architecture and detailed design. Developers consider factors such as performance, scalability, compatibility, and maintenance costs to build a reasonable and efficient software framework. In the coding phase, developers use specific programming languages and tools to translate their design ideas into executable code. In the software testing phase, various testing methods and tools are used to test the code, identify and fix potential vulnerabilities and defects, ensuring the software meets expected requirements. Large-scale inference models (such as ChatGPT and DeepSeek), with their natural language understanding, knowledge integration, and generation capabilities, can serve the software development process, improve development efficiency, and shorten the development cycle.
[0030] In related technologies, when applying large-scale inference models to software development, the focus is often merely on combining specific software development processes with these models. There is limited exploration of how these models can serve the entire software development process, leading to low overall development efficiency. Furthermore, the code generation of large-scale inference models heavily relies on contextual understanding and multi-turn dialogue mechanisms. This can easily lead to meaningless, iterative code modifications due to ambiguity in developers' intentions, and even instability in the output results caused by subtle differences in natural language descriptions.
[0031] To address the aforementioned issues, this application provides a software development method. By integrating a large-scale inference model with the entire software development process and parsing development documents based on rule sets, the method reduces the impact of natural language descriptions on the content generated by the large-scale inference model, resolves the problem of unstable output results from the large-scale inference model, and improves software development efficiency.
[0032] See Figure 1 This is a flowchart illustrating a software development method provided in an embodiment of this application. This method can be used in the aforementioned software development process. Figure 1 As shown, it mainly includes the following steps.
[0033] Step S101: The requirements analysis agent receives the requirements analysis rule set and the functional specification document, parses the functional specification document according to the requirements analysis rule set, and outputs the requirements document.
[0034] In practical applications, an intelligent agent is essentially a large-scale reasoning model specifically designed for a particular task. It can be understood as an optimized and adapted reasoning model better suited for completing specific stages of the task. This application's embodiments construct corresponding dedicated intelligent agents for different stages of software development (such as requirements analysis, software design, code generation, and software testing). The requirements analysis intelligent agent is the one used in the requirements analysis stage.
[0035] Functional specification documents refer to product requirements used for requirements analysis. They represent the product manager's initial transformation of user needs and business goals, focusing on "what functions the product should implement and what the general logic of those functions is." The content is relatively focused on the functions themselves. It should be noted that functional specification documents here include, but are not limited to, product function documents and communication matrix documents.
[0036] A rule set can be understood as a standardized specification for output content; essentially, it's an output template containing clearly defined constraints. It defines the overall structural framework of the output content and constrains its specific elements. In this embodiment, different rule sets are used for development documents at different software development stages. The requirements analysis rule set is the rule set used to standardize the output of requirements documents.
[0037] In practical applications, for embedded development, the requirements analysis rule set should include embedded software requirements structure files. This is due to the characteristics of embedded software development languages. C, as the mainstream language for embedded development, contains a large number of enumeration classes and structures. These elements directly map to low-level interaction logic such as hardware interface definitions and register configurations. If a clear structure file is not defined in advance based on hardware characteristics and software architecture during the requirements analysis phase, it will lead to logical gaps in subsequent development, which in turn will prevent the generation of code that meets the requirements during the code generation phase, affecting the overall development progress.
[0038] Specifically, the embedded software requirements structure file includes constraints from header files and C files. Header files contain macro definitions, enumeration type definitions, structures, unions, and external interface declarations. C files include definitions of global variables and static variables. Functionality is broken down into functional components, with each component structure consisting of preconditions, trigger conditions, execution strategies, and detailed descriptions. Preconditions and trigger conditions are numbered a, b, c, and d respectively, and connected using C language logical symbols such as && and ||, e.g., precondition "a&&b" and trigger condition "c||d". Execution strategies include assignment operations and output logic, while detailed descriptions supplement the specific or complex requirements within the function.
[0039] For non-embedded software development, the requirements analysis rule set does not depend on the software requirements structure document. For example, its requirements analysis rule set may include conventional documents such as the software requirements specification.
[0040] In practical applications, the content of the requirements analysis rule set can be adjusted according to specific needs.
[0041] This explicit set of rules eliminates ambiguity in natural language. Furthermore, it provides a clear framework for the requirements analysis agent, enabling it to consistently generate compliant requirements documents. This provides a consistent input benchmark for agents in subsequent software development phases, reducing the instability of document generation from the outset.
[0042] Due to the nature of embedded software development, functional specification documents often contain numerous details related to hardware interaction, resulting in complex and intricate logic that is difficult for an intelligent agent to directly parse. Therefore, in one possible implementation, the requirements analysis agent breaks down the functional specification document into atomic components that meet the needs of embedded software development, and then writes requirements documents based on these atomic components. These atomic components are the smallest indivisible functional units, each corresponding to a specific execution logic within the embedded system, and can be directly mapped to the technical implementation in subsequent software design and code generation phases. This design significantly reduces the workload and logical complexity of the requirements analysis agent per processing step, improving its processing efficiency and quality.
[0043] For non-embedded software development, since there is no need to adapt to hardware coupling, real-time constraints, and resource limitations, the requirements analysis agent can either not be split into functional specification documents or can be split according to actual business logic.
[0044] Step S102: The software design agent receives the software design rule set and the requirement document, parses the requirement document according to the software design rule set, and outputs the software design document.
[0045] In the embodiments of this application, the software design intelligent agent is the intelligent agent used in the software design phase, and the software design rule set is the standard used to standardize the software design documents in the software design phase.
[0046] In practical applications, software design rule sets include interface specification documents. Interface specification documents define the interaction standards between various software modules, preventing module integration failures due to inconsistent interface definitions. These include interface identifiers and naming conventions, interface parameter constraints, return value and error code definitions, etc. Software design documents include detailed component design documents and software interface documentation.
[0047] It should be noted that the interface specification document is only an exemplary description of the software design rule set and should not be used as a limitation on the scope of protection. In actual applications, the software design rule set can be adjusted according to the requirements.
[0048] In one possible implementation, the software design agent generates structured text containing interface definitions and other content based on a set of software design rules. Then, by calling a preset format conversion script, it automatically converts this text into detailed design documents and software interface documents in specified formats (such as .doc, .pdf, etc.).
[0049] Step S103: The code generation agent receives the code generation rule set, the requirements document, and the software design document, parses the requirements document and the software design document according to the code generation rule set, and outputs the application layer code.
[0050] In the embodiments of this application, the code generation agent is the agent used in the code generation stage, and the code generation rule set is the standard used to regulate the code output content.
[0051] In practical applications, code generation rule sets include code structure files and comment specification files. Code structure files ensure that the code meets the operational requirements of the software system by constraining the logical structure and output format; comment specification files, through structured comments, transform the logic in the design document (such as the preconditions of atomic components) into readable explanations in the code, which is convenient for developers to understand and provides a basis for later maintenance.
[0052] It should be noted that the code structure file and comment specification file here are only illustrative examples and should not be used as a limitation on the scope of protection. In actual applications, the code generation rule set can be adjusted according to actual needs.
[0053] In one possible implementation, the code generation agent parses the requirements document and software design document according to the code generation rule set, and generates header file code and C file code that meet the requirements of embedded software development.
[0054] Specifically, the code generation agent extracts the core logic of atomic components from the requirements document, obtains algorithm details and interface definitions from the software design document, and generates C files and header files conforming to embedded software development based on the code generation rule set, while simultaneously generating corresponding comments. Parsing the requirements and software design documents based on the code generation rule set eliminates interference from natural language in code generation, ensuring consistency between the code logic and comments. This ensures that the generated code accurately maps the requirements and design specifications while conforming to the development characteristics of embedded systems.
[0055] Step S104: The software testing agent receives the software testing rule set, requirements document, and application layer code. It parses the requirements document and application layer code according to the software testing rule set and generates code scanning results and test cases.
[0056] In this embodiment of the application, the software testing agent is the agent used in the software testing phase, and the software testing rule set is the standard used to regulate the software testing content.
[0057] In practical applications, software testing rule sets include coding style guidelines and test case generation standards. Coding style guidelines are primarily used to standardize code style and readability requirements, and to constrain code security and robustness. For example, MISRA C:2012 can be used as the C language coding standard. Test case generation standards are used to standardize the content of generated test cases, ensuring that the generated test cases conform to the format requirements of a specified testing tool (such as Tessy).
[0058] It should be noted that the coding standard documents and test case generation standards mentioned here are only exemplary descriptions of the software testing rule set and should not be taken as limitations on the scope of protection. In actual applications, the software testing rule set can be adjusted according to the needs.
[0059] In one possible implementation, the software testing agent uses a code segmentation extraction tool to break down the application layer code into individual components and functions for logical problem scanning, generating logical problem scanning results; the software testing agent performs static problem scanning on the application layer code according to the software testing rule set, generating static problem scanning results; and the software testing agent writes test cases that conform to the specified testing tools based on the software testing rule set and the requirements document.
[0060] The code scanning results include static problem scanning results and logical problem scanning results. Static problem scanning does not require code execution; it only checks for issues related to formatting compliance, security compliance, and style consistency through syntax parsing and rule matching, generating static problem scanning results. Logical problem scanning involves the software testing agent analyzing potential logical defects and process vulnerabilities in the code. It breaks down the application layer code into individual components or independent functions, performing targeted logical verification on each component, rather than directly scanning the entire project or multiple components, ultimately generating logical problem scanning results. This method trades the workload of the software testing agent for the accuracy and reliability of logical problem scanning. For functions that are too complex to analyze, the code analysis agent will skip them and generate a record, which will then be reviewed by the developers. For test case writing, the software testing agent automatically writes test cases that conform to the format requirements of the specified testing tools based on the software testing rule set and requirements document, ensuring that the test cases both cover every requirement and can be recognized by the specified testing tools. The above process ensures comprehensive test coverage by conducting software testing across multiple dimensions; and by using a software testing agent to scan code and generate test cases, it greatly reduces manual labor costs and improves the efficiency of software testing.
[0061] Of course, in practical applications, the structure and specific implementation of code scanning can be adjusted according to requirements, and the embodiments of this application do not impose specific limitations here.
[0062] Step S105: Output the thought process of the requirements analysis agent, software design agent, code generation agent, and / or software testing agent.
[0063] In this embodiment of the application, during the software development process, the agent at each development stage performs a complex analysis and reasoning process when parsing the development documents. These thought processes carry the basis for the agent's decision-making; if the agent's thought processes cannot be seen, erroneous ideas cannot be corrected in a timely manner.
[0064] Therefore, it is necessary to output the thought processes of the requirements analysis agent, software design agent, code generation agent, and / or software testing agent. Outputting the thought process of the agent corresponding to each stage of software development essentially presents the agent's analytical logic in a visual form, which helps improve the reliability and controllability of software development.
[0065] For example, when an intelligent agent processes a task, its thought process includes key decision-making nodes. When errors occur, developers can interrupt and correct them in real time. By reviewing the thought process, the source of the error can be quickly located, allowing for targeted correction of the agent's processing logic and preventing the recurrence of similar errors. Furthermore, outputting the agent's thought process makes agent-based software development transparent and controllable, transforming it from a black-box operation, thereby enhancing interpretability.
[0066] This application proposes a software development method that constructs a corresponding intelligent agent for each stage of software development. For different software development stages, a corresponding rule set is selected to parse the development document. This allows the intelligent agent to generate standard-compliant documents based on explicit rule sets, rather than relying on guesswork about ambiguous natural language expressions, thereby improving output stability. Ultimately, this integrates the overall software development process with the intelligent agent, enhancing the agent's software development capabilities and improving software development efficiency.
[0067] In practical applications, after the requirements document is generated, there are often situations where changes are needed to the functional specification document. In this case, it is necessary to regenerate the requirements document and generate a change record to ensure the traceability of software development.
[0068] Therefore, in one possible implementation, the requirements analysis agent receives the revised functional specification document and generates a revised requirements document and change history based on the revised functional specification document and the already generated requirements document. Specifically, the requirements analysis agent automatically identifies the changes by comparing the functional specification documents before and after the changes, modifies the requirements document based on the changes, and generates a change history. This implementation, through the automated processing of the requirements analysis agent, eliminates the tedious manual operation of changing requirements documents, improves the efficiency of requirements document changes, and ensures the traceability of the software development process.
[0069] In another possible implementation, the requirements analysis agent receives the changed portion of the functional specification document, generates a requirements document for that portion, and adds the changed portion of the requirements document to the already generated requirements document, creating a revised requirements document and a historical change record. In this implementation, the requirements analysis agent only receives the changed portion of the requirements document, rather than the entire requirements document, which reduces redundant processing costs and improves processing efficiency, making it particularly suitable for development scenarios with frequent requirement iterations.
[0070] Of course, in practical applications, developers can also make changes to the requirements analysis and manually enter historical change records, which provides a more flexible solution for requirement changes.
[0071] In this embodiment of the application, in addition to the upstream intelligent agent generating development documents and transmitting them to the downstream intelligent agent for parsing as described above (such as the requirements analysis intelligent agent outputting requirements documents and the software design intelligent agent receiving requirements documents), when the downstream intelligent agent encounters problems in the parsing process of the development documents, it can also proactively ask questions to the upstream intelligent agent.
[0072] In one possible implementation, when the software design agent encounters a problem while parsing the requirements document, it submits the problem to the requirements analysis agent to obtain a solution; when the code generation agent encounters a problem while parsing the requirements document, it submits the problem to the requirements analysis agent to obtain a solution; when the code generation agent encounters a problem while parsing the software design document, it submits the problem to the software design agent to obtain a solution; when the software testing agent encounters a problem while parsing the requirements document, it submits the problem to the requirements analysis agent to obtain a solution; and when the software testing agent encounters a problem while parsing the application layer code, it submits the problem to the code generation agent to obtain a solution.
[0073] In simple terms, when downstream agents encounter ambiguity or logical conflicts while parsing requirements documents, software design documents, and application layer code, they directly submit the issues to the upstream agent that generated the document. The document generator then provides a solution and submits it to the downstream agent. This approach avoids guesswork by downstream agents dealing with ambiguous information, ensuring that each problem is resolved at its document generation source. This guarantees consistency throughout the software development process and improves the accuracy and efficiency of software development.
[0074] For clarity, the following explanation is provided in conjunction with the accompanying drawings. See also: Figure 2 This is a schematic diagram illustrating an interaction process between intelligent agents according to an embodiment of this application. This process is applicable to the aforementioned software development method. Figure 2 As shown, it mainly includes the following contents.
[0075] As described above, in this embodiment, each software development stage corresponds to a specific intelligent agent, and these agents interact with each other. In simple terms, the interactions can be broadly categorized into two types: one is where the upstream intelligent agent submits the generated development documentation to the downstream intelligent agent; the other is where the downstream intelligent agent encounters a problem while parsing the development documentation, submits the problem to the upstream intelligent agent, and after analyzing the problem, submits the solution to the downstream intelligent agent. Through this interaction between intelligent agents, the entire software development process is integrated with the agents. This achieves collaborative linkage between agents, ensuring the integrity and logical consistency of information during the transmission of development documentation, and improving overall development efficiency and quality.
[0076] In this embodiment, valid instructions (i.e., optimized prompts) generated by developers during each dialogue with the agent are incorporated into a constructed prompt word library, making each verified prompt word a reusable template. These prompts can be directly reused when handling similar tasks, avoiding repeated debugging of prompts by different developers facing the same problem, thereby reducing interaction costs. The accumulation of the prompt word library improves the efficiency of developers in correcting agent behavior, thus increasing software development efficiency.
[0077] In this embodiment, the development documents output by the agents corresponding to each software development stage must be manually reviewed after generation before being submitted to the agent corresponding to the next software development stage. Combining agent generation with manual review improves the reliability of software development.
[0078] In practical applications, software developers iterate and update the code based on the results of code scanning and test cases to ensure continuous improvement in code quality.
[0079] Therefore, in one possible implementation, the code generation agent receives the results of code scanning and test cases, and updates the application layer code based on these results. Iterating code using a code generation agent can improve the efficiency of code iteration through a standardized process.
[0080] In another possible implementation, developers update the application-layer code based on the results of code scanning and test cases. This manual iterative approach effectively addresses complex problems that are difficult for intelligent agents to solve.
[0081] In this embodiment of the application, drawing a flowchart of the code is an indispensable part of the software development process. It helps developers better understand the code, especially new team members who can quickly understand the code logic based on the flowchart, facilitating subsequent code development.
[0082] Therefore, in one possible implementation, the code generation agent submits application-layer code to the software design agent to generate flowcharts. For example, after receiving the application-layer code, the software design agent generates flowchart code in formats such as Mermaid or GraphViz, and calls the corresponding image rendering engine to convert this code into SVG format vector graphics. By directly receiving the application-layer code and generating flowcharts, the software design agent reduces the cost of manual drawing and improves the efficiency of software development.
[0083] Corresponding to the above method embodiments, this application also provides a software development system.
[0084] See Figure 3 This is a schematic diagram of the structure of a software development system provided in an embodiment of this application. Figure 3 As shown, the software development system 300 includes: a requirements analysis intelligent agent unit 301, a software design intelligent agent unit 302, a code generation intelligent agent unit 303, a software testing intelligent agent unit 304, and an intelligent agent thinking process output unit 305.
[0085] Specifically, the requirements analysis intelligent agent unit 301 is used to receive the requirements analysis rule set and the functional specification document, parse the functional specification document according to the requirements analysis rule set, and output the requirements document; The software design intelligent agent unit 302 is used to receive the software design rule set and the requirement document, parse the requirement document according to the software design rule set, and output the software design document. The code generation intelligent agent unit 303 is used to receive the code generation rule set, the requirements document and the software design document, parse the requirements document and the software design document according to the code generation rule set, and output the application layer code; The software testing intelligent agent unit 304 is used to receive software testing rule sets, requirements documents and application layer code, parse the requirements documents and application layer code according to the software testing rule sets, and generate code scanning results and test cases. The agent thinking process output unit 305 is used to output the thinking process of the requirement analysis agent, the software design agent, the code generation agent, and / or the software testing agent.
[0086] For details regarding the specific content involved in the embodiments of this application, please refer to the description of the above method embodiments. For the sake of brevity, these details will not be repeated here.
[0087] Corresponding to the above embodiments, this application also provides an electronic device.
[0088] See Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4As shown, the electronic device 400 may include a processor 401, a memory 402, and a communication unit 403. These components communicate via one or more buses. Those skilled in the art will understand that the electronic device structure shown in the figures does not constitute a limitation on the embodiments of this application. It may be a bus topology or a star topology, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0089] The communication unit 403 is used to establish a communication channel, thereby enabling the electronic device to communicate with other devices.
[0090] The processor 401 serves as the control center of the electronic device, connecting various parts of the device via various interfaces and lines. It executes software programs and / or modules stored in the memory 402, and calls data stored in the memory to perform various functions and / or process data. The processor may be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 1001 may only include a central processing unit (CPU). In this embodiment, the CPU may have a single processing core or include multiple processing cores.
[0091] Memory 402 is used to store the execution instructions of processor 401. Memory 402 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0092] When the execution instructions in memory 402 are executed by processor 401, the electronic device 400 is able to perform some or all of the steps in the above method embodiments.
[0093] Corresponding to the above embodiments, this application also provides a computer-readable storage medium, wherein the computer-readable storage medium may store a program, wherein when the program runs, it can control the device where the computer-readable storage medium is located to execute some or all of the steps in the above method embodiments. In specific implementation, the computer-readable storage medium may be a magnetic disk, an optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0094] Corresponding to the above embodiments, this application also provides a computer program product containing executable instructions that, when executed on a computer, cause the computer to perform some or all of the steps in the above method embodiments.
[0095] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects have an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0096] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are 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 application.
[0097] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0098] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0099] The above description is merely a specific embodiment of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. The protection scope of this application should be determined by the protection scope of the claims.
Claims
1. A software development method, characterized in that, include: The requirements analysis agent receives a set of requirements analysis rules and a functional specification document, parses the functional specification document according to the set of requirements analysis rules, and outputs a requirements document. The set of requirements analysis rules is used to standardize the output of the requirements document. The software design intelligent agent receives the software design rule set and the requirement document, parses the requirement document according to the software design rule set, and outputs the software design document. The software design rule set is used to standardize the output of the software design document. The code generation agent receives a code generation rule set, the requirements document, and the software design document. It parses the requirements document and the software design document according to the code generation rule set and outputs application layer code. The code generation rule set is used to standardize the content of code generation. The software testing agent receives the software testing rule set, the requirements document, and the application layer code. It parses the requirements document and the application layer code according to the software testing rule set and generates code scanning results and test cases. The software testing rule set is used to standardize software testing. Output the thought process of the requirements analysis agent, the software design agent, the code generation agent, and / or the software testing agent.
2. The method according to claim 1, characterized in that, The process of parsing the functional specification document based on the requirements analysis rule set and outputting a requirements document includes: The functional specification document is broken down into atomic components that meet the requirements of embedded software development, and a requirements document is written based on the atomic component format.
3. The method according to claim 1, characterized in that, Following the output requirements document, the following is also included: The requirements analysis agent receives the modified functional specification document and generates a modified requirements document and a change history based on the modified functional specification document and the already generated requirements document.
4. The method according to claim 1, characterized in that, The step of parsing the requirements document and the software design document according to the code generation rule set and outputting application layer code includes: The code generation agent parses the requirements document and software design document according to the code generation rule set, and generates header file code and C file code that meet the requirements of embedded software development.
5. The method according to claim 1, characterized in that, The code scanning results include logical problem scanning results and static problem scanning results. The step of parsing the requirements document and the application layer code according to the software testing rule set to generate code scanning results and test cases includes: The software testing agent uses a code segmentation and extraction tool to break down the application layer code into individual components and functions for logical problem scanning, and generates logical problem scanning results. The software testing agent performs static problem scanning on the application layer code according to the software testing rule set and generates static problem scanning results. The software testing agent writes test cases that conform to the specified testing tools based on the software testing rule set and the requirements document.
6. The method according to claim 1, characterized in that, Also includes: When the software design agent encounters a problem while parsing the requirements document, it submits the problem to the requirements analysis agent to obtain a solution. When the code generation agent encounters a problem while parsing the requirements document, it submits the problem to the requirements analysis agent to obtain a solution; when the code generation agent encounters a problem while parsing the software design document, it submits the problem to the software design agent to obtain a solution. When the software testing agent encounters a problem while parsing the requirements document, it submits the problem to the requirements analysis agent to obtain a solution. When the software testing agent encounters a problem while parsing the application layer code, it submits the problem to the code generation agent to obtain a solution.
7. The method according to claim 1, characterized in that, Following the generation of code scan results and test cases, the following is also included: The code generation agent receives the code scanning results and the test results of the test cases, and iteratively updates the application layer code based on the code scanning results and the test results of the test cases.
8. The method according to claim 1, characterized in that, Following the output application layer code, the following is also included: The code generation agent submits the application layer code to the software design agent generation flowchart.
9. A software development system, characterized in that, include: The requirements analysis intelligent agent unit is used to receive the requirements analysis rule set and the functional specification document, parse the functional specification document according to the requirements analysis rule set, and output the requirements document. The requirements analysis rule set is used to standardize the output of the requirements document. A software design intelligent agent unit is used to receive a software design rule set and the requirement document, parse the requirement document according to the software design rule set, and output a software design document. The software design rule set is used to standardize the output of the software design document. The code generation intelligent agent unit is used to receive the code generation rule set, the requirements document, and the software design document, parse the requirements document and the software design document according to the code generation rule set, and output application layer code. The code generation rule set is used to standardize the content of code generation. The software testing intelligent agent unit is used to receive the software testing rule set, the requirements document, and the application layer code, parse the requirements document and the application layer code according to the software testing rule set, and generate code scanning results and test cases. The software testing rule set is used to standardize software testing. The agent thinking process output unit is used to output the thinking processes of the requirement analysis agent, the software design agent, the code generation agent, and / or the software testing agent.
10. An electronic device, characterized in that, include: processor; Memory; And a computer program, wherein the computer program is stored in the memory, and when the computer program is executed by the processor, causes the electronic device to perform the method of any one of claims 1 to 8.