Project document generation method

CN122886569APending Publication Date: 2026-10-09BEIJING PACTERA JINXIN TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611114349.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

一旦这些漏洞被一些用户利用,将给企业带来巨大的经济损失和声誉损害,后果不堪设想

Benefits of technology

获取用于生成目标软件项目的项目说明文档的原始项目文件,并获取项目说明文档的文档类型;对原始项目文件进行分析,以得到初始项目信息;基于项目说明文档的文档类型,对初始项目信息进行增强分析,以得到目标项目信息;采用大模型,根据目标项目信息,生成目标软件项目的项目说明文档。由此,能够自动从目标软件项目的原始项目文件中提取关键的初始项目信息,减少人工梳理、撰写及校对文档的繁琐操作,提升项目说明文档的生成效率与质量;然后,依赖于提取到的初始项目信息以及待生成的项目说明文档的文档类型,精准挖掘目标软件项目的特点,即目标项目信息,提升信息挖掘的准确性,有助于提升后续生成的项目说明文档的准确性和可靠性,然后再借助大模型强大的理解、分析与生成能力,实现从原始项目文件到项目说明文档的直接转化,如此,可以简化软件项目信息的采集、整理与文档编写流程,提升项目说明文档生成的针对性与实用性,实现项目说明文档的高效、自动化生成;进一步地,根据不同文件类型的原始项目文件自适应匹配对应的信息提取策略,可以提升抽取到的各类文件中的初始项目信息的准确性和有效性,避免因文件类型差异导致的信息丢失或解析错误,提升初始项目信息获取的完整性、准确性和通用性,为后续大模型生成可靠的项目说明文档提供高质量的数据基础。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122886569A_ABST
    Figure CN122886569A_ABST
Patent Text Reader

Abstract

The present disclosure provides a project document generation method, which comprises: obtaining original project files for generating a project description document of a target software project, and obtaining a document type of the project description document; analyzing the original project files to obtain initial project information; performing enhanced analysis on the initial project information based on the document type of the project description document to obtain target project information; and using a large model to generate the project description document of the target software project according to the target project information. The method can automatically extract key initial project information from the original project files of the target software project, and then accurately mine target project information in dependence on the extracted initial project information and the document type of the project description document, thereby helping to improve the accuracy and reliability of the subsequently generated document. Then, with the aid of the large model, the conversion from the original project files to the project description document is realized, thereby improving the pertinence and practicality of the project description document generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a method for generating project documents. Background Technology

[0002] In today's era of rapid digital development, various software projects (such as Java projects) serve as key carriers for enterprise operations and business expansion, undergoing long-term and continuous iterative updates. During this long evolution, many existing projects have gradually revealed numerous significant quality vulnerabilities at the code level. Due to repeated modifications and expansions, the code structure has become intricate, with excessive coupling between different modules, leading to a significant reduction in code readability and maintainability. Simultaneously, a large amount of redundant code has quietly accumulated, not only consuming valuable storage resources but also potentially triggering unnecessary calculations during program execution, impacting overall system efficiency.

[0003] Furthermore, with the rapid development of enterprise business, the amount of data is growing exponentially, and users are placing more stringent demands on the system's response speed and processing capabilities. Under these circumstances, existing project systems are beginning to face severe performance bottlenecks, with significantly longer response times for processing requests, and even stuttering and crashing in high-concurrency scenarios, severely restricting further business expansion and failing to meet the rapidly changing needs of the market.

[0004] At the same time, cybersecurity threats are ever-present and increasingly complex and diverse. Existing projects, due to their earlier development, often have inherent weaknesses in their code design, potentially containing vulnerabilities such as data breaches and malicious code injection. If these vulnerabilities are exploited by users, they can cause enormous economic losses and reputational damage to enterprises, with unimaginable consequences.

[0005] For large-scale existing projects, the codebase is massive and the logic is intricate. When new members join the project, they often need to spend a lot of time and energy to familiarize themselves with the code architecture and business logic. This not only reduces the overall development efficiency of the team, but may also lead to errors during development due to misunderstandings, affecting the smooth progress of the project.

[0006] Given the aforementioned severe situation, existing projects face unprecedented challenges in terms of quality, performance, security, and teamwork. Therefore, a comprehensive and in-depth analysis of the source code of existing projects has become an urgent priority, as it is key to solving current problems and ensuring the continued stable development of projects. Summary of the Invention

[0007] This disclosure aims to at least partially address one of the technical problems in the related art.

[0008] One aspect of this disclosure proposes a project documentation generation method that can automatically extract key initial project information from the original project files of a target software project, reducing the tedious manual processes of sorting, writing, and proofreading documents, and improving the efficiency and quality of project documentation generation. Then, relying on the extracted initial project information and the document type of the project documentation to be generated, the method accurately mines the characteristics of the target software project, i.e., target project information, improving the accuracy of information mining and helping to improve the accuracy and reliability of the subsequently generated project documentation. Then, by leveraging the powerful understanding, analysis, and generation capabilities of a large model, the method generates project documentation, maintaining a high degree of consistency between the content of the generated project documentation and the actual project code, configuration, and business logic, reducing the risk of omissions, errors, and inconsistencies in expression caused by manual writing, and realizing the automated, standardized, and intelligent output of software project documentation.

[0009] The first aspect of this disclosure provides a method for generating project documents, the method comprising: Obtain the original project file used to generate the project specification document for the target software project, and obtain the document type of the project specification document; The original project files are analyzed to obtain initial project information; Based on the document type of the project description document, the initial project information is enhanced and analyzed to obtain the target project information; Using a large model, a project description document for the target software project is generated based on the target project information.

[0010] A second aspect of this disclosure provides a project document generation apparatus, the apparatus comprising: The acquisition module is used to acquire the original project file used to generate the project specification document for the target software project, and to acquire the document type of the project specification document; The first analysis module is used to analyze the original project file to obtain initial project information; The second analysis module is used to perform enhanced analysis on the initial project information based on the document type of the project description document in order to obtain the target project information; The generation module is used to generate a project description document for the target software project based on the target project information, using a large model.

[0011] A third aspect of this disclosure provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the project document generation method as proposed in the first aspect of this disclosure.

[0012] The fourth aspect of this disclosure provides a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the project document generation method as described in the first aspect of this disclosure.

