Data information printing method and device, equipment, medium and program product

By using HTML-based web template library and operating system printing service, the compatibility problems of traditional MFC technology in the Innovative Operating System and the high development and maintenance cost are solved, flexible dynamic template adjustment and layout are realized, and users are enhanced Experience and print functionality applicability.

CN119473181APending Publication Date: 2025-02-18CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411506085.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

Traditional MFC technology is incompatible in the ICN operating system environment, and the development and maintenance costs are high. The existing printing controls have shortcomings in dynamic template support and adjustment, so they cannot flexibly respond to diversified printing needs.

Method used

A web template library written based on Hypertext Markup Language (HTML) is used to obtain data information and template identification information by responding to data printing requests, fill web templates, type them, and generate portable document format files, using the printing service of the target operating system Print.

Benefits of technology

It realizes compatibility in the ICN operating system environment, reduces development and maintenance costs, supports dynamic template adjustment and layout, and improves the flexibility of user experience and printing functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473181A_ABST
    Figure CN119473181A_ABST
Patent Text Reader

Abstract

The invention discloses a data information printing method and device, equipment, a medium and a program product, and belongs to the technical field of big data. The method comprises the steps of obtaining data information and template identification information in a data printing request in response to the data printing request; in a preset webpage template library, obtaining a webpage template corresponding to the template identification information, the webpage template being obtained by writing based on a preset hypertext markup language; filling a preset position of the webpage template with the data information to obtain a target webpage template; according to preset parameters, typesetting contents in the target webpage template to generate a portable document format file; and printing the portable document format file by using the printing service of the target operating system. According to the embodiment of the invention, different operating system environments can be compatible, dynamic template adjustment and typesetting are supported, the development and maintenance cost is reduced, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of big data technology, and in particular relates to a method, device, equipment, medium and program product for printing data information. Background Art

[0002] In the current information environment, the printing function of data information plays a vital role in various business scenarios, especially in the fields of banking, finance, and corporate office. Although traditional data information printing methods, such as printing technology based on the Microsoft Foundation Class Library (MFC), performed well in the past Windows operating system environment, with the continuous advancement of information technology and the in-depth implementation of the Xinchuang (information technology application innovation) strategy, these traditional technologies are facing more and more challenges.

[0003] First, the incompatibility of MFC technology in the Info-Chuang operating system environment is becoming increasingly prominent. Due to differences in system architecture and API interfaces, the data information printing function developed using MFC technology cannot work properly on the Info-Chuang operating system, which has brought great obstacles to the migration and upgrade of business systems.

[0004] Secondly, the development and maintenance costs of MFC technology are high. As a traditional code encoding method, the development and maintenance process of MFC technology is relatively cumbersome and complex, requiring a lot of manpower and time investment. Especially when developing printing functions for different types of vouchers and reports, MFC technology often requires a lot of customized development, which not only increases the development cost, but also increases the difficulty of later maintenance.

[0005] In addition, the existing printing controls on the market have obvious shortcomings in terms of dynamic template support and adjustment. These controls are often unable to flexibly respond to diverse printing needs, especially in scenarios that require processing large amounts of data information and complex typesetting requirements. This further weakens the flexibility and applicability of data information printing and affects the user experience.

[0006] Therefore, in order to meet these challenges, the industry urgently needs a new method for printing data information. Summary of the invention

[0007] The embodiments of the present application provide a method, apparatus, device, medium and program product for printing data information, which can solve the problems of incompatibility of traditional MFC technology in the trusted operating system environment, complex development and maintenance, and insufficient support for dynamic templates of printing controls. It is compatible with different operating system environments, supports dynamic template adjustment and typesetting, reduces development and maintenance costs, and improves user experience.

[0008] In a first aspect, an embodiment of the present application provides a method for printing data information, comprising:

[0009] In response to the data printing request, acquiring data information and template identification information in the data printing request;

[0010] In a preset web page template library, obtaining a web page template corresponding to the template identification information, wherein the web page template is written based on a preset hypertext markup language;

[0011] Fill the data information into the preset position of the webpage template to obtain the target webpage template;

[0012] According to preset parameters, the content in the target web page template is typeset to generate a portable document format file;

[0013] Prints a Portable Document Format file using the target operating system's print services.

[0014] In a possible embodiment of the first aspect, the data information includes text information, and the text information includes text content and text style; the data information is filled into a preset position of a webpage template to obtain a target webpage template, including:

[0015] According to the text style, fill the text content into the preset position of the web page template to obtain the target web page template.

[0016] In a possible embodiment of the first aspect, the data information includes text information, and the text information includes text content; the data information is filled into a preset position of a webpage template to obtain a target webpage template, including:

[0017] According to the first preset text style, the text content is filled into the preset position of the webpage template to obtain the target webpage template.

