WO2021051664A1 - 打印方法、装置、计算机设备和存储介质 - Google Patents

打印方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2021051664A1
WO2021051664A1 PCT/CN2019/123882 CN2019123882W WO2021051664A1 WO 2021051664 A1 WO2021051664 A1 WO 2021051664A1 CN 2019123882 W CN2019123882 W CN 2019123882W WO 2021051664 A1 WO2021051664 A1 WO 2021051664A1
Authority
WO
WIPO (PCT)
Prior art keywords
printing
terminal
cloud server
user
information
Prior art date
Application number
PCT/CN2019/123882
Other languages
English (en)
French (fr)
Inventor
管正伟
陈亮
Original Assignee
益萃网络科技(中国)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 益萃网络科技(中国)有限公司 filed Critical 益萃网络科技(中国)有限公司
Publication of WO2021051664A1 publication Critical patent/WO2021051664A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/1285Remote printer device, e.g. being remote from client or server
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/1285Remote printer device, e.g. being remote from client or server
    • G06F3/1287Remote printer device, e.g. being remote from client or server via internet
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Definitions

  • This application relates to the field of printing technology, in particular to a printing method, device, computer equipment and storage medium.
  • the traditional software printing method is to print through the browser or call the print service of the system printing, and print directly to the printer connected via Bluetooth or LAN.
  • cloud printing technology With the development of printing technology, cloud printing technology has emerged.
  • the traditional cloud printing technology needs to connect the printer to the Internet, and upload the data to be printed to the cloud server through the Internet, mobile phone network or application software, and then send it to the cloud server.
  • remote cloud printing can also be achieved through some software, but this remote cloud printing method usually requires printer types. For example, after a customer places an order, a Bluetooth thermal printer needs to be prepared in the store to print out the order receipt. There is a printer The problem of low compatibility.
  • an embodiment of the present application provides a printing method, and the method includes:
  • the cloud server obtains the print request sent by the user terminal, and the print request includes the user ID;
  • the cloud server searches for the corresponding printing information and printing terminal according to the user ID;
  • the cloud server sends the printing information to the printing terminal, so that the printing terminal sends the printing information to the printer for printing.
  • the method before the cloud server searches for the corresponding printing information and printing terminal according to the user identifier, the method further includes:
  • the cloud server receives the WebSocket connection establishment request sent by the printing terminal.
  • the WebSocket connection establishment request includes the printing identification of the printing terminal.
  • the printing identification and the user identification have a corresponding relationship, so that the cloud server finds the corresponding printing terminal according to the user identification.
  • the cloud server sending the printing information to the printing terminal specifically includes: the cloud server pushing the printing information to the printing terminal corresponding to the user identification through the WebSocket.
  • the cloud server pushes the printing information to the printing terminal corresponding to the user identification through WebSocket, which specifically includes:
  • the cloud server sends the printing information to the message queue
  • the cloud server pushes the printing information in the message queue to the printing terminal corresponding to the user ID through WebSocket;
  • the cloud server obtains the notification of the print information push failure, it will push the print information in the message queue to the print terminal corresponding to the user ID again through the WebSocket within the preset conditions;
  • the cloud server fails to push the print information within the preset conditions, it returns a notification of the print information push failure to the user terminal.
  • the method before the cloud server sends the printing information to the printing terminal, the method further includes:
  • the cloud server assembles the printing information and generates the data to be printed.
  • the cloud server sending the printing information to the printing terminal specifically includes: the cloud server sending the data to be printed to the printing terminal.
  • the method further includes:
  • the printing terminal receives the printing information sent by the cloud server, and the printing information is found by the cloud server according to the user identification included in the printing request sent by the user terminal;
  • the printing terminal calls a preset printer according to the user ID to print the printing information.
  • the method before the printing terminal receives the printing information sent by the cloud server, the method further includes:
  • the printing terminal sends a WebSocket connection establishment request to the cloud server.
  • the WebSocket connection establishment request includes the printing identification of the printing terminal.
  • the printing identification and the user identification have a corresponding relationship, so that the cloud server searches for the corresponding printing terminal according to the user identification.
  • the printing terminal receiving the printing information sent by the cloud server specifically includes: the printing terminal receives the printing information pushed by the cloud server according to the user identifier through the WebSocket.
  • the method further includes:
  • the printing terminal displays a list of connected printers, and the printer list includes printer identification
  • the printing terminal obtains the printer selected according to the list of connected printers
  • the printing terminal establishes an association relationship between the printer identification and the printing identification corresponding to the selected printer.
  • the printing terminal invoking a preset printer to print the printing information according to the user identification specifically includes: the printing terminal invoking a printer associated with the printing identification according to the user identification to print the printing information.
  • the method further includes:
  • the printing terminal converts the format of the printing information to generate the printing data.
  • the printing terminal invoking a preset printer to print the printing information according to the user identification specifically includes: the printing terminal invoking the preset printer according to the user identification to print the printing data.
  • the method further includes:
  • the printing terminal receives the printing completion notification sent by the printer
  • the printing terminal sends the printing completion notification to the cloud server, so that the cloud server sends the printing completion notification to the user terminal.
  • an embodiment of the present application also provides a printing device, which includes:
  • the obtaining module is used to obtain the print request sent by the user terminal, and the print request includes the user ID;
  • the data search module is used to search for the corresponding printing information and printing terminal according to the user ID;
  • the sending module is used to send the printing information to the printing terminal, so that the printing terminal sends the printing information to the printer for printing.
  • the embodiment of the present application also provides a printing terminal, and the printing terminal includes:
  • the receiving module is used to receive the printing information sent by the cloud server, the printing information is found by the cloud server according to the user identification included in the printing request sent by the user terminal;
  • the printing module is used to call a preset printer to print the printing information according to the user ID.
  • an embodiment of the present application also provides a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method when the computer program is executed.
  • the embodiments of the present application also provide a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are realized.
  • the cloud server obtains the print request sent by the user terminal, it searches for the corresponding printing information and printing terminal according to the user ID contained in the print request, and the cloud server sends the printing information to the user ID
  • the corresponding printing terminal after receiving the printing information, the printing terminal prints the printing information by calling any connected printer. Since the printer connected to the printing terminal can be any type of printer, the user terminal can send the data to be printed to any type of printer connected to the remote printing terminal through the cloud server for printing, which greatly meets the needs of users And the compatibility of printer models in remote cloud printing is improved.
  • Figure 1 is an application environment diagram of a printing method in an embodiment
  • Figure 2 is a schematic flowchart of a printing method in an embodiment
  • FIG. 3 is a schematic flowchart of a printing method in an embodiment
  • FIG. 4 is a schematic flowchart of a printing method in an embodiment
  • Figure 5 is a schematic flow chart of a printing method in an embodiment
  • Figure 6 is a schematic flow chart of a printing method in an embodiment
  • Figure 7 is a structural block diagram of a printing device in an embodiment
  • Figure 8 is a structural block diagram of a printing terminal in an embodiment
  • Fig. 9 is an internal structure diagram of a computer device in an embodiment.
  • the printing method provided in this application can be applied to the application environment as shown in FIG. 1.
  • the application environment includes a user terminal 102, a cloud server 104, and a printing terminal 106.
  • the user terminal 102 and the cloud server 104 communicate through the network.
  • the cloud server 104 and the printing terminal 106 communicate through the network.
  • the cloud server 104 receives the print request sent by the user terminal 102, and the print request includes the user identification.
  • the cloud server 104 searches for the printing information and the printing terminal 106 according to the user ID, and sends the printing information to the printing terminal 106.
  • the printing terminal 106 receives the printing information sent by the cloud server 104, and prints the printing information by calling a printer connected to the printing terminal 106.
  • the user terminal 102 and the printing terminal 106 can be, but are not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • the cloud server 104 can be an independent server or a server cluster composed of multiple servers. to fulfill.
  • a printing method is provided. Taking the method applied to the cloud server 104 in FIG. 1 as an example for description, the method includes the following steps:
  • Step 202 The cloud server obtains the print request sent by the user terminal, and the print request includes the user identification.
  • the user ID is used to uniquely identify the user terminal and the corresponding printing terminal, and the user ID can be an email address, a network account, ID information, etc., which are not limited here.
  • the user can trigger the print request through the user terminal.
  • the user terminal sends a printing request to the cloud server, and the printing request includes a user identification, so that the cloud server can search for corresponding printing information and the printing terminal according to the user identification.
  • Step 204 The cloud server searches for the corresponding printing information and printing terminal according to the user identifier.
  • the printing terminal can be a remote printing terminal relative to the user terminal.
  • the printing terminal and the user terminal can send and receive data through the cloud server.
  • the user terminal can be a terminal device in Beijing, and the printing terminal can be a terminal in Shanghai.
  • the equipment is not limited here.
  • the printing terminal and the user terminal can establish a corresponding relationship through the user ID, which is not limited here.
  • the printing information may be data that the user needs to print, such as sales receipts, documents in various formats, etc., which are not limited here.
  • the printing information may be pre-stored in the cloud server through the user terminal corresponding to the user identification, which is not limited here.
  • the cloud server After the cloud server obtains the print request sent by the user terminal, it searches for the corresponding print information and print terminal according to the user identifier included in the print request. Further, the printing information may also be input by the user through the user terminal. The user terminal sends the printing request to the cloud server, so that the cloud server obtains the user identification and corresponding printing information according to the printing request.
  • Step 206 The cloud server sends the printing information to the printing terminal, so that the printing terminal sends the printing information to the printer for printing.
  • the printer can be any type of printer that is connected to the printing terminal, and can be a thermal Bluetooth printer, a dot matrix printer, a laser printer, etc., which is not limited here.
  • the cloud server finds the corresponding printing information and printing terminal according to the user ID, it sends the printing information to the printing terminal corresponding to the user ID, so that the printing terminal can send the printing information to any connected printer, Print the print information through any printer.
  • the cloud server After the cloud server obtains the printing request sent by the user terminal, it searches for the corresponding printing information and printing terminal according to the user identification contained in the printing request, and the cloud server sends the printing information to the printing terminal corresponding to the user identification, and the printing terminal After receiving the print information, print the print information by calling any connected printer. Since the printer connected to the printing terminal can be any type of printer, the user terminal can send the data to be printed to any type of printer connected to the remote printing terminal through the cloud server for printing, which greatly meets the needs of users And the compatibility of printer models in remote cloud printing is improved.
  • the cloud server may also receive a WebSocket connection establishment request sent by the printing terminal.
  • the WebSocket connection establishment request includes the printing identification of the printing terminal.
  • the printing identification and the user identification have a corresponding relationship, so that the cloud server searches for the corresponding printing terminal according to the user identification.
  • WebSocket is a protocol for full-duplex communication on a single TCP connection.
  • the print identifier is used to distinguish different printing terminals.
  • the print identifier can be an email address, network account, ID information, etc., and the print identifier and user identifier can establish a corresponding relationship through the email address, network account, ID information, etc.
  • the printing user can trigger the establishment request of the WebSocket connection through the printing terminal, and the establishment request of the WebSocket connection includes the printing identification of the printing terminal.
  • the printing terminal sends a WebSocket connection establishment request including the printing identifier to the cloud server, so that the cloud server and the printing terminal maintain real-time communication through the WebSocket.
  • the cloud server After the cloud server obtains the print request sent by the user terminal, since the print ID and the user ID can establish a corresponding relationship through the email address, network account, ID information, etc., the cloud server can find the corresponding print ID according to the user ID contained in the print request , Thereby determining the printing terminal corresponding to the user identification, so that the cloud server can push the printing information corresponding to the user identification to the corresponding printing terminal in real time via WebSocket.
  • the cloud server sending the printing information to the printing terminal specifically includes: the cloud server pushing the printing information to the printing terminal corresponding to the user identification through the WebSocket.
  • the user terminal may be set in a company in Beijing, and the printing terminal may be set in a warehouse of the company in Shanghai.
  • the printing terminal in the Shanghai warehouse sends a request for establishing a WebSocket connection to the cloud server, and the request includes a printing identifier.
  • the user ID of the user terminal of the Beijing company and the print ID of the printing terminal of the Shanghai warehouse can establish a corresponding relationship through the same ID information, which is not limited here.
  • the user terminal of the Beijing company needs to print the invoice through the printing terminal of the Shanghai warehouse, it can send a print request to the cloud server.
  • the cloud server finds the printing information and the printing identification corresponding to the user identification by identifying the user identification in the printing information, and sends the found printing information to the corresponding printing terminal.
  • the cloud server can search for the printing terminal corresponding to the printing identification according to the user identification, so that the printing information can be sent to the designated printing terminal.
  • the cloud server maintains real-time communication with the printing terminal through WebSocket, so that the cloud server can actively and promptly push the printing information to the designated printing terminal after finding the printing information, without the need for the printing terminal to access the printing information, which improves the remote cloud printing The efficiency of information transmission.
  • the cloud server pushes the printing information to the printing terminal corresponding to the user identification through WebSocket, which specifically includes the following steps:
  • Step 302 The cloud server sends the printing information to the message queue.
  • the message queue (Message Queue) is a container for storing messages during the transmission of messages.
  • the cloud server finds the printing information according to the user identification included in the acquired print request, it sends the printing information corresponding to the user identification to the message queue.
  • Step 304 The cloud server pushes the printing information in the message queue to the printing terminal corresponding to the user identification through the WebSocket.
  • the cloud server can find the corresponding print ID according to the user ID contained in the print request, thereby determining the corresponding print ID to the user ID.
  • Print terminal After the cloud server finds the printing information corresponding to the user identification, it sends the printing information corresponding to the user identification to the message queue.
  • the cloud server sends the printing information corresponding to the user identification in the message queue to the corresponding printing terminal by identifying the user identification of the printing information in the message queue.
  • Step 306 If the cloud server obtains the notification of the failure to push the printing information, it pushes the printing information in the message queue to the printing terminal corresponding to the user ID again through the WebSocket within the preset conditions.
  • the preset condition may be any one of a preset period and a preset number of times.
  • the cloud server may obtain a notification of the failure to push print information from the printing terminal according to the TCP connection protocol. Specifically, the cloud server sends the printing information corresponding to the user identification in the message queue to the corresponding printing terminal by identifying the user identification of the printing information in the message queue. If the cloud server obtains the notification of the printing information push failure from the printing terminal, it can push the printing information corresponding to the user ID to the corresponding printing terminal again through the WebSocket within the preset conditions.
  • the preset condition may be to re-push the print information to the printing terminal through the WebSocket every 1 minute, and the total number of times to push the print information to the printing terminal does not exceed 6 times.
  • Step 308 If the cloud server fails to push the print information within the preset conditions, it returns a notification of the print information push failure to the user terminal.
  • the cloud server finds the corresponding user ID through the printing ID of the printing terminal, and returns a notification of the printing information push failure to the user The user terminal corresponding to the user ID.
  • the cloud server pushes the printing information to the printing terminal corresponding to the user ID for 6 times, and still obtains the printing information push failure notification sent by the printing terminal, the cloud server will follow the printing of the printing terminal
  • the identifier determines the corresponding user identifier, and returns a print information push failure notification to the user terminal corresponding to the user identifier.
  • the corresponding printing terminal is determined according to the user identification of the printing information in the message queue.
  • the cloud server fails to push the printing information to the corresponding printing terminal, it can retain the printing message through the message queue, and push the printing message to the corresponding printing terminal again within the preset conditions, until the push is successful within the preset conditions, improving The stability of the printing information transmission process is improved.
  • the cloud server may also assemble the printing information to generate the data to be printed.
  • the data to be printed may be data that the cloud server will send to the printing terminal for printing, and the format of the data to be printed may be data that is convenient for the printing terminal to analyze.
  • the cloud service finds the printing information corresponding to the user identification, it assembles the printing information to generate the data to be printed corresponding to the user identification.
  • the printing information can be assembled into the data to be printed in Json format, which is not limited here.
  • the cloud server sends the printing information to the printing terminal, which specifically includes the cloud server sending the data to be printed to the printing terminal.
  • the cloud server assembles the printing information, it generates the data to be printed corresponding to the user identification, and sends the data to be printed to the printing terminal corresponding to the user identification for printing.
  • the cloud server assembles the printing information corresponding to the user ID into the data to be printed, determines the corresponding printing terminal according to the user ID, and sends the data to be printed to the corresponding printing terminal for subsequent reading by the printing terminal And parse the data to be printed.
  • a printing method is provided. Taking the method applied to the printing terminal 106 in FIG. 1 as an example for description, the method includes the following steps:
  • Step 402 The printing terminal receives the printing information sent by the cloud server.
  • the printing information is found by the cloud server according to the user identifier included in the printing request sent by the user terminal.
  • the user identification is used to uniquely identify the user terminal and the printing terminal, and the user identification may be the user's email address, network account, ID information, etc., which are not limited here.
  • the printing terminal can be a remote printing terminal relative to the user terminal.
  • the printing terminal and the user terminal can send and receive data through the cloud server.
  • the user terminal can be a terminal device in Beijing, and the printing terminal can be a terminal device in Shanghai.
  • the printing terminal and the user terminal can establish a corresponding relationship through the user ID, which is not limited here.
  • the printing information may be data that the user needs to print, such as sales receipts, documents in various formats, etc., which are not limited here.
  • the printing information may be pre-stored in the cloud server through the user terminal corresponding to the user identification, which is not limited here. Specifically, after the cloud server obtains the print request sent by the user terminal, it searches for the corresponding print information and print terminal according to the user identifier included in the print request. The cloud server sends the printing information to the printing terminal corresponding to the user identification. The printing terminal receives the printing information. Further, the printing information may also be input by the user through the user terminal. The user terminal sends the printing request to the cloud server, so that the cloud server obtains the user identification and corresponding printing information according to the printing request.
  • Step 404 The printing terminal invokes a preset printer according to the user ID to print the printing information.
  • the preset printer may be any printer corresponding to the user identification set in advance.
  • the printer can be any type of printer that is connected to the printing terminal, and can be a thermal Bluetooth printer, a dot matrix printer, a laser printer, etc., which is not limited here.
  • the printing terminal after receiving the printing information sent by the cloud server according to the user ID, the printing terminal searches for the corresponding preset printer according to the user ID, calls the preset printer through the system component, and sends the printing information to the preset printer for processing. print.
  • the printing terminal after receiving the printing information sent by the cloud server, the printing terminal calls a preset printer for printing according to the user identification included in the printing information. Since the printer connected to the printing terminal can be any type of printer, the compatibility of the printer model in remote cloud printing is greatly improved.
  • the printing terminal may also send a WebSocket connection establishment request to the cloud server.
  • the WebSocket connection establishment request includes the printing identification of the printing terminal, the printing identification and The user identification has a corresponding relationship, so that the cloud server searches for the corresponding printing terminal according to the user identification.
  • WebSocket is a protocol for full-duplex communication on a single TCP connection.
  • the printing identification is used to distinguish different printing terminals.
  • the printing identification can be an email address, network access account, ID information, etc., and the printing identification and user identification can establish a corresponding relationship through the email address, network access account, ID information, etc., which is not limited here.
  • the printing user can trigger the establishment request of the WebSocket connection through the printing terminal, and the establishment request of the WebSocket connection includes the printing identification of the printing terminal.
  • the printing terminal sends the WebSocket connection establishment request and the printing identification to the cloud server, so that the cloud server and the printing terminal maintain real-time communication through WebSocket.
  • the cloud server After the cloud server obtains the print request sent by the user terminal, it finds the corresponding print identifier according to the user identifier contained in the print request. Since the print identifier and the user identifier can establish a corresponding relationship through the email address, network account, ID information, etc., the cloud server The corresponding printing identification can be found according to the user identification contained in the print request, thereby determining the printing terminal corresponding to the user identification, so that the cloud server can push the printing information corresponding to the user identification to the corresponding printing terminal in real time via WebSocket.
  • the printing terminal receiving the printing information sent by the cloud server specifically includes: the printing terminal receives the printing information pushed by the cloud server according to the user identifier through the WebSocket.
  • the user terminal may be set in a company in Beijing, and the printing terminal may be set in a warehouse of the company in Shanghai.
  • the printing terminal in the Shanghai warehouse sends a request for establishing a WebSocket connection to the cloud server, and the request includes a printing identifier.
  • the user ID of the user terminal of the Beijing company and the print ID of the printing terminal of the Shanghai warehouse can establish a corresponding relationship through the same ID information, which is not limited here.
  • the user terminal of the Beijing company needs to print the invoice through the printing terminal of the Shanghai warehouse, it can send a print request to the cloud server.
  • the cloud server finds the printing information and the printing identification corresponding to the user identification by identifying the user identification in the printing information, and sends the found printing information to the corresponding printing terminal.
  • the printing terminal sends a WebSocket connection establishment request to the cloud server.
  • the WebSocket connection establishment request includes a print identification.
  • the cloud server can search for and print the identification based on the user identification.
  • Corresponding printing terminal so that printing information can be received through the designated printing terminal.
  • the printing terminal maintains real-time communication with the cloud server through WebSocket, so that the cloud server can actively and promptly push the printing information to the designated printing terminal after finding the printing information, without the need for the printing terminal to access the printing information, which improves the remote cloud printing performance effectiveness.
  • Step 502 The printing terminal displays a list of connected printers, and the printer list includes printer identifications.
  • the printer identifier is used to distinguish different printers, and the printer identifier can be the printer name, printer model, etc., which is not limited here. Specifically, after the printing terminal establishes a communication connection with the cloud server through WebSocket, the printing terminal can display a list of connected printers to the printing user, so that the printing user can select an applicable printer according to the printer list.
  • Step 504 Obtain a printer selected according to the list of connected printers.
  • Step 506 Establish an association relationship between the printer identification and the printing identification corresponding to the selected printer.
  • the printing user can trigger a request to select a printer through the printing terminal.
  • the printing terminal obtains the information of the printer selected by the printing user, determines the printer identification of the selected printer according to the information of the selected printer, and establishes an association relationship between the printer identification and the printing identification.
  • the printing terminal calls a preset printer according to the user ID to print the printing information, which specifically includes:
  • Step 508 The printing terminal calls the printer associated with the printing identification to print the printing information according to the user identification.
  • the preset printer may be a selected printer. Specifically, since the print ID and the user ID can establish a corresponding relationship through the email address, network account number, ID information, etc., after the printing terminal receives the printing information corresponding to the user ID from the cloud server, it can identify the selected and printed information according to the user ID. Identify the printer associated with the identification, and send the printing information to the printer associated with the printing identification for printing.
  • the printing user can preview the connected printers through the printer list, select the printer they want to use, and establish the printing identification of the printing terminal and the selected printer identification. connection relation.
  • the printing terminal After the printing terminal receives the printing information corresponding to the user ID, it determines the selected printer associated with the printing ID through the user ID, so that the printing information can be printed out by the selected printer, so that the user can pass the printing information through the designated
  • the printer model is printed out, the operation is simple and fast and meets the needs of users.
  • the printing terminal may also perform format conversion on the printing information to generate printing data.
  • the printing terminal can perform format conversion on the printing information to generate print data corresponding to the user identification. For example, it can be converted into pdf format, which is not limited here.
  • the printing terminal invoking the printing information of a preset printer according to the user identification specifically includes: the printing terminal invoking the preset printer according to the user identification to print the printing data.
  • the preset printer may be any printer that corresponds to a preset user ID. The printing terminal searches for the corresponding preset printer according to the user ID, calls the preset printer through the system component, and sends the print data to the preset printer for printing.
  • the printing terminal may also receive a printing completion notification sent by the printer, and send the printing completion notification to the cloud server, so that the cloud server Send a print completion notification to the user terminal.
  • the printer after the printer finishes printing, it can return a notification of printing completion to the printing terminal.
  • the printing terminal sends the printing completion notification to the cloud server.
  • the cloud service identifies the user identification corresponding to the printing terminal through the printing completion notification, searches for the corresponding user terminal according to the user identification, and sends the printing completion notification to the user terminal.
  • the printing terminal receives the printing completion notification sent by the printer, and sends the printing completion notification to the corresponding user terminal through the cloud server, so that the user terminal can learn the printing success or printing failure, so that the user can follow the printing result. Proceed to the next step.
  • the above printing method is further explained through a specific embodiment, as shown in FIG. 6, including the following steps:
  • Step 601 The cloud server obtains a print request sent by a user terminal, and the print request includes a user identification.
  • Step 602 The cloud server receives a WebSocket connection establishment request sent by the printing terminal.
  • the request for establishing the WebSocket connection includes the printing identification of the printing terminal, and the printing identification and the user identification have a corresponding relationship, so that the cloud server can find the corresponding printing terminal according to the user identification.
  • Step 603 The printing terminal displays a list of connected printers, and the printer list includes printer identification.
  • Step 604 The printing terminal obtains the printer selected according to the list of connected printers.
  • Step 605 The printing terminal establishes an association relationship between the printer identification and the printing identification corresponding to the selected printer.
  • Step 606 The cloud server searches for the corresponding printing information and printing terminal according to the user identifier.
  • step 607 the cloud server assembles the printing information and generates the data to be printed.
  • step 608 the cloud server sends the data to be printed to the message queue.
  • Step 609 The cloud server pushes the to-be-printed data in the message queue to the printing terminal via WebSocket.
  • Step 610 The printing terminal performs format conversion on the data to be printed, and generates the printing data.
  • Step 611 The printing terminal calls the printer associated with the printing identification according to the user identification.
  • Step 612 The printing terminal sends the printing data to the printer.
  • Step 613 The printer prints the received print data.
  • Step 614 The printing terminal receives the printing completion notification sent by the printer.
  • Step 615 The printing terminal sends a printing completion notification to the cloud server.
  • Step 616 The cloud server sends a printing completion notification to the user terminal.
  • a printing device 700 including: an acquisition module 701, a data search module 702 module, and a sending module 703, wherein:
  • the obtaining module 701 is configured to obtain a print request sent by a user terminal, and the print request includes a user identification.
  • the data search module 702 is used to search for the corresponding printing information and printing terminal according to the user identification.
  • the sending module 703 is configured to send the printing information to the printing terminal, so that the printing terminal sends the printing information to the printer for printing.
  • it further includes a communication connection module for receiving a WebSocket connection establishment request sent by the printing terminal.
  • the WebSocket connection establishment request includes the printing identification of the printing terminal.
  • the printing identification and the user identification have a corresponding relationship to enable the cloud
  • the server searches for the corresponding printing terminal according to the user ID.
  • the sending module 703 is further configured to send the printing information to the message queue, and push the printing information in the message queue to the printing terminal corresponding to the user identification through the WebSocket.
  • it further includes a data assembly module, which is used to assemble printing information and generate data to be printed.
  • the sending module 703 is also used to send the data to be printed to the printing terminal.
  • Each module in the above-mentioned printing device may be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a printing terminal 800 including: a receiving module 801 and a printing module 802, wherein:
  • the receiving module 801 is configured to receive printing information sent by the cloud server, where the printing information is found by the cloud server according to the user identifier included in the printing request sent by the user terminal.
  • the printing module 802 is configured to call a preset printer to print the printing information according to the user ID.
  • it further includes a communication connection request module, which is used to send a WebSocket connection establishment request to the cloud server.
  • the WebSocket connection establishment request includes the printing identification of the printing terminal.
  • the printing identification and the user identification have a corresponding relationship, so that the cloud server Find the corresponding printing terminal according to the user ID.
  • it further includes a display module for displaying a list of connected printers, the printer list including printer identifiers, and a second acquiring module for acquiring the printer selected according to the list of connected printers.
  • it further includes a format conversion module, which is used to format the print information to generate print data.
  • it further includes a second receiving module for receiving a printing completion notification sent by the printer; a second sending module for sending the printing completion notification to the cloud server, so that the cloud server sends the printing completion notification to the user terminal .
  • Each module in the above-mentioned printing terminal can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 9.
  • the computer equipment includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus.
  • the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system and a computer program.
  • the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer program is executed by the processor to realize a printing method.
  • the display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen
  • the input device of the computer equipment can be a touch layer covered on the display screen, or it can be a button, a trackball or a touchpad set on the housing of the computer equipment , It can also be an external keyboard, touchpad, or mouse.
  • FIG. 9 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • a computer device including a memory and a processor, and a computer program is stored in the memory, and the processor implements the following steps when executing the computer program:
  • the cloud server obtains the print request sent by the user terminal.
  • the print request includes the user ID; the cloud server searches for the corresponding printing information and printing terminal according to the user ID; the cloud server sends the printing information to the printing terminal so that the printing terminal sends the printing information to the printer To print.
  • the processor before the cloud server searches for the corresponding printing information and printing terminal according to the user identifier, the processor implements the following steps when executing the computer program:
  • the cloud server receives the WebSocket connection establishment request sent by the printing terminal.
  • the WebSocket connection establishment request includes the printing identification of the printing terminal.
  • the printing identification and the user identification have a corresponding relationship, so that the cloud server finds the corresponding printing terminal according to the user identification.
  • the cloud server sending the printing information to the printing terminal specifically includes: the cloud server pushing the printing information to the printing terminal corresponding to the user identification through the WebSocket.
  • the processor implements the following steps when executing the computer program:
  • the cloud server sends the printing information to the message queue; the cloud server pushes the printing information in the message queue to the printing terminal corresponding to the user ID through WebSocket; if the cloud server obtains the notification of the printing information push failure, it will pass it again within the preset conditions WebSocket pushes the printing information in the message queue to the printing terminal corresponding to the user ID; if the cloud server fails to push the printing information within the preset conditions, it returns a notification of the printing information push failure to the user terminal.
  • the processor implements the following steps when the processor executes the computer program:
  • the cloud server assembles the printing information and generates the data to be printed.
  • the processor implements the following steps when executing the computer program:
  • the printing terminal receives the printing information sent by the cloud server, the printing information is found by the cloud server according to the user identification included in the printing request sent by the user terminal; the printing terminal calls a preset printer according to the user identification to print the printing information.
  • the processor before the printing terminal receives the printing information sent by the cloud server, the processor implements the following steps when executing the computer program:
  • the printing terminal sends a WebSocket connection establishment request to the cloud server.
  • the WebSocket connection establishment request includes the printing identification of the printing terminal.
  • the printing identification and the user identification have a corresponding relationship, so that the cloud server searches for the corresponding printing terminal according to the user identification.
  • the processor implements the following steps when executing the computer program:
  • the printing terminal displays a list of connected printers, and the printer list includes printer identifications; the printing terminal obtains the printer selected according to the list of connected printers; the printing terminal establishes an association relationship between the printer identification and the printing identification corresponding to the selected printer.
  • the processor implements the following steps when executing the computer program:
  • the printing terminal converts the format of the printing information to generate the printing data.
  • the processor executes the computer program to implement the following steps:
  • the printing terminal receives the printing completion notification sent by the printer; the printing terminal sends the printing completion notification to the cloud server, so that the cloud server sends the printing completion notification to the user terminal.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
  • the cloud server obtains the print request sent by the user terminal.
  • the print request includes the user ID; the cloud server searches for the corresponding printing information and printing terminal according to the user ID; the cloud server sends the printing information to the printing terminal so that the printing terminal sends the printing information to the printer To print.
  • the cloud server searches for the corresponding printing information and printing terminal according to the user identification, the following steps are implemented when the computer program is executed by the processor:
  • the cloud server receives the WebSocket connection establishment request sent by the printing terminal.
  • the WebSocket connection establishment request includes the printing identification of the printing terminal.
  • the printing identification and the user identification have a corresponding relationship, so that the cloud server finds the corresponding printing terminal according to the user identification.
  • the cloud server sends the printing information to the message queue; the cloud server pushes the printing information in the message queue to the printing terminal corresponding to the user identification through WebSocket; if The cloud server obtains the notification of the failure of printing information push, and pushes the printing information in the message queue to the printing terminal corresponding to the user ID through the WebSocket within the preset conditions; if the cloud server fails to push the printing information within the preset conditions, it returns Print a notification of failure to push information to the user terminal.
  • the cloud server assembles the printing information and generates the data to be printed.
  • the printing terminal receives the printing information sent by the cloud server, the printing information is found by the cloud server according to the user identification included in the printing request sent by the user terminal; the printing terminal calls a preset printer according to the user identification to print the printing information.
  • the following steps are implemented when the computer program is executed by the processor:
  • the printing terminal sends a WebSocket connection establishment request to the cloud server.
  • the WebSocket connection establishment request includes the printing identification of the printing terminal.
  • the printing identification and the user identification have a corresponding relationship, so that the cloud server searches for the corresponding printing terminal according to the user identification.
  • the following steps are implemented when the computer program is executed by the processor:
  • the printing terminal displays a list of connected printers, and the printer list includes printer identifications; the printing terminal obtains the printer selected according to the list of connected printers; the printing terminal establishes an association relationship between the printer identification and the printing identification corresponding to the selected printer.
  • the printing terminal receives the printing information sent by the cloud server
  • the following steps are implemented when the computer program is executed by the processor:
  • the printing terminal converts the format of the printing information to generate the printing data.
  • the printing terminal calls a preset printer according to the user ID to print the printing information
  • the following steps are implemented when the computer program is executed by the processor:
  • the printing terminal receives the printing completion notification sent by the printer; the printing terminal sends the printing completion notification to the cloud server, so that the cloud server sends the printing completion notification to the user terminal.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

