Print processing method, apparatus, device, and medium

CN117251121BActive Publication Date: 2026-10-23ZHEJIANG CAINIAO SUPPLY CHAIN MANAGEMENT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210647493.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-09
Publication Date
2026-10-23
Estimated Expiration
2042-06-09

AI Technical Summary

Technical Problem

[0004]在实际应用中,CPCL指令或TSPL指令中通常包含文本、图像等打印内容对应的描述,一条CPCL指令或一条TSPL指令通常占用数千字节的数据量,这使得打印过程中的数据传输文本较高

Benefits of technology

[0022]本申请实施例的技术方案中,在打印请求中携带的类型数据为更新类型的情况下,可以根据更新数据,将第二渲染对象更新为第三渲染对象。由于更新数据可以表征本次的打印对象相对于前次的打印对象的不同部分或更新部分;这样,相对于相关技术在 CPCL指令或TSPL指令中传输打印对象的完整数据,本申请实施例可以降低本次的打印对象(第二打印对象)与前次的打印对象(第一打印对象)的相同部分所对应的数据量,进而能够降低打印过程中的数据传输文本。在采用移动通信网络进行数据传输的情况下,本申请实施例还可以降低打印设备端的流量资费。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117251121B_ABST
    Figure CN117251121B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a printing processing method, device, equipment and medium, the method comprises: receiving a printing request; the printing request comprises at least two of the following data: template data, type data and update data; in the case of type data being a new type, according to the address of the template file, the template file is acquired, and according to the template file, the first rendering object is generated, and the first rendering object is saved to the storage device; or, in the case of type data being an update type, the second rendering object is acquired from the storage device, and the second rendering object is updated to the third rendering object according to the update data; according to the first rendering object or the third rendering object, determine the to-be-printed data in pixel points; printing according to the to-be-printed data. The embodiments of the present application can reduce the data transmission text in the printing process, can improve the printing processing efficiency, and can improve the matching degree between the printing results of different printers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of printing technology, and in particular to a printing processing method, a printing processing apparatus, an electronic device, and a storage medium. Background Technology

[0002] A printer is a computer output device used to print the results or intermediate results of computer calculations onto relevant media in a human-readable format, including numbers, letters, symbols, and graphics. Printers are used in various industries, such as printing restaurant receipts and logistics waybills. Currently, there are many types of printers on the market. Based on their data communication methods, printers can be divided into wired printers and wireless printers.

[0003] Currently, the common printing processing methods used in wireless printers typically utilize CPCL (Comtec Printer Control Language) or TSPL (Semiconductor Programming Language) commands to describe the print content and transmit CPCL or TSPL commands between the printer and the wireless printer.

[0004] In practical applications, CPCL or TSPL instructions typically contain descriptions of printed content such as text and images. A single CPCL or TSPL instruction usually occupies several thousand bytes of data, which results in a high volume of text data transmitted during the printing process. Summary of the Invention

[0005] This application provides a printing processing method that can reduce the amount of text data transmitted during the printing process, improve printing processing efficiency, and enhance the matching degree between print results from different printers.

[0006] Correspondingly, embodiments of this application also provide a printing processing apparatus, an electronic device, and a storage medium to implement and apply the above-described method.

[0007] To address the aforementioned problems, this application discloses a printing processing method, the method comprising:

[0008] Receive a print request; the print request includes at least two of the following data: template data, type data, and update data; the template data includes: the address of the template file; the type data includes: a new type or an updated type;

[0009] If the data type is a new type, the template file is obtained according to the address of the template file, and a first rendering object is generated according to the template file and saved to the storage device; or, if the data type is an updated type, a second rendering object is obtained from the storage device, and the second rendering object is updated to a third rendering object according to the updated data; the second rendering object is a rendering object that has already been saved in the storage device.

[0010] Based on the first rendering object or the third rendering object, determine the data to be printed in pixels.

[0011] Print according to the data to be printed.

[0012] To address the aforementioned issues, this application discloses a printing processing apparatus, comprising: a receiving module, a rendering object processing module, a rendering module, and a printing module;

[0013] The receiving module is configured to receive a print request; the print request includes: template data, type data, and update data; the template data includes: the address of the template file; the type data includes: a new type or an updated type;

[0014] The rendering object processing module includes: a first rendering object processing module or a second rendering object processing module;

[0015] The first rendering object processing module is used to obtain a template file according to the address of the template file when the type data is a new type, generate a first rendering object according to the template file, and save the first rendering object to a storage device.

[0016] The second rendering object processing module is used to retrieve the second rendering object from the storage device when the type data is an update type, and update the second rendering object to a third rendering object according to the update data; the second rendering object is a rendering object that has been saved in the storage device.

[0017] The rendering module is used to determine the data to be printed in pixels based on the first rendering object or the third rendering object.

[0018] The printing module is used to print according to the data to be printed.

[0019] To address the aforementioned problems, this application discloses an electronic device, including: a processor; and a memory storing executable code thereon, wherein when the executable code is executed, the processor performs the method as described in any of the above embodiments.

[0020] To address the aforementioned issues, embodiments of this application disclose one or more machine-readable media storing executable code thereon, which, when executed, causes a processor to perform the method as described in any of the above embodiments.

[0021] The embodiments of this application have the following advantages:

[0022] In the technical solution of this application embodiment, when the type data carried in the print request is of the update type, the second rendering object can be updated to the third rendering object according to the update data. Since the update data can characterize the different or updated parts of the current print object relative to the previous print object, compared to related technologies that transmit the complete data of the print object in CPCL or TSPL instructions, this application embodiment can reduce the amount of data corresponding to the same parts of the current print object (second print object) and the previous print object (first print object), thereby reducing the amount of data transmitted during the printing process. When using a mobile communication network for data transmission, this application embodiment can also reduce the data traffic costs on the printing device side.

[0023] Furthermore, in the case of update type data in the embodiments of this application, the second rendering object can be obtained from the storage device, which can save the generation cost of the rendering object and thus improve the printing processing efficiency.

