Method and system for creating printing template through custom report

Through the association of graphical interface and dynamic API, combined with programmable logic judgment mechanism, the combination of adaptive paging strategies is realized, solving the problems of complex production of existing printing templates, poor data adaptability and dynamic media changes, and achieving rapid, accurate and intelligent printing template generation.

CN120215854APending Publication Date: 2025-06-27DECARD CLOUD CREATION TECH (XIAN) CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510318003.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The existing printing templates are complex to produce and require professional programming knowledge, which leads to long cycles and error-prone, and the inability to realize dynamic binding and intelligent paging of multi-source data, resulting in delays in data updates and high paper waste.

Method used

Receive template elements and typesetting instructions input by users through a graphical interface, build a dynamic association API port between template elements and heterogeneous data sources, and configure a programmable logic judgment mechanism to realize the combination of adaptive paging strategies.

Benefits of technology

It realizes the rapid, accurate and intelligent way of creating print templates for custom reports, solves the problems of static traditional templates, poor data adaptability and dynamic media changes, and reduces user operation complexity and paper waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120215854A_ABST
    Figure CN120215854A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of printing and typesetting, and provides a method and system for creating a printing template through a user-defined report. Template elements and typesetting instructions input by a user are received through a graphical interface; constructing an API (Application Program Interface) port in which the template element is dynamically associated with the heterogeneous data source; configuring a programmable logic judgment mechanism at an API port, and determining medium characteristics corresponding to the template elements; wherein the programmable logic judgment mechanism is used for determining a display / hiding state and a style parameter of a template element based on a preset compilable rule; according to the medium characteristics and the typesetting instruction, a paging strategy is determined, the element spacing and the typesetting proportion are dynamically adjusted, and a target printing template is generated. Through an API port and a programmable logic judgment mechanism, business rules are embedded into template generation logic, intelligent decision of element display / hiding is realized, element spacing is calculated in real time based on medium physical attributes such as paper size and material expansion and contraction rate, and the problem of content truncation during cross-medium printing is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of print layout, and particularly to a method and system for creating a print template through a custom report. Background Art

[0002] Currently, the complexity of template production is high: traditional solutions rely on code placeholders or fixed formats, and users need to master professional programming knowledge to create templates, resulting in a long production cycle and easy errors. Insufficient dynamic data binding: Existing systems mostly adopt static data association, and cannot achieve the mixed binding of database fields, API parameters and real-time calculation results. The data update delay reaches; Lack of intelligent pagination ability: Most solutions adopt fixed pagination rules, without considering the physical characteristics of the medium and the collaborative impact of dynamic data parameters, resulting in a high paper waste rate; Poor interaction experience: Template editing requires switching between multiple platforms, lacking visual drag-and-drop layout and real-time preview functions, and the user operation efficiency is very low. Current mainstream solutions such as the method based on secondary development of WPS require 6 manual operations. Although some template optimization technologies improve the efficiency of the form engine solution, the template customization is limited. These defects seriously restrict the automation level of enterprise-level report generation. Summary of the Invention

[0003] The present invention proposes a method and system for creating a print template through a custom report. By using template elements and layout instructions in a graphical interface, and adopting dynamic APIs to associate heterogeneous data sources, programmable logic is used to judge the specific styles and writable rules of different template elements, and a combination of adaptive pagination strategies is realized to solve the technical problems of static traditional print templates, inability to adapt to multi-source data and dynamic changes of the medium.

[0004] The present invention proposes a method for creating a print template through a custom report, including: Receiving template elements and layout instructions input by a user through a graphical interface; Constructing an API port for dynamically associating template elements with heterogeneous data sources; Configuring a programmable logic judgment mechanism at the API port to determine the medium characteristics corresponding to the template elements; wherein, the programmable logic judgment mechanism determines the display / hide state and style parameters of the template elements based on preset writable rules; Determining a pagination strategy according to the medium characteristics and layout instructions, and dynamically adjusting the element spacing and layout ratio to generate a target print template.

[0005] In the above implementation method, multi-source data dynamic mapping is performed through the API port. The template elements and layout instructions input by the user are embedded in the template generation logic through a programmable logic judgment mechanism and business rules (such as media type, user permissions), to achieve intelligent decision-making on element display / hiding, and the element spacing is calculated in real time based on the physical properties of the media (such as paper size, material stretch rate), so as to solve the problem of content truncation during cross-media printing.

[0006] In a possible implementation manner, the graphical interface is further configured to: Receive the behavior operation parameters of the user's drag operation in real time; wherein, the behavior operation parameters include drag speed, trajectory offset, operation pause frequency, and user preference components; Calculate the applicability scores of the free layout mode and the assisted alignment mode according to the behavior operation parameters; wherein, Judge whether the applicability score of the free layout mode / assisted alignment mode exceeds the threshold, and when the applicability score does not reach the threshold, automatically switch to the target layout mode with a higher score; Generate the dragged component at the corresponding position according to the user's drag operation according to the target layout mode, and render the current interface.

[0007] In the above implementation method, the mode applicability is comprehensively calculated through multi-dimensional behavior parameters such as drag speed, trajectory offset, and pause frequency, breaking through the single-threshold judgment logic. Then, the layout requirements are predicted according to the user's operation habits (such as the usage frequency of preference components) to achieve "unaware" mode switching. The rendering strategy is dynamically adjusted during the dragging process (such as allowing overlapping in the free mode and snapping to the grid in the assisted mode), reducing the user's cognitive load.

[0008] In a possible implementation manner, the receiving of the behavior operation parameters of the user's drag operation in real time further includes: Determine the cursor coordinate point sequence of the drag trajectory according to the behavior operation parameters; Calculate the trajectory curvature change rate and the proximity index according to the cursor coordinate point sequence; wherein, the trajectory curvature change rate is the set of curvature changes of adjacent coordinate points in the drag trajectory; Establish a grid generator for dynamic alignment, and calculate the target drag end point of the drag end according to the proximity index.

[0009] In the above implementation method, through the weighted calculation of the curvature change rate (reflecting the operation precision requirement) and the proximity index (reflecting the alignment intention), the single-distance threshold judgment logic is broken through, and a non-uniform grid (dense grid lines in the high-curvature area) is generated based on the real-time trajectory data. The target end point is pre-calculated before the dragging ends, and the adsorption effect is displayed in advance (such as the semi-transparent grid lines flashing) to predict whether correction is needed.