[0013] A fifth aspect of this disclosure provides a computer program product in which, when instructions in the computer program product are executed by a processor, a project document generation method as described in a first aspect of this disclosure is performed.

[0014] The technical solutions provided by the above embodiments of this disclosure bring at least the following beneficial effects: Obtain the original project files used to generate the project specification document for the target software project, and determine the document type of the project specification document; analyze the original project files to obtain initial project information; perform enhanced analysis on the initial project information based on the document type of the project specification document to obtain target project information; use a large model to generate the project specification document for the target software project based on the target project information. Therefore, it can automatically extract key initial project information from the original project files of the target software project, reducing the tedious manual sorting, writing, and proofreading of documents, and improving the efficiency and quality of project specification document generation. Then, relying on the extracted initial project information and the document type of the project specification document to be generated, it accurately mines the characteristics of the target software project, i.e., target project information, improving the accuracy of information mining, which helps to improve the accuracy and reliability of the subsequently generated project specification document. Then, with the powerful understanding, analysis, and generation capabilities of the large model, it can achieve direct conversion from the original project files to the project specification document. In this way, it can simplify the process of collecting, organizing, and writing software project information, improve the relevance and practicality of the generated project specification document, and achieve efficient and automated generation of project specification documents. Furthermore, by adaptively matching the corresponding information extraction strategy according to the original project files of different file types, it can improve the accuracy and effectiveness of the initial project information extracted from various files, avoid information loss or parsing errors caused by differences in file types, improve the completeness, accuracy, and universality of the initial project information acquisition, and provide a high-quality data foundation for the subsequent generation of reliable project specification documents by the large model.

[0015] Additional aspects and advantages of this disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description

[0016] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which: Figure 1 A flowchart illustrating a project document generation method provided in an embodiment of this disclosure; Figure 2 A flowchart illustrating another project document generation method provided in this embodiment of the disclosure; Figure 3 A flowchart illustrating another project document generation method provided in this embodiment of the disclosure; Figure 4 A schematic diagram of the structure of an automatic project document generation system provided in this disclosure; Figure 5 This is a schematic diagram of the structure of a project document generation device provided in an embodiment of the present disclosure; Figure 6 This is a schematic diagram of the structure of an electronic device shown in an exemplary embodiment of the present disclosure. Detailed Implementation

[0017] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure.

[0018] It should be noted that the acquisition, storage, use, and processing of data in this disclosed technical solution comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0019] It should also be noted that the information (including but not limited to user personal information, transaction information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in this disclosure are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0020] The method for generating project documents according to embodiments of this disclosure is described below with reference to the accompanying drawings.

[0021] Figure 1 This is a flowchart illustrating a project document generation method provided in an embodiment of the present disclosure.

[0022] This disclosure illustrates an example where the project document generation method is configured in a project document generation device. The project document generation device can be applied to any electronic device so that the electronic device can perform the project document generation function.

[0023] Among them, electronic devices can be any device with computing capabilities, such as personal computers, mobile terminals, servers, etc. Mobile terminals can be hardware devices with various operating systems, touch screens and / or displays, such as mobile phones, tablets, personal digital assistants, wearable devices, etc.

[0024] like Figure 1 As shown, the document generation method for this project includes the following steps S110 to S130: Step S110: Obtain the original project file used to generate the project specification document for the target software project, and obtain the document type of the project specification document.

[0025] The target software project refers to a software project for which project documentation needs to be generated to complete the documentation. For example, the target software project can be a project under development, in testing, or already launched, and this disclosure does not impose any restrictions on this.

[0026] The original project files may include, but are not limited to: code files (also known as source code files), code project configuration files (also known as project configuration files), project configuration files, etc. Code files can be text files that directly contain executable program logic, algorithms, and business function implementation code; code project configuration files can be used to record metadata such as the names, storage paths, and loading rules of various project configuration files for the software project to be processed; project configuration files can be text files used to describe, control, and configure the entire software project's runtime environment, build rules, dependencies, tool behaviors, etc.

[0027] In this embodiment of the disclosure, the original project file used to generate the project description document for the target software project can be obtained.

[0028] To achieve the acquisition of the original project files, as an example, the user interface included in the execution entity of this disclosure is integrated into an IDE (Integrated Development Environment) plugin as the interaction entry point. This allows the IDE plugin to directly leverage its native awareness of the current development environment, eliminating the need for the user to manually specify the project path or upload files. It directly identifies and reads the original project files of the software project to be processed from the IDE's context environment. For instance, the user can initiate relevant commands within the IDE through the plugin's interaction entry points, such as the top menu, right-click menu, or keyboard shortcuts, for example, a command to generate project documentation. The IDE plugin can then first read the IDE's current context environment, automatically identifying and locking the currently open or running software project as the project to be processed. Next, the IDE plugin can call the IDE's project management API (Application Programming Interface) to obtain the directory path of the software project to be processed, including, for example, the root path of source code files, the root path of configuration files, etc. Then, based on the located directory path, the IDE plugin can call the IDE's file access API to traverse and read the original project files within that directory path. Optionally, the raw project files read can be filtered through IDE plugins. For example, empty files, corrupted files, commented files, and other invalid files can be filtered out.

[0029] As another example, if the user interface included in the execution entity of this disclosure is not integrated into the IDE plugin, it can respond to the user's input operation, obtain the directory path of the original project file, and then recursively scan the files under the directory path to obtain the original project file.

[0030] It should be noted that this disclosure does not limit the number of original project files, nor does it limit the text format of the original project files.

[0031] The document types may include, but are not limited to: project overview documents, software architecture design documents, interface documents, technology stack description documents, project development description documents, project deployment guidelines, etc.

[0032] The project overview document describes the overall goals, background, technical architecture, functional modules, and technical features of the software project. The software architecture design document describes the overall architecture, module division, dependencies, and layered structure of the software project. The interface document provides a standardized description of the interaction interfaces between modules, front-end and back-end systems, and between the software's corresponding system and external third parties, specifying request methods, parameter definitions, response formats, exception handling rules, and example code. The technology stack description document describes the technical framework, development tools, databases, middleware, and other technical components used in the software project, as well as their versions, selection criteria, and dependencies. The project development description document describes the development environment setup, coding standards, and code development process. The project deployment guide describes the deployment environment, deployment steps, service maintenance, and exception handling for the software project.

