Printer driver subsystem based on immutable system and related data processing apparatus

By deploying printer driver containers in immutable systems and utilizing container management tools to enable independent operation of printer drivers, the compatibility and stability issues of traditional printing systems in immutable systems are resolved, thereby improving the system's compatibility, stability, and security.

CN122240239APending Publication Date: 2026-06-19KYLIN CORP

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
KYLIN CORP
Filing Date
2026-03-12
Publication Date
2026-06-19

Smart Images

  • Figure CN122240239A_ABST
    Figure CN122240239A_ABST
Patent Text Reader

Abstract

This invention provides a printer driver subsystem and related data processing device based on an immutable system, belonging to the field of computer printing technology. The subsystem includes a printer driver container and a system printing service. The printer driver container is deployed in a mutable directory of the immutable system and is used to run the printer driver. The system printing service, located on the immutable system, provides print queue management, driver management, print job management, and network shared printer services to user programs. The printer driver container and the system printing service are interconnected. The printer driver within the container includes a driver backend, a driver filter, and container management tools that are connected via communication. This invention solves the problems of poor compatibility, insufficient stability, and limited data communication and fault handling capabilities of existing printing systems in immutable systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to immutable system printing technology, and more particularly to a printer driver subsystem and related data processing device based on an immutable system, belonging to the field of computer printing technology. Background Technology

[0002] With the rapid development of computer technology, printing systems have become an indispensable part of office automation and home office work. Whether it's the output of daily corporate documents or the printing needs of home users for photos, study materials, etc., printing systems play a crucial role. However, traditional printing systems face many challenges in practical applications, especially in terms of compatibility with immutable systems.

[0003] Traditional printing systems typically rely heavily on core operating system components to support printer driver operation and management. While this approach was sufficient for basic printing needs in early computer systems, it exposes a series of serious problems in modern, complex computer environments. First, updates or maintenance of core operating system components often cause printer driver compatibility issues. For example, when the operating system is upgraded or updated with security patches, printer drivers may malfunction due to incompatibility with new system components, leading to print job failures, abnormal print results, or even complete system crashes, severely impacting the user experience for office and home users. Second, installing and updating printer drivers in traditional printing systems can negatively affect system stability. This problem is particularly pronounced in immutable systems. As a new system architecture, immutable systems do not allow modification of their core components once deployed to ensure system stability and security. This design philosophy sharply contradicts the modification requirements of traditional printing systems for core components, making it difficult for traditional printing systems to provide complete printer driver support in such environments. Traditional printing systems often require modifications or adjustments to certain core operating system components when installing or updating printer drivers, which is not permitted in immutable systems. Therefore, traditional printing systems struggle to provide full printer driver support in such environments, severely limiting the application of immutable systems in office and home office scenarios.

[0004] In summary, existing printing systems have significant shortcomings in terms of compatibility with immutable systems. Therefore, there is an urgent need for a printer driver subsystem capable of operating effectively on immutable systems. This system should provide complete printer driver support without modifying the core components of the immutable system, ensuring the stability and security of the printing system. Simultaneously, the system should possess efficient data communication capabilities, enabling fast and accurate transmission of print jobs and related data, avoiding data transmission errors and delays. Furthermore, the system should have robust fault handling capabilities, automatically diagnosing and repairing faults in the event of an error, reducing manual intervention by the user and improving the reliability and ease of use of the printing system. Only by meeting these requirements can the system better adapt to the needs of modern offices and home offices, and drive the further development of printing system technology. Summary of the Invention

[0005] To address the aforementioned problems, this invention provides a printer driver subsystem and related data processing device based on an immutable system, thereby solving the problems of poor compatibility, insufficient stability, and limited data communication and fault handling capabilities of existing printing systems in immutable systems.

[0006] To achieve the above objectives, the technical solution of the present invention is: a printer driver subsystem based on an immutable system, the subsystem comprising a printer driver container and a system printing service, wherein, The printer driver container is deployed in a mutable directory of the immutable system to run the printer driver; the system printing service is on the immutable system and provides print queue management, driver management, print job management, and network shared printer services to user programs; the printer driver container communicates with the system printing service. The in-container printer driver includes an in-container driver backend, an in-container driver filter, and a container management tool, all connected via communication.

[0007] Furthermore, the container management tool is set within the printer driver container to deploy the printer driver container to the immutable system, enabling data communication between the printer driver and the system printing service, and monitoring the status of the printer driver so as to perform troubleshooting operations when an anomaly is detected.

