Electronic document processing method and system based on virtual printing

By establishing a dynamic element mapping relationship between electronic documents and virtual print configuration templates, the problem of not being able to adjust print parameters in real time in existing technologies is solved, enabling high-quality and personalized printing of electronic documents.

CN120950018BActive Publication Date: 2026-02-10CHINA ELECTRONICS STANDARDIZATION INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511491887.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-20
Publication Date
2026-02-10
Estimated Expiration
2045-10-20

AI Technical Summary

Technical Problem

Existing electronic document printing methods cannot adjust printing parameters in real time according to the specific characteristics of the document, resulting in printing results that are difficult to achieve the desired state. Furthermore, they lack dynamic correlation between document elements and print template elements, failing to meet diverse printing needs.

Method used

By acquiring the set of electronic files to be processed and the corresponding set of initial virtual print configuration templates, a set of dynamic element mapping relationships between file elements and template elements is established. The mapping rules are adjusted in real time according to the characteristics of file elements to generate an optimized set of virtual print preview files, and finally, a set of executable virtual print instructions is generated.

Benefits of technology

It achieves precise correspondence and dynamic adaptation between file elements and template elements, improves the quality of virtual print preview files, ensures the accuracy and efficiency of the printing process, and realizes intelligent and personalized processing of electronic documents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120950018B_ABST
    Figure CN120950018B_ABST
Patent Text Reader

Abstract

The application provides an electronic file processing method and system based on virtual printing, belonging to the technical field of electronic file processing. First, a set of to-be-processed electronic files and a corresponding set of initial virtual printing configuration templates are obtained. Then, a set of dynamic element mapping relationships between file elements and template elements is established, which can adjust the mapping rules in real time according to the characteristics of the file elements. Then, the file elements are loaded into the template elements according to the dynamic mapping relationship and the fusion parameters are adjusted to generate a set of initial virtual printing preview files. Then, the initial preview files are optimized in multiple rounds of fusion effect to obtain a set of optimized virtual printing preview files. Finally, an executable virtual printing instruction set is generated according to the optimized set, each instruction corresponds to an optimized preview file and contains fusion parameter configuration information. The application realizes intelligent, personalized and high-quality processing of electronic file virtual printing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic document processing technology, and more specifically, to an electronic document processing method and system based on virtual printing. Background Technology

[0002] In the field of electronic document processing, with the widespread adoption of digital office practices, the number and types of electronic documents have increased dramatically. Different formats of electronic documents (such as documents, images, and tables) face numerous challenges in storage, transmission, and printing. Traditional electronic document printing methods typically employ fixed print configuration templates, offering only relatively simple and universal print parameter settings for different formats, making it difficult to meet diverse printing needs.

[0003] For example, when processing electronic documents with complex formats and rich content, a fixed print template may fail to accurately present key information, leading to problems such as misaligned content and formatting issues in the printed output. Furthermore, existing technologies lack consideration for the dynamic relationship between document elements and print template elements when processing electronic document printing, failing to adjust printing parameters in real time based on the specific characteristics of the document, making it difficult to achieve ideal printing results. In addition, during the print preview and optimization stages, existing methods typically only allow for simple static adjustments, unable to comprehensively optimize the content, format, and attributes of the document, thus affecting the quality and efficiency of electronic document printing. Summary of the Invention

[0004] In view of the aforementioned problems, and in conjunction with the first aspect of the present invention, embodiments of the present invention provide an electronic document processing method based on virtual printing, the method comprising:

[0005] Obtain a set of electronic files to be processed and an initial set of virtual print configuration templates corresponding to the set of electronic files to be processed. The set of electronic files to be processed contains multiple electronic files with different file formats, and the initial set of virtual print configuration templates contains virtual print parameter configuration information that is initially matched with each file format.

[0006] A dynamic element mapping relationship set is established between the file elements of each electronic file to be processed in the set of electronic files to be processed and the template elements of the corresponding initial virtual print configuration template in the set of initial virtual print configuration templates. The file elements include the content unit, format unit and attribute unit of the electronic file. The template elements include the parameter unit, layout unit and output unit of the initial virtual print configuration template. The dynamic element mapping relationship set can adjust the mapping rules in real time according to the characteristics of the file elements.

[0007] The file elements of each electronic file to be processed are loaded into the template elements of the corresponding initial virtual print configuration template according to the dynamic element mapping relationship set. The fusion parameters of the file elements and the template elements are adjusted to generate the initial virtual print preview file set.

[0008] Multiple rounds of fusion effect optimization are performed on each initial virtual print preview file in the initial virtual print preview file set, adjusting the display adaptability of content units, the parameter matching degree of format units, and the correlation adaptability of attribute units to obtain an optimized virtual print preview file set.

[0009] Based on the optimized virtual print preview file set, an executable virtual print instruction set is generated for the set of electronic files to be processed. Each executable virtual print instruction in the set of executable virtual print instructions corresponds to an optimized virtual print preview file and includes the fusion parameter configuration information corresponding to the optimized virtual print preview file.

[0010] Furthermore, embodiments of the present invention also provide an electronic document processing system based on virtual printing, characterized in that it includes:

[0011] A processor; a machine-readable storage medium for storing machine-executable instructions of the processor; wherein the processor is configured to perform the above-described virtual printing-based electronic document processing method by executing the machine-executable instructions.

[0012] In another aspect, embodiments of the present invention also provide a computer program product, the computer program product including machine-executable instructions, the machine-executable instructions being stored in a computer-readable storage medium, a processor of a computer device reading the machine-executable instructions from the computer-readable storage medium, the processor executing the machine-executable instructions, causing the computer device to perform the above-described electronic document processing method based on virtual printing.

[0013] Based on the above, by acquiring the set of electronic files to be processed and the corresponding set of initial virtual print configuration templates, a dynamic element mapping relationship set between file elements and template elements is established. This set can adjust the mapping rules in real time according to the characteristics of file elements, enabling the printing process to flexibly adapt to the complex characteristics of different electronic files, achieving precise correspondence and dynamic adaptation between file elements and template elements. File elements are loaded into template elements according to the dynamic element mapping relationship, and the fusion parameters are adjusted to generate an initial set of virtual print preview files. Multiple rounds of fusion effect optimization are performed on the initial virtual print preview files, adjusting aspects such as the display adaptability of content units, the parameter matching degree of format units, and the correlation adaptability of attribute units, significantly improving the quality of the virtual print preview files. Finally, an executable virtual print instruction set is generated based on the optimized virtual print preview file set, containing detailed fusion parameter configuration information, ensuring the accuracy and efficiency of the printing process, and realizing intelligent, personalized, and high-quality processing of virtual printing of electronic files. Attached Figure Description

[0014] Figure 1 This is a schematic diagram of the execution flow of the electronic document processing method based on virtual printing provided in an embodiment of the present invention.

[0015] Figure 2 This is a schematic diagram of exemplary hardware and software components of an electronic document processing system based on virtual printing provided in an embodiment of the present invention. Detailed Implementation

[0016] The present invention will now be described in detail with reference to the accompanying drawings. Figure 1 This is a flowchart illustrating an electronic document processing method based on virtual printing according to an embodiment of the present invention. The following is a detailed description of the electronic document processing method based on virtual printing.

[0017] Step S110: Obtain the set of electronic files to be processed and the set of initial virtual print configuration templates corresponding to the set of electronic files to be processed. The set of electronic files to be processed contains multiple electronic files with different file formats, and the set of initial virtual print configuration templates contains virtual print parameter configuration information that is initially matched with each file format.

[0018] In this embodiment, the application scenario is set as the virtual printing needs of an enterprise's administrative department for processing office documents in various formats. The set of electronic documents to be processed includes work reports, meeting minutes, financial statements, etc., submitted by employees, and the file formats include document formats, table formats, presentation formats, and image formats. During the acquisition process, the system first receives electronic document transmission requests from various departments through the internal office system. All electronic documents to be processed are extracted from these requests to form a set of electronic documents to be processed. Then, the format features of each electronic document in the set are extracted, and the corresponding initial virtual printing configuration template is matched based on the extracted format features. Finally, the initial virtual printing configuration template set is formed.

[0019] Step S111: Receive an external input request for the transfer of electronic files to be processed, extract a set of electronic files to be processed from the request, extract file format features for each electronic file in the set, and obtain file format feature information for each electronic file. The file format feature information includes format type identifier, format structure features, and format compatibility range.

[0020] In enterprise administrative departments, requests for transferring pending electronic files are initiated by employees through internal office platforms. These requests include information such as file transfer paths, file names, and transfer times. When extracting the set of pending electronic files, all files are located and retrieved based on the file transfer paths in the requests. For example, from employee A's request, a document file named "2024 Q3 Sales Report" and a table file named "Monthly Expense Details" are extracted. When extracting file format features, for document files, the extracted format type identifier is a document-specific identifier, and format structure features include chapter levels, paragraph distribution, and header / footer settings. The format compatibility range covers the range of adaptable virtual printing resolutions and output paper sizes. For table files, the format type identifier is a table-specific identifier, and format structure features include the number of rows and columns, cell merging rules, and data alignment. The format compatibility range also includes adaptable resolutions and paper sizes. Feature extraction for presentation and image files follows the same principle, ensuring that the format feature information for each file is complete and accurate.

[0021] Step S112: Construct a classification system for the electronic file formats to be processed based on the file format feature information, and divide the set of electronic files to be processed into multiple subsets of electronic files to be processed, with each subset of electronic files to be processed corresponding to a file format type.

[0022] When constructing a classification system for the formats of electronic files to be processed, the primary classification criterion is the format type identifier, supplemented by format structural features. For example, all electronic files identified as document format are grouped into a document format subset. While all files in this subset are in document format, they may have version differences, and their chapter hierarchy settings in the format structural features may vary. Similarly, electronic files identified as table format are grouped into a table format subset, where the number of rows and columns in the format structural features of the files varies. Through this classification method, the original set of electronic files to be processed, which contained a mixture of multiple formats, is divided into document format subsets, table format subsets, presentation format subsets, and image format subsets. Each subset corresponds to a single file format type, facilitating the subsequent matching of the corresponding virtual print configuration template.

[0023] Step S113: Retrieve the preset virtual print configuration template library. This virtual print configuration template library stores virtual print configuration templates corresponding to various file formats, and each virtual print configuration template is associated with format adaptation feature information.

[0024] A pre-configured virtual print configuration template library is deployed on the company's internal server and is maintained and updated in advance by the administrative department. This library stores corresponding virtual print configuration templates for document formats, table formats, presentation formats, and image formats. For example, document formats correspond to standard document print templates and long document pagination print templates; table formats correspond to data-intensive table templates and concise table templates. The format adaptation feature information associated with each virtual print configuration template corresponds to the file format feature information of the electronic document to be processed, including the adapted format type identifier, the adapted format structure feature range, and the adapted compatibility range. For example, in the format adaptation feature information of the standard document print template, the adapted format type identifier is the document format identifier, the adapted format structure feature range covers regular chapter levels and paragraph distribution, and the adapted compatibility range includes commonly used virtual print resolutions and A4 paper sizes.