一种打印方法、装置、计算机设备和存储介质。所述方法包括:云服务器获取用户终端发送的打印请求,打印请求包括用户标识(S202);云服务器根据用户标识查找对应的打印信息和打印终端(S204);云服务器将打印信息发送至打印终端,以使打印终端将打印信息发送至打印机进行打印(S206)。由于与打印终端产生连接的打印机可以是任何型号的打印机,使得用户终端能够通过云服务器将需要打印的数据发送至与远程打印终端连接的任何型号的打印机进行打印,极大的满足了用户的需求且提高了远程云打印中打印机型号的兼容性。

Description

打印方法、装置、计算机设备和存储介质 技术领域
本申请涉及打印技术领域,特别是涉及一种打印方法、装置、计算机设备和存储介质。
背景技术
传统的软件打印方式是通过浏览器打印或者调用系统打印的打印服务,直接打印到通过蓝牙或者局域网连接的打印机上。随着打印技术的发展,出现了云打印技术,传统的云打印技术需要把打印机连入互联网,通过Internet、手机网络或应用软件,把需要打印的数据上传至云服务器,经过云服务器下发给已经绑定并连入互联网的打印机,从而实现远程云打印。
目前,市面上有少部分打印机支持远程云打印,但是这部分打印机由于价格高,市场占有率低,无法满足大部分用户的需求。目前还可以通过一些软件实现远程云打印,但是这种远程云打印的方式通常对打印机类型有要求,例如客户下订单后,商家店里需要准备蓝牙热敏打印机才能打印出订单小票,存在打印机兼容性低的问题。
发明内容
基于此,有必要针对上述传统云打印技术无法满足大部分用户的需求且与打印机型号兼容性低的技术问题,提供一种打印方法、装置、计算机设备和存储介质。
为了实现上述目的,一方面,本申请实施例提供了一种打印方法,所述方法包括:
云服务器获取用户终端发送的打印请求,打印请求包括用户标识;
云服务器根据用户标识查找对应的打印信息和打印终端;
云服务器将打印信息发送至打印终端,以使打印终端将打印信息发送至打印机进行打印。
在其中一个实施例中,在云服务器根据用户标识查找对应的打印信息和打印终端之前,还包括:
云服务器接收打印终端发送的WebSocket连接的建立请求,WebSocket连接的建立请求中包括打印终端的打印标识,打印标识和用户标识具有对应关系,以使云服务器根据用户标识查找对应的打印终端。
在本实施例中,云服务器将打印信息发送至打印终端,具体包括:云服务器通过WebSocket将打印信息推送至与用户标识对应的打印终端。
在其中一个实施例中,云服务器通过WebSocket将打印信息推送至与用户标识对应的打印终端,具体包括:
云服务器将打印信息发送至消息队列中;
云服务器通过WebSocket将消息队列中的打印信息推送至与用户标识对应的打印终端;
若云服务器获取到打印信息推送失败通知,在预设条件内重新通过WebSocket将消息队列中的打印信息推送至与用户标识对应的打印终端;
若在预设条件内云服务器推送打印信息失败,则返回打印信息推送失败的通知至用户终端。
在其中一个实施例中,在云服务器将打印信息发送至打印终端之前,还包括:
云服务器组装打印信息,生成待打印数据。
在本实施例中,云服务器将打印信息发送至打印终端,具体包括:云服务器将待打印数据发送至打印终端。
在其中一个实施例中,该方法还包括:
打印终端接收云服务器发送的打印信息,打印信息是云服务器根据用户终端发送的打印请求中包括的用户标识查找到的;
打印终端根据用户标识调用预设的打印机打印所述打印信息。
在其中一个实施例中,在打印终端接收云服务器发送的打印信息之前,还包括:
打印终端发送WebSocket连接的建立请求至云服务器,WebSocket连接的建立请求包括打印终端的打印标识,打印标识和用户标识具有对应关系,以使云服务器根据用户标识查找对应的打印终端。
在本实施例中,打印终端接收云服务器发送的打印信息,具体包括:打印终端通过WebSocket接收云服务器根据用户标识推送的打印信息。
在其中一个实施例中,在打印终端发送WebSocket连接的建立请求至云服务器之后,还包括:
打印终端显示已连接的打印机列表,打印机列表包括打印机标识;
打印终端获取根据已连接的打印机列表选择的打印机;
打印终端建立与选择的打印机对应的打印机标识和打印标识的关联关系。
在本实施例中,打印终端根据用户标识调用预设的打印机打印所述打印信息,具体包括:打印终端根据用户标识调用与打印标识关联的打印机打印所述打印信息。
在其中一个实施例中,在打印终端接收云服务器发送的打印信息之后,还包括:
打印终端对打印信息进行格式转换,生成打印数据。
在本实施例中,打印终端根据用户标识调用预设的打印机打印所述打印信息,具体包括:打印终端根据用户标识调用预设的打印机打印所述打印数据。
在其中一个实施例中,在打印终端根据用户标识调用预设的打印机打印所述打印信息之后,还包括:
打印终端接收打印机发送的打印完成通知;
打印终端将打印完成通知发送至云服务器,以使云服务器向用户终端发送打印完成通知。
另一方面,本申请实施例还提供了一种打印装置,装置包括:
获取模块,用于获取用户终端发送的打印请求,打印请求包括用户标识;
数据查找模块,用于根据用户标识查找对应的打印信息和打印终端;
发送模块,用于将打印信息发送至打印终端,以使打印终端将打印信息发送至打印机进行打印。
另一方面,本申请实施例还提供了一种打印终端,打印终端包括:
接收模块,用于接收云服务器发送的打印信息,打印信息是云服务器根据用户终端发送的打印请求中包括的用户标识查找到的;
打印模块,用于根据用户标识调用预设的打印机打印该打印信息。
又一方面,本申请实施例还提供了一种计算机设备,包括存储器和处理器,存储器存储有计算机程序,处理器执行计算机程序时实现如上方法的步骤。
又一方面,本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现如上方法的步骤。
上述打印方法、装置、计算机设备和存储介质,云服务器获取用户终端发送的打印请求后,根据打印请求中包含的用户标识查找对应的打印信息和打印终端,云服务器将打印信息发送至与用户标识对应的打印终端,打印终端接收到打印信息后,通过调用已连接的任一打印机打印该打印信息。由于与打印终端产生连接的打印机可以是任何型号的打印机,使得用户终端能够通过云服务器将需要打印的数据发送至与远程打印终端连接的任何型号的打印机进行打印,极大的满足了用户的需求且提高了远程云打印中打印机型号的兼容性。
附图说明
图1为一个实施例中打印方法的应用环境图;
图2为一个实施例中打印方法的流程示意图;
图3为一个实施例中打印方法的流程示意图;
图4为一个实施例中打印方法的流程示意图;
图5为一个实施例中打印方法的流程示意图;
图6为一个实施例中打印方法的流程示意图;
图7为一个实施例中打印装置的结构框图;
图8为一个实施例中打印终端的结构框图;
图9为一个实施例中计算机设备的内部结构图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供的打印方法,可以应用于如图1所示的应用环境中。该应用环境包括用户终端102、云服务器104和打印终端106。其中,用户终端102与云服务器104通过网络进行通信。云服务器104与打印终端106通过网络进行通信。云服务器104接收用户终端102发送的打印请求,打印请求中包括用户标识。云服务器104根据用户标识查找打印信息和打印终端106,将打印信息发送至打印终端106。打印终端106接收云服务器104发送的打印信息,通过调用与打印终端106已连接的打印机打印该打印信息。其中,用户终端102和打印终端106可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,云服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在一个实施例中,如图2所示,提供了一种打印方法,以该方法应用于图1中的云服务器104为例进行说明,包括以下步骤:
步骤202,云服务器获取用户终端发送的打印请求,打印请求包括用户标识。
其中,用户标识用于唯一地识别用户终端和对应的打印终端,用户标识可以是邮箱地址、入网账号、ID信息等,在此不做限定。具体地,用户可以通过用户终端触发打印请求。用户终端将打印请求发送至云服务器,打印请求中包括用户标识,使得云服务器可以根据该用户标识查找对应的打印信息以及打印终端。
步骤204,云服务器根据用户标识查找对应的打印信息和打印终端。
其中,打印终端可以是相对用户终端的远程打印端,打印终端和用户终端之间可以通过云服务器发送和接收数据,例如用户终端可以是在北京的终端设备,同时打印终端可以是在上海的终端设备,在此不做限定。打印终端和用户终端可以通过用户标识建立对应关系,在此不做限定。打印信息可以是用户需要打印的数据,例如销售单据、各种格式的文档等,在此不做限定。打印信息可以是通过与用户标识对应的用户终端预先存储在云服务器中的,在此不做限定。具体地,云服务器获取用户终端发送的打印请求后,根据打印请求中包括的用户标识查找对应的打印信息和打印终端。进一步地,打印信息还可以是用户通过用户终端输入的。用户终端将该打印请求发送至云服务器,使得云服务器获取根据该打印请求获取用户标识和对应的打印信息。
步骤206,云服务器将打印信息发送至打印终端,以使打印终端将打印信息发送至打印机进行打印。
其中,打印机可以是与打印终端产生连接的任何型号的打印机,可以是热敏蓝牙打印机、针式打印机、激光打印机等,在此不做限定。具体地,云服务器根据用户标识查找到对应的打印信息和打印终端后,将该打印信息发送至与用户标识对应的打印终端,使得打印终端可以将该打印信息发送至已连接的任一打印机,通过该任一打印机打印该打印信息。
上述打印方法中,云服务器获取用户终端发送的打印请求后,根据打印请求中包含的用户标识查找对应的打印信息和打印终端,云服务器将打印信息发送至与用户标识对应的打印终端,打印终端接收到打印信息后,通过调用已连接的任一打印机打印该打印信息。由于与打印终端产生连接的打印机可以是任何型号的打印机,使得用户终端能够通过云服务器将需要打印的数据发送至与远程打印终端连接的任何型号的打印机进行打印,极大的满足了用户的需求且提高了远程云打印中打印机型号的兼容性。
在一个实施例中,在云服务器根据用户标识查找对应的打印信息和打印终端之前,云服务器还可以接收打印终端发送的WebSocket连接的建立请求,WebSocket连接的建立请求中包括打印终端的打印标识,打印标识和用户标识具有对应关系,以使云服务器根据用户标识查找对应的打印终端。
其中,WebSocket是一种在单个TCP连接上进行全双工通信的协议。打印标识用于区分不同的打印终端,打印标识可以是邮箱地址、入网账号、ID信息等,打印标识和用户标识可以通过邮箱地址、入网账号、ID信息等建立对应关系。
具体地,打印用户可以通过打印终端触发WebSocket连接的建立请求,WebSocket连接的建立请求中包括该打印终端的打印标识。打印终端将包括打印标识的WebSocket连接的建立请求发送至云服务器,使得云服务器与打印终端通过WebSocket保持实时通信。云服务器获取用户终端发送的打印请求后,由于打印标识和用户标识可以通过邮箱地址、入网账号、ID信息等建立对应关系,因此云服务器可以根据打印请求中包含的用户标识查找到对应的打印标识,从而确定与用户标识对应的打印终端,使得云服务器可以将与用户标识对应的打印信息通过WebSocket实时推送至与对应的打印终端。在本实施例中,云服务器将打印信息发送至打印终端,具体包括:云服务器通过WebSocket将打印信息推送至与用户标识对应的打印终端。
举例来说,用户终端可以设置在北京的公司中,打印终端可以设置在上海该公司的仓库中,上海仓库的打印终端向云服务器发送WebSocket连接的建立请求,该请求中包括打印标识。北京公司的用户终端的用户标识和上海仓库的打印终端的打印标识可以通过相同的ID信息建立对应关系,在此不做限定。当北京公司的用户终端需要通过上海仓库的打印终端打印发货单时,可以向云服务器发送打印请求。云服务器通过识别打印信息中的用户标识,查找到与该用户标识对应的打印信息和打印标识,并将查找到的打印信息发送至对应的打印终端。
本实施例中,通过建立用户标识和打印标识的一一对应关系,使得云服务器可以根据用户标识查找与打印标识对应的打印终端,从而可以将打印信息发送至指定的打印终端。云服务器通过WebSocket与打印终端保持实时通信,使得云服务器在查找到打印信息后可以主动并及时的将打印信息推送至指定的打印终端,而无需打印终端访问获取打印信息,提高了远程云打印中信息传输的效率。
在一个实施例中,如图3所示,云服务器通过WebSocket将打印信息推送至与用户标识对应的打印终端,具体包括以下步骤:
步骤302,云服务器将打印信息发送至消息队列中。
其中,消息队列(Message Queue)是在消息的传输过程中保存消息的容器。云服务器根据获取的打印请求中包含的用户标识查找到打印信息后,将该与用户标识对应的打印信息发送至消息队列中。
步骤304,云服务器通过WebSocket将消息队列中的打印信息推送至与用户标识对应的打印终端。
具体地,由于打印标识和用户标识可以通过邮箱地址、入网账号、ID信息等建立对应关 系,因此云服务器可以根据打印请求中包含的用户标识查找到对应的打印标识,从而确定与用户标识对应的打印终端。云服务器查找到与用户标识对应的打印信息后,将与用户标识对应的打印信息发送至消息队列中。云服务器通过识别消息队列中打印信息的用户标识,将消息队列中与用户标识对应的打印信息发送至对应的打印终端。
步骤306,若云服务器获取到打印信息推送失败通知,在预设条件内重新通过WebSocket将消息队列中的打印信息推送至与用户标识对应的打印终端。
其中,预设条件可以是预设周期和预设次数中的任一种。云服务器可以根据TCP连接协议从打印终端获取打印信息推送失败的通知。具体地,云服务器通过识别消息队列中打印信息的用户标识,将消息队列中的与用户标识对应的打印信息发送至对应的打印终端。若云服务器从打印终端获取打印信息推送失败的通知,则可以在预设条件内重新通过WebSocket将与用户标识对应的打印信息推送至对应的打印终端。例如,预设条件可以是每隔1分钟重新通过WebSocket将打印信息推送至打印终端,重新推送打印信息至打印终端的次数总计不超过6次。
步骤308,若在预设条件内云服务器推送打印信息失败,则返回打印信息推送失败的通知至用户终端。
具体地,若在预设条件内,云服务器将打印信息推送至与用户标识对应的打印终端失败,云服务器通过打印终端的打印标识查找对应的用户标识,并返回打印信息推送失败的通知给与用户标识对应的用户终端。继续以上述预设条件为例,若云服务器重新推送打印信息至与用户标识对应的打印终端6次后,仍然获取该打印终端发送的打印信息推送失败通知,那么云服务器会根据打印终端的打印标识确定对应的用户标识,返回一个打印信息推送失败通知给与用户标识对应的用户终端。
本实施例中,通过将打印信息添加到消息队列中,根据消息队列中打印信息的用户标识确定对应的打印终端。当云服务器推送打印信息至对应的打印终端失败时,可以通过消息队列保留该打印消息,并在预设条件内重新推送该打印消息至对应的打印终端,直至在预设条件内推送成功,提高了打印信息传输过程的稳定性。
在一个实施例中,在云服务器将打印信息发送至打印终端之前,云服务器还可以组装打印信息,生成待打印数据。
其中,待打印数据可以是云服务器将要发送给打印终端进行打印的数据,待打印数据的格式可以是便于打印终端解析的数据。具体地,云服务查找到与用户标识对应的打印信息后, 对打印信息进行组装,生成与用户标识对应的待打印数据。例如可以将打印信息组装成Json格式的待打印数据,在此不做限定。在本实施例中,云服务器将打印信息发送至打印终端,具体包括云服务器将待打印数据发送至打印终端。具体地,云服务器将打印信息组装完成后,生成与用户标识对应的待打印数据,并将该待打印数据发送至与用户标识对应的打印终端进行打印。
本实施例中,云服务器通过将与用户标识对应的打印信息组装成待打印数据后,根据用户标识确定对应的打印终端,将待打印数据发送至对应的打印终端,便于后续该打印终端读取并解析该待打印数据。
在一个实施例中,如图4所示,提供了一种打印方法,以该方法应用于图1中的打印终端106为例进行说明,包括以下步骤:
步骤402,打印终端接收云服务器发送的打印信息,打印信息是云服务器根据用户终端发送的打印请求中包括的用户标识查找到的。
其中,用户标识用于唯一地识别用户终端和打印终端,用户标识可以是用户的邮箱地址、入网账号、ID信息等,在此不做限定。打印终端可以是相对用户终端的远程打印端,打印终端和用户终端之间可以通过云服务器发送和接收数据,例如用户终端可以是在北京的终端设备,同时打印终端可以是在上海的终端设备,在此不做限定。打印终端和用户终端可以通过用户标识建立对应关系,在此不做限定。打印信息可以是用户需要打印的数据,例如销售单据、各种格式的文档等,在此不做限定。打印信息可以是通过与用户标识对应的用户终端预先存储在云服务器中的,在此不做限定。具体地,云服务器获取到用户终端发送的打印请求后,根据打印请求中包括的用户标识查找对应的打印信息和打印终端。云服务器将打印信息发送至与用户标识对应的打印终端。打印终端接收该打印信息。进一步地,打印信息还可以是用户通过用户终端输入的。用户终端将该打印请求发送至云服务器,使得云服务器获取根据该打印请求获取用户标识和对应的打印信息。
步骤404,打印终端根据所述用户标识调用预设的打印机打印该打印信息。
其中,预设的打印机可以是与预先设置的与用户标识对应的任一打印机。打印机可以是与打印终端产生连接的任何型号的打印机,可以是热敏蓝牙打印机、针式打印机、激光打印机等,在此不做限定。具体地,打印终端接收到云服务器根据用户标识发送的打印信息后,根据用户标识查找对应的预设的打印机,通过系统组件调用该预设的打印机,将打印信息发送至该预设的打印机进行打印。
本实施例中,打印终端接收到云服务器发送的打印信息后,根据打印信息中包含的用户标识调用预设的打印机进行打印。由于与打印终端产生连接的打印机可以是任何型号的打印机,因此极大的提高了远程云打印中打印机型号的兼容性。
在一个实施例中,在打印终端接收云服务器根据用户标识发送的打印信息之前,打印终端还可以发送WebSocket连接的建立请求至云服务器,WebSocket连接的建立请求包括打印终端的打印标识,打印标识和用户标识具有对应关系,以使云服务器根据用户标识查找对应的打印终端。
其中,WebSocket是一种在单个TCP连接上进行全双工通信的协议。打印标识用于区分不同的打印终端,打印标识可以是邮箱地址、入网账号、ID信息等,打印标识和用户标识可以通过邮箱地址、入网账号、ID信息等建立对应关系,在此不做限定。具体的,打印用户可以通过打印终端触发WebSocket连接的建立请求,WebSocket连接的建立请求中包括该打印终端的打印标识。打印终端将WebSocket连接的建立请求和打印标识发送至云服务器,使得云服务器与打印终端通过WebSocket保持实时通信。云服务器获取用户终端发送的打印请求后,根据打印请求中包含的用户标识查找到对应的打印标识,由于打印标识和用户标识可以通过邮箱地址、入网账号、ID信息等建立对应关系,因此云服务器可以根据打印请求中包含的用户标识查找到对应的打印标识,从而确定与用户标识对应的打印终端,使得云服务器可以将与用户标识对应的打印信息通过WebSocket实时推送至对应的打印终端。在本实施例中,打印终端接收云服务器发送的打印信息,具体包括:打印终端通过WebSocket接收云服务器根据用户标识推送的打印信息。
举例来说,用户终端可以设置在北京的公司中,打印终端可以设置在上海该公司的仓库中,上海仓库的打印终端向云服务器发送WebSocket连接的建立请求,该请求中包括打印标识。北京公司的用户终端的用户标识和上海仓库的打印终端的打印标识可以通过相同的ID信息建立对应关系,在此不做限定。当北京公司的用户终端需要通过上海仓库的打印终端打印发货单时,可以向云服务器发送打印请求。云服务器通过识别打印信息中的用户标识,查找到与该用户标识对应的打印信息和打印标识,并将查找到的打印信息发送至对应的打印终端。
本实施例中,打印终端发送WebSocket连接的建立请求至云服务器,WebSocket连接的建立请求包括打印标识,通过建立用户标识和打印标识的一一对应关系,使得云服务器可以根据用户标识查找与打印标识对应的打印终端,从而可以通过指定的打印终端接收打印信息。打印终端通过WebSocket与云服务器保持实时通信,使得云服务器在查找到打印信息后可以 主动并及时的将打印信息推送至指定的打印终端,而无需打印终端访问获取打印信息,提高了远程云打印的效率。
在一个实施例中,如图5所示,在打印终端发送WebSocket连接的建立请求至云服务器之后,还包括以下步骤:
步骤502,打印终端显示已连接的打印机列表,打印机列表包括打印机标识。
其中,打印机标识用于区分不同的打印机,打印机标识可以是打印机名称、打印机型号等,在此不做限定。具体地,打印终端与云服务器通过WebSocket建立通信连接后,打印终端可以向打印用户显示已连接的打印机列表,使得打印用户可以根据该打印机列表选择适用的打印机。
步骤504,获取根据已连接的打印机列表选择的打印机。
步骤506,建立与选择的打印机对应的打印机标识和打印标识的关联关系。
具体地,打印用户可以通过打印终端触发选择打印机的请求。打印终端获取打印用户选择的打印机的信息,根据该选择的打印机的信息确定选择的打印机的打印机标识,并建立打印机标识与打印标识的关联关系。
在本实施例中,打印终端根据用户标识调用预设的打印机打印该打印信息,具体包括:
步骤508,打印终端根据用户标识调用与打印标识关联的打印机打印该打印信息。
其中,预设的打印机可以是选择的打印机。具体地,由于打印标识和用户标识可以通过邮箱地址、入网账号、ID信息等建立对应关系,打印终端从云服务器接收到与用户标识对应的打印信息后,可以根据用户标识识别已选择的与打印标识关联的打印机,将该打印信息发送至与打印标识关联的打印机进行打印。
本实施例中,通过向打印用户显示已连接的打印机列表,使得打印用户可以通过打印机列表预览已连接的打印机,选择想要使用的打印机,并建立打印终端的打印标识和已选择的打印机标识的关联关系。当打印终端接收到与用户标识对应的打印信息后,通过用户标识确定已选择的与打印标识关联的打印机,使得该打印信息可以通过已选择的打印机打印出来,从而便于用户将打印信息通过指定的打印机型号打印出来,操作简单快捷且满足了用户的需求。
在一个实施例中,在打印终端接收云服务器发送的打印信息之后,打印终端还可以对打印信息进行格式转换,生成打印数据。
具体地,打印终端接收到云服务器根据用户标识发送的打印信息后,可以对打印信息进 行格式转换,生成与用户标识对应的打印数据。例如,可以转换成pdf格式,在此不做限定。在本实施例中,打印终端根据用户标识调用预设的打印机该打印信息,具体包括:打印终端根据用户标识调用预设的打印机打印该打印数据。具体的,预设的打印机可以是与预先设置的与用户标识对应的任一打印机。打印终端根据用户标识查找对应的预设的打印机,通过系统组件调用该预设的打印机,将打印数据发送至该预设的打印机进行打印。
在一个实施例中,在打印终端根据用户标识调用预设的打印机打印所述打印信息之后,打印终端还可以接收打印机发送的打印完成通知,并将打印完成通知发送至云服务器,以使云服务器向用户终端发送打印完成通知。
具体地,打印机打印完成后,可以向打印终端返回打印完成的通知。打印终端将该打印完成通知发送至云服务器。云服务通过打印完成通知识别与打印终端对应的用户标识,根据用户标识查找对应的用户终端,并将该打印完成通知发送至用户终端。
本实施例中,打印终端通过接收打印机发送的打印完成通知,并将该打印完成通知通过云服务器发送给对应的用户终端,使得用户终端能够获悉打印成功或打印失败的情况,便于用户根据打印结果进行下一步操作。
在一个实施例中,通过一个具体的实施例进一步说明上述打印方法,如图6所示,包括如下步骤:
步骤601,云服务器获取用户终端发送的打印请求,打印请求包括用户标识。
步骤602,云服务器接收打印终端发送的WebSocket连接的建立请求。WebSocket连接的建立请求中包括打印终端的打印标识,打印标识和用户标识具有对应关系,以使云服务器根据用户标识查找对应的打印终端。
步骤603,打印终端显示已连接的打印机列表,打印机列表包括打印机标识。
步骤604,打印终端获取根据已连接的打印机列表选择的打印机。
步骤605,打印终端建立与选择的打印机对应的打印机标识和打印标识的关联关系。
步骤606,云服务器根据用户标识查找对应的打印信息和打印终端。
步骤607,云服务器组装打印信息,生成待打印数据。
步骤608,云服务器将待打印数据发送至消息队列中。
步骤609,云服务器通过WebSocket将消息队列中的待打印数据推送至打印终端。
步骤610,打印终端对待打印数据进行格式转换,生成打印数据。
步骤611,打印终端根据用户标识调用与打印标识关联的打印机。
步骤612,打印终端将打印数据发送至打印机。
步骤613,打印机打印接收到的打印数据。
步骤614,打印终端接收打印机发送的打印完成通知。
步骤615,打印终端将打印完成通知发送至云服务器。
步骤616,云服务器向用户终端发送打印完成通知。
应该理解的是,虽然图1-6的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图1-6中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
在一个实施例中,如图7所示,提供了一种打印装置700,包括:获取模块701、数据查找模块702模块和发送模块703,其中:
获取模块701,用于获取用户终端发送的打印请求,打印请求包括用户标识。
数据查找模块702,用于根据用户标识查找对应的打印信息和打印终端。
发送模块703,用于将打印信息发送至打印终端,以使打印终端将打印信息发送至打印机进行打印。
在一个实施例中,还包括通信连接模块,用于接收打印终端发送的WebSocket连接的建立请求,WebSocket连接的建立请求中包括打印终端的打印标识,打印标识和用户标识具有对应关系,以使云服务器根据用户标识查找对应的打印终端。
在一个实施例中,发送模块703还用于将打印信息发送至消息队列中,通过WebSocket将消息队列中的打印信息推送至与用户标识对应的打印终端。
在一个实施例中,还包括数据组装模块,用于组装打印信息,生成待打印数据。发送模块703还用于将待打印数据发送至打印终端。
关于打印装置的具体限定可以参见上文中对于打印方法的限定,在此不再赘述。上述打印装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,如图8所示,提供了一种打印终端800,包括:接收模块801和打印 模块802,其中:
接收模块801,用于接收云服务器发送的打印信息,打印信息是云服务器根据用户终端发送的打印请求中包括的用户标识查找到的。
打印模块802,用于根据用户标识调用预设的打印机打印该打印信息。
在一个实施例中,还包括通信连接请求模块,用于发送WebSocket连接的建立请求至云服务器,WebSocket连接的建立请求包括打印终端的打印标识,打印标识和用户标识具有对应关系,以使云服务器根据用户标识查找对应的打印终端。
在一个实施例中,还包括显示模块,用于显示已连接的打印机列表,打印机列表包括打印机标识;还包括第二获取模块,用于获取根据已连接的打印机列表选择的打印机。
在一个实施例中,还包括格式转换模块,用于对打印信息进行格式转换,生成打印数据。
在一个实施例中,还包括第二接收模块,用于接收打印机发送的打印完成通知;第二发送模块,用于将打印完成通知发送至云服务器,以使云服务器向用户终端发送打印完成通知。
关于打印终端的具体限定可以参见上文中对于打印方法的限定,在此不再赘述。上述打印终端中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图9所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种打印方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。
本领域技术人员可以理解,图9中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算 机程序,该处理器执行计算机程序时实现以下步骤:
云服务器获取用户终端发送的打印请求,打印请求包括用户标识;云服务器根据用户标识查找对应的打印信息和打印终端;云服务器将打印信息发送至打印终端,以使打印终端将打印信息发送至打印机进行打印。
在一个实施例中,在云服务器根据用户标识查找对应的打印信息和打印终端之前,该处理器执行计算机程序时实现以下步骤:
云服务器接收打印终端发送的WebSocket连接的建立请求,WebSocket连接的建立请求中包括打印终端的打印标识,打印标识和用户标识具有对应关系,以使云服务器根据用户标识查找对应的打印终端。
在本实施例中,云服务器将打印信息发送至打印终端,具体包括:云服务器通过WebSocket将打印信息推送至与用户标识对应的打印终端。
在一个实施例中,该处理器执行计算机程序时实现以下步骤:
云服务器将打印信息发送至消息队列中;云服务器通过WebSocket将消息队列中的打印信息推送至与用户标识对应的打印终端;若云服务器获取到打印信息推送失败通知,在预设条件内重新通过WebSocket将消息队列中的打印信息推送至与用户标识对应的打印终端;若在预设条件内云服务器推送打印信息失败,则返回打印信息推送失败的通知至用户终端。
在一个实施例中,在云服务器将打印信息发送至打印终端之前,该处理器执行计算机程序时实现以下步骤:
云服务器组装打印信息,生成待打印数据。
在一个实施例中,该处理器执行计算机程序时实现以下步骤:
打印终端接收云服务器发送的打印信息,打印信息是云服务器根据用户终端发送的打印请求中包括的用户标识查找到的;打印终端根据用户标识调用预设的打印机打印所述打印信息。
在一个实施例中,在打印终端接收云服务器发送的打印信息之前,该处理器执行计算机程序时实现以下步骤:
打印终端发送WebSocket连接的建立请求至云服务器,WebSocket连接的建立请求包括打印终端的打印标识,打印标识和用户标识具有对应关系,以使云服务器根据用户标识查找对应的打印终端。
在一个实施例中,在打印终端发送WebSocket连接的建立请求至云服务器之后,该处理 器执行计算机程序时实现以下步骤:
打印终端显示已连接的打印机列表,打印机列表包括打印机标识;打印终端获取根据已连接的打印机列表选择的打印机;打印终端建立与选择的打印机对应的打印机标识和打印标识的关联关系。
在一个实施例中,在打印终端接收云服务器发送的打印信息之后,该处理器执行计算机程序时实现以下步骤:
打印终端对打印信息进行格式转换,生成打印数据。
在一个实施例中,在打印终端根据用户标识调用预设的打印机打印所述打印信息之后,该处理器执行计算机程序时实现以下步骤:
打印终端接收打印机发送的打印完成通知;打印终端将打印完成通知发送至云服务器,以使云服务器向用户终端发送打印完成通知。
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:
云服务器获取用户终端发送的打印请求,打印请求包括用户标识;云服务器根据用户标识查找对应的打印信息和打印终端;云服务器将打印信息发送至打印终端,以使打印终端将打印信息发送至打印机进行打印。
在一个实施例中,在云服务器根据用户标识查找对应的打印信息和打印终端之前,计算机程序被处理器执行时实现以下步骤:
云服务器接收打印终端发送的WebSocket连接的建立请求,WebSocket连接的建立请求中包括打印终端的打印标识,打印标识和用户标识具有对应关系,以使云服务器根据用户标识查找对应的打印终端。
在一个实施例中,计算机程序被处理器执行时实现以下步骤:云服务器将打印信息发送至消息队列中;云服务器通过WebSocket将消息队列中的打印信息推送至与用户标识对应的打印终端;若云服务器获取到打印信息推送失败通知,在预设条件内重新通过WebSocket将消息队列中的打印信息推送至与用户标识对应的打印终端;若在预设条件内云服务器推送打印信息失败,则返回打印信息推送失败的通知至用户终端。
在一个实施例中,在云服务器将打印信息发送至打印终端之前,计算机程序被处理器执行时实现以下步骤:
云服务器组装打印信息,生成待打印数据。
在一个实施例中,计算机程序被处理器执行时实现以下步骤:
打印终端接收云服务器发送的打印信息,打印信息是云服务器根据用户终端发送的打印请求中包括的用户标识查找到的;打印终端根据用户标识调用预设的打印机打印所述打印信息。
在一个实施例中,在打印终端接收云服务器发送的打印信息之前,计算机程序被处理器执行时实现以下步骤:
打印终端发送WebSocket连接的建立请求至云服务器,WebSocket连接的建立请求包括打印终端的打印标识,打印标识和用户标识具有对应关系,以使云服务器根据用户标识查找对应的打印终端。
在一个实施例中,在打印终端发送WebSocket连接的建立请求至云服务器之后,计算机程序被处理器执行时实现以下步骤:
打印终端显示已连接的打印机列表,打印机列表包括打印机标识;打印终端获取根据已连接的打印机列表选择的打印机;打印终端建立与选择的打印机对应的打印机标识和打印标识的关联关系。
在一个实施例中,在打印终端接收云服务器发送的打印信息之后,计算机程序被处理器执行时实现以下步骤:
打印终端对打印信息进行格式转换,生成打印数据。
在一个实施例中,在打印终端根据用户标识调用预设的打印机打印所述打印信息之后,计算机程序被处理器执行时实现以下步骤:
打印终端接收打印机发送的打印完成通知;打印终端将打印完成通知发送至云服务器,以使云服务器向用户终端发送打印完成通知。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增 强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (13)

  1. 一种打印方法,其特征在于,所述方法包括:
    云服务器获取用户终端发送的打印请求,所述打印请求包括用户标识;
    所述云服务器根据所述用户标识查找对应的打印信息和打印终端;
    所述云服务器将所述打印信息发送至所述打印终端,以使所述打印终端将所述打印信息发送至打印机进行打印。
  2. 根据权利要求1所述的方法,其特征在于,在所述云服务器根据所述用户标识查找对应的打印信息和打印终端之前,还包括:
    所述云服务器接收所述打印终端发送的WebSocket连接的建立请求,所述WebSocket连接的建立请求中包括所述打印终端的打印标识,所述打印标识和所述用户标识具有对应关系,以使所述云服务器根据所述用户标识查找对应的打印终端;
    所述云服务器将所述打印信息发送至所述打印终端,包括:
    所述云服务器通过WebSocket将所述打印信息推送至与所述用户标识对应的打印终端。
  3. 根据权利要求2所述的方法,其特征在于,所述云服务器通过WebSocket将所述打印信息推送至所述与所述用户标识对应的打印终端,包括:
    所述云服务器将所述打印信息发送至消息队列中;
    所述云服务器通过WebSocket将所述消息队列中的打印信息推送至与所述用户标识对应的所述打印终端;
    若所述云服务器获取到打印信息推送失败通知,在预设条件内重新通过WebSocket将所述消息队列中的打印信息推送至与所述用户标识对应的打印终端;
    若在预设条件内所述云服务器推送所述打印信息失败,则返回打印信息推送失败的通知至所述用户终端。
  4. 根据权利要求1所述的方法,其特征在于,在所述云服务器将所述打印信息发送至所述打印终端之前,还包括:
    所述云服务器组装所述打印信息,生成待打印数据;
    所述云服务器将所述打印信息发送至所述打印终端,包括:
    所述云服务器将所述待打印数据发送至所述打印终端。
  5. 一种打印方法,其特征在于,所述方法包括:
    打印终端接收云服务器发送的打印信息,所述打印信息是所述云服务器根据用户终端发送的打印请求中包括的用户标识查找到的;
    所述打印终端根据所述用户标识调用预设的打印机打印所述打印信息。
  6. 根据权利要求5所述的方法,其特征在于,在所述打印终端接收云服务器发送的打印信息之前,还包括:
    所述打印终端发送WebSocket连接的建立请求至所述云服务器,所述WebSocket连接的建立请求包括所述打印终端的打印标识,所述打印标识和所述用户标识具有对应关系,以使所述云服务器根据所述用户标识查找对应的打印终端;
    所述打印终端接收云服务器发送的打印信息,包括:
    所述打印终端通过WebSocket接收云服务器根据所述用户标识推送的打印信息。
  7. 根据权利要求6所述的方法,其特征在于,在所述打印终端发送WebSocket连接的建立请求至所述云服务器之后,还包括:
    所述打印终端显示已连接的打印机列表,所述打印机列表包括打印机标识;
    所述打印终端获取根据所述已连接的打印机列表选择的打印机;
    所述打印终端建立与所述选择的打印机对应的打印机标识和所述打印标识的关联关系;
    所述打印终端根据所述用户标识调用预设的打印机打印所述打印信息,包括:
    所述打印终端根据所述用户标识调用与所述打印标识关联的打印机打印所述打印信息。
  8. 根据权利要求5所述的方法,其特征在于,在所述打印终端接收云服务器发送的打印信息之后,还包括:
    所述打印终端对所述打印信息进行格式转换,生成打印数据;
    所述打印终端根据所述用户标识调用预设的打印机打印所述打印信息,包括:
    所述打印终端根据所述用户标识调用预设的打印机打印所述打印数据。
  9. 根据权利要求5所述的方法,其特征在于,在所述打印终端根据所述用户标识调用预设的打印机打印所述打印信息之后,还包括:
    所述打印终端接收所述打印机发送的打印完成通知;
    所述打印终端将所述打印完成通知发送至所述云服务器,以使所述云服务器向所述用户终端发送所述打印完成通知。
  10. 一种打印装置,其特征在于,所述打印装置设置于云服务器端,所述打印装置包括:
    获取模块,用于获取用户终端发送的打印请求,所述打印请求包括用户标识;
    数据查找模块,用于根据所述用户标识查找对应的打印信息和打印终端;
    发送模块,用于将所述打印信息发送至所述打印终端,以使所述打印终端将所述打印信息发送至打印机进行打印。
  11. 一种打印终端,其特征在于,所述打印终端包括:
    接收模块,用于接收云服务器发送的打印信息,所述打印信息是所述云服务器根据用户终端发送的打印请求中包括的用户标识查找到的;
    打印模块,用于根据所述用户标识调用预设的打印机打印所述打印信息。
  12. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至9中任一项所述方法的步骤。
  13. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至9中任一项所述方法的步骤。