[0010] In a possible implementation, the API port for establishing the dynamic association between the template element and the heterogeneous data source includes: Determine the protocol adaptation layer associated with the template element according to the heterogeneous data source; wherein, an association identifier is configured between the template element and the heterogeneous data source; Construct a dynamic data mapping mode according to the protocol adaptation layer; Utilize the dynamic data mapping mode to establish a dynamic association verification mechanism for calculating the association confidence based on the reinforcement learning model; Configure the adaptive reconnection protocol of the API port according to the dynamic association verification mechanism and establish a data pipeline.

[0011] In the above implementation, the communication protocol differences are processed through the protocol adaptation layer, and then based on the dynamic data mapping mode, the data structure heterogeneity is solved, forming a dual decoupling architecture. The dual decoupling architecture is continuously optimized through reinforcement learning, and an association confidence threshold is set. When the confidence is lower than the association confidence threshold, the protocol renegotiation mechanism and data structure reorganization of the protocol adaptation layer are triggered to achieve cross-level data association.

[0012] In a possible implementation, the hybrid binding of database fields, API interface parameters, and real-time calculation results includes: Receive a declarative binding configuration, where the declarative binding configuration contains the mapping relationship between the template element identifier and the heterogeneous data source, and the heterogeneous data source includes at least database fields, API interface parameters, and real-time calculation result streams; Establish a multi-source connection channel through the dynamic protocol adaptation layer, where: The database field connector adopts the JDBC / ODBC connection pool sharding technology to dynamically allocate connection resources according to the number of bound elements; The API interface adapter constructs a parameter-dependent directed acyclic graph and determines the cross-source call order through topological sorting; The real-time calculation bridge converts the window function declaration into executable instructions for the stream processing engine; Perform space-time dimension alignment operations: Attach logical clock tags to each data source and construct a global event sequence using the Lamport timestamp algorithm; Unify the multi-source space coordinates to the standard reference system through the affine transformation matrix; Implement incremental multi-level hash merging, specifically including: Construct a composite index structure of the basic hash layer, version hash layer, and space-time hash layer; Establish a B+ tree index for database fields, store API parameter values in a skip list, and write real-time calculation results into a double-buffered circular queue; Dynamically resolve data binding conflicts. When multi-source data inconsistencies are detected: Calculate the score of the conflict factor, where the score incorporates data freshness, pattern difference degree, and spatial overlap degree; Select a priority override, weighted fusion, or machine learning arbitration method according to a preset strategy to generate the final binding value.

[0013] In the above implementation method, in the time dimension, based on the global event sequence of Lamport timestamps, solve the problem of out-of-order data of ICU devices. Unify the coordinates through an affine transformation matrix, that is, the printing template coordinate system. Through a three-level hash index, support multi-modal data traceability and reduce the latency during the printing process.

[0014] In a possible implementation method, configure a programmable logic judgment mechanism at the API port to determine the medium characteristics corresponding to the template elements, including: Extract the element features corresponding to the template elements, and determine the element type identifier and parameter constraint conditions corresponding to the element features; According to the element type identifier, determine the first medium characteristic; where the first medium characteristic includes the data source type, real-time requirement threshold, and structured data format identifier; According to the parameter constraint conditions, determine the second medium characteristic; where the second medium characteristic is a medium matching characteristic for logical recognition of template elements based on the first medium characteristic; According to the first medium characteristic and the second medium characteristic, build a medium matching matrix for the template elements, and generate a programmable logic judgment mechanism through the medium matching matrix.

[0015] In the above implementation method, by analyzing the template elements and logically recognizing the medium characteristics, determine the medium that matches the template elements, improving the accuracy of the generated printing template. Utilize multi-dimensional information such as data source characteristics, real-time requirements, and structured data formats to precisely match the printing template, and optimize the printing template through a programmable logic judgment mechanism.

[0016] In a possible implementation method, the building of the medium matching matrix for the template elements further includes: When there are template elements that meet multiple first medium characteristics and second medium characteristics; Based on the element historical success rate, element medium response time, and element format compatibility, construct a Bayesian optimization model to determine the optimal instruction match; According to the optimal element match, extract the decision path of each template element in the medium matching matrix.

[0017] In the above implementation method, by adopting a Bayesian optimization model, the optimal template element matching is determined, and based on various medium characteristic factors, the medium characteristics of the best template element are selected. Based on factors such as the historical success rate of instructions, the element medium response time, and the element format compatibility, the distribution state of each template element on the target template is determined.

[0018] In one possible implementation method, the determining of the pagination strategy according to the medium characteristics and layout instructions includes: According to the medium characteristics, determine the data parameter set of a single interface in the graphical interface, and the data parameter set at least includes the template element width, the template element length, and the data density of the template element; According to the data parameter set and the sorting instruction, determine the data threshold of a single interface, and set an elastic pagination strategy; wherein, the elastic pagination strategy includes streaming pagination, cursor pagination, and automatic compensation pagination.

[0019] In the above implementation method, through the elastic pagination strategy driven by medium characteristics, the problems of pagination redundancy and information truncation caused by medium differences in printing are solved, and the accuracy of cross-page printing and paper waste are reduced by the elastic pagination strategy.

[0020] In one possible implementation method, the dynamically adjusting the element spacing and layout ratio to generate a target print template includes: According to the pagination strategy and the preset page clarity standard, set the element stacking density; According to the element stacking density, adjust the element spacing and layout ratio to generate a target print template; wherein, the target print template includes cross-format output templates of PDF, HTML, graphical reports, and industrial printer control instructions.

[0021] In the above implementation method, by dynamically setting the element stacking density during the pagination process, adjusting the spacing and layout ratio of the elements, cross-format output templates in various forms are output in a cross-format manner without document format restrictions.

[0022] On the other hand, the present application proposes a system for creating a print template through a custom report, including: Graphical interface processing module: Receive the template elements and layout instructions input by the user through the graphical interface; Port configuration module: Build an API port for dynamically associating template elements with heterogeneous data sources; Layout logic judgment module: Configure a programmable logic judgment mechanism at the API port to determine the medium characteristics corresponding to the template elements; wherein, the programmable logic judgment mechanism determines the display / hide state and style parameters of the template elements based on preset programmable rules; Template generation module: Determine the pagination strategy according to the medium characteristics and layout instructions, dynamically adjust the element spacing and layout ratio, and generate the target print template.

[0023] In the above implementation method, dynamic mapping of multi-source data is realized through the API port. For the template elements and layout instructions input by the user, through the programmable logic judgment mechanism, business rules (such as medium type, user permissions) are embedded in the template generation logic to realize intelligent decision-making on element display / hiding. Based on the physical properties of the medium (such as paper size, material elongation rate), the element spacing is calculated in real time to solve the problem of content truncation during cross-media printing.

