Method and apparatus for automatically generating product documentation

CN122797584APending Publication Date: 2026-09-22HANGZHOU ROBAM APPLIANCES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611157691.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

[0003]虽然现有技术中存在一些说明书自动生成的方案,然而,现有的方案都需要人工参与,且内容维护性较差,导致产品说明书生成效率较低

Benefits of technology

本发明实施例提供的一种产品文档的自动生成方法及装置,能够读取目标产品的结构化源文件,根据预设的语法规则解析结构化源文件,得到结构化源文件中包含的内容单元和内容单元的上下文属性;调用预先训练好的大语言模型,通过大语言模型选取翻译策略;以及,基于上下文属性构造内容单元对应的提示词;将提示词输入至大语言模型,使大语言模型基于提示词并按照翻译策略翻译内容单元;响应内容单元翻译完成,基于翻译内容生成目标语言的结构化文件;将目标语言的结构化文件转换成目标产品的产品文档,整个过程通过读取结构化源文件即可实现自动化生成产品文档的过程,且结合了大语言模型的优势,能够大幅提高了多语言翻译的效率和准确性,也减少了人工干预,进而有助于提升工作效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122797584A_ABST
    Figure CN122797584A_ABST
Patent Text Reader

Abstract

The application provides a product document automatic generation method and device, and relates to the technical field of language processing, which comprises the following steps: reading a structured source file of a target product, analyzing the structured source file to obtain content units contained in the structured source file and context attributes of the content units; selecting a translation strategy through a large language model; constructing prompt words corresponding to the content units based on the context attributes; making the large language model translate the content units based on the prompt words and according to the translation strategy; generating a structured file in a target language based on the translated content; and converting the structured file in the target language into a product document of the target product. The product document automatic generation method and device provided by the application can realize the process of automatically generating a product document by reading a structured source file, and has the advantages of a large language model, which can greatly improve the efficiency and accuracy of multilingual translation, reduce manual intervention, and thus help improve work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of language processing technology, and in particular to a method and apparatus for automatically generating product documents. Background Technology

[0002] Currently, the compilation of product manuals for cooking equipment in the kitchen appliance industry, such as range hoods, gas stoves, and steam ovens, mainly relies on manual operation. The process typically includes: technicians writing an initial Chinese draft, which is then translated into multiple languages ​​by a translation company or in-house translators. Finally, the design department typeset the documents and generates PDF or other formats for printing or distribution.

[0003] Although there are some existing solutions for automatically generating instruction manuals, these solutions all require manual intervention and have poor content maintainability, resulting in low efficiency in generating product instruction manuals. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a method and apparatus for automatically generating product documents, so as to alleviate the above-mentioned technical problems and improve the generation efficiency of product manuals.

[0005] In a first aspect, embodiments of the present invention provide a method for automatically generating product documents. The method includes: reading a structured source file of a target product, wherein the structured source file is used to describe product information of the target product; parsing the structured source file according to preset grammar rules to obtain content units contained in the structured source file and context attributes of the content units; calling a pre-trained large language model and selecting a translation strategy through the large language model; constructing prompt words corresponding to the content units based on the context attributes; inputting the prompt words into the large language model, causing the large language model to translate the content units based on the prompt words and according to the translation strategy; responding to the completion of the translation of the content units, generating a structured file in the target language based on the translated content; and converting the structured file in the target language into a product document of the target product.

[0006] In conjunction with the first aspect, the present invention provides a first possible implementation of the first aspect, wherein the method further includes: obtaining a predefined structured document template; the structured document template is provided with a plurality of tags and input controls corresponding to the tags; in response to an input operation applied to the input controls, inputting product information of the target product; wherein the tags are used to indicate different types of information related to the product; and in response to the completion of the input operation, generating a structured source file containing the product information.

[0007] In conjunction with the first aspect, this embodiment of the invention provides a second possible implementation of the first aspect, wherein the method further includes: responding to an update operation applied to the structured source file, obtaining update information corresponding to the update operation; and updating the structured source file based on the update information.

[0008] In conjunction with the first possible implementation of the first aspect, this embodiment of the invention provides a third possible implementation of the first aspect, wherein the structured source file is a Markdown format file, and the tags include at least the following: a first tag for representing product model information; a second tag for representing technical parameters; a third tag for representing safety warning information; and a fourth tag for representing operation steps.

