Method, device and medium for generating document assets based on variable entries

By converting documents into itemized documents and setting feature variables and logical expressions, and utilizing implicit hierarchical promotion rules, the problems of information redundancy and maintenance complexity in traditional document management are solved, enabling flexible document asset generation and consistent management.

CN121301353BActive Publication Date: 2026-07-07VISION MICROSYST (SHANGHAI) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
VISION MICROSYST (SHANGHAI) CO LTD
Filing Date
2025-12-12
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Traditional document management methods result in information redundancy and wasted storage space, and are complex to maintain, making it difficult to achieve flexible content structure adjustments and consistent management.

Method used

Convert non-itemized documents into itemized documents, set feature variables and logical expressions, and automatically adjust the document structure through implicit hierarchy promotion rules to generate different versions of document assets.

Benefits of technology

It simplifies template configuration, reduces repetitive work, ensures information consistency and accuracy, and improves document maintenance efficiency and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121301353B_ABST
    Figure CN121301353B_ABST
Patent Text Reader

Abstract

The application provides a variable entry-based document asset generation method and device and a medium. Non-entry documents are converted into entry documents including a plurality of entries with hierarchical relationships. Feature variables are set for the entry documents. Entries containing non-common content in the documents are marked as variable entries, and logical expressions composed of the feature variables are set for the variable entries. A document asset output template is created, and the feature variables are assigned values in the template. The value operation logical expressions in the template are applied, the variable entries are filtered according to the operation results, and the retained entries are combined to generate a document asset. When a variable entry is not provided with a logical expression, the sub-variable entries meeting the conditions of the variable entry are retained and promoted in title level. The application simplifies content structure reorganization, reduces configuration complexity, and realizes single data source management of content, thereby improving document maintenance efficiency and flexibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer information technology, and more specifically, to a method, apparatus, and medium for generating document assets based on variable entries. Background Technology

[0002] In fields such as enterprise content management and technical documentation, it is often necessary to maintain multiple documents with highly similar content but subtle differences for different product versions, customer groups, or application scenarios. Traditional document management methods typically create a separate document copy for each variant, leading to information redundancy and wasted storage space. Furthermore, when common content needs to be updated, maintenance personnel must manually find and modify all relevant document copies, which is a huge workload and highly susceptible to version inconsistencies or content errors due to oversight.

[0003] To address the aforementioned issues, existing technologies have proposed several methods for generating structured documents. For example, these methods utilize technologies such as Extensible Markup Language (EXPLAIN) to create structured documents, modifying document content or structure by defining attributes or variables and applying preset rules to generate different output reports. While these methods achieve separation of content and presentation, they still have shortcomings when handling the need for dynamic document restructuring. Specifically, the document's chapter hierarchy needs to be adjusted according to different conditions. For instance, promoting a sub-chapter to a top-level chapter in a specific mode often requires writing and maintaining complex, explicit conversion rules. This not only places high technical demands on template designers but also makes the template configuration process cumbersome and rigid, lacking sufficient flexibility and ease of use. Summary of the Invention

[0004] In view of the deficiencies in the prior art, the purpose of this invention is to provide a method, apparatus and medium for generating document assets based on variable entries.

[0005] A method for generating document assets based on variable entries according to the present invention includes: converting a non-entry-based document into an entry-based document containing several entries with hierarchical relationships; setting feature variables for the entry-based document; marking entries containing non-common content in the entry-based document as variable entries, and setting a logical expression composed of the feature variables for the variable entries; creating a document asset output template and assigning values ​​to the feature variables in the template; applying the feature variable values ​​in the template to calculate the logical expression, and filtering the variable entries according to the calculation result, and combining the retained entries to generate document assets; wherein, the step of filtering the variable entries according to the calculation result further includes: if a variable entry does not have a logical expression set, retaining its subordinate sub-variable entries whose logical expression calculation result is true, and promoting the hierarchy of the sub-variable entries in the generated document assets.

[0006] Preferably, the feature variables include at least one of: document-level variables describing global attributes of the itemized document, and entry-level variables describing individual entry attributes.