[0024] Other features and advantages of the present invention will be described in the following specification, and part of them will be obvious from the specification, or understood by implementing the present invention. The objectives and other advantages of the present invention can be realized and obtained through the structures specifically pointed out in the written specification, claims, and drawings.

[0025] The technical solutions of the present invention will be further described in detail below through the drawings and embodiments. Description of the Drawings

[0026] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention, and do not constitute a limitation to the present invention. In the drawings: Figure 1 It is the method flow chart of a method for creating a print template through a custom report in an embodiment of the present invention; Figure 2 It is the system composition diagram of a system for creating a print template through a custom report in an embodiment of the present invention; Figure 3 It is the specific flow chart of the graphical interface for layout through drag-and-drop components in an embodiment of the present invention; Figure 4 It is the process flow chart of the process of receiving the behavior operation parameters of the user's drag operation in real time in an embodiment of the present invention; Figure 5 It is the process diagram of the API port for constructing the dynamic association between template elements and heterogeneous data sources in an embodiment of the present invention; Figure 6 It is the process diagram of the hybrid binding of database fields, API interface parameters, and real-time calculation results in an embodiment of the present invention; Figure 7 It is the process diagram of the generation of the programmable logic judgment mechanism in an embodiment of the present invention; Figure 8 It is the process diagram of building the medium matching matrix of layout instructions in an embodiment of the present invention; Figure 9This is a flowchart for determining the paging strategy in an embodiment of the present invention; Figure 10 This is a flowchart for generating a target print template in an embodiment of the present invention. Detailed implementation manners

[0027] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only for the purpose of illustrating and explaining the present invention, and are not intended to limit the present invention.

[0028] Embodiment 1:

[0029] As Figure 1 shown, this embodiment provides a method for creating a print template through a custom report, including: During specific implementation, the template elements and layout instructions input by the user are received through a graphical interface. During the operation process, the graphical interface supports drag-and-drop component layout; By constructing an API port for dynamically associating template elements with heterogeneous data sources, and enabling the API port to support the mixed binding of database fields, API interface parameters, and real-time calculation results; Configure a programmable logic judgment mechanism in the API port to determine the media characteristics corresponding to the template elements; wherein, the programmable logic judgment mechanism determines the display / hide state and style parameters of the template elements based on preset writable rules; Finally, according to the media characteristics and layout instructions, determine the paging strategy, and dynamically adjust the element spacing and layout ratio to generate a target print template.

[0030] During actual implementation: For the template construction stage, the user uses the drag-and-drop function of the graphical interface. For example, during the generation process of a print template for patient examination data in a hospital, components such as the title bar (i.e., hospital logo, etc.), test item table, data trend chart, doctor's order description box, etc. are laid out on the canvas. The number of columns of the table is set to any (integer columns), and through the responsive folding layout, the abnormal index annotation component is selected in the graphical interface, and its default display position is set to the right of the test result table.

[0031] For the mapping relationship established by the API port: It can be: Test result numerical field ← test_result table in the hospital LIS database; Reference value range ← ref_api / get_range interface of the third-party test standard system; Bind the abnormal index judgment algorithm through the real-time calculation module (in actual real-time, it is triggered when the measured value exceeds the reference value by ±15%); By configuring the data refresh policy, under the daily batch update of basic data, real-time data maintains a long connection through WebSocket.

[0032] During the setting process of the media adaptation rule, it can be set that when the detected printing media is thermal paper, the margin is automatically adjusted from 20mm to 8mm, and the font size is uniformly enlarged by 20%. After the media detection module recognizes A4 paper: multi-column flow paging is adopted, allowing charts to span pages, and the spacing is dynamically adjusted according to the element priority (the spacing of key data is expanded to 1.5 times the line spacing).

[0033] When switching to a ticket printer: the vertical compression algorithm is enabled, and the row height of the table is compressed from 8mm to 5mm; charts that exceed the width are automatically triggered for proportional scaling.

[0034] Compared with the traditional code development method, this application improves the speed of creating printing templates through drag-and-drop component layout, realizes intelligent adaptation of multiple printer models, and reduces the typesetting error rate; in this process, the utilization rate of different formats of paper is increased during use through the dynamic paging algorithm. Compared with the fixed template mode, paper consumption can be reduced. The programmable rule engine shortens the adaptation cycle through new inspection items, and the API gateway realizes data desensitization to ensure that external system data is only dynamically injected during the rendering stage.

[0035] Embodiment 2:

[0036] As Figure 3 shown, the graphical interface is also used for drag-and-drop component layout, specifically including: Receiving the behavioral operation parameters of the user's drag operation in real time; among them, the behavioral operation parameters include drag speed, trajectory offset, operation pause frequency, and user-preferred components. In actual implementation, the graphical interface receives the behavioral operation parameters of the user's drag operation in real time, and the behavioral operation parameters represent the operation habits and intentions of the user during the process of dragging components. For example, a fast drag speed may indicate that the user prefers a free layout, while frequent pauses may imply that the user needs assistance in alignment.

[0037] The trajectory offset is the average distance between the actual dragging trajectory of the component and the straight-line trajectory with the starting point and the ending point as endpoints; the user-preferred component is the score calculated based on the frequency of the user using different components within a certain period of time, and the user's preferred component is determined according to the score.

[0038] Then, through the behavioral operation parameters, calculate the applicability scores of the free layout mode and the assisted alignment mode; in actual implementation, different behavioral operation parameters have different influence weights on the applicability of the two layout modes, and then the scores are calculated comprehensively.

[0039] In actual implementation, it can be: Applicability score of the free layout mode = Drag speed weight × Drag speed + Trajectory offset weight × Trajectory offset + Operation pause frequency weight × Operation pause frequency + User preference component weight × User preference component related score. During the process of the assisted alignment mode, the applicability score is calculated using the same principle.

[0040] Then, it is judged whether the applicability score of the free layout mode / assisted alignment mode exceeds the threshold. When the applicability score does not reach the threshold, it is automatically switched to the target layout mode with a higher score; if it does not reach the threshold, it indicates that the current layout mode may not suit the user's operation habits, and it is automatically switched to the target layout mode with a higher score.

[0041] In actual implementation, according to the target layout mode and the current user's drag operation, a dragged component is generated at the drag end position, and the current interface is rendered.