[0009] In conjunction with the third possible implementation of the first aspect, this embodiment of the invention provides a fourth possible implementation of the first aspect, wherein the step of parsing the structured source file according to preset syntax rules to obtain the content units contained in the structured source file and the context attributes of the content units includes: obtaining pre-configured syntax rules that match the Markdown format file, identifying the syntax structure in the structured source file through the syntax rules, extracting content units containing different content, and identifying the context attributes of the content units.

[0010] In conjunction with the first aspect, this embodiment of the invention provides a fifth possible implementation of the first aspect, wherein the above-mentioned translation strategy includes at least a technical parameter translation strategy, a warning translation strategy, and an operation step translation strategy; the step of enabling the large language model to translate the content unit based on the prompt word and according to the translation strategy includes: when the context attribute of the content unit is identified as a technical parameter, the technical parameter translation strategy is triggered; the technical parameter translation strategy is used to instruct the large language model to translate only the parameter name and retain the numerical unit; when the context attribute of the content unit is identified as a security warning message, the warning translation strategy is triggered, the warning translation strategy is used to instruct the large language model to translate the security warning message using the corresponding warning sentence structure in the target language; when the context attribute of the content unit is identified as an operation step, the operation step translation strategy is triggered, the operation step translation strategy is used to instruct the large language model to identify an ordered list and translate the ordered list into an instructional language.

[0011] In conjunction with the first aspect, this embodiment of the invention provides a sixth possible implementation of the first aspect, wherein the step of converting the structured file of the target language into the product document of the target product includes: calling a rendering engine, reading the structured file of the target language through the rendering engine, and converting the structured file of the target language into the product document according to a preset rendering template.

[0012] In conjunction with the first aspect, this embodiment of the invention provides a seventh possible implementation of the first aspect, wherein the above method further includes: performing a terminology consistency check on the structured source file before parsing the structured source file, so as to ensure that the terminology in the structured source file remains consistent.

[0013] Secondly, embodiments of the present invention also provide an automatic product document generation device, the device comprising: a reading module, configured to read a structured source file of a target product, wherein the structured source file describes product information of the target product; a parsing module, configured to parse the structured source file according to preset grammar rules to obtain content units contained in the structured source file and context attributes of the content units; a strategy module, configured to call a pre-trained large language model, select a translation strategy through the large language model; and construct prompt words corresponding to the content units based on the context attributes; a translation module, configured to input the prompt words into the large language model, so that the large language model translates the content units based on the prompt words and according to the translation strategy; a completion module, configured to generate a structured file in the target language based on the translated content in response to the completion of the translation of the content units; and a conversion module, configured to convert the structured file in the target language into a product document of the target product.

[0014] Thirdly, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to implement the steps of the method described in the first aspect.

[0015] The embodiments of the present invention bring the following beneficial effects: This invention provides a method and apparatus for automatically generating product documents. The method reads a structured source file of a target product, parses the source file according to preset grammar rules to obtain content units and their contextual attributes, calls a pre-trained large language model, selects a translation strategy using the large language model, constructs prompt words corresponding to the content units based on the contextual attributes, inputs the prompt words into the large language model, and translates the content units based on the prompt words and the translation strategy. Upon completion of the content unit translation, a structured file in the target language is generated based on the translated content. The structured file in the target language is then converted into a product document for the target product. This entire process, which automates the generation of product documents by reading the structured source file, leverages the advantages of a large language model, significantly improving the efficiency and accuracy of multilingual translation, reducing manual intervention, and ultimately enhancing work efficiency.

[0016] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0017] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 A flowchart illustrating an automatic product documentation generation method provided in an embodiment of the present invention; Figure 2 A flowchart illustrating another method for automatically generating product documentation provided in an embodiment of the present invention; Figure 3 A schematic diagram of the structure of an automatic product document generation device provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] Currently, the existing solutions for generating product manuals often have the following technical problems: (1) Difficulty in maintaining content: When product design changes or software functions are iterated, such as when a range hood adds new functions, it is necessary to modify the manuals in all languages ​​simultaneously. Manual searching and replacement is prone to errors, and version management is chaotic. (2) Poor synchronization of multi-language versions: Manual translation takes a long time, and the layout of different language versions is easily confused due to differences in word count, resulting in different release times for each language version, affecting the simultaneous launch of products in different regions. (3) Low efficiency of format conversion: The generation of product manuals from technical documents to the final format involves multiple format conversions and manual typesetting, which is cumbersome and inefficient. (4) Inconsistent information sources: Key information such as technical parameters and warnings are scattered in multiple documents, lacking a single source of fact, which can easily lead to discrepancies between the content of the manual and the actual product.