[0007] Preferably, the step of converting a non-entry-based document into an entry-based document includes: parsing the titles and body content in the non-entry-based document to divide the entries according to the titles and body content, and determining the hierarchical relationship between the entries according to the inherent level of the titles.

[0008] Preferably, the method further includes: persistently storing the itemized document, the feature variables, and the logical expression set for the variable entries.

[0009] Preferably, the variable entry not having a logical expression means that the logical expression attribute of the variable entry is empty or is preset to an invalid value.

[0010] This invention also provides a document asset generation device based on variable entries, comprising: a document processing module configured to convert a non-entry-based document into an entry-based document including a plurality of hierarchical entries; a variable configuration module configured to set feature variables for the entry-based document; a rule configuration module configured to mark entries containing non-common content in the entry-based document as variable entries, and to set a logical expression composed of the feature variables for the variable entries; a template management module configured to create a document asset output template and assign values ​​to the feature variables in the template; and a document generation engine configured to apply the feature variable values ​​in the template, calculate the logical expression, and filter the variable entries according to the calculation result, and combine the retained entries to generate document assets; wherein, when the document generation engine filters the variable entries according to the calculation result, it is further configured to: if a variable entry does not have a logical expression set, retain its subordinate sub-variable entries whose logical expression calculation result is true, and promote the hierarchy of the sub-variable entries in the generated document assets.

[0011] Preferably, the variable configuration module is configured to set at least one of a document-level variable describing the global attributes of the itemized document and an entry-level variable describing the attributes of a single entry.

[0012] Preferably, the document processing module is configured to convert the non-entry-based document into an entry-based document by parsing the titles and body content in the non-entry-based document to divide the entries according to the titles and body content, and determining the hierarchical relationship between the entries according to the inherent level of the titles.

[0013] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method for generating document assets based on variable entries.

[0014] Preferably, when the program is executed by the processor, the above-described method for generating document assets based on variable entries is further implemented.

[0015] Compared with the prior art, the present invention has the following beneficial effects:

[0016] 1. This invention introduces a specific, implicit hierarchical promotion rule, allowing users to automatically upgrade and reorganize child items by simply leaving the logical expression of the parent item blank. This greatly simplifies the configuration logic of the template, lowers the threshold for use, and improves the flexibility of content structure adjustment.

[0017] 2. This invention manages document content by itemizing it, treating common content as fixed items and non-common content as variable items, thus achieving a single data source and fundamentally avoiding information redundancy caused by storing multiple similar copies. When common content needs modification, it only needs to be updated once in the source itemized document, and all document assets generated based on it can automatically synchronize the latest content, significantly reducing repetitive manual modification work, ensuring information consistency and accuracy, and lowering maintenance costs.

[0018] 3. This invention achieves refined management and control of document content by decomposing the document into independent entries. It can flexibly combine, delete, and reconstruct the content according to different needs by configuring feature variables in the template, and automatically generate highly customized standard documents. Attached Figure Description

[0019] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0020] Figure 1 A flowchart illustrating a method for generating document assets based on variable entries, provided as an embodiment of the present invention;

[0021] Figure 2 A schematic diagram of the architecture of a document asset generation system based on variable entries provided in an embodiment of the present invention;

[0022] Figure 3 A schematic diagram illustrating the hierarchical promotion rules provided in an embodiment of the present invention;

[0023] Figure 4 A schematic diagram of the user interface for rule configuration provided in an embodiment of the present invention.

[0024] The annotations in the attached figures are explained as follows:

[0025] 10. Document parsing module; 20. Content editing and rule configuration module; 30. Variable and template management module; 40. Document generation engine; 50. Data persistence layer; 100. Initial structure; 110. Parent entry; 111. Child entry A; 112. Child entry B; 200. Generated structure; 210. Promoted child entry A; 310. Entry tree view; 320. Attribute configuration panel; 321. Variable entry checkbox; 322. Logical expression input box; S100. Document entry; S200. Setting feature variables; S300. Configuring variable entries and rules; S400. Creating output template; S500. Applying template to generate document; S510. Calculating logical expressions; S520. Determining if parent entry rule is empty; S530. Applying hierarchical promotion rules; S540. Combining retained entries. Detailed Implementation