[0033] In this embodiment of the disclosure, the document type of the project specification document to be generated can be obtained. As an example, the document type of the project specification document to be generated is obtained in response to user input.

[0034] The forms of input operations include, but are not limited to: voice input, keyboard input, touch selection input, mouse click selection input, drop-down menu selection input, command-triggered input, file import input, and barcode recognition input.

[0035] In one example, the execution entity of this disclosure can listen to and respond to user-initiated input operations in real time. These operations can be completed through various interactive methods such as voice input, keyboard input, touch selection, and menu selection. The user specifies or selects the document type corresponding to the project description document to be generated through the above operations. After receiving the user's operation instructions, the execution entity of this disclosure parses and identifies the instruction content to determine and obtain the document type of the project description document to be generated, which can provide a basis for subsequent execution of the corresponding information extraction and document generation processes.

[0036] Step S120: Analyze the original project files to obtain initial project information.

[0037] The initial project information may include, but is not limited to, information related to: classes, methods, interfaces, parameters, dependencies, configurations, etc.

[0038] In this embodiment of the disclosure, the original project file can be parsed and analyzed, thereby extracting initial project information from the original project file. For example, an LLM (Large Language Model) can be used to analyze the original project file to extract the initial project information.

[0039] To obtain initial project information, in one possible implementation of this disclosure embodiment, such as... Figure 2 As shown, step S120 can be achieved by using the following steps S121 to S122: Step S121: Determine the file type of the original project file based on at least one of the following: the file name suffix of the original project file, the storage path corresponding to the original project file, and the file content of the original project file.

[0040] The file types can include, but are not limited to, source code files, configuration files, etc.

[0041] As an example, the file type can be determined based on the file name suffix or extension of the original project files. For instance, a mapping between file name suffixes and file types can be established and saved beforehand. Then, after determining the file name suffix, the mapping can be queried to determine the corresponding file type. For example, files with suffixes like .java, .kt, and .proto can be identified as source code files, while files with suffixes like .yml, .yaml, .properties, .xml, and .gradle can be identified as configuration files.

[0042] As another example, the file type can be determined based on the storage path corresponding to the original project files. For instance, files in the ... / java directory can be identified as source code files, and files in the ... / resources directory can be identified as configuration files.

[0043] As another example, for original project files without a file extension or with a custom text format, the corresponding file type can be determined based on a preset file header identifier or the text content of the original project file.

[0044] The file header identifier can be a preset, and it is a specific character, string, or identifier code at a fixed position at the beginning of the file. It is an identifier carried by the file itself and used to distinguish the file type.

[0045] Step S122: Based on the file type, determine the information extraction strategy corresponding to the file type.

[0046] Among them, the information extraction strategy can be used to indicate the method of extracting information for the current type of file, the dimensions of information to be extracted, the scope of extraction, and the specific content items to be extracted, etc.

[0047] As one possible approach, a correspondence between file types and information extraction strategies can be established in advance and saved. Then, after determining the file type of the original project file, the correspondence can be queried to determine the corresponding information extraction strategy.

[0048] Step S123: Extract information from the original project file according to the information extraction strategy corresponding to the file type to obtain the initial project information.

[0049] As one possible implementation, the original project file, which belongs to the source code class, is subjected to syntactic analysis to construct a target syntax tree. The target syntax tree includes nodes at multiple levels, and any node can be used to indicate the corresponding code structure information. The target syntax tree is traversed to extract the code structure information indicated by each node. Based on the code structure information indicated by each node and the level to which each node belongs, the initial project information is determined.

[0050] The target syntax tree can include nodes at multiple levels. These nodes can be, but are not limited to, package declaration nodes, class declaration nodes, interface declaration nodes, method declaration nodes, field declaration nodes, parameter declaration nodes, etc. Specifically, package declaration nodes can store information about the package name of the source code corresponding to the software project; class declaration nodes can store information such as class name and modifiers; interface declaration nodes can store information such as interface name and modifiers; field declaration nodes can store information such as field name, field type, and field modifiers; method declaration nodes can store information such as method name, return type, parameter list, and method modifiers; parameter declaration nodes can store information such as the type and name of the corresponding method parameters, and so on.

[0051] The code structure information may include, but is not limited to, information related to classes, interfaces, methods, fields, parameters, etc. It should be noted that any node can be used to indicate corresponding code structure information; for example, a package declaration node can indicate the corresponding package, a class declaration node can indicate the corresponding class, and so on. Further details will not be elaborated upon.

[0052] For example, a parser, such as a JavaParser parser, can be used to perform syntactic analysis on the original project files that belong to the source code class files, and construct an AST (Abstract Syntax Tree), which is referred to as the target syntax tree in this disclosure. Then, the abstract syntax tree can be traversed by depth or breadth according to preset traversal rules. During the traversal, the hierarchical relationship corresponding to each node can be identified, and the code structure information such as classes, interfaces, methods, fields, and parameters indicated by each node can be extracted. The hierarchy corresponding to each node can also be recorded. Furthermore, the extracted code structure information indicated by each node can be arranged in an orderly manner according to the hierarchical relationship corresponding to each node, thereby generating the initial project information.

[0053] Therefore, by conducting refined syntax analysis on source code files and constructing a target syntax tree, complex code text can be transformed into a structured and visualized tree data structure. At the same time, by traversing the syntax tree, code structure information can be systematically extracted. This avoids the problems of missed detections and false detections that are prone to occur when extracting information directly from text, and also ensures that the extracted code structure information has clear hierarchy and logical integrity, thereby improving the efficiency, accuracy, and reliability of the initial project information extraction.

[0054] As another possible implementation, the text format of the original project file is determined based on the file name suffix of the original project file, which belongs to the configuration class file; based on the text format of the original project file, the text parsing rules that match the original project file are determined; the text parsing rules are used to parse the original project file to obtain the project configuration file information; and then, the initial project information can be determined based on the project configuration file information.

