Code-based development document generation method, system and equipment and storage medium

By generating modular documents based on code analysis and real-time update of requirements documents expert knowledge bases, the shortcomings of generating development-driven requirements documents in the existing technology are solved, efficient and accurate document generation and information sharing are achieved, and the software development process is optimized.

CN120492026APending Publication Date: 2025-08-15CTRIP TRAVEL NETWORK TECH SHANGHAI0
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510662245.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

When generating development-driven demand documents, it is difficult to effectively combine business logic and code implementation in the existing technology, resulting in limited document coverage, insufficient flexibility and insufficient accuracy, and relying on manual maintenance, resulting in untimely document updates, which affects team collaboration efficiency.

Method used

By generating modular documents based on code analysis, combining semantic models and performance analysis data, automatically update the required document expert knowledge base, and connect it with the dialogue robot to realize real-time query and code retrieval.

Benefits of technology

It realizes a complete closed loop from code submission to automated document generation, improves the efficiency and accuracy of document generation, reduces manual maintenance costs, and improves team collaboration efficiency and information sharing capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120492026A_ABST
    Figure CN120492026A_ABST
Patent Text Reader

Abstract

The invention provides a code-based development document generation method, system and device, and a storage medium. The method comprises the steps of code submission and data acquisition; generating a modular document based on the code analysis; analyzing the full-amount codes through a semantic model; synchronously updating the expert knowledge base of the demand document and the codes; and connecting the demand document expert knowledge base with the dialogue robot to realize code retrieval. According to the method, a complete closed loop from code submission to automatic document generation, knowledge base construction and real-time query can be realized, a software development process is optimized, and team cooperation efficiency and project quality are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of code development, and in particular to a method, system, device and storage medium for generating code-based development documents. Background Art

[0002] The current software development field faces a key challenge: how to efficiently generate development-driven requirements documentation that is closely integrated with business code. Existing document generation solutions primarily rely on manual writing, annotation-based code documentation generation tools, low-code platform requirements documentation generation, and AI-based requirements documentation generation tools. While these approaches have met some requirements to a certain extent, they suffer from the following major issues and limitations: Many existing solutions fail to effectively integrate business logic with code implementation, resulting in poor coverage, flexibility, and accuracy in the generated documentation. This approach is simple and easy to implement, but it is less effective when dealing with complex and diverse business needs.

[0003] The current solution has the following main defects and limitations:

[0004] Reliance on manual maintenance: The traditional method of manually writing requirement documents requires frequent manual updates, which can easily lead to a disconnect between the document and the code due to poor communication or untimely maintenance, increasing the difficulty of collaboration and maintenance.

[0005] Limited coverage: Annotation-based code documentation generation tools (such as JSDoc and Swagger) mainly focus on the technical implementation details of the code. It is difficult to generate high-level requirement documents directly related to business needs, and the generation quality is highly dependent on the completeness and accuracy of the annotations.

[0006] Lack of flexibility: The requirement document generation tools of low-code platforms are generally suitable for specific scenarios and cannot meet the requirements of requirement document generation for complex business logic. Moreover, the generated documents are difficult to seamlessly integrate with external development tools or processes.

[0007] Lack of accuracy: Although AI-based requirement document generation tools can extract information from code or user input, the generated documents may contain semantic errors or logical incoherence, and lack an understanding of business context and objectives, making it difficult to meet actual needs.

[0008] These issues arise primarily due to the following deficiencies in existing technologies: first, a lack of in-depth analysis of the relationship between business logic and code implementation; second, a failure to fully exploit the semantic information in the code to generate high-quality requirements documentation; and finally, a lack of intelligent support to improve the efficiency and accuracy of document generation. These shortcomings result in poor performance of existing technologies in development-driven requirements documentation generation, making it difficult to meet the actual needs of development and business teams.

[0009] Therefore, the present invention provides a code-based development document generation method, system, device and storage medium. Summary of the Invention

[0010] In response to the problems in the prior art, the purpose of the present invention is to provide a code-based development document generation method, system, device and storage medium, which overcomes the difficulties of the prior art and can achieve a complete closed loop from code submission to automated document generation, knowledge base construction and real-time query, optimize the software development process, and improve team collaboration efficiency and project quality.