[0018] In a possible embodiment of the first aspect, filling text content into a preset position of a webpage template according to a first preset text style to obtain a target webpage template includes:

[0019] Obtain information of a preset text content information library corresponding to the first preset text style;

[0020] In the case that the preset text content information library does not include the text content, the text content is filled into the preset position of the webpage template according to the second preset text style to obtain the target webpage template.

[0021] In a possible embodiment of the first aspect, the data information includes at least one of text information, QR code information, electronic signature information and electronic seal information.

[0022] In a possible embodiment of the first aspect, before typeset the content in the target webpage template according to preset parameters to generate a portable document format file, the data information printing method further includes:

[0023] On the target page, display information of the target web page template;

[0024] When receiving a first input in the target page, obtaining input information in the first input;

[0025] Adjust the target webpage template according to the input information to obtain an adjusted target webpage template;

[0026] According to the preset parameters, the content in the target web page template is typeset to generate a portable document format file, including:

[0027] According to preset parameters, the content in the adjusted target web page template is typeset to generate a portable document format file.

[0028] On the target page, the target page template information is displayed.

[0029] Based on the same inventive concept, in a second aspect, the embodiment of the present application further provides a data information printing device, comprising:

[0030] An acquisition module, used for acquiring data information and template identification information in the data printing request in response to the data printing request;

[0031] The acquisition module is further used to acquire the webpage template corresponding to the template identification information in a preset webpage template library, wherein the webpage template is written based on a preset hypertext markup language;

[0032] A filling module is used to fill data information into a preset position of a web page template to obtain a target web page template;

[0033] A typesetting module, used for typeset content in a target web page template according to preset parameters and generates a portable document format file;

[0034] Print module, used to print Portable Document Format files using the target operating system's print services.

[0035] Based on the same inventive concept, in the third aspect, an embodiment of the present application also provides a data information printing device, which includes a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the first aspect, or the data information printing method in any embodiment of the first aspect.

[0036] Based on the same inventive concept, in the fourth aspect, an embodiment of the present application further provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the first aspect or the method for printing data information in any embodiment of the first aspect is implemented.

[0037] Based on the same inventive concept, in the fifth aspect, the embodiment of the present application also provides a computer program product. When the instructions in the computer program product are executed by the processor of the device, the device can execute the first aspect, or the method for printing data information in any embodiment of the first aspect.

[0038] The printing method, device, equipment, medium and program product of the data information of the embodiment of the present application, the method selects a suitable web page template from a rich web page template library according to the template identification information in the request by instant response to the data printing request, accurately fills the data information into the preset position of the web page template, and generates a target web page template, wherein the web page template generated by HyperText Markup Language (HTML) has more functions, higher flexibility, and is easier to expand and maintain. Then, according to the preset typesetting parameters, such as the specified conversion area, fixed resolution, scaling and other parameters, the content in the web page template is typeset, so that the consistency of the portable document format files generated by different browsers can be guaranteed. Finally, the printing service provided by the target operating system (such as the Xinchuang operating system) is used to realize the printing of portable document format files, without relying on a specific operating system environment, ensuring the wide compatibility and high availability of the printing function, and can solve the problems of incompatibility of traditional MFC technology in the Xinchuang operating system environment, complex development and maintenance, and insufficient support for dynamic templates of printing controls, and can be compatible with different operating system environments, support dynamic template adjustment and typesetting, reduce development and maintenance costs, and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Other features, objects and advantages of the present application will become more apparent by reading the following detailed description of non-limiting embodiments with reference to the accompanying drawings, in which the same or similar reference numerals represent the same or similar features and the accompanying drawings are not drawn to scale.

[0040] Figure 1 It is a flow chart of a method for printing data information provided in an embodiment of the present application;

[0041] Figure 2 This is another flow chart of the method for printing data information provided in the embodiment of the present application;

[0042] Figure 3It is another flow chart of the method for printing data information provided in the embodiment of the present application;

[0043] Figure 4 This is another flow chart of the method for printing data information provided in the embodiment of the present application;

[0044] Figure 5 This is another flow chart of the method for printing data information provided in the embodiment of the present application;

[0045] Figure 6 This is an overall architecture diagram of the data information printing method provided in the embodiment of the present application;

[0046] Figure 7 This is another flow chart of the method for printing data information provided in the embodiment of the present application;

[0047] Figure 8 It is a structural schematic diagram of a data information printing device provided in an embodiment of the present application;

[0048] Fig. 9 It is a structural schematic diagram of a data information printing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present application and are not configured to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0050] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0051] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0052] It is obvious to those skilled in the art that various modifications and changes can be made in the present application without departing from the spirit or scope of the present application. Therefore, the present application is intended to cover modifications and changes of the present application that fall within the scope of the corresponding claims (technical solutions for protection) and their equivalents. It should be noted that the implementation methods provided in the embodiments of the present application can be combined with each other without contradiction.