[0026] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.

[0027] Example 1

[0028] This embodiment provides a method for generating document assets based on variable entries. This method can automatically generate multiple document assets, differing in content and structure, from a single source document based on different configuration templates. Please refer to [link to relevant documentation]. Figure 1 The flowchart shown is a representation of the method provided in this embodiment.

[0029] The method provided in this embodiment of the invention can be executed by a computer system. The system includes a processor and a memory, wherein the memory stores instructions executable by the processor to perform the following steps.

[0030] In step S100, document itemization processing is performed. This step aims to convert an unstructured original document, such as a complete Word document or plain text document, into a structured format that is easy for machines to process. In this embodiment, it is assumed that the original document is a product overview manual, the content of which is organized by chapters, including "Chapter 1 Basic Functions", "Chapter 2 Advanced Functions" and "Chapter 3 Appendix". Among them, the "Chapter 2 Advanced Functions" chapter further includes two sub-chapters: "2.1 Function A" and "2.2 Function B".

[0031] During the itemization process, the system parses the original document. Specifically, the parsing process can be based on the document's inherent styles, formats, or specific tags. For example, the system can identify text with a "Level 1 Heading" style as Level 1 items, text with a "Level 2 Heading" style as Level 2 items, and ordinary body paragraphs as content items. Thus, the original document can be decomposed into a series of independent "items." It should be noted that each item is a content unit, such as a heading, a paragraph, an image, or a table. Simultaneously, the system determines and records the parent-child hierarchical relationship between items based on the heading level (e.g., Level 1, Level 2), thereby logically constructing a tree-like hierarchical structure. For example, the item "Chapter 2 Advanced Functions" is the parent item of both "2.1 Function A" and "2.2 Function B." After processing, this itemized document, composed of several hierarchically related items, will be persistently stored, for example, in a database, for later retrieval.

[0032] In step S200, feature variables are set for the itemized document to control content changes. It is understood that feature variables are an abstraction of the characteristics of a document or item across different dimensions, forming the basis for subsequent logical judgments and content filtering. In this embodiment, to distinguish document versions for different target users, a document-level feature variable named `user_level` is defined. This variable represents the target user's level, and its selectable values ​​are 'Beginner' or 'Pro'.

[0033] In step S300, variable entries and rules are configured. In the itemized document, some content (such as "Chapter 1 Basic Functions") is common to all document versions, while other content (such as "Chapter 2 Advanced Functions") is non-common and its presentation depends on specific conditions. This step identifies and marks these non-common content entries as "variable entries" and configures corresponding filtering rules for them.

[0034] As a specific implementation method, it can be achieved by leveraging Figure 4 The user interface shown completes the configuration process. This interface provides an item tree view 310 to clearly display the document's hierarchical structure. Users can select any item in this view and perform operations in the attribute configuration panel 320 on the right. When a user wishes to set a selected item as a variable item, they can check the "Set as Variable Item" checkbox 321. Once checked, the logical expression input box 322 is activated, allowing the user to enter a logical expression composed of the aforementioned feature variables.

[0035] In this embodiment, the configuration rules are as follows: 1. Mark the parent entry "Chapter 2 Advanced Functions" as a variable entry. A special setting is used here: intentionally leave its logical expression input box 322 empty. In the system implementation, this indicates that the logical expression attribute of this entry is a null value or a preset invalid value. 2. Mark its two sub-entries "2.1 Function A" and "2.2 Function B" as variable entries as well, and set the same logical expression for these two sub-entries: "user_level=='Pro'". This expression means that these two entries are only retained if the value of the feature variable user_level is equal to 'Pro'.

[0036] After completing the rule configuration, in step S400, document asset output templates are created. A template is a collection of specific values ​​for feature variables, and each template corresponds to a desired document asset. In this embodiment, two templates are created: 1. "Basic Manual Template": In this template, the feature variable `user_level` is assigned the value 'Beginner'. 2. "Professional Manual Template": In this template, the feature variable `user_level` is assigned the value 'Pro'.