[0011] An embodiment of the present invention provides a method for generating a code-based development document, comprising the following steps:

[0012] S110, code submission and data acquisition;

[0013] S120, generating modular documentation based on code analysis;

[0014] S130, analyzing the entire code using a semantic model;

[0015] S140, synchronously updating the expert knowledge base of the requirements document and the code; and

[0016] S150. Connect the expert knowledge base of the requirement document with the conversation robot to realize code retrieval.

[0017] Preferably, the step S110 includes:

[0018] S111. Developers submit code through GitLab, triggering the continuous integration or continuous delivery pipeline; and

[0019] S112: Calling the GitHub API through the continuous integration or continuous delivery pipeline to obtain the difference content in the code submission content.

[0020] Preferably, the step S120 includes:

[0021] S121. Based on the obtained code content of the difference content and in combination with the specified prompt words, a modular business requirement document is generated using the large model; and

[0022] S122. Analyze the impact of code changes on business logic and performance based on performance analysis data, and generate a code change impact analysis report.

[0023] Preferably, the step S130 includes: analyzing and summarizing the entire code of the code submission content through a model context protocol.

[0024] Preferably, the step S140 includes:

[0025] S141. Integrate the generated modularization documents and impact analysis reports into a requirements document knowledge base; and

[0026] S142. Automatically update the requirement document knowledge base to ensure that the requirement document and code implementation are always synchronized.

[0027] Preferably, the step S150 includes:

[0028] S151. Connect the expert knowledge base of requirement documents with the conversational robot to achieve interactive retrieval and real-time query functions; and

[0029] S152. Users can retrieve online business logic at any time through the conversational robot, which is convenient for preliminary research and production troubleshooting.

[0030] Preferably, it also includes:

[0031] S160. Continuously obtain new code submission data through continuous integration or continuous delivery pipelines.

[0032] An embodiment of the present invention further provides a code-based development document generation system for implementing the above-mentioned code-based development document generation method. The code-based development document generation system includes:

[0033] Data acquisition module, code submission and data acquisition;

[0034] Document generation module, which generates modular documents based on code analysis;

[0035] Code analysis module, which analyzes the entire code using a semantic model;

[0036] Synchronous update module, which synchronizes the updates of the expert knowledge base of the requirements document with the code implementation; and

[0037] The code retrieval module connects the requirement document expert knowledge base with the conversational robot to realize code retrieval.

[0038] An embodiment of the present invention further provides a code-based development document generation device, comprising:

[0039] processor;

[0040] a memory storing executable instructions for the processor;

[0041] The processor is configured to execute the steps of the above-mentioned code-based development document generation method by executing the executable instructions.

[0042] An embodiment of the present invention further provides a computer-readable storage medium for storing a program, which implements the steps of the above-mentioned code-based development document generation method when executed.

[0043] The purpose of the present invention is to provide a code-based development document generation method, system, device and storage medium, which can realize a complete closed loop from code submission to automated document generation, knowledge base construction and real-time query, optimize the software development process, and improve team collaboration efficiency and project quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Other features, objects and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings.

[0045] Figure 1 It is a flow chart of the code-based development document generation method of the present invention.

[0046] Figure 2 It is a schematic diagram of the implementation process of the code-based development document generation method of the present invention.

[0047] Figure 3 It is a structural diagram of the code-based development document generation system of the present invention.

[0048] Figure 4 It is a structural diagram of the code-based development document generation device of the present invention.

[0049] Figure 5 It is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION

[0050] The following describes the embodiments of the present application through specific examples. Those skilled in the art can easily understand the other advantages and effects of the present application from the content disclosed in the present application. The present application can also be implemented or applied through different specific embodiments. The details in the present application can also be modified or changed according to different viewpoints and application systems without departing from the spirit of the present application. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other unless they conflict.

[0051] The following is a detailed description of the embodiments of the present application with reference to the accompanying drawings so that those skilled in the art can easily implement the present application. The present application can be embodied in many different forms and is not limited to the embodiments described herein.