[0053] It should be noted that the acquisition, storage, use and processing of data in the embodiments of the present application are in compliance with the relevant provisions of national laws and regulations.

[0054] It should also be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0055] Before describing the technical solutions provided by the embodiments of the present application, in order to facilitate the understanding of the embodiments of the present application, the present application first specifically describes the problems existing in the related art:

[0056] In the current information environment, the printing function of data information plays a vital role in various business scenarios, especially in the fields of banking, finance, and corporate office. Although traditional data information printing methods, such as printing technology based on the Microsoft Foundation Class Library (MFC), performed well in the past Windows operating system environment, with the continuous advancement of information technology and the in-depth implementation of the Xinchuang (information technology application innovation) strategy, these traditional technologies are facing more and more challenges.

[0057] First, the incompatibility of MFC technology in the Info-Chuang operating system environment is becoming increasingly prominent. Due to differences in system architecture and API interfaces, the data information printing function developed using MFC technology cannot work properly on the Info-Chuang operating system, which has brought great obstacles to the migration and upgrade of business systems.

[0058] Secondly, the development and maintenance costs of MFC technology are high. As a traditional code encoding method, the development and maintenance process of MFC technology is relatively cumbersome and complex, requiring a lot of manpower and time investment. Especially when developing printing functions for different types of vouchers and reports, MFC technology often requires a lot of customized development, which not only increases the development cost, but also increases the difficulty of later maintenance.

[0059] In addition, the existing printing controls on the market have obvious shortcomings in terms of dynamic template support and adjustment. These controls are often unable to flexibly respond to diverse printing needs, especially in scenarios that require processing large amounts of data information and complex typesetting requirements. This further weakens the flexibility and applicability of data information printing and affects the user experience.

[0060] Therefore, in order to meet these challenges, the industry urgently needs a new method for printing data information.

[0061] Based on this, the embodiments of the present application provide a method, device, equipment, medium and program product for printing data information, which can solve the problems of incompatibility of traditional MFC technology in the trusted operating system environment, complex development and maintenance, and insufficient support for dynamic templates of printing controls. It is compatible with different operating system environments, supports dynamic template adjustment and typesetting, reduces development and maintenance costs, and improves user experience.

[0062] The following is a detailed description of the method for printing data information provided in the embodiment of the present application in conjunction with the accompanying drawings.

[0063] Figure 1 is a flow chart of a method for printing data information provided by an embodiment of the present application, such as Figure 1 As shown, the method may include steps S110 to S150.

[0064] S110, in response to the data printing request, acquiring data information and template identification information in the data printing request.

[0065] The data printing request is a printing request for data information sent by the application system.

[0066] Specifically, in response to a data printing request, the data information to be printed and the template identification information contained in the request are extracted.

[0067] S120, obtaining a web page template corresponding to the template identification information in a preset web page template library, wherein the web page template is written based on a preset hypertext markup language.

[0068] Among them, Hyper Text Markup Language (HTML) is a descriptive markup language that can define the structure and content of a web page template.

[0069] Specifically, in a web page template set written in the predefined hypertext markup language HTML, the web page template corresponding to the template identification information can be retrieved and obtained according to the provided template identification information. The hypertext markup language HTML has significant advantages such as rich functions, high flexibility, easy expansion and maintenance, so the web page template written in the predefined hypertext markup language HTML can easily realize the dynamic filling and layout adjustment of the voucher content, and support a variety of font styles and layout methods to meet diverse printing needs.

[0070] S130, filling the data information into the preset position of the webpage template to obtain the target webpage template.

[0071] Specifically, by accurately filling the data information to be printed into the specified position in the pre-designed web page template, a target web page template containing the data information can be generated.

[0072] S140, typeset the content in the target web page template according to preset parameters to generate a portable document format file.

[0073] The preset parameters are parameters related to typesetting, such as preset conversion area, resolution size, scaling ratio, etc. The preset parameters can be set as needed, and the present application embodiment does not limit this.

[0074] Portable Document Format (PDF) files can contain a variety of elements such as text, images, links, audio and video, and are compatible across platforms, devices and applications. No matter which operating system or software the user is using, they can view and print PDF files without losing formatting or content.

[0075] Specifically, according to pre-set layout parameters (such as preset conversion area, resolution size, zoom ratio and other parameters), the target web page template that has been filled with content is converted and saved as a portable document format (such as PDF) file that is easy to share, view and print.