[0037] Finally, in step S500, the template is applied to generate the final document asset. This step is the core execution stage of the entire method. When the user selects a template and triggers the generation command, the system will perform a series of calculations and reorganization operations.

[0038] The specific working process of applying the two templates mentioned above will be described below.

[0039] Scenario 1: Generating a Basic Manual When the user selects to apply the "Basic Manual Template," the system obtains the value of `user_level` in the template as 'Beginner'. Subsequently, the system iterates through all variable entries in the itemized document and executes step S510, which involves evaluating the logical expression. For the sub-entries "2.1 Function A" and "2.2 Function B," the system replaces the variable `user_level` in the logical expression `user_level == 'Pro'` with the value 'Beginner' from the template, resulting in the expression to be evaluated: 'Beginner' == 'Pro'. The Boolean operation result of this expression is false. Next, the system processes the parent entry "Chapter Two Advanced Functions." In step S520, the system determines whether the rules for this parent entry are empty. Upon inspection, its logical expression is indeed not set (i.e., empty). According to the preset hierarchical promotion rules, the system then checks among all its sub-variable entries whether there are any entries whose logical expression evaluates to true. In this scenario, the evaluation results for both "2.1 Function A" and "2.2 Function B" are false. Therefore, there are no sub-entries that meet the conditions for retention and promotion. According to the rules, when a parent entry without a set logical expression has no sub-entries that need to be retained, the parent entry itself should also be discarded. Finally, in step S540, the system combines all the entries that should be retained. At this point, only the fixed, non-mutable entries "Chapter 1 Basic Functions" and "Chapter 3 Appendix" are retained, while the variable entry "Chapter 2 Advanced Functions" and all its sub-entries are discarded. The system combines the retained entries in their original order to generate a "Basic Version Manual" containing only the basic functions and the appendix.

[0040] Scenario 2: Generating a Professional Manual When the user selects to apply the "Professional Manual Template," the system obtains the value of `user_level` as 'Pro' in the template. The system then iterates through the variable entries and executes step S510. For the sub-entries "2.1 Function A" and "2.2 Function B," the system replaces the variable in their logical expression `user_level == 'Pro'` with 'Pro', resulting in the expression to be evaluated: 'Pro' == 'Pro'. The Boolean operation of this expression is true. Next, the system processes the parent entry "Chapter Two Advanced Functions." Similarly, in step S520, the system determines that the logical expression of the parent entry is empty, triggering a special processing path and proceeding to step S530 to apply the hierarchical promotion rule. Specifically, the execution process of this rule can be found in [reference needed]. Figure 3 The diagram illustrates the process. In the initial structure 100, the parent entry 110 (corresponding to "Chapter 2 Advanced Functions") has no set rules, and it has a sub-entry A (111, corresponding to "Function A", whose rule operation result is true) and another hypothetical sub-entry B (112, whose rule operation result is false). According to the hierarchical promotion rules, the system will perform the following operations: 1. Discard the parent entry itself, which has no set logical expression, i.e., the "Chapter 2 Advanced Functions" entry is discarded. 2. Retain its subordinate variable sub-entries whose logical expression operation result is true, i.e., "2.1 Function A" and "2.2 Function B" are retained. 3. Promote the level of the retained sub-entries by one level. In the original document, "2.1 Function A" and "2.2 Function B" are second-level headings. After promotion, they will become first-level headings. After the processing in step S530, only the promoted sub-entry A (210) remains in the generated structure 200. Finally, in step S540, the system combines all the entries that should be retained. At this point, the retained entries include the fixed "Chapter 1 Basic Functions" and "Chapter 3 Appendix," as well as the hierarchically elevated "Function A" and "Function B." The system combines these entries to generate a new document asset, the "Professional Manual." Its final chapter structure becomes: "Chapter 1 Basic Functions," "Function A," "Function B," and "Chapter 3 Appendix," where "Function A" and "Function B" have become independent chapters at the same level as "Chapter 1."

[0041] As can be seen from this embodiment, this method achieves dynamic reorganization of the document structure simply by leaving the logical expression of the parent entry blank, which significantly simplifies the complexity of template configuration and successfully generates two manuals with different content and structure for different users from the same source document.

[0042] Example 2

