Cloud desktop data printing method, server, terminal, medium, and product
By intercepting print requests through the kernel processing module of the cloud desktop server and establishing a communication channel with the terminal, the problem of the cloud desktop not being able to print directly is solved, enabling the effect of printing data directly from the cloud desktop and improving the user experience.
Patent Information
- Application Number
- PCT/CN2025/105723
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-08
- Filing Date
- 2025-06-30
- Publication Date
- 2026-01-15
Smart Images

Figure CN2025105723_15012026_PF_FP_ABST
Abstract
Description
Cloud desktop data printing methods, servers, terminals, media and products
[0001] Cross-reference to related applications
[0002] This application claims priority to Chinese Patent Application No. 202410909961.8, filed with the Chinese Patent Office on July 8, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This disclosure relates to, but is not limited to, the field of cloud desktop technology. Background Technology
[0004] In a cloud desktop operating system, the cloud desktop server connects to the terminal, and the terminal connects to the printer. When a user operates the cloud desktop and has a file that needs to be printed, the file must be downloaded from the cloud desktop server to the local terminal before printing can be performed. This inability to print directly from the cloud desktop degrades the user experience. Summary of the Invention
[0005] This disclosure provides a data printing method for a cloud desktop, a cloud desktop server, a terminal, a computer-readable medium, and a computer program product.
[0006] In a first aspect, embodiments of this disclosure provide a data printing method for a cloud desktop, executed by a cloud desktop server including a kernel processing module, comprising: in response to a target print request, the kernel processing module intercepting target data in the target print request, the target print request being used to request a target printer to print the target data; and sending the target data to the target printer through a preset communication channel; wherein the target printer is connected to a terminal, the terminal is connected to the cloud desktop server, and the preset communication channel is a channel through which the kernel processing module is connected to the target printer via the terminal.
[0007] Secondly, this disclosure provides a cloud desktop data printing method applied to a terminal, comprising: receiving target data sent by a cloud desktop server through a preset communication channel, the target data being data to be printed by a target printer; and forwarding the target data to the target printer through the preset communication channel, wherein the preset communication channel is a channel through which the kernel processing module in the cloud desktop server is connected to the target printer via the terminal.
[0008] Thirdly, embodiments of this disclosure provide a cloud desktop server, including: one or more processors; and a memory storing one or more programs thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any of the cloud desktop data printing methods in embodiments of this disclosure.
[0009] Fourthly, embodiments of this disclosure provide a terminal, including: one or more processors; and a memory storing one or more programs thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any of the cloud desktop data printing methods in embodiments of this disclosure.
[0010] Fifthly, embodiments of this disclosure provide a readable storage medium storing a computer program that, when executed by a processor, implements any of the cloud desktop data printing methods described in this disclosure.
[0011] Sixthly, this disclosure provides a computer program product, which includes a computer program that, when executed by a processor, implements any of the cloud desktop data printing methods described in this disclosure. Attached Figure Description
[0012] In the accompanying drawings of the embodiments disclosed herein:
[0013] Figure 1 is a flowchart illustrating a data printing method for a cloud desktop provided in an embodiment of this disclosure;
[0014] Figure 2 is a flowchart illustrating a data printing method for a cloud desktop provided in an embodiment of this disclosure;
[0015] Figure 3 is a schematic diagram of the framework of a data printing system provided in an embodiment of this disclosure;
[0016] Figure 4 is a flowchart illustrating a data printing method for a cloud desktop provided in an embodiment of this disclosure;
[0017] Figure 5 is a flowchart illustrating a data printing method for a cloud desktop provided in an embodiment of this disclosure;
[0018] Figure 6 is a block diagram of a cloud desktop server provided in an embodiment of this disclosure;
[0019] Figure 7 is a block diagram of a terminal provided in an embodiment of this disclosure;
[0020] Figure 8 is a block diagram of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0021] To enable those skilled in the art to better understand the technical solutions of this disclosure, the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.
[0022] The present disclosure will be described more fully below with reference to the accompanying drawings; however, the embodiments shown may be embodied in different forms, and the present disclosure should not be construed as limited to the embodiments set forth below. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will enable those skilled in the art to fully understand the scope of the disclosure.
[0023] The accompanying drawings of the embodiments disclosed herein are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the detailed embodiments to explain this disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the description of the detailed embodiments with reference to the accompanying drawings.
[0024] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.
[0025] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the disclosure. The term “and / or” as used in this disclosure includes any and all combinations of one or more of the associated enumerated entries. The singular forms “a” and “the” as used in this disclosure are also intended to include the plural forms, unless the context clearly indicates otherwise.
[0026] Unless otherwise specified, all terms used in this disclosure (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined in this disclosure.
[0027] In some related technologies, a cloud desktop operating system includes a cloud desktop server, a terminal, and a printer, wherein the cloud desktop server is connected to the terminal, and the terminal is connected to the printer.
[0028] Since cloud desktop servers are not usually directly connected to printers, when users are operating a cloud desktop and have a file that needs to be printed, they need to download the file from the cloud desktop server to their local terminal, and then send the file to the printer through the terminal so that the printer can print the file.
[0029] Using the above method, users cannot print files directly by operating the cloud desktop, which reduces the user experience.
[0030] To address the aforementioned issues, this disclosure provides a data printing method for a cloud desktop, a cloud desktop server, a terminal, a computer-readable medium, and a computer program product.
[0031] In a first aspect, embodiments of this disclosure provide a data printing method for a cloud desktop.
[0032] Figure 1 is a flowchart illustrating a data printing method for a cloud desktop according to an embodiment of this disclosure. This data printing method for a cloud desktop is executed by a cloud desktop server including a kernel processing module.
[0033] As shown in Figure 1, the data printing method of this cloud desktop includes, but is not limited to, the following steps S101 and S102.
[0034] In step S101, in response to the target print request, the kernel processing module intercepts the target data in the target print request.
[0035] Specifically, when a target print request is detected and sent to the target printer, the kernel processing module will intercept the target print request to obtain the target data it carries; the target print request is used to request the target printer to print the target data.
[0036] For example, the kernel processing module filters the multiple messages it receives, obtains the target print request, then pauses the transmission of the target print request, and parses the target print request to obtain the target data it carries.
[0037] The target data includes at least one of the following: text data or image data for printing by the target printer.
[0038] Step S102: Send the target data to the target printer through a preset communication channel.
[0039] The target printer is connected to the terminal, the terminal is connected to the cloud desktop server, and the preset communication channel is a channel that connects the kernel processing module and the target printer through the terminal.
[0040] Since the preset communication channel uses the terminal as an intermediate node to connect the kernel processing module in the cloud desktop server with the target printer, the target data to be printed can be directly transmitted to the target printer through this preset communication channel. This enables the interconnection between the cloud desktop server and the target printer, allowing users to print the target data from the cloud desktop directly without having to download the target data to their local machine. This shortens the printing time of the target data and improves the user experience.
[0041] According to the cloud desktop data printing method in this embodiment, when a target print request is received, the kernel processing module in the cloud desktop server intercepts the target data in the target print request. The target print request is used to request the target printer to print the target data. Since the target printer is connected to the terminal, and the terminal is connected to the cloud desktop server, but the cloud desktop server cannot communicate directly with the target printer, the target data is sent to the target printer through a preset communication channel. This enables the effect of printing data directly from the cloud desktop. The preset communication channel is the channel through which the kernel processing module and the target printer are connected by the terminal. This reduces the abnormality of printing failure caused by the inability of the cloud desktop server and the target printer to communicate, allowing users to print data more quickly by operating the cloud desktop and improving the user experience.
[0042] In some exemplary embodiments, before sending the target data to the target printer through a preset communication channel in step S102, the method further includes: the kernel processing module establishing a first sub-channel with the terminal; the kernel processing module sending the address of the target printer to the terminal through the first sub-channel, so that the terminal establishes a second sub-channel with the target printer based on the address of the target printer; and establishing a preset communication channel based on the first sub-channel and the second sub-channel.
[0043] Both the first and second sub-channels are communication channels established through information exchange for transmitting information.
[0044] For example, the kernel processing module sends a first sub-channel establishment request to the terminal, and the terminal responds to the first sub-channel establishment request to build a first sub-channel with the kernel processing module so as to transmit interactive information between the kernel processing module and the terminal (such as the address of the target printer) through the first sub-channel.
[0045] When the terminal receives the address of the target printer transmitted through the first sub-channel, the terminal understands that the kernel processing module needs to establish a second sub-channel between the terminal and the target printer so that the kernel processing module can transmit the target data to the target printer through the preset communication channel constructed by the first and second sub-channels.
[0046] The cloud desktop server communicates with the terminal through its kernel processing module to establish a first sub-channel. This first sub-channel can be established between the kernel of the cloud desktop server and the terminal without affecting the user-level communication of the cloud desktop server. This not only ensures the security of data transmission, but also efficiently transmits the target data to be printed to the target printer through a preset communication channel constructed by the first and second sub-channels. This allows the target printer to print the target data, achieving the effect of printing data directly from the cloud desktop.
[0047] In some exemplary embodiments, in step S101, in response to the target print request sent to the target printer, the kernel processing module intercepts the target data, including: the kernel processing module receives the target print request and obtains the target data carried in the target print request.
[0048] Step S102, which involves sending the target data to the target printer via a preset communication channel, includes: the kernel processing module changing the destination address of the target printing request from the address of the target printer to the source address of the preset communication channel, generating a target message; and sending the target message to the target printer.
[0049] In this scenario, a user sends a print request via a cloud desktop. This print request carries the target data, and its destination address is the address of the target printer. However, because the cloud desktop server is not connected to the target printer, the target data cannot be received and printed by the target printer.
[0050] Therefore, the kernel processing module of the cloud desktop server intercepts the target print request and changes the destination address of the target print request from the address of the target printer to the source address of the preset communication channel. This allows the generated target message to be received by the preset communication channel and transmitted to the target printer, enabling the target printer to print the target data and achieve the effect of printing data directly from the cloud desktop.
[0051] For example, if the destination address of the target print request is A (i.e., the address of the target printer is A) and the source address of the preset communication channel is B, the destination address of the target print request can be changed from A to B (i.e., the source address of the preset communication channel) so that the target print request can be transmitted through the preset communication channel. This realizes the communication connection between the cloud desktop server and the target printer, thereby enabling the target data to be sent to the target printer quickly and improving the printing speed of the target data.
[0052] In some exemplary embodiments, the method further includes: detecting a list of target printer addresses; and, if the address of the target printer is updated, obtaining the updated address of the target printer.
[0053] The target printer address list includes multiple target printers and their corresponding addresses.
[0054] In some embodiments, the target printer address list may be a list of addresses pre-stored within the cloud desktop server. When the cloud desktop server reads the address of the target printer through the configuration file, it stores the target printer and its corresponding address in the target printer address list. This allows different applications to find the target printer they need by searching the target printer address list, thereby meeting the printing needs of different users operating different applications to print data.
[0055] It's important to note that the target printer addresses stored in the target printer address list are those of printers that have established a pre-defined communication channel with the target printer through the kernel processing module, using the terminal as a node. Therefore, when an application selects a target printer, it is essentially selecting the pre-defined communication channel corresponding to that target printer. This allows the application to send target data to the target printer through that dedicated communication channel. This not only ensures the security of the target data transmission but also speeds up the printer's data acquisition process, enabling users to print target data directly from the cloud desktop, thus enhancing the user experience.
[0056] Furthermore, the kernel processing module can detect whether the address of the target printer in the target printer address list has changed, so that if the target printer address is updated, it can obtain the updated target printer address, thereby reducing the risk of users printing with the wrong target printer address and improving printing accuracy.
[0057] In some exemplary embodiments, before sending the target data to the target printer via a preset communication channel in step S102, the method further includes: the kernel processing module checking the target data.
[0058] The kernel processing module checks the intercepted target data to determine if it is data that needs to be printed by the target printer. This ensures that the transmission of the target data through the preset communication channel between the kernel processing module, the terminal, and the target printer will not affect the normal processing of other data on the cloud desktop server, so that the cloud desktop server can perform data processing normally and securely.
[0059] For example, the kernel processing module can check the destination address corresponding to the target data to determine that the destination address corresponding to the target data is the address of the target printer; or, the kernel processing module can check the code loaded onto it for processing the target data to ensure that there is no code that affects the operation of the cloud desktop server, thereby improving the operational accuracy of the cloud desktop server.
[0060] In some exemplary embodiments, the kernel processing module is matched with the terminal's operating system model; the target printer model is matched with the terminal's operating system model.
[0061] The kernel processing module is compatible with various operating systems, such as Windows, UnionTech Desktop, Kylin, and Linux. The operating system types listed above are merely illustrative; appropriate settings can be made according to actual needs. Other unmentioned operating system types are also within the scope of this application and will not be elaborated upon further.
[0062] Correspondingly, the operating system model of the terminal is matched with the operating system model of the kernel processing module. For example, if the operating system of the kernel processing module is Linux, the operating system of the terminal can be Android, which supports Linux, so that the kernel processing module and the terminal can communicate.
[0063] Similarly, the target printer model should match the terminal's operating system model, meaning the target printer and terminal can communicate using the same communication protocol to speed up data transfer. For example, if the terminal's operating system is Linux, then the target printer should be one that supports the Linux operating system's communication protocol.
[0064] Figure 2 is a flowchart illustrating a data printing method for a cloud desktop according to an embodiment of this disclosure. This cloud desktop data printing method is applied to a terminal. As shown in Figure 2, the cloud desktop data printing method includes, but is not limited to, the following steps S201 and S202.
[0065] Step S201: Receive target data sent by the cloud desktop server through a preset communication channel.
[0066] The target data is the data that needs to be printed by the target printer; the preset communication channel is the channel that connects the kernel processing module in the cloud desktop server to the target printer via the terminal. The preset communication channel may include a first sub-channel between the terminal and the cloud desktop server, and a second sub-channel between the terminal and the target printer.
[0067] By using the terminal as an intermediate node, a pre-defined communication channel is built that connects the cloud desktop server, the terminal, and the target printer, enabling the cloud desktop server to conveniently and quickly control the target printer.
[0068] Step S202: Forward the target data to the target printer through a preset communication channel.
[0069] Specifically, the terminal can forward the target data to the target printer through the second sub-channel between the terminal and the target printer in the preset communication channel, so that the target printer can accurately receive the target data and print it, allowing the user to achieve the printing effect of the target data by operating the cloud desktop.
[0070] In some exemplary embodiments, before forwarding the target data to the target printer through a preset communication channel, the method further includes: obtaining the address of the target printer in response to a communication channel establishment request sent by the cloud desktop server; and establishing a second sub-channel with the target printer based on the address of the target printer.
[0071] When a terminal receives a communication channel establishment request from a cloud desktop server, it will parse the request to obtain the address of the target printer.
[0072] When the terminal obtains the address of the target printer, it can clearly understand that the cloud desktop server wants to establish a communication channel with the target printer through the terminal. This allows the target data sent by the cloud desktop server that needs to be printed by the target printer to be transmitted to the target printer through the communication channel. Therefore, the terminal can send a second sub-channel establishment request to the address of the target printer so that the target printer can respond to the second sub-channel establishment request and establish a second sub-channel with the terminal.
[0073] It should be noted that since a first sub-channel has been established between the terminal and the cloud desktop server, a preset communication channel can be obtained by connecting the first sub-channel with the second sub-channel. This preset communication channel enables the cloud desktop server to communicate directly with the target printer, allowing the target printer to securely and efficiently obtain the target data that needs to be printed, thereby achieving the effect of printing data directly from the cloud desktop and improving the user experience.
[0074] According to the cloud desktop data printing method in this embodiment, target data sent by the cloud desktop server is received through a preset communication channel. It is determined that the cloud desktop server requires a target printer to print the target data. Then, the target data is forwarded to the target printer through the preset communication channel, enabling the target printer to quickly obtain and print the target data. Since the preset communication channel connects the kernel processing module in the cloud desktop server to the target printer via a terminal, transmitting the target data through this channel not only ensures the security of the target data transmission but also allows users to print data directly from the cloud desktop. This reduces printing failures caused by communication breakdowns between the cloud desktop server and the target printer, allowing users to print data more quickly through the cloud desktop and improving the user experience.
[0075] Secondly, embodiments of this disclosure provide a data printing system.
[0076] Figure 3 is a schematic diagram of the framework of a data printing system provided in an embodiment of this disclosure. As shown in Figure 3, the data printing system includes, but is not limited to, the following devices: a cloud desktop server 310, a terminal 320, and a target printer 330.
[0077] The cloud desktop server 310 includes an application 311, a daemon process 312, and a kernel processing module 313.
[0078] Terminal 320 is one of multiple terminals connected to cloud desktop server 310. It can communicate with cloud desktop server 310 via network connection and can also communicate with target printer 330.
[0079] The cloud desktop server 310 is not connected to the target printer 330.
[0080] Application 311 (e.g., a document processing application (Application, App)) is used to send a target print request, the destination address of which is the address of the target printer 330 (e.g., the network address or port number of the target printer 330).
[0081] The daemon process 312 is used to communicate with the kernel processing module 313 and forward the target data that the kernel processing module 313 intercepts and needs to be sent to the target printer 330 to the terminal 320, so that the terminal 320 sends the target data to the target printer to realize the printing of the data.
[0082] In some embodiments, the kernel processing module 313 can be implemented by using a hook program. During system initialization, the daemon process 312 loads the hook program into the kernel processing module 313 of the cloud desktop server 310.
[0083] Daemon 312 is also used to detect the target printer address list; if the address of target printer 330 is updated, it obtains the updated address of the target printer.
[0084] The target printer address list includes multiple target printers 330 and their corresponding addresses.
[0085] When the kernel processing module 313 intercepts a target print request whose destination address is the address of the target printer 330, the kernel processing module 313 will change the destination address of the target print request to the source address of a preset communication channel (e.g., the source address of the communication channel established between the daemon process 312 and the terminal 320), and then send the target print request with the changed destination address to the daemon process 312 so that the daemon process 312 will forward the target data therein to the terminal 320.
[0086] Furthermore, the terminal 320 will send the received target data to the target printer 330 so that the target printer 330 can print the target data.
[0087] The data printing system in this embodiment can transmit target data sent by the application for printing to the target printer through a preset communication channel between the kernel processing module, the terminal, and the target printer. This enables data to be printed directly from the cloud desktop, reducing printing failures caused by the inability of the cloud desktop server and the target printer to communicate. It allows users to print data more quickly by operating the cloud desktop, improving the user experience.
[0088] In some embodiments, the operating system of the cloud desktop server may be a first type of operating system, which has cupsd configuration information (information for configuring relevant parameters of the printer). The kernel processing module 313 can determine whether the address of the target printer has changed by dynamically detecting the cupsd configuration information, thereby more accurately detecting the target printer.
[0089] Figure 4 is a flowchart illustrating a data printing method for a cloud desktop according to an embodiment of this disclosure. As shown in Figure 4, the data printing method for the cloud desktop includes, but is not limited to, the following steps S401 to S413.
[0090] In step S401, the terminal 320 initializes and establishes a communication link with the cloud desktop server 310.
[0091] The communication link between terminal 320 and cloud desktop server 310 is used to operate the cloud desktop.
[0092] In some embodiments, the terminal 320 may also, during the initialization phase, establish a first sub-channel by interacting with the daemon process 312 in the cloud desktop server 310. This first sub-channel is used to transmit target data sent by the application 311 of the cloud desktop.
[0093] In step S402, the daemon process 312 in the cloud desktop server 310 is initialized.
[0094] The daemon process 312 can listen to local communication ports (such as Transmission Control Protocol (TCP) ports or User Datagram Protocol (UDP) ports) and receive data sent by the kernel processing module 313. This data is the target data that the kernel processing module 313 intercepts and needs to send to the target printer 330.
[0095] In step S403, the daemon process 312 dynamically detects the cupsd configuration information to determine whether the address of the target printer 330 has changed.
[0096] During the initialization phase, daemon process 312 first reads the cupsd configuration information, obtains the address of the target printer that has been added, and sends the address of the target printer to kernel processing module 313.
[0097] When a change in cupsd configuration information is detected, the address of the target printer stored in kernel processing module 313 will be updated using the changed address of the target printer.
[0098] In step S404, application 311 sends a target print request.
[0099] The destination address of the target print request is the address of the target printer 330, and the target print request carries the target data that needs to be printed by the target printer.
[0100] In step S405, the kernel processing module 313 intercepts the target printing request, obtains the target data it carries, and changes the destination address of the target printing request from the address of the target printer to the source address of the preset communication channel by modifying the destination address of the target printing request, thereby generating a target message.
[0101] In step S406, the kernel processing module 313 sends a channel establishment request to the daemon process 312.
[0102] The channel establishment request includes the address of the target printer 330 and explicitly requires the daemon process 312 to establish a preset communication channel with the target printer 330 through the terminal 320.
[0103] In step S407, the daemon process 312 responds to the channel establishment request by sending a message to the terminal 320 requesting the establishment of a preset communication channel.
[0104] In step S408, when the terminal 320 receives a message requesting the establishment of a preset communication channel, it determines that the cloud desktop server needs to establish a communication channel with the target printer 330; the terminal 320 interacts with the target printer 330 based on the obtained address of the target printer 330 to construct a second sub-channel.
[0105] In step S409, when the second sub-channel is established, the terminal 320 sends a preset communication channel establishment response to the daemon process 312. The preset communication channel establishment response includes information about the first sub-channel established between the daemon process 312 and the terminal 320, as well as the second sub-channel between the terminal 320 and the target printer 330, so that the daemon process 312 can know that the preset communication channel has been established.
[0106] In step S410, the kernel processing module 313 sends the target message to the daemon process 312.
[0107] In step S411, the daemon process 312 interacts with the terminal 320 and the target printer 330 through a preset communication channel, and transmits the target message it receives to the target printer 330 so that the target printer 330 can obtain the target data and print the target data.
[0108] Upon receiving a print completion response from the target printer 330, the daemon process 312 can know that the target printer 330 has completed printing the target data.
[0109] In step S412, the daemon process 312 sends a completed response to the kernel processing module 313.
[0110] In step S413, the kernel processing module 313 sends the received print completion response back to the application 311 so that the user of the application 311 knows that the target data has been successfully printed by the target printer 330.
[0111] In some embodiments, the operating system of the cloud desktop server may also be a second type of operating system (e.g., a windowing (Windows) operating system).
[0112] Figure 5 is a flowchart illustrating a data printing method for a cloud desktop according to an embodiment of this disclosure. As shown in Figure 5, the data printing method for the cloud desktop includes, but is not limited to, the following steps S501 to S514.
[0113] Step S501: The terminal initializes and establishes a communication link with the cloud desktop server.
[0114] The communication link between the terminal and the cloud desktop server is used to operate the cloud desktop.
[0115] In some embodiments, the terminal may also, during the initialization phase, interact with a daemon in the cloud desktop server to build a first sub-channel, which is used to transmit target data sent by the cloud desktop application.
[0116] Step S502: The daemon process in the cloud desktop server is initialized.
[0117] The daemon process can listen to local communication ports (such as TCP ports or UDP ports) and receive data sent by the kernel processing module. This data is the target data that the kernel processing module intercepts and needs to send to the target printer.
[0118] In step S503, the daemon process reads the configuration information of the target printer to determine the address of the target printer.
[0119] The daemon process synchronizes the target printer's address with the kernel processing module so that the kernel processing module can intercept messages that include the target printer's address.
[0120] In some embodiments, the daemon process can also dynamically detect the configuration information of the target printer, and if it is determined that the address of the target printer has changed, obtain the updated address of the target printer and synchronize the updated address of the target printer to the kernel processing module.
[0121] Step S504: The daemon process is blocked and waiting for a connection.
[0122] The daemon process can block and wait through its interface with the kernel processing module. If it receives a connect request from the kernel processing module, the daemon process will be awakened and will receive the connect request.
[0123] In step S505, the application sends a target print request.
[0124] The destination address of the target print request is the address of the target printer, and the target print request carries the target data that needs to be printed by the target printer.
[0125] In step S506, the kernel processing module intercepts the target printing request and obtains the target data it carries.
[0126] The kernel processing module sends a connect request to the daemon process to wake it up; and changes the destination address of the target print request from the address of the target printer to the address of the daemon process, and generates the target message.
[0127] In step S507, the daemon process is awakened in response to the connect request; the kernel processing module sends the address of the target printer to it.
[0128] The target printer's address includes its network address and port number.
[0129] In step S508, the daemon process sends a message to the terminal requesting the establishment of a preset communication channel based on the address of the target printer.
[0130] In step S509, when the terminal receives a message requesting the establishment of a preset communication channel, it determines that the cloud desktop server needs to establish a communication channel with the target printer; the terminal interacts with the target printer based on the obtained address of the target printer to construct a second sub-channel.
[0131] In step S510, when the second sub-channel is established, the terminal sends a preset communication channel establishment response to the daemon process. The preset communication channel establishment response includes information about the first sub-channel established between the daemon process and the terminal, as well as the second sub-channel between the terminal and the target printer, so that the daemon process can be sure that the preset communication channel has been established.
[0132] Step S511: The kernel processing module sends the target message to the daemon process.
[0133] In step S512, the daemon process interacts with the terminal and the target printer through a preset communication channel, and transmits the target message it receives to the target printer so that the target printer can obtain the target data and print the target data.
[0134] Once the daemon confirms that it has received a print completion response from the target printer, it can know that the target printer has completed printing the target data.
[0135] Step S513: The daemon process sends a completed response to the kernel processing module.
[0136] In step S413, the kernel processing module sends the received print completion response back to the application so that the user of the application knows that the target data has been successfully printed by the target printer.
[0137] Figure 6 is a block diagram of a cloud desktop server provided in an embodiment of this disclosure. As shown in Figure 6, the cloud desktop server 600 includes, but is not limited to, the following modules.
[0138] Kernel processing module 601 is configured to intercept target data in a target print request in response to the target print request.
[0139] The target print request is used to request the target printer to print the target data.
[0140] The sending module 602 is configured to send target data to the target printer through a preset communication channel.
[0141] The target printer is connected to the terminal, the terminal is connected to the cloud desktop server, and the preset communication channel is a channel that connects the kernel processing module and the target printer through the terminal.
[0142] It should be noted that the cloud desktop server in this embodiment can implement any of the cloud desktop data printing methods applied to the cloud desktop server in this disclosure embodiment.
[0143] According to the cloud desktop server of this disclosure, when a target print request is received, the kernel processing module in the cloud desktop server intercepts the target data in the target print request. The target print request is used to request the target printer to print the target data. Since the target printer is connected to the terminal, and the terminal is connected to the cloud desktop server, but the cloud desktop server cannot communicate directly with the target printer, the sending module sends the target data to the target printer through a preset communication channel. This enables the effect of printing data directly from the cloud desktop. The preset communication channel is the channel through which the kernel processing module and the target printer are connected by the terminal. This reduces the abnormality of printing failure caused by the inability of the cloud desktop server and the target printer to communicate, allowing users to print data more quickly by operating the cloud desktop and improving the user experience.
[0144] Figure 7 is a block diagram of a terminal provided in an embodiment of this disclosure. As shown in Figure 7, the terminal 700 includes, but is not limited to, the following modules.
[0145] The receiving module 701 is configured to receive target data sent by the cloud desktop server through a preset communication channel.
[0146] The target data is the data that the target printer needs to print.
[0147] The forwarding module 702 is configured to forward target data to the target printer through a preset communication channel.
[0148] The preset communication channel connects the kernel processing module in the cloud desktop server to the target printer via a terminal.
[0149] It should be noted that the terminal in this embodiment can implement any of the cloud desktop data printing methods applied to the terminal in this disclosure embodiment.
[0150] According to the terminal of this embodiment, a receiving module receives target data sent by a cloud desktop server through a preset communication channel, learns that the cloud desktop server requires a target printer to print the target data, and then uses a forwarding module to forward the target data to the target printer through the preset communication channel, so that the target printer can quickly obtain the target data and print it. Since the preset communication channel connects the kernel processing module in the cloud desktop server to the target printer via the terminal, transmitting the target data through this preset communication channel not only ensures the security of the target data transmission but also allows users to print data directly from the cloud desktop, reducing printing failures caused by the inability of the cloud desktop server and the target printer to communicate. This allows users to print data more quickly by operating the cloud desktop, improving the user experience.
[0151] It should be clarified that this disclosure is not limited to the specific configurations and processes described in the foregoing embodiments and shown in the figures. For the sake of convenience and brevity, detailed descriptions of known methods are omitted here, and the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
[0152] It should be clarified that this case is not limited to the specific configurations and processes described in the above embodiments and shown in the figures. For the sake of convenience and brevity, detailed descriptions of known methods are omitted here, and the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
[0153] Fourthly, embodiments of this disclosure provide an electronic device, a computer-readable medium, and a computer program product.
[0154] Figure 8 is a block diagram of an electronic device provided in an embodiment of this disclosure. The electronic device can be a cloud desktop server or a terminal.
[0155] As shown in Figure 8, the electronic device includes at least one processor 801, at least one memory 802, and one or more I / O interfaces 803. The processor 801, memory 802, and I / O interfaces 803 are interconnected via a bus 804. The memory 802 stores one or more computer programs, which are executed by the at least one processor 801 to enable the at least one processor 801 to implement any of the cloud desktop data printing methods described in the above embodiments.
[0156] The modules in the aforementioned electronic devices can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0157] This disclosure also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements any of the cloud desktop data printing methods described in the above embodiments. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.
[0158] This disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code is run in the processor of an electronic device, the processor in the electronic device executes the above-described cloud desktop data printing method.
[0159] Those skilled in the art will understand that all or some of the steps, systems, and devices disclosed above, as well as the functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components.
[0160] Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0161] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0162] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0163] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0164] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0165] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0166] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0167] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, the execution order of which may be determined based on the functions involved in each block. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0168] Example embodiments have been disclosed herein, and while specific terminology has been used, it is intended and should be interpreted only in a general illustrative sense and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in conjunction with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in conjunction with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure.
Claims
1. A method for printing data on a cloud desktop, executed by a cloud desktop server including a kernel processing module, the method comprising: In response to a target print request, the kernel processing module intercepts the target data in the target print request, which is used to request the target printer to print the target data. The target data is sent to the target printer through a preset communication channel; The target printer is connected to the terminal, the terminal is connected to the cloud desktop server, and the preset communication channel is a channel through which the kernel processing module is connected to the target printer via the terminal.
2. The method according to claim 1, wherein, Before sending the target data to the target printer through a preset communication channel, the method further includes: The kernel processing module establishes a first sub-channel with the terminal; The kernel processing module sends the address of the target printer to the terminal through the first sub-channel, so that the terminal establishes a second sub-channel with the target printer based on the address of the target printer; The preset communication channel is established based on the first sub-channel and the second sub-channel.
3. The method according to claim 1, wherein, Sending the target data to the target printer via a preset communication channel includes: The kernel processing module changes the destination address of the target print request from the address of the target printer to the source address of the preset communication channel, and generates a target message; Send the target message to the target printer.
4. The method according to claim 1, wherein, The method further includes: Detect the target printer address list, wherein the target printer address list includes multiple target printers and their corresponding addresses; If the address of the target printer is updated, obtain the updated address of the target printer.
5. The method according to claim 1, wherein, Before sending the target data to the target printer through a preset communication channel, the method further includes: The kernel processing module checks the target data.
6. The method according to claim 1, wherein, The kernel processing module is matched with the operating system model of the terminal; the model of the target printer is matched with the operating system model of the terminal.
7. A data printing method for a cloud desktop, applied to a terminal, the method comprising: The target data, which is data that needs to be printed by the target printer, is received from the cloud desktop server through a preset communication channel. The target data is forwarded to the target printer through the preset communication channel, wherein the preset communication channel is a channel that connects the kernel processing module in the cloud desktop server to the target printer through the terminal.
8. The method according to claim 7, wherein, Before forwarding the target data to the target printer through the preset communication channel, the method further includes: In response to the communication channel establishment request sent by the cloud desktop server, the address of the target printer is obtained; A second sub-channel is established with the target printer based on the target printer's address.
9. A cloud desktop server, comprising a memory and a processor; the memory storing a computer program executable by the processor, wherein the computer program, when executed by the processor, implements the data printing method for the cloud desktop according to any one of claims 1 to 6.
10. A terminal comprising a memory and a processor; the memory storing a computer program executable by the processor, wherein the computer program, when executed by the processor, implements the data printing method for a cloud desktop as described in any one of claims 7 to 8.
11. A computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the data printing method for a cloud desktop according to any one of claims 1 to 8.
12. A computer program product comprising a computer program that, when executed by a processor, implements the data printing method for a cloud desktop as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Printer mapping method and system based on desktop virtualization technology
CN104394290A
Virtual channel-based desktop cloud efficient printing method and system
CN106878419A
Printing implementation method, device and system and storage medium
CN112035074A
Network printing method based on desktop virtualization technology, medium and device based on desktop virtualization technology
CN113934379A
Method for discovering and using local network printer by cloud desktop and storage medium
CN116931846A