[0076] It should be noted that since the filled-in target web page template relies on the rendering and display of the browser, resulting in different display effects on different monitors, you can specify layout parameters such as conversion area, fixed resolution, zoom ratio, etc., and convert the target web page template into a portable document format file to ensure output consistency.

[0077] S150, using the print service of the target operating system to print the portable document format file.

[0078] Specifically, the built-in printing service function of the target operating system is called to send the portable document format,file to the connected printer for physical print output.

[0079] According to the printing method of data information provided by the embodiment of the present application, by responding immediately to the data printing request, accurately according to the template identification information in the request, select a suitable web page template from a rich web page template library, accurately fill the data information into the preset position of the web page template, and generate a target web page template, wherein the web page template generated by HyperText Markup Language (HTML) has more functions, higher flexibility, and is easier to expand and maintain. Then, according to the preset typesetting parameters, such as the specified conversion area, fixed resolution, scaling and other parameters, the content in the web page template is typeset, so that the consistency of the portable document format files generated by different browsers can be guaranteed. Finally, the printing service provided by the target operating system (such as the Xinchuang operating system) is used to realize the printing of portable document format files, without relying on a specific operating system environment, ensuring the wide compatibility and high availability of the printing function, and being able to solve the problems of incompatibility of traditional MFC technology in the Xinchuang operating system environment, complex development and maintenance, and insufficient support for dynamic templates of printing controls. It can be compatible with different operating system environments, support dynamic template adjustment and typesetting, reduce development and maintenance costs, and improve user experience.

[0080] Figure 2 This is another flow chart of the method for printing data information provided in the embodiment of the present application.

[0081] In some embodiments, Figure 2 As shown, the data information includes text information, and the text information includes text content and text style. Step S130 fills the data information into the preset position of the webpage template to obtain the target webpage template, which may include step S131.

[0082] S131, filling the text content into the preset position of the webpage template according to the text style to obtain the target webpage template.

[0083] The data information may include text information.

[0084] Text information may include text content and text style.

[0085] Text style refers to the appearance of text, which can include font type (such as Songti, Heiti, Kaiti, etc.), font size (such as 12, 14, 16, etc.), font color, font bold, font italic, underline, strikethrough and other attributes. Text style is used to define the visual appearance of text in a web page or document to meet specific needs.

[0086] Specifically, when the data information input by the user includes text information and the text information includes text content and text style, for example, the text content is accurately placed at a predetermined position of the web page template according to the specific style of the text (such as font, size, color, etc.), thereby generating the desired target web page template.

[0087] In the embodiment of the present application, when the data information input by the user includes text information and the text information includes text content and text style, the text information containing user-customized text content and text style (such as font type, size, color, bold, italic, underline, etc.) can be fully utilized, and a highly customized target web page template can be generated by accurately filling this information into the preset position of the web page template, thereby greatly improving the efficiency and accuracy of template production, being able to accurately meet specific printing needs, and improving user experience.

[0088] Figure 3 This is another flow chart of the method for printing data information provided in the embodiment of the present application.

[0089] In some embodiments, Figure 3 As shown, the data information includes text information, and the text information includes text content. Step S130 fills the data information into the preset position of the webpage template to obtain the target webpage template, which may include step S132.

[0090] S132, filling the text content into the preset position of the webpage template according to the first preset text style to obtain the target webpage template.

[0091] The first preset text style is a predefined text appearance setting (such as font, size, color, etc.).

[0092] Specifically, when the data information input by the user includes text information (only text content), the text content can be filled into the designated position of the webpage template according to the default first text style (such as default font, default size, default color, etc.), thereby generating a target webpage template that meets the unified preset format requirements. For example, the first preset text style is Songti size 4 black, then when the text information input by the user does not include a text style, the default first preset text style is used to fill the text content in the text information into the webpage template.

[0093] When the user only provides text information of text content, the embodiment of the present application can automatically and accurately fill these contents into the specified position of the web page template according to the pre-set first text style, quickly generate a target web page template that meets the unified preset format requirements, and greatly improve the efficiency of document production.

[0094] Figure 4 This is another flow chart of the method for printing data information provided in the embodiment of the present application.

[0095] In some embodiments, Figure 4 As shown, step S132 fills the text content into the preset position of the web page template according to the first preset text style to obtain the target web page template, which may include steps S1321 and S1322.

[0096] S1321, obtaining information of a preset text content information library corresponding to the first preset text style.

[0097] The preset text content information library corresponds to the preset text style (such as font) one by one. For example, Songti corresponds to one preset text content information library, and Heiti corresponds to another preset text content information library, and each font has its own preset text content information library.

[0098] Specifically, when the text information input by the user only includes text content, the default first preset text style can be used to fill the text content into the webpage template. It is necessary to first find a preset text content information library corresponding to the first preset text style, which includes all preset text contents that conform to the first preset text style.

