Print template management method and device

Through template numbering and version management, it solves the problem of loss of old templates and stability problems caused by changes in printing templates, realizes the coexistence of multiple versions of templates and error stop, ensuring the stability of the printing process and the ability to roll back data.

CN112764693BActive Publication Date: 2024-10-18BEIJING JINGDONG ZHENSHI INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201911066457.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-11-04
Publication Date
2024-10-18
Estimated Expiration
2039-11-04

AI Technical Summary

Technical Problem

In the existing technology, changing the printing template will overwrite the old template, causing the old template to be lost or unable to be rolled back, and the wrong template cannot be stopped in time, affecting the stability of the printing process.

Method used

By introducing template numbering and version management, the template status is marked as draft, released, and abandoned to ensure that old templates are not affected, and incorrect templates are immediately discarded when errors occur, achieving multi-version coexistence of templates and data rollback.

Benefits of technology

The old template will not be lost when the printing template changes, providing convenience for data testing, ensuring the stability of the online template, and stopping losses in time when errors occur to avoid the expansion of data errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112764693B_ABST
    Figure CN112764693B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for managing printing templates, and relates to the field of computer technology. A specific implementation of the method includes: in response to a template creation instruction, controlling a template designer to create a printing template; in response to a template save instruction, controlling the template designer to save the printing template, and marking the status of the printing template as a draft status; in response to a template release instruction, controlling the template designer to release the printing template, and marking the status of the printing template as a release status. This implementation can prevent the old template from being lost or affecting the use of the old template when the printing template changes; it can also provide the convenience of data testing, making it possible to put the template grayscale online.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for managing printing templates. Background Art

[0002] The printing rendering method that separates business data from printing styles divides the printing process into a printing style design phase and a rendering phase. In the printing style design phase, a printing template is designed in a template designer according to the data structure of the business data and the target style to be printed. In the rendering phase, the printing data and its corresponding printing template are integrated in the rendering engine to generate a printing result, such as a picture, a PDF file, or the result is directly sent to the printer. After the printing template is changed and saved in the device managed by the printing template, the change operation takes effect immediately, and the rendering engine renders the data according to the changed printing template.

[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0004] (1) After changing the print template and saving it, the new print template will overwrite the old template in use, affecting the use of the old template;

[0005] (2) After changing the print template and saving it, the old template data will be lost and it will be impossible to view or roll back to the old template;

[0006] (3) If an error occurs in the old template, it is not possible to stop loss immediately. The only solution is to modify the old template correctly and then save it. Summary of the invention

[0007] In view of this, an embodiment of the present invention provides a method and device for managing printing templates, which can neither lose the old template nor affect the use of the old template when the printing template changes; at the same time, it can also provide the convenience of data testing, making it possible to put the template grayscale online.

[0008] According to one aspect of an embodiment of the present invention, a method for managing a printing template is provided, comprising:

[0009] In response to the template creation instruction, control the template designer to create a printing template;

[0010] In response to a template saving instruction, controlling the template designer to save the printing template and marking the status of the printing template as a draft status;

[0011] In response to a template publishing instruction, the template designer is controlled to publish the printing template and mark the status of the printing template as a published status.

[0012] Optionally, the method of an embodiment of the present invention also includes: after controlling the template designer to save the printing template, controlling the template designer to save the template number and version number of the printing template; or, controlling the template designer to save the template number of the printing template, and then submitting the printing template to the server, and controlling the server to generate a version number for the printing template.

[0013] Optionally, the method of the embodiment of the present invention further comprises: before and / or after issuing the printing template,

[0014] In response to a template modification instruction, controlling the template designer to modify the printing template;

[0015] In response to the template saving instruction, control the template designer to save the modified printing template and its template number and version number, and mark the status of the modified printing template as a draft status; wherein the template number of the modified printing template is the same as the template number of the printing template, and the version number of the modified printing template is a self-incremented value of the version number of the printing template;

[0016] In response to the template publishing instruction, the template designer is controlled to publish the modified printing template, and the status of the modified printing template is marked as a published status.