[0024] Furthermore, different printer manufacturers define fonts differently in related technologies, which can lead to variations in the printing results of the same content on different printers. In contrast, the embodiments of this application determine the data to be printed in pixels based on the first rendering object or the third rendering object, and then print based on this data. Using pixel-based data improves the matching degree between the printing results of different printers. Attached Figure Description

[0025] Figure 1 This is a schematic diagram of the structure of a cloud printing system according to an embodiment of this application;

[0026] Figure 2 This is a schematic diagram of the structure of a logistics document according to an embodiment of this application;

[0027] Figure 3 This is a flowchart of the printing process method according to an embodiment of this application;

[0028] Figure 4 This is a schematic diagram of the data structure of a print request according to an embodiment of this application;

[0029] Figure 5 This is a schematic diagram of the structure of a rendering engine according to an embodiment of this application;

[0030] Figure 6 This is a data flow diagram of a printing processing method according to an embodiment of this application;

[0031] Figure 7 This is a schematic diagram of the structure of a printing processing apparatus according to an embodiment of this application;

[0032] Figure 8 This is a schematic diagram of the structure of an exemplary device provided in one embodiment of this application. Detailed Implementation

[0033] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0034] This application's embodiments can be applied to printing scenarios. These scenarios may include cloud printing. Cloud printing refers to using the internet as a foundation to integrate printing service provider resources, build a shared printing platform, and provide users with standardized, high-quality printing services anytime, anywhere. Users can log into the printing platform via mobile phones, cameras, computers, and other terminal devices, and use printing equipment to print text, images, and other information. The advantage of cloud printing is that it is not limited by distance or time, easily achieving remote, efficient printing.

[0035] Reference Figure 1 The diagram shows a schematic of the structure of a cloud printing system according to an embodiment of this application, wherein the system may include: a client 101, a cloud server 102, and a printing device 103.

[0036] The client 101 is used to send a cloud printing request for a print job to the cloud server 102; the cloud printing request may carry the target printer identifier and the target print job identifier.

[0037] Client 101 can obtain the printer identifier of the target printer by scanning a QR code or other means, and then trigger a cloud printing request based on that printer identifier. The printing device 103 can display QR codes or other encoded information, which client 101 can scan to obtain the target printer identifier corresponding to the printing device 103. After determining the print job that needs to be cloud printed, a cloud printing request carrying the target print job identifier and the obtained target printer identifier can be sent to the cloud server 102. This cloud printing request is used to request that the print job be completed on the printing device corresponding to the target printer identifier.

[0038] The cloud server 102 is used to send a print request to the printing device 103 corresponding to the target printer identifier. The print request may carry the target data corresponding to the target print job identifier.

[0039] The printing device 103 is used to print according to the target data. The printing device 103 can communicate with the cloud server 102 via a wireless or wired network. For example, the printing device 103 may have a built-in mobile communication module, allowing it to communicate with the cloud server 102 via a mobile communication network. The mobile communication network may include 4G (fourth-generation mobile communication technology), etc. It is understood that this application embodiment does not limit the specific mobile communication network used.

[0040] The client 101 can also be used to send print jobs to the cloud server 102. After receiving the print job, the server 102 generates a print job identifier for the print job and stores the print job.

[0041] Client 101 can be a web client, an application (APP) client installed on a smartphone or computer, etc.

[0042] This application embodiment can be used to print documents, invoices, and other printable objects. Invoices may include: logistics waybills, shopping receipts, etc. A logistics waybill is a document used in the logistics industry to record information such as the sender, recipient, and the object being shipped, as well as price and other relevant information, during the transportation of goods.

[0043] The print job sent from client 101 to cloud server 102 may include: object information of the object to be printed. Taking a logistics waybill as an example, the object information may include: sender, recipient, and logistics object information, etc. Taking a shopping receipt as an example, the object information may include: product name, quantity, and price, etc.

[0044] The cloud server 102 can generate object data for the printed object based on the object information of the printed object. Taking a logistics waybill as an example, the cloud server 102 can generate the logistics waybill object data based on the object information of the printed object.

[0045] Reference Figure 2 The diagram shows a schematic representation of a logistics waybill according to an embodiment of this application. The logistics waybill may include: a trademark area 201, a waybill identification area 202, a sender / recipient identification area 203, a recipient area 204, a sender area 205, a logistics object details area 206, and a promotional information area 207, etc.

[0046] The following areas are included: Trademark area 201 may include the logistics provider's logo, typically in image format. Waybill identification area 202 may include the corresponding identification on the waybill for the logistics provider and / or e-commerce platform. Receipt and dispatch identification area 203 may include receipt and dispatch identification. Recipient area 204 may include recipient information. Sender area 205 may include sender information. Logistics object details area 206 may include information such as the name and quantity of the goods or other logistics objects. Promotional information area 207 may include promotional text, promotional images, and other promotional information.

[0047] Figure 2 The object data in the areas of the shown logistics waybill can be generated by the cloud server 102 based on the object information in the print job. Specifically, the cloud server 102 can generate object data for the recipient area 204 based on the recipient in the print job. The cloud server 102 can also generate object data for the sender area 205 based on the sender in the print job. The cloud server 102 can also generate object data for the logistics object details area 206 based on the logistics object information in the print job.

[0048] Figure 2 The object data in the area of ​​the logistics waybill shown can also be generated by the cloud server 102 according to preset processing logic. For example, the cloud server 102 can determine the target logistics provider corresponding to the printed object according to the preset processing logic, and generate information such as trademark area 201 and promotional information area 207 based on the information of the target logistics provider. The preset processing logic can be used to assign a target logistics provider to the logistics object corresponding to the printed object.

[0049] The cloud server 102 can also generate object data for the waybill identification area 202 based on the order identifier or logistics identifier of the logistics object in the printing job. The cloud server 102 can also generate object data for the receipt and delivery identification area 203.

[0050] It should be noted that the acquisition process of information, signals or data used in the embodiments of this application is carried out in compliance with the relevant data protection laws and policies of the country where the application is located, and with the authorization of the relevant owner.