[0042] In actual implementation, the event capture mechanism built into GUI frameworks such as Qt is preferably used to collect raw data such as drag speed and trajectory offset in real time. Combining with timestamps, the operation pause frequency is calculated. Through the user's historical operation records, the preferred component types (such as frequently used buttons, charts, etc.) are displayed and extracted; through the weighted scoring algorithm, the applicability of the free layout and assisted alignment modes is comprehensively evaluated: In actual implementation, the free layout score mainly targets the user's operation freedom, and assigns higher weights to the drag speed and trajectory offset. For the assisted alignment score, it is necessary to focus on accuracy, and the focus is on the operation pause frequency and the alignment requirements of the preferred components. During the process of setting the threshold, based on the experimental data of the user group, and dynamically adjusting the adaptation scenarios under the current experimental data to adapt to different scenarios. If the score difference exceeds the threshold, the layout mode switch will be automatically triggered.

[0043] During the process of switching the layout mode, the Auto Layout system of Unity or the grid layout algorithm of React is preferably used in this application to adjust the component spacing and position.

[0044] During the rendering stage, this application combines the virtual DOM technology of Vue to update the different parts and improve the performance. This application anticipates the user's intention through trajectory offset analysis. According to the user's intention, the number of manual fine-tuning operations can be reduced (experimental data shows an efficiency improvement). The preferred component recognition function will automatically recommend a high-frequency component library, reducing the user's search cost. The assisted alignment mode is mainly used to provide guidance for novices, and the free mode meets the customized needs of experts. The above solutions focus on the drag-and-drop component layout of the graphical interface and the dynamic switching of the layout mode.

[0045] Embodiment 3:

[0046] As Figure 4 shown, the behavioral operation parameters for real-time receiving of the user's dragging operation further include: Determining a sequence of cursor coordinate points of the dragging trajectory according to the behavioral operation parameters; when the present application is actually implemented, for the behavioral parameters generated during the user's dragging operation, the sequence of cursor coordinate points on the dragging trajectory is determined, and the sequence of cursor coordinate points represents the moving path of the cursor during the user's dragging process.

[0047] Calculating a trajectory curvature change rate and a proximity index according to the sequence of cursor coordinate points; wherein, the trajectory curvature change rate is a set of curvature changes of adjacent coordinate points in the dragging trajectory; the present application calculates the trajectory curvature change rate and the proximity index through the sequence of cursor coordinate points. The trajectory curvature change rate is used to represent the change in the degree of bending of the dragging trajectory, and the calculated proximity index measures the proximity of the current dragging position to certain reference points or regions.

[0048] Establishing a dynamically aligned grid generator and calculating a target dragging end point of the dragging end according to the proximity index.

[0049] When actually implemented, the grid generator of the present application is used to dynamically adjust the layout and density of the grid according to the user's operation to achieve more accurate alignment.

[0050] When actually implemented, the technical link of the present application is: trajectory coordinate acquisition → curvature analysis → dynamic grid generation → dragging end point adsorption, implementing an intelligent dragging alignment system.

[0051] Based on the QMouseEvent event capture mechanism of the Qt framework, the present application will record the sequence of cursor coordinate points during the dragging process in real time, calculate the dragging speed through the time stamp interval and construct a trajectory point queue.

[0052] The present application uses a discrete curvature formula to calculate the curvature of adjacent points to quantify the trajectory smoothness, then defines the proximity index through historical data, and dynamically adjusts the grid density based on the grid layout algorithm of React.

[0053] For the grid space of this application, a KDTree is used to construct a grid space index. The Euclidean distance between the drag end point and the grid point is calculated through nearest neighbor search, and the corresponding grid point is used as the target drag end point. By calculating the trajectory curvature change rate and proximity index, the operation intention of the user can be determined, and precise distributed layout can be carried out for different components, improving the design quality of the printing template. Through a dynamically aligned grid generator, this application can be adjusted in real time under the operation of the user, and assist the user to provide a more intuitive and convenient layout assistance, reducing the workload of manual adjustment by the user. When this application is implemented, multiple reference areas will also be referred to, such as different table areas, picture areas, etc. Multiple proximity indexes will be calculated according to different reference areas to meet more complex layout requirements.

[0054] Example 4:

[0055] As Figure 5 shown, the API port for dynamically associating the construction template element with heterogeneous data sources includes: Determine the protocol adaptation layer associated with the template element according to the heterogeneous data source; among them, an association identifier is configured between the template element and the heterogeneous data source; In actual implementation, this application effectively associates different heterogeneous data sources with template elements through the protocol adaptation layer, enabling the template elements to access and display the information in the data source under control. The role of the protocol adaptation layer is to adapt different protocols and build a bridge.

[0056] Construct a dynamic data mapping mode according to the protocol adaptation layer; this application automatically constructs a dynamic data mapping mode based on different protocol adaptation layers, which will map the fields in the data source to the template elements, enabling the target template to dynamically adapt to different data sources. The dynamic data mapping mode flexibly adjusts the mapping method according to the changes in the data source to ensure the accuracy and consistency of the data.

[0057] Using the dynamic data mapping mode, this application constructs a dynamic association verification mechanism for calculating the association confidence based on a reinforcement learning model; in actual implementation, when the association confidence is lower than the threshold, a data mapping suggestion list is automatically generated for the user to confirm; by introducing the reinforcement learning model, the system of this application can evaluate the association degree between different data sources and template elements according to historical data and the current environment. The reinforcement learning model will automatically adjust the association strategy according to the feedback, improve the intelligent level of data association, and optimize the calculation of the association confidence.

[0058] Configure the adaptive reconnection protocol of the API port according to the dynamic association verification mechanism and establish a data pipeline.

[0059] During the construction of the data pipeline, the distributed data pipeline of the present application can supervise the health status of each data source in real time through a visual data tool. When a data source is interrupted or changed, the connection policy of the API port can be automatically adjusted according to the dynamic verification mechanism to re - establish the connection. The dynamic verification mechanism can improve the reliability and fault tolerance of the generated template and the efficiency of smooth data transfer. After the API port connection verification of the present application, through the established data pipeline, the flow of data from the source to the target template is consistent, meeting data transmission or data filling requirements. The data pipeline not only improves the data transmission efficiency but also ensures data consistency.

[0060] In actual implementation, the present application uses API gateway technology to parse the communication protocols of heterogeneous data sources (such as JDBC for MySQL, BSON for MongoDB, etc.) during the SOAP / REST protocol conversion process.