[0025] Step S114: Associate and match the file format feature information of each subset of electronic files to be processed with the format adaptation feature information of the virtual print configuration templates in the virtual print configuration template library, and filter out the virtual print configuration templates that initially match each subset of electronic files to be processed.

[0026] For each subset of electronic files to be processed after segmentation, such as a document format subset, file format feature information is extracted, including common format type identifiers, main format structure features, and common format compatibility ranges within the subset. This information is then compared with the format adaptation feature information of all templates in the virtual print configuration template library. For example, the format type identifiers of the document format subset are matched with the template's compatible format type identifiers. If they match, the format structure features are further compared to see if they fall within the template's adaptation range, and whether there is any overlap in format compatibility ranges. Through multi-dimensional comparison, virtual print configuration templates that initially match the document format subset, such as standard document print templates, are selected. Similarly, for the table format subset, data-intensive table templates and other initially matching templates are selected.

[0027] Step S1141: Construct a correlation dimension system between file format features and template adaptation features. This correlation dimension system between file format features and template adaptation features includes format type matching dimension, structural feature compatibility dimension, and compatibility range overlap dimension.

[0028] When constructing the correlation dimension system, three core dimensions are set with the goal of achieving accurate matching. The format type matching dimension is used to determine whether the format type identifier of the subset of electronic files to be processed matches the compatible format type identifier of the virtual printing configuration template; this is the basic dimension for matching. The structural feature compatibility dimension analyzes whether the format and structural features of the electronic files are within the range of the template's compatible structural features. For example, whether the chapter levels of a document file match the number of levels supported by the template, or whether the number of rows and columns of a table file is within the range of the template's compatible rows and columns. The compatibility range overlap dimension confirms whether there is any overlap between the format compatibility range of the electronic files and the compatibility range of the template; for example, whether both have common options for the virtual printing resolution, ensuring compatibility of parameter settings during subsequent virtual printing.

[0029] Step S1142: Set a weight coefficient for each association dimension in the association dimension system of the file format feature and template adaptation feature. The weight coefficient is determined according to the degree of influence of the association dimension on the virtual printing effect. The weight coefficient of the format type matching dimension is higher than the weight coefficient of the structural feature compatibility dimension, and the weight coefficient of the structural feature compatibility dimension is higher than the weight coefficient of the compatibility range overlap dimension.

[0030] When setting weighting coefficients, each dimension is allocated based on its impact on the virtual printing effect. The format type matching dimension directly determines whether the template is suitable for the corresponding file format; if the type doesn't match, virtual printing will fail, hence its highest weighting coefficient. The structural feature compatibility dimension affects the layout and display of file content within the template; if the structure is incompatible, content misalignment may occur, resulting in a lower weighting coefficient. The compatibility range overlap dimension mainly affects the range of selectable printing parameters, having a relatively smaller impact on the overall effect, and thus the lowest weighting coefficient. For example, the format type matching dimension's weighting coefficient is set higher than the structural feature compatibility dimension's, and the structural feature compatibility dimension's weighting coefficient is set higher than the compatibility range overlap dimension's, ensuring that the core dimensions' influence is prioritized during matching calculations.

[0031] Step S1143: For the file format feature information of each subset of electronic files to be processed, extract feature parameters on each related dimension in the related dimension system to form a file format feature parameter vector; for the format adaptation feature information of each virtual print configuration template in the virtual print configuration template library, extract feature parameters on the corresponding related dimension in the related dimension system to form a template adaptation feature parameter vector.

[0032] Taking the document format subset as an example, the feature parameters extracted in the format type matching dimension are the encoded values ​​corresponding to the document format identifiers. The feature parameters extracted in the structural feature compatibility dimension include the number of chapter levels and the average paragraph length. The feature parameters extracted in the compatibility range overlap dimension include the adapted resolution range and paper size type. These parameters are arranged in dimensional order to form a file format feature parameter vector. For standard document printing templates in the virtual printing configuration template library, the adapted document format identifier encoded values ​​are extracted in the format type matching dimension. The supported chapter level range and paragraph length range are extracted in the structural feature compatibility dimension. The supported resolution and paper size parameters are extracted in the compatibility range overlap dimension. These are also arranged in dimensional order to form a template adaptation feature parameter vector. The feature parameter vector construction process for other subsets and templates follows the same logic.

[0033] Step S1144: Calculate the matching degree between the file format feature parameter vector and each template adaptation feature parameter vector in each associated dimension, and standardize the matching degree in each associated dimension. Based on the standardized matching degree value and the weight coefficient of each associated dimension, calculate the weighted matching degree of each associated dimension, and sum the weighted matching degrees of each associated dimension to obtain the comprehensive matching degree.

[0034] When calculating the matching degree for each dimension, in the format type matching dimension, if the file format feature parameter vector matches the format type identifier encoding value in the template adaptation feature parameter vector, the matching degree for this dimension is the highest; otherwise, it is the lowest. In the structural feature compatibility dimension, the matching degree is determined by comparing the degree of overlap between the file's structural feature parameters and the template's adaptation structural feature parameters. For example, if the number of chapter levels in the file is within the range supported by the template, the matching degree is high; otherwise, it is low. In the compatibility range overlap dimension, the matching degree is determined based on the overlap range of the adapted resolutions and paper sizes. Then, the matching degrees for each dimension are standardized, converting different levels of matching degree into standardized values ​​within a uniform range. Next, the standardized matching degree values ​​for each dimension are multiplied by their corresponding weight coefficients to obtain the weighted matching degree for each dimension. Finally, the weighted matching degrees for the three dimensions are summed to obtain the comprehensive matching degree between the file format feature parameter vector and the template adaptation feature parameter vector.

[0035] Step S1145: Set a comprehensive matching degree threshold, filter out virtual print configuration templates with a comprehensive matching degree higher than the comprehensive matching degree threshold, and determine the above virtual print configuration templates as virtual print configuration templates that are initially matched with the subset of electronic documents to be processed.

[0036] The overall matching threshold is set based on the virtual printing quality requirements of the enterprise's administrative department. This threshold must ensure that the selected templates can meet the basic virtual printing effect. For example, the overall matching threshold is set to a fixed level. The overall matching degree calculated for each template in the document format subset is compared with this threshold. Standard document printing templates and long document pagination printing templates with an overall matching degree higher than this threshold are identified as virtual printing configuration templates that initially match the document format subset. Similarly, for the table format subset, data-intensive table templates with an overall matching degree higher than the threshold are selected as initial matching templates.

[0037] Step S1146: If the number of initially matched virtual print configuration templates exceeds the preset limit, sort them from high to low according to the overall matching degree, and select the preset number of virtual print configuration templates that are ranked first as the final initially matched virtual print configuration templates.

[0038] The preset upper limit is set based on actual processing efficiency and needs. For example, the maximum number of templates initially matched for each subset is set to 3. If the number of initially matched templates selected from the document format subset is 5, exceeding the preset upper limit, these 5 templates are sorted from high to low based on their overall matching degree, and the top 3 templates are selected as the final initial matching virtual printing configuration templates for that subset, in order to avoid reducing efficiency due to too many templates being selected in subsequent processing.

[0039] Step S115: Based on the number and characteristics of the electronic files to be processed in each subset of electronic files to be processed, assign a corresponding preliminary matching virtual print configuration template to each electronic file to be processed, and summarize all the assigned virtual print configuration templates to form an initial virtual print configuration template set corresponding to the set of electronic files to be processed.

[0040] For each subset of electronic files to be processed, such as a document format subset containing 10 files (5 regular-length work reports, 3 very long annual summary reports, and 2 promotional documents with numerous images), a standard document printing template is assigned to the regular-length work reports, a long document pagination printing template is assigned to the very long annual summary reports, and a mixed text and image document printing template is assigned to the promotional documents with numerous images (this template is selected from the initial matching templates). Similarly, corresponding initial matching templates are assigned to files with different characteristics within the table format subset; for example, a data-intensive table template is assigned to financial statements with large amounts of data, and a concise table template is assigned to attendance sheets with simple data. All virtual print configuration templates assigned to individual electronic files are then aggregated to form an initial virtual print configuration template set corresponding to the entire subset of electronic files to be processed.

[0041] Step S120: Establish a dynamic element mapping relationship set between the file elements of each electronic file to be processed in the set of electronic files to be processed and the template elements of the corresponding initial virtual print configuration template in the set of initial virtual print configuration templates. The file element includes the content unit, format unit and attribute unit of the electronic file. The template element includes the parameter unit, layout unit and output unit of the initial virtual print configuration template. The dynamic element mapping relationship set can adjust the mapping rules in real time according to the characteristics of the file elements.

[0042] In the application scenario of enterprise administrative departments, taking the electronic file to be processed, "2024 Q3 Sales Report," as an example, its corresponding initial virtual print configuration template is the standard document print template. First, the electronic file is parsed to extract content units (such as sales data paragraphs, market analysis sections, etc.), format units (such as font settings, paragraph spacing, etc.), and attribute units (such as file creation time, author information, etc.). Simultaneously, the standard document print template is parsed to extract template elements, extracting parameter units (such as print resolution parameters, font size parameters, etc.), layout units (such as page margin settings, content partition layout, etc.), and output units (such as output format type, storage path parameters, etc.). Then, a feature association model is constructed to calculate the correlation between file elements and template elements. Based on the correlation, initial mapping rules are formulated, and dynamic adjustment clauses are added, ultimately forming the element mapping relationship between the electronic file and the corresponding template. Following the same process, a mapping relationship is established between each file in the set of electronic files to be processed and its corresponding template, and the results are aggregated to form a dynamic element mapping relationship set.

[0043] Step S121: Perform deep analysis of file elements for each electronic file to be processed, and extract detailed features of the content unit, format unit and attribute unit of the electronic file to be processed. The detailed features of the content unit include content type, content structure and content relationship. The detailed features of the format unit include format parameters, format constraints and format adaptation requirements. The detailed features of the attribute unit include attribute parameters, attribute association rules and attribute scope.

[0044] Taking a "Monthly Expense Details" table format as an example, during in-depth analysis of file elements, the extracted content types include numerical data (such as the amount of each expense), text data (such as the name of the expense item), and date data (such as the date the expense occurred). The content structure is reflected in the row and column distribution of the table, such as the first row being the header, rows 2 to 20 being the specific expense data, and columns 1 to 5 being the expense item, date of occurrence, amount, department, and remarks, respectively. Content relationships include the summation relationship of amounts for different dates under the same expense item, and the attribution relationship between expenses of each department and the total expense. Regarding formatting, format parameters include the header font size, data cell font type, column width, and row height settings. Format constraints include requiring numerical data to retain two decimal places and requiring date data to use a specified format. Format adaptation requirements include ensuring that table borders are fully displayed during virtual printing and that data does not exceed the cell range. For attribute units, attribute parameters include file size, modification time, and storage format version; attribute association rules include that the modification time must be later than the creation time and the file size must not exceed a preset limit; the scope of the attribute covers the entire electronic file and is used to identify the file's basic attribute information. For "quarterly work report" files in presentation format, the detailed features of content units include the content type of slide pages (title pages, data chart pages, text description pages, etc.), the logical order structure between pages, and the relationship between charts and text; the detailed feature extraction of format units and attribute units follows the same principle.