[0051] In related technologies, the print request sent from the cloud server 102 to the printing device 103 is typically a CPCL command or a TSPL command. The CPCL command or TSPL command usually contains a description corresponding to the printable content, such as text or images. Figure 2The icons and promotional images in the print interface are presented in image format, which means that a single CPCL or TSPL instruction typically occupies several kilobytes of data, resulting in high data transmission volume during the printing process. For example, if the print device 103 uses a mobile communication network, the transmission of print requests causes the print device 103 to consume a significant amount of bandwidth.

[0052] To address the technical problem of high text transmission volume during the printing process in related technologies, embodiments of this application provide a printing processing solution. This solution may include: receiving a print request; the print request may include at least two of the following data: template data, type data, and update data; the template data may include: the address of a template file; the type data may include: a new type or an updated type; if the type data is a new type, obtaining the template file based on the address of the template file, generating a first rendering object based on the template file, and saving the first rendering object to a storage device; or, if the type data is an updated type, obtaining a second rendering object from the storage device, and updating the second rendering object to a third rendering object based on the update data; the second rendering object may be a rendering object already saved in the storage device; determining the data to be printed in pixels based on the first rendering object or the third rendering object; and printing based on the data to be printed.

[0053] In this embodiment of the application, at least two of the following are included in the print request: template data, type data, and update data.

[0054] The template data may include the address of a template file. A template can be the result of fixing and standardizing the structural rules of something, reflecting the standardization of structural form. Specifically, in the embodiments of this application, the template file can standardize the structural rules of printed data.

[0055] This embodiment of the application includes the address of the template file in the template data of the print request, so that the template file can be obtained based on the address. When the template file address is included in the print request for the first time, the template file can be downloaded and saved to the local storage device based on the address. In subsequent print requests (such as the second, third, etc.), the template file can be retrieved from the local storage device. Therefore, this embodiment of the application can reduce the amount of template file transmitted in scenarios of batch printing (i.e., multiple uses of the template file).

[0056] Type data can include either a new type or an updated type. A new type can represent the object to be printed, while an updated type can represent an update based on the previously printed object.

[0057] Updated data can characterize the differences or updates between the current printed object and the previous printed object. In the scenario of printing logistics waybills, the differences between different logistics waybills typically include differences in text information such as recipient information and sender information. Therefore, this embodiment of the application can characterize the differences or updates between different logistics waybills through updated data. In this way, the updated data can serve as the basis for updating the rendered object.

[0058] In this embodiment, when the type data is a new type, a template file is obtained based on the address of the template file, and a first rendering object is generated based on the template file. When the type data is an updated type, a second rendering object can be obtained from the storage device, and the second rendering object is updated to a third rendering object based on the updated data.

[0059] In this embodiment, when the type data is of the update type, the second rendering object can be updated to the third rendering object based on the update data. Since the update data can characterize the different or updated parts of the current print object (second print object) relative to the previous print object (first print object), this embodiment can reduce the amount of data corresponding to the same parts of the current print object and the previous print object, compared to related technologies that transmit complete data of the print object in CPCL or TSPL instructions. This reduces the amount of data transmitted during the printing process. When using a mobile communication network for data transmission, this embodiment can also reduce data usage costs on the printing device side.

[0060] Furthermore, in the case of update type data in the embodiments of this application, the second rendering object can be obtained from the storage device, which can save the generation cost of the rendering object and thus improve the printing processing efficiency.

[0061] Furthermore, different printer manufacturers define fonts differently in related technologies, which can lead to variations in the printing results of the same content on different printers. In contrast, the embodiments of this application determine the data to be printed in pixels based on the first rendering object or the third rendering object, and then print based on this data. Using pixel-based data improves the matching degree between the printing results of different printers.

[0062] This application's embodiments can be applied to batch printing scenarios for documents and other printing objects. In batch printing scenarios, the object data of different printing objects can have the same structural pattern. The same structural pattern can refer to the pattern of areas and area division in logistics waybills. Template files can be used to standardize the structural form of the object data of printing objects.

[0063] Assuming each region corresponds to a region field, the differences between the object data of different printed objects may lie in the different content of certain region fields. Region fields may include recipient fields, sender fields, etc. The update data set in the print request in this embodiment can be used to update the content of the region fields.

[0064] The object data of different printed objects can also include common parts. For example, when different printed objects correspond to the same logistics provider. Figure 2 Trademarks and promotional images can be common elements across object data for different printing objects. Since trademarks and promotional images are presented as images, they typically require a significant amount of data. However, this embodiment allows for batch printing scenarios where they do not need to be transmitted in subsequent print requests. Figure 2 The image data corresponding to the trademarks and promotional images in the print job can reduce the amount of data required for print requests.

[0065] Method Example 1

[0066] Reference Figure 3 The diagram illustrates a flowchart of a printing process method according to an embodiment of this application, which may specifically include the following steps:

[0067] Step 301: Receive a print request; the print request may include at least two of the following data: template data, type data, and update data; the template data may include: the address of the template file; the type data may include: a new type or an updated type;

[0068] Step 302: If the data type is new, obtain the template file based on its address, generate a first rendering object based on the template file, and save the first rendering object to the storage device; or,

[0069] Step 303: If the data type is an update type, retrieve the second rendering object from the storage device and update the second rendering object to the third rendering object according to the update data; the second rendering object can be a rendering object already saved in the storage device.

[0070] Step 304: Determine the data to be printed in pixels based on the first rendering object or the third rendering object;

[0071] Step 305: Print according to the data to be printed.

[0072] Figure 3 The method shown can be executed by the printing processing device at the printing equipment end. It can be understood that the embodiments of this application are for... Figure 3The specific entity executing the method shown is not limited. The printing device may include a printer, a processor, and a memory, wherein the memory may store executable code, which, when executed, causes the processor to perform... Figure 3 The method shown.

[0073] In step 301, the print request can originate from a print client. The print client can be a cloud server, or it can be a client. It is understood that this embodiment does not limit the specific source of the print request.