[0061] Use XML Schema to define the mapping rules of associated identifiers and establish a two - way index between template elements and data sources; During the operation of the present application, the transformation engine of the ETL tool will be used to construct a field - level mapping matrix, and the nested data structure will be expanded through JSONPath expressions. For example, map $.user.address.city to the "City" field in the template. A confidence model is constructed using the Q - Learning algorithm to calculate the confidence level. When the confidence level is lower than the minimum confidence level, manual review is implemented. Based on the dynamic data source switching mechanism of SpringBoot, an exponential back - off reconnection algorithm is designed. When a data source failure is detected, it automatically switches to the standby node and rebuilds the RabbitMQ data pipeline.

[0062] Example 5:

[0063] As Figure 6 shown, the hybrid binding of database fields, API interface parameters, and real - time calculation results includes: Receive a declarative binding configuration, which contains the mapping relationship between template element identifiers and heterogeneous data sources. The heterogeneous data sources at least include database fields, API interface parameters, and real - time calculation result streams; The present application determines the mapping and binding relationship between template elements and heterogeneous data sources by receiving the declarative binding configuration to ensure data accuracy.

[0064] Establish a multi - source connection channel through the dynamic protocol adaptation layer, where: In the process of building a multi-connected access, through the database field connector, under the JDBC / ODBC connection pool sharding technology, the number of bound elements is used to dynamically allocate connection resources; based on the establishment of multi-source connection channels, different connectors (such as JDBC / ODBC connection pools, API interface adapters, real-time computing bridges) are used to perform different channel adaptations under the access and processing of different data sources.

[0065] During the construction of the API interface adapter, a parameter-dependent directed acyclic graph is used, and through topological sorting, the cross-source call order is obtained, and a directed acyclic graph and topological sorting are used to optimize the API call order and improve the data acquisition efficiency.

[0066] The real-time computing bridge converts the window function declaration into executable instructions for the stream processing engine. The window function of this application will be converted into stream processing instructions, thus simplifying the development process of real-time computing.

[0067] In the process of performing spatio-temporal dimension alignment operations, by attaching logical clock tags to each data source, using the Lamport timestamp algorithm to generate a global event sequence, and unifying the multi-source space coordinates through an affine transformation matrix into a standard reference system, to ensure the consistency of data in time and space.

[0068] Attach logical clock tags to each data source and use the Lamport timestamp algorithm to construct a global event sequence; Unify the multi-source space coordinates to the standard reference system through an affine transformation matrix; Implement incremental multi-level hash merging, construct a composite index structure, and perform efficient storage and retrieval of data from different data sources to ensure efficiency and accuracy during data merging. Specifically, it includes: Construct a composite index structure of a basic hash layer, a version hash layer, and a spatio-temporal hash layer; Establish a B+ tree index for database fields, store API parameter values in a skip list, and write real-time calculation results into a double-buffered circular queue; Dynamically resolve data binding conflicts. When multi-source data inconsistencies are detected: when multi-source data inconsistencies are detected, calculate the conflict factor score, and select an appropriate method to generate the final binding value according to a preset strategy to ensure the reliability of the data.

[0069] Calculate the conflict factor score, which fuses data freshness, schema difference degree, and spatial overlap degree; Finally, select a priority override, weighted fusion, or machine learning arbitration method according to the preset strategy to generate the final binding value.

[0070] In actual implementation, the present application adopts the JDBC / ODBC connection pool sharding technology, dynamically allocates connection resources based on the number of bound elements, and solves the resource waste and bottleneck problems of traditional fixed connection pools.

[0071] For example, in implementation, the differences of different databases are adapted through the connection pool sharding technology to improve the ability to handle concurrent tasks; a parameter-dependent directed acyclic graph (DAG) is generated, and then the cross-source call order is determined under topological sorting.

[0072] Similarly, in the API aggregation arrangement for handling the dependency relationships of multiple interfaces, through hierarchical settings, the rationality of the call logic is ensured. In this process, window functions are converted into stream processing engine instructions (such as Flink or SparkStreaming), and a time correlation algorithm is used to tag and serialize real-time data streams to achieve low-latency and high-throughput processing effects.

[0073] Use Lamport timestamps to construct a global event sequence to solve the problem of time sequence inconsistency of multi-source data in a distributed system. Through time tagging, the time alignment of multi-source data is achieved, making data consistency dependent on global time sequence management.

[0074] The present application maps multi-source space coordinates to a standard reference system through an affine transformation matrix, that is, nodes on heterogeneous processors are merged to unify the data view, realizing cross-source space calculation.

[0075] In this process, a basic hash layer is constructed, that is, storing the original data, a version hash layer, that is, recording data changes, and a spatio-temporal hash layer, that is, a spatio-temporal label index, to perform efficient queries and version backtracking. Aggregate data heterogeneity stores JSON in a KV cluster, and under the hash index, the query efficiency is improved. Database fields use B+ tree indexes, that is, suitable for range queries, API parameters are stored in a skip list, that is, supporting fast insertion and queries, and real-time calculation results are written into a double-buffer circular queue, that is, balancing read-write conflicts. The effectiveness of B+ trees and cache queues is verified respectively. Fuse data freshness, that is, real-time weight, pattern difference degree, that is, data structure difference, and spatial overlap degree, that is, geographical coverage calculation score, and point out that data synchronization needs to balance multi-dimensional indicators to ensure consistency. Priority coverage, that is, real-time data first, weighted fusion, that is, assigning weights according to credibility, and machine learning arbitration, that is, training a model based on historical conflict patterns.

[0076] Example 6:

[0077] As Figure 7 shown, a programmable logic judgment mechanism is configured at the API port to determine the medium characteristics corresponding to each template element. The programmable logic judgment mechanism configured at the API port, in the specific process: Extract the element features corresponding to the template elements, and determine the element type identifier and parameter constraint conditions corresponding to the element features; Determine the first medium characteristic according to the element type identifier; wherein, the first medium characteristic includes the data source type, the real-time requirement threshold, and the structured data format identifier; Determine the second medium characteristic according to the parameter constraint conditions; wherein, the second medium characteristic is a medium matching characteristic for logically identifying template elements based on the first medium characteristic; Build a medium matching matrix for the template elements according to the first medium characteristic and the second medium characteristic, and generate a programmable logic judgment mechanism through the medium matching matrix.

[0078] During actual implementation, determine the element type identifier, parameter constraint conditions, etc. according to the characteristics of the template elements, and then generate a medium matching matrix through these characteristic data. The medium matching matrix automatically matches the most suitable medium characteristics during the layout process.