[0008] Furthermore, container management tools deploy printer driver containers into immutable systems, including: S101 packages the printer driver and its dependent runtime environment into a container image; S102 deploys the built printer driver container to the immutable system without modifying the core system components. It also adds the SHELL wrapper script path to the CUPS search path by modifying the CUPS ServerBin configuration item, so that the system printing service can recognize and use the printer driver.

[0009] Furthermore, container management tools enable data communication between printer drivers and system printing services, including: S201, Receive a request from the system printing service to query the printer description language file. The container management tool forwards the query request to the corresponding driver in the container and returns the execution result of the driver to the system printing service. S202, Receive a request from the system printing service to obtain the printer instruction language file. The container management tool forwards the request to the corresponding driver in the container and returns the execution result of the driver to the system printing service. S203, Receive the system printing service's request for printing language conversion. The container management tool passes the printing data that needs to be converted to a different printing language to the corresponding driver in the container, obtains the printing data after the driver in the container performs the printing language conversion, and returns it to the system printing service. S204: Receive the system print service's request to send a print job to the printer. The container management tool forwards the request to send the print job to the printer to the corresponding driver in the container, and passes the print data to the corresponding driver in the container to complete the print job sending operation. S205, the function of the printer driver within the auxiliary container to query the printer status.

[0010] Furthermore, container management tools monitor the status of printer drivers, including: S301, the container management tool executes the driver within the container with specified user and permissions, the container management tool runs the driver with restricted permissions, and restricts access to the host machine resources; S302, when running a driver within a container, the container management tool records and redirects the driver's error log in order to accurately analyze the cause of driver errors.

[0011] Furthermore, the in-container drive filter is set inside the printer drive container to perform printing language conversion, converting the input data into a format supported by the printer.

[0012] Furthermore, the in-container driver backend is located within the printer driver container, receives print data forwarded by the container management tool, sends it to the printer, and enumerates available printers or printing devices as needed.

[0013] The data processing device for constructing the above-mentioned subsystem includes an installation module, a communication module, and a log recording module, wherein... The installation module is used to build printer drivers and containers that depend on the runtime environment, deploy them to immutable systems, and modify the configuration information of the system printing service so that the system printing service can recognize and use the printer driver located in the container. The communication module is used to realize data communication between the printer driver and the system printing service, and forwards the system printing service's requests to the printer driver without loss. The logging module is used to record error logs generated during the operation of the printer driver, so as to accurately analyze the reasons for driver errors.

[0014] A computer-readable storage medium storing a computer program or instructions that are programmed or configured to execute the data processing apparatus described above by a processor.

[0015] A computer program product includes a computer program or instructions that are programmed or configured to execute the aforementioned data processing apparatus via a processor.

[0016] The beneficial effects of the printer driver subsystem and related data processing device based on an immutable system of the present invention are as follows: 1. High Compatibility: This invention deploys a printer driver container within an immutable system, utilizing lightweight virtualization technology to encapsulate the printer driver and its dependencies into an independent runtime environment. This design enables the printer driver to run without relying on the core components of the immutable system, significantly improving the compatibility of the printing system in immutable environments. Even if the underlying architecture of the immutable system changes, the printer driver subsystem can still function normally without requiring reconfiguration or updates to the driver. 2. High Stability: Container management tools can execute drivers within containers with specified users and permissions, while restricting drivers' access to immutable system resources. This isolation mechanism effectively prevents drivers from affecting the immutable system due to errors or abnormal behavior, thereby improving the stability of the entire system. Furthermore, container management tools can record and redirect driver error logs, facilitating rapid location and resolution of runtime problems, further enhancing system reliability. 3. Easy Deployment and Maintenance: This invention provides a systematic deployment scheme that simplifies the installation and configuration process of the printing system by building a printer driver container and deploying it into an immutable system. Furthermore, the container management tool can automatically update the relevant configuration information of the system's printing service, enabling the system to quickly identify and use new printer drivers. This automated deployment and maintenance mechanism significantly reduces the workload of system administrators and improves the maintainability of the printing system. 4. Enhanced Security: Because the printer driver runs in an isolated container environment, its interaction with the immutable system is strictly limited, thereby reducing potential security vulnerabilities. Container management tools provide fine-grained control over driver permissions, ensuring that only authorized users and operations can access printer resources, further enhancing the security of the printing system. Attached Figure Description

