Method, device and equipment for printing data and computer readable medium

By analyzing the data printing request and calling the corresponding parsing components for rendering processing, the problem of excessive coupling between the client and the printing function is solved, and the printing data operation is simplified and the support of multiple data sources is achieved.

CN120010795APending Publication Date: 2025-05-16BEIJING JINGDONG QIANSHITECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311512127.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-14
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

In the prior art, the client and the printing function are too heavy, resulting in complex printing data operations.

Method used

The data header is obtained by analyzing the data printing request, including the printing data source identification, rendering method and interaction method, and the corresponding parsing component is called for rendering processing, and the processed data is transmitted to the printing device through the interactive interface.

Benefits of technology

Reduces the coupling between the client and the printing function, simplifies the operation of printing data, and supports multiple printing data sources and rendering methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010795A_ABST
    Figure CN120010795A_ABST
Patent Text Reader

Abstract

The invention discloses a data printing method, device and equipment and a computer readable medium, and relates to the technical field of computers. A specific embodiment of the method comprises the following steps: analyzing a data printing request to obtain a data head, wherein the data head comprises a printing data source identifier, a rendering mode and an interaction mode; calling an analysis component corresponding to the printing data source identifier, and performing rendering processing on the obtained printing data according to the rendering mode; and through an interface of the interaction mode, transmitting the rendered printing data to printing equipment of the interaction mode so as to print the data. According to the embodiment, the coupling between the client and the printing function can be reduced, and the data printing operation is simplified.
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, device, equipment and computer-readable medium for printing data. Background Art

[0002] Printing is an indispensable capability in all fields, so much so that all browsers support the printing function in the browser page. In addition, in most logistics and transportation fields, the transportation and distribution links rely on paper printed information such as packages or delivery notes.

[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: in the actual process of printing data, it is necessary to rely on different clients, and the client and the printing function are too heavily coupled, resulting in complex printing data operations. Summary of the invention

[0004] In view of this, embodiments of the present invention provide a method, apparatus, device and computer-readable medium for printing data, which can reduce the coupling between the client and the printing function and simplify the operation of printing data.

[0005] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for printing data is provided, which is applied to multiple printing data sources, and includes:

[0006] Parsing the data printing request to obtain a data header, wherein the data header includes a print data source identifier, a rendering mode, and an interaction mode;

[0007] Calling the parsing component corresponding to the print data source identifier, and performing rendering processing on the acquired print data according to the rendering method;

[0008] The rendered printing data is transmitted to the interactive printing device through the interactive interface to print the data.

[0009] The data print request is parsed to obtain a data header, including:

[0010] Parse the data printing request of the printing service source scenario to obtain the data header;

[0011] The print data source identifier is determined based on the print data source identifier key of the data header, the rendering mode is determined based on the rendering mode key of the data header, and the interaction mode is determined based on the interaction mode key of the data header.

[0012] The calling of the parsing component corresponding to the print data source identifier and performing rendering processing on the acquired print data according to the rendering method includes:

[0013] Parsing the data printing request to obtain the printing data;

[0014] The parsing component corresponding to the print data source identifier is called, and rendering processing is performed on the obtained print data according to the rendering mode.

[0015] The calling of the parsing component corresponding to the print data source identifier and performing rendering processing on the obtained print data according to the rendering mode includes:

[0016] The parsing component corresponding to the print data source identifier is called, and rendering processing is performed on the obtained print data according to the print data format and / or data template in the rendering mode.

[0017] The calling of the parsing component corresponding to the print data source identifier and performing rendering processing on the acquired print data according to the rendering method includes:

[0018] Acquire the printing data according to the data address in the data printing request;

[0019] The parsing component corresponding to the print data source identifier is called, and rendering processing is performed on the acquired print data according to the rendering method.

[0020] The step of transmitting the rendered print data to the interactive printing device through the interactive interface includes:

[0021] After the interactive printing device is started, the interactive printing device monitors the interactive interface;

[0022] In the interactive mode, the printing data after the rendering process is sent to the printing device in the interactive mode.

[0023] The data printing request is a request sent from a browser or an application.

[0024] According to a second aspect of an embodiment of the present invention, there is provided a device for printing data, which is applied to a variety of printing data sources, including:

[0025] A parsing module, used for parsing a data printing request to obtain a data header, wherein the data header includes a print data source identifier, a rendering mode, and an interaction mode;

[0026] An acquisition module, used for calling the parsing component corresponding to the print data source identifier, and performing rendering processing on the acquired print data according to the rendering mode;

[0027] The transmission module is used to transmit the rendered printing data to the interactive printing device through the interactive interface to print the data.

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

[0029] one or more processors;

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

[0031] When the one or more programs are executed by the one or more processors, the one or more processors implement the above method.

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

[0033] An embodiment of the above invention has the following advantages or beneficial effects: parsing a data print request to obtain a data header, the data header including a print data source identifier, a rendering mode, and an interactive mode; calling a parsing component corresponding to the print data source identifier, and performing rendering processing on the acquired print data according to the rendering mode; transmitting the rendered print data to a printing device in the interactive mode through an interface of the interactive mode to print the data. The print data from different sources is processed through the parsing component corresponding to the print data source identifier, thereby reducing the coupling between the client and the print function and simplifying the operation of printing data.

[0034] 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

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

[0036] Figure 1 It is a schematic diagram of the existing printed data;

[0037] Figure 2 It is a schematic diagram of printing data through a printing client in an existing warehouse management system;

[0038] Figure 3 is a schematic diagram of the main flow of a method for printing data according to an embodiment of the present invention;

[0039] Figure 4 is a schematic diagram of a process of parsing a data printing request to obtain a data header according to an embodiment of the present invention;

[0040] Figure 5 is a schematic diagram of the structure of a data printing request according to an embodiment of the present invention;

[0041] Figure 6 is a schematic diagram of a flow chart of performing rendering processing on print data according to an embodiment of the present invention;

[0042] Figure 7 is a schematic diagram of a flow chart of another printing data rendering process according to an embodiment of the present invention;

[0043] Figure 8 is a schematic diagram of a process of sending printing data after rendering according to an embodiment of the present invention;

[0044] Fig. 9 is a schematic diagram of implementing printing data according to an embodiment of the present invention;

[0045] Fig.10 is a schematic diagram of the main structure of a device for printing data according to an embodiment of the present invention;

[0046] Fig.11 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0047] Fig.12 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