[0045] Step S122: Perform deep analysis of template elements for each initial virtual print configuration template, and extract detailed features of the parameter units, layout units and output units of the initial virtual print configuration template. The detailed features of the parameter units include parameter type, parameter value range and parameter association relationship. The detailed features of the layout units include layout structure, layout constraints and layout adaptation requirements. The detailed features of the output units include output parameters, output association rules and output scope.

[0046] Taking the initial virtual print configuration template, a data-intensive table template, as an example, in-depth analysis of template elements reveals the following: Regarding parameter units, parameter types include print resolution parameters, font size parameters, and row height / column width adjustment parameters; parameter value ranges include the selectable range of resolution, the selectable interval of font size, and the upper and lower limits of row height / column width adjustment; parameter relationships include the need to adjust the font size accordingly to ensure clear display when the resolution is increased, and the need to maintain coordination between adjacent column widths when adjusting column width. Regarding layout units, layout structures include the table's position on the page (e.g., center alignment), page margin settings (specific requirements for top, bottom, left, and right page margins), and the setting for repeating the table header when printing across multiple pages; layout constraints include that the table width must not exceed the page width, and data rows must not be split across pages; layout adaptation requirements include adapting to tables with different data volumes, and automatically enabling pagination when the data volume is large. For the output unit, output parameters include the output file format (such as PDF, image format, etc.), the compression rate of the output file, and the storage path; output association rules include enabling encryption when the output format is PDF, and the storage path must include a date identifier; the output scope applies to the virtual print preview file generated by this template and the final output file, ensuring the effective application of output parameters. For widescreen presentation templates corresponding to presentation formats, detailed features of the parameter unit include slide page ratio parameters, animation effect rendering parameters, etc.; the detailed feature extraction of the layout unit and output unit follows the same logic.

[0047] Step S123: Construct a feature association model between file elements and template elements. Input the detailed features of the file elements and the detailed features of the template elements into the feature association model, and calculate the feature association degree between different file elements and template elements.

[0048] When constructing the feature association model, a deep learning network architecture is adopted, which includes an input layer, hidden layers, and an output layer. The input layer receives detailed feature data from both file elements and template elements. The hidden layer contains multiple neurons that perform feature extraction and dimensionality transformation on the input features through operations such as convolution and pooling. Convolutional layers extract local correlation information between features, while pooling layers reduce feature dimensionality and retain key features. The output layer uses a fully connected structure to output the feature association degree between different file elements and template elements. Taking the format unit of a "Monthly Expense Details" table file and the parameter unit of a data-intensive table template as an example, the detailed features of the format unit (such as font size and column width settings) and the detailed features of the parameter unit (such as parameter value range and parameter relationships) are input into the feature association model. The model analyzes the matching degree between the two in terms of parameter type, value range, etc., through the processing of the hidden layer, and finally outputs the feature association degree between them. Similarly, the detailed features of content units and layout units, and attribute units and output units are input into the model to calculate the corresponding feature association degree. For example, detailed features such as row and column distribution and data type in the content units of the "Monthly Expense Details" spreadsheet file, along with detailed features such as page position and margin settings in the layout units of the data-intensive spreadsheet template, are input into the model. The model extracts the correlation features between the row and column structure of the content units and the page space allocation of the layout units through convolution operations in the hidden layers. After the feature dimensions are simplified by the pooling layer, the output layer outputs the feature correlation degree between the two. For attribute units and output units, attribute parameters such as file size and modification time of the "Monthly Expense Details" spreadsheet, along with output parameters such as output format and compression rate of the template output unit, are input into the model. The model analyzes the constraint relationship between the attribute parameters and the output parameters, and then calculates the feature correlation degree between the two.

[0049] Step S1231: Determine the feature association dimensions between file elements and template elements. These feature association dimensions include data type consistency dimension, functional adaptability dimension, parameter range compatibility dimension, and association rule matching dimension.

[0050] In scenarios where corporate administrative departments handle office documents, determining the feature association dimensions requires considering the actual functions and interaction requirements of document elements and template elements. The data type consistency dimension determines whether the data types contained in document elements and template elements match. For example, numerical expense data in the "Monthly Expense Details" content unit must be consistent with the data type of the area used to carry numerical data in the data-intensive table template layout unit. The functional adaptability dimension focuses on whether the functions of document elements and template elements are compatible. For example, the font adjustment function in the document format unit must be compatible with the font parameter setting function in the template parameter unit. The parameter range compatibility dimension examines whether the parameter values ​​of document elements are within the parameter support range of template elements. For example, the font size set in the document format unit must be within the selectable font size range specified by the template parameter unit. The association rule matching dimension analyzes whether the association rules of document elements and template elements are coordinated. For example, the rule "modification time is later than creation time" in the document attribute unit must match the rule "output file timestamp is based on modification time" in the template output unit.

[0051] Step S1232: Construct a corresponding feature similarity calculation function for each feature association dimension. The function for the data type consistency dimension calculates similarity based on data type matching rules. The function for the functional adaptability dimension calculates similarity based on functional requirement matching rules. The function for the parameter range compatibility dimension calculates similarity based on parameter range overlap rules. The function for the association rule matching dimension calculates similarity based on rule logic matching rules.

[0052] The feature similarity calculation function for the data type consistency dimension first pre-defines data type matching rules, clarifying the matching level between different data types (e.g., numeric, text, date). For example, identical data types are considered a complete match, compatible data types (e.g., integer and decimal) are considered a partial match, and incompatible data types are considered a no match. The function compares the data types of file elements and template elements and outputs the corresponding similarity value based on the matching level. The feature similarity calculation function for the functional adaptability dimension, based on functional requirement matching rules, compares the functional requirements of file elements (e.g., formatting adjustments, content layout) with the functional capabilities provided by template elements. If the template element fully meets the functional requirements of the file element, the similarity is highest; if it partially meets them, the corresponding similarity is output according to the degree of satisfaction. The function for the parameter range compatibility dimension, based on parameter range overlap rules, calculates the overlap ratio between the parameter value range of file elements and the parameter supported range of template elements. The higher the overlap ratio, the higher the similarity. The function for the association rule matching dimension, based on rule logic matching rules, analyzes the logical relationship between two rules (e.g., consistency, inclusion, conflict). Logical consistency results in the highest similarity, inclusion in the second highest, and conflict in the lowest.

[0053] Step S1233: Extract the feature values ​​corresponding to each feature association dimension from the detailed features of the file elements to form a file element feature matrix; extract the feature values ​​corresponding to each feature association dimension from the detailed features of the template elements to form a template element feature matrix.

[0054] Taking the content units of the "Quarterly Work Report" presentation file and the layout units of the widescreen presentation template as examples, feature values ​​corresponding to the feature association dimensions are extracted from the detailed features of the content units: the data type consistency dimension corresponds to the data type in the content unit (such as text-based titles, numerical data in charts), the functional adaptability dimension corresponds to the layout requirements of the content unit (such as column display, mixed text and images), the parameter range compatibility dimension corresponds to the size parameters of the content unit (such as chart width, text box height), and the association rule matching dimension corresponds to the page jump rules of the content unit. These feature values ​​are then arranged in dimensional order to form a file element feature matrix. Simultaneously, corresponding feature values ​​are extracted from the detailed features of the layout units of the widescreen presentation template: the data type consistency dimension corresponds to the regional data type restrictions of the layout unit, the functional adaptability dimension corresponds to the layout support capabilities of the layout unit, the parameter range compatibility dimension corresponds to the size support range of the layout unit, and the association rule matching dimension corresponds to the page switching rules of the layout unit. These are also arranged in dimensional order to form a template element feature matrix.

[0055] Step S1234: Input the two feature matrices into the feature similarity calculation function corresponding to each dimension to obtain the dimensional similarity of each feature-related dimension.

[0056] The feature matrix of the file elements in the "Quarterly Work Report" content unit and the feature matrix of the template elements in the widescreen presentation template layout unit are input into the similarity calculation functions for four feature association dimensions. In the data type consistency dimension, the function compares the data type of the content unit with the regional data type restrictions of the layout unit, outputting the dimension similarity. In the functional adaptability dimension, the function compares the layout requirements of the content unit with the layout support capabilities of the layout unit, outputting the corresponding dimension similarity. The parameter range compatibility dimension and the association rule matching dimension follow the same logic, each yielding its own dimension similarity, ultimately forming a set of dimension similarities for all four dimensions.

[0057] Step S1235: Set association weights for each feature association dimension. The association weights are determined based on the degree of influence of each dimension on the element mapping effect. The association weight of the data type consistency dimension is higher than that of the function adaptability dimension, the association weight of the function adaptability dimension is higher than that of the parameter range compatibility dimension, and the association weight of the parameter range compatibility dimension is higher than that of the association rule matching dimension.

[0058] When setting association weights, the actual impact of each dimension on the mapping effect between file elements and template elements is considered. Data type consistency is the foundation of element mapping; if data types do not match, the content will not display correctly, therefore it has the highest association weight. Functional adaptability directly affects the implementation effect of element functions, so its weight is second. Parameter range compatibility affects the effective application of element parameters, so its weight is third. Association rule matching mainly affects the logical coordination between elements, and has a relatively small impact on the basic mapping effect, so its weight is the lowest. Through the above weight allocation, it is ensured that the influence of the core dimensions dominates when comprehensively calculating feature association.

[0059] Step S1236: Standardize the dimensional similarity of each feature association dimension, and calculate the feature association degree between different file elements and template elements by weighted summation based on the standardized similarity value and the corresponding association weight.

[0060] First, the dimensional similarity of the four feature association dimensions is standardized, converting similarity values ​​from different ranges into standardized values ​​within a unified interval, eliminating differences in units between dimensions. Then, the standardized similarity value of each dimension is multiplied by its corresponding association weight to obtain a weighted similarity value for each dimension. Finally, the weighted similarity values ​​of the four dimensions are summed to obtain the feature association degree between the file element and the template element. For example, the sum of the standardized similarity values ​​of the "Quarterly Work Report" content unit and the widescreen presentation template layout unit, multiplied by their respective weights, represents the feature association degree between the two.

[0061] Step S124: Formulate an initial mapping rule set based on the feature correlation degree. The initial mapping rule set includes the initial correspondence rules between content units and layout units, the initial correspondence rules between format units and parameter units, and the initial correspondence rules between attribute units and output units.