[0074] This application provides a data structure for print requests. (Refer to...) Figure 4 The diagram illustrates a data structure of a print request according to an embodiment of this application. The print request may include at least two of the following data: template data, type data, and update data.

[0075] The template data may include: the address of a template file, which can be used to point to the template file. The template file serves to standardize the structural patterns of the printed data.

[0076] Template files may include elements, and element information may include element type, layout information, element fields, and field content.

[0077] Elements can be elements on the print page to which the print object belongs. Element types can include: text, image, division (div), line, list, and barcode, etc. It is understood that those skilled in the art can set one or more element types in the template file according to actual application needs.

[0078] Layout information refers to the arrangement of elements on a printed page. Layout information can include the position of elements on the printed page.

[0079] An element field can refer to the fields included in an element. Field content can refer to the specific content corresponding to an element field.

[0080] Element fields may include: a first field representing the element's identifier, which may also be called an ID (Identity) field. Element fields may also include attribute fields representing the element's attributes. For example, attribute fields may include position fields and style fields. The position field represents the element's location information. The style field represents the element's style information, which may include size, width, height, or alignment information. Alignment information may include left alignment, center alignment, right alignment, or justification.

[0081] The layout information in this application embodiment may include: independent layout information, relative layout information, or flexible box layout information, etc. It is understood that those skilled in the art can use the required layout information according to actual application needs, and this application embodiment does not limit the specific layout information.

[0082] Independent layout information can be represented by the element's own coordinates. For independent layout information, a position field can be set in the element's attribute fields, and the content of the position field can be coordinate information. This coordinate information needs to be printed by the client based on calculations.

[0083] Relative layout information can characterize the layout information of a first element or a second element through the positional relationship between the first element and the second element. For relative layout information, the position information of the second element can be determined based on the position information of at least one first element. Thus, the content of the position field of the second element can contain the position information of at least one first element (position field and field content). Embodiments of this application support relative layout of elements, thereby reducing the amount of computation required for element coordinate information by the printing client.

[0084] Flexible layout is a layout mode used to arrange elements on a page, which allows elements to predictably move in rows / columns when the page layout is applied to different screen sizes and different display devices, thus enabling dynamic adjustment of the layout information of elements.

[0085] The print request can also include style data. Style data can include: the address of a style file, which can point to a style file. The style file can include: size, width, height, alignment information, or whether to automatically wrap lines, etc. In practical applications, style information can be referenced in the content of the style field in the template file.

[0086] This application embodiment can use formats such as JSON (JavaScript Object Notation) and XML (Extensible Markup Language) to describe the data of the print request. It is understood that this application embodiment does not limit the specific data format of the print request.

[0087] This application embodiment can provide the following implementation of print requests:

[0088] Implementation method 1

[0089] In implementation method 1, the corresponding print request 1 can include: template data and type data, where the type data can be a new type.

[0090] Here is an example of print request 1:

[0091] {

[0092] "template": "address1",

[0093] "type": "new"

[0094] }

[0095] Here, "template" represents template data, "address1" represents the address of the template file, "type" represents type data, and "new" represents a new type.

[0096] Implementation method 2

[0097] In implementation method 2, the corresponding print request 2 can include: template data, type data, and update data, where the type data can be a new type.

[0098] Here is an example of print request 2:

[0099] {

[0100] "template": "address1",

[0101] "type": "new"

[0102] “data”:{

[0103] “rec”: “Name1”

[0104] "send": "Name2"

[0105] }

[0106] }

[0107] Here, "style" represents the style data, and "address2" represents the address of the style file.

[0108] Implementation method 3

[0109] In implementation method 3, the corresponding print request 3 can include: template data, type data, and style data, where the type data can be a new type.

[0110] Here is an example of print request 3:

[0111] {

[0112] "template": "address1",

[0113] "type": "new"

[0114] "style": "address2"

[0115] }

[0116] Here, "style" represents the style data, and "address2" represents the address of the style file.

[0117] Implementation method 4

[0118] In implementation method 4, the corresponding print request 4 can include: type data and update data, where the type data can be the update type.

[0119] Here is an example of print request 4:

[0120] {

[0121] "type": "update"

[0122] “data”:{

[0123] “rec”: “Name1”

[0124] "send": "Name2"

[0125] }

[0126] }

[0127] Here, "update" indicates the update type. "data" indicates the updated data. "rec" is the field identifier corresponding to the recipient. "send" is the field identifier corresponding to the sender.

[0128] Here is an example of template file 1:

[0129] {

[0130] {

[0131] “image”:{

[0132] "id": "img1"

[0133] “pos”: “100,100”

[0134] “jpg”: “address 3”

[0135] }

[0136] }

[0137] {

[0138] “text”{

[0139] "id": "rec"

[0140] “pos”: “100,200”

[0141] "style": "style2"

[0142] }

[0143] }

[0144] {

[0145] “text”{

[0146] "id": "send"

[0147] “pos”: “100,300”

[0148] "style": "style2"

[0149] }

[0150] }

[0151] }

[0152] Among them, "image" represents an image type element, "text" represents a text type element, "id" represents an element field, "pos" represents a location field, "jpg" represents the image address, and "style" represents a style field.

[0153] Here is an example of style file 1:

[0154] {

[0155] “style1”: {

[0156] "height": 600

[0157] }

[0158] “style2”: {

[0159] "size": "16";

[0160] "align": "center"

[0161] }

[0162] }

[0163] Here, "style1" or "style2" represents the style information identifier. "height" represents the height information, "size" represents the size information, and "align" represents the alignment information.

[0164] In this embodiment of the application, after receiving a print request, either step 302 or step 303 can be executed based on the type data in the print request. Specifically, if the type data is a new type, step 302 can be executed; or if the type data is an updated type, step 303 can be executed.

[0165] In step 302, if the data type is a new type, the template file can be obtained according to the address of the template file, the first rendering object can be generated according to the template file, and the first rendering object can be saved to the storage device.

[0166] The methods used to obtain the template file based on its address can include:

[0167] Method 1: Obtain the template file whose address matches the template file's address from the storage device; or