[0048] 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.

[0049] Currently, printing data mainly depends on the print client, see Figure 1 The printing process obtains printing data from the background service, and the printing client pushes the printing data to the printer through the printing service to complete the printing data. The client includes a Web browser and an Android browser. The computer can push the printing data to the printing service through the Web browser. The mobile terminal can push the printing data to the printing service through the Android browser.

[0050] See also Figure 2 , Figure 2 This is a schematic diagram of printing data through a print client in an existing warehouse management system. In a warehouse management system (WMS), printing data requirements are realized through different print clients. Figure 2In the example, print client 1, print client 2 and print client 3 are connected through the web terminal. Print client 4 is connected through remote procedure call (rpc), invoice and proxy. It can be seen that different printing functions, printing styles and printing demands can be met by different print clients.

[0051] In the actual printing process, Figure 1 The background service of printing data can receive data through various clients to print data in different styles.

[0052] Using multiple clients to print data has the following problems:

[0053] (1) Actual production relies on multiple different clients, and different printing papers require different printers.

[0054] (2) The business system cannot perform other operations in parallel during the printing process.

[0055] (3) Every time an external business is introduced, the business system process needs to be modified and a client needs to be added.

[0056] (4) Each time a printing style is added, the business system function needs to be modified and the printing client needs to be updated.

[0057] Therefore, the client is too heavily coupled with the printing function and cannot support expansion, resulting in complicated printing data operations. This not only wastes R&D resources, but also affects actual operations and increases consumables costs.

[0058] In order to solve the technical problem of complex printing data operations, the following technical solutions in the embodiments of the present invention may be adopted.

[0059] See also Figure 3 , Figure 3 FIG. 1 is a schematic diagram of the main flow of a method for printing data according to an embodiment of the present invention, in which the printing data from different sources is processed by a parsing component corresponding to the printing data source identification. Figure 3 As shown, the specific steps include:

[0060] S301, parsing a data printing request to obtain a data header, where the data header includes a print data source identifier, a rendering method, and an interaction method.