[0052] In the description of this application, reference to the terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this application. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art may combine and integrate different embodiments or examples described in this application, as well as features of different embodiments or examples, unless otherwise contradictory.

[0053] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features being referred to. Thus, a feature identified as "first" or "second" may explicitly or implicitly include at least one such feature. In the context of this application, "plurality" means two or more, unless otherwise specifically defined.

[0054] In order to clearly describe the present application, components not related to the description are omitted, and the same or similar components throughout the specification are given the same reference symbols.

[0055] Throughout this specification, when a device is said to be "connected" to another device, this includes not only "direct connection" but also "indirect connection" with other elements interposed therebetween. Furthermore, when a device is said to "include" a certain component, unless otherwise stated, this does not exclude the inclusion of other components but rather implies that the device may include other components.

[0056] When a device is said to be "on" another device, it may be directly on the other device, but there may also be other devices between it. In contrast, when a device is said to be "directly on" another device, there are no other devices between it.

[0057] Although the terms first, second, etc. are used in some instances herein to represent various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, the first interface and the second interface, etc. are represented. Furthermore, as used in this article, the singular forms "one," "an," and "the" are intended to also include the plural forms, unless there is a contrary indication in the context. It should be further understood that the terms "comprise," "include," and "include" indicate the presence of features, steps, operations, elements, components, items, types, and / or groups, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, types, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Therefore, "A, B, or C" or "A, B, and / or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B, and C." Exceptions to this definition only occur when the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.

[0058] The technical terms used herein are intended only to refer to specific embodiments and are not intended to limit this application. The singular form used herein also includes the plural form unless the statement explicitly indicates otherwise. The term "comprising" as used in this specification is intended to specify specific features, regions, integers, steps, operations, elements, and / or components and does not exclude the presence or addition of other features, regions, integers, steps, operations, elements, and / or components.

[0059] Although not defined differently, all terms used herein, including technical and scientific terms, have the same meanings as those generally understood by those skilled in the art to which this application belongs. Terms defined in commonly used dictionaries are to be interpreted as having meanings consistent with the relevant technical literature and current teachings, and unless otherwise defined, they should not be overly interpreted as ideal or highly formalized meanings.

[0060] Current solutions for generating development-driven requirements documents suffer from numerous design issues and flaws, necessitating a more intelligent and efficient approach to improve document generation and meet user needs. Future development should combine advanced AI technology with semantic analysis methods to automatically generate high-quality, comprehensive development-driven requirements documents through in-depth analysis of business code. This approach would not only address the limitations of existing technologies but also improve development efficiency and collaboration, driving optimization and innovation in software development processes.

[0061] Figure 1 This is a flow chart of the code-based development document generation method of the present invention. Figure 1 As shown, the code-based development document generation method of the present invention includes:

[0062] S110, code submission and data acquisition.

[0063] S120. Generate modular documentation based on code analysis.

[0064] S130. Analyze the entire code using a semantic model.

[0065] S140, synchronize the requirement document expert knowledge base with the code. And

[0066] S150. Connect the expert knowledge base of the requirement document with the conversation robot to realize code retrieval.

[0067] In a preferred embodiment, step S110 includes:

[0068] S111. Developers submit code through GitLab, triggering the continuous integration or continuous delivery pipeline.

[0069] S112. Call the GitHub API through a continuous integration or continuous delivery pipeline to obtain differences in code commits, but this is not limited to this. GitLab is an open source project for a warehouse management system that uses Git as a code management tool and is a web service built on top of it. For installation instructions, refer to the GitLab Wiki page on GitHub. GitLab is a widely used open source Git-based code management platform built on Ruby on Rails. It primarily manages code and documents generated during the software development process. GitLab primarily manages code and documents in two dimensions: groups and projects. A group can manage multiple projects, which can be understood as a group containing multiple software development tasks. A project can contain multiple branches, meaning each project has multiple independent branches that can be merged. The GitHub API allows developers to programmatically access and manipulate GitHub accounts and projects. It provides access to the same functionality as the GitHub website, but is more suitable for automating tasks and integrating with third-party applications.

[0070] In a preferred embodiment, step S120 includes:

[0071] S121, based on the obtained code content of the difference content and the specified prompt words, a modular business requirement document is generated using the large model.

[0072] S122. Analyze the impact of code changes on business logic and performance based on performance analysis data, and generate a code change impact analysis report, but this is not limited to this.

[0073] In a preferred embodiment, step S130 includes: analyzing and summarizing the entire code submitted by using the model context protocol, but is not limited thereto.

[0074] In a preferred embodiment, step S140 includes:

[0075] S141. Integrate the generated modular documents and impact analysis reports into a requirement document knowledge base.

[0076] as well as

[0077] S142. Automatically update the requirement document knowledge base to ensure that the requirement document and the code implementation are always synchronized, but not limited to this.

[0078] In a preferred embodiment, step S150 includes:

[0079] S151. Connect the expert knowledge base of requirement documents with the conversational robot to realize interactive retrieval and real-time query functions.

[0080] S152. Users can retrieve online business logic at any time through the conversational robot to facilitate preliminary research and production troubleshooting, but this is not limited to this.

[0081] In a preferred embodiment, the method further includes: S160, continuously acquiring new code submission data through a continuous integration or continuous delivery pipeline, but is not limited thereto.

[0082] The present invention first allows developers to submit code through GitLab to trigger a continuous integration or continuous delivery pipeline. The GitHub API is called through the continuous integration or continuous delivery pipeline to obtain the difference content in the code submission content. Then, based on the code content of the obtained difference content and combined with the specified prompt words, a modular business requirement document is generated using a large model. Combined with performance analysis data, the impact of code changes on business logic and performance is analyzed, and a code change impact analysis report is generated. The full amount of code of the code submission content is analyzed and summarized through the model context protocol. The generated modular documents and impact analysis reports are integrated into a requirement document knowledge base. The requirement document knowledge base is automatically updated to ensure that the requirement document and code implementation are always synchronized. The requirement document expert knowledge base is connected to the dialogue robot to realize interactive retrieval and real-time query functions. Users can retrieve online business logic at any time through the dialogue robot, which is convenient for preliminary research and production troubleshooting. Finally, new code submission data is continuously obtained through the continuous integration or continuous delivery pipeline.

[0083] The purpose of the present invention is to solve the following problems existing in the prior art:

[0084] During software development, fragmented information and untimely documentation updates are major challenges, leading to inefficient team collaboration and difficulties in information sharing. Existing technologies lack systematic knowledge management tools, making it difficult for developers to quickly retrieve and obtain the information they need.

[0085] Document maintenance is highly dependent on manual labor, with untimely updates or even no maintenance, resulting in a disconnect between documentation and code implementation, affecting the team's understanding and collaboration on business logic and code changes.

[0086] When developers make code modifications, they find it difficult to quickly track the specific impact of these changes on business logic and performance, resulting in inefficient project progress and increased rework and communication costs.

[0087] To achieve the above objectives, the present invention provides a development-driven requirements document generation architecture design based on business code, which can automatically generate high-quality and high-coverage requirements documents by deeply analyzing business code. This architecture design has the following advantages:

[0088] Centralized information management: By automatically generating requirement documents, we can reduce information dispersion, improve information retrieval efficiency, and provide the team with systematic knowledge management tools.

[0089] Real-time updates and consistency assurance: Dynamic parsing based on code ensures that requirement documents and code implementations are always consistent, avoiding update delays caused by manual maintenance.

[0090] Change impact tracking: Through semantic analysis and business logic association, it helps developers quickly understand the specific impact of code changes on business logic and performance, improving development efficiency and decision-making accuracy.

[0091] By solving the above problems, the present invention aims to optimize the software development process, improve team collaboration efficiency and information sharing capabilities, while reducing document maintenance costs and promoting efficient project advancement and sustainable development.

[0092] This invention aims to address existing issues such as fragmented information, delayed documentation updates, and difficulty tracking the impact of code changes on business logic. Specifically, it proposes an architecture design based on code analysis and automated document generation. This architecture automatically generates modular business requirements documents based on code submissions and performance analysis data within the agile development cycle, and builds an intelligent expert knowledge base for requirements documentation.