[0043] As an optional implementation, this embodiment, based on Embodiment 1, demonstrates how to combine feature variables at different levels to achieve more complex and refined multi-dimensional content filtering. This also provides a concrete implementation for feature variables to be categorized into document-level variables describing the global attributes of itemized documents, and item-level variables describing the attributes of individual items, at least one of these categories.

[0044] In Example 1, `user_level` is a document-level variable applied to the entire document. In this example, a new feature variable, `is_beta_feature`, is introduced. This variable is designed as an entry-level variable, meaning it is not globally defined but exists as a specific attribute of a single entry. It is a Boolean variable used to indicate whether a feature is still in the testing phase, where a true value indicates a testing feature, and a false value indicates a stable feature.

[0045] Suppose that in the product manual, "2.2 Feature B" is a newly developed feature that is not yet fully stable. When configuring this entry, in addition to setting a user_level-based logical expression for it, an entry-level attribute, is_beta_feature, is attached and its value is set to true.

[0046] Accordingly, the logical expression for entry "2.2 Feature B" is modified to depend on both the document-level variable `user_level` and its own entry-level variable `is_beta_feature`. The new logical expression is: `user_level == 'Pro' AND is_beta_feature == False`. This expression means that this entry should only be included in the final document if the target user is a professional user and the feature itself is not a test feature.

[0047] Next, create a new output template called the "Stable Professional Template". In this template, the value of the document-level variable user_level will still be set to 'Pro'.

[0048] When generating a document using this "Stable Professional Template," the system works as follows: The system retrieves the value of `user_level` from the template as 'Pro'. When processing item "2.1 Function A," the logical expression remains `user_level == 'Pro'`. After substituting the variable value, the result of `'Pro' == 'Pro'` is true, so this item is initially determined to be retained. When processing item "2.2 Function B," the system needs to calculate its more complex logical expression `user_level == 'Pro' AND is_beta_feature == False`. The system first retrieves the value of `user_level` as 'Pro' from the template, and then retrieves the value of `is_beta_feature` as "true" from the attribute of item "2.2 Function B" itself. After substituting, the expression becomes `'Pro' == 'Pro' AND True == False`, i.e., `True AND False`. The final result of this logical AND operation is false. Therefore, item "2.2 Function B" is determined to be discarded.

[0049] Since the logical expression of the parent entry "Chapter 2 Advanced Functions" is still empty, the system continues to apply the promotion rule. At this point, among its child entries, only the logical expression of "2.1 Function A" is true. Therefore, the parent entry "Chapter 2 Advanced Functions" is discarded, "2.1 Function A" is retained and promoted, while "2.2 Function B" is discarded.

[0050] The final "Stable Professional Edition Manual" will include "Chapter 1 Basic Functions", "Function A", and "Chapter 3 Appendix". Compared to the "Professional Edition Manual" generated in Example 1, this manual will no longer include "Function B", which is still in the testing phase.

[0051] Understandably, once "Feature B" has been thoroughly tested and deemed stable by the developers, maintainers only need to locate the "2.2 Feature B" entry in the content management system and change the value of its `is_beta_feature` attribute from true to false. Afterward, if the "Stable Professional Template" is used to generate documentation again, the logical expression 'Pro' == 'Pro' AND False == False (i.e., True AND True) will become true, and the entry will automatically appear in the generated documentation.

[0052] This embodiment clearly demonstrates that by combining document-level and item-level feature variables, dual-condition filtering based on user level and functional stability can be achieved, thus reflecting the flexibility of this technical solution in achieving refined content control.

[0053] Example 3

[0054] This embodiment describes a specific architecture for a variable-entry-based document asset generation system that can be used to implement the above method. Please refer to... Figure 2 The diagram illustrates the components of the system and their interrelationships in the form of a functional block diagram. The system can be deployed on a server, and users interact with it through a web browser or a dedicated client. Accordingly, the implementation of this system apparatus provides a physical carrier for the methods described in the claims.

[0055] The system mainly includes the following core modules: document parsing module 10, content editing and rule configuration module 20, variable and template management module 30, document generation engine 40, and a shared data persistence layer 50.