[0017] Optionally, the method of an embodiment of the present invention also includes: after publishing the printing template, controlling the template designer to submit the printing template in a published state to the server for storage; and, in response to a template discarding instruction, controlling the server to mark the printing template in a published state as discarded.

[0018] Optionally, the method of the embodiment of the present invention further includes: controlling the rendering engine to save the print templates in the published state and the discarded state to a local cache.

[0019] According to a second aspect of an embodiment of the present invention, there is provided a device for managing a printing template, comprising:

[0020] A creation unit, in response to a template creation instruction, controls the template designer to create a printing template;

[0021] a saving unit, in response to a template saving instruction, controlling the template designer to save the printing template and marking the status of the printing template as a draft status;

[0022] The publishing unit controls the template designer to publish the printing template in response to the template publishing instruction, and marks the status of the printing template as a publishing status.

[0023] Optionally, the saving unit is also used to: after controlling the template designer to save the printing template, control the template designer to save the template number and version number of the printing template; or, control the template designer to save the template number of the printing template, and then submit the printing template to the server, and control the server to generate a version number for the printing template.

[0024] Optionally, the apparatus of the embodiment of the present invention further comprises a modification unit, which is used to: before and / or after the printing template is issued, in response to a template modification instruction, control the template designer to modify the printing template;

[0025] The saving unit is further used to: in response to the template saving instruction, control the template designer to save the modified printing template and its template number and version number, and mark the status of the modified printing template as a draft status; wherein the template number of the modified printing template is the same as the template number of the printing template, and the version number of the modified printing template is a self-incremented value of the version number of the printing template;

[0026] The publishing unit is further used to: in response to a template publishing instruction, control the template designer to publish the modified printing template, and mark the status of the modified printing template as a published status.

[0027] Optionally, the publishing unit is further used to: after publishing the printing template, control the template designer to submit the printing template in the publishing state to the server for storage;

[0028] The device further comprises a discarding unit, which is used to: in response to a template discarding instruction, control the server to mark the printing template in the publishing state as a discarded state.

[0029] Optionally, the apparatus of the embodiment of the present invention further includes a rendering unit, which is used to control the rendering engine to save the print templates in the published state and the discarded state to the local cache.

[0030] According to a third aspect of an embodiment of the present invention, there is provided an electronic device for managing a printing template, comprising:

[0031] one or more processors;

[0032] a storage device for storing one or more programs,

[0033] When the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the embodiment of the present invention.

[0034] According to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present invention is implemented.

[0035] One embodiment of the above invention has the following advantages or beneficial effects:

[0036] (1) Based on the state management of printing templates, when the printing template changes, the old template will not be lost and the use of the old template will not be affected; at the same time, it can also provide the convenience of data testing, making it possible to put the template grayscale online.

[0037] (2) By introducing template numbers, it is easy to view old template data and roll back to old templates; by introducing the concept of versions, multiple versions of printing templates can coexist, ensuring that the corresponding template can be modified to form a new version without affecting the already released template version, thereby ensuring the stability of the online template.

[0038] (3) By modifying the published template, it is possible to make timely modifications when errors occur in the old template.

[0039] (4) By introducing the discarded state, it is possible to stop loss immediately when a template error occurs, thus preventing the expansion of data errors caused by incorrect templates.

[0040] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0042] Figure 1 It is a schematic diagram of the main process of the method for managing printing templates provided by the present invention;

[0043] Figure 2 is a schematic diagram of a state change rule of a printing template in an embodiment of the present invention;

[0044] Figure 3 is a schematic diagram of the operation flow of printing a template in an embodiment of the present invention;

[0045] Figure 4 It is a flowchart of a method for managing printing templates in an optional embodiment of the present invention;

[0046] Figure 5 It is a schematic diagram of the process of obtaining a target printing template and rendering and printing in an embodiment of the present invention;

[0047] Figure 6 is a schematic diagram of the main components of the device for managing printing templates in an embodiment of the present invention;

[0048] Figure 7 is a schematic diagram of the architecture of print template management in an embodiment of the present invention;

[0049] Figure 8 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0050] Fig. 9 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0052] In the prior art, the process of rendering and printing a printing template usually involves three parts:

[0053] Server: responsible for providing template metadata storage and query services;

[0054] Template Designer: Responsible for creating, saving, opening, and submitting print templates. You can also preview the rendering effect based on sample data to achieve WYSIWYG, making it easier to view the final result when editing the template.

[0055] Rendering engine: responsible for receiving print jobs from the business system, determining the print template, rendering the data based on the business data in the print job, and outputting it as a file or sending it to the printer.

[0056] In the prior art, after a print template is modified and saved in a template designer, the modification takes effect immediately, and all rendering engines use the modified template, which may cause rendering errors in the production environment and is not conducive to tracking and rolling back historical changes to the template.

[0057] In order to solve one or more problems existing in the prior art, according to one aspect of an embodiment of the present invention, a method for managing a printing template is provided.

[0058] Figure 1 It is a schematic diagram of the main process of the method for managing printing templates provided by the present invention, such as Figure 1 As shown, the method for managing a printing template includes:

[0059] Step S101, in response to a template creation instruction, controlling a template designer to create a printing template;

[0060] Step S102, in response to the template saving instruction, controlling the template designer to save the printing template, and marking the status of the printing template as a draft status;

[0061] Step S103: In response to the template publishing instruction, control the template designer to publish the printing template, and mark the status of the printing template as a publishing status.

[0062] The printing template is used to store the rendering style of the printing data. The present invention manages the printing template based on the state, and can neither lose the old template nor affect the use of the old template when the printing template changes; it can also provide the convenience of data testing, making it possible to put the template grayscale online.

[0063] Optionally, the method further includes: after controlling the template designer to save the printing template, controlling the template designer to save the template number and version number of the printing template; or, controlling the template designer to save the template number of the printing template, and then submitting the printing template to the server, and controlling the server to generate a version number for the printing template.

[0064] The template number is the unique identifier of the print template. By introducing the template number, it is easy to view the old template data and roll back to the old template. If the template number entered by the user when saving the print template already exists in the system, it is not allowed to be saved and needs to be replaced with another number to avoid the existing template being overwritten. Ensure that when creating a new template, neither the old template is lost nor the use of the old template is affected.

[0065] The version number is the unique identifier of the version of the print template. A print template can have multiple versions. By introducing the concept of version, multiple versions of the print template can coexist, ensuring that the corresponding template can be modified to form a new version without affecting the already released template version, thus ensuring the stability of the online template.

[0066] Optionally, the method further includes: after saving the printing template, in response to a template modification instruction, modifying the printing template in a draft state; in response to a template save instruction, saving the modified printing template and its template number and version number, and marking the status of the modified printing template as a draft state; wherein the template number and version number of the modified printing template are the same as the template number of the printing template; in response to a template publish instruction, publishing the modified printing template, and marking the status of the modified printing template as a publish state.

[0067] This step can occur multiple times until the template can meet the business requirements. In order to distinguish the modified templates, the time of saving can be recorded as the last modification time each time the template version is saved.

[0068] Optionally, the method further includes: before and / or after publishing the printing template, in response to a template modification instruction, controlling the template designer to modify the printing template; in response to a template save instruction, controlling the template designer to save the modified printing template and its template number and version number, and marking the status of the modified printing template as a draft status; wherein the template number of the modified printing template is the same as the template number of the printing template, and the version number of the modified printing template is a self-incremented value of the version number of the printing template; in response to a template publish instruction, controlling the template designer to publish the modified printing template, and marking the status of the modified printing template as a published status.

[0069] Exemplarily, the version number is a positive integer starting from 1. When a published printing template is modified and saved, the version number of the modified printing template is 2. Each time a new version is generated, the version number is increased by 1. By modifying the published template, the old template can be modified in time when an error occurs.

[0070] Optionally, the method further comprises: after publishing the printing template, controlling the template designer to submit the printing template in the publishing state to the server for storage; and, in response to a template abandonment instruction, controlling the server to mark the printing template in the publishing state as abandoned. By introducing the abandoned state, it is possible to stop the loss immediately when the template is wrong, avoiding the expansion of data errors caused by the wrong template.