[0093] In traditional software development processes, document generation and maintenance rely heavily on manual labor, leading to delayed updates and even a lack of maintenance, hindering team collaboration and information sharing. Furthermore, when developers make code modifications, they struggle to quickly track the specific impact of these changes on business logic and performance, increasing project complexity and communication costs. These issues severely impact development efficiency and project quality.

[0094] Therefore, the present invention proposes a technical solution based on code analysis and automatic document generation, which aims to solve the above technical problems in the following ways:

[0095] Automated document generation: By analyzing code submission content (such as diff codes obtained from the GitHub API) and performance analysis data, modular business requirements documents are automatically generated to reduce manual maintenance costs.

[0096] Code change tracking and impact analysis: Combines code metrics and performance analysis data to automatically track the impact of code changes on business logic, helping developers quickly understand the potential risks of changes.

[0097] Intelligent knowledge base construction: Integrate the generated documents into an expert knowledge base of demand documents, and implement interactive retrieval and real-time business logic query through conversational robots to improve information retrieval efficiency and user experience.

[0098] Through the above technical solution, the present invention aims to realize a document update mechanism that does not require manual maintenance, improve team collaboration efficiency, optimize the development process, and provide comprehensive business logic support for the project.

[0099] This invention proposes an architecture design based on code analysis and automatic document generation, which has the following characteristics:

[0100] Generate modular documentation based on code submissions: This command retrieves diff content from code submissions through the GitHub API and, using specified prompts, generates business requirements documentation within the agile development cycle, ultimately integrating it into the full requirements document. The diff command is a tool for comparing the content of two or more files and is widely used in scenarios such as version control, code review, and file backup.

[0101] Impact analysis combined with performance analysis data: By analyzing the correlation between code changes and performance indicators, an analysis report on the impact of code changes on business logic and performance is automatically generated, helping developers quickly understand the potential risks of the changes.

[0102] Build an expert knowledge base for requirements documents: Integrate generated documents into an intelligent knowledge base that supports interactive retrieval and real-time query, making it easier for team members to conduct preliminary research and production troubleshooting.

[0103] Conversational robots support real-time query: By connecting the knowledge base with the conversational robot, real-time retrieval and query of online business logic can be achieved, improving information acquisition efficiency and user experience.

[0104] Preferably, the solution is not only applicable to agile development scenarios, but can also be extended to other development processes to increase its scope of application.

[0105] Preferably, in addition to generating documents based on the code submission content, this solution can also combine MCP (Model Context Protocol) to analyze and summarize the entire code to further improve the coverage and accuracy of the document. Among them, MCP (Model Context Protocol) is an open protocol launched by Anthropic, which is used to connect large language models with external data sources and tools to achieve dynamic integration. MCP stands for Model Context Protocol, which aims to provide a standardized interface for large language models (LLMs) to enable them to securely and dynamically connect to external resources (such as databases, APIs, development environments, etc.).

[0106] Preferably, a code metrics analysis module can be introduced to quantitatively evaluate code changes and help the team better understand code quality and performance change trends.

[0107] Through the above technical solution, the present invention can achieve the following objectives:

[0108] Automated modular business logic document library: Through code analysis and automated generation technology, a modular business logic document library that does not require manual maintenance is built.

[0109] Automatic tracking and impact analysis of code changes: Combined with performance analysis data, it automatically tracks the impact of code changes on business logic, improving development efficiency and decision-making accuracy.

[0110] Intelligent knowledge base and interactive retrieval: By building a requirement document expert knowledge base and a conversational robot, an easy-to-retrieve and update knowledge base is implemented, supporting interactive modification and real-time query.

[0111] Ultimately, this invention aims to trigger the Dify service API through the GitLab CI / CD pipeline, start the Dify workflow, realize automated analysis and document generation of code submissions, create an automatically integrated requirements document library, generate code performance analysis reports, and provide a real-time business chatbot, thereby optimizing the software development process and improving team collaboration efficiency and project quality.

[0112] This invention provides an innovative technical solution based on code analysis and automated document generation. This solution significantly improves the efficiency and accuracy of document generation, solves the problems of information dispersion, delayed document updates, and difficulty tracking code changes, and brings significant benefits to team collaboration and development process optimization:

[0113] Document generation efficiency has been greatly improved: By obtaining the diff content of code submissions through the GitHub API and combining it with performance analysis data, modular business requirements documents are automatically generated. This significantly reduces the time and cost of manual document maintenance and ensures that documents are always consistent with code implementation.

[0114] Enhanced code change tracking capabilities: Combining code metrics and performance analysis data, this invention can automatically track the impact of code changes on business logic and performance, helping developers quickly understand the potential risks of changes, thereby improving development efficiency and decision-making accuracy.

[0115] Centralized information management: By building an intelligent expert knowledge base of demand documents, the present invention realizes the centralized management of information, solves the problem of information dispersion, enables team members to quickly retrieve and obtain the required information, and significantly improves the efficiency of information sharing.

[0116] Significantly improved automation: This invention reduces reliance on manual document maintenance and significantly reduces the risk of human error through automated document generation and real-time update mechanisms, while also improving document accuracy and consistency.

[0117] User experience is significantly improved: Through the combination of conversational robots and knowledge bases, the present invention realizes interactive retrieval and real-time query functions. Users can obtain online business logic information at any time, which facilitates preliminary research and production troubleshooting, and significantly improves user experience and satisfaction.

[0118] Team collaboration efficiency has been significantly improved: The introduction of automated document generation and an intelligent knowledge base has enabled team members to collaborate more efficiently, reducing communication costs and information asymmetry, thereby accelerating project progress.

[0119] Enhanced adaptability and scalability: This solution is not only applicable to agile development scenarios but can also be flexibly extended to other development processes, showing broad application prospects. For example, combining it with the MCP tool to analyze and summarize the entire codebase further improves documentation coverage and accuracy.

[0120] Continuous optimization capabilities: By triggering the Dify service API through the GitLab CI / CD pipeline, this invention can realize automated analysis and documentation generation of code submissions. As usage data accumulates, the system can continuously learn and optimize, providing teams with increasingly accurate documentation and analysis results.

[0121] Through innovative technical solutions, this invention effectively solves the problems of information dispersion, delayed document updates, and difficulty in tracking code changes in existing software development, providing the team with an efficient, accurate, and easy-to-use document generation and knowledge management tool, significantly improving development efficiency and collaboration capabilities, and promoting the optimization of software development processes and technological innovation.

[0122] like Figure 2 As shown, the technical implementation process of the present invention describes in detail the complete process from code submission to automated document generation, knowledge base construction and real-time query. The following are the specific technical implementation steps:

[0123] (1) Code submission and data acquisition.

[0124] (2) Developers submit code through GitLab, triggering the CI / CD pipeline.

[0125] (3) The GitLab CI / CD pipeline calls the GitHub API to obtain the diff content of the code submission (including new, modified, and deleted code snippets).

[0126] (4) Code analysis and modular document generation: Based on the obtained diff code content and the specified prompt, a large model (such as the Dify service API) is used to generate modular business requirement documents.

[0127] (5) Combined with performance analysis data, analyze the impact of code changes on business logic and performance, and generate a code change impact analysis report.

[0128] (6) Full code analysis and summary: Combine the MCP tool to analyze and summarize the full code to further improve the coverage and accuracy of the document.

[0129] (7) Knowledge base construction and update: Build a requirements document expert knowledge base and integrate the generated modular documents and impact analysis reports into a requirements document expert knowledge base. The knowledge base supports an automated update mechanism to ensure that the documents and code implementations are always consistent.

[0130] (8) Integrate the knowledge base with the conversation robot, connect the requirement document expert knowledge base with the conversation robot to realize interactive retrieval and real-time query functions.

[0131] (9) Users can retrieve online business logic at any time through the conversational robot, which facilitates preliminary research and production troubleshooting.

[0132] (10) Continuous optimization and feedback.

