Technical document generation method, platform, equipment, medium and product

Through the combination of file filtering tools and generation models, automatically filtering and generating application technical documents is solved, which solves the problem that developers spend a lot of time in writing technical documents, improves the efficiency of technical documents generation and reduces labor costs.

CN119443057APending Publication Date: 2025-02-1458 CHANG LIFE (BEIJING) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411463829.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

During application development, due to the large number of development codes and frequent updates, technical documents are generated inefficiently and consume a lot of time and energy.

Method used

The file filtering tool obtains the original code file collection of the application, filters out the target code file according to the filtering conditions in the configuration file, and calls the generation model to generate technical documents, and automatically writes it to the specified path.

Benefits of technology

Reduces filtering time for original code file collections, improves the efficiency of technical documents generation, and reduces labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119443057A_ABST
    Figure CN119443057A_ABST
Patent Text Reader

Abstract

Embodiments of the invention provide a technical document generation method, platform, device, medium and product, the method comprising: in response to execution of a document generation command by a file screening tool, screening an original code file set of an application according to a configuration file contained in the file screening tool to obtain a first target code file; and then, according to a preset model calling parameter in the configuration file, calling the generation model to input the first target code file into the generation model, and outputting a technical document describing the first target code file by the generation model. And finally, writing the technical document according to a first target path preset in the configuration file. Visibly, through the configuration file, the original code file set can be quickly screened to obtain the first target code file which needs to generate the technical document. Therefore, the time for screening the original code file set can be shortened, and the generation efficiency of the technical document can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a technical document generation method, platform, device, medium and product. Background Art

[0002] During the application development process, developers usually write technical documents corresponding to the development code while writing the development code. The technical documents may include at least one of the development background, descriptions related to the development functions, and interface definitions, which can help other developers quickly understand and use the development code to improve the efficiency of application development.

[0003] However, in practice, due to the large amount of development codes and the frequent updates of development codes with the rapid iteration of application versions, developers need to spend a lot of time and energy in writing technical documents describing the development codes, thereby reducing the efficiency of technical document generation.

[0004] Therefore, how to improve the efficiency of generating technical documents becomes a technical problem that needs to be solved urgently. Summary of the invention

[0005] In view of this, embodiments of the present invention provide a technical document generation method, platform, device, medium and product to improve the generation efficiency of technical documents.

[0006] In a first aspect, an embodiment of the present invention provides a method for generating a technical document, comprising:

[0007] Get the original code file collection of the application;

[0008] In response to the execution of the document generation command by the file screening tool, the original code file set is screened according to a configuration file included in the file screening tool to obtain a first target code file, wherein the configuration file includes a preset screening condition;

[0009] According to the model calling parameters preset in the configuration file, calling the generation model corresponding to the model calling parameters, so as to input the first target code file into the generation model, so that the generation model outputs a technical document describing the first target code file;

[0010] The technical document is written according to the first target path preset in the configuration file.

[0011] In a second aspect, an embodiment of the present invention provides a technical document generation platform, the platform comprising a program development system and a generation model, wherein a file screening tool is installed in the program development system;

[0012] The program development system is used to develop an application program to obtain a set of original code files of the application program;

[0013] The file screening tool is used to obtain the original code file set; in response to the execution of the document generation command by the file screening tool, the original code file set is screened according to a configuration file included in the file screening tool to obtain a first target code file, wherein the configuration file includes a preset screening condition; according to the model calling parameter preset in the configuration file, the generation model corresponding to the model calling parameter is called; according to the first target path preset in the configuration file, a technical document describing the first target code file is written;

[0014] The generation model is used to generate the technical document according to the first target code file.

[0015] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the technical document generation method in the first aspect. The electronic device may also include a communication interface for communicating with other devices or communication systems.

[0016] In a fourth aspect, an embodiment of the present invention provides a non-temporary machine-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor can at least implement the technical document generation method as described in the first aspect above.

[0017] In a fifth aspect, an embodiment of the present invention provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the processor can implement the technical document generation method as described in the first aspect above.