[0168] Method 2: If no template file with the address matching the template file does not exist in the storage device, download the template file with the address matching the template file.

[0169] The storage device can be a disk or cache, etc. It is understood that any storage device with storage function is within the protection scope of the storage device in the embodiments of this application.

[0170] In practical applications, method 1 can be used first to retrieve a template file whose address matches the template file's address from the storage device. If no template file matching the template file's address exists in the storage device, method 2 can be used to download the template file matching the template file's address. This embodiment can also save the downloaded template file and its corresponding address to the storage device, thus the storage device can include a first mapping relationship between template files and addresses.

[0171] This application embodiment can parse the template file and generate a first rendering object based on the parsing result. The first rendering object may include: a DOM (Document Object Model) object, and / or a CSS (Cascading Style Sheets) object, etc.

[0172] In one implementation, the original template file can be parsed, and a first rendering object can be generated based on the parsing results.

[0173] In another implementation, the template file can be updated based on updated data and / or style files, and the first rendering object can be generated based on the updated template file.

[0174] In the case of updating the template file based on updated data, the template file may include: a first field; the print request may also include: updated data, which may include: a second field; then the process of generating the first rendering object based on the template file may specifically include: based on the matching between the first field and the second field, using the field content corresponding to the second field to update the field content corresponding to the first field in the template file; and generating the first rendering object based on the updated template file.

[0175] The matching between the first field and the second field can be: matching the field name of the first field with the field name of the second field, or matching the field name of the first field with the field content of the second field.

[0176] Taking print request 2 as an example, assuming that template file 1 corresponding to "address 1" in "template" includes a first field A with "id" as "rec" and a first field B with "id" as "send", then the "rec" of the first field A can be matched with the "rec" of the second field A in the updated data, and the "rec" of the first field A can be updated to the content of the second field A "rec" as "name1". Similarly, the "send" of the first field B can be matched with the "send" of the second field B in the updated data, and the "send" of the first field B can be updated to the content of the second field B "send" as "name2".

[0177] For cases where the template file is updated based on style data, the print request may further include: style data; the style data may include: the address of the style file; the template file may include: style fields; correspondingly, the above method may further include: if the type data is a new type, obtaining the style file based on the address of the style file; and updating the field content corresponding to the style field in the template file using the file content corresponding to the style file.

[0178] According to the embodiments of this application, the process of obtaining a style file based on its address may include: firstly, obtaining a style file that matches the address of the style file from a storage device; and secondly, if no style file matching the address of the style file exists in the storage device, downloading the style file that matches the address of the style file. Since the style file matching the address of the style file is obtained first from the storage device, the transmission cost of the style file can be reduced.

[0179] This application embodiment can obtain target file content that matches the field content corresponding to the style field from the file content corresponding to the style file.

[0180] Taking print request 3 as an example, assuming that template file 1 corresponding to "address 1" of "template" includes a style field where "style" is "style2", and assuming that "address 2" of "style" corresponds to style file 1, then the content of the target file corresponding to "style2" can be obtained from style file 1, and the content of the target file can be used to update the content of the field corresponding to "style". Specifically, the content of the target file can be used to populate the content of the field corresponding to "style". For example, "style2" can be populated as follows:

[0181] {

[0182] "size": "16";

[0183] "align": "center"

[0184] }

[0185] In step 303, if the data type is an update type, a second rendering object is retrieved from the storage device, thereby saving the cost of generating the rendering object.

[0186] Furthermore, in this embodiment of the application, the second rendering object can be updated to the third rendering object based on the updated data, thereby satisfying the update requirements of the printed object.

[0187] For example, in a batch printing scenario for logistics waybills, assuming the first printed object is the first print object, a template file corresponding to the first print object can be obtained through print request 1, print request 2, or print request 3. Based on the template file, a first rendered object corresponding to the first print object is generated and stored in the storage device. Then, when printing the second print object subsequently, the second rendered object can be updated to a third rendered object based on the updated data corresponding to the second print object. Here, the second print object can be the print object corresponding to the i-th print, where i can be a positive integer greater than 1. The print request corresponding to the second print object can refer to print request 4.

[0188] Furthermore, embodiments of this application may also save the updated third rendering object to a storage device.

[0189] The second rendering object can be a rendering object already saved in the storage device. It should be noted that the storage device can record rendering objects and their corresponding storage times. In this embodiment, the latest-stored second rendering object can be obtained from the storage device. The second rendering object can be the first rendering object saved in step 302, or it can be the third rendering object saved in step 303.

[0190] The process of updating the second rendering object to the third rendering object is described below. The updated data may include: a second field; the second rendering object may include: a node, which may have a corresponding node identifier; the process of updating the second rendering object to the third rendering object may specifically include: based on the matching between the node identifier and the second field, using the field content corresponding to the second field, updating the node content corresponding to the node identifier in the first rendering object to obtain the updated third rendering object.

[0191] For example, if the structure of the first rendering object can be a tree structure, then the target node identifier that matches the second field can be obtained from the tree structure based on the matching between the node identifier and the second field, and the child nodes corresponding to the target node identifier can be updated using the field content corresponding to the second field.

[0192] Taking print request 4 as an example, the data update involves updating "rec" and "send". Therefore, the first target node identifier and the second target node identifier corresponding to "rec" and "send" can be obtained from the tree structure, and the child nodes of the first target node identifier can be updated according to "name 1" and the child nodes of the second target node identifier can be updated according to "name 2".

[0193] In step 304, a drawing model can be constructed based on the first or third rendering object, and the position, size and data representation of the elements within the drawing model can be determined, thereby obtaining the data to be printed in pixels.

[0194] This application embodiment can utilize a rendering engine to process template files or updated template files to obtain data to be printed in pixels.

[0195] Reference Figure 5 The diagram shows a schematic of the structure of a rendering engine according to an embodiment of this application. The rendering engine may specifically include a template parsing module 501 and a graphics processing module 502.

[0196] The template parsing module 501 can process the template file or the updated template file to obtain a rendering object, which can be a first rendering object or a third rendering object.

