Technical document automatic generation method, system, device and storage medium
By generating standardized technical documents through intelligent slicing and parsing technology, and combining interface data and interactive document modules, the problem of low efficiency and unstable quality in manual writing in existing technologies is solved, realizing efficient and accurate automated document generation and supporting rapid response of AI programming tools.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CTRIP TRAVEL NETWORK TECH SHANGHAI0
- Filing Date
- 2026-02-27
- Publication Date
- 2026-06-05
AI Technical Summary
In existing technologies, the generation of technical documents relies on manual writing, which is inefficient, of unstable quality, and cannot meet the needs of high-frequency iteration and accuracy. The lack of automated verification process results in a high error rate in the generated documents, making it unable to effectively support AI programming tools.
By employing intelligent slicing and parsing technology, combined with interface data structures and interactive document generation modules, standardized technical documents are generated through intelligent agents, and a dual verification mechanism is implemented to ensure the logical integrity and accuracy of details of the documents, which are then automatically pushed to AI programming tools.
It achieves fully automated transformation from requirements documents to technical documents, significantly improving generation efficiency and document quality, reducing labor costs, ensuring document accuracy and consistency, and supporting efficient generation by AI programming tools.
Smart Images

Figure CN122152276A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of web page development, and more specifically, to a method, system, device, and storage medium for the automated generation of technical documents. Background Technology
[0002] With the increasing informatization of enterprises and the rapid development of web development technologies, business requirements are iterating more frequently and on a larger scale. In the web page development process, technical documentation serves as the core bridge connecting product requirements and development implementation. It is not only a crucial basis for developers to understand business logic and design systems, but also the only reliable source for mainstream AI programming tools to accurately understand requirements and directly generate compliant business code. A high-quality, standardized set of technical documentation can significantly improve development efficiency and code quality.
[0003] However, in current development environments, the generation of technical documentation and its provision to AI coding tools generally rely on an inefficient manual writing model. This model typically involves the following steps: First, developers or requirements analysts need to read and understand the requirements document written by the product manager; then, based on their understanding of the requirements and their own development experience, they manually query interface data, organize interaction logic, and finally write a detailed technical document; finally, this written technical document is provided to the AI programming tool to generate business code. The entire process depends entirely on manual operation, is time-consuming and labor-intensive, and is highly prone to introducing errors.
[0004] Specifically, the existing technical solutions have the following significant drawbacks: Low conversion efficiency and difficulty in handling high-frequency iterations: In scenarios with frequent requirement iterations and multiple requirements being pursued in parallel, converting a single requirement document into a standardized technical document often takes 1-3 hours or even longer. This inefficient manual process consumes a significant amount of developers' valuable time, severely slowing down code generation and development implementation, becoming a bottleneck that restricts the rapid progress of projects.
[0005] Insufficient conversion accuracy and inconsistent document quality: The quality of technical documentation highly depends on the writer's personal experience and depth of understanding of the requirements. If the original requirements document is vague, or the writer lacks experience, it can easily lead to technical documentation that is disconnected from actual business needs, contains logical errors, or omits details. Such flawed technical documentation can directly mislead AI programming tools, causing them to generate invalid or even erroneous business code, resulting in extensive rework.
[0006] Information acquisition is difficult, and document completeness is hard to guarantee: The writing of technical documents relies on information from multiple sources, such as interface data structures (which need to be manually queried in the interface management platform) and interaction design details (which need to be referenced from product prototype diagrams). Manually searching for and integrating these scattered information sources is not only time-consuming, but also prone to data loss due to oversight, resulting in incomplete technical documents that cannot provide sufficient technical support for AI coding.
[0007] The lack of a verification process leads to a significant error amplification effect: In traditional manual processes, technical documents lack automated verification and completion steps after generation. If errors or omissions exist in the documents, these defects are directly passed to AI programming tools, resulting in fundamental problems in the generated code. Problem discovery often lags behind code review or even testing phases, greatly increasing the cost of fixing them.
[0008] In response to the above pain points, the traditional model of "requirement document - manual writing of technical documents - AI programming tools to generate business code" can no longer meet the modern web development's business demands for efficiency, accuracy, and rapid iteration.
[0009] In view of this, the present invention provides a method, system, device and storage medium for the automated generation of technical documents. Summary of the Invention
[0010] In view of the problems in the prior art, the purpose of this invention is to provide a method, system, device and storage medium for the automated generation of technical documents, which overcomes the difficulties of the prior art, enables the automated conversion of the entire process from requirements documents to technical documents in the context of web page development, and provides accurate and standardized technical basis for AI programming tools.
[0011] Embodiments of the present invention provide a method for automatically generating technical documents, comprising the following steps: S110. Obtain the requirement document and perform slicing and parsing on the requirement document to extract the requirement content. The requirement document is sliced using the intelligent slicing function of Lark Knowledge Base, and the knowledge space recall node is triggered through Lark workflow. The intelligent agent is guided by prompt word engineering to parse the sliced document in order to integrate and update the complete requirement content. S120. Based on the complete content of the requirements, the agent actively queries the user to obtain the interface name and application ID. In response to the interface name and application ID provided by the user, the interface data structure MCP is triggered to obtain the corresponding interface data structure. The obtained interface data structure is then checked for completeness and compatibility with the requirements. Additionally, the agent queries the user to ask if they provide a link to the interaction design draft. If the user provides one, the interaction document generation MCP is triggered to parse and generate the corresponding interaction document content. S130. Combining the complete content of the requirements, the interface data structure, and the content of the interactive document, the intelligent agent actively asks the user to confirm the technology stack information required to achieve the current requirements, and based on the technology stack information, the intelligent agent is guided to generate standardized technical documents using prompt words. S140. Verify and optimize the generated standardized technical document, and start a dual verification mechanism including verification of the logical integrity of the document and verification of the accuracy of the document details. If the problem found by the verification is a clearly identifiable error, the intelligent agent will automatically correct it. If the requirement description is vague and cannot be clearly determined, the intelligent agent will actively ask the user to obtain feedback and make modifications until the user confirms that the technical document is correct. S150. Trigger Lark document generation MCP, integrate the complete content of the requirements, interface data structure, interactive document content and final technical document into a standard Markdown format Lark document according to the preset four-segment structure, and push the generated Lark document link to the AI programming tool for it to generate business code.
[0012] Preferably, in step S110, the requirement document is sliced and parsed, including: uploading the requirement document to Lark Knowledge Base, and using the intelligent slicing function of Lark Knowledge Base to split the requirement document into multiple logical segments according to the preset requirement document standardization and segmentation rules, each segment being composed of a document title, paragraph title and paragraph content.
[0013] Preferably, in step S120, the triggering interface data structure MCP to obtain the corresponding interface data structure includes: calling the interface data structure MCP and using the contract call API tool to obtain the complete data structure of the corresponding interface from the interface management platform. The complete data structure includes interface parameter definitions, return value specifications, and calling rules.
[0014] Preferably, in step S120, the step of triggering the interactive document generation MCP to obtain the corresponding interactive document content includes: Lark workflow triggering the interactive document generation MCP, using image recognition and interactive logic parsing capabilities, generating a complete interactive document containing page interaction logic, operation flow and exception feedback mechanism based on the image content corresponding to the interactive image link.
[0015] Preferably, in step S130, the step of using prompt words to guide the agent to generate standardized technical documents includes: the agent following a preset document generation standard, and combining the input dataset, generating technical documents in modules that at least include requirement breakdown, technology selection instructions, interface call specifications, key points of functional module development, and exception handling solutions.
[0016] Preferably, in step S140, the verification and optimization of the generated standardized technical document includes: repeatedly executing an iterative closed loop of "generation-verification-feedback-optimization" until the user finally confirms that the technical document meets the preset document quality standards.
[0017] Preferably, in step S150, pushing the generated Lark document link to the AI programming tool includes: the AI programming tool parses the Markdown format content in the Lark document link to obtain technical implementation details, and generates corresponding business code based on the technical implementation details.
[0018] Embodiments of the present invention also provide a technical document automated generation system for implementing the above-described technical document automated generation method, the technical document automated generation system comprising: The document parsing module obtains the requirement document and performs segmentation and parsing on the requirement document to extract the complete requirement content. Specifically, the requirement document is segmented using the intelligent segmentation function of Lark Knowledge Base, and the knowledge space recall node is triggered through Lark workflow. The prompt word engineering guides the intelligent agent to parse the segmented document and update the requirement content after integration. The data acquisition module, based on the complete content of the requirements, actively queries the user through an intelligent agent to obtain the interface name and application ID. In response to the interface name and application ID provided by the user, it triggers the Interface Data Structure (MCP) to obtain the corresponding interface data structure, and performs integrity verification and adaptability verification with the requirements content on the obtained interface data structure. In addition, it queries the user through an intelligent agent to ask if they provide a link to the interaction design draft. If the user provides one, it triggers the Interaction Document Generation (MCP) to parse and generate the corresponding interaction document content. The document generation module, combining the complete content of the requirements, the interface data structure, and the interactive document content, actively asks the user through an intelligent agent to confirm the technology stack information required to achieve the current requirements, and based on the technology stack information, uses prompt words to guide the intelligent agent to generate standardized technical documents. The verification and optimization module verifies and optimizes the generated standardized technical documents. It initiates a dual verification mechanism, including verification of the document's logical integrity and verification of the document's detailed accuracy. For problems found during verification, if they are clearly identifiable errors, the intelligent agent will automatically correct them. If the requirements are vaguely described or cannot be clearly identified, the intelligent agent will actively ask the user for feedback and make modifications until the user confirms that the technical documents are correct. The document push module triggers the generation of an MCP from Lark documents. It integrates the complete content of the requirements, interface data structure, interactive document content, and final technical document into a standard Markdown format Lark document according to a preset four-segment structure, and pushes the generated Lark document link to the AI programming tool for generating business code.
[0019] Embodiments of the present invention also provide a device for automatically generating technical documents, comprising: processor; A memory in which executable instructions of the processor are stored; The processor is configured to execute the steps of the above-described method for automatically generating technical documents by executing the executable instructions.
[0020] Embodiments of the present invention also provide a computer-readable storage medium for storing a program, which, when executed, implements the steps of the above-described automated technical document generation method.
[0021] The purpose of this invention is to provide a method, system, device, and storage medium for the automated generation of technical documents, which can realize the fully automated transformation from requirement documents to technical documents in the context of web page development, and provide accurate and standardized technical basis for AI programming tools. Attached Figure Description
[0022] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings.
[0023] Figure 1 This is a flowchart of the method for automatically generating technical documents according to the present invention.
[0024] Figure 2 This is a system architecture diagram of the technical document automated generation system of the present invention.
[0025] Figure 3 This is a schematic diagram of the structure of the automated technical document generation device of the present invention.
[0026] Figure 4 This is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention. Detailed Implementation
[0027] The following specific examples illustrate the implementation methods of this application. Those skilled in the art can easily understand the other advantages and effects of this application from the content disclosed herein. This application can also be implemented or applied through other different specific embodiments, and various details in this application can be modified or changed according to different viewpoints and application systems without departing from the spirit of this application. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other.
[0028] The embodiments of this application will now be described in detail with reference to the accompanying drawings, so that those skilled in the art can easily implement the application. This application may be embodied in many different forms and is not limited to the embodiments described herein.
[0029] In this application, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics represented in connection with that embodiment or example, which are included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics represented may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate different embodiments or examples represented in this application, as well as features of different embodiments or examples.
[0030] Furthermore, the terms "first" and "second" are used for illustrative purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the representation of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0031] To clearly illustrate this application, devices unrelated to the description are omitted, and the same or similar constituent elements throughout the specification are given the same reference numerals.
[0032] Throughout this specification, when it is said that a device is "connected" to another device, this includes not only "direct connection" but also "indirect connection" by placing other components in between. Furthermore, when it is said that a device "comprises" a certain constituent element, unless otherwise stated otherwise, this does not exclude other constituent elements, but rather implies that other constituent elements may be included.
[0033] When we say that a device is "above" another device, this can mean that it is directly above the other device, or it can mean that other devices are present in between. Conversely, when we say that a device is "directly" "above" another device, there are no other devices present in between.
[0034] Although the terms first, second, etc., are used in some instances herein to refer to various elements, these elements should not be limited by these terms. These terms are used only to distinguish one element from another. For example, first interface and second interface, etc., are used. Furthermore, as used herein, the singular forms “a,” “an,” and “the” are intended to also include the plural forms unless the context indicates otherwise. It should be further understood that the terms “comprising,” “including,” indicate the presence of features, steps, operations, elements, components, items, kinds, and / or groups, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. The terms “or” and “and / or” as used herein are interpreted as inclusive, or mean any one or any combination thereof. Thus, “A, B, or C” or “A, B, and / or C” means “any one of: A; B; C; A and B; A and C; B and C; A, B, and C.” Exceptions to this definition will only occur if the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.
[0035] The technical terms used herein are for reference only to specific embodiments and are not intended to limit the scope of this application. The singular form used herein includes the plural form unless the statement explicitly indicates otherwise. The word "comprising" as used in the specification means to specify a particular characteristic, region, integer, step, operation, element, and / or component, and does not exclude the presence or addition of other characteristics, regions, integers, steps, operations, elements, and / or components.
[0036] Although not explicitly defined, all terms, including technical and scientific terms used herein, shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. Terms defined in commonly used dictionaries shall be further interpreted as having a meaning consistent with the relevant technical literature and the content of this present application, and shall not be over-interpreted as having an ideal or overly formulaic meaning unless otherwise defined.
[0037] Figure 1 This is a flowchart of the method for automatically generating technical documents according to the present invention. For example... Figure 1 As shown, the method for automatically generating technical documents according to the present invention includes the following steps: S110. Obtain the requirement document and perform segmentation and parsing on the requirement document to extract the requirement content. Specifically, the system first guides the user to upload the requirement document (such as a Product Requirements Document, PRD) to a designated repository, such as Lark Knowledge Base. After the document is uploaded, the system uses the intelligent segmentation function built into the knowledge base to perform fine-grained segmentation on the requirement document according to preset standardized segmentation rules. For example, a complete document can be split into multiple logical segments, each segment can be composed of three parts: document title, chapter title, and paragraph content. This segmentation method helps with subsequent fine-grained understanding and information extraction of the document. At the same time, the workflow engine (such as Lark Workflow) synchronously triggers the knowledge space recall node. This node first parses each segment unit independently, extracts the core requirement information of a single module, and then integrates them into a complete and coherent requirement overview through multi-segment correlation analysis, thereby effectively avoiding parsing deviations caused by lengthy documents and overlapping modules. After parsing, the agent standardizes and organizes the extracted complete requirement content to obtain the complete requirement content, and outputs it to the next stage to ensure that the output requirement information is complete and without deviation.
[0038] S120. Based on the complete content of the requirements, trigger the Interface Data Structure (MCP) to obtain the corresponding interface data structure, and / or trigger the Interactive Document Generation (MCP) to obtain the corresponding interactive document content.
[0039] Specifically, after obtaining the complete standardized requirements, the system will enter the data acquisition and supplementation phase. This step aims to gather necessary background information for the generation of technical documentation.
[0040] First, regarding the acquisition of interface data, the agent node will proactively ask the user using standardized dialogue to confirm whether they can provide the interface name and application ID corresponding to the current requirement. These two pieces of information are key indices for obtaining the interface data structure. If the user explicitly provides them, the agent will immediately invoke the "Interface Data Structure MCP (Model Context Protocol)". This MCP tool will further invoke the contract call API tool to obtain the complete data structure information of the interface from the interface management platform. The core information covers the interface parameter definitions (such as required parameters, optional parameters, parameter types and value ranges), return value specifications (such as return data format, field meanings, and abnormal return scenarios), and calling rules. After the interface data is returned, the agent will verify it, on the one hand verifying the integrity of the data itself, and on the other hand, verifying the compatibility between the interface data structure and the requirements for fulfilling the requirements, in conjunction with the parsed requirements. If a problem is found, the agent will report the specific problem points and guide the user to supplement or confirm until the user confirms that the interface data structure is accurate.
[0041] Secondly, regarding interactive documents, since not all requirements necessarily include visual interactions, the agent first asks the user if they can provide links to interactive images (such as product prototypes or UI design drafts). If the user provides a valid link, the Lark workflow will trigger the "Interactive Document Generation MCP". This tool leverages image recognition and interaction logic parsing capabilities to accurately extract all core information related to the page interaction based on the image content corresponding to the link, and generates a complete interactive document in a standardized format. The generated document must clearly cover key content such as page interaction logic (e.g., page navigation relationships, component linkage rules), detailed operation procedures, and exception feedback mechanisms. If the user does not provide a link, the system will automatically skip this step.
[0042] S130. Combining the complete content of the requirements, the interface data structure, and the content of the interactive document, and based on the preset technology stack information, the agent is guided by prompt words to generate standardized technical documents.
[0043] Specifically, the agent will integrate the content collected in each preliminary stage to form a complete input dataset for generating technical documentation. Then, the agent will proactively ask the user using standardized interactive language to confirm the technology stack information required to achieve the current requirements, such as front-end frameworks (Vue / React), back-end languages (Java / Go), and databases (MySQL / Redis). After obtaining the technology stack information, the agent will use optimized prompt engineering logic to strictly adhere to preset technical documentation generation standards and format specifications, and, in conjunction with the input dataset, generate standardized technical documentation module by module and chapter. The generated content must clearly cover core elements such as requirement breakdown, technology selection explanations, interface call specifications, interaction logic implementation, key points of functional module development, and exception handling solutions, ensuring that the document is logically clear and detailed.
[0044] S140. Verify and optimize the generated standardized technical documents until they meet the preset document quality standards.
[0045] Specifically, after the initial generation of the technical documentation, the agent will automatically initiate a dual-verification mechanism for optimization. The first layer is logical integrity verification, checking for issues such as missing requirements, logical contradictions, or missing content. The second layer is detail accuracy verification, checking for errors in interface parameters, deviations in interaction logic, or inappropriate technology stack adaptation. For issues discovered during verification, the agent will adopt different handling strategies: for clearly identifiable errors (such as misspelled parameter names), the agent will automatically correct them; for vague or unclear requirements, the agent will proactively ask the user for more precise feedback. Based on the user's feedback, the agent will revise and improve the technical documentation again. This process will be repeated, forming a closed loop of "generation-verification-feedback-optimization" until the user finally confirms that the technical documentation is accurate and meets delivery standards.
[0046] S150. Push the final technical document, which has been confirmed by the user, to the AI programming tool so that it can generate business code.
[0047] Specifically, once the user confirms the technical documentation is correct, the system triggers the final document generation and push process. The AI agent invokes the "Lark Document Generation MCP" to systematically integrate the core deliverables from each previous stage according to a pre-defined four-segment standard structure. The integrated content strictly follows the order of "complete requirement content - interface data structure - interactive document content - technical document content," ensuring the integrated document is complete and clearly structured. During integration, the system automatically verifies the content format to ensure it is in standardized Markdown format. After integration, the Lark Document Generation MCP automatically generates the corresponding Lark document and returns a document link. Based on this link, the system pushes it to the designated AI programming tool (such as GitHub Copilot, Cursor, etc.) in real time. The AI programming tool can directly parse the technical document content through this link and quickly generate business code that conforms to the requirement specifications, thus achieving fully automated direct flow from requirements to code without manual intervention.
[0048] The primary objective of this invention is to overcome the shortcomings of existing technologies, such as reliance on manual labor for technical document generation, low efficiency, inconsistent quality, and difficulty in effectively supporting AI coding. This invention provides a method and system for the automated generation and direct AI coding of intelligent technical documents based on multi-component collaboration and prompt word engineering. The invention aims to achieve rapid self-healing and efficiency improvement in key stages of the development process through automated document parsing, intelligent data acquisition, precise document generation, and standardized document delivery. This significantly reduces the technical barriers and labor costs of development and maintenance, and enhances the overall efficiency and business response speed of software development.
[0049] In a preferred embodiment, step S110 involves acquiring a requirement document and slicing and parsing the requirement document to extract the complete requirement content. This further includes: uploading the requirement document to the Lark Knowledge Base; slicing the requirement document according to preset requirement document standardization and segmentation rules using the Lark Knowledge Base's intelligent slicing function; triggering a knowledge space recall node through the Lark workflow, and using prompt word engineering to guide the agent to parse the sliced document and integrate it to form a complete and coherent overall requirement profile, but this is not limited to this step.
[0050] In a preferred embodiment, step S120, based on the complete content of the requirement, triggering the Interface Data Structure (MCP) to obtain the corresponding interface data structure, further includes: the agent actively querying the user to obtain the interface name and application ID based on the complete content of the requirement; in response to the interface name and application ID provided by the user, calling the Interface Data Structure (MCP) to obtain the complete data structure of the corresponding interface; performing integrity verification and compatibility verification with the requirement content on the obtained interface data structure, and confirming or correcting it based on user feedback, but not limited thereto.
[0051] In a preferred embodiment, step S120, based on the complete content of the required information, triggers the generation of an interactive document (MCP) to obtain the corresponding interactive document content. This further includes: the agent asking the user whether to provide an interactive image link; if the user provides the interactive image link, the Lark workflow triggers the generation of an interactive document (MCP) to obtain the complete interactive document content based on the interactive image link. The interactive document content includes page interaction logic, operation flow, and anomaly feedback mechanism, but is not limited thereto.
[0052] In a preferred embodiment, step S130, combining the complete content of the requirement, the interface data structure, and the content of the interactive document, and based on preset technology stack information, guides the agent to generate a standardized technical document using prompt word engineering. This further includes: the agent actively asking the user to confirm the technology stack information required to achieve the current requirement; after obtaining the technology stack information, combining the confirmed complete content of the requirement, the interface data structure, and the content of the interactive document, guiding the agent to generate the standardized technical document module by module according to a preset document format and logical structure, but not limited thereto.
[0053] In a preferred embodiment, step S140 involves verifying and optimizing the generated standardized technical document until it meets a preset document quality standard. This further includes: initiating a dual verification mechanism, including verifying the logical completeness of the document and verifying the accuracy of the document details; for problems discovered during verification, if the error is clearly identifiable, it is automatically corrected by the intelligent agent; if the requirement description is vague or cannot be clearly determined, the intelligent agent actively asks the user for feedback and modifies and improves the technical document based on the user's feedback; the verification and optimization steps are repeatedly executed until the user confirms that the technical document is error-free, but this is not a limitation.
[0054] In a preferred embodiment, step S150, pushing the final technical document confirmed by the user to the AI programming tool for generating business code, further includes: triggering the generation of an MCP from Lark documents, integrating the complete content of the requirements, interface data structure, interactive document content, and the final technical document into a Lark document in standard Markdown format according to a preset four-segment structure; storing the generated Lark document in a designated folder, and pushing its link to the AI programming tool, but not limited thereto.
[0055] The specific embodiments of the present invention are as follows: This invention achieves a complete automated closed loop through the collaborative work of four main modules: document parsing module, data acquisition module, document generation module, verification and optimization module, and document push module.
[0056] Step 1: Document Parsing and Information Extraction (corresponding to step S110). After system startup, the system first receives the user-uploaded requirement documents through the document parsing module. The core of this module is utilizing Lark's intelligent slicing function to transform unstructured document content into structured knowledge fragments. Subsequently, through the "Knowledge Space Recall" node in the Lark workflow, combined with prompt word engineering, an agent is guided to deeply understand and analyze these fragments, ultimately extracting accurate, complete, and unambiguous requirement content. This step is the foundation for all subsequent work, ensuring the system's accurate understanding of the original requirements.
[0057] Step 2: Multi-source data collaborative acquisition (corresponding to S120). This is one of the key technical aspects of this invention. After obtaining the required content, the data acquisition module is not limited to a single information source, but rather, through the interaction between the agent and the user, it collaboratively triggers multiple dedicated MCP (Model Context Protocol) tools to acquire supplementary information.
[0058] Interface Data Structure (MCP): This MCP is triggered when the user provides the interface name and application ID. It connects to the backend interface management platform or API gateway and uses contract-based API calls to dynamically retrieve the complete data structure definition of the specified interface in real time. This avoids version inconsistencies or information omissions that may occur when manually reviewing interface documentation.
[0059] Interactive Document Generation (MCP): This MCP is triggered when a user provides a link to an interactive design draft (such as Figma, Lanhu, etc.). It uses image recognition, OCR (Optical Character Recognition), and interactive logic parsing technologies to intelligently extract dynamic interactive information such as page elements, navigation relationships, and operation flows from static images, and converts it into a structured text description to generate an interactive document.
[0060] Through the collaboration of these two MCP tools, the system can automatically supplement the necessary interfaces and interactive information for generating technical documents, ensuring the accuracy and completeness of the information source.
[0061] Step 3: Intelligent Document Generation and Iterative Optimization (corresponding to S130 and S140). This step is the core intelligent embodiment of the invention. The document generation module integrates the "complete requirements content" produced in Step 1 and the "interface data structure" and "interaction document content" produced in Step 2, forming a complete input dataset. Subsequently, the agent actively inquires from the user about the technology stack information required for this development (such as Vue + Spring Boot). After obtaining the technology stack information, the agent utilizes powerful large language model capabilities and combines a carefully designed and optimized "prompt word project" to begin generating technical documents. This prompt word project defines the document's structure (such as background, technology selection, interface design, interaction implementation, exception handling, etc.), language style, and level of detail, ensuring that the generated documents are standardized and directly reusable. After the initial document generation, it immediately enters the verification and optimization module. This module initiates dual verification: first, logical verification, checking whether the document covers all requirements and whether the logic is consistent; second, detailed verification, such as whether the interface parameter names and return value fields are consistent with those obtained by MCP. For confirmed errors, the agent automatically corrects them; for ambiguous points, it seeks clarification by asking the user questions and modifies the document based on the feedback. This process forms a closed loop of iterative optimization through human-machine collaboration, until the user finally confirms that the document is error-free.
[0062] Step 4: Standardized Output and Direct AI Coding (corresponding to S150). This is the final step in creating business value. After receiving confirmation from the user, the document push module triggers the "Lark Document Generation MCP". This MCP integrates all key deliverables from this process—the complete requirement content, interface data structure, interactive document content, and the final confirmed technical document—according to a preset "four-part" standard structure (e.g., 1. Requirement Background; 2. Interface Definition; 3. Interaction Description; 4. Technical Implementation Scheme) and automatically converts them into a formatted Markdown file. Subsequently, the system uses the Lark open API to automatically generate an online Lark document from this Markdown file and pushes its access link to downstream AI programming tools in real time (e.g., via API calls or plugin mechanisms). The AI programming tool can directly read the standardized content in this link as context to accurately generate business code, thus truly achieving fully automated direct supply from "requirement document" to "AI-generated code", completely eliminating the intermediate manual writing and transmission links.
[0063] Compared with the prior art, the technical solution proposed in this invention has the following significant advantages: It achieves a high degree of automation, greatly improving development efficiency. What used to require hours of complex, multi-step operations by professional developers (reading comprehension, information retrieval, document writing, and formatting) is simplified to a simple interaction where the user uploads the document, confirms information, and selects the technology stack; the remaining steps are all handled automatically by the system backend. This significantly lowers the barrier to entry and reduces manual labor costs for technical documentation, allowing developers to focus on more creative coding and architectural design, achieving a minute-level response time from requirements to technical documentation to code.
[0064] Accurate and comprehensive information acquisition ensures document quality. By introducing the "Interface Data Structure (MCP)" and "Interactive Document Generation (MCP)," the system can directly obtain dynamic and accurate interface definitions and interaction logic from the source, completely eliminating the inefficient and error-prone mode of manual review and input. Combined with multi-dimensional verification and intelligent agent questioning mechanisms, the generated documents far surpass those written manually in terms of logical completeness and accuracy of details, providing a solid and reliable technical basis for subsequent AI coding.
[0065] The generation strategy is flexible, intelligent, and effective. The introduction of "prompt word engineering" guides the large language model, making technical document generation no longer a "black box" operation. Instead, it can be customized and guided according to specific enterprise specifications, technology stack preferences, and project types. The generated documents have a clear structure, consistent style, and detailed content, exhibiting excellent readability and reusability. The iterative closed loop of "generation-verification-feedback-optimization" ensures that the final output document quality meets delivery standards.
[0066] The system achieves standardization and observability of the development process. It standardizes and streamlines the entire technical documentation generation process, clearly recording and archiving all operational steps, data sources, user confirmation records, and final deliverables. This not only ensures process standardization and result traceability but also provides valuable data support for the team's knowledge accumulation and continuous process optimization.
[0067] With wide applicability, flexible deployment, and easy integration, the methods and systems of this invention are primarily built on open technologies such as Lark platform and MCP (Model Context Protocol), possessing strong scalability and integration capabilities. It can be deployed as a standalone performance tool or easily embedded into an enterprise's existing DevOps platform or project management system, quickly empowering the entire R&D team.
[0068] Compared with the prior art, the technical solution proposed in this invention has the following significant advantages: Significantly improves conversion efficiency and reduces labor costs: This invention replaces the traditional manual writing mode with an automated process, reducing the processing time for a single requirement document from hours to minutes. Especially in scenarios with massive concurrent requirements, it can save more than 90% of labor and time costs, significantly improving development iteration efficiency.
[0069] Significantly improves document quality and coding accuracy: This invention, through preset multi-dimensional verification rules and intelligent agent decision-making logic optimized by prompt words, can automatically identify and correct problems such as deviations in requirement parsing, missing interface data, and logical inconsistencies in documents, increasing the accuracy of generated technical documents to over 98%. Standardized technical documents provide precise input for AI programming tools, thereby ensuring that the generated business code highly conforms to requirement specifications and reducing coding rework rate by more than 85%.
[0070] Ensuring information integrity and consistency: This invention automatically obtains and integrates key information required by technical documents from the source by linking the interface data structure MCP and the interactive document generation MCP, avoiding information omissions or errors that may occur during manual search and integration, and ensuring the integrity of technical documents and consistency with the original requirements.
[0071] Achieving standardization and traceability in the development process: This invention establishes a fully automated chain from "requirements document - technical document - AI coding," enabling real-time data linkage and traceability of results across all stages. This not only ensures accurate requirement delivery and standardized document generation but also provides reliable data support for project management and resource scheduling.
[0072] Wide applicability and flexible deployment: The methods and systems of this invention are mainly based on the general Lark platform and MCP architecture, making them easy to integrate into existing enterprise development processes and toolchains. They can be deployed as standalone automation tools or embedded as core modules into a unified R&D efficiency platform, rapidly improving team development efficiency.
[0073] Figure 2 This is a system architecture diagram of the browser connector service in the automated technical document generation system of this invention. (For example...) Figure 2 As shown, the automated technical document generation system 5 of the present invention includes: The document parsing module 51 obtains the requirement document and performs slicing and parsing on the requirement document to extract the complete requirement content. Specifically, the requirement document is sliced using the intelligent slicing function of Lark Knowledge Base, and the knowledge space recall node is triggered through Lark workflow. The intelligent agent is guided by prompt word engineering to parse the sliced document in order to integrate and update the requirement content. The data acquisition module 52, based on the complete content of the requirements, actively queries the user through an intelligent agent to obtain the interface name and application ID. In response to the interface name and application ID provided by the user, it triggers the interface data structure MCP to obtain the corresponding interface data structure, and performs integrity verification and adaptability verification with the requirements content on the obtained interface data structure; and, through an intelligent agent, it queries the user to provide a link to the interaction design draft. If the user provides it, it triggers the interaction document generation MCP to parse and generate the corresponding interaction document content. The document generation module 53, combining the complete content of the requirement, the interface data structure and the content of the interactive document, actively asks the user through the intelligent agent to confirm the technology stack information required to realize the current requirement, and based on the technology stack information, uses prompt words to guide the intelligent agent to generate standardized technical documents. The verification and optimization module 54 verifies and optimizes the generated standardized technical document, and initiates a dual verification mechanism including verification of the document's logical integrity and verification of the document's detail accuracy. For problems found during verification, if they are clearly identifiable errors, the intelligent agent will automatically correct them. If the requirements are vaguely described or cannot be clearly identified, the intelligent agent will actively ask the user for feedback and make modifications until the user confirms that the technical document is correct. The document push module 55 triggers the Lark document to generate MCP, which integrates the complete content of the requirements, interface data structure, interactive document content and final technical document into a standard Markdown format Lark document according to the preset four-segment structure, and pushes the generated Lark document link to the AI programming tool for it to generate business code.
[0074] In summary, the technical document automated generation system of the present invention can realize the fully automated transformation from requirement documents to technical documents in the Web page development scenario, and provide accurate and standardized technical basis for AI programming tools.
[0075] This invention also provides an automated technical document generation device, including a processor and a memory storing executable instructions for the processor. The processor is configured to execute steps of a method for automated technical document generation via executing the executable instructions.
[0076] As shown above, the technical document automated generation device of the present invention in this embodiment can realize the fully automated transformation from requirement documents to technical documents in the Web page development scenario, and provide accurate and standardized technical basis for AI programming tools.
[0077] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "platform."
[0078] Figure 3 This is a schematic diagram of the structure of the automated technical document generation device of the present invention. See below for reference. Figure 3 To describe an electronic device 600 according to this embodiment of the present invention. Figure 3 The electronic device 600 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0079] like Figure 3 As shown, the electronic device 600 is presented in the form of a general-purpose computing device. The components of the 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), a display unit 640, etc.
[0080] The storage unit stores program code, which can be executed by the processing unit 610 to perform the steps described in the method section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 610 can perform actions such as... Figure 1 The steps are shown in the figure.
[0081] Storage unit 620 may include readable media in the form of volatile storage units, such as random access memory (RAM) 6201 and / or cache memory 6202, and may further include read-only memory (ROM) 6203.
[0082] Storage unit 620 may also include a program / utility 6204 having a set (at least one) program module 6205, such program module 6205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0083] Bus 630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the multiple bus structures.
[0084] Electronic device 600 can also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 600, and / or with any device that enables electronic device 600 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 650. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 660. Network adapter 660 can communicate with other modules of electronic device 600 via 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 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.
[0085] This invention also provides a computer-readable storage medium for storing a program, which, when executed, implements the steps of a method for automatically generating technical documents. In some possible implementations, various aspects of this invention can also be implemented as a program product comprising program code that, when run on a terminal device, causes the terminal device to perform the steps described in the above-described method section of this specification according to various exemplary embodiments of the invention.
[0086] As shown above, the technical document automated generation system of the present invention in this embodiment can realize the fully automated transformation from requirement documents to technical documents in the Web page development scenario, and provide accurate and standardized technical basis for AI programming tools.
[0087] Figure 4 This is a schematic diagram of the structure of the computer-readable storage medium of the present invention. (Reference) Figure 4 As shown, a program product 800 for implementing the above-described method according to an embodiment of the present invention is described. It may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may 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, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0088] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0089] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in connection 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 fiber, RF, etc., or any suitable combination thereof.
[0090] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0091] In summary, the purpose of this invention is to provide a method, system, device, and storage medium for the automated generation of technical documents, which can realize the fully automated transformation from requirement documents to technical documents in the context of web page development, and provide accurate and standardized technical basis for AI programming tools.
[0092] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.
Claims
1. A method for automatically generating technical documents, characterized in that, Includes the following steps: S110. Obtain the requirement document and perform slicing and parsing on the requirement document to extract the requirement content. The requirement document is sliced using the intelligent slicing function of Lark Knowledge Base, and the knowledge space recall node is triggered through Lark workflow. The intelligent agent is guided by prompt word engineering to parse the sliced document in order to integrate and update the complete requirement content. S120. Based on the complete content of the requirements, the agent actively queries the user to obtain the interface name and application ID. In response to the interface name and application ID provided by the user, the interface data structure MCP is triggered to obtain the corresponding interface data structure. The obtained interface data structure is then checked for completeness and compatibility with the requirements. Additionally, the agent queries the user to ask if they provide a link to the interaction design draft. If the user provides one, the interaction document generation MCP is triggered to parse and generate the corresponding interaction document content. S130. Combining the complete content of the requirements, the interface data structure, and the content of the interactive document, the intelligent agent actively asks the user to confirm the technology stack information required to achieve the current requirements, and based on the technology stack information, the intelligent agent is guided to generate standardized technical documents using prompt words. S140. Verify and optimize the generated standardized technical document, and start a dual verification mechanism including verification of the logical integrity of the document and verification of the accuracy of the document details. If the problem found by the verification is a clearly identifiable error, the intelligent agent will automatically correct it. If the requirement description is vague and cannot be clearly determined, the intelligent agent will actively ask the user to obtain feedback and make modifications until the user confirms that the technical document is correct. S150. Trigger Lark document generation MCP, integrate the complete content of the requirements, interface data structure, interactive document content and final technical document into a standard Markdown format Lark document according to the preset four-segment structure, and push the generated Lark document link to the AI programming tool for it to generate business code.
2. The method for automatically generating technical documents according to claim 1, characterized in that, In step S110, the requirement document is sliced and parsed, including: uploading the requirement document to Lark Knowledge Base, and using the Lark Knowledge Base's intelligent slicing function to split the requirement document into multiple logical segments according to preset requirement document standardization and segmentation rules. Each segment is composed of a document title, paragraph title, and paragraph content.
3. The method for automatically generating technical documents according to claim 1, characterized in that, In step S120, the triggering of the interface data structure MCP to obtain the corresponding interface data structure includes: calling the interface data structure MCP and using the contract call API tool to obtain the complete data structure of the corresponding interface from the interface management platform. The complete data structure includes interface parameter definitions, return value specifications, and calling rules.
4. The method for automatically generating technical documents according to claim 1, characterized in that, In step S120, the step of triggering the interactive document generation MCP to obtain the corresponding interactive document content includes: Lark workflow triggers the interactive document generation MCP, and with the help of image recognition and interactive logic parsing capabilities, a complete interactive document containing page interaction logic, operation flow and abnormal feedback mechanism is generated based on the image content corresponding to the interactive image link.
5. The method for automatically generating technical documents according to claim 1, characterized in that, In step S130, the step of using prompt words to guide the agent to generate standardized technical documents includes: the agent follows a preset document generation standard, and in conjunction with the input dataset, generates technical documents in modules that include at least requirement breakdown, technology selection instructions, interface call specifications, key points of functional module development, and exception handling solutions.
6. The method for automatically generating technical documents according to claim 1, characterized in that, In step S140, the verification and optimization of the generated standardized technical document includes: repeatedly executing the iterative closed loop of "generation-verification-feedback-optimization" until the user finally confirms that the technical document meets the preset document quality standards.
7. The method for automatically generating technical documents according to claim 1, characterized in that, In step S150, pushing the generated Lark document link to the AI programming tool includes: the AI programming tool parses the Markdown format content in the Lark document link to obtain technical implementation details, and generates corresponding business code based on the technical implementation details.
8. A technical document automated generation system, used to implement the technical document automated generation method according to any one of claims 1 to 7, characterized in that, include: The document parsing module obtains the requirement document and performs segmentation and parsing on the requirement document to extract the complete requirement content. Specifically, the requirement document is segmented using the intelligent segmentation function of Lark Knowledge Base, and the knowledge space recall node is triggered through Lark workflow. The prompt word engineering guides the intelligent agent to parse the segmented document and update the requirement content after integration. The data acquisition module, based on the complete content of the requirements, actively queries the user through an intelligent agent to obtain the interface name and application ID. In response to the interface name and application ID provided by the user, it triggers the Interface Data Structure (MCP) to obtain the corresponding interface data structure, and performs integrity verification and adaptability verification with the requirements content on the obtained interface data structure. In addition, it queries the user through an intelligent agent to ask if they provide a link to the interaction design draft. If the user provides one, it triggers the Interaction Document Generation (MCP) to parse and generate the corresponding interaction document content. The document generation module, combining the complete content of the requirements, the interface data structure, and the interactive document content, actively asks the user through an intelligent agent to confirm the technology stack information required to achieve the current requirements, and based on the technology stack information, uses prompt words to guide the intelligent agent to generate standardized technical documents. The verification and optimization module verifies and optimizes the generated standardized technical documents. It initiates a dual verification mechanism, including verification of the document's logical integrity and verification of the document's detailed accuracy. For problems found during verification, if they are clearly identifiable errors, the intelligent agent will automatically correct them. If the requirements are vaguely described or cannot be clearly identified, the intelligent agent will actively ask the user for feedback and make modifications until the user confirms that the technical documents are correct. The document push module triggers the generation of an MCP from Lark documents. It integrates the complete content of the requirements, interface data structure, interactive document content, and final technical document into a standard Markdown format Lark document according to a preset four-segment structure, and pushes the generated Lark document link to the AI programming tool for generating business code.
9. A device for automatically generating technical documents, characterized in that, include: processor; A memory in which executable instructions of the processor are stored; The processor is configured to perform the steps of the automated technical 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 the processor, it implements the steps of the method for automatically generating technical documents according to any one of claims 1 to 7.