[0018] In the technical document generation method provided by the embodiment of the present invention, the original code file set of the application is obtained. Then, in response to the execution of the document generation command by the file screening tool, the original code file set is screened according to the configuration file contained in the file screening tool to obtain the first target code file. Among them, the configuration file contains preset screening conditions. Afterwards, according to the model call parameters preset in the configuration file, the generation model corresponding to the model call parameters is called to input the first target code file into the generation model, so that the generation model outputs the technical document describing the first target code file. Finally, the technical document is written according to the first target path preset in the configuration file.

[0019] It can be seen that in the above scheme, the original code file set of the application can be quickly screened through the configuration file in the file screening tool to obtain the first target code file required to generate the technical document. There is no need to manually select it, so the time for screening the original code file set can be reduced and the efficiency of generating the technical document can be improved. Furthermore, with the help of the file screening tool, the generation model can be called and the first target code file obtained by screening can be automatically input into the generation model without manual input, so the labor cost can also be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 A flowchart of a method for generating a technical document provided by an embodiment of the present invention;

[0022] Figure 2 A flowchart of another method for generating technical documents provided by an embodiment of the present invention;

[0023] Figure 3 A flowchart of a technical document updating method provided by an embodiment of the present invention;

[0024] Figure 4 A flowchart of another method for generating a technical document provided by an embodiment of the present invention;

[0025] Figure 5 A schematic diagram of the working process of a technical document generation method provided by an embodiment of the present invention;

[0026] Figure 6 A schematic diagram of the structure of a technical document generation platform provided by an embodiment of the present invention;

[0027] Figure 7 A schematic diagram of the structure of a technical document generating device provided by an embodiment of the present invention;

[0028] Figure 8 For Figure 7 A schematic structural diagram of an electronic device corresponding to the technical document generating device provided in the illustrated embodiment. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0030] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two, but does not exclude the inclusion of at least one.

[0031] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0032] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to identifying", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is identified" may be interpreted as "when determining" or "in response to determining" or "when identifying (stated condition or event)" or "in response to identifying (stated condition or event)", depending on the context.

[0033] It should be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such product or system. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the product or system including the elements.

[0034] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0035] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and the features in the embodiments can be combined with each other. In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.

[0036] Figure 1 The flowchart of a method for generating a technical document provided by an embodiment of the present invention is shown in FIG. The method for generating a technical document provided by an embodiment of the present invention can be executed by a file screening tool in a program development system. Figure 1 As shown, the method comprises the following steps:

[0037] S101, obtaining a set of original code files of an application.

[0038] S102, in response to the execution of the document generation command by the file screening tool, the original code file set is screened according to a configuration file included in the file screening tool to obtain a first target code file, wherein the configuration file includes a preset screening condition.

[0039] During the development of an application, a developer can use a program development system to write the development code of the application according to the functional requirements of the development, so as to obtain a set of original code files of the application. The set of original code files may specifically include multiple code files. Optionally, different code files in the set of original code files may be used to implement different functions of the application, or may be used to implement the same function of the application.

[0040] Considering that the original code file set contains a large amount of code, which is likely to affect the efficiency of generating subsequent technical documents, the original code file set can be screened by a file screening tool in the program development system. Optionally, the file screening tool can include a node package manager (Node Package Manager, referred to as NPM).

[0041] Specifically, the file screening tool may first obtain the original code file set of the application program, and then, in response to the file screening tool executing the document generation command, the file screening tool may screen the original code file set according to the configuration file contained in the file screening tool to obtain the first target code file.

[0042] The configuration file includes preset screening conditions. That is, the file screening tool can screen the original code file set according to the screening conditions preset by the developer. The specific screening process can be referred to the description in the following embodiment.

[0043] Optionally, the file screening tool may be pre-installed in the program development system. Specifically, when the program development system is in a state where the command line interface is open, in response to the installation operation of the developer, the file screening tool may be installed in the program development system.

[0044] S103, according to the model calling parameters preset in the configuration file, calling the generation model corresponding to the model calling parameters, so as to input the first target code file into the generation model, so that the generation model outputs a technical document describing the first target code file.