[0017] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0018] Figure 1 This is a schematic diagram illustrating the deployment of a printer driver container using the container management tool of the present invention; Figure 2 This is a schematic diagram illustrating how the system printing service of this invention uses the printer driver within the container through a container management tool. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0020] Conventional Terminology Explanation Immutable systems: These refer to Linux systems where the root file system (such as / usr, / boot, / lib, / var, etc.) is read-only. System upgrades are performed using images or snapshots, such as Fedora Silverblue and openSUSE MicroOS. Specifically, it is an unchangeable and read-only operating system, meaning that users or applications cannot directly modify the core files and directories of the running system. Users update and upgrade the system through atomic updates, and can quickly roll back in case of update failure, ensuring that the system does not fall into an abnormal state. Applications are isolated from the core operating system through container technology, ensuring that changes made by an application do not affect the core system.

[0021] CUPS Printing Service: On immutable systems, it provides services such as print queue management, driver management, print job management, and network shared printers to user programs.

[0022] PPD files: PPD files are used to specify the fonts, paper sizes, resolutions, and other standard characteristics of PostScript printers.

[0023] CUPS Filters: Convert job files to a printable format. Run multiple filters as needed to convert job file formats to printable formats. If a filename is provided, the filter program will read from standard input or a file.

[0024] CUPS Backend: The backend sends print data to the printer and enumerates available printers / devices as needed.

[0025] CUPS MIME File: The CUPS MIME file is used to determine which CUPS filter programs are used to transform the data stream between the printer job submission and the final data.

[0026] Shell wrapper scripts: On the host system, an executable file with the same name as the real program is provided, which transparently forwards call requests to the real program. The shell wrapper script communicates with container management tools through IPC mechanisms (such as D-Bus or UNIX sockets) to achieve call interception and transparent forwarding, rather than directly executing container commands.

[0027] Containers: A lightweight virtualization technology that allows applications and their dependencies to be packaged together to form a self-contained, portable runtime environment.

[0028] Linux: In this article, it refers to desktop operating systems developed based on Linux, such as Ubuntu, Debian, CentOS, UnionTech OS, Kylin OS, etc.

[0029] The present invention provides a printer driver subsystem based on an immutable system, comprising a printer driver container and a system printing service, wherein, I. Printer driver container The printer driver container is deployed in a mutable directory of the immutable system to run the printer driver. The printer driver container uses lightweight virtualization technology to package the application and its dependencies into a self-contained, portable runtime environment. When the printer driver executes, it only involves the print data, the printer hardware device node, and the runtime environment within the container; it does not depend on the runtime environment of the immutable system and does not modify the core components of the immutable system.

[0030] The printer driver consists of two types of components: (1) the core logic component, including the CUPS filter program and the CUPS backend program, which are responsible for performing print data format conversion and device communication; and (2) the driver description file component, including the PPD file and the CUPS MIME file, which are responsible for describing the printer's capabilities and data flow rules.

[0031] The in-container printer driver includes a communication-connected in-container driver backend, an in-container driver filter, and container management tools. Specifically: 1. Container management tools The container management tool is set within the printer driver container and is used to deploy the printer driver container to the immutable system, enable data communication between the printer driver and the system printing service, and monitor the status of the printer driver so as to perform troubleshooting operations when an anomaly is detected.

[0032] 1-1 The container management tool enables the deployment of printer driver containers on immutable systems, specifically including the following functions: S101 packages the printer driver and its dependent runtime environment into a container image; S102 deploys the built printer driver container to the immutable system without modifying the core system components. It also adds the SHELL wrapper script path to the CUPS search path by modifying the CUPS ServerBin configuration item, so that the system printing service can recognize and use the printer driver.

[0033] 1-2 The container management tool enables data communication between the printer driver and the system printing service, specifically including the following functions: S201, Receive a request from the system printing service to query the printer description language file. The container management tool forwards the query request to the corresponding driver in the container and returns the execution result of the driver to the system printing service. S202, Receive a request from the system printing service to obtain the printer instruction language file. The container management tool forwards the request to the corresponding driver in the container and returns the execution result of the driver to the system printing service. S203 receives a request from the system printing service for printing language conversion. The container management tool passes the printing data requiring language conversion to the corresponding driver within the container, retrieves the printed data after the driver performs the language conversion, and returns it to the system printing service. The system printing service may perform multiple printing language conversions. The container management tool supports multiple calls to S203's own functions. The output of the printing language conversion request can be used as input data for the next printing language conversion, and it also supports calling other filter programs within different containers.

[0034] S204: Receive the system print service's request to send a print job to the printer. The container management tool forwards the request to send the print job to the printer to the corresponding driver in the container, and passes the print data to the corresponding driver in the container to complete the print job sending operation.

[0035] S205, the function of the printer driver within the auxiliary container to query printer status. Specifically, the printer driver establishes piped communication with the system printing service and sends a request to the printer to query its status. During this process, the container management tool ensures the integrity of this request and prevents it from being corrupted, thus guaranteeing the normal operation of the printer status query function.