[0062] Based on the calculated feature correlation, file elements and template element combinations with correlation higher than a preset threshold are selected, and initial mapping rules are established for them. For content units and layout units, the initial mapping rules clearly define that different content types in the content unit (such as title, body text, and charts) correspond to specific areas in the layout unit (such as title bar, body text area, and chart area). For example, the title content in "Quarterly Work Report" corresponds to the title bar area of ​​the widescreen presentation template layout unit, and the chart content corresponds to the chart area of ​​the layout unit. The initial mapping rules for format units and parameter units stipulate that the format parameters of the format unit (such as font and font size) correspond to the parameter settings of the parameter unit. For example, the font settings of the file format unit correspond to the font selection parameters of the template parameter unit. The initial mapping rules for attribute units and output units clearly define that the attribute parameters of the attribute unit (such as file size and modification time) correspond to the output configuration items of the output unit. For example, the modification time of the file attribute unit corresponds to the output file timestamp configuration of the template output unit.

[0063] Step S125: Add a dynamic adjustment clause to the initial mapping rule set based on the dynamic change characteristics of file element features. The dynamic adjustment clause specifies how the corresponding mapping rule should be adjusted according to the magnitude of the change in the detailed features of the file element when the detailed features of the file element change.

[0064] The dynamic adjustment clauses must cover various scenarios where file elements may change. For example, when the number of data rows in a content unit of the "Monthly Expense Details" table increases (within 10%), the dynamic adjustment clauses stipulate maintaining the original mapping rules between content units and layout units, but automatically adjusting the row height parameter of the layout unit; if the increase in the number of data rows exceeds 10%, the mapping rules are adjusted to map content exceeding the page range to the next page area of ​​the layout unit. When the font size of a file format unit changes, if the change is within the allowable range, the dynamic adjustment clauses stipulate adjusting the font size parameter of the template parameter unit simultaneously; if the change exceeds the allowable range, a format adaptation check is triggered, and appropriate parameter units are re-matched and the mapping rules are adjusted. For changes in the file size of attribute units, if the change exceeds the default compression threshold of the template output unit, the dynamic adjustment clauses stipulate automatically increasing the compression rate of the output file to ensure that the output file meets storage requirements.

[0065] Step S126: According to the initial mapping rule set and dynamic adjustment clauses, associate and bind the file elements of each electronic file to be processed with the template elements of the corresponding initial virtual printing configuration template to generate a dynamic element mapping relationship set.

[0066] For each electronic file to be processed, its content units, format units, and attribute units are associated and bound to the layout units, parameter units, and output units of the corresponding initial virtual print configuration template, according to the corresponding rules in the initial mapping rule set. Simultaneously, dynamic adjustment clauses are associated and stored with each mapping rule. When the characteristics of file elements change, the mapping relationship can be automatically adjusted according to the clauses. For example, the file elements of the "Quarterly Work Report" are bound to the template elements of the widescreen presentation template according to the initial rules, and dynamic adjustment clauses are added to form the element mapping relationship of that file. The element mapping relationships of all electronic files to be processed are summarized to generate a dynamic element mapping relationship set.

[0067] Step S130: Load the file elements of each electronic file to be processed into the template elements of the corresponding initial virtual print configuration template according to the dynamic element mapping relationship set, adjust the fusion parameters of the file elements and template elements, and generate the initial virtual print preview file set.

[0068] In a corporate administrative setting, taking the "2024 Q3 Sales Report" document and its corresponding standard document printing template as an example, based on the rules in the dynamic element mapping relationship set, the content units (sales data paragraphs, market analysis chapters) of the document are loaded into the template's layout units (body area, analysis area), the format units (font, paragraph spacing) are loaded into the template's parameter units (font parameters, spacing parameters), and the attribute units (creation time, author) are loaded into the template's output units (timestamp configuration, remarks configuration). After loading, the fusion effect between the document elements and template elements is analyzed, and the fusion parameters (such as the content's position offset in the layout and the format parameter adaptation parameters) are adjusted to make the fusion more harmonious, ultimately generating the initial virtual print preview file of the document. All pending electronic files are processed in the same way, and the resulting collection forms the initial virtual print preview file set.

[0069] Step S131: Parse the dynamic element mapping relationship set to obtain the association details between the file element and the template element corresponding to each electronic file to be processed. The association details specify the template element identifier, loading position and initial fusion parameters corresponding to each file element.

[0070] When parsing the dynamic element mapping relationship set, a dedicated parsing module extracts the associated information to form the association details for each electronic file to be processed. Taking the "Monthly Expense Details" spreadsheet file as an example, its association details clearly state: the expense item names in the content unit correspond to column A of the data-intensive table template layout unit (template element identifier: TBL-COL-A), loaded at rows 1 to 20 of column A, with initial fusion parameters being alignment parameters (left alignment) and spacing parameters (default column spacing); the header font settings in the format unit correspond to the FONT-HEAD parameter item in the template parameter unit (template element identifier: PARA-FONT-01), loaded at the 3rd item in the parameter configuration area, with initial fusion parameters being font size adaptation parameters (12-point font base); the modification time in the attribute unit corresponds to the OUT-TIME parameter item in the template output unit (template element identifier: OUT-CFG-02), loaded at the time field in the output configuration area, with initial fusion parameters being time format matching parameters (YYYY-MM-DD format).

[0071] Step S132: Based on the template element identifier and loading position in the associated details, locate the target template element from the corresponding initial virtual printing configuration template and extract the parameter configuration baseline of the target template element.

[0072] Based on the template element identifier TBL-COL-A in the associated details of "Monthly Expense Details", locate the corresponding A column layout area (target template element) in the data-intensive table template, and extract the parameter configuration baseline of this element, including column width baseline, cell margin baseline, data alignment baseline (left alignment), etc.; based on the template element identifier PARA-FONT-01, locate the header font parameter item in the parameter cell, and extract its parameter configuration baseline, including font type baseline (SimSun), font size baseline (12 points), bold status baseline (enabled), etc.; based on the template element identifier OUT-CFG-02, locate the time parameter item in the output cell, and extract its parameter configuration baseline, including time format baseline (YYYY-MM-DD), display position baseline (file property bar), etc.

[0073] Step S133: Load the file elements of the electronic document to be processed into the target template element according to the loading position, and perform preliminary fusion processing using the initial fusion parameters to obtain the fusion intermediate.

[0074] The expense item names in the "Monthly Expense Details" content unit are loaded into the located layout area of ​​column A according to their loading positions (rows 1 to 20 in column A). Initial fusion is performed using the left alignment and default column spacing from the initial fusion parameters. The header font settings from the format unit are loaded into the FONT-HEAD parameter item and fused according to the 12-point font standard of the initial fusion parameters. The modification time from the attribute unit is loaded into the OUT-TIME parameter item and fused according to the time format of the initial fusion parameters. After each file element is fused with its corresponding target template element, a fusion intermediate containing content, format, and attribute fusion information is formed. This fusion intermediate retains the parameter settings and position information from the fusion process.

[0075] Step S134: Extract the fusion effect features of the fusion intermediate, which include content display coordination, format parameter matching and attribute association adaptation.

[0076] The fusion effect feature extraction module extracts features from the fusion intermediate. First, it analyzes the display effect of content units within the template layout, calculating the content display coordination degree to reflect the adaptation of content to the layout area. Then, it analyzes the matching degree between format units and template parameters, calculating the format parameter matching degree. Finally, it analyzes the association and adaptation between attribute units and output parameters, calculating the attribute association adaptation degree. These three indicators are then summarized to form the fusion effect features of the fusion intermediate.

[0077] Step S1341: Construct a fusion effect feature extraction framework, which includes a content display feature extraction submodule, a format parameter feature extraction submodule, and an attribute association feature extraction submodule.

[0078] The fusion effect feature extraction framework adopts a modular design, with three sub-modules responsible for feature extraction in different dimensions. The content display feature extraction sub-module focuses on analyzing the display effect after the fusion of content units and layout units; the format parameter feature extraction sub-module is responsible for analyzing the matching degree between format units and parameter units; and the attribute association feature extraction sub-module extracts the adaptation between attribute units and output units. The sub-modules interact with each other through data interfaces to ensure the synergy of the extraction process.

[0079] Step S1342: Start the content display feature extraction submodule, perform pixel-level feature analysis on the content units in the fusion intermediate, extract the display brightness distribution, color distribution and outline sharpness parameters of the content units, and calculate the content display coordination degree based on these parameters. This coordination degree reflects the visual coordination degree between the content units and the template element background.

[0080] After activating the content display feature extraction submodule, the submodule performs pixel-level scanning of the content units in the fusion intermediate, collecting the brightness value of each pixel to form display brightness distribution data (such as the pixel brightness distribution in the text area and the pixel brightness distribution in the title area); simultaneously, it collects the color values ​​of the pixels to generate color distribution data (such as the text color distribution and the background color distribution); and extracts the contour information of the content units through an edge detection algorithm, calculating contour sharpness parameters (such as text edge sharpness and chart contour completeness). Based on these parameters, the content display coordination degree is calculated: if the brightness difference and color difference between the content and the background are within a reasonable range and the contour is clear, the coordination degree is high; otherwise, the coordination degree is low. For example, when the content text is black and the background is white, the brightness difference is reasonable, and the coordination degree is correspondingly improved.

[0081] Step S1343: Start the format parameter feature extraction submodule, perform parameter-level feature analysis on the format units in the fusion intermediate, extract the font parameters, spacing parameters and page size parameters of the format units, compare the above parameters with the format baseline parameters of the template elements, and calculate the format parameter matching degree. This matching degree reflects the degree of matching between the format units and the format requirements of the template elements.

[0082] After activating the format parameter feature extraction submodule, the submodule extracts font parameters (font type, font size, bold status), spacing parameters (paragraph spacing, line spacing, character spacing), and page size parameters (page width, height, margins) from the format units of the fusion intermediate. These parameters are then compared one by one with the format baseline parameters of the target template element: if the font type matches the baseline, the font size is within the baseline's allowable range, the spacing parameters deviate little from the baseline, and the page size parameters meet the baseline requirements, the format parameter matching degree is high; if any parameters exceed the baseline range or are inconsistent, the matching degree decreases. For example, if the template baseline font is SimSun, but the format unit font is Heiti, the matching degree of that parameter item decreases, thus affecting the overall format parameter matching degree.

[0083] Step S1344: Start the attribute association feature extraction submodule, perform association-level feature analysis on the attribute units in the fusion intermediate, extract the associated objects, association rules and association effect parameters of the attribute units, compare the above parameters with the attribute association benchmark parameters of the template elements, and calculate the attribute association fit degree. This fit degree reflects the degree of fit between the attribute units and the attribute requirements of the template elements.