[0045] Next, the file screening tool may call the generation model corresponding to the model calling parameters according to the model calling parameters preset in the configuration file. Afterwards, the file screening tool may input the first target code file into the generation model so that the generation model outputs a technical document describing the first target code file.

[0046] The model call parameters may be preset by the developer, and may specifically include at least one of the model address, the model name, and the model interface information. The model interface information may specifically include the model input format and the model output format.

[0047] Optionally, the generative model may specifically include any one of the generative models such as a generative pre-trained transformer (GPT) model, a natural language processing (NLP) model, and a bidirectional encoder representation from transformer (Bert) model.

[0048] For example, assuming that the model calling parameters pre-set by the developer include the GPT model and the server address where the GPT model is located, then at this time, the file screening tool can find the GPT model from the server corresponding to the server address and call this GPT model according to the server address where the GPT model is located and the name of the GPT model. It can be understood that the GPT model is the generation model mentioned above.

[0049] S104: writing the technical document according to the first target path preset in the configuration file.

[0050] After obtaining the technical document output by the generated model, the file screening tool can write the technical document according to the first target path preset in the configuration file. The preset first target path can be understood as the storage location of the technical document preset by the developer. Then the above-mentioned technical document writing process can also be understood as: after obtaining the technical document output by the generated model, the file screening tool can save the technical document to the first target path.

[0051] In practice, the technical documents output by the generation model are usually natural language text. After the file screening tool saves the technical documents to the first target path, the developer can directly view the technical documents from the first target path to achieve rapid understanding and use of the original code file collection.

[0052] In this embodiment, the file screening tool can obtain the original code file set of the application. Then, in response to the execution of the document generation command by the file screening tool, the file screening tool can screen the original code file set according to the configuration file contained in itself to obtain the first target code file. Among them, the configuration file contains preset screening conditions. Afterwards, the file screening tool can call the generation model corresponding to the model call parameters according to the model call parameters preset in the configuration file, so as to input the first target code file into the generation model, so that the generation model outputs the technical document describing the first target code file. Finally, the file screening tool can write the technical document according to the first target path preset in the configuration file.

[0053] It can be seen that in the above scheme, the original code file set of the application can be quickly screened through the configuration file in the file screening tool to obtain the first target code file required to generate the technical document. There is no need to manually select it, so the time for screening the original code file set can be reduced and the efficiency of generating the technical document can be improved. Furthermore, with the help of the file screening tool, the generation model can be called and the first target code file obtained by screening can be automatically input into the generation model without manual input, so the labor cost can also be reduced.

[0054] In order to improve the accuracy of technical document generation, optionally, the file screening tool can also obtain the prompt information preset in the configuration file, and input the prompt information and the first target code file into the generation model, so that the generation model outputs the technical document describing the first target code file. Optionally, the prompt information can include the type of technical document to be generated and / or background text related to the first target code file.

[0055] For example, assuming that the type of technical document to be generated is a user manual, and the first target code file is used to implement the user login function and the information search function, the prompt message may be: "Please generate a user manual for the application based on the first target code file set used to implement the user login function and the information search function."

[0056] In this embodiment, since the prompt information includes clear guidance information about the functions that can be implemented by the first target code file and / or the type of technical documents, the prompt information can be used to enable the generation model to output technical documents more accurately, which means that the accuracy of technical document generation can be improved.

[0057] Figure 1 The illustrated embodiment has mentioned that the original code file set can be screened according to the configuration file included in the file screening tool to obtain the first target code file. The original code file set includes multiple code files, and different code files can correspond to different file types.

[0058] Optionally, the configuration file may include a preset file type identifier. For the screening of the original code file set, in an optional manner, the file screening tool may screen the original code file set according to the file type identifier in response to the execution of the document generation command by the file screening tool to obtain the first target code file.

[0059] The file type identifier can be represented by a file suffix. For example, .js represents a JavaScript file used for web page development, .html represents a Hypertext Markup Language file used for web page design, and .css represents a Cascading Style Sheet file used to set the web page style. In this case, the first target code file is the code file corresponding to the preset file suffix in the original code file set.