[0079] By distinguishing the first medium characteristic (data source type, real-time requirement, etc.) and the second medium characteristic (medium matching characteristic for logically identifying template elements based on the first medium characteristic), the medium matching matrix generated by the medium matching characteristic is mainly used to assist in generating the print template. Logical judgment can be used to finely distinguish the characteristics for different template elements when generating complex templates. By generating a medium matching matrix and performing logical judgment, the most suitable medium characteristics can be accurately matched according to characteristics such as the data source and real-time requirements, so that the finally generated target print template meets the user's ideas and intentions.

[0080] During actual implementation, the present application uses an instruction parsing engine to extract the key characteristics of layout instructions, such as operation type, parameter format, execution priority, etc., and combines a predefined rule library or machine learning model, such as a decision tree or a BERT classifier, to map the instructions to a unique type identifier, such as data writing, stream processing, batch conversion, etc. At the same time, an explicit or implicit condition in the instruction is identified through a parameter constraint parser, such as data type, value range, dependency relationship, to generate a metadata description of the parameter constraint.

[0081] The first medium characteristic can be associated with the inherent attributes of the data source according to the template element type identifier. For example, if the identifier is: table identifier, the first characteristic includes the data type that can be loaded, the real-time threshold, such as: latency ≤ 50ms, and the structured format identifier, such as: Avro Schema. The mapping from type to characteristic is implemented through a protocol adaptation table.

[0082] The second medium characteristic is to further refine the medium matching rule based on the parameter constraint.

[0083] For example, if the parameter constraints require, for example, the numerical precision to be retained to 3 decimal places, the second characteristic needs to filter the media that support high-precision floating-point storage, such as the NUMERIC type in PostgreSQL. This layer converts the parameter rules into executable conditions for physical media through a constraint translator.

[0084] Combine the first and second characteristics into a multi-dimensional matrix, where each dimension of the multi-dimensional matrix represents a media attribute, such as storage type, latency requirement, and format compatibility. Through matrix matching algorithms, such as weight-based similarity calculation or graph traversal, the optimal media combination is screened. For example, for real-time stream data, for example, the first characteristic needs to match a low-latency storage medium, such as Redis, while high-precision parameters, for example, the second characteristic requires the media to support floating-point operations. Finally, the matching results are converted into executable judgment logic through a logic code generator, such as an IF-THEN rule chain or a dynamic routing strategy.

[0085] Example 7:

[0086] As Figure 8 shown, the media matching matrix for building template elements further includes: When there are template elements that meet multiple first media characteristics and second media characteristics; Based on the element historical success rate, element media response time, and element format compatibility, construct a Bayesian optimization model to determine the optimal instruction matching; According to the optimal element matching, extract the decision path of each template element in the media matching matrix.

[0087] In actual implementation, during the process of building the media matching matrix for layout instructions in this application, there may be a situation where a layout instruction meets multiple first media characteristics and second media characteristics at the same time, resulting in uncertainty in matching and requiring further decision-making to determine the optimal matching.

[0088] In addition, a Bayesian optimization model is constructed based on three factors: instruction historical success rate, instruction media response time, and instruction format compatibility. The instruction historical success rate reflects the probability of the instruction being successfully executed when using a specific media in the past; the instruction media response time reflects the efficiency of the media in processing the instruction; the instruction format compatibility indicates the degree of matching between the instruction and the format supported by the media. The Bayesian optimization model finds the optimal instruction matching that maximizes the objective function, such as the overall success rate being the highest and the response time being the shortest, through probability analysis of these factors.

[0089] According to the optimal instruction matching determined by the Bayesian optimization model, extract the decision path of each layout instruction in the media matching matrix. The decision path records the entire process from the layout instruction to the final matching media, including various characteristic judgments and selections in the middle.

[0090] In actual implementation, when the layout instructions simultaneously meet multiple first medium characteristics, such as data source type, real-time requirement, and second medium characteristics, such as parameter accuracy constraint, the system dynamically selects the optimal medium combination through a multi-objective optimization model. Each candidate medium characteristic combination is transformed into a feature vector, and the dimensions include indicators such as historical success rate, response time, and format compatibility. With the goal of maximizing the comprehensive benefit, such as success rate × compatibility / response time as the objective function, a Gaussian process regression model is constructed. Through the acquisition function, such as Expected Improvement, the parameter space is iteratively explored to quickly approach the optimal solution. The selection path of the optimal medium combination is traced back from the medium matching matrix, such as "Kafka → Avro → Redis", to generate an interpretable rule chain to support subsequent policy adjustment and auditing. Based on the historical execution logs, the success rates of each medium combination are statistically calculated, and the weights are dynamically updated through the exponential smoothing method to preferentially select high-stability media. The medium response delay is monitored in real time, and for media exceeding the threshold, such as > 200m, a penalty coefficient is applied to reduce its priority in the optimization model. The pattern matching algorithm, such as JSON Schema, is used to verify and quantify the format compatibility to ensure conflict-free data serialization / deserialization. The frequently used decision paths, such as "real-time streaming data → Kafka + Protobuf → Flink calculation" are stored in the cache to reduce the overhead of repeated calculations. A timestamp and a scenario label are attached to each path to support rolling back to historical versions according to business requirements, such as to cope with temporary performance degradation.

[0091] Example 8:

[0092] As Figure 9 shown, determining the paging strategy according to the medium characteristics includes: According to the medium characteristics, determine the data parameter set of a single interface in the graphical interface. The data parameter set at least includes the width of the template element, the length of the template element, and the data density of the template element. Because different media, such as different printers, displays, etc., have different physical characteristics and performance limitations. According to these medium characteristics, determine the data parameter set of a single interface in the graphical interface. The width and length of the template element determine the space occupied by the elements on the interface, and the data density reflects the amount of data in a unit space. These parameters jointly affect the layout and data display effect of the interface.

[0093] Determine the data threshold for a single interface based on the data parameter set and set an elastic paging strategy; among them, the elastic paging strategy includes streaming paging, cursor paging, and auto-compensating paging. Determine the data threshold for a single interface based on the data parameter set. The data threshold is a critical value used to judge whether the amount of data on the current interface is appropriate. When the amount of data exceeds the threshold, paging processing may be required to ensure the readability of the interface and the user experience. To adapt to different data situations and user needs, three elastic paging strategies, namely streaming paging, cursor paging, and auto-compensating paging, are set. Streaming paging is suitable for scenarios where data is continuous and rapid browsing is required; cursor paging is suitable for scenarios where precise control of the paging position is needed; auto-compensating paging can automatically adjust paging when the amount of data changes to ensure the rationality of paging.