[0084] After starting the attribute association feature extraction submodule, the submodule extracts associated objects (such as the output time field associated with modification time, and compression configuration associated with file size), association rules (such as the need to synchronize modification time to output file attributes, and the need to start compression when the file size exceeds a threshold), and association effect parameters (such as the update delay of associated fields, and the deviation between the compressed file size and the threshold) from the attribute unit. These parameters are compared with the attribute association baseline parameters of the template element: if the associated objects are consistent with the baseline, the association rules conform to the baseline logic, and the association effect parameters are within the baseline range, the attribute association fit is high; otherwise, the fit is reduced. For example, if the template baseline requires the modification time format to be YYYY-MM-DD, while the time format in the attribute unit association rule is MM-DD-YYYY, the fit is correspondingly reduced.

[0085] Step S1345: Summarize the content display coordination, the format parameter matching, and the attribute association adaptability to form the fusion effect characteristics of the fusion intermediate.

[0086] The content display coordination, format parameter matching, and attribute association adaptation scores, extracted and calculated through three sub-modules, are integrated in a preset order to form a fusion effect feature vector for the fusion intermediate. In this feature vector, the three indicators occupy different dimensions, collectively reflecting the overall fusion effect of the file elements and template elements. For example, in the fusion effect feature vector of the "Monthly Fee Details" fusion intermediate, content display coordination corresponds to the first dimension value, format parameter matching corresponds to the second dimension value, and attribute association adaptation corresponds to the third dimension value. This vector visually presents the performance of each dimension of the fusion effect.

[0087] Step S135: Compare the fusion effect feature with the preset fusion effect benchmark, determine the deviation direction and deviation magnitude of the current fusion parameters from the benchmark parameters in the preset fusion effect benchmark, adjust the fusion parameters according to the deviation direction and deviation magnitude, and obtain the optimized fusion parameters.

[0088] The preset fusion effect benchmark is set based on the virtual printing quality standards of the enterprise's administrative department, including benchmark values ​​for content display coordination, format parameter matching, and attribute association adaptation. The fusion effect characteristics of the "Monthly Expense Details" fusion intermediate are compared item by item with this benchmark: if the content display coordination is lower than the benchmark value, the deviation direction is determined as "insufficient coordination," and the deviation magnitude is the percentage difference between the benchmark value and the current value; if the format parameter matching is lower than the benchmark value, the deviation direction is "insufficient matching," and the deviation magnitude is the percentage difference between the benchmark value and the current value; if the attribute association adaptation does not meet the benchmark requirements, the deviation direction is "adaptability deviation," and the deviation magnitude is the percentage of discrepancies between the benchmark rules and the current rules. Based on the deviation direction, for cases of insufficient coordination, the content loading position offset parameters and background contrast parameters are adjusted; for cases of insufficient matching, the font size adaptation parameters and spacing compensation parameters are adjusted; for cases of adaptation deviation, the attribute mapping rule adaptation parameters and format conversion parameters are adjusted. Through multiple fine-tuning steps, the fusion effect characteristics corresponding to the adjusted fusion parameters are brought close to or meet the benchmark requirements, resulting in optimized fusion parameters.

[0089] Step S136: Use the optimized fusion parameters to perform a secondary fusion process on the fusion intermediate to generate an initial virtual print preview file.

[0090] The optimized fusion parameters are applied to the fusion intermediate of the "Monthly Expense Details" for secondary fusion. For example, the loading position of the expense item name in the layout area of ​​column A is corrected according to the adjusted position offset parameters to ensure that the content is completely within the cell range; the font size of the table header is adjusted according to the font size adaptation parameters to better match the template parameter baseline; and the format of the modification time is corrected according to the rule adaptation parameters to meet the baseline requirements of the output cell. During the secondary fusion process, the fusion effect of each dimension is monitored in real time to ensure that the optimized fusion parameters play an effective role. After the fusion is completed, an initial virtual print preview file containing complete content, format, and attribute information is generated. This initial virtual print preview file can be displayed through the office system preview window to present the preliminary effect after virtual printing.

[0091] Step S137: Summarize the initial virtual print preview files corresponding to all electronic files to be processed to form an initial virtual print preview file set.

[0092] For all pending electronic files, such as the "2024 Q3 Sales Report" and "Quarterly Work Report," the above-described loading, merging, parameter adjustment, and preview file generation process was executed one by one to obtain an initial virtual print preview file for each file. These preview files were then stored according to their file format; for example, document format preview files were stored in the "Document Virtual Print Preview" directory, and table format preview files were stored in the "Table Virtual Print Preview" directory. Each preview file was also labeled with identification information corresponding to its source electronic file for easy traceability later. Finally, a set of initial virtual print preview files covering all pending electronic files was compiled.

[0093] Step S140: Perform multiple rounds of fusion effect optimization on each initial virtual print preview file in the initial virtual print preview file set, adjust the display adaptability of content units, the parameter matching degree of format units, and the correlation adaptability of attribute units to obtain an optimized virtual print preview file set.

[0094] In enterprise administrative settings, a multi-round optimization strategy was developed for each file in the initial virtual print preview file set. Taking the initial preview file of "2024 Q3 Sales Report" as an example, the first round of optimization focused on adjusting the display adaptability of content units in the page layout, resolving the issue of some paragraphs exceeding the page boundaries; the second round of optimization focused on the parameter matching of format units, correcting the layout crowding problem caused by the mismatch between font size and line spacing; the third round of optimization addressed the correlation adaptability of attribute units, adjusting the display position of the file author information in the output configuration. Through multiple rounds of iterative optimization, the adaptability of each dimension of the preview file met the quality requirements. All initial preview files were optimized in this manner, and the results were then compiled into an optimized virtual print preview file set.

[0095] Step S141: Set the iteration optimization round and the target threshold for each round of optimization for each initial virtual print preview file in the initial virtual print preview file set. The target threshold for each round of optimization includes the content display adaptation threshold, the format parameter matching threshold, and the attribute association adaptation threshold.

[0096] Based on the type and importance of the electronic documents to be processed, an iterative optimization round and target threshold are set for each initial virtual print preview file. For example, "Monthly Expense Details," as a key financial document, is set to have 5 rounds of iterative optimization. In each round, the target thresholds are set as follows: content display fit threshold is set to be 90% higher than the baseline value, format parameter matching threshold is set to be 95% higher than the baseline value, and attribute association fit threshold is set to meet the baseline rules by 100%. For the "Quarterly Work Report" presentation file, an iterative optimization round of 4 rounds is set, with the content display fit threshold set to be 85% higher than the baseline value, the format parameter matching threshold set to be 90% higher than the baseline value, and the attribute association fit threshold set to meet the baseline rules by 95%. The target thresholds gradually increase with each iteration round; for example, the content display fit threshold is 70% in the first round, increasing to 80% in the second round, until the final threshold is reached.

[0097] Step S142: Perform the first round of optimization on the first initial virtual print preview file: extract the display features of the content units in the initial virtual print preview file, and adjust the display parameters of the content units according to the content display adaptability threshold to improve the display adaptability of the content units; extract the parameter features of the format units in the initial virtual print preview file, and adjust the parameter configuration of the format units according to the format parameter matching threshold to improve the parameter matching degree of the format units; extract the association features of the attribute units in the initial virtual print preview file, and adjust the association rules of the attribute units according to the attribute association adaptability threshold to improve the association adaptability of the attribute units, thus obtaining the virtual print preview file after the first round of optimization.

[0098] Taking the first file in the initial virtual print preview file set, "2024 Q3 Sales Report," as an example, the first round of optimization was performed. First, the display characteristics of the content units in this file were extracted, including paragraph position distribution, text-image overlap, and the number of paragraphs overflowing the page boundaries. These characteristics were compared with the first-round content display fit threshold (70%), revealing that three paragraphs exceeded the right edge of the page, failing to meet the fit standard. The display parameters of the content units were adjusted, including reducing paragraph indentation and adjusting image sizes to fit the page width, ensuring the content was fully within the page area and improving display fit. Subsequently, the parameter characteristics of the format units were extracted, including font type consistency, line spacing uniformity, and header / footer position accuracy. These were compared with the first-round format parameter matching threshold (75%), revealing inconsistent line spacing in some paragraphs. The parameter configuration of the format units was adjusted to unify the line spacing throughout the document and correct header / footer position deviations. Next, the association features of the attribute units are extracted, including the accuracy of the mapping between author information and output fields, and the correctness of the file creation time format. These are compared with the first round of attribute association fit threshold (80%). It was found that the creation time format did not meet the output requirements, so the association rules of the attribute units were adjusted, and the time format was converted to meet the requirements. After all adjustments were completed, the first round of optimized virtual print preview file was generated.

[0099] Step S143: Determine whether the virtual print preview file after the first round of optimization has reached the target threshold of each round of optimization. If not, determine the optimization dimensions that have not reached the target threshold of each round of optimization based on the characteristics of the virtual print preview file after the previous round of optimization. Increase the parameter adjustment range for the optimization dimensions that have not reached the target threshold of each round of optimization, while keeping the parameters of the optimization dimensions that have reached the target threshold of each round of optimization stable, and obtain the virtual print preview file after the next round of optimization.

[0100] Comparing the features of the preview file after the first round of optimization of the "2024 Q3 Sales Report" with all target thresholds from the first round, it was found that content display adaptation (78%) and attribute association adaptation (82%) had reached the thresholds, but format parameter matching (72%) had not reached the 75% threshold. The optimization dimension that did not reach the threshold was determined to be format parameter matching, while the dimensions that reached the thresholds were content display adaptation and attribute association adaptation. For the format parameter matching dimension, analyzing the problems in the previous round of adjustments revealed that after unifying line spacing, the font size contrast between some titles and body text was insufficient, resulting in a failure to meet the matching standard. The parameter adjustment range for this dimension was increased; while maintaining stable line spacing, the size difference between the title font and body text font was increased, and the bolding level of the titles was adjusted. For the content display adaptation and attribute association adaptation dimensions that had reached the thresholds, their corresponding parameters were locked, keeping their values ​​unchanged. The adjusted parameters were then used to generate the virtual print preview file after the second round of optimization.

[0101] Step S1431: Extract the feature data of the virtual print preview file after the previous round of optimization. The feature data includes content display adaptation data, format parameter matching data, and attribute association adaptation data.

[0102] Using the optimized "2024 Q3 Sales Report" preview file as an example, feature data was extracted using the feature extraction module. Content display adaptation data included metrics such as page content coverage, text and image layout coordination, and content overflow rate; format parameter matching data included metrics such as font parameter compliance rate, spacing parameter consistency rate, and header / footer position accuracy; attribute association adaptation data included metrics such as attribute field mapping accuracy, association rule compliance rate, and format conversion success rate. These metrics were then organized by dimension to form a complete feature dataset.

[0103] Step S1432: Compare the content display adaptation data in the feature data with the corresponding content display adaptation threshold, compare the format parameter matching data in the feature data with the corresponding format parameter matching threshold, compare the attribute association adaptation data in the feature data with the corresponding attribute association adaptation threshold, determine the optimization dimensions that have not reached the target threshold of each round of optimization and mark them as dimensions to be strengthened for optimization, and mark the optimization dimensions that have reached the target threshold of each round of optimization as stable dimensions.