[0060] Alternatively, in response to the file screening tool executing the document generation command, the file screening tool may screen the original code file set according to the file path preset in the configuration file to obtain the first target code file.

[0061] The file path includes the storage locations of different code files in the original code file set. In this case, the first target code file is the code file found from the storage location of the code file for generating technical documents according to the need in the original code file set.

[0062] In another optional manner, the file screening tool may, in response to the execution of the document generation command by the file screening tool, screen the original code file set according to the file type identifier and the file path preset in the configuration file to obtain the first target code file. In this case, the first target code file is derived from the storage location of the code file for which the technical document needs to be generated, and corresponds to the preset file suffix.

[0063] In this embodiment, the file screening tool can accurately screen out the first target code file that meets the developer's requirements according to the file type identifier and / or the file path preset in the configuration file, thereby ensuring the accuracy of subsequent technical document generation.

[0064] In practice, since the writing of technical documents may be affected by network fluctuations, there may be a problem of failure in writing technical documents. Based on this, the following Figure 2 The method provided in the illustrated embodiment regenerates the technical document. Figure 2 Another method for generating technical documents provided by an embodiment of the present invention. Figure 2 As shown, the method may include the following steps:

[0065] S201: If it is determined that the writing of the technical document fails, an error log and a document regeneration command are generated.

[0066] S202: Write an error log according to the second target path preset in the configuration file.

[0067] S203 , in response to the file screening tool executing the document regeneration command, re-inputting the first target code file into the generation model.

[0068] After the file screening tool writes the technical document according to the first target path, if the file screening tool determines that the technical document does not exist in the first target path, it indicates that the writing of the technical document fails, and the file screening tool can generate an error log and a document regeneration command.

[0069] Then, the file screening tool can write the error log according to the second target path preset in the configuration file. The preset second target path can be understood as the storage location of the error log preset by the developer.

[0070] Afterwards, in response to the execution of the document regeneration command by the file screening tool, optionally, the file screening tool can determine the code file that needs to regenerate the technical document, namely the first target code file, based on the information recorded in the error log, and re-input the first target code file into the generation model so that the generation model can re-output the technical document describing the first target code file.

[0071] Optionally, in order to improve the accuracy of technical document generation, the file screening tool can also input the prompt information and the first target code file into the generation model, so that the generation model can re-output the technical document describing the first target code file. The content of the prompt information can be found in the description of the above embodiment, which will not be repeated here.

[0072] Finally, the file screening tool may rewrite the technical document describing the first target code file according to the first target path preset in the configuration file.

[0073] In this embodiment, with the help of the file screening tool, an error log and a document regeneration command are generated for the technical document that failed to be written. Furthermore, by executing the document regeneration command, the generation model can re-output the technical document. It can be seen that for the technical document that failed to be written, the use of the regeneration method can ensure the integrity of the technical document writing, that is, it can ensure the integrity of the technical document storage, so that subsequent developers can view and use it.

[0074] In practice, after the file screening tool successfully writes the technical documentation, developers often need to update the code files and technical documentation according to actual development needs. Figure 3 The method provided in the illustrated embodiment updates the technical documentation. Figure 3 A method for updating a technical document is provided in an embodiment of the present invention. Figure 3 As shown, the method may include the following steps:

[0075] S301, calling a callback function to determine whether a first target code file is updated.

[0076] S302, obtaining a second target code file generated after updating the first target code file.

[0077] S303, inputting the second target code file into the generation model so that the generation model outputs an updated technical document describing the second target code file.

[0078] After the file screening tool successfully writes the technical document, if the developer has a need to update the code file and the technical document, the file screening tool can call the callback function in response to the code file submission operation triggered by the developer in the program development system to determine whether the first target code file is updated. The callback function can specifically include a hook function for detecting whether the code file is updated, such as a pre-commit hook function.

[0079] If it is determined that the first target code file is updated, the file screening tool can obtain a second target code file generated after the first target code file is updated. Afterwards, the file screening tool can input the second target code file into the generation model so that the generation model outputs an updated technical document describing the second target code file.