[0055] The text format may include, but is not limited to: JSON (JavaScript Object Notation), YAML (YAML Ain't Markup Language), XML (Extensible Markup Language), etc.

[0056] Among them, text parsing rules can be used to parse text or file content.

[0057] The project configuration file information may include, for example, file name, storage path, etc.

[0058] As an example, a correspondence between file formats and text parsing rules can be established in advance and saved. Then, after determining the text format of the code project configuration file, the above correspondence can be queried to determine the corresponding text parsing rules.

[0059] Furthermore, a defined text parsing rule can be used to parse the original project file that belongs to the configuration file category, and obtain the project configuration file information, which can then be used as the initial project information.

[0060] Therefore, for configuration files in the original project files, it can match exclusive text parsing rules according to their text format, which can get rid of the destruction of the structured information of configuration files caused by the use of general text parsing methods, accurately identify the information in configuration files, and improve the accuracy and completeness of the extracted project configuration file information; at the same time, it can also adapt to the syntax characteristics of different types of configuration files, avoiding parsing failures or information distortion caused by format compatibility issues.

[0061] In summary, adaptive matching of information extraction strategies based on original project files of different file types can improve the accuracy and effectiveness of the initial project information extracted from various files, avoid information loss or parsing errors caused by differences in file types, and enhance the completeness, accuracy, and universality of the initial project information acquisition. This provides a high-quality data foundation for generating standardized and reliable project documentation for subsequent large-scale models.

[0062] To obtain initial project information, as an example, in response to the original project files including Java project code data, a large model extracts key project classes and project file description information based on class names and attribute fields in the Java project code data. These key project classes and project file description information are then used as initial project information. Specifically, key project classes can be those that undertake the core business logic and carry the core business entities; the project file description information can be a general description of the overall functionality, business scope, and application scenarios of the Java project.

[0063] As another example, in response to the original project files, including the project configuration file, Maven configuration file, and Java file directory, the large model parses the project configuration file, Maven configuration file, and Java file directory to determine the architecture type and code coding style adopted by the target software project, and uses the architecture type and code coding style adopted by the target software project as the initial project information.

[0064] The architecture type can include, but is not limited to: monolithic architecture, microservice architecture, distributed architecture, front-end and back-end separation architecture, etc.

[0065] The coding style can include, but is not limited to, MVC (Model-View-Controller) coding style, DDD (Domain-Driven Design) coding style, etc.

[0066] As another example, in response to the original project files including the project completion configuration file, Maven configuration file, and Java file directory, the project completion configuration file, Maven configuration file, and Java file directory are parsed through a large model to obtain the technology type, middleware, database objects, files, and network components, and the technology type, middleware, database objects, files, and network components are determined as the initial project information.

[0067] As another example, in response to the import package information of the Java code in the original project file, the import package information of the Java code in the large model is interpreted to identify the project technology stack and the version information used by the target software project; wherein, the version information includes Java version, Spring framework version, database version, and utility class version; the project technology stack and the version information used by the target software project are determined as the initial project information.

[0068] As another example, given the target software project's technology stack and architecture type, a large model can be used to generate the target software project's start command, stop command, and database service information based on the target software project's technology stack and architecture type, and these start commands, stop commands, and database service information can be used as initial project information.

[0069] Step S130: Based on the document type of the project description document, perform enhanced analysis on the initial project information to obtain the target project information.

[0070] In one possible implementation of this disclosure, such as Figure 3 As shown, step S130 can be achieved by using the following steps S131 to S134: Step S131: Determine the instruction information corresponding to the project description document based on the document type to which the project description document belongs.

[0071] It is understood that project description documents of different document types may contain corresponding information to be extracted. In this embodiment of the disclosure, instruction information can be used to indicate the information to be extracted. To determine the instruction information corresponding to the project description document, as an example, a correspondence between document types and instruction information can be established in advance and saved. Then, after determining the document type of the project description document to be generated, the above correspondence can be queried to determine the corresponding instruction information. As another example, the instruction information corresponding to the project description document can be obtained in response to user input.

[0072] As one possible implementation, in response to the project specification document being a project overview document, the indicated information includes at least one of the following: basic information about the target software project, the technology stack used, and a description of the software architecture (such as the architectural pattern of the software architecture (e.g., MVC (Model-View-Controller), layered architecture, microservices, etc.)); in response to the project specification document being a software architecture design document, the indicated information includes at least one of the following: detailed software architecture design information of the target software project, the division of software modules, and the interaction relationships between software modules; in response to the project specification document being an interface document, the indicated information includes at least one of the following: the interface used by the target software project. The interface definition information, interface parameter information, and sample code of the target software project; in response to the document type to which the project documentation belongs, including technology stack documentation, the information includes at least one of the following: relevant information on the technology framework, database, and development tools used by the target software project, as well as the version information corresponding to the target software project; in response to the document type to which the project documentation belongs, including project development documentation, the information includes at least one of the following: the steps for setting up the development environment, coding standards, and development process; in response to the document type to which the project documentation belongs, including project deployment guidelines, the information includes at least one of the following: the deployment operation steps of the target software project, configuration instructions during the deployment process, and key points of operation and maintenance management (such as service operation and maintenance, runtime status monitoring, log management, and exception handling and fault recovery, etc.).

[0073] It should be noted that the instruction information corresponding to different document types can be set as needed, and this disclosure does not impose any restrictions on this.

[0074] Therefore, for document types with different functional positioning, the binding of project description documents and instruction information for different document types is realized, which effectively avoids the problems of omission, redundancy or deviation from document requirements of the information to be extracted. It helps to improve the relevance and adaptability of the subsequently generated project description documents. It can maintain the professionalism, completeness and accuracy of the generated project description document content, realize the differentiated and standardized generation of different types of documents, and cover the document requirements of the entire software project life cycle. It can also improve the practical value and reusability of documents, reduce the manual cost of subsequent document adjustments, and realize the intelligent and refined generation of project documents.

[0075] Step S132: Construct a knowledge graph based on the relationships between the information in the initial project information.

[0076] Among them, the relationships can include, but are not limited to: dependency relationships, subordinate / hierarchical relationships, business relationships, adaptation relationships, collaborative operation relationships, etc.

[0077] Dependencies can be used to indicate the calling, referencing, and version dependencies between components, modules, and code. Examples include reference dependencies between Java classes, project dependencies on Spring framework / database-driven components, and Maven package version dependencies.

[0078] In this context, hierarchical relationships can be used to indicate the relationship between the whole and its parts, the upper-level architecture and the lower-level modules, and the module and its internal code. For example, the overall project architecture may include various business modules, business modules may contain core classes, and database services may belong to the project operation and maintenance components.

[0079] Among these, business relationships can be used to indicate the coordination between different pieces of information in a business scenario. For example, key business categories correspond to database tables, business functions match corresponding start / stop / access commands, and middleware supports the operation of corresponding business modules.

[0080] Among these, compatibility relationships can be used to indicate the compatibility between technical components, versions, configurations, etc. Examples include the compatibility relationship between a specific Java version and a Spring framework version, or the matching relationship between database types and connection configuration parameters.

[0081] Among these, collaborative operational relationships can be used to indicate the cooperative relationships between various components during project operation. For example, the architectural form determines the middleware deployment method, and the database service operates in conjunction with project start and stop commands, etc.

[0082] Step S133: Parse the instruction information to obtain the target intent and information output format.

[0083] Among them, the information output format can be used to constrain the output format of relevant information.

[0084] As an example, a large model can be used to parse the instruction information to obtain the corresponding target intent and information output format.

[0085] Step S134: Using a large model based on a knowledge graph, obtain target project information that matches both the target intent and the information output format.

[0086] For example, a large model is used to read the project information association logic represented by the knowledge graph, analyze the initial project information along the analysis direction of the parsed target intent, and constrain the content organization form according to the information output format, and finally generate target project information that matches both the target intent and the information output format.

[0087] Therefore, based on the document type of the project description document, the required information can be located, avoiding interference from irrelevant information and the generation of redundant content. Furthermore, a knowledge graph is constructed by sorting out the relationships between the initial project information. Then, combined with the target intent and information output format determined based on the instruction information, the large model can quickly and deeply mine information that matches the target intent and information output format with the help of the knowledge organized by the knowledge graph. This enables the determination of the target project information, which not only improves the accuracy and reliability of the target project information, but also enhances the comprehensiveness and logic of the utilization of the initial project information, and helps to improve the quality and accuracy of the subsequently generated project description document.

[0088] It should be noted that this disclosure does not restrict the execution order of steps S131, S132 and S133. This disclosure only uses the execution order of steps S131, S132 and S133 as an example. In practical applications, steps S131 and S133, or steps S132, can also be executed in parallel, etc.

[0089] Step S140: Using a large model, generate a project specification document for the software project based on the target project information.

[0090] The large model can be used to generate project documentation. It should be noted that this disclosure does not restrict the type of model used for the large model.

[0091] To generate project documentation, as an example, target keywords can be determined based on the target project information, and the target keywords can be input into a large model. In response to the output of the large model, the project documentation can be obtained.

[0092] To obtain the target prompt, one possible approach is to fill the target item information into the corresponding fill position in the prompt template, thereby obtaining the target prompt.

[0093] As another possible implementation, the target mapping rules can be queried based on the document type of the project description document to be generated, so as to determine the document content generation rules corresponding to the project description document; the target project information and document content generation rules are then filled into the corresponding positions in the prompt word template to obtain the target prompt words.

[0094] Among them, the target mapping rule can be used to record the correspondence between the document type to which the project description document belongs and the document content generation rule.

[0095] Among them, document content generation rules can be used to indicate the formatting requirements, wording standards, structural hierarchy standards, information redundancy judgment criteria, and priority of important information in the corresponding project description documents for the information to be extracted.

[0096] The requirements include: formatting and layout, such as ensuring operation instructions are on separate lines and key parameters (e.g., log paths, command instructions) are consistently bolded for quick reference; standardized terminology, such as using standard engineering terminology (e.g., "upload" is not "send," "start service" is not "start service," and parameter units and operation instructions are consistent); standardized structural hierarchy, such as using "I, II, III" to label first-level modules and "1., 2., 3." to label second-level steps, ensuring a clear and unambiguous hierarchy; redundancy criteria, such as prohibiting the repeated presentation of the same operation instructions or parameter information (e.g., server configurations already described in "deployment environment requirements" do not need to be mentioned again in subsequent steps); and prioritizing important information, such as highlighting deployment steps, service start / stop instructions, and anomaly troubleshooting methods, which can be prioritized or appropriately bolded.

[0097] As an example, a correspondence between document types and document content generation rules can be established in advance and saved. Then, after determining the document type of the project description document to be generated, the above correspondence can be queried to determine the corresponding document content generation rules. Then, the information to be extracted and the document content generation rules can be filled into the corresponding positions in the prompt word template to obtain the target prompt words.

[0098] In this embodiment of the disclosure, target prompt words can be input into a large model, the large model can analyze the target prompt words, and in response to the output of the large model, a project description document can be obtained.

[0099] Therefore, by defining the corresponding content generation rules based on document type, the generation direction of project specification documents can be clearly defined, avoiding anomalies that may occur when generating documents from large models, such as structural inconsistencies, style mismatches, and deviations from the focus, thus providing clear boundaries for document generation. Simultaneously, by filling in the target project information and document content generation rules according to the preset positions in the template, the need for manually writing complete prompts is eliminated, improving the completeness, logical clarity, and definiteness of the prompts. In this way, the large model can be accurately guided to fully utilize the target project information and document content generation rules, efficiently producing project specification documents that meet the requirements, improving the effectiveness and relevance of the prompts, and enhancing the quality and accuracy of the generated project specification documents.

[0100] In one possible implementation of this disclosure, the storage rules for the project description document are determined based on the document type to which the project description document belongs; and the project description document is stored according to the storage rules.

[0101] Storage rules can be used to characterize the storage location, naming conventions, classification and archiving methods, and subsequent management methods of corresponding documents.

[0102] As one possible implementation, the storage rule could be: determine the storage path corresponding to the project documentation based on the document type to which the project documentation belongs; and write the project documentation into the storage space corresponding to the storage path.

[0103] To determine the storage path, as an example, the target directory level can be determined based on the document type to which the project documentation belongs; a subdirectory corresponding to the target directory level can be created under the preset root directory; and the storage path corresponding to the project documentation can be determined based on the preset root directory and the subdirectory.

[0104] The default root directory can be pre-defined, such as ~ / .xiangmu1-doc / , etc., and this disclosure does not impose any restrictions on it.

[0105] For example, a correspondence between document types and directory levels can be established in advance and saved. Then, after determining the document type to which the project description document belongs, the correspondence can be queried to determine the target directory level corresponding to the project description document. Then, a subdirectory corresponding to the target directory level can be created under the preset root directory. Based on the preset root directory and subdirectory, the storage path corresponding to the project description document can be determined. For example, assuming that the subdirectory is a first-level subdirectory / projectA / and the preset root directory is ~ / .xiangmu1-doc / , then the storage path corresponding to the project description document is ~ / .xiangmu1-doc / projectA / .

[0106] Therefore, in this embodiment of the disclosure, after determining the storage path corresponding to the project specification document, the project specification document can be written into the storage space corresponding to the storage path.

[0107] Therefore, by determining the corresponding storage path based on the document type of the project description document, the storage path and document type can be accurately bound. Then, the project description document can be written into the corresponding storage space of the storage path, which can improve the relevance and effectiveness of document storage and effectively avoid problems such as loss and inconvenience in finding documents caused by messy storage.

[0108] To retrieve storage rules for project documentation, as an example, a mapping between document types and storage rules can be pre-established and saved. Then, after determining the document type of a project documentation document, this mapping can be queried to identify the corresponding storage rules, which can then be designated as the storage rules for the project documentation document. Thus, by configuring storage rules differently according to document type, it is possible to achieve categorized management of project documentation documents with different purposes and structures, avoiding the problems of difficult retrieval and chaotic access caused by mixed storage of various documents, and improving the standardization and orderliness of document storage. Simultaneously, it can be specifically adapted to the subsequent viewing, reuse, and updating needs of different documents, reducing subsequent operation and maintenance costs and improving the overall management efficiency and ease of use of project documents.

[0109] Optionally, in some embodiments, the generation time of the project documentation can be saved.

[0110] Optionally, in some embodiments, in response to the time interval between the current time and the generation time of the project specification document being greater than a preset duration (such as 10 days, 1 month, etc.), a document update reminder is sent to the user terminal to prompt the user to update the project specification document.

[0111] Optionally, in some embodiments, after generating the project documentation for the target software project, the project documentation can be saved to the local project directory and committed to a local repository using Git tools, thus hosting the project documentation through the local repository. After the target software project completes a new version upgrade, a Git commit is executed and a commit record is generated, thereby managing the version of the documentation. In other words, by relying on the local repository to store and manage the project documentation long-term, whenever the target software project releases a new version, the project documentation is updated, committed, and an operation log is generated simultaneously. Git's version control capabilities record the changes to the project documentation, achieving multi-version archiving, traceability, and management.

[0112] The project documentation generation method of this disclosure involves obtaining the original project file used to generate the project description document for the target software project, and obtaining the document type of the project description document; analyzing the original project file to obtain initial project information; performing enhanced analysis on the initial project information based on the document type of the project description document to obtain target project information; and using a large model to generate the project description document for the software project based on the target project information. This automatically extracts key initial project information from the original project file of the target software project, reducing the tedious manual sorting, writing, and proofreading of documents, and improving the efficiency and quality of project description document generation. Then, relying on the extracted initial project information and the document type of the project description document to be generated, the characteristics of the target software project, i.e., the target project information, are accurately mined, improving the accuracy of information mining and contributing to the accuracy and reliability of the subsequently generated project description document. Finally, leveraging the powerful understanding, analysis, and generation capabilities of the large model, a direct conversion from the original project file to the project description document is achieved. This simplifies the process of collecting, organizing, and writing software project information, improves the relevance and practicality of the generated project description document, and achieves efficient and automated generation of the project description document.

[0113] To clearly illustrate the project documentation generation method disclosed in this publication, a detailed explanation is provided below with examples.

[0114] As an example, the project documentation generation method disclosed herein is applied to an automatic project documentation generation system. Figure 4 The system architecture diagram of the system is automatically generated for project documentation, such as Figure 4 As shown, the project document automatic generation system can include a user interface layer, a core analysis engine, and a data storage layer. The core analysis engine can include a code parsing module, an AI (Artificial Intelligence) enhanced analysis module, a result integration module, and an intelligent document generation module. It should be noted that the layers can communicate with each other through standardized interfaces to ensure the system's scalability and maintainability.

[0115] in: 1. User Interface Layer The system's user interface layer uses the IDE plugin as the interaction entry point, through which users can complete all core operations. For example, a user can issue a command in the IDE plugin to generate project documentation; furthermore, the IDE plugin can send a generation request to the code parsing module; wherein the generation request may carry the project directory of the software project (denoted as the directory path in this disclosure); 2. Core Analysis Engine 2.1 Code parsing module The code parsing module can respond to the generation request by scanning the project directory and obtaining source code files, Java files, and code project configuration files. In this disclosure, both Java files and code project configuration files are referred to as the original project files. The module then parses the Java files and code project configuration files to extract basic structural information (referred to as the initial project information in this disclosure).

[0116] Optionally, when parsing a Java file, the JavaParser can be used to parse the file content of the Java file to construct an abstract syntax tree (referred to as the target syntax tree in this disclosure). Then, the abstract syntax tree can be traversed to extract basic information such as packages, classes, methods, fields, parameters, and interfaces as basic structural information.

[0117] 2.2 AI Enhanced Analysis Module The AI-enhanced analysis module can utilize artificial intelligence technology to perform in-depth analysis based on basic structural information to identify relevant information to be extracted from the project specification document to be generated.

[0118] It should be noted that this AI-enhanced analysis module can integrate large models and achieve various analysis tasks through carefully designed AI target prompt word engineering. Therefore, for example, target prompt words can be determined based on basic structural information and information to be extracted, and these target prompt words can be input into a large model. In response to the output of the large model, relevant information about the information to be extracted can be obtained.

[0119] 2.3 Intelligent Document Generation Module The intelligent document generation module can combine relevant information from the identified information to be extracted to generate project description documents.

[0120] For example, a large model is used. Based on the relevant information of the identified information to be extracted, and in conjunction with a template document example, a first prompt word is determined. This first prompt word is then input into the large model, and in response to the output of the large model, a project description document is obtained. Optionally, the project description document can be a Markdown format document.

[0121] Optionally, the document type, content, and corresponding audience of the project description document are shown in Table 1:

[0122] The first prompt for the project overview document is as follows:

[0123] The first prompt word corresponding to the API interface documentation is as follows:

[0124] 3. Data storage layer The data storage layer is used to store the generated project specification documents.

[0125] For example, a Markdown-formatted project description document can be stored in the default root directory of a Java project, and the project description document can be written layer by layer according to a predefined standard hierarchy.

[0126] This publicly available project documentation auto-generation system integrates large-scale model technology, enabling it to automatically and intelligently generate various types of documents, including project overview documents, API interface documents, and technology stack description documents. By employing an AI large-scale model code deep analysis process, combined with static code analysis and AI semantic understanding technologies, and leveraging the abstract syntax tree constructed by the JavaParser, it achieves in-depth business-level analysis of Java project source code. By analyzing code features such as package structure and class relationships, it can automatically identify various architectural patterns such as MVC, layered architecture, and microservices. It can also extract API interface information such as @RequestMapping from annotations like @Controller and @RestController, generating standardized REST API documentation.

[0127] In summary, using AI technology to automate document content analysis can replace manual word-by-word reading, improving the efficiency and accuracy of document analysis. By employing an intuitive visualization format for document results, it can effectively help developers quickly grasp the overall project architecture and key details, enhancing their understanding of the project content and reducing learning costs and time investment. Furthermore, automatically generating standardized interface documents, architecture documents, and other project documents using AI technology not only improves the quality and consistency of document generation but also effectively reduces the later maintenance costs of project documentation. Moreover, the generation process can be repeated as needed, ensuring the timeliness and accuracy of the documents.

[0128] To implement the above-described project document generation method, this disclosure also provides a project document generation apparatus.

[0129] Figure 5 This is a schematic diagram of the structure of a project document generation device provided in an embodiment of the present disclosure.

[0130] like Figure 5 As shown, the project document generation device 500 includes: an acquisition module 510, a first analysis module 520, a second analysis module 530, and a generation module 530.

[0131] The acquisition module 510 is used to acquire the original project file used to generate the project specification document for the target software project, and to acquire the document type of the project specification document.

[0132] The first analysis module 520 is used to analyze the original project files to obtain initial project information.

[0133] The second analysis module 530 is used to perform enhanced analysis on the initial project information based on the document type of the project description document in order to obtain the target project information.

[0134] Module 530 is used to generate project specification documents for the software project based on the initial project information and a large model.

[0135] In one possible implementation of this disclosure, the first analysis module 520 is configured to: determine the file type of the original project file based on at least one of the file name suffix of the original project file, the storage path corresponding to the original project file, and the file content of the original project file; determine an information extraction strategy corresponding to the file type based on the file type; and extract information from the original project file according to the information extraction strategy corresponding to the file type to obtain initial project information.

[0136] In one possible implementation of this disclosure, the file type includes source code files; the first analysis module 520 is used to: perform syntax analysis on the original project file belonging to the source code file to construct a target syntax tree; wherein the target syntax tree includes nodes at multiple levels, and any node is used to indicate the corresponding code structure information; traverse the target syntax tree to extract the code structure information indicated by each node; and determine the initial project information based on the code structure information indicated by each node and the level to which each node belongs.

[0137] In one possible implementation of this disclosure, the file type includes configuration files; the first analysis module 520 is configured to: determine the text format of the original project file based on the file name suffix of the original project file belonging to the configuration file; determine the text parsing rule corresponding to the original project file based on the text format of the original project file; parse the original project file belonging to the configuration file using the text parsing rule to obtain project configuration file information; and determine the initial project information based on the project configuration file information.

[0138] In one possible implementation of this disclosure, the second analysis module 530 is configured to: determine the instruction information corresponding to the project description document based on the document type to which the project description document belongs; wherein the instruction information is used to indicate the information to be extracted; construct a knowledge graph based on the relationship between the information in the initial project information; parse the instruction information to obtain the target intent and information output format; and use a large model based on the knowledge graph to obtain target project information that matches both the target intent and the information output format.

[0139] In one possible implementation of this disclosure, in response to the project description document belonging to a document type including a project overview document, the information to be extracted includes at least one of the following: basic information of the target software project, the technology stack adopted, and a description of the software architecture; in response to the project description document belonging to a document type including a software architecture design document, the information to be extracted includes at least one of the following: detailed software architecture design information of the target software project, the division of software modules, and the interaction relationships between software modules; in response to the project description document belonging to a document type including an interface document, the information to be extracted includes at least one of the following: interface definition information and interface parameter information of the interfaces adopted by the target software project. Sample code; In response to the document type of the project documentation, which includes a technology stack documentation, the information to be extracted includes at least one of the following: information about the technical framework, database, and development tools used in the target software project, as well as the version information corresponding to the target software project; In response to the document type of the project documentation, which includes a project development documentation, the information to be extracted includes at least one of the following: the steps for setting up the development environment, code writing standards, and code development process; In response to the document type of the project documentation, which includes a project deployment guide, the information to be extracted includes at least one of the following: the deployment operation steps of the target software project, configuration instructions during the deployment process, and key points of operation and maintenance management.

[0140] In one possible implementation of this disclosure, the generation module 540 is configured to: query target mapping rules based on the document type to which the project description document belongs, to determine the document content generation rules corresponding to the project description document; wherein, the target mapping rules are used to record the correspondence between the document type to which the project description document belongs and the document content generation rules; fill the target project information and the document content generation rules into the corresponding positions of the prompt word template to obtain the target prompt word; input the target prompt word into the large model, and in response to the output of the large model, obtain the project description document.

[0141] In one possible implementation of this disclosure, the project document generation apparatus 500 may further include: The determination module is used to determine the storage rules for the project specification document based on the document type to which the project specification document belongs.

[0142] The storage module is used to store project documentation according to storage rules.

[0143] In one possible implementation of this disclosure, the storage module is configured to: determine the storage path corresponding to the project description document based on the document type to which the project description document belongs; and write the project description document into the storage space corresponding to the storage path.

[0144] In one possible implementation of this disclosure, the update module is configured to: in response to the time interval between the current time and the generation time of the project specification document being greater than a preset duration, send a document update reminder to the user terminal to prompt the user to update the project specification document.

[0145] It should be noted that the project document generation apparatus provided in this embodiment is capable of achieving the above-mentioned... Figures 1 to 3 All method steps implemented in the method embodiment can achieve the same technical effect. Therefore, the parts that are the same as those in the method embodiment and their beneficial effects will not be described in detail here.

[0146] To implement the above embodiments, this disclosure also proposes an electronic device, wherein the electronic device can be any device with computing capabilities, the electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the project document generation method as proposed in the first aspect of the present disclosure.

[0147] As an example, Figure 6 This is a schematic diagram of the structure of an electronic device 600 as shown in an exemplary embodiment of this disclosure, as follows: Figure 6 As shown, the aforementioned electronic device 600 may further include: The memory 610 and processor 620 are connected by a bus 630, which connects different components (including the memory 610 and the processor 620). The memory 610 stores a computer program, which, when executed by the processor 620, implements the project document generation method described in this embodiment.

[0148] Bus 630 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0149] Electronic device 600 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by electronic device 600, including volatile and non-volatile media, removable and non-removable media.

