Document generation method, electronic equipment, storage medium and program product
By obtaining model update information and automatically updating documents based on the difference information, dynamic generation and linkage display of equipment technical data documents are realized, and the problem of being unable to generate documents dynamically in the existing technology is solved, and the update efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202510529952.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-05-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The fact that the documents of equipment technical data cannot be generated dynamically in the prior art, resulting in cumbersome update and maintenance processes and the inability to reflect the changes in the model in real time.
By obtaining model update information, dynamically update the model displayed on the target interface, and automatically update relevant documents based on the difference information between the model and the original model to achieve the coordinated display of the model and the document.
The dynamic update of the model is immediately reflected to the document, improving the efficiency and accuracy of document updates, and solving the problem of cumbersome traditional document update process.
Smart Images

Figure CN120046579A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a method for generating a document, an electronic device, a storage medium, and a program product. Background Art
[0002] The production and update of equipment technical materials generally rely on traditional document forms such as Word and PDF. These materials have obvious limitations in content presentation and information transmission. First, traditional equipment technical materials often use single text and static pictures as the main content elements, which makes it difficult to intuitively and vividly describe the assembly, operation process, and dynamic change process of complex equipment. Project designers face high difficulties in understanding and learning, and the memory efficiency is also affected. Second, whether it is traditional equipment technical materials, whether it is paper materials or electronic materials, the update and maintenance require manual modification, version control and other processes. The update process is cumbersome, and there is a technical problem that documents cannot be dynamically generated. Summary of the Invention
[0003] This application provides a method for generating a document, an electronic device, a storage medium, and a program product to at least solve the technical problem in the related art that documents cannot be dynamically generated.
[0004] This application provides a method for generating a document, including: obtaining update information for updating a first model; based on the update information, updating the first model displayed on a target interface to obtain a target model, and displaying the target model on the target interface; based on the difference information between the target model and the first model, updating a first document displayed on the target interface to obtain a target document, and displaying the target document on the target interface, where the first document includes a technical document of the first model, and the target interface is used for linked display of the model and the document.
[0005] This application also provides a device for generating a document, including: a first obtaining module, configured to obtain update information for updating a first model; a first updating module, configured to update the first model displayed on a target interface based on the update information to obtain a target model, and display the target model on the target interface; a second updating module, configured to update a first document displayed on the target interface based on the difference information between the target model and the first model to obtain a target document, and display the target document on the target interface, where the first document includes a technical document of the first model, and the target interface is used for linked display of the model and the document.
[0006] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned document generation methods when executing the computer program.
[0007] The present application also provides a computer-readable storage medium, in which a computer program is stored, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned document generation methods are implemented.
[0008] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned document generation methods when executed by a processor.
[0009] Through this application, since a link is established between the model and the document, the update of the model is immediately reflected in the document. When the first model is updated, the update information can be immediately detected. Based on the update information of the first model, the first model displayed on the target interface is updated to obtain the target model. And based on the difference information between the target model and the first model, the relevant parts involved in the first document are automatically modified, the technical document of the first model displayed on the target interface is updated to obtain the target document, and the target model and the target document are linked and displayed on the target interface, thereby solving the technical problem of the inability to dynamically generate documents in the related technology and achieving the technical effect of dynamically generating documents. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0011] Figure 1 A hardware structure block diagram of a mobile terminal for a document generation method provided in an embodiment of the present application;
[0012] Figure 2 A flowchart of a method for generating a document according to an embodiment of the present application;
[0013] Figure 3 A schematic diagram of a document of a specific embodiment of the present application;
[0014] Figure 4 A schematic diagram of a target interface of a specific embodiment of the present application;
[0015] Figure 5 A schematic diagram of the principle of a method for generating a document according to a specific embodiment of the present application;
[0016] Figure 6 The flowchart of a binding operation in a specific embodiment of the present application;
[0017] Figure 7 The schematic diagram of a method for generating a document in a specific embodiment of the present application Figure 1 ;
[0018] Figure 8 The structural schematic diagram of a method for generating a document provided by an embodiment of the present application Figure 2 ;
[0019] Figure 9 The structural schematic diagram of a device for a method for generating a document provided by an embodiment of the present application. Specific implementation manners
[0020] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0021] It should be noted that in the description of the present application, the terms "including", "comprising" or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0022] In order to enable those skilled in the art of the present technology to better understand the solution of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.
[0023] Combined with a specific application environment architecture or a specific hardware architecture on which the execution of a method for generating a document depends, the specific application environment architecture or the specific hardware architecture will be described herein.
[0024] The method embodiments provided in the embodiments of the present application can be executed on a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 The hardware structure block diagram of a mobile terminal for a method for generating a document provided by an embodiment of the present application. As Figure 1 shown, the mobile terminal may include one or more ( Figure 1Only one processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a field programmable gate array FPGA) and a memory 104 for storing data are shown. Among them, the above mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 The structure shown is only illustrative and does not limit the structure of the above mobile terminal. For example, the mobile terminal may further include more or fewer components than Figure 1 shown therein, or have a different configuration from Figure 1 shown.
[0025] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to a method for generating a document in an embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories may be connected to the mobile terminal through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0026] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one instance, the transmission device 106 includes a network interface controller (NIC for short), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (RF for short) module, which is used to communicate with the Internet wirelessly.
[0027] An embodiment of the present application provides a method for generating a document. Figure 2 It is a flowchart of an execution method of a test case for an embodiment of the present application. As Figure 2 shown, the process includes the following steps:
[0028] Step S202, obtain update information for updating the first model.
[0029] Optionally, before obtaining the update for updating the first model, a binding operation is performed on the first model and the first document to display the first document and the first model in linkage on the target interface.
[0030] Optionally, the first model is used to indicate the digital form of a product, mechanical component, building structure or other complex physical product, including but not limited to a three-dimensional model, a two-dimensional model, a physical model. For example, in computer design, the first model can be a highly detailed three-dimensional model that accurately reflects the internal structure of the computer and the connection of components.
[0031] Optionally, the update information is data or instructions for modifying or improving the first model, including but not limited to design change information, material replacement information, and size modification information. The update information may come from a variety of sources, such as design changes, manufacturing feedback, feedback from project designers, and new technology applications. For example, in server design, the update information may include new component addition information, component layout adjustment information, performance parameter updates, and the like.
[0032] Step S204: based on the update information, update the first model displayed on the target interface to obtain the target model, and display the target model on the target interface.
[0033] Step S206, based on the difference information between the target model and the first model, the first document displayed on the target interface is updated to obtain the target document, and the target document is displayed on the target interface, wherein the first document includes the technical document of the first model, and the target interface is used to display the model and the document in linkage.
[0034] Optionally, the difference information is used to indicate the difference between the target model and the first model, and the difference information includes but is not limited to changes in geometric structure, updates in materials and textures, adjustments in assembly relationships, and changes in properties. For example, the shape, size, or position of a component in the model changes, the appearance or surface properties of a component changes, the connection method or order between components changes, and the technical parameters of a component (such as size, weight, material properties, etc.) change.
[0035] Optionally, the difference information includes update information and other update information, wherein the other update information is information obtained after the first model is actually updated.
[0036] Optionally, the first document and the target document are technical documents associated with the first model. The first document and the target document include content such as operation guides, technical parameters, assembly instructions, maintenance manuals, etc. The formats of the first document and the target document include, but are not limited to, HTML and PDF. The content of the document is closely related to the structure and attributes of the model. For example, text descriptions: operation steps of the model, function descriptions, etc., pictures and charts: showing the structure of the model, component positions, etc., video animations: demonstrating the dynamic operation or assembly process of the model, technical parameter tables: listing attributes such as the size, weight, and material of the model. As Figure 3 shown Figure 3 is a schematic diagram of a document in a specific embodiment of the present application, specifically a server structured technical document, including content such as server security instructions, product overview, quick start guide, installation of server core components, appendix, etc. There is a binding relationship between the technical document and the 3D model of the server: by clicking on the text in the technical document or the meaningful annotations in the pictures, the 3D model of the server is driven to perform dynamic linkage. At the same time, the 3D model of the server serves as the content carrier of the technical document, replacing traditional 2D drawings or pure text descriptions. The content of the technical document such as technical parameters and operation steps is embedded in the model components, and the structural details are shown through interactive actions such as rotation, scaling, and disassembly. Clicking on a specific component will pop up the associated text, pictures, or video explanations in the technical document, realizing seamless switching and mutual jumping between the document and the model.
[0037] Optionally, the target interface is the front-end interface for interaction between project designers and the document generation system, used to display the model and related documents. The target interface supports the linked display of the model and the document. Project designers can view or update related documents by operating the model. As Figure 4 shown Figure 4 is a schematic diagram of a target interface in a specific embodiment of the present application, specifically an interface for linked display of server structured technical documents and the server 3D model. The target interface includes five parts: The first part: The left area is the technical document display area, and the specific content is as Figure 3As shown, this part is the technical document interaction panel, which realizes the window folding / unfolding function through the triangle symbol control and supports the presentation of multiple formats such as HTML / PDF documents. The second part: The middle area integrates a parametric 3D model display engine, which can perform operations such as point selection, dragging, and rotation on the 3D model. This part has a vertex-level selection detection algorithm, a rotation matrix operation based on quaternions, and real-time rendering capabilities accelerated by the Graphics Processing Unit (GPU). The third part: The right area deploys a Bill of Materials (BOM) management module. This BOM management module visualizes the component hierarchy using a tree-like topology and realizes the display / hiding operation of the 3D model by controlling the visibility of components through Boolean operations. The fourth part: The upper area is the menu area, including multiple buttons that can perform operations such as displaying configuration information, returning to the default, dragging components, exploding components, automatic sightseeing, full-screen display, and scene replacement. The fifth part: The upper right area includes a cross-modal retrieval system. This part constructs a heterogeneous data association model between the technical document content and the 3D model based on the inverted index joint query mechanism to achieve joint query. The sixth part: The upper right area includes Chinese / English language switching buttons. This part uses a unified code bidirectional encoding architecture and a resource package dynamic loading mechanism through the language switching component to realize real-time switching between Chinese and English interfaces. The seventh part: The bottom area is the video interaction area, which deploys an event-driven media trigger mechanism. When a project designer selects a certain component in the 3D model, it will search for the matching video content in the cloud video library according to the component identifier of the component. After finding the matching video, it will call the decoder to decode and play the video. This target interface significantly improves the cognitive consistency between technical documents and complex physical products, breaks the limitations of traditional data forms, and improves the presentation form, information retrieval, update and maintenance, and the experience and work efficiency of project designers.
[0038] Optionally, as Figure 5 shown, Figure 5 is a schematic diagram of the principle of a document generation method according to a specific embodiment of the present application, which is divided into four levels: an interaction layer, a core logic layer, a data layer, and a support system.
[0039] The interaction layer includes two parts: a multi-modal interface component and a control module. Among them, the multi-modal interface component is divided into three core modules: a visualization interface, a document interaction panel, and a BOM management panel. Visualization interface: Based on the rendering engine, it realizes operations such as model point selection, dragging, and rotation. Document interaction panel: Adopts Markdown semantic parsing and the PDF.js library to support two-way indexing between document paragraphs and model components. BOM management panel: Visualizes the tree-like topology and realizes node visibility and isolated display through Web Components (i.e., web components).
[0040] The core logic layer includes two parts: data synchronization engine and intelligent processing module. The data synchronization engine includes state management machine and event-driven bus, and the intelligent processing module includes heterogeneous data retrieval and intelligent language switching. State management machine: adopts Redux architecture to maintain the global state of the system, including model posture, document positioning anchor point, and BOM node expansion state. Event-driven bus: realize cross-module communication through Pub-Sub (publish and subscribe mode), for example, model selection events trigger document positioning, video loading and BOM highlighting. Heterogeneous data retrieval: build an inverted index to combine model metadata and document keywords, support fuzzy query and fault tolerance. Intelligent language switching: the process of automatically and accurately identifying and converting document or interface languages based on multiple factors such as user preferences, usage scenarios, and device language settings.
[0041] The data layer includes two parts: structured data storage and dynamic data flow. The structured data storage includes the model library and document library, and the dynamic data flow includes operation logs and real-time communication.
[0042] The support system includes two parts: rendering acceleration system and localization engine. The rendering acceleration system includes GPU parallel computing and progressive loading, and the localization engine includes unit conversion and time format adaptation, module decoupling, fault tolerance mechanism and scalability design. GPU parallel computing: accelerates large-scale model rendering (frame rate per second ≥ 60 FPS). Progressive loading: optimizes resource usage based on frustum culling and occlusion query. Unit conversion: automatic switching between metric and imperial units is achieved through regular expression matching. Extensibility design: supports plug-in function expansion (such as adding a sensor data visualization module).
[0043] In this embodiment, the execution subject of the above steps may be a terminal, a server, a specific processor provided in the terminal or server, or a processor or processing device provided relatively independently from the terminal or server, but is not limited thereto.
[0044] Through the embodiment of the present application, since a link is established between the model and the document, the update of the model is immediately reflected in the document. When the first model is updated, the update information can be immediately detected. Based on the update information of the first model, the first model displayed on the target interface is updated to obtain the target model. And based on the difference information between the target model and the first model, the relevant parts involved in the first document are automatically modified, the technical document of the first model displayed on the target interface is updated to obtain the target document, and the target model and the target document are linked and displayed on the target interface, thereby solving the technical problem of the inability to dynamically generate documents in the related technology and achieving the technical effect of dynamically generating documents.
[0045] In an exemplary embodiment, before obtaining update information for updating the first model, the method also includes: obtaining a second model and a second document, wherein the second document includes technical documentation of the second model, the first model is a model obtained after updating the second model N times, and the first document is a document obtained after updating the second document N times, where N is an integer greater than 1; extracting a target sub-document included in the second document, wherein the target sub-document is the technical documentation of a target component included in the second model; and performing a binding operation on the target sub-document and the target component to display the target sub-document and the target component in linkage on the target interface.
[0046] Optionally, the second model is an initially designed model, including initial design information of the corresponding physical product. The first model is a model currently displayed on the target interface.
[0047] Optionally, the second document is a technical document associated with the second model, including technical parameters, operation guides, maintenance instructions, etc. of the second model. The target sub-document is a partial document in the second document associated with a specific component (target component) of the second model, including detailed technical information of the component, such as operation steps, maintenance guides, technical parameters, etc.
[0048] Optionally, the binding operation refers to the process of associating the target sub-document with the target component. Through this association, dynamic interaction and synchronous update between the target sub-document and the target component can be achieved. For example, when the project designer operates the target component on the target interface (such as selecting, rotating, viewing, etc.), the target sub-document related to the component will be automatically displayed. Specifically, Figure 5 As shown, Figure 5 This is a schematic diagram of the principle of a document generation method for a specific embodiment of the present application. A state manager and an event-driven bus can be used to implement binding operations and maintain global states, including model posture, document positioning anchor points, BOM node expansion states, etc., to ensure that the model selection events triggered by project designers can trigger document positioning, video loading, BOM highlighting and other operations. Among them, the state manager can be implemented by the Redux architecture, and the event-driven bus can be implemented by Pub-Sub.
[0049] In traditional document management, models and documents are often separated, which can easily lead to a lag in document content when updating the model. This embodiment ensures a high degree of consistency between technical documents and three-dimensional models by binding the target sub-document with the target component and displaying them in a linked manner on the target interface, so that each update to the model can be synchronously reflected in the relevant documents, thereby achieving the purpose of avoiding information inconsistencies between documents and models. Moreover, the linked display mechanism enables project designers to directly obtain relevant technical documents while viewing the model, without having to switch back and forth between different interfaces or documents. This interactive method significantly improves the work efficiency of project designers, especially in complex engineering guidance, equipment operation and maintenance and other scenarios.
[0050] In an exemplary embodiment, performing a binding operation on a target sub-document and a target component includes: generating a first mapping relationship between the target component and the target sub-document, wherein the first mapping relationship includes a target identifier for associating the target component and the target sub-document; and performing a binding operation on the target component and the target sub-document based on the target identifier.
[0051] Optionally, the target identifier is an identifier for uniquely identifying the target component and the target sub-document, and can be a unique identification code in a string, a number or other forms. The target identifier is the key to establishing the first mapping relationship. Through the target identifier, the target component and the target sub-document can be accurately identified and associated. In the binding operation, the target identifier can ensure that each target component can be correctly bound to its corresponding target sub-document.
[0052] Optionally, generating a first mapping relationship between a target component and a target sub-document includes: extracting an identifier of the target component, wherein a unique identifier of the target component can be extracted from the second model; extracting an identifier of the target sub-document, wherein the unique identifier of the target sub-document can be extracted from the second document; associating the identifier of the target component with the identifier of the target sub-document to generate a first mapping relationship.
[0053] This embodiment binds the target sub-document to the target component to ensure that the target sub-document can be automatically displayed when the target component is operated on the target interface. At the same time, by generating a first mapping relationship between the target component and the target sub-document and associating them with the target identifier, it can ensure that the association relationship between the target component and the target sub-document is accurate, thereby achieving the purpose of avoiding information association errors.
[0054] In an exemplary embodiment, obtaining a second model and a second document includes: obtaining an initial model and an initial document; when the format of the initial model does not match the first display format supported by the target interface, performing a first format conversion operation on the initial model according to the first display format to obtain a second model; when the format of the initial document does not match the second display format supported by the target interface, performing a second format conversion operation on the initial document according to the second display format to obtain a second document.
[0055] Optionally, the first display format refers to the display format of the model supported by the target interface, which ensures that the model can be efficiently and accurately displayed on the target interface, including but not limited to Graphics Transmission Format (GLTF for short) and Graphics Binary Format (GLB for short). The second display format refers to the display format of the technical document supported by the target interface, which ensures that the technical document can be efficiently and accurately displayed on the target interface, including but not limited to HyperText Markup Language (HTML for short) and Markdown (i.e., markup text). The format of the initial document includes but is not limited to Word and PDF.
[0056] Optionally, when the formats of the initial model and the initial document match the first display format and the second display format supported by the target interface respectively, the initial model is the second model and the initial document is the second document.
[0057] This embodiment realizes the purpose of ensuring that the model and the document can be efficiently and accurately displayed on the target interface by converting the initial model and the initial document into the display formats supported by the target interface.
[0058] Optionally, as Figure 6 shown, Figure 6 is a flowchart of a binding operation in a specific embodiment of the present application, including the following steps:
[0059] S602, start.
[0060] S604, prepare the Word version of the initial document that has been locally edited.
[0061] S606, load a specially designed secondary development program conversion plug-in. Among them, this conversion plug-in can automatically and losslessly convert the document by using specific format conversion algorithms and technical means, convert it into the display format of the technical document supported by the target interface, and optimize the information in the document.
[0062] S608, convert the initial document in Word format into a second document in HTML format (corresponding to the above-mentioned second display format) through the secondary development program conversion plug-in.
[0063] S610, optimize the information in the second document through the secondary development program conversion plug-in.
[0064] S612, the secondary development program conversion plug-in accurately extracts the target sub-document related to the target component in the second model from the second document according to the preset rules and algorithms. The target sub-document includes but is not limited to key information such as the component chapter information and picture position information in the second model.
[0065] S614, on the web editing side, project designers can, according to their actual needs, generate the first mapping relationship between the target component and the target sub-document through the editing function provided by the background operation interface. Among them, the first mapping relationship includes the target identifier used to associate the target component and the target sub-document; based on the target identifier, perform a binding operation on the target component and the target sub-document to bind the information related to the second model in the second document to the second model.
[0066] S616, finally achieve the effective interaction between the second document and the second model, and provide a more intuitive, convenient and efficient operation experience and information display method for project designers.
[0067] In an exemplary embodiment, the method further includes: saving the first model to the first model library, where the first model library is used to update the first model based on the received update information to obtain the target model; receiving the target model from the first model library.
[0068] Optionally, the first model library is a server for storing models, which is used to save and manage the lightweight three-dimensional models. For example, a self-built lightweight model library. The target terminal can also update the three-dimensional model through the self-built lightweight model library. Specifically, in the actual model usage process, if the usage specification indicates that the first model needs to be split and used, then the target terminal can perform autonomous updates based on the first model saved in the self-built lightweight model library to obtain the target model.
[0069] This embodiment realizes the purpose of overcoming the dependence of the target terminal on upstream services and some unknown normative deficiencies by updating the model from the target terminal.
[0070] In an exemplary embodiment, based on update information, updating a first model displayed on a target interface to obtain a target model includes: generating first prompt information based on the update information; sending the first prompt information to a target terminal to prompt the target terminal whether to update the first model; and in the case of receiving a first response information returned by the target terminal for indicating to update the first model, updating the first model based on the update information to obtain the target model.
[0071] Optionally, the first prompt information is a message or prompt for notifying a project designer that the model needs to be updated. Among them, the first prompt information can be a pop-up window, a notification bar message or an interface prompt, usually including information such as a brief description of the update and a version number, so that the project designer can understand the content of the update.
[0072] Optionally, the target terminal refers to a device through which a project designer interacts with a document generation system, and the target interface is displayed in the target terminal. For example, a computer, a tablet, a mobile phone, etc.
[0073] Optionally, the first response information is a response made by the project designer on the target terminal to the first prompt information, indicating whether to update the first model. The first response information can be a simple click of a "Yes" or "No" button, or a more complex input by the project designer. For example, the project designer selects the content to be updated or confirms the update time.
[0074] In this embodiment, by generating the first prompt information and sending it to the target terminal to prompt the project designer whether to update the first model, and then deciding whether to perform the update operation according to the response of the project designer, it not only improves the flexibility of the update and the control power of the project designer, but also avoids unnecessary update operations, achieving the purpose of enhancing the experience of the project designer.
[0075] In an exemplary embodiment, based on the difference information between the target model and the first model, updating a first document displayed on the target interface to obtain a target document includes: determining a first component to be updated included in the first model based on the difference information; obtaining a first sub-document included in the first document, where the first sub-document is a technical document of the first component; updating the first sub-document based on the difference information to obtain a second sub-document; and updating the first sub-document included in the first document to the second sub-document to obtain the target document.
[0076] Optionally, the difference information is used to indicate the differences between the target model and the first model. The difference information includes, but is not limited to, changes in geometric structure, updates of materials and textures, adjustments of assembly relationships, and changes in attributes. By analyzing the difference information between the target model and the first model, it is determined which components have changed. For example, the difference information may indicate that the geometric structure of a certain component has changed, or a certain component has been added or deleted. If the geometric structure of a component has changed, the relevant pictures or text descriptions in the first sub-document are updated to obtain the target document.
[0077] In this embodiment, by updating the document based on the difference information, the high consistency between the technical document and the 3D model is ensured, and the purpose of avoiding information mismatch is achieved. By only updating the part of the document related to the difference information, unnecessary update operations are reduced, and the purpose of improving the update efficiency is achieved.
[0078] In an exemplary embodiment, obtaining the first sub-document included in the first document includes: obtaining a pre-generated mapping relationship table between the first model and the first document, where the mapping relationship table includes a plurality of identifiers respectively used to associate each component in the first model with each sub-document in the first document; determining the first identifier of the first component included in the mapping relationship table; and determining the sub-document indicated by the first identifier as the first sub-document.
[0079] Optionally, the mapping relationship table is used to store the association relationships between the components in the first model and the sub-documents in the first document. Through the mapping relationship table, the sub-document associated with a specific component can be quickly located and extracted. Specifically, the mapping relationship table may include the mapping relationship between the identifier of the component and the identifier of the sub-document.
[0080] In an exemplary embodiment, updating the first sub-document based on the difference information to obtain a second sub-document includes: generating second prompt information based on the difference information; sending the second prompt information to the target terminal to prompt the target terminal whether to update the first sub-document; and updating the first sub-document based on the difference information to obtain the second sub-document when receiving the second response information returned by the target terminal indicating to update the first sub-document.
[0081] Optionally, the second prompt information is a message or prompt for notifying the project designer that the document needs to be updated. The second prompt information may be a pop-up window, a notification bar message, or an interface prompt, which usually includes brief descriptions of the update, version numbers, and other information so that the project designer can understand the content of the update.
[0082] Optionally, the second response information is the response made by the project designer on the target terminal to the second prompt information, indicating whether to update the document. The first response information can be a simple click of a "Yes" or "No" button, or a more complex input from the project designer. For example, the project designer selects the content to be updated or confirms the update time.
[0083] In this embodiment, by generating the second prompt information and sending it to the target terminal to prompt the project designer whether to update the document, and then deciding whether to perform the update operation according to the response of the project designer, not only the flexibility of the update and the control power of the project designer are improved, but also unnecessary update operations are avoided, achieving the purpose of enhancing the experience of the project designer.
[0084] In an exemplary embodiment, before generating the second prompt information based on the difference information, the method further includes: highlighting the first sub-document included in the first document displayed on the target terminal based on the difference information.
[0085] Optionally, specifically, as Figure 5 shown, an event-driven bus can be used to implement triggering document positioning and highlighting operations such as highlighting.
[0086] This embodiment provides an intuitive way for the project designer to identify the changed parts in the document through highlighting, achieving the purpose of assisting the project designer to quickly identify the content related to the model change in the document.
[0087] In an exemplary embodiment, sending the second prompt information to the target terminal to prompt whether to update the first sub-document includes: performing a pop-up window process at the first sub-document included in the first document displayed on the target terminal, so as to display in the popped-up window the information for prompting whether to update the first sub-document on the target terminal.
[0088] Optionally, the second prompt information is a message or prompt for notifying the project designer that the document needs to be updated. In this embodiment, the second prompt information is a pop-up window, and the displayed update information includes but is not limited to information such as a brief description of the update and the version number, so that the project designer can understand the content of the update.
[0089] In this embodiment, by generating the second prompt information and sending it to the target terminal to prompt the project designer whether to update the document, and then deciding whether to perform the update operation according to the response of the project designer, not only the flexibility of the update and the control power of the project designer are improved, but also unnecessary update operations are avoided, achieving the purpose of enhancing the experience of the project designer.
[0090] In an exemplary embodiment, after updating the first subdocument included in the first document to the second subdocument to obtain the target document, the method also includes: updating the mapping relationship between the first subdocument and the first component included in the mapping relationship table to a second mapping relationship between the second subdocument and the second component, wherein the second component is a component obtained after updating the first component, and the second mapping relationship includes a second identifier for associating the second subdocument and the second component; based on the second identifier, performing a binding operation on the second subdocument and the second component to display the second subdocument and the second component in a linked manner to the target interface.
[0091] After the model is updated, the related documents are also updated synchronously, and further the relationship between the two also needs to be updated synchronously to reflect the latest status. This embodiment ensures that the relationship between the document and the model is always consistent by updating the mapping relationship table, thereby avoiding information mismatch.
[0092] The present invention will be described below in conjunction with specific embodiments:
[0093] This embodiment takes the physical product of the model as a processor, and the document generation system includes a product intelligent connection center 702, an intelligent design system 704, and a server 708 as an example for explanation. Figure 7 A schematic diagram of a method for generating a document according to a specific embodiment of the present application Figure 1 ,like Figure 7 As shown:
[0094] First, the product intelligent connection center 702 transmits the first model to the intelligent design system 704. The intelligent design system 704 automatically converts the first model into GLTF and sends the converted first model to the self-built lightweight model library 706 and the server 708. The server 708 renders the received converted first model to display it on the interactive product manual display platform 710 in the target terminal 712.
[0095] Then, the intelligent design system 704 obtains the update information of the first model in real time through the interface. Once it determines that there are changes in the 3D model, version information changes, etc., it will pop up a window to prompt the project designer whether to update the first model. When the first model is needed, the intelligent design system 704 transfers the update information to the server 708. The server 708 updates the previously stored converted first model based on the update information to obtain the target model, and performs rendering to display it on the interactive product manual display platform 710 in the target terminal 712. The project designer can also update the 3D model through the self-built lightweight model library 706 on the target terminal 712. Specifically, the self-built lightweight model library 706 updates the lightweight model based on the first model transmitted by the product full-process center in the intelligent design system 704 to obtain the target model, and sends the target model to the server 708. The target terminal 712 downloads the target model from the server 708 and performs rendering through the server 708 to display it on the interactive product manual display platform 710 in the target terminal 712.
[0096] Figure 8 Schematic of a method for generating a document in a specific embodiment of the present application Figure 2 , such as Figure 8 shown:
[0097] The project designer performs user operations on the target terminal. For example, click / rotate model components, start the model engine service, and the event parser determines the operation type of the user operation:
[0098] If the operation type is a component selection operation, it will trigger the data binding module and search the document database to find the technical document associated with the component and locate and highlight the document section corresponding to the component.
[0099] If the operation type is a model deformation operation, it will trigger the spatial calculation engine in the intelligent design system. The target terminal will automatically update the model state. The version control system in the intelligent design system will issue an instruction to the document product full-process center system in the intelligent design system based on the difference information obtained by updating the first component in the first model to obtain the second component, triggering the location and highlighting of the first sub-document corresponding to the first component in the target interface, and a pop-up window appears for user decision-making (corresponding to the above second prompt information) to prompt whether to update the picture or whether to update the text (corresponding to the second sub-document), and finally realize document refreshing and present the refreshed document (corresponding to the target document) on the target terminal.
[0100] If, during the actual use of the model, due to model design changes, for example, the first model needs to be split and used according to the usage specifications, the target terminal can autonomously update based on the first model saved in its self-built lightweight model library. Specifically, it will trigger a notification from the model product full-process central system in the intelligent design system. The target terminal captures the notification from the model product full-process central system to update the model status. The version control system will send instructions to the document product full-process central system based on the difference information, triggering the positioning and highlighting of the first sub-document corresponding to the first component in the target interface, and a pop-up window will appear with a user decision (corresponding to the above-mentioned second prompt message) to prompt whether to update the picture or whether to update the text (corresponding to the second sub-document), and finally, the document will be refreshed and the refreshed document (corresponding to the target document) will be presented on the target terminal.
[0101] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.
[0102] The embodiments of the present application also provide a document generation device, as Figure 9 shown, including:
[0103] A first acquisition module 902, configured to acquire update information for updating the first model;
[0104] A first update module 904, configured to update the first model displayed on the target interface based on the update information to obtain a target model, and display the target model on the target interface;
[0105] A second update module 906, configured to update the first document displayed on the target interface based on the difference information between the target model and the first model to obtain a target document, and display the target document on the target interface, where the first document includes the technical document of the first model, and the target interface is used for linked display of the model and the document.
[0106] In an exemplary embodiment, the above-mentioned device also includes: a second acquisition module, which is used to acquire the second model and the second document before acquiring the update information used to update the first model, wherein the second document includes the technical document of the second model, the first model is the model obtained after the second model is updated N times, and the first document is the document obtained after the second document is updated N times, and N is an integer greater than 1; a first extraction module, which is used to extract the target sub-document included in the second document, wherein the target sub-document is the technical document of the target component included in the second model; a first execution module, which is used to perform a binding operation on the target sub-document and the target component, so as to display the target sub-document and the target component in linkage on the target interface.
[0107] In an exemplary embodiment, the above-mentioned first execution module includes: a first generation submodule, used to generate a first mapping relationship between a target component and a target sub-document, wherein the first mapping relationship includes a target identifier for associating the target component with the target sub-document; and a first execution submodule, used to perform a binding operation on the target component and the target sub-document based on the target identifier.
[0108] In an exemplary embodiment, the above-mentioned second acquisition module includes: a first acquisition sub-module, used to acquire an initial model and an initial document; a second execution sub-module, used to perform a first format conversion operation on the initial model according to the first display format to obtain a second model when the format of the initial model does not match the first display format supported by the target interface; and a third execution sub-module, used to perform a second format conversion operation on the initial document according to the second display format to obtain a second document when the format of the initial document does not match the second display format supported by the target interface.
[0109] In an exemplary embodiment, the above-mentioned device also includes: a first saving module, used to save the first model to a first model library, wherein the first model library is used to update the first model based on the received update information to obtain a target model; a first receiving module, used to receive the target model from the first model library.
[0110] In an exemplary embodiment, the above-mentioned first update module includes: a second generation submodule, used to generate first prompt information based on update information; a first sending submodule, used to send the first prompt information to the target terminal to prompt the target terminal whether to update the first model; and a second update submodule, used to update the first model based on the update information to obtain the target model when receiving the first response information returned by the target terminal to indicate that the first model is to be updated.
[0111] In an exemplary embodiment, the above-mentioned second update module includes: a first determination sub-module, configured to determine a first component to be updated included in the first model based on the difference information; a second acquisition sub-module, configured to acquire a first sub-document included in the first document, where the first sub-document is a technical document of the first component; a third update sub-module, configured to update the first sub-document based on the difference information to obtain a second sub-document; and a fourth update sub-module, configured to update the first sub-document included in the first document to the second sub-document to obtain a target document.
[0112] In an exemplary embodiment, the above-mentioned second acquisition sub-module includes: a first acquisition unit, configured to acquire a pre-generated mapping relationship table between the first model and the first document, where the mapping relationship table includes a plurality of identifiers respectively used to associate each component in the first model with each sub-document in the first document; a first determination unit, configured to determine a first identifier of the first component included in the mapping relationship table; and a second determination unit, configured to determine the sub-document indicated by the first identifier as the first sub-document.
[0113] In an exemplary embodiment, the above-mentioned third update sub-module includes: a first generation unit, configured to generate second prompt information based on the difference information; a first sending unit, configured to send the second prompt information to a target terminal to prompt whether the target terminal updates the first sub-document; and a first update unit, configured to update the first sub-document based on the difference information to obtain a second sub-document when receiving second response information returned by the target terminal and used to indicate updating the first sub-document.
[0114] In an exemplary embodiment, the above-mentioned third update sub-module further includes: a first display unit, configured to prominently display the first sub-document included in the first document displayed on the target terminal based on the difference information before generating the second prompt information based on the difference information.
[0115] In an exemplary embodiment, the above-mentioned first sending unit includes: a first display sub-unit, configured to perform a pop-up window process at the first sub-document included in the first document displayed on the target terminal to display information for prompting whether the target terminal updates the first sub-document in the popped-up window.
[0116] In an exemplary embodiment, the second update module further includes: a second update unit, for updating the mapping relationship between the first sub-document and the first component included in the mapping relationship table to a second mapping relationship between the second sub-document and the second component after updating the first sub-document included in the first document to the second sub-document to obtain the target document, wherein the second component is the component obtained after updating the first component, and the second mapping relationship includes a second identifier for associating the second sub-document and the second component; a first execution unit, for performing a binding operation on the second sub-document and the second component based on the second identifier, so as to display the second sub-document and the second component in a linked manner to the target interface.
[0117] For the description of the features in the embodiment corresponding to a document generation device, reference can be made to the relevant description of the embodiment corresponding to a document generation method, which will not be repeated here.
[0118] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned document generation method embodiments.
[0119] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned document generation method embodiments when running.
[0120] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0121] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned document generation method embodiments are implemented.
[0122] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned document generation method embodiments are implemented.
[0123] Those skilled in the art may further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0124] The above has introduced in detail a method for generating a document provided by this application. Specific examples are used herein to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A method for generating a document, characterized in that: include: Acquire update information for updating the first model; Based on the update information, the first model displayed on the target interface is updated to obtain a target model, and the target model is displayed on the target interface; Based on the difference information between the target model and the first model, the first document displayed on the target interface is updated to obtain the target document, and the target document is displayed on the target interface, wherein the first document includes the technical document of the first model, and the target interface is used to display the model and the document in a linked manner.
2. The method according to claim 1, characterized in that: Before acquiring update information for updating the first model, the method further includes: Acquire a second model and a second document, wherein the second document includes a technical document of the second model, the first model is a model obtained by updating the second model N times, and the first document is a document obtained by updating the second document N times, where N is an integer greater than 1; Extracting a target sub-document included in the second document, wherein the target sub-document is a technical document of a target component included in the second model; A binding operation is performed on the target sub-document and the target component, so that the target sub-document and the target component are linked and displayed on the target interface.
3. The method according to claim 2, characterized in that Performing a binding operation on the target sub-document and the target component includes: Generate a first mapping relationship between the target component and the target sub-document, wherein the first mapping relationship includes a target identifier for associating the target component with the target sub-document; Based on the target identifier, the binding operation is performed on the target component and the target sub-document.
4. The method according to claim 2, characterized in that: Get the second model and the second document, including: Get initial models and initial documentation; In the case that the format of the initial model does not match the first display format supported by the target interface, performing a first format conversion operation on the initial model according to the first display format to obtain the second model; In the case that the format of the initial document does not match the second display format supported by the target interface, a second format conversion operation is performed on the initial document according to the second display format to obtain the second document.
5. The method according to claim 1, characterized in that The method further comprises: Saving the first model to a first model library, wherein the first model library is used to update the first model based on the received update information to obtain the target model; The target model is received from the first model library.
6. The method according to claim 1, characterized in that Based on the update information, the first model displayed on the target interface is updated to obtain a target model, including: Based on the update information, generate first prompt information; Sending the first prompt information to a target terminal to prompt the target terminal whether to update the first model; When first response information returned by the target terminal for indicating updating of the first model is received, the first model is updated based on the update information to obtain the target model.
7. The method according to claim 1, characterized in that Based on the difference information between the target model and the first model, the first document displayed on the target interface is updated to obtain the target document, including: determining a first component to be updated included in the first model based on the difference information; Acquire a first sub-document included in the first document, wherein the first sub-document is a technical document of the first component; Update the first sub-document based on the difference information to obtain a second sub-document; The first sub-document included in the first document is updated to the second sub-document to obtain the target document.
8. The method according to claim 7, characterized in that Acquiring a first sub-document included in the first document, including: Acquire a pre-generated mapping relationship table between the first model and the first document, wherein the mapping relationship table includes a plurality of identifiers respectively used to associate each component in the first model with each sub-document in the first document; Determining a first identifier of the first component included in the mapping relationship table; The subdocument indicated by the first identifier is determined as the first subdocument.
9. The method according to claim 7, characterized in that: The first sub-document is updated based on the difference information to obtain a second sub-document, including: Based on the difference information, generating second prompt information; sending the second prompt information to a target terminal to prompt the target terminal whether to update the first sub-document; When receiving second response information returned by the target terminal for indicating that the first sub-document is to be updated, the first sub-document is updated based on the difference information to obtain the second sub-document.
10. The method according to claim 9, characterized in that Before generating the second prompt information based on the difference information, the method further includes: Based on the difference information, the first sub-document included in the first document displayed on the target terminal is highlighted.
11. The method according to claim 9, characterized in that Sending the second prompt information to the target terminal to prompt the target terminal whether to update the first sub-document includes: A pop-up window process is performed on the first sub-document included in the first document displayed on the target terminal, so as to display in the pop-up window information for prompting the target terminal whether to update the first sub-document.
12. The method according to claim 8, characterized in that After updating the first sub-document included in the first document to the second sub-document to obtain the target document, the method further includes: updating the mapping relationship between the first sub-document and the first component included in the mapping relationship table to a second mapping relationship between the second sub-document and the second component, wherein the second component is a component obtained after the first component is updated, and the second mapping relationship includes a second identifier for associating the second sub-document and the second component; Based on the second identifier, a binding operation is performed on the second sub-document and the second component, so that the second sub-document and the second component are linked and displayed on the target interface.
13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the document generation method according to any one of claims 1 to 12 when executing the computer program.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the document generation method according to any one of claims 1 to 12.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the document generation method according to any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Document data updating method and device, electronic equipment, and storage medium
CN113626392A
Online document updating method and device, electronic equipment and storage medium
CN115186104A
Interface document updating method and device, electronic equipment and storage medium
CN117591145A
Generation method and device of description document, computer equipment and storage medium
CN118733110A
Difference report generation method and device, electronic equipment and storage medium
CN119167914A