[0099] S1322: When the preset text content information library does not include the text content, fill the text content into the preset position of the web page template according to the second preset text style to obtain the target web page template.

[0100] Specifically, if the preset text content information library corresponding to the first preset text style does not have preset text content that matches the text content specified by the user, the second preset text style can be used instead, and the text content specified by the user can be filled into the preset position of the webpage template, thereby generating a target webpage template. For example, if the preset text content information library corresponding to Songti does not include the text content specified by the user, the subsequent fonts can be used until the preset text content information library corresponding to the subsequent fonts includes the text content specified by the user. This solves the problem that rare characters cannot be printed.

[0101] In the embodiment of the present application, when the user only provides text information of text content, by presetting a text content information library that corresponds one to one with text styles, the content of the first preset text style is preferentially tried to match, and if there is no match, it is automatically converted to the second preset text style, thereby ensuring that the text content specified by the user (including possible rare characters) can be accurately filled into the preset position of the web page template, thereby effectively generating a target web page template, improving the compatibility and flexibility of printing or displaying data information, and being able to flexibly respond to printing needs of different text content.

[0102] In some embodiments, the data information includes at least one of text information, QR code information, electronic signature information, and electronic seal information.

[0103] The data information of the embodiments of the present application may include at least one of text information, QR code information, electronic signature information and electronic seal information, which greatly enriches the expression form and application scenarios of data information, improves the flexibility and integrity of data information printing, and meets diversified and complex printing needs.

[0104] Figure 5 Another flowchart of a method for printing data information provided in an embodiment of the present application.

[0105] In some embodiments, Figure 5 As shown, before the content in the target webpage template is typeset according to preset parameters and a portable document format file is generated in step S140, the data information printing method further includes steps S161 to S163.

[0106] S161, on the target page, display information of the target web page template.

[0107] Specifically, the specific content of the completed target web page template is displayed on the target page, and the information of the target web page template before printing can be intuitively displayed, which is convenient for users to preview and confirm.

[0108] S162: When receiving a first input in the target page, obtain input information in the first input.

[0109] Among them, after the user previews the information of the target webpage template on the target page, if the template information needs to be modified, the user can enter the corresponding modification content by clicking the target control in the target page, and the modification content can be called the first input.

[0110] Specifically, when the user performs an input operation to modify the content on the target page, the information included in the input can be obtained.

[0111] S163, adjusting the target webpage template according to the input information to obtain an adjusted target webpage template.

[0112] Specifically, based on the modification content input by the user in the target page, the target webpage template can be modified accordingly, thereby generating an adjusted target webpage template that better meets the user's needs.

[0113] Step S140 typesets the content in the target webpage template according to preset parameters to generate a portable document format file, which may include step S141.

[0114] S141, typeset the content in the adjusted target web page template according to preset parameters to generate a portable document format file.

[0115] Specifically, according to the pre-set layout parameters, the adjusted target webpage template content can be formatted and laid out, and finally saved as a portable document format (such as PDF) file.

[0116] The embodiment of the present application can intuitively display the information of the target web page template before printing by displaying the information of the target web page template on the target page, which is convenient for users to preview and confirm, improves the accuracy of printing, and can adjust the template by entering modification content when the user needs. Finally, the adjusted template is typeset according to preset parameters and a portable document format file is generated, thereby improving printing efficiency and accuracy and better meeting the needs of users.

[0117] Figure 6 It is an overall architecture diagram of the data printing method provided in the embodiment of the present application.

[0118] In one example, if Figure 6 As shown, the printing of data information can be completed through the application system, data printing middleware, ICT terminal and printer. The data printing middleware may include a data printing business processing module and an HTML to PDF tool. The application system is used to issue a data printing request. The data printing business processing module in the data printing middleware is used to respond to the data printing request, extract the data information and template identification information in the data printing request, and fill the data information into the web page template corresponding to the template identification information. After generating the target web page template, call the HTML to PDF tool to convert the target web page template into a portable document format file, and then call the printing service of the ICT terminal to send the portable document format file to the printer to drive the printer to print the document.

[0119] Among them, the trusted computing terminal is the domestically produced operating system terminal of the trusted computing system, such as: counter customer terminal, STM, STAM, etc.

[0120] It should be noted that middleware is a type of software between the application system and the system software. It uses the basic services provided by the system software to connect the various parts of the application system or different applications on the network, and can achieve the purpose of resource sharing and function sharing. Middleware technology can shield the heterogeneity between hardware platforms and the differences between operating systems and network protocols, so that the application system can run smoothly and efficiently on different platforms. In the structure of the financial terminal application system, the middleware layer is located between the operating system layer and the application software layer.