[0080] In this embodiment, by calling the callback function, it is possible to automatically determine whether the first target code file is updated. Furthermore, with the help of the file screening tool, the generation model can be called and the second target code file generated after the update can be automatically input into the generation model without manual input, thereby reducing labor costs.

[0081] In addition, in practice, applications provide many functions and the development process is relatively complex, so multiple developers usually collaborate to develop applications to improve the development efficiency of applications. However, after the first developer updates the first target code file, it is easy for him to have no time to update the technical documents or forget to update the technical documents, which will cause the second developer to obtain the technical documents written by the first developer before the update. The technical documents before the update obviously do not match the second target code file obtained after the update, which will cause the second developer to have misunderstandings and reduce the development efficiency of subsequent applications.

[0082] And use Figure 3 The method of the embodiment shown can solve the above problems. Specifically, with the help of file screening tools and generation models, it is possible to automatically detect whether the developer has updated the code file, and automatically generate updated technical documents describing the updated code file, so that the synchronization of the code file and the technical documents can be better ensured, which is convenient for the developer to obtain the accuracy of the technical documents and improve the development efficiency of the application program.

[0083] Figure 1 In the illustrated embodiment, it has been mentioned that the first target code file can be input into the generation model, so that the generation model can output a technical document describing the first target code file. In practice, the first target code file usually includes multiple code files. At this time, the generation process of the technical document can refer to the following Figure 4 The description in the illustrated embodiment. Figure 4 Another method for generating technical documents is provided in an embodiment of the present invention. Figure 4 As shown, the method may include the following steps:

[0084] S401, obtaining a set of original code files of an application.

[0085] S402, in response to the execution of the document generation command by the file screening tool, the original code file set is screened according to a configuration file included in the file screening tool to obtain a first target code file, wherein the configuration file includes a preset screening condition.

[0086] The specific implementation process of the above steps S401 to S402 can be found in Figure 1 The detailed description of the relevant steps in the illustrated embodiment will not be repeated here.

[0087] S403: According to the model calling parameters preset in the configuration file, calling the generation model corresponding to the model calling parameters.

[0088] S404, for any code file among the multiple code files, input any code file into a generation model, so that the generation model outputs a technical document describing any code file.

[0089] S405: Write a technical document describing any code file according to the first target path preset in the configuration file.

[0090] After the first target code file is obtained through screening, the file screening tool can call the generation model corresponding to the model calling parameters according to the model calling parameters preset in the configuration file. Figure 1 The description in the illustrated embodiment will not be repeated here.

[0091] Afterwards, for any code file among the multiple code files, the file screening tool can input any code file into the generation model so that the generation model can output a technical document describing any code file. Then, for the multiple code files, multiple technical documents output by the generation model that respectively describe the multiple code files can be obtained.

[0092] Optionally, different code files in the first target code file can be used to implement different types of components, and correspondingly, the technical documents corresponding to the different code files can be used to describe the functions and / or implementation methods of the different types of components.

[0093] Finally, the file screening tool can write the technical documents describing any code file in sequence according to the first target path preset in the configuration file, that is, store the technical documents corresponding to the multiple code files in sequence in the first target path.

[0094] In this embodiment, when the first target code file includes multiple code files, the solution is to input any code file of the multiple code files into the generation model to obtain a technical document describing any code file. It can be seen that in this solution, the granularity of the code file input by the generation model is finer, and further, the content of the obtained technical document is also more detailed and more targeted, that is, the readability of the technical document can be improved.

[0095] For ease of understanding, the following Figure 5 The original code file set for life service applications shown in the figure generates a specific application scenario of technical documents, and exemplifies the working process of the technical document generation method provided in the above embodiments.

[0096] The original code file collection of the life service application may include JavaScript files for life service page development, cascading style sheet files for setting life service page styles, and hypertext markup language files for presenting life service page content.