[0197] The graphics processing module 502 can obtain printable data in pixels based on the first rendering object or the third rendering object. The printable data can be bitmap data. Taking binary bitmap data as an example, one byte can represent 8 pixels. For example, 0b01010101 can represent 8 consecutive pixels. Assuming 1 represents black and 0 represents white, these 8 pixels can sequentially represent the colors white, black, white, black, white, black, white, black, black, white, black, thus obtaining black and white binary printable data. Of course, black and white binary printable data is only an example; in practice, the printable data in this embodiment can also be color printable data.

[0198] The graphics processing module 502 can use a general-purpose rendering component to process the first or third rendering object; alternatively, the graphics processing module 502 can use a registered rendering component to process the first or third rendering object. The rendering component can be used to determine the position, size, and data representation of elements. The data representation can be the aforementioned binary bitmap data.

[0199] In this application embodiment, a rendering component corresponding to an element type can be registered based on the element type. For example, the rendering component corresponding to an image type can be an image rendering component. Similarly, the rendering component corresponding to a text type can be a text rendering component. Furthermore, the rendering component corresponding to a barcode can be a barcode rendering component. Additionally, a custom component can also be registered based on the element type.

[0200] The rendering engine in this application embodiment can be universal, enabling different printer manufacturers to quickly integrate it, thus saving printer manufacturers additional development costs.

[0201] In step 305, the print interface can be invoked to transmit the data to be printed to the printer, so that the printer can print the data. The invocation of the print interface can be an asynchronous operation; after the invocation is completed, the processing of the next print request can begin without waiting for printing to finish.

[0202] In related technologies, the print request sent from the cloud server 102 to the printing device 103 is typically a CPCL command or a TSPL command. The CPCL command or TSPL command usually contains a description corresponding to the printable content, such as text or images. Figure 2 Trademarks and promotional images are presented in image format, which means that a single CPCL instruction or TSPL instruction typically occupies several kilobytes of data.

[0203] The embodiments of this application can... Figure 2The trademarks and promotional images in the print job, being the same parts as the previous print job, do not have corresponding data included in the print request for this job. Therefore, the amount of text transmitted during the printing process can be reduced. For example, embodiments of this application can reduce the amount of data in a single print request from thousands of bytes to hundreds or tens of bytes.

[0204] In summary, the printing processing method of this application embodiment, when the type data carried in the print request is of the update type, can update the second rendering object to the third rendering object based on the update data. Since the update data can characterize the different or updated parts of the current print object relative to the previous print object, compared to related technologies that transmit complete data of the print object in CPCL or TSPL instructions, this application embodiment can reduce the amount of data corresponding to the same parts of the current print object and the previous print object, thereby reducing the amount of data transmitted during the printing process. When using a mobile communication network for data transmission, this application embodiment can also reduce the data usage costs on the printing device side.

[0205] Furthermore, in the case of update type data in the embodiments of this application, the second rendering object can be obtained from the storage device, which can save the generation cost of the rendering object and thus improve the printing processing efficiency.

[0206] Furthermore, different printer manufacturers define fonts differently in related technologies, which can lead to variations in the printing results of the same content on different printers. In contrast, the embodiments of this application determine the data to be printed in pixels based on the first rendering object or the third rendering object, and then print based on this data. Using pixel-based data improves the matching degree between the printing results of different printers.

[0207] Method Example 2

[0208] Reference Figure 6 The diagram illustrates a flowchart of a printing process method according to an embodiment of this application, which may specifically include the following steps:

[0209] Step 601: Receive a print request; the print request may include at least two of the following data: template data, type data, style data, and update data; the template data may include: the address of the template file; the template data may include: the address of the style file; the type data may include: a new type or an updated type;

[0210] Step 602: Determine whether the data type is a new type. If yes, proceed to step 603; otherwise, proceed to step 604.

[0211] Step 603: Obtain the template file according to the address of the template file, obtain the style file according to the address of the style file, generate the first rendering object according to the template file and the style file, and save the first rendering object to the storage device.

[0212] Step 604: Obtain the second rendering object from the storage device, and update the second rendering object to the third rendering object according to the updated data;

[0213] Step 605: Determine the data to be printed in pixels based on the first rendering object or the third rendering object;

[0214] Step 606: Print according to the data to be printed.

[0215] In the case of a new type of data, this embodiment of the application can determine whether there is a corresponding file in the local cache based on the address of the template file and the address of the style file. If so, the corresponding file is loaded from the cache; otherwise, the corresponding file is downloaded based on the address of the template file and the address of the style file.

[0216] This application embodiment can also update the corresponding fields of the template file according to the style file. Further, a first rendering object can be generated based on the updated template file, and the first rendering object can be saved to a storage device. Elements in the template file can correspond to nodes in the first rendering object. It should be noted that the template file may include: elements that support updates, such as text elements. The template file may also include: elements that do not support updates.

[0217] The embodiments of this application cache the first rendering object, which can reduce the amount of computation required to parse the next print request.

[0218] When the data type is updated, the first render object corresponding to the previous print request can be loaded from the cache, and the second render object can be updated to the third render object based on the updated data. In this case, the third render object can also be saved to the storage device.

[0219] It should be noted that the storage device may record the rendered objects and their corresponding storage times. This embodiment of the application can retrieve the second rendered object with the latest storage time from the storage device.

[0220] This application embodiment can determine the data to be printed in pixels based on a first rendering object or a third rendering object, and cache the data to be printed. In practical applications, the cached data to be printed can be partially or globally refreshed as needed.

[0221] This application embodiment can also call the printer's printing interface, pass in the data to be printed, and initiate printing. The printing interface call operation can be an asynchronous operation; after the call is completed, the processing of the next print request can begin without waiting for printing to finish.

[0222] In summary, the printing processing method of this application embodiment, when the type data carried in the print request is of the update type, can update the second rendering object to the third rendering object based on the update data. Since the update data can characterize the different or updated parts of the current print object relative to the previous print object, compared to related technologies that transmit complete data of the print object in CPCL or TSPL instructions, this application embodiment can reduce the amount of data corresponding to the same parts of the current print object and the previous print object, thereby reducing the amount of data transmitted during the printing process. When using a mobile communication network for data transmission, this application embodiment can also reduce the data usage costs on the printing device side.