[0022] Based on this, the present invention provides a method and apparatus for automatically generating product documents, which can uniformly maintain product information and improve the efficiency and accuracy of document generation.

[0023] To facilitate understanding of this embodiment, a method for automatically generating product documentation disclosed in this embodiment of the invention will first be described in detail.

[0024] In one possible implementation, embodiments of the present invention provide a method for automatically generating product documentation, such as... Figure 1 The flowchart shown illustrates a method for automatically generating product documentation, which includes the following steps: Step S102: Read the structured source file of the target product; In this embodiment of the invention, the structured source file is used to describe product information of the target product; In specific implementation, the target product in this invention refers to smart device products, such as kitchen appliances, smart home products, etc. Taking kitchen appliances as an example, they can be range hoods, gas stoves, integrated stoves, dishwashers, steam ovens, etc. After the design of these products is completed, instruction manuals in multiple languages ​​are often required. In this invention, product documents of the target product can be generated based on structured source files. These product documents are used as instruction manuals for the target product for user use.

[0025] Step S104: Parse the structured source file according to the preset syntax rules to obtain the content units and context attributes of the content units contained in the structured source file. Step S106: Invoke the pre-trained large language model, select a translation strategy through the large language model; and construct prompt words corresponding to the content unit based on context attributes; Step S108: Input the prompt words into the large language model, so that the large language model translates the content units based on the prompt words and according to the translation strategy; Step S110: The translation of the response content unit is completed, and a structured file in the target language is generated based on the translated content; Step S112: Convert the structured file in the target language into the product document of the target product.

[0026] This invention provides an automatic product document generation method that can read the structured source file of the target product, parse the structured source file according to preset grammar rules to obtain the content units and context attributes contained in the structured source file; call a pre-trained large language model and select a translation strategy through the large language model; construct prompt words corresponding to the content units based on the context attributes; input the prompt words into the large language model, so that the large language model translates the content units based on the prompt words and according to the translation strategy; in response to the completion of the content unit translation, generate a structured file in the target language based on the translated content; and convert the structured file in the target language into the product document of the target product. The entire process can achieve automated product document generation by reading the structured source file, and combined with the advantages of the large language model, it can significantly improve the efficiency and accuracy of multilingual translation, reduce manual intervention, and thus help improve work efficiency.

[0027] In practical use, the structured source file read in step S102 above is usually generated based on the product specification sheet. Furthermore, in this embodiment of the invention, the structured source file is a single data source used in the automatic generation process of product documents. Specifically, a structured document template can be predefined, allowing technicians to input content into the template based on the product specification sheet, thereby generating the structured source file in this embodiment of the invention.

[0028] Specifically, the process of generating structured source files in this embodiment of the invention includes the following: (1) Obtain a predefined structured document template; the structured document template has multiple tags and corresponding input controls; (2) Respond to the input operation applied to the input control and input the product information of the target product; In this embodiment of the invention, the markings are used to indicate different types of information related to the product; (3) Upon completion of the response input operation, a structured source file containing product information is generated.

[0029] In specific implementation, the structured source file in this embodiment of the invention is a Markdown format file. Therefore, the structured document template used above is also a Markdown format document template. In this document template, different types of information are distinguished by specific tags. Specifically, the tags in this embodiment of the invention include at least the following: a first tag for representing product model information; a second tag for representing technical parameters; a third tag for representing safety warning information; and a fourth tag for representing operation steps.

[0030] For example, "#" represents the first marker for product model information; "##" represents the second marker for technical parameters, which are usually defined in tabular form with parameter names and values. ">**" represents the third marker for safety alarm information; "[]" represents the fourth marker for operation steps, which are used to describe the user interaction process.

[0031] Each of the above markers has a corresponding input control. Users can click the input control to input the corresponding product information, thereby generating a structured source file containing all product information, which is the structured source file in the embodiment of this invention.

[0032] Based on this structured source file, the structured source file can be directly read in step S102 above to execute the automatic generation method of product documents in this embodiment of the invention, which can automatically generate product documents for the target product, and these product documents can be used as the instruction manual for the target product.