PCT/CN2019/123882 2019-09-19 2019-12-09 打印方法、装置、计算机设备和存储介质 WO2021051664A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910886034.8A CN110750222A (zh) 2019-09-19 2019-09-19 打印方法、装置、计算机设备和存储介质
CN201910886034.8 2019-09-19

Publications (1)

Publication Number Publication Date
WO2021051664A1 true WO2021051664A1 (zh) 2021-03-25

Family

ID=69276736

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/123882 WO2021051664A1 (zh) 2019-09-19 2019-12-09 打印方法、装置、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN110750222A (zh)
WO (1) WO2021051664A1 (zh)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111414139A (zh) * 2020-02-14 2020-07-14 金蝶蝶金云计算有限公司 在线远程打印方法、装置、计算机设备和存储介质
CN111526191B (zh) * 2020-04-15 2023-04-25 珠海奔图电子有限公司 图像形成装置及其与终端建立连接的方法、服务器
CN111638858A (zh) * 2020-05-25 2020-09-08 上海中通吉网络技术有限公司 多功能打印方法、装置、多功能打印机和存储介质
CN111897501A (zh) * 2020-08-05 2020-11-06 南昌梦想软件有限公司 一种数据云打印的方法、装置、存储介质和系统
CN112965673A (zh) * 2021-03-24 2021-06-15 北京有竹居网络技术有限公司 内容的打印方法、装置、设备及存储介质
CN113568590A (zh) * 2021-08-06 2021-10-29 上海中通吉网络技术有限公司 基于WiFi网络连接的远程批量打印方法
CN113485656B (zh) * 2021-09-08 2021-11-23 北京辰光融信技术有限公司 一种云打印方法、系统及储存介质
CN113535102B (zh) * 2021-09-16 2021-12-14 飞天诚信科技股份有限公司 智能物联平台系统及其工作方法、计算机可读存储介质
CN116541107A (zh) * 2023-06-26 2023-08-04 平安银行股份有限公司 一种外设调用方法、装置、终端及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070002365A1 (en) * 2005-06-29 2007-01-04 Xerox Corporation Tools for distributed printing of documents
CN107665102A (zh) * 2017-09-08 2018-02-06 金蝶软件(中国)有限公司 移动打印数据的方法、装置、存储介质和系统
CN109189351A (zh) * 2018-08-21 2019-01-11 平安科技(深圳)有限公司 一种云打印方法、存储介质和服务器
CN109254739A (zh) * 2018-08-23 2019-01-22 北京京东尚科信息技术有限公司 文件打印方法、装置和系统
CN209182810U (zh) * 2019-01-21 2019-07-30 北京雷石天地电子技术有限公司 一种使用移动网络通过云端控制打印设备的系统

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014171211A (ja) * 2013-02-06 2014-09-18 Ricoh Co Ltd 情報処理システム
CN104765579B (zh) * 2014-01-08 2019-01-18 精工爱普生株式会社 Pos控制系统、pos控制系统的控制方法、以及打印装置
CN104035734A (zh) * 2014-05-21 2014-09-10 杭州鹏远网络科技有限公司 一种用户端远程多选择打印终端的自动打印系统及方法
CN107203358B (zh) * 2017-05-24 2021-02-19 千寻位置网络有限公司 远程打印装置及实现方法
CN107450869B (zh) * 2017-08-21 2020-07-31 国信电子票据平台信息服务有限公司 一种pdf电子发票版式文件的在线打印系统及方法
CN108021342A (zh) * 2017-12-27 2018-05-11 金蝶软件(中国)有限公司 一种基于云端服务器的数据打印方法、系统及相关装置
CN109249712A (zh) * 2018-11-23 2019-01-22 成都易联云网络科技有限公司 一种打印机及其打印机系统和打印机控制方法
CN109582256B (zh) * 2018-11-29 2022-04-26 珠海奔图电子有限公司 打印方法、装置及系统
CN109857349A (zh) * 2019-01-21 2019-06-07 北京雷石天地电子技术有限公司 一种使用移动网络通过云端控制打印设备的系统及方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070002365A1 (en) * 2005-06-29 2007-01-04 Xerox Corporation Tools for distributed printing of documents
CN107665102A (zh) * 2017-09-08 2018-02-06 金蝶软件(中国)有限公司 移动打印数据的方法、装置、存储介质和系统
CN109189351A (zh) * 2018-08-21 2019-01-11 平安科技(深圳)有限公司 一种云打印方法、存储介质和服务器
CN109254739A (zh) * 2018-08-23 2019-01-22 北京京东尚科信息技术有限公司 文件打印方法、装置和系统
CN209182810U (zh) * 2019-01-21 2019-07-30 北京雷石天地电子技术有限公司 一种使用移动网络通过云端控制打印设备的系统