[0097] The file screening tool can obtain the above-mentioned original code file set. Then, in response to the execution of the document generation command by the file screening tool, the file screening tool can screen the original code file set according to the file type identifier preset in the configuration file, such as the .js file suffix and the .html file suffix, to obtain the code files that need to generate technical documents, that is, to obtain JavaScript files and hypertext markup language files.

[0098] Next, the file screening tool can call the NLP model from the server where the model address is located according to the model address and model name preset in the configuration file, and input the JavaScript file into the NLP model, so that the NLP model outputs a first technical document describing the JavaScript file. After the first technical document is generated, the file screening tool can write the first technical document according to the first target path preset in the configuration file.

[0099] Afterwards, the file screening tool may input the hypertext markup language file into the NLP model so that the NLP model outputs a second technical document describing the hypertext markup language file. After generating the second technical document, the file screening tool may write the second technical document according to the first target path preset in the configuration file.

[0100] Furthermore, if it is determined that the writing of the second technical document fails, the file screening tool may also generate an error log and a document regeneration command, and write the error log according to the second target path preset in the configuration file. Afterwards, in response to the execution of the document regeneration command by the file screening tool, the hypertext markup language file is re-input into the NLP model, so that the NLP model re-outputs the second technical document.

[0101] After the file screening tool successfully writes the first technical document and the second technical document, if the developer has a need to update the first technical document, the file screening tool may call a callback function to determine whether the JavaScript file is updated. If it is determined that the JavaScript file is updated, the file screening tool may obtain an updated JavaScript file generated after the JavaScript file is updated, and input the updated JavaScript file into the NLP model, so that the NLP model outputs an updated technical document describing the updated JavaScript file.

[0102] The above embodiments have described the process of generating technical documents from the perspective of process. On this basis, the technical document generation can also be provided to developers as a service. This service can be provided by the technical document generation platform. Figure 6 A schematic diagram of the structure of a technical document generation platform provided by an embodiment of the present invention. Figure 6 As shown, the technical document generation platform includes a program development system and a generation model. Among them, a file screening tool is installed in the program development system.

[0103] The program development system can be used to develop an application program to obtain a set of original code files of the application program.

[0104] The file screening tool may first obtain the original code file set. Then, in response to the execution of the document generation command by the file screening tool, the original code file set is screened according to the configuration file included in the file screening tool to obtain the first target code file. The configuration file includes preset screening conditions. Then, the file screening tool may call the generation model corresponding to the model calling parameters preset in the configuration file.

[0105] When the generation model is called by the file screening tool, the generation model can generate a technical document describing the first target code file according to the first target code file screened out by the file screening tool.

[0106] Afterwards, the file screening tool may write the technical document according to the first target path preset in the configuration file, that is, save the technical document to the first target path.

[0107] In this embodiment, the technical document generation platform includes a program development system and a generation model. Among them, a file screening tool is installed in the program development system. Through the configuration file in the file screening tool, the original code file set of the application can be quickly screened to obtain the first target code file required to generate the technical document. There is no need to select manually, so the time for screening the original code file set can be reduced and the efficiency of generating technical documents can be improved. Furthermore, with the help of this file screening tool, the generation model can be called and the first target code file obtained by screening can be automatically input into the generation model without manual input, so the labor cost can also be reduced.

[0108] In addition, the contents not described in detail in this embodiment and the technical effects that can be achieved can all be found in the relevant descriptions in the above embodiments, and will not be repeated here.

[0109] Figure 6 The embodiment shown has disclosed that a file screening tool is installed in the program development system. For the installation of the file screening tool, specifically, the program development system can first open a command line interface. Then, in response to the installation operation of the developer, the file screening tool is installed in the program development system, that is, the installation of the file screening tool is realized, so that the file screening tool can subsequently screen the original code file set.

[0110] Figure 6 In the illustrated embodiment, it has been mentioned that the configuration file includes preset filtering conditions. It is understandable that the filtering conditions are preset by the developer. Then, for the generation of the configuration file, specifically, the program development system can generate the configuration file in the file filtering tool in response to the developer's setting operation of the filtering conditions. Optionally, the filtering conditions may include a file type identifier and / or a file path. The specific screening process can be referred to the description in the above embodiments, which will not be repeated here.