[0036] 1-3 The container management tool monitors the status of printer drivers, specifically including the following functions: S301, Container management tools can execute drivers within containers with specified users and permissions. Container management tools run drivers with restricted permissions, limiting their access to host resources. S302, when running a driver within a container, the container management tool can record and redirect the driver's error log in order to accurately analyze the cause of driver errors.

[0037] 2. In-container driven filter The in-container drive filter is located inside the printer drive container and performs printing language conversion, converting the input data into a format supported by the printer.

[0038] 3. Container-in-container driver backend The in-container driver backend is located within the printer driver container. It receives print data forwarded by the container management tool and sends it to the printer, and enumerates available printers / devices as needed.

[0039] II. System Printing Service On immutable systems, services such as print queue management, driver management, print job management, and network shared printers are provided to user programs.

[0040] Example 1 This embodiment 1 combines Figure 1 This document details the construction and deployment of a printer driver container, including the following steps: Step 1: Container Image Building The container management tool analyzes the contents of the printer driver installation package and its dependent software packages (the installation package and software packages are collectively referred to as the driver package). After unpacking the driver package, it builds a container image containing the printer driver.

[0041] Step 2: Driver file classification and host system mapping The container management tool parses four core file types from the driver package: PPD files (printer description files), CUPS filter programs (format conversion executables), CUPS backend programs (device communication executables), and CUPS MIME files (format mapping rules). Based on file attributes, they are processed in two categories: 1. Executable programs: These refer to the CUPS filter programs and CUPS backend programs. A shell wrapper script with the same name is created for each executable program in a read-write directory on the immutable system (e.g., / opt / system / lib / cups). This script ensures that: standard input / output is redirected via exec without additional buffering; return codes are passed through to the CUPS scheduler in case of container crashes; and binary data streams are passed through raw file descriptors to avoid escaping overhead. 2. Data and configuration files: These refer to the PPD files and CUPS MIME files. When deploying the printer driver container, these files are copied to a read-write directory on the immutable system (e.g., / opt / system / resource / cups / ).

[0042] Step 3: Configuration Update and Service Restart To enable the CUPS scheduler to discover the CUPS filter program and CUPS backend program under ` / opt / system / lib / cup`, and the PPD and CUPS MIME files under ` / opt / system / resource / cups / `, the CUPS configuration file needs to be modified. Edit ` / etc / cups / cups-files.conf` (this file is located in a variable layer) and add the following lines to the end of the file: `ServerBin / opt / system / lib / cups` `DataDir / opt / system / resource / cups / `. If the container management tool updates the relevant configuration information of the CUPS printing service (such as adding a CUPS MIME file), the CUPS printing service needs to be restarted for the changes to take effect.

[0043] Example 2 This embodiment combines Figure 2This invention provides a detailed description of the process by which the printer driver subsystem container management tool enables data communication between the printer driver and the system printing service. Figure 2 This diagram illustrates how container management tools integrate drivers within containers into the system print service process. The dashed lines represent transparent forwarding paths implemented via shell wrapper scripts. A complete print job workflow is as follows (this example uses the aforementioned S203 print language conversion request as an example): 1. Job Submission: Users submit print jobs via CUPS commands, passing the data to be printed (such as PDF files) to the CUPS printing service.

[0044] 2. Scheduling Decision: The CUPS scheduler determines which CUPS filter program within the container needs to be invoked based on MIME type rules (corresponding to...). Figure 2 The format is converted by the internal filter of the container.

[0045] 3. Transparent Invocation: The CUPS scheduler invokes a shell wrapper script (such as pstops) with the same name in the host system. This script was created in Example 1.

[0046] 4. Data forwarding (corresponding to step S203 above): The container management tool intercepts the call request and forwards the standard input print data, command line parameters and environment variables to the actual pstops filter program inside the container without loss.

[0047] 5. In-container processing: The CUPS filter program inside the container performs printing language conversion, converting the input data into a format supported by the printer (such as PostScript → PCL).

[0048] 6. Result Return: The transformed data is returned to the CUPS scheduler via the container management tool. If multiple transformations are required (e.g., PDF→PostScript→PCL), the CUPS scheduler can repeat steps 3-5, calling other filter programs (e.g., pdftops) within the same or different containers.

[0049] 7. Job Distribution (corresponding to step S204 above): The final print data is forwarded by the container management tool to the CUPS backend program within the container via a similar SHELL wrapper script mechanism (corresponding to...). Figure 2 (The backend driver is located within the container). The backend program directly accesses the printer hardware device node on the host machine (such as a USB port or network socket). If a network printer is used, the `--network=host` parameter enables the container to share the host machine's network namespace, ensuring that mDNS discovery and IPP protocol communication are functioning correctly.