[0071] In the present invention, each version of a printing template may have multiple states: draft, published, and abandoned. Figure 2 Schematic diagram of the state change rule of the printing template in the embodiment of the present invention. Figure 2 As shown, each time a new template is created, it defaults to the draft state. Templates in the draft state can be modified at will, and the version number remains unchanged when saved. If the template in the draft state is modified, it can be converted to the published state through the publish operation. Once published, this version of the template cannot be modified. When a published template is modified and saved, a new version is generated, and the default state is the draft state. Multiple versions of the same template can coexist, and they can be rendered regardless of the draft state or the published state. If there are defects in the template in the published state, resulting in errors in the print data, its status can be set to abandoned through the discard operation. Template versions that have been changed to the abandoned state cannot be rendered.

[0072] The method of the embodiment of the present invention may further include: controlling the rendering engine to save the print templates in the published state and the discarded state to the local cache. The rendering engine is responsible for receiving the print job of the business system, determining the print template of the print job, and performing data rendering in combination with the business data in the print job and outputting it as a file or sending it to a printer.

[0073] Figure 3 Schematic diagram of the printing operation process in the embodiment of the present invention. Figure 3 As shown, the state of creating a template is a draft state. The template in the draft state can be modified by editing the template, and the modification can occur multiple times until the template can meet the business requirement specifications.

[0074] A template in the draft state will not automatically notify the access system that the template number is available. If it is in the testing phase, you need to manually issue this version. When issuing a template, the template number and template status are carried, with the intention of notifying the business system that this template version can be sent for printing and rendering. It is generally used in the template testing phase, and a real printer is used to print to see if the printing effect meets business requirements. It is common in scenarios where self-adhesive thermal printers are used to print invoices or package labels.

[0075] A template in the draft state can be published if the modification is complete. When publishing, the template content, version number and template number are not modified, but the template status is changed from draft to published. Once published, this version of the template cannot be modified.

[0076] When a template is released, a message is used to notify the access system that a specific version of the template has been released. The business system can send print jobs to the rendering engine based on the template number and version number.

[0077] Multiple versions of the same template can coexist, and can be rendered regardless of the draft or published state. If a new version of the template is found to have defects, you can also choose to render a non-discarded historical version of the current template.

[0078] If there are defects in the template in the published state, the template cannot be modified. If you continue to use it for rendering and cause print data errors, you can set its status to abandoned through the discard operation. The template version that has been changed to the abandoned state cannot be rendered. If the business system continues to send jobs of this version for rendering, the rendering engine will return an error prompt to prevent the problem from expanding. When the template version is set to the abandoned state, the status of this template version is automatically sent to the business system to notify the business system that this version is unavailable, preventing subsequent operations from continuing to use this template for business.

[0079] Figure 4 Schematic diagram of the main process of the method for managing printing templates in an optional embodiment of the present invention. Figure 4As shown, the method for managing a printing template includes:

[0080] Step S401: In response to a template creation instruction, the template designer creates a printing template;

[0081] Step S402: In response to the template saving instruction, the template designer marks the status of the printing template as a draft status, and then submits it to the server;

[0082] Step S403: In response to the template publishing instruction, the template designer publishes the printing template and marks the status of the printing template as a published status.

[0083] In this example, each time in response to a template save instruction, the template designer submits the print template in draft state to the server, which saves it; each time in response to a template publish instruction, the template designer submits the print template in publish state to the server, which saves it. This enables a lightweight design of the template designer.

[0084] In this example, when the rendering engine receives a print job, it can directly obtain the print template from the server. Exemplarily, when the rendering engine receives a print job, it queries the server based on the template number and version number to see if there is a corresponding template, and if so, uses the template for rendering.

[0085] Of course, the rendering engine can use local files as cache to save published or abandoned template versions. When the rendering engine receives a print job, it first queries the local cache to see if there is a template with the corresponding template number and version number. If there is a template with the corresponding template number and version number, it uses the template in the cache for rendering. If there is no template with the corresponding template number and version number, it requests the server to obtain the template with the corresponding template number and version number. If the server has this version, it obtains the template, adds it to the cache and renders it. If not, it returns an error status of missing template or version to the business system.