[0104] The extracted feature data is compared item by item with the target thresholds of the second round of optimization (content display adaptability 80%, format parameter matching 85%, attribute association adaptability 85%). If the content display adaptability data shows an in-page content coverage rate of 82%, a text and image layout coordination rate of 81%, and a content overflow rate of 0%, the overall calculated content display adaptability is 81%, which is higher than the threshold of 80%, and is marked as a stable dimension. If the format parameter matching data shows a font parameter compliance rate of 80%, a spacing parameter uniformity rate of 83%, and a header and footer position accuracy rate of 82%, the overall format parameter matching is 82%, which is lower than the threshold of 85%, and is marked as a dimension that needs to be strengthened and optimized. If the attribute association adaptability data shows an attribute field mapping accuracy rate of 86%, an association rule compliance rate of 87%, and a format conversion success rate of 85%, the overall attribute association adaptability is 86%, which is higher than the threshold of 85%, and is marked as a stable dimension.

[0105] Step S1433: For the dimension to be strengthened and optimized, analyze the correlation between the magnitude of parameter adjustment and the improvement of effect in the previous round of optimization. If the improvement of effect after the previous round of parameter adjustment is lower than the preset improvement threshold, then the magnitude of parameter adjustment will be increased by the preset ratio in this round. If the deviation of the parameter adjustment direction in the previous round causes the effect to fail to reach the target threshold of each round of optimization, correct the parameter adjustment direction and maintain the adjustment magnitude.

[0106] Regarding the format parameter matching accuracy marked as an area for improvement, we analyzed the parameter adjustments from the previous round (second round): The previous round adjusted the difference in font size between the heading and body text, resulting in a 10% improvement (from 72% to 82%). The preset improvement threshold was 8%, and the current improvement exceeds the threshold, so no further increase in adjustment is needed, but parameter details require continued optimization. Further analysis revealed that the low font parameter compliance rate was due to some English paragraphs not matching the template's required font. This issue was not addressed in the previous round of adjustments and was not due to a deviation in adjustment direction. Therefore, we maintained the original adjustment range and added a parameter adjustment item for English paragraph font matching.

[0107] Step S1434: Based on the adjusted parameter adjustment range or direction, adjust the parameters corresponding to the dimension to be strengthened and optimized. Adjust the display brightness, color saturation, or outline clarity parameters of the content unit to optimize the display adaptability of the content unit. Adjust the font size, paragraph spacing, or page margin parameters of the format unit to optimize the parameter matching degree of the format unit. Adjust the priority of the associated object or the associated trigger condition parameters of the attribute unit to optimize the association adaptability of the attribute unit.

[0108] Regarding the format parameter matching dimension, the font parameters of the format unit were adjusted to uniformly convert the font of all English paragraphs to the English font required by the template; at the same time, paragraph spacing was fine-tuned to ensure consistent spacing between body paragraphs, and the vertical position deviation of headers and footers was corrected. For the stability dimensions of content display adaptation and attribute association adaptation, their corresponding parameters were not adjusted to ensure stable results.

[0109] Step S1435: Lock the parameters corresponding to the stable dimension to keep the values ​​of the parameters corresponding to the stable dimension unchanged after the previous round of optimization.

[0110] The parameter locking module locks parameters corresponding to the content display adaptation and attribute association adaptation dimensions. For example, it locks paragraph indentation and image size parameters for content units to ensure that the content display effect remains unchanged; it locks time format conversion parameters and author information mapping parameters for attribute units to maintain stable attribute association adaptation. Locked parameters cannot be modified in subsequent optimization rounds until the optimization process ends or an unlock command is triggered.

[0111] Step S1436: Apply the adjusted parameters corresponding to the dimension to be enhanced and optimized, and the parameters corresponding to the locked stable dimension, to the virtual print preview file after the previous round of optimization to generate the virtual print preview file after the next round of optimization.

[0112] The adjusted formatting parameters (English paragraph font, paragraph spacing, header and footer position) were combined with the locked content display parameters and attribute association parameters and applied to the second-round optimized "2024 Q3 Sales Report" preview file. A merge adjustment operation was then performed to generate the third-round optimized virtual print preview file. In this virtual print preview file, the matching degree of formatting parameters was further improved, while the effect of the stability dimension remained unchanged.

[0113] Step S144: Repeat the above optimization process until the initial virtual print preview file reaches the target threshold of each round of optimization or reaches the set number of iterations. The final preview file is then determined as the optimized virtual print preview file corresponding to the initial virtual print preview file.

[0114] The preview file of the "2024 Q3 Sales Report" will continue to undergo the fourth and fifth rounds of optimization: In the fourth round of optimization, the format parameter matching degree reached 86% (exceeding the 85% threshold), and all dimensions met the standards, so there is no need to proceed to the fifth round. The preview file optimized in the fourth round will be designated as the optimized virtual print preview file corresponding to the initial virtual print preview file. If any dimensions still fail to meet the standards at the end of the set iterative optimization rounds, the file optimized in the last round will be used as the optimization result, and the information of the dimensions that failed to meet the standards will be marked.

[0115] Step S145: Following the optimization process described above, perform multiple rounds of iterative optimization on each initial virtual print preview file in the initial virtual print preview file set to obtain optimized virtual print preview files corresponding to all initial virtual print preview files.

[0116] Following the optimization process outlined in the "2024 Q3 Sales Report," multiple rounds of iterative optimization were performed on each file in the initial virtual print preview file set, including "Monthly Expense Details" and "Quarterly Work Report." For example, after five rounds of optimization, the "Monthly Expense Details" file achieved the set thresholds for content display adaptation, format parameter matching, and attribute association adaptation; the "Quarterly Work Report" file met the standards after four rounds of optimization. All files were processed one by one to obtain their respective optimized virtual print preview files.

[0117] Step S146: Summarize all optimized virtual print preview files to form an optimized virtual print preview file set.

[0118] All optimized virtual print preview files are stored according to their original categories, with each file marked "Optimization Complete" and the optimization round number. For example, the optimized preview file for "Monthly Expense Details" is stored in the "Table-type Virtual Print Preview" directory, with the label "Optimization Round: 5, All Met"; the "Quarterly Work Report" is stored in the "Presentation-type Virtual Print Preview" directory, with the label "Optimization Round: 4, All Met". After aggregating all files, an optimized virtual print preview file set is formed, which can be used to generate executable virtual print commands later.

[0119] Step S150: Generate an executable virtual print instruction set for the set of electronic files to be processed based on the optimized virtual print preview file set. Each executable virtual print instruction in the set of executable virtual print instructions corresponds to an optimized virtual print preview file and contains the fusion parameter configuration information corresponding to the optimized virtual print preview file.

[0120] For example, in a corporate administrative setting, based on each file in the optimized virtual print preview file set, the corresponding source electronic file information, template information, and fusion parameter configuration information are extracted, and executable virtual print instructions are constructed according to a preset instruction format. For instance, for the optimized preview file of "Monthly Expense Details," the constructed instructions include the file identifier, the corresponding source table file path, the data-intensive table template identifier, and the optimized fusion parameters (such as column width adjustment parameters and font adaptation parameters). After all instructions are constructed, an executable virtual print instruction set is formed, which can be directly used to trigger virtual print operations.

[0121] Step S151: Parse the optimized virtual print preview file set to obtain the file identifier of each optimized virtual print preview file, the electronic file identifier to be processed corresponding to each optimized virtual print preview file, and the initial virtual print configuration template identifier corresponding to each optimized virtual print preview file.

[0122] The parsing module analyzes the optimized virtual print preview file set, extracting metadata information for each file. Taking the "2024 Q3 Sales Report" optimized preview file as an example, the extracted file identifier is "OPT-PREV-DOC-001," the corresponding electronic file identifier to be processed is "SOURCE-DOC-001" (i.e., the identifier of the source sales report document), and the corresponding initial virtual print configuration template identifier is "TEMPLATE-DOC-STD-001" (i.e., the identifier of the standard document print template). The same parsing operation is performed on all optimized preview files, and the resulting identifier mapping table is compiled.

[0123] Step S152: Extract all fusion parameter configuration information used in the generation process of each optimized virtual print preview file. This fusion parameter configuration information includes file element loading parameters, template element adaptation parameters, and iterative optimization parameters.

[0124] For the optimized preview file "OPT-PREV-DOC-001", the following fusion parameter configuration information was extracted during its generation process: File element loading parameters include the position offset of content unit loading, the priority parameters of format unit loading, and the mapping relationship parameters of attribute unit loading; template element adaptation parameters include the size adaptation parameters of layout units, the value range adjustment parameters of parameter units, and the format conversion parameters of output units; iterative optimization parameters include the parameter adjustment amount for each round of optimization, threshold comparison parameters, and stable dimension locking parameters. These parameters were then categorized to form a complete set of fusion parameter configuration information for this optimized preview file.

[0125] Step S153: Determine the instruction structure of each executable virtual printing instruction. The instruction structure includes an instruction header, execution object information, parameter configuration section, and instruction tail. The instruction header includes an instruction type identifier and instruction generation time. The execution object information includes an optimized virtual print preview file identifier, a pending electronic file identifier, and an initial virtual print configuration template identifier. The parameter configuration section includes fusion parameter configuration information. The instruction tail includes an instruction verification identifier.

[0126] The pre-defined executable virtual printing instruction structure adopts a standardized format design to ensure that the instructions can be accurately parsed and executed by the virtual printing system. The instruction header, as the starting part of the instruction, includes an instruction type identifier to distinguish the purpose of the instruction, such as "virtual printing execution instruction" or "parameter adjustment auxiliary instruction"; the instruction generation time uses a unified time format to record the specific moment the instruction was created. The execution object information section clearly identifies the specific object to which the instruction points. It locates the target preview file through the optimized virtual print preview file identifier, associates the source file through the pending electronic file identifier, and traces the template used through the initial virtual print configuration template identifier. The parameter configuration section is the core of the instruction, classifying parameters according to file element loading, template element adaptation, and iterative optimization, fully carrying all configuration information in the fusion process. The instruction verification identifier at the end of the instruction is used to verify the integrity of the instruction during transmission and storage, typically consisting of verification information generated by a specified algorithm.

[0127] Step S154: Based on the instruction structure, construct a corresponding executable virtual printing instruction for each optimized virtual print preview file, fill the instruction type identifier and instruction generation time into the instruction header, fill the optimized virtual print preview file identifier, the electronic file identifier to be processed, and the initial virtual print configuration template identifier into the execution object information, fill the fusion parameter configuration information into the parameter configuration section, and fill the generated instruction verification identifier into the instruction tail.