[0056] Document parsing module 10: This module, as one of the system's entry points, is responsible for performing the initial document conversion. Its function corresponds to the process described in Example 3. Users upload non-entry-based document files (such as .docx, .md, etc.) through the system interface. The document parsing module 10 receives the file, calls the corresponding parsing library, and generates structured entry data by traversing the document content, identifying elements and their hierarchy, and then writes this data to the data persistence layer 50. In other words, this module is configured to convert non-entry-based documents into entry-based documents containing several hierarchical entries.

[0057] Content Editing and Rule Configuration Module 20: This module provides a core user interface for managing the content and variable rules of itemized documents. For example... Figure 4 As shown, the front-end interface of this module provides an item tree view 310, allowing users to intuitively browse and locate any part of the document. When a user selects an item, the attribute configuration panel 320 displays the item's detailed information. Users can perform key operations through this panel, including: marking any item as a variable item (via the variable item checkbox 321), writing or modifying the logical expression for a variable item (in the logical expression input box 322), and editing the item's own content. All these configurations and modifications are ultimately converted into structured data by this module and updated to the corresponding item record in the data persistence layer 50. Accordingly, this module is configured to mark items containing non-common content in the itemized document as variable items and set logical expressions for variable items consisting of feature variables.

[0058] Variable and Template Management Module 30: This module manages the feature variables and output templates used to control document changes. Its management interface allows system administrators or advanced users to define global feature variables (i.e., document-level variables), such as defining a variable named `user_level` and specifying its possible values. Users can also create, edit, and save document asset output templates here, assigning specific values ​​to defined feature variables when creating templates. For example, creating a "basic template" and specifying that the value of `user_level` in this template is 'Beginner'. These variable definitions and template data are also stored in the data persistence layer 50. Therefore, this module implements the functionality of setting feature variables for itemized documents, creating document asset output templates, and assigning values ​​to feature variables within the templates.

[0059] Document Generation Engine 40: This engine, as the core processing unit of the system, is responsible for the dynamic generation of documents. It typically exists as a backend service, receiving generation instructions containing the source document ID and the template ID to be applied. Upon receiving the instructions, the document generation engine 40 loads the specified itemized document, variable item rules, and template data from the data persistence layer 50, and executes the complete logic described in step S500 of Example 1: traversing all variable items, replacing variables in expressions with values ​​from the template and performing logical operations (corresponding to step S510); during the operation, strictly applying the hierarchical promotion rules, i.e., checking whether the parent item expression is empty (step S520), and performing hierarchical promotion on child items that meet the conditions (step S530); based on all the operation results, filtering out the final set of items to be retained; finally, combining and rendering all retained items according to their final hierarchy and order (step S540), generating a complete document file (e.g., PDF, HTML, or Word format), and returning it to the user. Thus, the document generation engine 40 is configured to apply the feature variable values ​​in the template, perform calculation logic expressions, filter variable entries based on the calculation results, combine the retained entries to generate document assets, and execute hierarchical promotion logic under specific conditions.

[0060] Data Persistence Layer 50: This layer serves as the foundational support layer, typically consisting of one or more databases. It is responsible for uniformly storing all core data required for system operation, including but not limited to: itemized data for all documents, defined feature variables, logical expressions configured for each variable item, and all created output templates. By centrally storing data, a single data source is achieved, ensuring data consistency and providing reliable data support for the operation of all other modules. The existence of this layer also provides the foundation for persistently storing itemized documents, feature variables, and logical expressions.

[0061] In summary, the system's workflow is as follows: First, the user uploads and processes the original document through the document parsing module 10; then, the content editing and rule configuration module 20 performs fine-grained configuration of the itemized document; next, variables are defined and templates are created in the variable and template management module 30; finally, by triggering the document generation engine 40, various customized document assets can be generated automatically and on demand. This embodiment provides a complete and modular system implementation scheme, demonstrating that the method of this invention can be implemented in engineering practice as a fully functional and easily maintainable software system. Furthermore, the system can be deployed on a computing device containing a processor and memory, and its functional modules can be stored as program instructions on a computer-readable storage medium, executed by the processor to implement the method claimed in this invention.