[0086] When the rendering engine starts, a scheduled task can be started to obtain the template version list from the server at regular intervals. If it is found that the version on the server is newer than the local cache, the template in the local cache is updated.

[0087] The local cache of the rendering engine only contains templates in the published and abandoned states. The abandoned templates are saved in the cache because the local cache is accessed first when querying the template. If an abandoned template is found, an error message prohibiting printing and the response status can be returned. If this template is deleted from the local cache, the rendering engine needs to request the server to know the template status and cannot respond to the print request immediately. Moreover, if the template in this state is not saved in the cache, all subsequent requests for this version need to access the server, which increases the burden on the server.

[0088] For templates in draft state, in order to make them effective immediately after saving, they are not cached in the rendering engine. Because if the cache is hit, the rendering engine will no longer access the server, and thus cannot know whether the template in the draft state has been modified. If the rendering engine uses the template before modification for rendering and printing, the rendering and printing results of the modified template cannot be seen immediately. Therefore, it is necessary to let the local cache save templates in the published state or the abandoned state that will not change. Each request for the template version in the draft state will request the server to obtain the template information. The interval for refreshing the cache can be set through the configuration file of the rendering engine.

[0089] The method of the embodiment of the present invention can be applied to the fields of logistics management warehouse, transportation and distribution business.

[0090] The method of the embodiment of the present invention can be deployed locally as a process, or as a distributed system of a C / S architecture (client and server structure) or a B / S architecture (browser / server structure), for example, various versions of print templates saved can be distributedly stored.

[0091] The invention also provides a device for implementing the method.

[0092] Figure 6 Schematic diagram of the main components of the printing template management device of the embodiment of the present invention. Figure 6 As shown, the printing template management device 600 includes:

[0093] A creation unit 601 controls a template designer to create a printing template in response to a template creation instruction;

[0094] A saving unit 602 controls the template designer to save the printing template and marks the status of the printing template as a draft status in response to a template saving instruction;

[0095] The publishing unit 603 controls the template designer to publish the printing template in response to the template publishing instruction, and marks the status of the printing template as a publishing status.

[0096] Optionally, the saving unit is also used to: after controlling the template designer to save the printing template, control the template designer to save the template number and version number of the printing template; or, control the template designer to save the template number of the printing template, and then submit the printing template to the server, and control the server to generate a version number for the printing template.

[0097] Optionally, the apparatus of the embodiment of the present invention further comprises a modification unit, which is used to: before and / or after the printing template is issued, in response to a template modification instruction, control the template designer to modify the printing template;

[0098] The saving unit is further used to: in response to the template saving instruction, control the template designer to save the modified printing template and its template number and version number, and mark the status of the modified printing template as a draft status; wherein the template number of the modified printing template is the same as the template number of the printing template, and the version number of the modified printing template is a self-incremented value of the version number of the printing template;

[0099] The publishing unit is further used to: in response to a template publishing instruction, control the template designer to publish the modified printing template, and mark the status of the modified printing template as a published status.

[0100] Optionally, the publishing unit is further used to: after publishing the printing template, control the template designer to submit the printing template in the publishing state to the server for storage;

[0101] The device further comprises a discarding unit, which is used to: in response to a template discarding instruction, control the server to mark the printing template in the publishing state as a discarded state.

[0102] Optionally, the apparatus of the embodiment of the present invention further includes a rendering unit, which is used to control the rendering engine to save the print templates in the published state and the discarded state to the local cache.

[0103] Figure 7 Schematic diagram of the architecture of print template management in an embodiment of the present invention. Figure 7 As shown, the printing template management device 704 communicates with the template designer 701, the server 702 and the rendering engine 703 to realize template design, storage, and rendering and printing.

[0104] Figure 5 FIG. 1 is a flow chart of obtaining a target printing template and rendering and printing in an embodiment of the present invention. Figure 5 As shown, the following steps are included:

[0105] Step S501, monitoring a print rendering job;

[0106] Step S502, determine whether a print job is received; if so, jump to step S504; otherwise, jump to step S503;

[0107] Step S503, wait, then jump to step S502; the waiting time can be set through the configuration file;