[0033] Furthermore, when the target product is updated, or when product information changes, such as a change in the material of the oil filter in a range hood, only the corresponding description in the structured source file needs to be modified. The system can automatically respond to this update, that is, it responds to the update operation applied to the structured source file, obtains the update information corresponding to the update operation, updates the structured source file based on the update information, and then re-executes the automatic product document generation method of this embodiment. Specifically, step S102 reads the updated structured source file, and the above-mentioned process is re-triggered. Figure 1 The process involves each step to generate new product documentation, eliminating the need for manual modifications to different language versions and effectively improving the efficiency of product documentation production.

[0034] Furthermore, the parsing of the structured source file in step S104 above is based on the syntax rules corresponding to the format of the structured source file. For ease of understanding, the following example uses a Markdown format structured source file to further illustrate the parsing and translation process. Specifically, as follows... Figure 2 The flowchart shown represents another method for automatically generating product documentation, including the following steps: Step S202: Read the structured source file of the target product; In this embodiment of the invention, the structured source file is used to describe the product information of the target product; and in this embodiment of the invention, the structured source file is a Markdown format file.

[0035] Step S204: Obtain pre-configured syntax rules that match the Markdown format file, identify the syntax structure in the structured source file through the syntax rules, extract content units containing different content, and identify the context attributes of the content units. In practice, this step can parse the structured source file into an abstract syntax tree based on the syntax rules matched by the Markdown format file. This abstract syntax tree represents the syntactic structure of the structured source file. For example, it can extract different content units such as plain text paragraphs, table data, list data, and code data, and identify the contextual attributes of these content units, such as whether these content units belong to security warnings, performance parameters, or operation steps, etc.

[0036] Furthermore, in this embodiment of the invention, before parsing the structured source file, a terminology consistency check can be performed on the structured source file to ensure that the terminology in the structured source file remains consistent.

[0037] For example, terms in structured source files can be identified and replaced to ensure consistent terminology across different target products or different models of the same product. In practical use, the large language model can be fine-tuned. This involves combining large language model fine-tuning with a terminology database, fine-tuning the large language model and performing consistency checks on the terminology before translation. Specifically, bilingual instruction manuals for all historical products, such as Chinese-English or Chinese-Russian manuals, can be collected to fine-tune the basic large language model, making it more suitable for the language style of the kitchen appliance industry. Simultaneously, an independent terminology management database is established. Before translation, terminology in the structured source files is identified and replaced (e.g., "airflow" is uniformly replaced with "air volume"), and then the processed structured source files are fed into the fine-tuned large language model for translation. While this approach requires a larger initial investment, such as data preparation and model training, it offers higher accuracy in translating specialized terminology and better preserves the unique product language style, reducing the likelihood of non-standard terminology issues such as "oil range hood" being mistranslated as "extracting oil range hood."

[0038] Step S206: Invoke the pre-trained large language model, select a translation strategy through the large language model; and construct prompt words corresponding to the content unit based on context attributes; Step S208: Input the prompt words into the large language model, so that the large language model translates the content units based on the prompt words and according to the translation strategy; Specifically, for the content units extracted in the above steps, corresponding prompt words can be constructed by combining their context attributes, and the API of the large language model can be called for translation.

[0039] Furthermore, the translation strategy in this embodiment of the invention includes at least a technical parameter translation strategy, a warning translation strategy, and an operation step translation strategy. When the large language model translates content units based on prompt words and according to the translation strategy, when the context attribute of the content unit is identified as a technical parameter, the technical parameter translation strategy is triggered. The technical parameter translation strategy is used to instruct the large language model to translate only the parameter name and retain the numerical unit. When the context attribute of the content unit is identified as a safety warning message, the warning translation strategy is triggered. The warning translation strategy is used to instruct the large language model to translate the safety warning message using the corresponding warning sentence structure in the target language. When the context attribute of the content unit is identified as an operation step, the operation step translation strategy is triggered. This operation step translation strategy is used to instruct the large language model to identify an ordered list and translate the ordered list into an instructional language.

[0040] In practical use, the target language can be embedded in the prompts, informing the large language model of the specific target language for this translation task. The large language model can then determine the corresponding translation strategy, such as specific translation grammar tailored to the characteristics of the target language, as well as the aforementioned strategies for translating technical parameters, warning statements, and operational steps. This enables the large language model to achieve accurate translation. For example, based on the technical parameter translation strategy, for technical parameters in a table, the large language model can translate only the name, such as maximum airflow, while retaining the specific numerical value and unit, such as 22 m³ / min. During the translation process, for third markers indicating safety warnings, the model can also translate them using the corresponding formal and serious warning phrases in the target language, while retaining the formatting marks. When an ordered list of instructions for operational steps is identified, the large language model can translate it into concise, verb-object structured command language.