[0111] In this embodiment, according to the screening conditions pre-set by the developer, a configuration file that meets the developer's requirements can be accurately generated. Further, according to this accurate configuration file, the accuracy of code file screening can also be guaranteed.

[0112] The following will describe in detail the technical document generation device of one or more embodiments of the present invention. Those skilled in the art will appreciate that these technical document generation devices can be configured using commercially available hardware components through the steps taught in this solution.

[0113] Figure 7 A schematic diagram of a technical document generation device provided by an embodiment of the present invention is shown in FIG. Figure 7 As shown, the device comprises:

[0114] The acquisition module 11 is used to acquire a set of original code files of the application program.

[0115] The screening module 12 is used for screening the original code file set to obtain a first target code file in response to the execution of the document generation command by the file screening tool according to a configuration file included in the file screening tool, wherein the configuration file includes preset screening conditions.

[0116] The calling module 13 is used to call the generation model corresponding to the model calling parameters preset in the configuration file, so as to input the first target code file into the generation model, so that the generation model outputs a technical document describing the first target code file.

[0117] The writing module 14 writes the technical document according to the first target path preset in the configuration file.

[0118] Wherein, when the program development system is in a state where the command line interface is open, the file screening tool is installed into the program development system in response to an installation operation.

[0119] Optionally, the configuration file includes a file type identifier, based on which the screening module 12 is used to respond to the execution of the document generation command by the file screening tool, and screen the original code file set according to the file type identifier and / or the file path preset in the configuration file to obtain a first target code file, wherein the file path includes the respective storage locations of different code files in the original code file set.

[0120] Optionally, the first target code file includes multiple code files. Based on this, the calling module 13 is used to call the generation model corresponding to the model calling parameters according to the model calling parameters preset in the configuration file; for any code file among the multiple code files, the any code file is input into the generation model, so that the generation model outputs a technical document describing the any code file.

[0121] Optionally, the device also includes a regeneration module 15, which is used to generate an error log and a document regeneration command if it is determined that the writing of the technical document has failed; write the error log according to the second target path preset in the configuration file; and re-input the first target code file into the generation model in response to the execution of the document regeneration command by the file screening tool.

[0122] Optionally, the device also includes an update module 16, which is used to call a callback function to determine that the first target code file is updated; obtain a second target code file generated after the first target code file is updated; and input the second target code file into the generation model so that the generation model outputs an updated technical document describing the second target code file.

[0123] Figure 7 The device shown can perform Figures 1 to 5 For the method of the embodiment shown in the figure, the part not described in detail in this embodiment can be referred to Figures 1 to 5 The implementation process and technical effects of this technical solution refer to Figures 1 to 5 The description in the illustrated embodiment will not be repeated here.

[0124] In a possible design, the structure of the technical document generating device can be implemented as an electronic device, such as Figure 8 As shown, the electronic device may include: a processor 21 and a memory 22. The memory 22 is used to store the electronic device to perform the above Figures 1 to 5 The program of the technical document generating method provided in the illustrated embodiment, the processor 21 is configured to execute the program stored in the memory 22 .

[0125] The program includes one or more computer instructions, wherein the one or more computer instructions can implement the following steps when executed by the processor 21:

[0126] Get the original code file collection of the application;

[0127] In response to the execution of the document generation command by the file screening tool, the original code file set is screened according to a configuration file included in the file screening tool to obtain a first target code file, wherein the configuration file includes a preset screening condition;

[0128] According to the model calling parameters preset in the configuration file, calling the generation model corresponding to the model calling parameters, so as to input the first target code file into the generation model, so that the generation model outputs a technical document describing the first target code file;

[0129] The technical document is written according to the first target path preset in the configuration file.

[0130] Optionally, the processor 21 is further configured to execute the aforementioned Figures 1 to 5 All or part of the steps in the illustrated embodiments.

[0131] The structure of the electronic device may further include a communication interface 23 for the electronic device to communicate with other devices or a communication network.