[0108] Step S504, determining the template number and version number of the target printing template;

[0109] Step S505, determine whether there is a target printing template with a corresponding template number and version number in the local cache of the rendering engine; if so, the cache hits, and the process jumps to step S506; otherwise, the process jumps to step S509;

[0110] Step S506, determine whether the target printing template in the cache is in a discarded state; if so, jump to step S507; otherwise, jump to step S508;

[0111] Step S507: return error information;

[0112] Step S508: Render and print according to the job data and the target print template and return result status information;

[0113] Step S509, requesting the server to query the target printing template;

[0114] Step S510, determine whether the target printing template exists on the server; if so, jump to step S511; otherwise, jump to step S512;

[0115] Step S511, save the target printing template to the local cache, and then jump to step S508;

[0116] Step S512: return error information.

[0117] The present invention manages the printing template based on the state. When the printing template changes, it does not affect the running printing template. Based on the state and version management of the printing template, the changes of the template at any historical moment can be tracked; when the modification is wrong, it can be rolled back to the historical version, and the template version that has been considered invalid can be discarded to avoid the situation where data is rendered incorrectly; at the same time, it can also provide the convenience of data testing, making it possible to put the template grayscale online.

[0118] According to a third aspect of an embodiment of the present invention, there is provided an electronic device for managing a printing template, comprising:

[0119] one or more processors;

[0120] a storage device for storing one or more programs,

[0121] When the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the embodiment of the present invention.

[0122] According to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present invention is implemented.

[0123] Figure 8An exemplary system architecture 800 is shown to which the method for managing a printing template or the first apparatus for managing a printing template according to an embodiment of the present invention may be applied.

[0124] like Figure 8 As shown, system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. Network 804 is used to provide a medium for communication links between terminal devices 801, 802, 803 and server 805. Network 804 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0125] Users can use terminal devices 801, 802, and 803 to interact with server 805 through network 804 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 801, 802, and 803, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0126] The terminal devices 801 , 802 , and 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0127] The server 805 may be a server that provides various services, such as a background management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 801, 802, and 803. The background management server may analyze and process the received data such as print requests, and feed back the processing results (such as template rendering result information - only an example) to the terminal device.

[0128] The method for managing a printing template provided in the embodiment of the present invention is executed by the server 805 , and accordingly, the first printing template management device is disposed in the server 805 .

[0129] It should be noted that the method for managing print templates provided in the embodiment of the present invention can also be executed by terminal devices 801, 802, and 803. Accordingly, the first print template management device is set in the terminal devices 801, 802, and 803. For example, the background management server can analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only for example) to the terminal device. The terminal devices 801, 802, and 803 receive print requests sent by users through other terminal devices, analyze and process the received print requests and other data, and feed back the processing results (such as template rendering result information - only for example) to the user.

[0130] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0131] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer system 900 of a terminal device suitable for implementing an embodiment of the present invention. Fig. 9 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0132] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0133] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.

[0134] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present invention are executed.

[0135] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0136] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0137] The units involved in the embodiments of the present invention may be implemented in software or hardware. The units described may also be set in a processor, for example, may be described as: a processor comprising: a creation unit, in response to a template creation instruction, controlling a template designer to create a printing template; a saving unit, in response to a template saving instruction, controlling the template designer to save the printing template, and marking the status of the printing template as a draft status; a publishing unit, in response to a template publishing instruction, controlling the template designer to publish the printing template, and marking the status of the printing template as a published status. Among them, the names of these units do not constitute a limitation on the units themselves in some cases. For example, the saving unit may also be described as a "unit that controls the template designer to create a printing template."

[0138] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: responding to a template creation instruction, controlling a template designer to create a printing template; responding to a template save instruction, controlling the template designer to save the printing template and marking the status of the printing template as a draft status; responding to a template publish instruction, controlling the template designer to publish the printing template and marking the status of the printing template as a publish status.

[0139] The technical solution according to the embodiment of the present invention has the following advantages or beneficial effects:

[0140] (1) Based on the state management of printing templates, when the printing template changes, the old template will not be lost and the use of the old template will not be affected; at the same time, it can also provide the convenience of data testing, making it possible to put the template grayscale online.