[0223] Furthermore, in the case of update type data in the embodiments of this application, the second rendering object can be obtained from the storage device, which can save the generation cost of the rendering object and thus improve the printing processing efficiency.

[0224] Furthermore, different printer manufacturers define fonts differently in related technologies, which can lead to variations in the printing results of the same content on different printers. In contrast, the embodiments of this application determine the data to be printed in pixels based on the first rendering object or the third rendering object, and then print based on this data. Using pixel-based data improves the matching degree between the printing results of different printers.

[0225] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.

[0226] Based on the above embodiments, this application also provides a printing processing apparatus, referring to... Figure 7 The device may include: a receiving module 701, a rendering object processing module 702, a rendering module 703, and a printing module 704;

[0227] The receiving module 701 is used to receive a print request; the print request includes: template data, type data, and update data; the template data includes: the address of the template file; the type data includes: new type or updated type.

[0228] The rendering object processing module 702 may include: a first rendering object processing module 721 or a second rendering object processing module 722;

[0229] The first rendering object processing module 721 is used to obtain a template file according to the address of the template file when the type data is a new type, generate a first rendering object according to the template file, and save the first rendering object to the storage device.

[0230] The second rendering object processing module 722 is used to retrieve the second rendering object from the storage device when the type data is an update type, and update the second rendering object to a third rendering object according to the update data.

[0231] The rendering module 703 is used to determine the data to be printed in pixels based on the first rendering object or the third rendering object.

[0232] The printing module 704 is used to print according to the data to be printed.

[0233] Optionally, the first rendering object processing module 721 may include:

[0234] The first template file acquisition module is used to retrieve a template file whose address matches the template file from the storage device; or

[0235] The second template file acquisition module is used to download the template file whose address matches the template file's address when no template file exists in the storage device.

[0236] Optionally, the template file may include: a first field; the print request may also include: update data, which may include: a second field;

[0237] The first rendering object processing module 721 may include:

[0238] The first field update module is used to update the field content corresponding to the first field in the template file based on the matching between the first field and the second field, using the field content corresponding to the second field;

[0239] The generation module is used to generate the first rendering object based on the updated template file.

[0240] Optionally, the updated data may include: a second field; the second rendered object may include: a node;

[0241] The second rendering object processing module 722 may include:

[0242] The object update module is used to update the node content corresponding to the node identifier in the second rendering object based on the matching between the node identifier and the second field, using the field content corresponding to the second field, so as to obtain the updated third rendering object.

[0243] Optionally, the print request may also include: style data; the style data may include: the address of the style file; the template data may include: style fields;

[0244] The device may also include:

[0245] The style file acquisition module is used to acquire the style file based on its address when the type data is a new type.

[0246] The second field update module is used to update the field content corresponding to the style field in the template file using the file content corresponding to the style file.

[0247] Optionally, the template file may include: elements, and layout information corresponding to the elements. The layout information may include: independent layout information, relative layout information, or flexible layout information.

[0248] Optionally, the device may further include:

[0249] The template file saving module is used to save the downloaded template file and its corresponding address to the storage device.

[0250] This application also provides a non-volatile readable storage medium storing one or more modules (programs). When these modules are applied to a device, they enable the device to execute the instructions for the method steps in this application.

[0251] This application provides a machine-readable medium storing instructions that, when executed by one or more processors, cause an electronic device to perform one or more of the methods described in the above embodiments. In this application, the electronic device includes devices such as servers and terminal devices.

[0252] Embodiments of this disclosure can be implemented as an apparatus with any suitable hardware, firmware, software, or any combination thereof, configured as desired, and the apparatus may include electronic devices such as servers (clusters) and terminals. Figure 8An exemplary apparatus 1700 is schematically shown that can be used to implement the various embodiments described in this application.

[0253] In one embodiment, Figure 8 An exemplary device 1700 is shown, which includes one or more processors 1702, a control module (chipset) 1704 coupled to at least one of the processors 1702, a memory 1706 coupled to the control module 1704, a non-volatile memory (NVM) / storage device 1708 coupled to the control module 1704, one or more input / output devices 1710 coupled to the control module 1704, and a network interface 1712 coupled to the control module 1704.

[0254] Processor 1702 may include one or more single-core or multi-core processors, and processor 1702 may include any combination of general-purpose processors or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, device 1700 can serve as a server, terminal, or other device as described in the embodiments of this application.

[0255] In some embodiments, apparatus 1700 may include one or more computer-readable media (e.g., memory 1706 or NVM / storage device 1708) having instructions 1714 and one or more processors 1702 that are combined with the one or more computer-readable media and configured to execute instructions 1714 to implement a module thereby performing the actions described in this disclosure.

[0256] In one embodiment, control module 1704 may include any suitable interface controller to provide any suitable interface to at least one of the processors 1702 and / or any suitable device or component communicating with control module 1704.

[0257] The control module 1704 may include a memory controller module to provide an interface to the memory 1706. The memory controller module may be a hardware module, a software module, and / or a firmware module.

[0258] Memory 1706 may be used, for example, to load and store data and / or instructions 1714 for device 1700. In one embodiment, memory 1706 may include any suitable volatile memory, such as suitable DRAM. In some embodiments, memory 1706 may include double data rate type quad synchronous dynamic random access memory (DDR4 SDRAM).

[0259] In one embodiment, control module 1704 may include one or more input / output controllers to provide interfaces to NVM / storage device 1708 and (one or more) input / output devices 1710.

[0260] For example, NVM / storage device 1708 may be used to store data and / or instructions 1714. NVM / storage device 1708 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (one or more) non-volatile storage devices (e.g., one or more hard disk drive (HDD), one or more optical disc (CD) drives, and / or one or more digital universal optical disc (DVD) drives).