[0150] Memory 610 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 640 and / or cache memory 650. Server 600 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 660 may be used to read and write non-removable, non-volatile magnetic media (… Figure 6 Not shown; usually referred to as a "hard drive"). Although Figure 6 As not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 630 via one or more data media interfaces. Memory 610 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this disclosure.

[0151] A program / utility 680 having a set (at least one) of program modules 670 may be stored in, for example, memory 610. Such program modules 670 include—but are not limited to—an 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. Program modules 670 typically perform the functions and / or methods described in the embodiments of this disclosure.

[0152] Electronic device 600 can also communicate with one or more external devices 690 (e.g., keyboard, pointing device, display 691, 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., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 692. 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 693. As shown, network adapter 693 communicates 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 systems.

[0153] The processor 620 executes various functional applications and data processing by running programs stored in the memory 610.

[0154] It should be noted that the implementation process and technical principles of the electronic device in this embodiment are explained in the foregoing description of the project document generation method of this disclosure embodiment, and will not be repeated here.

[0155] To implement the above embodiments, this disclosure also proposes a non-transitory computer-readable storage medium storing a computer program that, when executed by a processor, implements the project document generation method as proposed in any of the foregoing embodiments of this disclosure.

[0156] To implement the above embodiments, this disclosure also proposes a computer program product that, when the instructions in the computer program product are executed by a processor, performs a project document generation method as proposed in any of the foregoing embodiments of this disclosure.

[0157] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described 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 the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0158] 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 indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0159] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of this disclosure includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of this disclosure pertain.