[0061] In an embodiment of the present invention, the need to print data often occurs during the use of a browser and / or an application (APP). As an example, a user uses browser 1 to access a website and needs to print a page of the website, and a data printing request can be sent through browser 1. As another example, a user browses information in APP 2 and needs to print a page of APP 2, and a data printing request can be sent through APP 2. It can be understood that a data printing request is a request sent from a browser or an application.

[0062] In one embodiment of the present invention, which is applied to a variety of print data sources, a plug-in can be installed in a browser and / or an application (APP) to parse a data print request to obtain a data header. As an example, plug-in a is installed in browser 1, so that when a web page is accessed through browser 1, plug-in a receives and parses a data print request to obtain a data header. As another example, plug-in b is installed in APP 2, so that when a page is browsed through APP 2, plug-in b receives and parses a data print request to obtain a data header.

[0063] See also Figure 4 , Figure 4 The flowchart of parsing a data print request to obtain a data header according to an embodiment of the present invention includes the following steps:

[0064] S401, parse the data printing request of the printing service source scenario to obtain the data header.

[0065] In an embodiment of the present invention, a data printing request is a request in a printing service source scenario. A printing service source scenario is a scenario in which a user needs a printing service in a browser or an APP. As an example, a printing service source scenario includes one or more of the following: a product display scenario, a shopping cart scenario, a checkout scenario, and a payment scenario. It is understandable that in a browser or an APP, when multiple application scenarios are involved and data in the above application scenarios need to be printed, the application scenario can be used as a printing service source scenario. That is, the technical solution in the embodiment of the present invention can be applied to a variety of printing data sources,

[0066] The print data is triggered by a data print request based on a print service source scenario. The data print request includes a data header and a data body. The data header includes data print parameters, and the data body includes print data parameters. As an example, the data print request of the print service source scenario is parsed according to a preset format to obtain a data header.

[0067] S402, determining a print data source identifier based on a print data source identifier key of the data header, determining a rendering mode based on a rendering mode key of the data header, and determining an interaction mode based on an interaction mode key of the data header.

[0068] The data printing parameters in the data header are mostly stored in the form of key-value pairs. As an example, the key-value pairs include: a print data source identification key and a print data source identification; a rendering mode key and a rendering mode; and an interaction mode key and an interaction mode.

[0069] When the key in the key-value pair is known, the value in the key-value pair can be directly known. That is, the print data source identifier is determined based on the print data source identifier key of the data header, the rendering mode is determined based on the rendering mode key of the data header, and the interaction mode is determined based on the interaction mode key of the data header. The print data source identifier reflects the source of the print data. Based on different print data source identifiers, the sources of the print data are different. In one embodiment of the present invention, the print data source identifier is a parameter that records the source of the print data. As an example, the print data source identifier includes APP1, that is, the print data comes from APP1.

[0070] The rendering mode is the storage location of the print data. As an example, the rendering mode includes local storage. As another example, the rendering mode includes remote storage.

[0071] The interaction mode is a mode of interacting data with the printing service source scene. As an example, the interaction mode includes the Hyper Text Transfer Protocol (HTTP) mode. As another example, the interaction mode includes the WebSocket mode. WebSocket is a protocol for full-duplex communication over a single TCP connection. Among them, HTTP is a one-way communication protocol; WebSocket is a two-way communication protocol.

[0072] exist Figure 4 In the embodiment, by parsing the data printing request, the parameters of the printing data can be timely acquired, and the printing data can be processed in a targeted manner by combining the printing data source identification, rendering mode and interaction mode.

[0073] See also Figure 5 , Figure 5 1 is a schematic diagram of the structure of a data print request according to an embodiment of the present invention. The data print request includes two parts, namely a data header and a data body.

[0074] The data body includes print data and a data address. It should be noted that, when the rendering mode includes local storage, the print data is stored in the data body. When the rendering mode includes remote storage, the data address includes an address for obtaining the print data.

[0075] The data header includes a print data source identifier, a rendering method, an interaction method, a print data format, and a data template. The print data format is a preset output format of the print data. As an example, the print data format includes an html file, an xml file, or a picture. The data template is an output template of the print data. The print data can be output according to the data template. As an example, the data template includes a uniform resource locator (URL) for downloading the template. The data template can be downloaded based on the above URL.

[0076] S302 , calling a parsing component corresponding to the print data source identifier, and performing rendering processing on the acquired print data according to the rendering mode.