[0094] In actual implementation, by parsing the physical properties of the medium, such as screen resolution, storage capacity, network bandwidth, and business rules, such as data display priority, interaction mode, a set of data parameters is dynamically generated: Template element width / length: According to the size of the medium display area, such as mobile vertical screen vs PC large screen and element layout rules, such as grid system, the adaptation range of element size is calculated through affine transformation. For example, on mobile, the width of a single element may be limited to ≤300px, while on PC, it is allowed to be ≤800px. Based on the computing power of the medium, such as GPU rendering speed, memory capacity, and the user's visual perception threshold, such as the minimum element spacing distinguishable by the human eye, the amount of data that can be accommodated per unit area is defined. For example, a high-density display (4K) supports rendering 200 elements per page, while a normal screen (1080p) only supports 80. According to the set of data parameters and preset rules, the paging threshold is calculated and the optimal paging strategy is selected: Stream Pagination: When the data density is high and the medium network bandwidth is sufficient (such as in a 5G environment), a continuous loading mode is adopted. The next page of data is pre-loaded through prefetching technology, and the sliding window algorithm is used to keep the memory occupancy stable (such as only retaining the current page and the previous and next pages of data). Cursor Pagination: For large-scale data sets (such as millions of records), a unique cursor, such as a timestamp, ID, is used to mark the paging boundary. Combining with a B+ tree index to achieve fast positioning with O(log N) complexity, avoiding the OFFSET performance bottleneck of traditional paging. Adaptive Compensation: When the medium resources fluctuate, such as a sudden increase in network latency or insufficient memory, the paging size is dynamically adjusted. For example, when it is detected that the memory usage rate exceeds 80%, the PID controller is used to automatically reduce the amount of data per page, such as from 100 records per page to 50 records per page, and the compensation offset is recorded to ensure data continuity. When multiple paging strategies meet the conditions simultaneously, a strategy priority matrix is constructed: Data such as the current network latency (RTT), CPU / memory occupancy rate, and rendering frame rate (FPS) is collected, and a health score is generated through normalization. Based on historical logs, the success rate and time consumption of each strategy in similar scenarios are statistically analyzed (such as the average loading time of stream paging in a 4G network is 1.2s, and that of cursor paging is 0.8s), and a Markov decision model is constructed to predict the optimal choice. The multi-armed bandit algorithm (MAB) is used to balance exploration and exploitation. In the initial stage, strategies are randomly tried to collect data, and in the later stage, it gradually converges to high-yield strategies (such as preferring stream paging when the network is stable and switching to adaptive compensation when resources are tense).

[0095] Example 9:

[0096] As Figure 10 shown, the dynamic adjustment of element spacing and layout ratio to generate a target printing template includes: Set the element stacking density according to the paging strategy and the preset page clarity standard. When implementing this application, the paging strategy determines the distribution of data on the page, while the preset page clarity standard stipulates the requirements for the clarity of element display on the page. Set the element stacking density based on these two factors to ensure that elements can be reasonably distributed on the page under different paging and clarity requirements. The element stacking density reflects the density of elements on the page. According to the element stacking density, adjust the element spacing and layout ratio to make the space allocation between elements reasonable, neither too crowded to affect clarity nor too sparse to waste page space. After completing the adjustment of the element spacing and layout ratio, generate a cross-format output template including PDF, HTML, graphical reports, and industrial printer control instructions. Different formats are suitable for different application scenarios to meet the diverse needs of users. For example, PDF is suitable for archiving and printing, HTML is suitable for web display, graphical reports are suitable for quick viewing, and industrial printer control instructions are suitable for printing requirements in industrial production.

[0097] Adjust the element spacing and layout ratio according to the element stacking density to generate a target printing template; among them, the target printing template includes a cross-format output template of PDF, HTML, graphical reports, and industrial printer control instructions.

[0098] In actual implementation, based on paging strategies, such as: streaming paging, cursor paging, and preset clarity criteria, such as: DPI resolution, minimum recognizable font size, the element stacking density is determined through the following steps: According to the paging strategy, such as: automatically compensating for the current page data volume of paging, calculate the available typesetting area. For example, under cursor paging, each page is fixed at 100 records, and elements need to be allocated within an A4 paper (210×297mm). Convert the clarity criteria into computable parameters, such as the line height of text ≥ 1.2 times the font size, and the spacing between pictures ≥ 5mm to prevent adhesion. Through an image sharpness detection algorithm, such as: Laplacian gradient calculation, verify the visual readability after element superposition. Adopt a multi-objective optimization model (such as the NSGA-II genetic algorithm), with maximizing the information density (number of elements / unit area) and minimizing visual interference (blur caused by too small spacing) as the optimization objectives, and dynamically solve the optimal stacking density threshold. When calculating the stacking density, divide the page into a dynamic grid, and calculate the element positions through a constraint solver, such as: the Cassowary algorithm. For example, when the density is high, reduce the grid spacing, and the elements are arranged compactly at the minimum spacing, such as: 2mm; when the density is low, expand the spacing to a comfortable range, such as: 10mm. Set the width ratio priority according to the element type (text, chart, image). For example, the main picture occupies 70% of the width, and the explanatory text occupies 30%. When the density increases, compress the non-core elements proportionally. Adjust the line spacing according to the font size and density. For example, when the density threshold is 80%, the line height is 1.2 times the font size, and when the threshold is 95%, it drops to 1.0 times the font size and text abbreviation is enabled. Start a backtracking algorithm for overlapping elements, and preferentially move secondary elements, such as: footer notes or enable a folding control, such as: the "click to expand" area.

[0099] Embodiment 10: As Figure 2 shown, the present application proposes a system for creating a print template through a custom report, including: Graphical interface processing module: Receive template elements and typesetting instructions input by the user through a graphical interface; Port configuration module: Build an API port for dynamically associating template elements with heterogeneous data sources; Typesetting logic judgment module: Configure a programmable logic judgment mechanism at the API port to determine the medium characteristics corresponding to the template elements; wherein, the programmable logic judgment mechanism determines the display / hide state and style parameters of the template elements based on preset writable rules; Template generation module: Determine a paging strategy according to the medium characteristics and typesetting instructions, and dynamically adjust the element spacing and typesetting ratio to generate a target print template.

[0100] The execution process of this system is as described in the above method for creating a print template through a custom report.

[0101] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.

Claims