[0133] The system continuously acquires new code submission data through the GitLab CI / CD pipeline, continuously optimizing document generation and knowledge base content. As usage data accumulates, the system learns and optimizes, providing teams with increasingly accurate documentation and analysis results. Through the aforementioned technical implementation process, this invention achieves a complete closed-loop process from code submission to automated document generation, knowledge base construction, and real-time querying, significantly improving development efficiency and team collaboration.

[0134] Figure 3 This is a schematic diagram of the structure of the code-based development document generation system of the present invention. Figure 3 As shown, an embodiment of the present invention further provides a code-based development document generation system for implementing the above-mentioned code-based development document generation method. The code-based development document generation system 5 includes:

[0135] Data acquisition module 51, code submission and data acquisition.

[0136] The document generation module 52 generates modular documents based on code analysis.

[0137] The code analysis module 53 analyzes the entire code using a semantic model.

[0138] The synchronous updating module 54 synchronously updates the expert knowledge base of the requirement document and the code.

[0139] The code retrieval module 55 connects the requirement document expert knowledge base with the dialogue robot to realize code retrieval.

[0140] In a preferred embodiment, the data acquisition module 51 is configured to trigger a continuous integration or continuous delivery pipeline by instructing a developer to submit code through GitLab, which in turn calls the GitHub API to obtain the differences in the code submission content, but the present invention is not limited thereto.

[0141] In a preferred embodiment, the document generation module 52 is configured to generate a modular business requirements document using a large model based on the obtained code content of the difference content and specified prompt words. The document is then combined with performance analysis data to analyze the impact of code changes on business logic and performance, and generate a code change impact analysis report, but the present invention is not limited to this.

[0142] In a preferred embodiment, the code analysis module 53 is configured to analyze and summarize the entire code of the code submission content through the model context protocol, but is not limited thereto.

[0143] In a preferred embodiment, the synchronization update module 54 is configured to integrate the generated modularization documents and impact analysis reports into a requirement document knowledge base, and automatically update the requirement document knowledge base to ensure that the requirement documents are always synchronized with the code implementation, but the present invention is not limited thereto.

[0144] In a preferred embodiment, the code retrieval module 55 is configured to connect the expert knowledge base of requirement documents with a conversational robot to implement interactive retrieval and real-time query capabilities. Users can use the conversational robot to retrieve online business logic at any time, facilitating preliminary research and production troubleshooting, but this is not limited to this.

[0145] In a preferred embodiment, a continuous acquisition module 56 is further included to continuously acquire new code submission data through a continuous integration or continuous delivery pipeline, but the present invention is not limited thereto.

[0146] The code-based development document generation system of the present invention can realize a complete closed loop from code submission to automated document generation, knowledge base construction and real-time query, optimize the software development process, and improve team collaboration efficiency and project quality.

[0147] An embodiment of the present invention further provides a code-based development document generation device, comprising a processor and a memory storing executable instructions for the processor. The processor is configured to execute the executable instructions to perform the steps of the code-based development document generation method.

[0148] As shown above, the code-based development document generation device of this embodiment of the present invention can realize a complete closed loop from code submission to automated document generation, knowledge base construction and real-time query, optimize the software development process, and improve team collaboration efficiency and project quality.

[0149] Those skilled in the art will appreciate that various aspects of the present invention may be implemented as systems, methods, or program products. Accordingly, various aspects of the present invention may be implemented in the following forms: entirely in hardware, entirely in software (including firmware, microcode, etc.), or in a combination of hardware and software, collectively referred to herein as "circuits," "modules," or "platforms."

[0150] Figure 4 This is a schematic diagram of the structure of the code-based development document generation device of the present invention. Figure 4 An electronic device 600 according to this embodiment of the present invention will be described. Figure 4 The electronic device 600 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present invention.

[0151] like Figure 4As shown, electronic device 600 is implemented as a general-purpose computing device. Components of electronic device 600 may include, but are not limited to, at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including storage unit 620 and processing unit 610), and a display unit 640.

[0152] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps according to various exemplary embodiments of the present invention described in the above method section of this specification. For example, the processing unit 610 can perform the following steps: Figure 1 Follow the steps shown in .

[0153] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .

[0154] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0155] Bus 630 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0156] The electronic device 600 can also communicate with one or more external devices 700 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 600, and / or any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication can occur via an input / output (I / O) interface 650. Furthermore, the electronic device 600 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 660. The network adapter 660 can communicate with other modules of the electronic device 600 via the bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the electronic device 600, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.

[0157] An embodiment of the present invention further provides a computer-readable storage medium for storing a program that, when executed, implements the steps of the code-based development document generation method. In some possible implementations, various aspects of the present invention may also be implemented in the form of a program product, which includes program code. When the program product is executed on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above method section of this specification.

[0158] As shown above, the code-based development document generation system of this embodiment of the present invention can realize a complete closed loop from code submission to automated document generation, knowledge base construction and real-time query, optimize the software development process, and improve team collaboration efficiency and project quality.

[0159] Figure 5 Schematic diagram of the structure of the computer readable storage medium of the present invention. Figure 5 , a program product 800 for implementing the above method according to an embodiment of the present invention is described. The program product 800 may be a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0160] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0161] Computer-readable storage media may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.

[0162] The program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0163] In summary, the purpose of the present invention is to provide a code-based development document generation method, system, device and storage medium, which can realize a complete closed loop from code submission to automated document generation, knowledge base construction and real-time query, optimize the software development process, and improve team collaboration efficiency and project quality.

[0164] The above is a further detailed description of the present invention in conjunction with specific preferred embodiments, and the specific implementation of the present invention should not be considered to be limited to these descriptions. For those skilled in the art of the present invention, without departing from the concept of the present invention, several simple deductions or substitutions can be made, which should be considered to fall within the scope of protection of the present invention.

Claims

1. A code-based development document generation method, characterized in that: The following steps are involved: S110, code submission and data acquisition; S120, generating modular documentation based on code analysis; S130, analyzing the entire code using a semantic model; S140, synchronously updating the expert knowledge base of the requirements document and the code; and S150. Connect the expert knowledge base of the requirement document with the conversation robot to realize code retrieval.

2. The code-based development document generation method according to claim 1, wherein: The step S110 includes: S111. Developers submit code through GitLab, triggering the continuous integration or continuous delivery pipeline; and S112: Calling the GitHub API through the continuous integration or continuous delivery pipeline to obtain the difference content in the code submission content.

3. The code-based development document generation method according to claim 2, wherein: The step S120 includes: S121. Based on the obtained code content of the difference content and in combination with the specified prompt words, a modular business requirement document is generated using the large model; and S122. Analyze the impact of code changes on business logic and performance based on performance analysis data, and generate a code change impact analysis report.

4. The code-based development document generation method according to claim 2, wherein: The step S130 includes: analyzing and summarizing the entire code of the code submission content through the model context protocol.

5. The code-based development document generation method according to claim 1, wherein: The step S140 includes: S141. Integrate the generated modularization documents and impact analysis reports into a requirements document knowledge base; and S142. Automatically update the requirement document knowledge base to ensure that the requirement document and code implementation are always synchronized.

6. The method for generating development documents based on code according to claim 1, wherein: The step S150 includes: S151. Connect the expert knowledge base of requirement documents with the conversational robot to achieve interactive retrieval and real-time query functions; and S152. Users can retrieve online business logic at any time through the conversational robot, which facilitates preliminary research and production troubleshooting.

7. The code-based development document generation method according to claim 1, wherein: Also includes: S160. Continuously obtain new code submission data through continuous integration or continuous delivery pipelines.

8. A code-based development document generation system, used to implement the code-based development document generation method according to claim 1, characterized in that: include: Data acquisition module, code submission and data acquisition; Document generation module, which generates modular documents based on code analysis; Code analysis module, which analyzes the entire code using a semantic model; Synchronous update module, which synchronizes the updates of the expert knowledge base of the requirements document with the code implementation; and The code retrieval module connects the requirement document expert knowledge base with the conversational robot to realize code retrieval.

9. A code-based development document generation device, characterized in that: include: processor; a memory storing executable instructions for the processor; The processor is configured to execute the steps of the code-based development document generation method according to any one of claims 1 to 7 by executing the executable instructions.

10. A computer-readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps of the code-based development document generation method according to any one of claims 1 to 7 are implemented.