[0062] Example 4

[0063] This embodiment provides a document asset management method that distinguishes between common and non-common content in documents, filters and restructures non-common content as needed, combines it with common content, and outputs different document assets.

[0064] The document asset management method of this embodiment includes the following steps:

[0065] Step 1: Convert the non-entry-based document into an entry-based document. Use the titles and body content of the non-entry-based document as the basis for dividing the data into entry-based documents. Divide the non-entry-based document content into several structured data items, which are referred to as entries. Entries are identified by their heading level attributes. For example, a second-level heading entry is a sub-level of a first-level heading entry, and body text entries are sub-levels of heading entries.

[0066] Step 1 specifically includes the following steps:

[0067] Step 1.1: Upload the non-entry-based document to prepare for parsing the document content;

[0068] Step 1.2: Parse the document content and distinguish between the title content and the body content;

[0069] Step 1.3: Divide the entries according to the rule that each title is an entry and the text content following each title is an entry, form an entry-based document, and store it in a persistent system such as a database or file.

[0070] Step 2: Set feature variables for the itemized document. Feature variables are derived from the extraction of different characteristics of the document from multiple dimensions and are an abstraction of document features.

[0071] Step 2 specifically includes the following steps:

[0072] Step 2.1: Define the feature variable extraction hierarchy, which is divided into document level and item level. The document level usually describes the global attributes of the entire document, while the item level describes the attributes of each item within the document.

[0073] Step 2.2: Based on the purpose of the document, extract several characteristics of the document and its entries as feature variables;

[0074] Step 2.3: Store the extracted feature variables to a persistent system such as a database or file.

[0075] Step 3: Configure Variable Entries: Mark entries containing non-common content in the itemized document as variable entries. Each variable entry can have a logical expression set. A logical expression is an expression that performs logical operations on one or more feature variables, with a result of True / False. The True or False value of the logical expression determines whether the content of this variable entry and its child entries is retained when outputting the document asset. Child entries of a variable entry can also be set as variable entries. If an entry is set as a variable entry but no logical expression is set, all its first-level variable child entries whose logical expression results in True will be retained when outputting the document asset, and their heading level will be raised one level to the same level as the original parent variable entry's heading level. The original parent variable entry and variable child entries whose logical expression results in False will be discarded.

[0076] Step 3 specifically includes the following steps:

[0077] Step 3.1: Mark entries in the itemized document that contain non-common content as mutable entries, and persist this mark as an attribute of the entry;

[0078] Step 3.2: Write and set logical expressions for variable entries. A logical expression is an expression that performs logical operations on one or more of its associated feature variables. The logical expression is persistently stored as an entry attribute and used for calculation when outputting document assets later.

[0079] Step 4: Create a document asset output template and apply the template to output document assets. The purpose of the document asset output template is to assign values ​​to document feature variables. By assigning different feature variable values, the calculation results of the variant logic are affected, resulting in the output of different document assets.

[0080] Step 4 specifically includes the following steps:

[0081] Step 4.1: Create a document asset output template and fill in the output document name;

[0082] Step 4.2: Assign values ​​to the feature variables of the itemized document in the document asset output template, and persist the document template data;

[0083] Step 4.3: Obtain and apply the feature variable values ​​of the document asset output template, substitute them into the special variables of the logical expression of each variable item, perform calculations on the logical expressions, and obtain the calculation results;

[0084] Step 4.4: Based on the true or false value of the calculation result, determine whether to retain the entry to which the current logical expression belongs and the title level of the entry when outputting the document;

[0085] Step 4.5: Combine all the content of the retained entries to form the output document content, obtain the document name stored in the document asset output template, use this name as the document name, and output the document file.

[0086] This embodiment solves the problems of information redundancy and difficulty in updating in traditional document asset management by adopting this structured document generation method, improves the flexibility and maintainability of documents, and ensures the accuracy and timeliness of information.