1. A method for creating a printing template by customizing a report, characterized in that: include: Receive template elements and layout instructions input by users through a graphical interface; Build an API port that dynamically associates template elements with heterogeneous data sources; A programmable logic judgment mechanism is configured at the API port to determine the medium characteristics corresponding to the template element; wherein the programmable logic judgment mechanism determines the display / hide state and style parameters of the template element based on preset writable rules; According to the media characteristics and layout instructions, the paging strategy is determined, and the element spacing and layout ratio are dynamically adjusted to generate the target printing template.

2. A method for creating a print template by customizing a report according to claim 1, characterized in that: The graphical interface is also used for drag-and-drop component layout, including: Receive in real time the behavior operation parameters of the user's drag operation; wherein the behavior operation parameters include drag speed, track offset, operation pause frequency and user preference components; According to the behavior operation parameters, the suitability scores of the free layout mode and the assisted alignment mode are calculated; wherein, Determine whether the suitability score of the free layout mode / assisted alignment mode exceeds a threshold, and automatically switch to a target layout mode with a higher score when the suitability score does not reach the threshold; According to the target layout mode and the user's drag operation, the dragged component is generated at the corresponding position and the current interface is rendered.

3. A method for creating a print template by customizing a report according to claim 2, characterized in that: The real-time receiving of the behavior operation parameters of the user's dragging operation also includes: According to the behavior operation parameters, determine the cursor coordinate point sequence of the dragging trajectory; According to the cursor coordinate point sequence, the trajectory curvature change rate and the proximity index are calculated; wherein the trajectory curvature change rate is the set of curvature changes of adjacent coordinate points in the dragging trajectory; Build a dynamically aligned grid generator and calculate the target drag endpoint based on the proximity metric.

4. A method for creating a print template by customizing a report according to claim 1, characterized in that: The API port for dynamically associating template elements with heterogeneous data sources includes: According to the heterogeneous data source, determining a protocol adaptation layer associated with the template element; wherein an association identifier is configured between the template element and the heterogeneous data source; According to the protocol adaptation layer, a dynamic data mapping mode is constructed; Using the dynamic data mapping mode, a dynamic association verification mechanism is established based on the reinforcement learning model to calculate the association confidence; According to the dynamic association verification mechanism, configure the adaptive reconnection protocol of the API port and establish a data pipeline.

5. A method for creating a print template by customizing a report according to claim 1, characterized in that: The API port is used to bind database fields, API interface parameters and real-time calculation results, including: Receiving a declarative binding configuration, wherein the declarative binding configuration includes a mapping relationship between a template element identifier and a heterogeneous data source, wherein the heterogeneous data source includes at least a database field, an API interface parameter, and a real-time calculation result stream; A multi-source connection channel is established through a dynamic protocol adaptation layer, where: The database field connector uses JDBC / ODBC connection pool sharding technology to dynamically allocate connection resources according to the number of bound elements; The API interface adapter builds a parameter-dependent directed acyclic graph and determines the cross-source call order through topological sorting; The real-time computing bridge converts window function declarations into executable instructions for the stream processing engine; Perform the space-time dimension alignment operation: Attach logical clock tags to each data source and use the Lamport timestamp algorithm to build a global event sequence; Unify the multi-source space coordinates into a standard reference system through an affine transformation matrix; Implement incremental multi-level hash merging, including: Construct a composite index structure of basic hash layer, version hash layer and time-space hash layer; Create B+ tree indexes for database fields, store API parameter values ​​in skip lists, and write real-time calculation results into double-buffered ring queues; Dynamically resolve data binding conflicts when inconsistencies in multi-source data are detected: Calculate a score for the conflict factor, which incorporates data freshness, pattern difference, and spatial overlap; The final binding value is generated by selecting priority coverage, weighted fusion or machine learning arbitration according to the preset strategy.

6. A method for creating a print template by customizing a report according to claim 1, characterized in that: The configuring of a programmable logic judgment mechanism at the API port to determine the medium characteristics corresponding to the template element includes: Extracting element features corresponding to the template elements, and determining element type identifiers and parameter constraints corresponding to the element features; Determine the first medium characteristic according to the element type identifier; wherein the first medium characteristic includes a data source type, a real-time requirement threshold, and a structured data format identifier; Determine a second medium characteristic according to the parameter constraint condition; wherein the second medium characteristic is a medium matching characteristic for performing logical identification of template elements based on the first medium characteristic; According to the first medium characteristic and the second medium characteristic, a medium matching matrix of the template element is constructed, and a programmable logic judgment mechanism is generated through the medium matching matrix.

7. A method for creating a print template by customizing a report according to claim 6, characterized in that: The medium matching matrix of the template element is constructed, and further includes: When there is a template element that complies with a plurality of first medium characteristics and second medium characteristics; Based on the historical success rate of elements, the response time of element media and the compatibility of element formats, a Bayesian optimization model is constructed to determine the optimal instruction matching; According to the optimal element matching, the decision path of each template element is extracted in the medium matching matrix.

8. A method for creating a print template by customizing a report according to claim 1, characterized in that: Determining the paging strategy according to the medium characteristics and the typesetting instructions includes: Determine a data parameter set of a single interface in the graphical interface according to the medium characteristics, wherein the data parameter set at least includes a template element width, a template element length, and a data density of the template element; According to the data parameter set and sorting instructions, the data threshold of a single interface is determined, and an elastic paging strategy is set; wherein the elastic paging strategy includes streaming paging, cursor paging and automatic compensation paging.

9. A method for creating a print template by customizing a report according to claim 1, characterized in that: The dynamically adjusting element spacing and typesetting ratio to generate a target printing template includes: Set the element stacking density according to the paging strategy and the preset page clarity standard; According to the element stacking density, the element spacing and layout ratio are adjusted to generate a target printing template; wherein the target printing template includes a cross-format output template of PDF, HTML, graphical report and industrial printer control instructions.

10. A system for creating a printing template by customizing a report, characterized in that: include: Graphical interface processing module: receiving template elements and typesetting instructions input by users through the graphical interface; Port configuration module: builds API ports that dynamically associate template elements with heterogeneous data sources; Typesetting logic judgment module: configure a programmable logic judgment mechanism at the API port to determine the medium characteristics corresponding to the template elements; wherein the programmable logic judgment mechanism determines the display / hide state and style parameters of the template elements based on preset writable rules; Template generation module: Determines the paging strategy based on media characteristics and layout instructions, and dynamically adjusts element spacing and layout ratio to generate the target printing template.

Citation Information

Cited By

  • OA approval document intelligent typesetting and optimized printing method based on dynamic template engine

    CN120911404A

  • Portable printing method and system based on custom template

    CN121233063A

  • Method for converting general printing instruction into equipment special instruction

    CN122331847A