[0160] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0161] It should be understood that various parts of this disclosure can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0162] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0163] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0164] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present disclosure.

Claims

1. A method for generating project documents, characterized in that, The method includes: Obtain the original project file used to generate the project specification document for the target software project, and obtain the document type of the project specification document; The original project files are analyzed to obtain initial project information; Based on the document type of the project description document, the initial project information is subjected to enhanced analysis to obtain the target project information; Using a large model, a project description document for the target software project is generated based on the target project information.

2. The method according to claim 1, characterized in that, The analysis of the original project file to obtain initial project information includes: The file type of the original project file is determined based on at least one of the following: the file name suffix of the original project file, the storage path corresponding to the original project file, and the file content of the original project file. Based on the file type, determine the information extraction strategy corresponding to the file type; Information is extracted from the original project file according to the information extraction strategy corresponding to the file type to obtain the initial project information.

3. The method according to claim 2, characterized in that, The file types include source code files; The information extraction strategies for the source code files include: Syntax analysis is performed on the original project files belonging to the source code class files to construct a target syntax tree; wherein the target syntax tree includes nodes at multiple levels, and any node is used to indicate the corresponding code structure information; The target syntax tree is traversed to extract the code structure information indicated by each node; The initial project information is determined based on the code structure information indicated by each node and the level to which each node belongs.