[0077] The print data source identifier is a parameter for recording the source of the print data. The parsing component is called according to the print data source identifier to process the print data according to the rendering method.

[0078] In the embodiment of the present invention, the print data is processed by the parsing component. Considering that the data sources are different, the formats of the print data are different. In order to avoid using multiple clients to process the print data from different data sources, the parsing component corresponding to the data source identifier can be pre-set.

[0079] As an example, the data source identifier 11 corresponds to the parsing component aa. The parsing component aa can be used to parse the print data of the data source identifier 11. The data source identifier 22 corresponds to the parsing component bb. The parsing component bb can parse the print data of the data source identifier 22.

[0080] See also Figure 6 , Figure 6 The present invention is a flowchart of performing rendering processing on print data according to an embodiment of the present invention. The present invention specifically includes the following steps:

[0081] S601, parsing a data printing request to obtain printing data.

[0082] In one embodiment of the present invention, the data body of the data print request includes print data. The print body can be obtained by parsing the data print request, and then the print data can be obtained from the print body.

[0083] S602: Call the parsing component corresponding to the print data source identifier, and perform rendering processing on the obtained print data according to the rendering mode.

[0084] For the print data, a parsing component is required to identify it. The parsing component corresponding to the print data source identifier can be called to identify the print data. Then, the print data is rendered according to the rendering method.

[0085] In one embodiment of the present invention, when the rendering method includes a data format and / or a data template, the parsing component corresponding to the print data source identifier can be called to perform rendering processing on the obtained print data according to the data format and / or data template in the rendering method. In this way, the print data after rendering processing can be output according to the above data format and / or data template to meet the requirements of print data.

[0086] exist Figure 6 In the embodiment, for the print data obtained from the data print request, the print data can be rendered based on the print data format and / or the data template.

[0087] See also Figure 7 , Figure 7 This is another flow chart of printing data rendering processing according to an embodiment of the present invention. Specifically, it includes the following steps:

[0088] S701. Obtain printing data according to the data address in the data printing request.

[0089] If the data print request does not include the print data, the print data needs to be obtained from a remotely stored database. If the data body of the data print request includes a data address, the print data is obtained from the remotely stored database based on the data address.

[0090] S702: Call the parsing component corresponding to the print data source identifier, and perform rendering processing on the obtained print data according to the rendering mode.

[0091] After the print data is acquired from the remotely stored database, the parsing component corresponding to the print data source identifier can be called to render the acquired print data in a rendering manner. As an example, the rendering manner includes remote calling, and the print data parsed by the parsing component can be remotely stored.

[0092] exist Figure 7 In the embodiment, the print data can be obtained according to the data address and the rendering process can be performed.

[0093] S303 . Transmit the rendered printing data to an interactive printing device through an interactive interface to print the data.

[0094] The printing data after rendering needs to be transmitted to a printing device so that the printing data after rendering can be output by the printing device.

[0095] See also Figure 8 , Figure 8 The flowchart of sending the printing data after rendering processing according to an embodiment of the present invention is shown in FIG. The flowchart specifically includes the following steps:

[0096] S801: After the interactive printing device is started, the interactive printing device monitors the interactive interface.

[0097] In the embodiment of the present invention, in order to receive the rendered print data in time, the printing device needs to monitor the interface of the interactive mode. It can be understood that the printing device corresponds to the interactive mode, and the monitoring interface corresponds to the interactive mode.

[0098] As an example, in order to improve monitoring efficiency, an interactive printing device may monitor an interactive interface according to a preset period.

[0099] S802: Send the rendered print data to an interactive printing device in an interactive manner.

[0100] When the printing device monitors the interface, it can adopt an interactive mode to send the rendered printing data to the printing device in the interactive mode.

[0101] As an example, the interaction method includes HTTP, which is a one-way communication protocol. Using HTTP, the rendered print data is directly sent to the HTTP printing device, thereby implementing the print data in the HTTP printing device.

[0102] As another example, the interaction method includes the WebSocket method, which is a two-way communication protocol. After the interaction is performed in the WebSocket method, the rendered print data is sent to the WebSocket printing device, thereby implementing the print data in the WebSocket printing device.

[0103] exist Figure 8 In the embodiment, a monitoring interface is adopted to print data through an interactive printing device.