[0121] It should also be noted that data printing middleware, as a peripheral middleware, can be widely transplanted to the peripheral terminals of domestic systems, and has wide adaptability and practicality.

[0122] The embodiment of the present application, through the collaborative work of the application system, data printing middleware, the trusted terminal and the printer, utilizes the business processing module and HTML to PDF tool in the data printing middleware, can efficiently fill the data information into the corresponding template and convert it into a PDF file, and then realize printing through the printing service of the trusted terminal. It can solve the problems of incompatibility of traditional MFC technology in the trusted operating system environment, complex development and maintenance, and insufficient support for dynamic templates of printing controls. It is compatible with different operating system environments, supports dynamic template adjustment and typesetting, reduces development and maintenance costs, and improves user experience.

[0123] Figure 7 It is an overall architecture diagram of the data printing method provided in the embodiment of the present application.

[0124] In another example, Figure 7 As shown, the data printing method may include steps S01 to S11.

[0125] S01, in response to a data printing request, acquiring data information and template identification information in the data printing request.

[0126] For example, the data information in the data printing request is voucher information. The user can check the accuracy of the account transaction record and resource balance by consulting the printed voucher to ensure that the account information is correct.

[0127] It should be noted that most of the controls in the related technologies do not support dynamic voucher templates or the voucher templates are difficult to adjust. In addition, the printing technology based on the Microsoft Foundation Class Library (MFC) uses code for template encoding, which is very inflexible and requires complex encoding for each voucher.

[0128] S02, obtaining a web page template corresponding to the template identification information in a preset web page template library, wherein the web page template is written based on a preset hypertext markup language HTML.

[0129] Web page templates are implemented using HTML, which is very flexible and can respond to business printing needs quickly and instantly compared to existing templates in other programming languages ​​(such as C++ templates).

[0130] S03, when the data information includes text information and the text information includes text content and text style, fill the text content into a preset position of the webpage template according to the text style to obtain a target webpage template.

[0131] When the data information input by the user includes text information and the text information includes text content and text style, the text information containing user-customized text content and text style (such as font type, size, color, bold, italic, underline, etc.) can be fully utilized. By accurately filling this information into the preset position of the web page template, a highly customized target web page template is generated, which greatly improves the efficiency and accuracy of template production, can accurately meet specific printing needs, and improves user experience.

[0132] For example, when the previous font cannot print a certain Chinese character, the subsequent font is used to print it instead to meet the printing requirements of rare characters.

[0133] S04: When the data information includes text information and the text information only includes text content, obtain information of a preset text content information library corresponding to the first preset text style.

[0134] S05: When the preset text content information library does not include the text content, fill the text content into the preset position of the webpage template according to the second preset text style to obtain the target webpage template.

[0135] When the user only provides text information of text content, through the preset text content information library that corresponds one to one with the text style, priority is given to trying to match the content of the first preset text style. If there is no match, it is automatically converted to the second preset text style, ensuring that the text content specified by the user (including possible uncommon characters) can be accurately filled in the preset position of the web page template, thereby effectively generating the target web page template, improving the compatibility and flexibility of printing or displaying data information, and being able to flexibly respond to the printing needs of different text content, which can solve the problem that existing domestically produced terminals do not support uncommon characters.

[0136] It should be noted that the fpdfsdk open source solution is used in some related technologies. The text content of the voucher print is converted into a pdf file using the fpdfsdk api, and then the cups printing component instruction of the trusted operating system is called to print the pdf, thereby realizing voucher printing. However, during the operation of the first version of the trusted voucher printing function mentioned above, a series of problems occurred: 1) The voucher printing template is not flexible. fpdf is a python sdk, and complex encoding using the python language is required for each voucher. 2) fpdfsdk does not support the implementation of font attributes such as bold and italics. Since only one font can be set (the existing uncommon character standard GB18030-2022 requires three fonts to cover all Chinese character glyphs), it is also impossible to achieve complete uncommon character printing.

[0137] S06, filling the QR code information, electronic signature information and electronic seal information in the data information into the preset position in the web page template.

[0138] For example, the data printing business processing module escapes HTML according to the text elements sent by the application system and draws it in the HTML web page template, supports italics, bold and underline, and supports the configuration of multiple fonts; escapes HTML according to the voucher QR code elements sent by the application system, converts the QR code text into a QR code image and draws it in the HTML web page template; escapes HTML according to the voucher electronic signature elements sent by the application system, draws the electronic signature image in the HTML web page template; escapes HTML according to the voucher electronic seal elements sent by the application system, and draws the electronic seal image in the HTML web page template.

[0139] S07, on the target page, displaying information of the target web page template.

[0140] S08: When receiving a first input in the target page, obtain input information in the first input.

[0141] S09, adjusting the target webpage template according to the input information to obtain an adjusted target webpage template.