4. The method according to claim 2, characterized in that, The file types include configuration files; The information extraction strategies under the configuration class file include: The text format of the original project file is determined based on the file name suffix of the original project file belonging to the configuration class file. Based on the text format of the original project file, determine the text parsing rules that match the original project file; The original project files belonging to the configuration class files are parsed using the aforementioned text parsing rules to obtain project configuration file information; Based on the project configuration file information, the initial project information is determined.

5. The method according to claim 1, characterized in that, The enhancement analysis of the initial project information based on the document type of the project description document to obtain target project information includes: Based on the document type to which the project description document belongs, determine the corresponding instruction information for the project description document; wherein, the instruction information is used to indicate the information to be extracted; Based on the relationships between the information in the initial project information, a knowledge graph is constructed; The instruction information is parsed to obtain the target intent and information output format; Using a large model, based on the knowledge graph, target project information that matches both the target intent and the information output format is obtained.

6. The method according to claim 5, characterized in that, In response to the fact that the document type to which the project description document belongs includes a project overview document, the instruction information includes at least one of the following: basic information of the target software project, the technology stack adopted, and description information of the software architecture; In response to the fact that the document type to which the project description document belongs includes a software architecture design document, the instruction information includes at least one of the following: detailed software architecture design information of the target software project, the division of software modules, and the interaction relationships between software modules; In response to the fact that the document type to which the project description document belongs includes an interface document, the indication information includes at least one of the following: interface definition information, interface parameter information, and sample code of the interface used by the target software project; In response to the fact that the document type to which the project description document belongs includes a technology stack description document, the indication information includes at least one of the following: relevant information about the technical framework, database, and development tools adopted by the target software project, and version information corresponding to the target software project; In response to the fact that the document type to which the project description document belongs includes a project development description document, the instruction information includes at least one of the following: development environment setup steps, code writing standards, and code development process; In response to the fact that the document type to which the project description document belongs includes a project deployment guide, the instruction information includes at least one of the following: deployment operation steps of the target software project, configuration instructions during the deployment process, and key points of operation and maintenance management.

7. The method according to claim 1, characterized in that, The process employs a large model to generate a project description document for the target software project based on the target project information, including: Based on the document type to which the project description document belongs, a target mapping rule is queried to determine the document content generation rule corresponding to the project description document; wherein, the target mapping rule is used to record the correspondence between the document type to which the project description document belongs and the document content generation rule; The target project information and the document content generation rules are filled into the corresponding positions in the prompt word template to obtain the target prompt words; The target prompt is input into the large model, and the project description document is obtained in response to the output of the large model.

8. The method according to any one of claims 1-7, characterized in that, The method further includes: Based on the document type to which the project description document belongs, determine the storage rules for the project description document; The project description document is stored according to the storage rules.

9. The method according to claim 8, characterized in that, The storage rules include: Based on the document type to which the project description document belongs, determine the storage path corresponding to the project description document; Write the project description document into the storage space corresponding to the storage path.

10. The method according to any one of claims 1-7, characterized in that, The method further includes: If the time interval between the current time and the generation time of the project description document is greater than a preset duration, a document update reminder is sent to the user terminal to prompt the user to update the project description document.