[0261] NVM / storage device 1708 may include storage resources that are part of a device on which device 1700 is mounted, or that are accessible by the device but do not necessarily have to be part of the device. For example, NVM / storage device 1708 may be accessed via a network via one or more input / output devices 1710.

[0262] One or more input / output devices 1710 may provide an interface for device 1700 to communicate with any other suitable device. Input / output devices 1710 may include communication components, audio components, sensor components, etc. Network interface 1712 may provide an interface for device 1700 to communicate via one or more networks. Device 1700 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, such as accessing a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof.

[0263] In one embodiment, at least one of the processors 1702 may be logically packaged with one or more controllers (e.g., memory controller modules) of the control module 1704. In one embodiment, at least one of the processors 1702 may be logically packaged with one or more controllers of the control module 1704 to form a system-in-package (SiP). In one embodiment, at least one of the processors 1702 may be integrated with the logic of one or more controllers of the control module 1704 on the same die. In one embodiment, at least one of the processors 1702 may be integrated with the logic of one or more controllers of the control module 1704 on the same die to form a system-on-a-chip (SoC).

[0264] In various embodiments, device 1700 may be, but is not limited to, a terminal device such as a server, desktop computing device, or mobile computing device (e.g., laptop computing device, handheld computing device, tablet computer, netbook, etc.). In various embodiments, device 1700 may have more or fewer components and / or different architectures. For example, in some embodiments, device 1700 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.

[0265] In the device 1700, a main control chip can be used as a processor or control module, sensor data, position information, etc. are stored in a memory or NVM / storage device, the sensor group can be used as an input / output device, and the communication interface can include a network interface.

[0266] This application also provides an electronic device, which may include: a processor; and a memory storing executable code thereon, which, when executed, causes the processor to perform one or more of the methods described in this application.

[0267] This application also provides one or more machine-readable media having executable code stored thereon, which, when executed, causes a processor to perform one or more of the methods described in this application.

[0268] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0269] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0270] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable print processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable print processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0271] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable printing terminal device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0272] These computer program instructions can also be loaded onto a computer or other programmable printing processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0273] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.

[0274] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0275] The foregoing has provided a detailed description of a printing processing method, a printing processing apparatus, an electronic device, and a storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A printing processing method, characterized in that, The method includes: Receive a print request; the print request includes at least two of the following data: template data, type data, and update data; the template data includes: the address of the template file; the type data includes: a new type or an updated type; If the data type is a new type, a template file is obtained based on the address of the template file, and a first rendering object is generated based on the template file and saved to the storage device; or, if the data type is an updated type, a second rendering object is obtained from the storage device, and the second rendering object is updated to a third rendering object based on the updated data; the second rendering object is a rendering object already saved in the storage device; wherein, the updated data is used to characterize the different or updated parts of the second printing object relative to the first printing object, the second printing object is the printing object corresponding to the current printing request, the first printing object is the printing object corresponding to the previous printing request; the second rendering object is the rendering object corresponding to the first printing object; Based on the first rendering object or the third rendering object, determine the data to be printed in pixels. Print according to the data to be printed.

2. The method according to claim 1, characterized in that, The step of obtaining the template file based on its address includes: Retrieve the template file whose address matches the template file from the storage device; or If no template file with the address matching the template file exists in the storage device, download the template file with the address matching the template file.

3. The method according to claim 1, characterized in that, The template file includes a first field; the print request further includes update data, which includes a second field. The step of generating the first rendering object based on the template file includes: Based on the matching between the first field and the second field, the field content corresponding to the first field in the template file is updated using the field content corresponding to the second field; Generate the first rendering object based on the updated template file.

4. The method according to claim 1, characterized in that, The updated data includes: a second field; the second rendering object includes: a node; The step of updating the second rendering object to the third rendering object includes: Based on the matching between the node identifier and the second field, the node content corresponding to the node identifier in the second rendering object is updated using the field content corresponding to the second field to obtain the updated third rendering object.

5. The method according to claim 1, characterized in that, The print request also includes: style data; the style data includes: the address of the style file; the template file includes: style fields; The method further includes: if the type data is a new type, obtaining the style file according to the address of the style file; The content of the style field in the template file is updated using the file content corresponding to the style file.

6. The method according to any one of claims 1 to 5, characterized in that, The template file includes: elements, and layout information corresponding to the elements. The layout information includes: independent layout information, relative layout information, or flexible layout information.

7. The method according to claim 2, characterized in that, The method further includes: Save the downloaded template file and its corresponding address to the storage device.

8. A printing processing apparatus, characterized in that, The device includes: a receiving module, a rendering object processing module, a rendering module, and a printing module; The receiving module is configured to receive a print request; the print request includes: template data, type data, and update data; the template data includes: the address of the template file; the type data includes: a new type or an updated type; The rendering object processing module includes: a first rendering object processing module or a second rendering object processing module; The first rendering object processing module is used to obtain a template file according to the address of the template file when the type data is a new type, generate a first rendering object according to the template file, and save the first rendering object to a storage device. The second rendering object processing module is configured to, when the type data is of the update type, retrieve the second rendering object from the storage device and update the second rendering object to a third rendering object according to the update data; the second rendering object is a rendering object already saved in the storage device; wherein, the update data is used to characterize the different or updated parts of the second printing object relative to the first printing object, the second printing object is the printing object corresponding to the current printing request, the first printing object is the printing object corresponding to the previous printing request; the second rendering object is the rendering object corresponding to the first printing object; The rendering module is used to determine the data to be printed in pixels based on the first rendering object or the third rendering object. The printing module is used to print according to the data to be printed.

9. An electronic device, characterized in that, include: processor; and a memory having executable code stored thereon, which, when executed, causes the processor to perform the method as described in any one of claims 1-7.

10. A machine-readable medium having executable code stored thereon, which, when executed, causes a processor to perform the method as claimed in any one of claims 1-7.

Citation Information

Patent Citations

  • Printing processing method and device, printing terminal, logistic platform and server

    CN108572801A

  • A Method for Printing Template

    CN109343804A

  • Barcode printing method and device

    CN114132091A