[0104] In the above embodiment of the present invention, the data print request is parsed to obtain a data header, the data header includes a print data source identifier, a rendering mode, and an interactive mode; the parsing component corresponding to the print data source identifier is called, and the acquired print data is rendered according to the rendering mode; the print data after the rendering process is transmitted to the interactive mode printing device through the interface of the interactive mode to print the data. The print data from different sources is processed through the parsing component corresponding to the print data source identifier, thereby reducing the coupling between the client and the print function and simplifying the operation of the print data.

[0105] See also Fig. 9 , Fig. 91 is a schematic diagram of implementing printing data according to an embodiment of the present invention. The printing plug-in is set in APP1, APP2 and browser 3.

[0106] Fig. 9 APP1, APP2 and browser 3 send data printing requests to the print plug-in. Execute using the print plug-in Figure 3 The printing plug-in sends data to the first printer, the second printer or the third printer to print the data.

[0107] Fig. 9 The print plug-in in the uses HTTP to interact and achieve one-way synchronization. It uses WebScoket to interact and achieve two-way asynchrony. The print plug-in supports multiple rendering methods. And outputs print data according to the print data format and / or data template.

[0108] See also Fig.10 , Fig.10 is a schematic diagram of the main structure of a device for printing data according to an embodiment of the present invention. The device for printing data can implement a method for printing data, such as Fig.10 As shown, the device for printing data specifically includes:

[0109] A parsing module 1001 is used to parse a data printing request to obtain a data header, wherein the data header includes a print data source identifier, a rendering mode, and an interaction mode;

[0110] An acquisition module 1002 is used to call a parsing component corresponding to the print data source identifier, and perform rendering processing on the acquired print data according to the rendering mode;

[0111] The transmission module 1003 is used to transmit the rendered printing data to the interactive printing device through the interactive interface to print the data.

[0112] In one embodiment of the present invention, the parsing module 1001 is specifically used to parse the data print request of the print service source scenario to obtain the data header;

[0113] The print data source identifier is determined based on the print data source identifier key of the data header, the rendering mode is determined based on the rendering mode key of the data header, and the interaction mode is determined based on the interaction mode key of the data header.

[0114] In one embodiment of the present invention, the acquisition module 1002 is specifically configured to parse the data printing request to obtain the printing data;

[0115] The parsing component corresponding to the print data source identifier is called, and rendering processing is performed on the obtained print data according to the rendering mode.

[0116] In one embodiment of the present invention, the acquisition module 1002 is specifically configured to call a parsing component corresponding to the print data source identifier, and perform rendering processing on the obtained print data according to the print data format and / or data template in the rendering mode.

[0117] In one embodiment of the present invention, the acquisition module 1002 is specifically configured to acquire the print data according to the data address in the data print request;

[0118] The parsing component corresponding to the print data source identifier is called, and rendering processing is performed on the acquired print data according to the rendering method.

[0119] In one embodiment of the present invention, the transmission module 1003 is specifically used for monitoring the interface of the interactive mode by the interactive mode printing device after the interactive mode printing device is started;

[0120] In the interactive mode, the printing data after the rendering process is sent to the printing device in the interactive mode.

[0121] In one embodiment of the present invention, the data printing request is a request sent from a browser or an application.

[0122] Fig.11 An exemplary system architecture 1100 is shown to which the method for printing data or the apparatus for printing data according to the embodiment of the present invention can be applied.

[0123] like Fig.11 As shown, system architecture 1100 may include terminal devices 1101, 1102, 1103, a network 1104, and a server 1105. Network 1104 is used to provide a medium for communication links between terminal devices 1101, 1102, 1103 and server 1105. Network 1104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0124] Users can use terminal devices 1101, 1102, 1103 to interact with server 1105 through network 1104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 1101, 1102, 1103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0125] The terminal devices 1101 , 1102 , and 1103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.

[0126] The server 1105 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 1101, 1102, and 1103. The backend management server may 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 an example) to the terminal device.

[0127] It should be noted that the method for printing data provided in the embodiment of the present invention is generally executed by the server 1105 , and accordingly, the device for printing data is generally disposed in the server 1105 .

[0128] It should be understood that Fig.11 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.

[0129] Reference below Fig.12 , which shows a schematic diagram of the structure of a computer system 1200 of a terminal device suitable for implementing an embodiment of the present invention. Fig.12 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.