[0142] S10, typeset the content in the adjusted target webpage template according to preset parameters to generate a portable document format file. Convert to PDF before printing, the PDF typesetting is fixed and does not depend on the printer's typesetting. Compared with the traditional method of sending instructions to the printer, the PDF typesetting and printing method has obvious advantages.

[0143] For example, the data printing service processing module calls the HTML to PDF tool to convert the HTML template with drawn content into PDF.

[0144] S11, using the print service of the target operating system to print the portable document format file.

[0145] The embodiment of the present application supports dynamic customization and adjustment of printed content, including text styles, QR codes, electronic signatures, and electronic seals, by flexibly using HTML web page templates. At the same time, it solves the problem of printing uncommon characters, improves printing efficiency and accuracy, and ensures the consistency and independence of printing layout by converting to PDF format files in advance, thereby optimizing the printing effect.

[0146] In one example, a web page template is developed using HTML, and JavaScript scripts are used to add interactivity and dynamic functions to the web page template, so that the web page template can respond to user operations and events (such as data printing requests), and implement complex logic processing and data operations, and can fill data information into the web page template to generate a target web page template. Due to the flexibility of HTML and JavaScript, the web page template can flexibly adjust the text size, text style, image size and graphic style of specific credential fields. This solves the problem that the original Python / C++ template can only adjust the entire text or graphic.

[0147] Based on the same inventive concept, the embodiment of the present application also provides a data information printing device, such as Figure 8 As shown, the device 800 may include an acquisition module 810 , a filling module 820 , a typesetting module 830 and a printing module 840 .

[0148] The acquisition module 810 is used to acquire data information and template identification information in the data printing request in response to the data printing request;

[0149] The acquisition module 810 is further used to acquire a web page template corresponding to the template identification information in a preset web page template library, wherein the web page template is written based on a preset hypertext markup language;

[0150] Filling module 820, used to fill data information into the preset position of the webpage template to obtain the target webpage template;

[0151] The layout module 830 is used to layout the content in the target web page template according to preset parameters and generate a portable document format file;

[0152] The printing module 840 is used to print a portable document format file using the printing service of the target operating system.

[0153] According to the data information printing device provided by the embodiment of the present application, by responding immediately to the data printing request, accurately according to the template identification information in the request, select a suitable web page template from a rich web page template library, accurately fill the data information into the preset position of the web page template, and generate a target web page template, wherein the web page template generated by HyperText Markup Language (HTML) has more functions, higher flexibility, and is easier to expand and maintain. Then, according to the preset typesetting parameters, such as the specified conversion area, fixed resolution, scaling and other parameters, the content in the web page template is typeset, so that the consistency of the portable document format files generated by different browsers can be guaranteed. Finally, the printing service provided by the target operating system (such as the Xinchuang operating system) is used to realize the printing of portable document format files, without relying on a specific operating system environment, ensuring the wide compatibility and high availability of the printing function, and being able to solve the problems of incompatibility of traditional MFC technology in the Xinchuang operating system environment, complex development and maintenance, and insufficient support for dynamic templates of printing controls. It can be compatible with different operating system environments, support dynamic template adjustment and typesetting, reduce development and maintenance costs, and improve user experience.

[0154] In some embodiments, the data information includes text information, and the text information includes text content and text style; the filling module is used to fill the data information into the preset position of the webpage template to obtain the target webpage template, which can be specifically used for:

[0155] According to the text style, fill the text content into the preset position of the web page template to obtain the target web page template.

[0156] In some embodiments, the data information includes text information, and the text information includes text content; the filling module fills the data information into a preset position of the webpage template to obtain a target webpage template, which can be specifically used for:

[0157] According to the first preset text style, the text content is filled into the preset position of the webpage template to obtain the target webpage template.

[0158] In some embodiments, the filling module is used to fill the text content into the preset position of the webpage template according to the first preset text style to obtain the target webpage template, which can be specifically used to:

[0159] Obtain information of a preset text content information library corresponding to the first preset text style;

[0160] In the case that the preset text content information library does not include the text content, the text content is filled into the preset position of the webpage template according to the second preset text style to obtain the target webpage template.

[0161] In some embodiments, the data information includes at least one of text information, QR code information, electronic signature information, and electronic seal information.

[0162] In some embodiments, before the typesetting module is used to typeset the content in the target webpage template according to preset parameters to generate a portable document format file, the data information printing device further includes a display module:

[0163] A display module, used to display information of the target web page template on the target page;

[0164] The acquisition module is further used to acquire input information in the first input when receiving the first input in the target page;

[0165] An adjustment module, used to adjust the target webpage template according to the input information to obtain the adjusted target webpage template;

[0166] The layout module is used to layout the content in the target web page template according to preset parameters and generate a portable document format file, which can be used for:

[0167] According to preset parameters, the content in the adjusted target web page template is typeset to generate a portable document format file.

[0168] Each module in the data information printing device provided in the embodiment of the present application can realize Figures 1 to 7 The functions of each step of the method for printing data information provided, and the ability to achieve the corresponding technical effects, are not described in detail here for the sake of brevity.

[0169] Fig. 9 A schematic diagram of the hardware structure of a data information printing device provided in an embodiment of the present application is shown.

[0170] The data information printing device may include a processor 901 and a memory 902 storing computer program instructions.

[0171] Specifically, the processor 901 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0172] The memory 902 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 902 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 902 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 902 may be inside or outside a printing device for data information. In a particular embodiment, the memory 902 is a non-volatile solid-state memory.

[0173] The memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present disclosure.

[0174] The processor 901 reads and executes the computer program instructions stored in the memory 902 to implement any one of the data information printing methods in the above embodiments.

[0175] In one example, the data information printing device may further include a communication interface 903 and a bus 904. Fig. 9 As shown, the processor 901, the memory 902, and the communication interface 903 are connected via a bus 904 and communicate with each other.

[0176] The communication interface 903 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0177] The bus 904 includes hardware, software or both, coupling the components of the printing device of the data information to each other. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Linear Predictive Coding (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (Peripheral Component Interconnect-X, PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VESA Local Bus, VLB) bus or other suitable buses or a combination of two or more of these. Where appropriate, the bus 904 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.

[0178] The device can execute the data information printing method in the embodiment of the present application based on each unit / component in the data information printing device, thereby realizing the combination of Figures 1 to 7 Describes the printing method of data information.

[0179] In addition, in combination with the data information printing method in the above embodiment, the present application embodiment can provide a computer storage medium to implement. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the data information printing methods in the above embodiment is implemented.

[0180] The present application also provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes each process of implementing any one of the above-mentioned data information printing method embodiments.

[0181] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0182] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (Read-Only Memory, ROM), flash memory, erasable read-only memory (Erasable Read Only Memory, EROM), floppy disks, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical discs, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0183] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0184] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0185] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A method for printing data information, characterized in that: include: In response to a data printing request, acquiring data information and template identification information in the data printing request; In a preset web page template library, obtaining a web page template corresponding to the template identification information, wherein the web page template is written based on a preset hypertext markup language; Filling the data information into the preset position of the webpage template to obtain a target webpage template; Typesetting the content in the target webpage template according to preset parameters to generate a portable document format file; The portable document format file is printed using the print service of the target operating system.

2. The method according to claim 1, characterized in that The data information includes text information, and the text information includes text content and text style; the step of filling the data information into a preset position of the webpage template to obtain a target webpage template includes: According to the text style, the text content is filled into the preset position of the webpage template to obtain the target webpage template.

3. The method according to claim 1, characterized in that The data information includes text information, and the text information includes text content; The step of filling the data information into a preset position of the webpage template to obtain a target webpage template includes: According to a first preset text style, the text content is filled into a preset position of the webpage template to obtain a target webpage template.

4. The method according to claim 3, characterized in that The step of filling the text content into a preset position of the webpage template according to the first preset text style to obtain a target webpage template includes: Acquire information of a preset text content information library corresponding to the first preset text style; In the case that the preset text content information library does not include the text content, the text content is filled into the preset position of the webpage template according to a second preset text style to obtain a target webpage template.

5. The method according to claim 1, characterized in that The data information includes at least one of text information, two-dimensional code information, electronic signature information and electronic seal information.

6. The method according to any one of claims 1 to 5, characterized in that: Before typeset the content in the target webpage template according to preset parameters to generate a portable document format file, the method further includes: On the target page, display information of the target web page template; When receiving a first input in the target page, obtaining input information in the first input; According to the input information, the target webpage template is adjusted to obtain an adjusted target webpage template; The step of typeset-ing the content in the target webpage template according to preset parameters to generate a portable document format file includes: The content in the adjusted target webpage template is typeset according to preset parameters to generate a portable document format file.

7. A data information printing device, characterized in that: include: An acquisition module, configured to acquire data information and template identification information in response to a data printing request; The acquisition module is further used to acquire the webpage template corresponding to the template identification information in a preset webpage template library, wherein the webpage template is written based on a preset hypertext markup language; A filling module, used to fill the data information into the preset position of the webpage template to obtain a target webpage template; A typesetting module, used for typeset the content in the target webpage template according to preset parameters to generate a portable document format file; The printing module is used to print the portable document format file by using the printing service of the target operating system.

8. A data information printing device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the method for printing data information according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for printing data information according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of a device, the device is enabled to execute the method for printing data information according to any one of claims 1 to 6.