A semi-virtualization printing method and device, and an electronic device
Patent Information
- Application Number
- CN202211528569.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2042-11-30
AI Technical Summary
用于解决现有对于高级特性来说,虚拟打印机与物理打印机协调问题
[0044]本申请实施例,为了解决当遇到比如虚拟打印机没有提供环保、翻页功能,或者不支持大画幅打印时,即使物理打印机有这个功能也无法使用,造成资源浪费的问题,因此对于高级特性来说,虚拟打印机与物理打印机协调问题成了亟待解决的问题,本申请实施例在打印管控需求下,既达到了管控的目的,同时提供了较完善的打印体验,避免了虚拟打印机与物理打印机的特性冲突。
Smart Images

Figure CN115857841B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of printing technology, and in particular to a semi-virtualized printing method, apparatus, and electronic device. Background Technology
[0002] Virtual printing technology uses software within the operating system to simulate a real printer. Virtual printing involves selecting a virtual printer within editing software and using its driver to output the document as a formatted file. For example, in WPS Office, the CUPS-PDF virtual printer can be used to convert a document into a PDF. Specifically, the user initiates a print job by selecting a virtual printer. The CUPS (Common UNIX Printing System) processes the print job and sends the content to the virtual printer software. Afterward, the virtual printer generates a PDF file based on customized functions.
[0003] With the development of the domestically developed Linux operating system in recent years, the demand for CUPS-based printing has increased. Currently, a secure printing technology solution based on virtual printing technology has been developed to manage and control user printing operations. In existing virtual printer solutions, a virtual printer first needs to be installed on the user's PC. The process for initiating a print job is as follows:
[0004] Specifically, the user initiates a print job using a virtual printer; the operating system's CUPS processes the print job, and while the CUPS coordinates with the virtual printer driver, it transfers the print data and sends it to the print management system; after approval and confirmation, the processed print data is sent to the CUPS; and the CUPS then uses the print data to initiate a print job using a real physical printer.
[0005] However, since physical printer drivers and physical printers are typically used in pairs, each physical printer model has different paper sizes, paper feed options, single / double-sided printing, black and white / color printing, and environmental protection features. Physical printer drivers provide customized functions for the physical printer to facilitate user interaction; virtual printers, as general-purpose printer drivers, can define their own functions more freely if they are not ultimately connected to a physical printer. However, the data generated by the virtual printer for management purposes ultimately needs to be sent to the physical printer for interpretation. This can lead to situations where, for example, the virtual printer lacks environmental protection or page-turning functions, or does not support large-format printing, even if the physical printer has these functions, they cannot be used, resulting in wasted resources. Therefore, for advanced features, the coordination between virtual and physical printers has become a pressing issue that needs to be addressed. Summary of the Invention
[0006] The purpose of this application is to provide a semi-virtualized printing method, apparatus, and electronic device to solve the problem of coordinating virtual and physical printers for advanced features.
[0007] In a first aspect, embodiments of this application provide a semi-virtualized printing method applied to a first device, the method comprising:
[0008] Based on the user-initiated print task, obtain the first print data in the print task;
[0009] The first print data is converted into second print data that can be recognized by the second device through the physical printer driver, and the second print data is sent. The second device includes a function for confidentiality verification and outputting the data to be printed to the physical printer.
[0010] The second print data is intercepted by the Backend and sent to the second device. The second device then performs a confidentiality audit on the second print data to obtain encrypted data. After the encrypted data is formatted, it obtains printable data that can be recognized by the physical printer and sends the printable data to the physical printer corresponding to the print job.
[0011] In some possible embodiments, the first print data is converted into second print data recognizable by the second device via a physical printer driver, including:
[0012] Obtain the file representing the characteristics of the physical printer from the pre-installed physical printer driver;
[0013] A correction file is obtained by pre-deleting pre-specified fields in the file, and the first print data is converted into second print data in PostScript format based on the correction file;
[0014] The PostScript format is a data format that the second device can recognize.
[0015] Secondly, embodiments of this application provide a semi-virtualized printing method applied to a second device, the second device including a method for confidentiality verification and outputting data to be printed to a physical printer, the method comprising:
[0016] Receive second print data transmitted by a first device for initiating a print job, wherein the second print data is sent by the first device after converting the first print data in the print job into data recognizable by the output device through a physical printer driver;
[0017] The second printed data is subjected to a confidentiality audit to obtain encrypted data;
[0018] The encrypted data is processed to obtain printable data that can be recognized by a physical printer;
[0019] The data to be printed is sent to the physical printer corresponding to the print job.
[0020] In some possible embodiments, the encrypted data is formatted to obtain printable data recognizable by a physical printer, including:
[0021] By using the physical printer driver pre-installed on the second device, obtain the file in the physical printer driver that represents the characteristics of the physical printer;
[0022] The encrypted data is formatted using the file to obtain printable data that can be recognized by a physical printer;
[0023] Sending the data to be printed to the physical printer corresponding to the print job includes:
[0024] Send the data to be printed to the Backend specified by the physical printer driver;
[0025] The data to be printed is sent to the physical printer via the Backend.
[0026] In some possible embodiments, the encrypted data is formatted to obtain the data to be printed corresponding to the physical printer, including:
[0027] The encrypted data is sent to the CUPS in the second device;
[0028] The encrypted data is processed by the CUPS to obtain the data to be printed corresponding to the physical printer.
[0029] Sending the data to be printed to the physical printer corresponding to the print job includes:
[0030] The CUPS sends the data to be printed to the physical printer corresponding to the print job.
[0031] Thirdly, embodiments of this application provide a semi-virtualized printing apparatus, the apparatus comprising:
[0032] The acquisition module is used to acquire the first print data in the print task initiated by the user.
[0033] A conversion module is used to convert the first print data into second print data that can be recognized by the second device through a physical printer driver, and send the second print data, wherein the second device includes a function for confidentiality verification and outputting the data to be printed to a physical printer;
[0034] The sending module is used to intercept the second print data sent via the Backend and send it to the second device. The second device performs confidentiality verification on the second print data to obtain encrypted data, processes the encrypted data to obtain printable data that can be recognized by the physical printer, and sends the printable data to the physical printer corresponding to the print task.
[0035] Fourthly, embodiments of this application provide a semi-virtualized printing device, which is used for confidentiality verification and outputting data to be printed to a physical printer. The device includes:
[0036] The receiving module is used to receive second printing data transmitted by a first device for initiating a printing task, wherein the second printing data is sent by the first device after converting the first printing data in the printing task into data recognizable by the output device through a physical printer driver;
[0037] The audit module is used to perform a confidentiality audit on the second printed data to obtain encrypted data.
[0038] The processing module is used to process the encrypted data to obtain printable data that can be recognized by the physical printer;
[0039] The module for sending data to be printed is used to send the data to be printed to the physical printer corresponding to the print job.
[0040] Fifthly, embodiments of this application provide an electronic device, including at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the semi-virtualized printing method provided in the first aspect above.
[0041] In a sixth aspect, embodiments of this application provide an electronic device, including at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the semi-virtualized printing method provided in the second aspect above.
[0042] In a seventh aspect, embodiments of this application provide a computer storage medium storing a computer program for causing a computer to execute the semi-virtualized printing method provided in the first aspect.
[0043] Eighthly, embodiments of this application provide a computer storage medium storing a computer program for causing a computer to execute the semi-virtualized printing method provided in the second aspect above.
[0044] In this embodiment of the application, the problem of wasting resources arises when a virtual printer does not provide environmental protection or page-turning functions, or does not support large-format printing, even if the physical printer has these functions. Therefore, for advanced features, the coordination between virtual and physical printers has become an urgent issue to be addressed. This embodiment of the application achieves the purpose of control while providing a more complete printing experience under the printing control requirements, and avoids feature conflicts between virtual and physical printers.
[0045] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0046] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments of this application will be briefly introduced below. Obviously, the drawings introduced below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is a schematic diagram of device deployment according to one embodiment of this application;
[0048] Figure 2 This is a schematic diagram of another device deployment according to one embodiment of this application;
[0049] Figure 3 This is a flowchart illustrating a semi-virtualized printing method according to an embodiment of this application, applied to a first device.
[0050] Figure 4 This is a flowchart illustrating the application of a semi-virtualized printing method according to an embodiment of this application to a second device.
[0051] Figure 5 This is a schematic diagram of a semi-virtualized printing apparatus according to an embodiment of this application;
[0052] Figure 6 This is a schematic diagram of a device structure for semi-virtualized printing according to an embodiment of the present application, used for confidentiality verification and outputting data to be printed to a physical printer.
[0053] Figure 7 This is a schematic diagram of an electronic device structure according to an embodiment of this application. Detailed Implementation
[0054] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or", for example, A / B can mean A or B; "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.
[0055] In the description of the embodiments of this application, unless otherwise stated, the term "multiple" refers to two or more, and other quantifiers are similarly understood. The preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.
[0056] To further illustrate the technical solutions provided in the embodiments of this application, a detailed description is provided below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of this application provide method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on conventional or non-inventive effort. For steps that do not logically have a necessary causal relationship, the execution order of these steps is not limited to the execution order provided in the embodiments of this application. In actual processing or when the control device executes the method, it may be executed sequentially or in parallel according to the method shown in the embodiments or drawings.
[0057] Given that in related technologies, when virtual printers lack features such as environmental friendliness, page-turning functionality, or support for large-format printing, even if the physical printer has these functions, they cannot be used, resulting in resource waste, the coordination between virtual and physical printers has become an urgent problem to be solved for advanced features. This application proposes a semi-virtualized printing method, apparatus, and electronic device that, under print management requirements, achieves both control and a more complete printing experience, avoiding feature conflicts between virtual and physical printers.
[0058] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0059] Current printing technologies:
[0060] 1. On computers without print control requirements, which is the typical scenario, application programs such as web layout software and browsers (the "applications" described below refer to such software, such as WPS, Firefox, and xpdf, which are user-operable software that initiates printing) directly call the CUPS interface to print: First, connect the physical printer and install the driver provided by the printer manufacturer; then, the application calls the print interface provided by CUPS to send the document to be printed to CUPS; finally, after coordination and processing by CUPS and the driver, the processed print data is sent to the physical printer for printing.
[0061] Although this method eliminates the interaction and coordination issues between virtual and physical printers, it cannot meet the requirements for control. When confidential documents require special operations such as approval or encryption before printing, this method cannot achieve controlled printing.
[0062] 2. On computers with management and control requirements, virtual printers are used to acquire print data. The business system used for management and control processes the print data and then sends it to CUPS for printing on physical printers.
[0063] Virtualized printers can be understood as PDF printers (creating PDF files), XPS printers (on Windows, creating XPS files), etc. They use the printing interface in the operating system to perform specific functions, and virtualized printers do not need to be connected to a physical printer. Virtualized printing involves two CUPS processes: the first is the print job initiation phase, and the second is the print job output phase, with the business system handling the management and control in between.
[0064] Specifically, in the task initiation phase: first, the virtual printer driver is installed; then, the application calls the printing interface provided by CUPS to send the file to be printed in the print job to CUPS; finally, when CUPS and the virtual printer driver coordinate the processing, the print data in the print file is transferred out and not output to the physical printer, but sent to the business system for management and processing.
[0065] Control Phase: The business system reads and processes the print data obtained during the task initiation phase. It performs control operations such as content approval and adding watermarks / barcodes, and then sends the processed print data to the task output phase.
[0066] Task output phase: First, connect the physical printer and install the driver provided by the printer manufacturer; then, the control program calls the printing interface provided by CUPS to send the print data processed in the control phase to CUPS; finally, after coordination between CUPS and the installed printer manufacturer's driver, the processed print data is sent to the physical printer, which then completes the printing.
[0067] For the aforementioned semi-virtual printing method, since the printer driver provided by the printer manufacturer and the physical printer should be used in conjunction, each model of physical printer has different paper sizes, paper feed options, single / double-sided printing, black and white / color printing, and environmental protection features. The driver will provide customized functions for the physical printer to facilitate interaction with the user.
[0068] A virtual printer acts as a general-purpose printer driver. If it's not ultimately connected to a physical printer, similar to a PDF printer, its functionality can be defined relatively freely. However, in the method described above, the data generated by the virtual printer for control ultimately needs to be sent to the physical printer for interpretation.
[0069] This can lead to problems, such as the virtual printer not providing eco-friendly or page-turning functions, or not supporting large-format printing. Even if the physical printer has these functions, they cannot be used, resulting in wasted resources. Furthermore, advanced features are not always universally applicable across different physical printer manufacturers; each manufacturer has different recording methods for similar functions (as long as the driver and physical printer are well-coordinated). Virtual printers struggle to support physical printers with varying characteristics, offering only relatively universal and basic functions. For example, a virtual printer might be able to print A3 pages, but the physical printer can only print A4, resulting in an error. In short, the aforementioned semi-virtualized printing method suffers from feature conflicts between virtual and physical printers.
[0070] The semi-virtualized printing method in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0071] Before describing the semi-virtualized printing method of this application, let's introduce the equipment deployment scheme related to this application.
[0072] Deployment Option 1: See Figure 1 It consists of three main equipment units.
[0073] The first device is the device where the task is initiated, the second device is the server and the device where the task output is located, and the third device is the physical printer that completes the final printing.
[0074] Deployment Option 2: See Figure 2 It includes four main devices (the second device in deployment scheme 1 is split into two devices: a server and a task output device).
[0075] The first device is the device where the task is initiated, the server and the device where the task output is located, and the fourth device is the physical printer that completes the final printing.
[0076] Figure 3 This illustration shows a schematic flowchart of a semi-virtualized printing method provided in an embodiment of this application, applied to a first device, including:
[0077] Step 301: Based on the user-initiated print task, obtain the first print data in the print task.
[0078] Specifically, the user / operator initiates a print job using an application (WPS, etc.). The first device acquires the initial print data from the print job. This initial print data includes the print content of the print job, as well as some parameter settings related to the print content.
[0079] The parameters include basic parameters such as number of pages, number of copies, and print initiator, as well as advanced features supported by the printer, such as ink saving, page turning, and binding information. The advanced features supported by the printer vary depending on the physical printer model and printer driver.
[0080] Step 302: Convert the first print data into second print data that can be recognized by the second device through the physical printer driver, and send the second print data, wherein the second device includes a device for confidentiality verification and outputting the data to be printed to the physical printer.
[0081] The physical printer driver is pre-installed during the preparation phase, meaning it only needs to be installed once on the first device during preparation and does not need to be repeatedly installed every time a print job is performed. Specifically, the user / operator installs the printer driver provided by the physical printer manufacturer on the first device. The components included in the printer driver are determined by the physical printer manufacturer and should at least include files that represent the characteristics of the physical printer, which may include other programs such as filters, detailed information about the printer driver, and interaction information between the printer driver and CUPS.
[0082] Optionally, the first print data is converted into second print data recognizable by the second device via a physical printer driver, including:
[0083] Obtain the file representing the characteristics of the physical printer from the pre-installed physical printer driver;
[0084] A correction file is obtained by pre-deleting pre-specified fields in the file, and the first print data is converted into second print data in PostScript format based on the correction file;
[0085] The PostScript format is a data format that the second device can recognize.
[0086] Specifically, a file used to describe the characteristics of the physical printer, such as a PPD (PostScript Printer Description).
[0087] The corrected file is as follows: The client's print management program reads, parses, and modifies the PPD file. Specifically, the client's print management program deletes the contents of the cupsFilter and cupsFilter2 fields from the PPD file.
[0088] The two fields, cupsFilter and cupsFilter2, have essentially the same meaning: to use the specified executable program to convert print data of MIME (Multipurpose Internet Mail Extensions) type source / type to destination / type.
[0089] The destination / type data format converted by the cupsFilter program is in a format that the physical printer can recognize. The cupsFilter information is then removed from the PPD file so that CUPS does not convert the print data format, and the print data format defaults to PostScript.
[0090] MIME types are a standard used to represent the nature and format of documents, files, or byte streams.
[0091] Step 303: The second print data is intercepted by the Backend and sent to the second device. The second device performs confidentiality verification on the second print data to obtain encrypted data, processes the encrypted data to obtain printable data that can be recognized by the physical printer, and sends the printable data to the physical printer corresponding to the print task.
[0092] It should be noted that when installing the printer driver on the first device, the Backend settings in the printer driver installed on the first device are modified in advance. The function of the Backend is changed to be used for data interception. That is, when the second print data is received, the second print data is not sent to the physical printer, but sent to the second device instead.
[0093] Backend can be understood as a port program in Windows printing, which sends print data to the physical printer via communication methods such as network, USB, serial and parallel ports.
[0094] Example 2
[0095] Based on the same inventive concept, this application also provides a semi-virtualized printing method, such as... Figure 4 As shown, this method is applied to a second device, which includes functions for confidentiality verification and outputting the data to be printed to a physical printer. It should be noted that this method is applied in deployment scheme 1 described above, and the method includes:
[0096] Step 401: Receive second print data transmitted by the first device for initiating a print job, wherein the second print data is sent by the first device after converting the first print data in the print job into data recognizable by the output device through the physical printer driver.
[0097] The second print data includes the print content converted by the first device, as well as some parameter settings related to the print content. Parameters include basic parameters, such as the number of pages, number of copies, and print initiator, as well as advanced features supported by the printer, such as ink saving, page turning, and binding information; the advanced features supported by the printer vary depending on the physical printer model and printer driver.
[0098] Step 402: Perform a confidentiality audit on the second printed data to obtain encrypted data.
[0099] Received second print data in PostScript format sent by the first device.
[0100] Confidentiality auditing refers to reading and processing the second print data in PostScript format, completing operations such as content approval, adding watermarks, adding barcodes, and generating encrypted data.
[0101] It should be noted that the encrypted data after confidentiality review can be in PostScript format or other data formats; there are no restrictions here.
[0102] Step 403: Process the encrypted data to obtain printable data that can be recognized by the physical printer.
[0103] After the second device receives the encrypted data, this application includes two processing methods for the encrypted data:
[0104] Method 1: Output the data to be printed to the physical printer without using the CUPS installed on the second device.
[0105] Optionally, the encrypted data is formatted to obtain printable data recognizable by the physical printer, including: obtaining a file representing the characteristics of the physical printer from the physical printer driver pre-installed on the second device;
[0106] The encrypted data is formatted using the file to obtain printable data that can be recognized by a physical printer.
[0107] Specifically, the physical printer driver installed on the second device is the same driver as the physical printer driver installed on the first device.
[0108] A file used to represent the characteristics of the physical printer, such as a PPD file. This PPD file is the same as the PPD file in step 302 above, except that the PPD file in step 302 was modified into a correction file, while this PPD file is the original file and has not been modified.
[0109] The second device parses the PPD file in the printer driver, reads the cupsFilter information within it, and processes the encrypted data according to the MIME format of the encrypted data and the cupsFilter information in the PPD file to obtain the printable data that the physical printer can recognize.
[0110] Method 2: Use the CUPS installed on the second device to output the data to be printed to the physical printer.
[0111] Optionally, the encrypted data is formatted to obtain the data to be printed corresponding to the physical printer, including:
[0112] The encrypted data is sent to the CUPS in the second device;
[0113] The encrypted data is processed by the CUPS to obtain the data to be printed corresponding to the physical printer.
[0114] Specifically, after receiving the encrypted data, the CUPS in the second device coordinates with the printer driver pre-installed on the second device to convert the processed encrypted data into printable data. The printable data is in a format recognizable by the physical printer; the final printable data format varies depending on the printer model. It should be noted that the CUPS coordinates with the corresponding printer driver to convert the processed encrypted data into printable data. Through the interaction between the CUPS and the physical printer driver, the encrypted data is formatted to obtain the printable data corresponding to the physical printer. Specifically, the CUPS reads the printer driver's PPD file and, according to the description in the PPD file, calls a specific filter to format the encrypted data to obtain the printable data corresponding to the physical printer.
[0115] Step 404: Send the data to be printed to the physical printer corresponding to the print job.
[0116] In step 403 above, method one involves sending the data to be printed to the physical printer corresponding to the print job, including:
[0117] Send the data to be printed to the Backend specified by the physical printer driver;
[0118] The data to be printed is sent to the physical printer via the Backend.
[0119] Specifically, the Backend here is not the same Backend as the Backend in step 303 above. The Backend here is installed in the second device, and the Backend specified by the printer driver sends the data to be printed to the physical printer.
[0120] In step 403 above, method two, sending the data to be printed to the physical printer corresponding to the print job includes:
[0121] The CUPS sends the data to be printed to the physical printer corresponding to the print job.
[0122] Specifically, the second method is to send the data to be printed to the physical printer via CUPS.
[0123] It should be noted that, for the device scenario described in deployment scheme 2 above:
[0124] The server executes steps 401 and 402 above; after the server completes step 402, it sends the encrypted data to the output device, and then the output device continues to execute steps 403 and 404 above.
[0125] The semi-virtualized printing method disclosed in this application achieves the purpose of control under the printing management requirements, while providing a relatively complete printing experience and avoiding the characteristic conflict between virtual printers and physical printers.
[0126] Example 3
[0127] Based on the same inventive concept, this application also provides a semi-virtualized printing device, such as... Figure 5 As shown, the device includes:
[0128] The acquisition module 501 is used to acquire the first print data in the print task based on the print task initiated by the user;
[0129] The conversion module 502 is used to convert the first print data into second print data that can be recognized by the second device through the physical printer driver, and send the second print data, wherein the second device includes a device for confidentiality review and outputting the data to be printed to the physical printer;
[0130] The sending module 503 is used to intercept the second print data sent via the Backend and send it to the second device. The second device performs confidentiality verification on the second print data to obtain encrypted data, processes the encrypted data to obtain printable data that can be recognized by the physical printer, and sends the printable data to the physical printer corresponding to the print task.
[0131] Optionally, the conversion module 502 is specifically used for:
[0132] Obtain the file representing the characteristics of the physical printer from the pre-installed physical printer driver;
[0133] A correction file is obtained by pre-deleting pre-specified fields in the file, and the first print data is converted into second print data in PostScript format based on the correction file;
[0134] The PostScript format is a data format that the second device can recognize.
[0135] Based on the same inventive concept, this application also provides a semi-virtualized printing device, which is used for confidentiality verification and outputting data to be printed to a physical printer, such as... Figure 6 As shown, the device includes:
[0136] The receiving module 601 is used to receive second printing data transmitted by a first device for initiating a printing task, wherein the second printing data is sent by the first device after converting the first printing data in the printing task into data recognizable by the output device through a physical printer driver;
[0137] The audit module 602 is used to perform a confidentiality audit on the second printed data to obtain encrypted data;
[0138] Processing module 603 is used to perform format processing on the encrypted data to obtain printable data that can be recognized by a physical printer;
[0139] The module 604 for sending data to be printed is used to send the data to be printed to the physical printer corresponding to the print job.
[0140] Optionally, the processing module 603 is specifically configured to: obtain a file representing the characteristics of the physical printer from the physical printer driver pre-installed on the second device;
[0141] The encrypted data is formatted using the file to obtain printable data that can be recognized by a physical printer.
[0142] Optionally, the module 604 for sending data to be printed is specifically used to: send the data to be printed to the backend specified by the physical printer driver;
[0143] The data to be printed is sent to the physical printer via the Backend.
[0144] Optionally, the processing module 603 is specifically used to: send the encrypted data to the CUPS in the second device;
[0145] The encrypted data is processed by the CUPS to obtain the data to be printed corresponding to the physical printer.
[0146] Optionally, the module 604 for sending data to be printed is specifically used to: send the data to be printed to the physical printer corresponding to the print job through the CUPS.
[0147] Having introduced the semi-virtualized printing method and apparatus according to exemplary embodiments of this application, we will now introduce an electronic device according to another exemplary embodiment of this application.
[0148] Those skilled in the art will understand that various aspects of this application can be implemented as a system, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "system."
[0149] In some possible implementations, the electronic device according to this application may include at least one processor and at least one memory. The memory stores program code that, when executed by the processor, causes the processor to perform the steps of the semi-virtualized printing method according to various exemplary embodiments of this application described above, applied to a first device, or to perform the steps of the semi-virtualized printing method according to various exemplary embodiments of this application described above, applied to a second device.
[0150] The following reference Figure 7 To describe the electronic device 130 according to this embodiment of the present application, namely the aforementioned semi-virtualized printing device. Figure 7 The electronic device 130 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0151] like Figure 7 As shown, the electronic device 130 is presented in the form of a general-purpose electronic device. The components of the electronic device 130 may include, but are not limited to: at least one processor 131, at least one memory 132, and a bus 133 connecting different system components (including memory 132 and processor 131).
[0152] Bus 133 represents one or more of several bus structures, including a memory bus or memory controller, peripheral bus, processor, or local bus using any of the various bus structures.
[0153] The memory 132 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 1321 and / or cache memory 1322, and may further include read-only memory (ROM) 1323.
[0154] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0155] Electronic device 130 can also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), and with one or more devices that enable a user to interact with electronic device 130, and / or with any device that enables electronic device 130 to communicate with one or more other electronic devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 135. Furthermore, electronic device 130 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 136. As shown, network adapter 136 communicates with other modules used in electronic device 130 via bus 133. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0156] In some possible implementations, various aspects of the semi-virtualized printing method provided in this application can also be implemented as a program product comprising program code that, when run on a computer device, causes the computer device to perform the steps of a semi-virtualized printing method according to various exemplary embodiments of this application as described above.
[0157] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0158] The monitoring program product of the embodiments of this application may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on an electronic device. However, the program product of this application is not limited thereto. In this document, the readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0159] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0160] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0161] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's electronic device, partially on the user's device, as a standalone software package, partially on the user's electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In cases involving remote electronic devices, the remote electronic device can be connected to the user's electronic device via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external electronic device (e.g., via the Internet using an Internet service provider).
[0162] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.
[0163] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0164] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0165] This application is described with reference to flowchart illustrations and block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block and / or block in the flowchart illustrations and block diagrams, as well as combinations of blocks and processes in the flowchart illustrations and block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the process. Figure 1 One or more processes and boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0166] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and boxes Figure 1 The function specified in one or more boxes.
[0167] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and boxes Figure 1 The steps of the function specified in one or more boxes.
[0168] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0169] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A semi-virtualized printing method, characterized in that, Applied to a first device, the method includes: Based on the user-initiated print task, obtain the first print data in the print task; The first print data is converted into second print data that can be recognized by the second device through the physical printer driver, and the second print data is sent. The second device includes a function for confidentiality verification and outputting the data to be printed to the physical printer. The second print data is intercepted by a pre-modified backend for data interception and sent to a second device. This allows the second device to perform confidentiality audits on the second print data to obtain encrypted data. The encrypted data is then formatted to obtain printable data that can be recognized by the physical printer, and the printable data is sent to the physical printer corresponding to the print task. The process of converting the first print data into second print data recognizable by the second device via a physical printer driver includes: Obtain the file representing the characteristics of the physical printer from the pre-installed physical printer driver; A correction file is obtained by pre-deleting pre-specified fields in the file, and the first print data is converted into second print data in PostScript format based on the correction file; The PostScript format is a data format that the second device can recognize.
2. A semi-virtualized printing method, characterized in that, Applied to a second device, the second device including methods for confidentiality verification and outputting data to be printed to a physical printer, the method includes: The device receives second print data transmitted by a first device for initiating a print job. The second print data is obtained by the first device through a pre-installed physical printer driver, which obtains a file representing the characteristics of the physical printer in the physical printer driver, and obtains a correction file by pre-deleting pre-specified fields in the file. Based on the correction file, the first print data in the print job is converted into PostScript format and then intercepted and sent through a pre-modified backend for data interception in the first device. The PostScript format is a data format that the second device can recognize. The second printed data is subjected to a confidentiality audit to obtain encrypted data; The encrypted data is processed to obtain printable data that can be recognized by a physical printer; The data to be printed is sent to the physical printer corresponding to the print job.
3. The method according to claim 2, characterized in that, The encrypted data is formatted to obtain printable data that can be recognized by a physical printer, including: By using the physical printer driver pre-installed on the second device, obtain the file in the physical printer driver that represents the characteristics of the physical printer; The encrypted data is formatted using the file to obtain printable data that can be recognized by a physical printer; Sending the data to be printed to the physical printer corresponding to the print job includes: Send the data to be printed to the Backend specified by the physical printer driver; The data to be printed is sent to the physical printer via the Backend.
4. The method according to claim 2, characterized in that, The encrypted data is formatted to obtain the data to be printed corresponding to the physical printer, including: The encrypted data is sent to the CUPS in the second device; The encrypted data is processed by the CUPS to obtain the data to be printed corresponding to the physical printer. Sending the data to be printed to the physical printer corresponding to the print job includes: The CUPS sends the data to be printed to the physical printer corresponding to the print job.
5. A semi-virtualized printing device, characterized in that, The device includes: The acquisition module is used to acquire the first print data in the print task initiated by the user. A conversion module is used to convert the first print data into second print data that can be recognized by the second device through a physical printer driver, and send the second print data, wherein the second device includes a function for confidentiality verification and outputting the data to be printed to a physical printer; The sending module is used to intercept the second print data sent through a pre-modified backend for data interception and send it to the second device. The second device performs confidentiality audit on the second print data to obtain encrypted data, processes the encrypted data to obtain printable data that can be recognized by the physical printer, and sends the printable data to the physical printer corresponding to the print task. Specifically, the conversion module is used for: Obtain the file representing the characteristics of the physical printer from the pre-installed physical printer driver; A correction file is obtained by pre-deleting pre-specified fields in the file, and the first print data is converted into second print data in PostScript format based on the correction file; The PostScript format is a data format that the second device can recognize.
6. A semi-virtualized printing device, the device being used for confidentiality verification and outputting data to be printed to a physical printer, characterized in that, The device includes: The receiving module is used to receive second print data transmitted by a first device for initiating a print job. The second print data is obtained by the first device through a pre-installed physical printer driver, which obtains a file representing the characteristics of the physical printer in the physical printer driver, and obtains a correction file by pre-deleting pre-specified fields in the file. Based on the correction file, the first print data in the print job is converted into PostScript format and then intercepted and sent through a pre-modified backend for data interception in the first device. The PostScript format is a data format that the second device can recognize. The audit module is used to perform a confidentiality audit on the second printed data to obtain encrypted data. The processing module is used to process the encrypted data to obtain printable data that can be recognized by the physical printer; The module for sending data to be printed is used to send the data to be printed to the physical printer corresponding to the print job.
7. An electronic device, characterized in that, The method includes at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method as claimed in claim 1, or to perform the method as claimed in any one of claims 2-4.
8. A computer storage medium, characterized in that, The computer storage medium stores a computer program that enables the computer to perform the method as described in claim 1, or the method as described in any one of claims 2-4.
Citation Information
Patent Citations
Para-virtualization printing method and device
CN104731537A
Method and device for processing printing data and storage medium
CN114329547A