[0087] Documents with identical content may have multiple copies. The repeated creation of similar content or the accumulation of numerous invalid documents leads to information redundancy. Fragmented document storage and the lack of a unified entry point make document content difficult to maintain and update. The document asset management method in this embodiment addresses this by managing documents in an itemized manner, extracting document feature variables, setting item feature variable values, and configuring document asset output templates. This allows for the output of multiple document assets with different purposes and uses but common content from the same itemized document, effectively avoiding the information redundancy and update difficulties caused by repeatedly writing common content.

[0088] This embodiment achieves itemized and structured document management by converting unstructured documents into structured document data and using itemized document content. This allows for more granular management of document content. By setting feature variables for documents and marking variable items with operable logical expressions, document content can be combined or reduced according to actual needs such as the document's main purpose. This results in standard documents that meet the requirements, reducing information redundancy when storing multiple documents with common content, reducing repetitive operations for updating common content, and further reducing the difficulty of updating document content.

[0089] This invention simplifies content structure reorganization, reduces configuration complexity, and achieves single data source management of content through implicit hierarchical promotion rules, thereby improving document maintenance efficiency and flexibility.

[0090] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features of the present invention can be arbitrarily combined with each other.

Claims

1. A method for generating document assets based on variable entries, characterized in that, include: Convert a non-entry-based document into an entry-based document containing several hierarchical entries; Set feature variables for the itemized document; Entries containing non-common content in the itemized document are marked as variable entries, and logical expressions composed of the feature variables are set for the variable entries; Create a document asset output template and assign values ​​to the feature variables in the template; By applying the feature variable values ​​in the template and combining them with the logical expressions of the feature variables corresponding to the variable entries, the variable entries are filtered, and the retained entries are combined to generate document assets. The step of filtering the variable entries further includes: if a variable entry is determined to have no logical expression set, retaining its subordinate sub-variable entries whose logical expression operation results in true, and promoting the sub-variable entries to a higher level in the generated document assets, while discarding the parent entry itself that has no logical expression set; The feature variables include at least one of the following: document-level variables describing the global attributes of the itemized document, and item-level variables describing the attributes of a single item. The step of converting a non-entry-based document into an entry-based document includes: The titles and body content in the non-entry document are parsed to divide the entries according to the titles and body content, and the hierarchical relationship between the entries is determined according to the inherent level of the titles; Furthermore, the logical expression of at least one of the variable entries is based on the document-level variables and the entry-level variables.

2. The method for generating document assets based on variable entries according to claim 1, characterized in that, The method further includes: The itemized document, the feature variables, and the logical expression set for the variable entries are persistently stored.

3. The method for generating document assets based on variable entries according to claim 1, characterized in that, The variable entry not having a logical expression means that the logical expression attribute of the variable entry is empty or is preset to an invalid value.

4. A document asset generation device based on variable entries, characterized in that, include: A document processing module is configured to convert a non-entry-based document into an entry-based document containing several entries with hierarchical relationships; A variable configuration module is configured to set feature variables for the itemized document; A rule configuration module is configured to mark entries containing non-common content in the itemized document as variable entries, and to set a logical expression for the variable entries composed of the feature variables; A template management module is configured to create a document asset output template and assign values ​​to the feature variables in the template; A document generation engine is configured to apply the feature variable values ​​in the template, combine them with the logical expressions of the feature variables corresponding to the variable entries, filter the variable entries, and combine the retained entries to generate document assets. The document generation engine is further configured to, when filtering the variable entries, retain its subordinate child variable entries whose logical expression results are true, and promote the child variable entries in the generated document assets, while discarding the parent entries that do not have logical expressions set. The variable configuration module is configured to set at least one of a document-level variable describing the global attributes of the itemized document and an entry-level variable describing the attributes of a single entry. The document processing module is configured to convert the non-entry-based document into an entry-based document in the following manner: The titles and body content in the non-entry document are parsed to divide the entries according to the titles and body content, and the hierarchical relationship between the entries is determined according to the inherent level of the titles; Furthermore, the logical expression of at least one of the variable entries is based on the document-level variables and the entry-level variables.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the document asset generation method based on variable entries as described in claim 1.

6. The computer-readable storage medium according to claim 5, characterized in that, When the program is executed by the processor, it further implements the document asset generation method based on variable entries as described in any one of claims 2 to 3.