[0128] Taking the optimized virtual print preview file (identified as "OPT-PREV-DOC-001") corresponding to the "2024 Q3 Sales Report" as an example, when constructing the executable virtual print instruction, first, the instruction type identifier "virtual print execution instruction" and the current instruction generation time are filled in the instruction header; in the execution object information, "OPT-PREV-DOC-001", "SOURCE-DOC-001", and "TEMPLATE-DOC-STD-001" are filled in sequentially; the extracted file element loading parameters, template element adaptation parameters, and iterative optimization parameters are filled in the parameter configuration section in the order of classification to ensure that the parameters completely correspond to the generation process of the preview file; finally, the entire instruction content is calculated through a verification algorithm to generate an instruction verification identifier and fill it in the instruction tail. Following the same process, the corresponding executable virtual print instruction is constructed one by one for each optimized virtual print preview file.

[0129] Step S155: Perform instruction logic verification on the constructed executable virtual printing instructions, and summarize all constructed and logically correct executable virtual printing instructions to form an executable virtual printing instruction set for the set of electronic documents to be processed.

[0130] Instruction logic verification is performed through a dedicated verification module. Verification includes instruction structural integrity, field format correctness, and parameter logic consistency. Structural integrity verification checks whether the instruction contains the four required parts: instruction header, execution object information, parameter configuration section, and instruction tail. The absence of any one part indicates a logical error. Field format correctness verification checks whether each field conforms to the preset format, such as whether the instruction generation time format is correct and whether the identifier field conforms to the encoding rules. Parameter logic consistency verification verifies whether there are any contradictions in the parameters within the parameter configuration section, such as whether the file element loading position parameter matches the template layout size parameter. The executable virtual printing instructions that pass verification are then selected and aggregated to form a set of executable virtual printing instructions for the entire set of electronic files to be processed.

[0131] Step S156: Sort the set of executable virtual printing instructions according to the processing order of the electronic documents to be processed.

[0132] The processing order of pending electronic documents is set according to the workflow of the company's administrative department, usually determined by the document's receipt time, importance, or type priority. For example, financial documents (such as "Monthly Expense Details") are processed first, followed by report documents (such as "2024 Q3 Sales Report" or "Quarterly Work Report"). Based on this order, the order of instructions in the executable virtual printing instruction set is adjusted accordingly to ensure that the execution order of instructions is consistent with the document processing requirements, facilitating the virtual printing system to execute instructions sequentially and improving processing efficiency.

[0133] Based on the same inventive concept, please refer to Figure 2 The diagram shows a schematic block diagram of an electronic document processing system 100 based on virtual printing for performing the above-described inspection video stream processing method, provided in an embodiment of this application. The electronic document processing system 100 based on virtual printing may include a communication unit 110, a machine-readable storage medium 120, and a processor 130.

[0134] In this embodiment, both the machine-readable storage medium 120 and the processor 130 are located within the virtual printing-based electronic document processing system 100 and are separately configured. However, it should be understood that the machine-readable storage medium 120 may also be independent of the virtual printing-based electronic document processing system 100 and may be accessed by the processor 130 via a bus interface. Alternatively, the machine-readable storage medium 120 may also be integrated into the processor 130 and may communicate and interact with external systems via the communication unit 110.

[0135] The processor 130 is the control center of the virtual printing-based electronic document processing system 100. It connects various parts of the system via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the machine-readable storage medium 120 and calling data stored in the machine-readable storage medium 120, thereby providing overall monitoring of the system. Optionally, the processor 130 may include one or more processing cores; for example, the processor 130 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor. The machine-readable storage medium 120 stores machine-executable instructions for executing the scheme of this application, and the processor 130 executes the machine-executable instructions stored in the machine-readable storage medium 120 to implement the inspection video stream processing method provided in the aforementioned method embodiments.

[0136] It should be noted that, in order to simplify the description of the present invention and thus help to understand one or more embodiments of the invention, multiple features may sometimes be grouped into one embodiment, drawing or description thereof in the foregoing description of the embodiments of the present invention.

Claims

1. An electronic document processing method based on virtual printing, characterized in that, The method includes: Obtain a set of electronic files to be processed and an initial set of virtual print configuration templates corresponding to the set of electronic files to be processed. The set of electronic files to be processed contains multiple electronic files with different file formats, and the initial set of virtual print configuration templates contains virtual print parameter configuration information that is initially matched with each file format. A dynamic element mapping relationship set is established between the file elements of each electronic file to be processed in the set of electronic files to be processed and the template elements of the corresponding initial virtual print configuration template in the set of initial virtual print configuration templates. The file elements include the content unit, format unit and attribute unit of the electronic file. The template elements include the parameter unit, layout unit and output unit of the initial virtual print configuration template. The dynamic element mapping relationship set can adjust the mapping rules in real time according to the characteristics of the file elements. The file elements of each electronic file to be processed are loaded into the template elements of the corresponding initial virtual print configuration template according to the dynamic element mapping relationship set. The fusion parameters of the file elements and the template elements are adjusted to generate the initial virtual print preview file set. Multiple rounds of fusion effect optimization are performed on each initial virtual print preview file in the initial virtual print preview file set, adjusting the display adaptability of content units, the parameter matching degree of format units, and the correlation adaptability of attribute units to obtain an optimized virtual print preview file set. Based on the optimized virtual print preview file set, an executable virtual print instruction set is generated for the set of electronic files to be processed. Each executable virtual print instruction in the set of executable virtual print instructions corresponds to an optimized virtual print preview file and includes the fusion parameter configuration information corresponding to the optimized virtual print preview file. The step of establishing a dynamic element mapping relationship set between the file elements of each electronic file to be processed in the set of electronic files to be processed and the template elements of the corresponding initial virtual print configuration template in the set of initial virtual print configuration templates includes: For each electronic file to be processed, perform deep analysis of file elements to extract detailed features of the content unit, format unit and attribute unit of the electronic file to be processed. The detailed features of the content unit include content type, content structure and content relationship. The detailed features of the format unit include format parameters, format constraints and format adaptation requirements. The detailed features of the attribute unit include attribute parameters, attribute association rules and attribute scope. For each initial virtual print configuration template, perform deep analysis of template elements to extract detailed features of the parameter units, layout units, and output units of the initial virtual print configuration template. The detailed features of the parameter units include parameter type, parameter value range, and parameter association relationship. The detailed features of the layout units include layout structure, layout constraints, and layout adaptation requirements. The detailed features of the output units include output parameters, output association rules, and output scope. Construct a feature association model between file elements and template elements, input the detailed features of file elements and template elements into the feature association model, and calculate the feature association degree between different file elements and template elements; An initial mapping rule set is formulated based on the aforementioned feature correlation. The initial mapping rule set includes the initial correspondence rules between content units and layout units, the initial correspondence rules between format units and parameter units, and the initial correspondence rules between attribute units and output units. Based on the dynamic change characteristics of file element features, dynamic adjustment clauses are added to the initial mapping rule set. The dynamic adjustment clauses specify how the corresponding mapping rules should be adjusted according to the magnitude of the change in the detailed characteristics of the file element when the detailed characteristics of the file element change. According to the initial mapping rule set and dynamic adjustment clauses, the file elements of each electronic file to be processed are associated and bound with the template elements of the corresponding initial virtual printing configuration template to generate a dynamic element mapping relationship set.

2. The electronic document processing method based on virtual printing according to claim 1, characterized in that, The process of obtaining the set of electronic files to be processed and the set of initial virtual print configuration templates corresponding to the set of electronic files to be processed includes: The system receives external input requests for the transfer of electronic files to be processed, extracts a set of electronic files to be processed from the requests, extracts file format features for each electronic file in the set, and obtains file format feature information for each electronic file, including format type identifier, format structure features, and format compatibility range. Based on the file format feature information, a classification system for the electronic file formats to be processed is constructed, and the set of electronic files to be processed is divided into multiple subsets of electronic files to be processed, with each subset of electronic files to be processed corresponding to a file format type. Retrieve a preset virtual print configuration template library, which stores virtual print configuration templates corresponding to various file formats, and each virtual print configuration template is associated with format adaptation feature information; The file format feature information of each subset of electronic files to be processed is associated and matched with the format adaptation feature information of the virtual printing configuration templates in the virtual printing configuration template library, and the virtual printing configuration templates that initially match each subset of electronic files to be processed are selected. Based on the number and characteristics of the electronic files to be processed in each subset of electronic files to be processed, a corresponding preliminary matching virtual print configuration template is assigned to each electronic file to be processed. All assigned virtual print configuration templates are then aggregated to form an initial virtual print configuration template set corresponding to the set of electronic files to be processed.

3. The electronic document processing method based on virtual printing according to claim 2, characterized in that, The step of associating and matching the file format feature information of each subset of electronic files to be processed with the format adaptation feature information of virtual print configuration templates in the virtual print configuration template library, and filtering out virtual print configuration templates that initially match each subset of electronic files to be processed, includes: A correlation dimension system for file format features and template adaptation features is constructed, which includes format type matching dimension, structural feature compatibility dimension, and compatibility range overlap dimension. A weight coefficient is assigned to each correlation dimension in the correlation dimension system of the file format features and template adaptation features. The weight coefficient is determined based on the degree of influence of each correlation dimension in the correlation dimension system of the file format features and template adaptation features on the virtual printing effect. The weight coefficient of the format type matching dimension in the correlation dimension system of the file format features and template adaptation features is higher than the weight coefficient of the structural feature compatibility dimension in the correlation dimension system of the file format features and template adaptation features. The weight coefficient of the structural feature compatibility dimension in the correlation dimension system of the file format features and template adaptation features is higher than the weight coefficient of the compatibility range overlap dimension in the correlation dimension system of the file format features and template adaptation features. For the file format feature information of each subset of electronic files to be processed, feature parameters are extracted on each correlation dimension in the correlation dimension system between the file format features and template adaptation features to form a file format feature parameter vector; for the format adaptation feature information of each virtual print configuration template in the virtual print configuration template library, feature parameters are extracted on the corresponding correlation dimension in the correlation dimension system between the file format features and template adaptation features to form a template adaptation feature parameter vector. Calculate the matching degree between the file format feature parameter vector and each template adaptation feature parameter vector in each association dimension of the association dimension system of file format features and template adaptation features, and standardize the matching degree in each association dimension. Based on the standardized matching degree value and the weight coefficient of each association dimension in the association dimension system of file format features and template adaptation features, calculate the weighted matching degree of each association dimension, and sum the weighted matching degrees of each association dimension to obtain the comprehensive matching degree. Set a comprehensive matching degree threshold, filter out virtual print configuration templates with a comprehensive matching degree higher than the comprehensive matching degree threshold, and determine the virtual print configuration templates with a comprehensive matching degree higher than the comprehensive matching degree threshold as virtual print configuration templates that initially match the subset of electronic documents to be processed; If the number of initially matched virtual print configuration templates exceeds the preset limit, the templates are sorted from highest to lowest based on their overall matching degree, and the preset number of templates at the top of the sorted list are selected as the final initially matched virtual print configuration templates.