[0130] like Fig.12 As shown, the computer system 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage part 1208 into a random access memory (RAM) 1203. In the RAM 1203, various programs and data required for the operation of the system 1200 are also stored. The CPU 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

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

[0132] 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 1209, and / or installed from the removable medium 1211. When the computer program is executed by the central processing unit (CPU) 1201, the above-mentioned functions defined in the system of the present invention are executed.

[0133] 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.

[0134] 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.

[0135] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, they may be described as: a processor including a parsing module, an acquisition module and a transmission module. The names of these modules do not constitute limitations on the modules themselves in certain cases, for example, the parsing module may also be described as "used to parse a data printing request to obtain a data header, wherein the data header includes a print data source identifier, a rendering method and an interaction method".

[0136] 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:

[0137] Parsing the data printing request to obtain a data header, wherein the data header includes a print data source identifier, a rendering mode, and an interaction mode;

[0138] Calling the parsing component corresponding to the print data source identifier, and performing rendering processing on the acquired print data according to the rendering method;

[0139] The rendered printing data is transmitted to the interactive printing device through the interactive interface to print the data.

[0140] According to the technical solution of the embodiment of the present invention, the data print request is parsed to obtain a data header, the data header includes a print data source identifier, a rendering mode and an interactive mode; the parsing component corresponding to the print data source identifier is called, and the acquired print data is rendered according to the rendering mode; the print data after the rendering process is transmitted to the printing device of the interactive mode through the interface of the interactive mode to print the data. The print data from different sources is processed through the parsing component corresponding to the print data source identifier, thereby reducing the coupling between the client and the print function and simplifying the operation of the print data.

[0141] The above specific implementation methods do not constitute limitations on the scope of protection of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention. It should be noted that in the technical solution disclosed in this disclosure, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

Claims

1. A method for printing data, characterized in that: Applicable to a variety of print data sources, including: Parsing the data printing request to obtain a data header, wherein the data header includes a print data source identifier, a rendering mode, and an interaction mode; Calling the parsing component corresponding to the print data source identifier, and performing rendering processing on the acquired print data according to the rendering method; The rendered printing data is transmitted to the interactive printing device through the interactive interface to print the data.

2. The method for printing data according to claim 1, characterized in that: The data print request is parsed to obtain a data header, including: Parse the data printing request of the printing service source scenario to obtain the data header; The print data source identifier is determined based on the print data source identifier key of the data header, the rendering mode is determined based on the rendering mode key of the data header, and the interaction mode is determined based on the interaction mode key of the data header.

3. The method for printing data according to claim 1, characterized in that: The calling of the parsing component corresponding to the print data source identifier and performing rendering processing on the acquired print data according to the rendering method includes: Parsing the data printing request to obtain the printing data; The parsing component corresponding to the print data source identifier is called, and rendering processing is performed on the obtained print data according to the rendering mode.

4. The method for printing data according to claim 3, characterized in that: The calling of the parsing component corresponding to the print data source identifier and performing rendering processing on the obtained print data according to the rendering mode includes: The parsing component corresponding to the print data source identifier is called, and rendering processing is performed on the obtained print data according to the print data format and / or data template in the rendering mode.

5. The method for printing data according to claim 1, characterized in that: The calling of the parsing component corresponding to the print data source identifier and performing rendering processing on the acquired print data according to the rendering method includes: Acquire the printing data according to the data address in the data printing request; The parsing component corresponding to the print data source identifier is called, and rendering processing is performed on the acquired print data according to the rendering method.

6. The method for printing data according to claim 1, characterized in that: The step of transmitting the rendered print data to the interactive printing device through the interactive interface includes: After the interactive printing device is started, the interactive printing device monitors the interactive interface; In the interactive mode, the printing data after the rendering process is sent to the printing device in the interactive mode.

7. The method for printing data according to claim 1, characterized in that: The data printing request is a request sent from a browser or an application.

8. A device for printing data, characterized in that: Applicable to a variety of print data sources, including: A parsing module, used for parsing a data printing request to obtain a data header, wherein the data header includes a print data source identifier, a rendering mode, and an interaction mode; An acquisition module, used for calling the parsing component corresponding to the print data source identifier, and performing rendering processing on the acquired print data according to the rendering mode; The transmission module is used to transmit the rendered printing data to the interactive printing device through the interactive interface to print the data.

9. An electronic device for printing data, 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 7.

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 7 is implemented.