[0132] In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by the above electronic device, which includes instructions for executing the above Figures 1 to 5 The procedures involved in the technical document generation method in the method embodiment shown.

[0133] The embodiment of the present invention further provides a computer program product, which includes computer program instructions. When the computer program instructions are read and executed by a processor, the above-mentioned Figures 1 to 5 The technical document generating method in the method embodiment is shown.

[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for generating a technical document, characterized in that: File screening tools used in program development systems include: Get the original code file collection of the application; In response to the execution of the document generation command by the file screening tool, the original code file set is screened according to a configuration file included in the file screening tool to obtain a first target code file, wherein the configuration file includes a preset screening condition; According to the model calling parameters preset in the configuration file, calling the generation model corresponding to the model calling parameters, so as to input the first target code file into the generation model, so that the generation model outputs a technical document describing the first target code file; The technical document is written according to the first target path preset in the configuration file.

2. The method according to claim 1, characterized in that When the program development system is in a state where a command line interface is opened, the file screening tool is installed in the program development system in response to an installation operation.

3. The method according to claim 1, characterized in that The configuration file includes a file type identifier; in response to the file screening tool executing the document generation command, the original code file set is screened according to the configuration file included in the file screening tool to obtain a first target code file, including: In response to the execution of the document generation command by the file screening tool, the original code file set is screened according to the file type identifier and / or the file path preset in the configuration file to obtain a first target code file, and the file path includes the respective storage locations of different code files in the original code file set.

4. The method according to claim 1, characterized in that: The first target code file includes a plurality of code files; The step of calling a generation model corresponding to the model calling parameters preset in the configuration file, inputting the first target code file into the generation model, and outputting a technical document describing the first target code file by the generation model includes: According to the model calling parameters preset in the configuration file, calling the generation model corresponding to the model calling parameters; For any code file among the multiple code files, the any code file is input into the generation model, so that the generation model outputs a technical document describing the any code file.

5. The method according to claim 1, characterized in that The method further comprises: If it is determined that the writing of the technical document fails, an error log and a document regeneration command are generated; Writing the error log according to the second target path preset in the configuration file; In response to the file screening tool executing the document regeneration command, the first object code file is re-input into the generation model.

6. The method according to claim 1, characterized in that After writing the technical document according to the first target path preset in the configuration file, the method further includes: Calling a callback function to determine whether the first target code file is updated; Acquire a second target code file generated after updating the first target code file; The second object code file is input into the generation model so that the generation model outputs an updated technical document describing the second object code file.

7. A technical document generation platform, characterized in that: The platform includes a program development system and a generation model, wherein a file screening tool is installed in the program development system; The program development system is used to develop an application program to obtain a set of original code files of the application program; The file screening tool is used to obtain the original code file set; In response to the execution of the document generation command by the file screening tool, the original code file set is screened according to a configuration file included in the file screening tool to obtain a first target code file, wherein the configuration file includes a preset screening condition; According to the model calling parameters preset in the configuration file, calling the generation model corresponding to the model calling parameters; according to the first target path preset in the configuration file, writing the technical document describing the first target code file; The generation model is used to generate the technical document according to the first target code file.

8. The platform according to claim 7, characterized in that The program development system is used to open a command line interface, and in response to an installation operation, the file screening tool is installed into the program development system.

9. The platform according to claim 7, characterized in that: The program development system is used to generate the configuration file in the file screening tool in response to a setting operation of the screening condition.

10. An electronic device, characterized in that: include: A memory and a processor; wherein the memory stores executable codes, and when the executable codes are executed by the processor, the processor executes the technical document generation method according to any one of claims 1 to 6.

11. A non-transitory machine-readable storage medium, characterized in that: The non-transitory machine-readable storage medium stores executable codes, and when the executable codes are executed by a processor of an electronic device, the processor is caused to execute the technical document generation method according to any one of claims 1 to 6.

12. A computer program product, characterized in that The computer program product includes a computer program or instructions, so that the computer program or instructions can implement the technical document generation method according to any one of claims 1 to 6.