Also Published As

Publication number Publication date
CN110750222A (zh) 2020-02-04

Similar Documents

Publication Publication Date Title
WO2021051664A1 (zh) 打印方法、装置、计算机设备和存储介质
WO2020140663A1 (zh) 微服务灰度发布方法、装置、计算机设备和存储介质
US9189177B2 (en) Content outputting method, content server and mediation server
US20160380933A1 (en) System and method for providing crowd-based technical support to smartphone users
WO2021031688A1 (zh) 业务参数采集方法、装置、计算机设备和存储介质
US9311039B2 (en) Cloud printing system and method using image forming apparatus
CN111176590B (zh) 基于适配的打印方法、设备、装置及计算机可读存储介质
US10873640B2 (en) Information exchange method and server
US20150324160A1 (en) Network Printing Device, Server, System and Method
CN107391277B (zh) 信息处理方法和装置
US20140229348A1 (en) Electronic invoice management and printing
CN106028311B (zh) 一种终端注册方法及装置
JP2014235697A (ja) 情報処理システム、情報処理方法、及びプログラム
CN103197905A (zh) 设备控制装置、设备控制系统、设备控制方法和记录介质
US20210304150A1 (en) Rich communication services security recruiting system
CN115297105B (zh) 文件传输方法、装置、计算机设备及存储介质
CN101227321A (zh) 一种投诉方法、系统与装置
WO2018214795A1 (zh) 通话提示方法及装置、系统
CN110933070A (zh) 一种用户识别方法、系统、设备及计算机可读存储介质
KR20140013892A (ko) 복수의 정보 시스템에서의 출력 비교 방법
CN116070850A (zh) 客户关系信息处理方法、装置、设备和存储介质
US20190007520A1 (en) Electronic device and operation method thereof and server host device
WO2019214112A1 (zh) 消息推送方法及装置、存储介质、电子设备
CN112688850B (zh) 即时通讯中作用对象的筛选方法和装置
JP2021153316A (ja) 携帯端末、システム、アクセス方法、およびプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19945776

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19945776

Country of ref document: EP

Kind code of ref document: A1