[0041] Step S210: The translation of the response content unit is completed, and a structured file in the target language is generated based on the translated content; Once all content units have been translated, a structured file in the target language can be generated based on the original structure. For example, in this embodiment of the invention, a Markdown file in the target language can be generated.

[0042] Step S212: After the response content unit translation is completed, the rendering engine is invoked. The rendering engine reads the structured file of the target language and converts the structured file of the target language into a product document according to the preset rendering template.

[0043] In practice, rendering can be performed according to the required format. For example, when a PDF (Portable Document Format) file needs to be generated, the rendering engine can be called to read the structured file of the target language, convert it into an HTML (HyperText Markup Language) file, and apply the corresponding style template. Finally, the formatted HTML file can be converted into a high-precision PDF instruction manual through the browser's printing function or a dedicated PDF library for printing or online publication.

[0044] Furthermore, the structured files in the target language generated in step S212 can be converted into a standard structured file, such as an XML (eXtensible Markup Language) file. Then, by writing different XSL-FO templates, these XML files can be directly converted into PDFs that can be used directly for printing or HTMLs that can be used for web browsing. The rendering engine can be an open-source tool for the conversion, which is more suitable for large enterprises to establish long-term, standardized technical data management systems. Moreover, XSL-FO has stronger control over page layout (such as pagination, headers and footers, and cross-page tables), resulting in higher-quality print-grade PDFs, especially suitable for complex manuals such as those for steam ovens that require a large amount of mixed text and graphics. Specific settings can be configured based on actual usage, and this embodiment of the invention does not impose any limitations on this.

[0045] In summary, the automatic product documentation generation method provided by the embodiments of the present invention has the following beneficial effects: (1) By adopting a structured source file to achieve a single data source management mechanism, all product information (parameters, functions, warnings, etc.) can be written into the structured source file in a predefined format as the sole source of facts. This method achieves unified maintenance of content. Any modification only requires changing one source file to update all outputs synchronously, effectively alleviating the problem of version inconsistency.

[0046] (2) Combining the functions of the large language model, it can realize the automatic generation process of multilingual product documents, that is, automatically parse the structured content of the structured source file, and call the large language model to perform accurate and context-aware translation to generate the structured file of the target language, which greatly improves the efficiency and accuracy of multilingual translation, ensures the consistency of professional terms in different language versions, and reduces manual intervention.

[0047] (3) It can realize a two-stage automatic rendering and publishing process for structured files. That is, firstly, the structured source file is rendered to generate HTML / PDF for localization, and at the same time, the structured files in the target language are batch converted into the final multilingual product documents through a unified style template. It realizes "one-click" automatic generation from source files to multilingual product documents, which greatly shortens the production cycle and ensures the consistency of the layout style of different language versions.

[0048] (4) Define structured documents for the characteristics of kitchen appliances. That is, the structured documents define specific tags and blocks to distinguish product information of different types of kitchen appliances, such as technical parameter tables, safety warnings, and operating procedures. This enables the large language model to accurately identify the type of content unit and adopt different translation and typesetting strategies (such as keeping parameter tables aligned, bolding warnings, etc.) to improve the professionalism and accuracy of the output.

[0049] Furthermore, based on the above embodiments, this invention also provides an automatic product document generation device, such as... Figure 3 The diagram shows a structural schematic of an automatic product documentation generation device, which includes: The reading module 30 is used to read the structured source file of the target product, wherein the structured source file is used to describe the product information of the target product; Parsing module 31 is used to parse the structured source file according to preset syntax rules to obtain the content units contained in the structured source file and the context attributes of the content units; Strategy module 32 is used to call a pre-trained large language model, select a translation strategy through the large language model, and construct prompt words corresponding to the content unit based on the context attributes. Translation module 33 is used to input the prompt words into the large language model, so that the large language model translates the content unit based on the prompt words and according to the translation strategy; Module 34 is used to generate a structured file in the target language based on the translated content in response to the completion of the translation of the content unit. The conversion module 35 is used to convert the structured file of the target language into the product document of the target product.

[0050] The automatic product document generation device provided in this embodiment of the invention has the same technical features as the automatic product document generation method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.

[0051] Furthermore, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above method.

[0052] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the above-described method.

[0053] Furthermore, embodiments of the present invention also provide a schematic diagram of the structure of an electronic device, such as... Figure 4 The diagram shows the structure of the electronic device, which includes a processor 41 and a memory 40. The memory 40 stores computer-executable instructions that can be executed by the processor 41, and the processor 41 executes the computer-executable instructions to implement the above-described method.