4. The electronic document processing method based on virtual printing according to claim 1, characterized in that, The construction of the feature association model between file elements and template elements involves inputting the detailed features of the file elements and the detailed features of the template elements into the feature association model, and calculating the feature association degree between different file elements and template elements, including: Determine the feature association dimensions between file elements and template elements. The feature association dimensions between file elements and template elements include data type consistency dimension, functional adaptability dimension, parameter range compatibility dimension, and association rule matching dimension. For each feature association dimension in the feature association dimension between the file element and the template element, a corresponding feature similarity calculation function is constructed. The feature similarity calculation function for the data type consistency dimension in the feature association dimension between the file element and the template element calculates similarity based on data type matching rules. The feature similarity calculation function for the functional adaptability dimension in the feature association dimension between the file element and the template element calculates similarity based on functional requirement matching rules. The feature similarity calculation function for the parameter range compatibility dimension in the feature association dimension between the file element and the template element calculates similarity based on parameter range overlap rules. The feature similarity calculation function for the association rule matching dimension in the feature association dimension between the file element and the template element calculates similarity based on rule logic matching rules. The feature values ​​corresponding to each feature association dimension between the file element and the template element are extracted from the detailed features of the file element to form a file element feature matrix; the feature values ​​corresponding to each feature association dimension between the file element and the template element are extracted from the detailed features of the template element to form a template element feature matrix. Input the file element feature matrix and the template element feature matrix into the feature similarity calculation function corresponding to each feature association dimension in the feature association dimension between the file element and the template element to obtain the dimensional similarity of each feature association dimension in the feature association dimension between the file element and the template element. For each feature association dimension in the feature association dimension between the file element and the template element, an association weight is assigned. The association weight is determined based on the degree of influence of each feature association dimension on the element mapping effect. The association weight of the data type consistency dimension in the feature association dimension between the file element and the template element is higher than the association weight of the functional adaptability dimension in the feature association dimension between the file element and the template element. The association weight of the functional adaptability dimension in the feature association dimension between the file element and the template element is higher than the association weight of the parameter range compatibility dimension in the feature association dimension between the file element and the template element. The association weight of the parameter range compatibility dimension in the feature association dimension between the file element and the template element is higher than the association weight of the association rule matching dimension in the feature association dimension between the file element and the template element. The dimensional similarity of each feature association dimension is standardized. Based on the standardized similarity value and the corresponding association weight, the feature association degree between different file elements and template elements is calculated by weighted summation.

5. The electronic document processing method based on virtual printing according to claim 1, characterized in that, The process of loading the file elements of each electronic file to be processed into the template elements of the corresponding initial virtual print configuration template according to the dynamic element mapping relationship set, adjusting the fusion parameters of the file elements and template elements, and generating an initial virtual print preview file set includes: The dynamic element mapping relationship set is parsed to obtain the association details between file elements and template elements corresponding to each electronic file to be processed. The association details between file elements and template elements specify the template element identifier, loading position and initial fusion parameters corresponding to each file element. Based on the template element identifier and loading position in the association details between the file element and the template element, locate the target template element from the corresponding initial virtual printing configuration template and extract the parameter configuration baseline of the target template element; The file elements of the electronic document to be processed are loaded into the target template element according to the loading position, and the initial fusion parameters are used to perform preliminary fusion processing to obtain a fusion intermediate; Extract the fusion effect features of the fusion intermediate, which include content display coordination, format parameter matching, and attribute association adaptation. The fusion effect features are compared with a preset fusion effect benchmark to determine the deviation direction and magnitude of the current fusion parameters from the benchmark parameters in the preset fusion effect benchmark. The fusion parameters are then adjusted according to the deviation direction and magnitude to obtain optimized fusion parameters. The optimized fusion parameters are used to perform a secondary fusion process on the fusion intermediate to generate an initial virtual print preview file; Compile all the initial virtual print preview files corresponding to the electronic files to be processed, forming an initial virtual print preview file set.

6. The electronic document processing method based on virtual printing according to claim 5, characterized in that, The extraction of fusion effect features of the fusion intermediate includes: A fusion effect feature extraction framework is constructed, which includes a content display feature extraction submodule, a format parameter feature extraction submodule, and an attribute association feature extraction submodule. The content display feature extraction submodule in the fusion effect feature extraction framework is activated to perform pixel-level feature analysis on the content units in the fusion intermediate, extract the display brightness distribution, color distribution and outline clarity parameters of the content units, and calculate the content display coordination degree based on the display brightness distribution, color distribution and outline clarity parameters of the content units. The content display coordination degree reflects the visual coordination degree between the content units and the template element background. The format parameter feature extraction submodule in the fusion effect feature extraction framework is activated to perform parameter-level feature analysis on the format units in the fusion intermediate, extract the font parameters, spacing parameters, and page size parameters of the format units, compare the font parameters, spacing parameters, and page size parameters of the format units with the format baseline parameters of the template elements, and calculate the format parameter matching degree. The format parameter matching degree reflects the degree of matching between the format units and the format requirements of the template elements. The attribute association feature extraction submodule in the fusion effect feature extraction framework is activated to perform association-level feature analysis on the attribute units in the fusion intermediate, extract the associated objects, association rules, and association effect parameters of the attribute units, compare the associated objects, association rules, and association effect parameters of the attribute units with the attribute association benchmark parameters of the template elements, and calculate the attribute association fit degree. The attribute association fit degree reflects the degree of fit between the attribute units and the attribute requirements of the template elements. The content display coordination, format parameter matching, and attribute association adaptability are summarized to form the fusion effect characteristics of the fusion intermediate.

7. The electronic document processing method based on virtual printing according to claim 1, characterized in that, The process of optimizing the fusion effect of each initial virtual print preview file in the initial virtual print preview file set through multiple rounds, adjusting the display adaptability of content units, the parameter matching degree of format units, and the correlation adaptability of attribute units, to obtain an optimized virtual print preview file set includes: For each initial virtual print preview file in the initial virtual print preview file set, set an iterative optimization round and a target threshold for each round of optimization. The target threshold for each round of optimization includes a content display adaptability threshold, a format parameter matching threshold, and an attribute association adaptability threshold. The first round of optimization is performed on the first initial virtual print preview file: Display features of content units in the initial virtual print preview file are extracted, and the display parameters of the content units are adjusted according to the content display adaptability threshold to improve the display adaptability of the content units; parameter features of format units in the initial virtual print preview file are extracted, and the parameter configuration of the format units is adjusted according to the format parameter matching threshold to improve the parameter matching degree of the format units; association features of attribute units in the initial virtual print preview file are extracted, and the association rules of the attribute units are adjusted according to the attribute association adaptability threshold to improve the association adaptability of the attribute units, resulting in the virtual print preview file after the first round of optimization. Determine whether the virtual print preview file after the first round of optimization has reached the target threshold of each round of optimization. If not, determine the optimization dimensions that have not reached the target threshold of each round of optimization based on the characteristics of the virtual print preview file after the previous round of optimization. Increase the parameter adjustment range for the optimization dimensions that have not reached the target threshold of each round of optimization, while keeping the parameters of the optimization dimensions that have reached the target threshold of each round of optimization stable, and obtain the virtual print preview file after the next round of optimization. Repeat the above judgment and optimization steps, that is, determine whether the virtual print preview file after optimization in the current round has reached the target threshold of all optimizations in each round. If it has not reached the target threshold, determine the optimization dimension that has not reached the target threshold of each round based on the characteristics of the virtual print preview file after optimization in the previous round. Increase the parameter adjustment range for the optimization dimension that has not reached the target threshold of each round, while keeping the parameters of the optimization dimension that has reached the target threshold of each round stable, and obtain the virtual print preview file after optimization in the next round. Until the initial virtual print preview file reaches the target threshold of all optimizations in each round or reaches the set iteration optimization round, the final preview file is determined as the optimized virtual print preview file corresponding to the initial virtual print preview file. Following the optimization process for the first initial virtual print preview file described above, multiple rounds of iterative optimization are performed on each initial virtual print preview file in the set of initial virtual print preview files to obtain optimized virtual print preview files corresponding to all initial virtual print preview files. All optimized virtual print preview files are compiled into an optimized virtual print preview file collection.

8. The electronic document processing method based on virtual printing according to claim 7, characterized in that, If the target threshold for each round of optimization is not met, the optimization dimensions that have not reached the target threshold are determined based on the characteristics of the virtual print preview file optimized in the previous round. The parameter adjustment range is increased for these optimization dimensions that have not reached the target threshold, while the parameters of the optimization dimensions that have reached the target threshold remain stable. This yields the virtual print preview file optimized in the next round, including: Extract the feature data of the virtual print preview file after the previous round of optimization. The feature data of the virtual print preview file after the previous round of optimization includes content display adaptation data, format parameter matching data, and attribute association adaptation data. The content display adaptation data in the feature data of the virtual print preview file optimized in the previous round is compared with the corresponding content display adaptation threshold. The format parameter matching data in the feature data of the virtual print preview file optimized in the previous round is compared with the corresponding format parameter matching threshold. The attribute association adaptation data in the feature data of the virtual print preview file optimized in the previous round is compared with the corresponding attribute association adaptation threshold. The optimization dimensions that have not reached the target threshold of each round of optimization are identified and marked as dimensions to be strengthened. The optimization dimensions that have reached the target threshold of each round of optimization are marked as stable dimensions. For the dimensions to be strengthened and optimized, the correlation between the magnitude of parameter adjustment and the improvement of effect in the previous round of optimization is analyzed. If the improvement of effect after the previous round of parameter adjustment is lower than the preset improvement threshold, the magnitude of parameter adjustment will be increased by the preset ratio in this round. If the deviation of the parameter adjustment direction in the previous round causes the effect to fail to reach the target threshold of each round of optimization, the parameter adjustment direction is corrected while maintaining the adjustment magnitude. Based on the adjusted parameter adjustment range or direction, the parameters corresponding to the dimensions to be strengthened and optimized are adjusted. The display brightness, color saturation, or outline clarity of the content unit are adjusted to optimize the display adaptability of the content unit. The font size, paragraph spacing, or page margin of the format unit are adjusted to optimize the parameter matching of the format unit. The priority of the associated object of the attribute unit or the associated trigger condition parameter of the attribute unit is adjusted to optimize the association adaptability of the attribute unit. The parameters corresponding to the stable dimension are locked to keep the values ​​of the parameters corresponding to the stable dimension unchanged after the previous round of optimization. The parameters corresponding to the adjusted dimension to be strengthened and optimized, and the parameters corresponding to the locked stable dimension are applied to the virtual print preview file after the previous round of optimization to generate the virtual print preview file after the next round of optimization.

9. An electronic document processing system based on virtual printing, characterized in that, include: processor; A machine-readable storage medium for storing machine-executable instructions of the processor; The processor is configured to execute the electronic document processing method based on virtual printing as described in any one of claims 1 to 8 by executing the machine-executable instructions.

Citation Information

Patent Citations

  • Page printing and exporting method suitable for multiple browsers

    CN114296661A

  • Dynamic printing style configuration method and configuration system

    CN119166081A