[0141] (2) By introducing template numbers, it is easy to view old template data and roll back to old templates; by introducing the concept of versions, multiple versions of printing templates can coexist, ensuring that the corresponding template can be modified to form a new version without affecting the already released template version, thereby ensuring the stability of the online template.

[0142] (3) By modifying the published template, it is possible to make timely modifications when errors occur in the old template.

[0143] (4) By introducing the discarded state, it is possible to stop loss immediately when a template error occurs, thus preventing the expansion of data errors caused by incorrect templates.

[0144] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for managing printing templates, characterized in that: include: In response to the template creation instruction, control the template designer to create a printing template; In response to a template saving instruction, controlling the template designer to save the printing template and marking the status of the printing template as a draft status; After the printing template is saved, in response to a template modification instruction, modifying the printing template in a draft state; In response to the template saving instruction, save the modified printing template and its template number and version number, and mark the status of the modified printing template as a draft status; wherein the template number and version number of the modified printing template are the same as the template number and version number of the printing template; and record the saving time as the last modification time each time the template version is saved; In response to a template publishing instruction, controlling the template designer to publish the modified printing template, and marking the status of the modified printing template as a published status; Submit the draft print template to the server for saving.

2. The method according to claim 1, characterized in that Also includes: After controlling the template designer to save the printing template, control the template designer to save the template number and version number of the printing template; or, control the template designer to save the template number of the printing template, and then submit the printing template to the server, and control the server to generate a version number for the printing template.

3. The method according to claim 2, characterized in that Also includes: After publishing the print template, In response to a template modification instruction, controlling the template designer to modify the printing template; In response to the template saving instruction, control the template designer to save the modified printing template and its template number and version number, and mark the status of the modified printing template as a draft status; wherein the template number of the modified printing template is the same as the template number of the printing template, and the version number of the modified printing template is a self-incremented value of the version number of the printing template; In response to the template publishing instruction, the template designer is controlled to publish the modified printing template, and the status of the modified printing template is marked as a published status.

4. The method according to claim 1 or 3, characterized in that Also includes: After publishing the printing template, controlling the template designer to submit the printing template in the publishing state to the server for storage; And, in response to the template discarding instruction, the server is controlled to mark the printing template in the publishing state as discarded.

5. The method according to claim 4, characterized in that Also includes: Controls the rendering engine to save the print templates in the published and discarded states to the local cache.

6. A device for managing printing templates, characterized in that: include: A creation unit, in response to a template creation instruction, controls the template designer to create a printing template; a saving unit, in response to a template saving instruction, controlling the template designer to save the printing template and marking the status of the printing template as a draft status; a publishing unit, in response to a template publishing instruction, controlling the template designer to publish the modified printing template and marking the state of the modified printing template as a published state; The device is further used for: after saving the printing template, modifying the printing template in a draft state in response to a template modification instruction; In response to the template saving instruction, save the modified printing template and its template number and version number, and mark the status of the modified printing template as a draft status; wherein the template number and version number of the modified printing template are the same as the template number and version number of the printing template; and record the saving time as the last modification time each time the template version is saved; Submit the draft print template to the server for saving.

7. The device according to claim 6, characterized in that The saving unit is also used to: after controlling the template designer to save the printing template, control the template designer to save the template number and version number of the printing template; or, control the template designer to save the template number of the printing template, and then submit the printing template to the server, and control the server to generate a version number for the printing template.

8. The device according to claim 7, characterized in that It also includes a modification unit, which is used to: after the printing template is released, in response to a template modification instruction, control the template designer to modify the printing template; The saving unit is further used to: in response to the template saving instruction, control the template designer to save the modified printing template and its template number and version number, and mark the status of the modified printing template as a draft status; wherein the template number of the modified printing template is the same as the template number of the printing template, and the version number of the modified printing template is a self-incremented value of the version number of the printing template; The publishing unit is further used to: in response to a template publishing instruction, control the template designer to publish the modified printing template, and mark the status of the modified printing template as a published status.

9. An electronic device for printing template management, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Document data processing method and device in loan service and computer equipment

    CN110175807A