[0050] Example 3 This embodiment proposes a method for controlling the printer driver's running permissions and monitoring its running status using the printer driver subsystem of this invention. In immutable systems, due to the read-only nature of the system, the operation of printer drivers requires strict control over their permissions to prevent accidental modification of core system files and directories.

[0051] Container management tools ensure that printer driver containers can only access resources necessary for their operation by setting specific permission policies, thus preventing accidental modification of core system files and directories. Simultaneously, the container management tool monitors the printer driver container's running status in real time, including key metrics such as CPU usage, memory consumption, and I / O operations. Upon detecting abnormal behavior, such as excessive resource consumption or unauthorized file access, the container management tool will immediately trigger an alert and take appropriate isolation measures to prevent potential security risks.

[0052] In addition, the container management tool provides detailed runtime logging, making it easy for system administrators to trace and analyze the runtime history of printer drivers.

[0053] Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

Claims

1. A printer driver subsystem based on an immutable system, characterized in that, The subsystem includes a printer driver container and a system printing service, wherein... The printer driver container is deployed in a mutable directory of the immutable system to run the printer driver; the system printing service is on the immutable system and provides print queue management, driver management, print job management, and network shared printer services to user programs; the printer driver container communicates with the system printing service. The in-container printer driver includes an in-container driver backend, an in-container driver filter, and a container management tool, all connected via communication.

2. The subsystem according to claim 1, characterized in that, The container management tool is set within the printer driver container and is used to deploy the printer driver container to the immutable system, enable data communication between the printer driver and the system printing service, and monitor the status of the printer driver so as to perform troubleshooting operations when an anomaly is detected.

3. The subsystem according to claim 2, characterized in that, Container management tools for deploying printer driver containers to immutable systems include: S101 packages the printer driver and its dependent runtime environment into a container image; S102 deploys the built printer driver container to the immutable system without modifying the core system components. It also adds the SHELL wrapper script path to the CUPS search path by modifying the CUPS ServerBin configuration item, so that the system printing service can recognize and use the printer driver.

4. The subsystem according to claim 2, characterized in that, Container management tools enable data communication between printer drivers and system printing services, including: S201, Receive a request from the system printing service to query the printer description language file. The container management tool forwards the query request to the corresponding driver in the container and returns the execution result of the driver to the system printing service. S202, Receive a request from the system printing service to obtain the printer instruction language file. The container management tool forwards the request to the corresponding driver in the container and returns the execution result of the driver to the system printing service. S203, Receive the system printing service's request for printing language conversion. The container management tool passes the printing data that needs to be converted to a different printing language to the corresponding driver in the container, obtains the printing data after the driver in the container performs the printing language conversion, and returns it to the system printing service. S204: Receive the system print service's request to send a print job to the printer. The container management tool forwards the request to send the print job to the printer to the corresponding driver in the container, and passes the print data to the corresponding driver in the container to complete the print job sending operation. S205, the function of the printer driver within the auxiliary container to query the printer status.

5. The subsystem according to claim 2, characterized in that, Container management tools monitor the status of printer drivers, including: S301, Container management tools execute drivers within containers with specified users and permissions, and Container management tools run drivers with restricted permissions, restricting access to host resources; S302, when running a driver within a container, the container management tool records and redirects the driver's error log in order to accurately analyze the cause of driver errors.

6. The subsystem according to claim 1, characterized in that, The in-container drive filter is located inside the printer drive container and performs printing language conversion, converting the input data into a format supported by the printer.

7. The subsystem according to claim 1, characterized in that, The in-container driver backend is located inside the printer driver container. It receives print data forwarded by the container management tool and sends it to the printer. It also enumerates available printers or printing devices as needed.

8. A data processing apparatus for constructing a subsystem according to any one of claims 1-7, characterized in that, The device includes an installation module, a communication module, and a log recording module, wherein, The installation module is used to build printer drivers and containers that depend on the runtime environment, deploy them to immutable systems, and modify the configuration information of the system printing service so that the system printing service can recognize and use the printer driver located in the container. The communication module is used to realize data communication between the printer driver and the system printing service, and forwards the system printing service's requests to the printer driver without loss. The logging module is used to record error logs generated during the operation of the printer driver, so as to accurately analyze the reasons for driver errors.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program or instructions that are programmed or configured to execute the data processing apparatus of claim 8 by a processor.

10. A computer program product, characterized in that, It includes a computer program or instructions that are programmed or configured to execute the data processing apparatus of claim 8 by a processor.