[0054] exist Figure 4 In the illustrated embodiment, the electronic device further includes a bus 42 and a communication interface 43, wherein the processor 41, the communication interface 43, and the memory 40 are connected via the bus 42.

[0055] The memory 40 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 43 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The bus 42 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 42 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0056] Processor 41 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 41 or by software instructions. Processor 41 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory, and the processor 41 reads the information in the memory and uses its hardware to complete the aforementioned method.

[0057] The computer program product of the automatic generation method and apparatus for product documentation provided in this embodiment of the invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.

[0058] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0059] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

[0060] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0061] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0062] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for automatically generating product documentation, characterized in that, The method includes: Read the structured source file of the target product, wherein the structured source file is used to describe the product information of the target product; The structured source file is parsed according to preset syntax rules to obtain the content units contained in the structured source file and the context attributes of the content units; The system invokes a pre-trained large language model to select a translation strategy; and constructs prompt words corresponding to the content unit based on the context attributes. The prompt words are input into the large language model, which then translates the content unit based on the prompt words and according to the translation strategy. Upon completion of the translation of the content unit, a structured file in the target language is generated based on the translated content; The structured file in the target language is converted into a product document for the target product.

2. The method according to claim 1, characterized in that, The method further includes: Obtain a predefined structured document template; the structured document template is configured with multiple tags and input controls corresponding to the tags; In response to an input operation applied to the input control, product information of the target product is input; wherein, the marker is used to indicate different types of information related to the product; Upon completion of the input operation, a structured source file containing the product information is generated.

3. The method according to claim 1, characterized in that, The method further includes: In response to an update operation applied to the structured source file, obtain the update information corresponding to the update operation; The structured source file is updated based on the updated information.

4. The method according to claim 2, characterized in that, The structured source file is a Markdown format file, and the tags include at least the following: A first mark is used to indicate product model information; a second mark is used to indicate technical parameters; a third mark is used to indicate safety warning information; and a fourth mark is used to indicate operating procedures.

5. The method according to claim 4, characterized in that, The step of parsing the structured source file according to preset syntax rules to obtain the content units contained in the structured source file and the context attributes of the content units includes: Obtain pre-configured syntax rules that match the Markdown format file, identify the syntax structure in the structured source file through the syntax rules, extract content units containing different content, and identify the context attributes of the content units.

6. The method according to claim 1, characterized in that, The translation strategy includes at least a technical parameter translation strategy, a warning translation strategy, and an operational procedure translation strategy; The step of translating the content unit based on the prompt word and according to the translation strategy using the large language model includes: When the context attribute of the content unit is identified as a technical parameter, the technical parameter translation strategy is triggered; the technical parameter translation strategy is used to instruct the large language model to translate only the parameter name and retain the numerical unit. When the context attribute of the content unit is identified as a security warning message, the warning translation strategy is triggered. The warning translation strategy is used to instruct the large language model to translate the security warning message using the corresponding warning sentence in the target language. When the context attribute of the content unit is identified as an operation step, the operation step translation strategy is triggered. The operation step translation strategy is used to instruct the large language model to recognize the ordered list and translate the ordered list into an imperative language.

7. The method according to claim 1, characterized in that, The steps of converting the structured file of the target language into the product document of the target product include: The rendering engine is invoked, and the structured file of the target language is read through the rendering engine and converted into the product document according to the preset rendering template.

8. The method according to claim 1, characterized in that, The method further includes: Before parsing the structured source file, a terminology consistency check is performed on the structured source file to ensure that the terminology in the structured source file remains consistent.

9. An automatic product document generation device, characterized in that, The device includes: A reading module is used to read a structured source file of the target product, wherein the structured source file is used to describe the product information of the target product; The parsing module is used to parse the structured source file according to preset syntax rules to obtain the content units contained in the structured source file and the context attributes of the content units; The strategy module is used to invoke a pre-trained large language model, select a translation strategy through the large language model, and construct prompt words corresponding to the content unit based on the context attributes. The translation module is used to input the prompt words into the large language model, so that the large language model translates the content unit based on the prompt words and according to the translation strategy; The completion module is used to respond to the completion of the translation of the content unit and generate a structured file in the target language based on the translated content; The conversion module is used to convert the structured file of the target language into the product document of the target product.

10. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 8.