Receipt printing setting method and apparatus, and method and apparatus for printing receipt
By uploading multiple receipt images and selecting print colors in the receipt template settings interface of the cloud printer, a print command set is generated and sent, solving the problem that the cloud printer can only print black and white text, enabling the printing of color receipts and improving printing efficiency.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- RAJAX NETWORK &TECHNOLOGY (SHANGHAI) CO LTD
- Filing Date
- 2025-09-03
- Publication Date
- 2026-07-02
AI Technical Summary
Cloud printers can only print text and only in black and white, which limits their applications.
By uploading multiple receipt images and selecting print colors through the receipt template settings interface, a receipt template containing image identification data is generated and sent to the cloud to instruct the printing device to print color receipts.
The cloud printer can now print color receipts with multiple images and text, improving printing efficiency.
Smart Images

Figure CN2025118811_02072026_PF_FP_ABST
Abstract
Description
Receipt printing setup method, receipt printing method, device
[0001] This application claims priority to Chinese Patent Application No. 202411963309.0, filed on December 27, 2024, entitled "Method for Setting Up a Receipt, Method for Printing a Receipt, and Apparatus", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of computer technology, specifically to a method for setting up a receipt, a method for printing a receipt, a device for setting up a receipt, a device for printing a receipt, an electronic device, and a computer storage medium. Background Technology
[0003] With the development of cloud printing technology, printing can be performed using various types of cloud printers. When printing an order receipt, the cloud printer needs to parse the instruction set corresponding to the content of the order receipt sent by the server into the cloud printer's memory, and then execute the printing operation.
[0004] However, currently, when using cloud printers to print order receipts, they can only print text. Furthermore, for color receipt printing, traditional Bluetooth or USB printing is typically the primary method, while cloud printers can only print black and white text, severely limiting their application.
[0005] Therefore, how to solve the problem that cloud printers can only print text and can only print black and white text is an urgent issue that needs to be addressed. Summary of the Invention
[0006] This application provides a method for setting up a printed receipt, which solves the problem that cloud printers can only print text and can only print black and white text, thereby improving the efficiency of order printing. This application also provides a receipt printing method, a receipt printing setup device, a receipt printing device, an electronic device, and a computer storage medium.
[0007] This application provides a method for setting up printed receipts, applied to a front-end for setting up a printed receipt template. The method includes: displaying a receipt image editing area in a printed receipt template setting interface for merchants to set receipt images; obtaining multiple receipt images set by the merchant and display position information corresponding to each receipt image through multiple receipt image editing areas; sending the multiple receipt images to the cloud; obtaining image identification data corresponding to the multiple receipt images; generating a printed receipt template containing image identification data based on the display position information; and sending the printed receipt template to the cloud, so that the cloud obtains the multiple receipt images according to the image identification data, and instructs the printing equipment set in the store operated by the merchant to print receipts displaying the multiple receipt images based on the printed receipt template.
[0008] Optionally, the display location information corresponding to each receipt image is obtained in the following way:
[0009] In response to detecting a trigger operation on the settings page regarding the receipt display position, a receipt image editing area for editing the display position is displayed, wherein a display position includes at least one receipt image;
[0010] In response to detecting an image editing operation on the editing area of the receipt image, the receipt display location information where the image editing operation is located is obtained, and the display location information includes the display location and the editing area location.
[0011] Optionally, the cloud includes: a printing device server and an image storage terminal;
[0012] Sending the multiple receipt images to the cloud includes: sending the multiple receipt images to the image storage terminal;
[0013] Sending the printed receipt template to the cloud includes sending the printed receipt template to the printing device server.
[0014] Optionally, the image identification data includes a hash value;
[0015] The method further includes: obtaining a hash value corresponding to the plurality of receipt images returned by the image storage terminal, wherein the hash value corresponding to the plurality of receipt images is used to identify the plurality of receipt images in the image storage terminal;
[0016] The step of generating a printable receipt template containing image identifier data based on the display location information includes: generating a printable receipt template containing a hash value based on the display location information.
[0017] Optionally, obtaining the plurality of receipt images based on the image identification data includes: obtaining the plurality of receipt images from the image storage terminal based on the hash values of the plurality of receipt images in the print receipt template set by the merchant.
[0018] Optionally, obtaining the plurality of receipt images from the image storage terminal based on the hash values of the plurality of receipt images in the print receipt template set by the merchant includes: sending an image acquisition request message to the image storage terminal to request the acquisition of the image corresponding to the plurality of receipt images, the image acquisition request message including the hash values corresponding to the plurality of receipt images; and obtaining the plurality of receipt images returned by the image storage terminal.
[0019] Optionally, it also includes: obtaining the link addresses of the plurality of receipt images returned by the image storage terminal according to the image acquisition request message;
[0020] Obtaining the plurality of receipt images returned by the image storage terminal includes: downloading the plurality of receipt images from the image storage terminal according to the link addresses of the plurality of receipt images.
[0021] Optionally, displaying a receipt image editing area in the receipt template settings interface for merchants to set receipt images includes: displaying multiple receipt image upload entry components in the receipt template settings interface for merchants to upload multiple receipt images.
[0022] Optionally, the component that displays multiple receipt image upload entrances for merchants to upload multiple receipt images in the receipt template settings interface includes: displaying a merchant logo image upload entrance component for merchants to upload merchant logo images in the merchant logo settings area, and displaying a merchant operation image upload entrance component for merchants to upload merchant operation images in the merchant operation settings area.
[0023] Optionally, it also includes: detecting whether the color types of the multiple receipt images uploaded by the merchant are consistent with the receipt printing color types selected by the merchant; if not, converting the colors of the multiple receipt images uploaded by the merchant according to the receipt printing color selected by the merchant to obtain multiple receipt images after color conversion; and displaying the multiple receipt images after color conversion.
[0024] Sending the multiple receipt images to the image storage terminal includes: sending the multiple receipt images after color conversion to the image storage terminal.
[0025] Optionally, it also includes: processing the colors of multiple receipt images uploaded by the merchant based on the image color processing strategy to obtain multiple receipt images with color processing that meet the preset color requirements;
[0026] Based on image size processing strategies, the sizes of multiple receipt images uploaded by merchants are adjusted to obtain multiple receipt images with adjusted sizes within the preset image size range.
[0027] Optionally, it also includes: obtaining the instance data to be printed; sending a print command to the printing device server, the print command including the instance data to be printed;
[0028] The step of instructing a printing device located in the merchant's store to print a receipt displaying the multiple receipt images, based on the printed receipt template and the multiple receipt images, includes: in response to the printing instruction, generating a printing instruction set based on the multiple receipt images, the printable instance data provided by the front end, and the printed receipt template; and instructing a printing device located in the merchant's store to print a receipt displaying the multiple receipt images based on the printing instruction set.
[0029] Optionally, obtaining the instance data to be printed includes: obtaining order data sent by the order server; and obtaining the instance data to be printed based on the order data.
[0030] Optionally, it also includes: if the receipt image is a QR code image containing a QR code, then identifying the QR code in the QR code image to obtain string information corresponding to the QR code; sending the string information to the cloud so as to generate the QR code image based on the string information when the QR code image is needed.
[0031] This application provides a receipt printing method applied to a cloud-based printing device server. The method includes: obtaining a receipt template set by a merchant, the receipt template including image identification data corresponding to multiple receipt images and display position information corresponding to each receipt image; obtaining multiple receipt images corresponding to the receipt template from a cloud-based image storage terminal based on the image identification data of the multiple receipt images in the receipt template, the multiple receipt images being provided to the image storage terminal by the front end that sets the receipt template; and printing a receipt displaying the multiple receipt images on a printing device set up in the merchant's store according to the instructions of the receipt template.
[0032] Optionally, the step of printing a receipt displaying the multiple receipt images according to the receipt template instructions set in the store operated by the merchant includes: generating a printing instruction set based on the multiple receipt images, the printable instance data provided by the front end, and the receipt template, and sending the printing instruction set to the printing device set in the store operated by the merchant, so that the printing device prints a receipt displaying the multiple receipt images according to the printing instruction set.
[0033] Optionally, it also includes: responding to the receipt printing instruction sent by the front end, obtaining the merchant identification information of the merchant to which the front end belongs; and based on the merchant identification information, obtaining a printed receipt template and multiple receipt images corresponding to the merchant identification information.
[0034] Optionally, it also includes: after obtaining multiple receipt images corresponding to the printed receipt template from the image storage terminal, sending the multiple receipt images to the printing device; obtaining an image index sent by the printing device to identify the multiple receipt images in the printing device, as the printing device image index;
[0035] The step of generating a print instruction set based on the multiple receipt images, the printable instance data provided by the front end, and the printable receipt template includes: generating a print instruction set based on the print device image index, the printable instance data provided by the front end, and the printable receipt template.
[0036] Optionally, it further includes: after obtaining multiple receipt images corresponding to the printed receipt template from the image storage terminal, setting an image index for identifying the multiple receipt images in the printing device, as the printing device image index; sending the multiple receipt images and the printing device image index to the printing device; the step of generating a printing instruction set based on the multiple receipt images, the printable instance data provided by the front end, and the printed receipt template includes: generating a printing instruction set based on the printing device image index, the printable instance data provided by the front end, and the printed receipt template.
[0037] Optionally, it also includes: after obtaining multiple receipt images corresponding to the printed receipt template from the image storage terminal, generating an image printing instruction set based on the multiple receipt images; sending the image printing instruction set to the printing device; and obtaining the image printing instruction set index set for the image printing instruction set by the printing device.
[0038] The step of generating a print instruction set based on the multiple receipt images, the printable instance data provided by the front end, and the printable receipt template includes: generating...
[0039] The document printing instruction set establishes a correspondence between the image printing instruction set index and the document printing instruction set;
[0040] Sending the print instruction set to the printing device located in the store operated by the merchant includes: sending the document print instruction set to the printing device;
[0041] The method further includes sending the correspondence between the image printing instruction set index and the document printing instruction set to the printing device.
[0042] Optionally, it also includes: after obtaining multiple receipt images corresponding to the printed receipt template from the image storage terminal, generating an image printing instruction set based on the multiple receipt images; setting an image printing instruction set index for the image printing instruction set; and sending the image printing instruction set and the image printing instruction set index to the printing device.
[0043] The step of generating a printing instruction set based on the multiple receipt images, the printable instance data provided by the front end, and the printable receipt template includes: generating a text printing instruction set based on the printable instance data provided by the front end and the printable receipt template, and establishing a correspondence between the image printing instruction set index and the text printing instruction set;
[0044] Sending the print instruction set to the printing device located in the store operated by the merchant includes: sending the document print instruction set to the printing device;
[0045] The method further includes sending the correspondence between the image printing instruction set index and the document printing instruction set to the printing device.
[0046] Optionally, it also includes: if a preview print instruction is received from the front end, generating an image print instruction set based on the multiple receipt images, generating a receipt text print instruction set based on the print receipt template; obtaining a print instruction set based on the image print instruction set and the receipt text print instruction set; and sending the print instruction set to the printing device.
[0047] This application provides a receipt printing method, applied to printing equipment installed in a merchant's shop. The method includes: obtaining a printing instruction set sent by a cloud-based printing equipment server. The printing instruction set is generated based on multiple receipt images, printable instance data provided by a front-end, and a printable receipt template. The printable receipt template includes image identification data corresponding to multiple receipt images and display position information corresponding to each receipt image. The printable receipt template is set by the merchant through a front-end and sent by the front-end to the printing equipment server. The multiple receipt images are obtained by the merchant through a multiple receipt image editing area in the printable receipt template setting interface displayed on the front-end. The multiple receipt images are sent by the front-end to an image storage terminal in the cloud, and the printable equipment server obtains them from the image storage terminal based on the image identification data of the multiple receipt images in the printable receipt template set by the merchant. The method also includes printing a receipt displaying the multiple receipt images according to the printing instruction set.
[0048] Optionally, it also includes: obtaining multiple receipt images corresponding to the printed receipt template sent by the printing device server; setting an image index for identifying the multiple receipt images as a printing device image index; and sending the printing device image index to the printing device server.
[0049] Optionally, it further includes: obtaining an image printing instruction set sent by the printing device server, the image printing instruction set being generated based on multiple receipt images corresponding to the receipt template; setting an image printing instruction set index for the image printing instruction set; sending the image printing instruction set index to the printing device server; obtaining the correspondence between the image printing instruction set index and the text printing instruction set, the text printing instruction set being generated based on the printable instance data provided by the front end and the receipt template; obtaining the text printing instruction set sent by the printing device server based on the correspondence between the image printing instruction set index and the text printing instruction set; and printing a receipt displaying the multiple receipt images according to the printing instruction set, including: printing a receipt displaying the multiple receipt images according to the image printing instruction set and the text printing instruction set.
[0050] Optionally, it also includes: obtaining the image printing instruction set and image printing instruction set index sent by the printing device server, wherein the image printing instruction set is generated based on multiple receipt images corresponding to the receipt template; obtaining the correspondence between the image printing instruction set index sent by the printing device server and the document printing instruction set, wherein the document printing instruction set is generated based on the printable instance data provided by the front end and the receipt template; and obtaining the document printing instruction set based on the correspondence between the image printing instruction set index sent by the printing device server and the document printing instruction set.
[0051] The step of printing a receipt displaying the multiple receipt images according to the printing instruction set includes: printing a receipt displaying the multiple receipt images according to the image printing instruction set and the text printing instruction set.
[0052] Optionally, it also includes: obtaining an image printing instruction set and a receipt text printing instruction set sent by the printing device server, wherein the image printing instruction set is generated based on the plurality of receipt images, and the receipt text printing instruction set is generated based on the printed receipt template; the step of printing a receipt displaying the plurality of receipt images according to the printing instruction set includes: printing a receipt displaying the plurality of receipt images according to the image printing instruction set and the receipt text printing instruction set.
[0053] This application provides a method for setting up receipt printing, applied to a front-end for setting up a receipt printing template. The method includes: displaying a print color selection component in the receipt printing template setting interface for merchants to select the receipt printing color; obtaining the receipt printing color data selected by the merchant through the print color selection component; sending the receipt printing template set by the merchant to a cloud-based printing device server, wherein the receipt printing template includes the receipt printing color data selected by the merchant, so that the printing device server converts the color of the receipt data to be printed on the receipt to the receipt printing color selected by the merchant; when a receipt needs to be printed according to the receipt printing template set by the merchant, generating a print instruction set based on the receipt printing template and the printable instance data provided by the front-end, and sending the print instruction set to the printing device set up in the store operated by the merchant, so that the printing device prints a receipt with the receipt data color selected by the merchant according to the print instruction set.
[0054] Optionally, the receipt printing color available for the merchant to select in the print color selection component is a receipt printing color supported by the printing device.
[0055] Optionally, the method further includes: obtaining multiple receipt images uploaded by the merchant; detecting whether the color types of the multiple receipt images uploaded by the merchant are consistent with the color types corresponding to the receipt printing color data selected by the merchant; if not, converting the colors of the multiple receipt images uploaded by the merchant according to the color types corresponding to the receipt printing color data selected by the merchant to obtain multiple receipt images after color conversion; displaying the multiple receipt images after color conversion; responding to the merchant's confirmation operation for the multiple receipt images after color conversion, sending the multiple receipt images after color conversion as images displayed on the receipts printed by the printing device to the image storage terminal in the cloud; the printing device server also obtains the multiple receipt images after color conversion from the image storage terminal; the step of generating a printing instruction set based on the printed receipt template and the printable instance data provided by the front end includes: generating a printing instruction set based on the multiple receipt images after color conversion, the printable instance data provided by the front end, and the printed receipt template.
[0056] This application provides a receipt printing method applied to a cloud-based printing device server. The method includes: obtaining a receipt template set by a merchant, the receipt template including receipt printing color data selected by the merchant; when a receipt needs to be printed according to the receipt template, generating a printing instruction set based on the receipt template and the printable instance data provided by the front end, and sending the printing instruction set to the printing device set up in the store operated by the merchant, so that the printing device prints a receipt with the receipt data color selected by the merchant according to the printing instruction set.
[0057] Optionally, the color represented by the receipt printing color data selected by the merchant is the receipt printing color supported by the printing device.
[0058] Optionally, it also includes: obtaining multiple receipt images from an image storage terminal in the cloud, wherein the multiple receipt images stored in the image storage terminal are obtained based on multiple receipt images uploaded by the merchant to the front end; detecting whether the number of color types in the multiple receipt images stored in the image storage terminal is consistent with the color types corresponding to the receipt printing color data selected by the merchant; if not, converting the colors of the multiple receipt images stored in the image storage terminal according to the color types corresponding to the receipt printing color data selected by the merchant to obtain multiple color-converted receipt images, which are then displayed as images on the receipts printed by the printing device; the step of generating a printing instruction set based on the printed receipt template and the printable instance data provided by the front end includes: generating a printing instruction set based on the color-converted multiple receipt images, the printable instance data provided by the front end, and the printed receipt template.
[0059] This application provides a receipt printing method applied to printing equipment installed in a merchant's shop. The method includes: obtaining a set of printing instructions sent by a cloud-based printing equipment server, wherein the set of printing instructions is generated based on a receipt template and data of an instance to be printed. The receipt template includes receipt printing color data selected by the merchant. The receipt template is set by the merchant through a front-end and sent by the front-end to the printing equipment server. The receipt printing color data selected by the merchant is selected by the merchant through a printing color selection component in the receipt template setting interface displayed on the front-end. The data of the instance to be printed is provided to the printing equipment server by the front-end. The method further includes printing a receipt with the receipt data color matching the receipt printing color selected by the merchant, according to the set of printing instructions.
[0060] Optionally, the color represented by the receipt printing color data selected by the merchant is the receipt printing color supported by the printing device.
[0061] Optionally, the printing instruction set is generated based on multiple color-converted receipt images, a printed receipt template, and data of the instance to be printed. The multiple color-converted receipt images are the images to be displayed on the receipts printed by the printing device. The multiple color-converted receipt images are obtained by converting the colors of multiple receipt images uploaded by the merchant through the front end based on the receipt printing color data selected by the merchant.
[0062] This application provides a receipt setting device, applied to a front-end for setting a receipt template. The device includes: a first display unit for displaying a receipt image editing area for merchants to set receipt images in a receipt template setting interface; a first obtaining unit for obtaining multiple receipt images set by the merchant and display position information corresponding to each receipt image through multiple receipt image editing areas; a first sending unit for sending the multiple receipt images to a cloud; a second obtaining unit for obtaining image identification data corresponding to the multiple receipt images; a first generating unit for generating a receipt template containing image identification data based on the display position information; and a second sending unit for sending the receipt template to the cloud, so that the cloud obtains the multiple receipt images according to the image identification data and, based on the receipt template, instructs the printing equipment set in the store operated by the merchant to print a receipt displaying the multiple receipt images.
[0063] This application provides a receipt printing device applied to a cloud-based printing equipment server. The device includes: a third obtaining unit, used to obtain a receipt template set by a merchant, the receipt template including image identification data corresponding to multiple receipt images and display position information corresponding to each receipt image; a fourth obtaining unit, used to obtain multiple receipt images corresponding to the receipt template from a cloud-based image storage terminal based on the image identification data of the multiple receipt images in the receipt template, the multiple receipt images being provided to the image storage terminal by the front end that sets the receipt template; and an indicating unit, used to, when a receipt needs to be printed according to the receipt template, instruct the printing equipment set in the merchant's store to print a receipt displaying the multiple receipt images.
[0064] This application provides a receipt printing device, applied to printing equipment installed in a merchant's shop. The device includes: a fifth obtaining unit, used to obtain a set of printing instructions sent by a cloud-based printing equipment server. The set of printing instructions is generated based on multiple receipt images, printable instance data provided by a front end, and a printable receipt template. The printable receipt template includes image identification data corresponding to multiple receipt images and display position information corresponding to each receipt image. The printable receipt template is set by the merchant through a front end and sent to the printing equipment server by the front end. The multiple receipt images are obtained by the merchant through multiple receipt image editing areas in the printable receipt template setting interface displayed on the front end. The multiple receipt images are sent by the front end to an image storage terminal in the cloud, and the printable equipment server obtains them from the image storage terminal based on the image identification data of the multiple receipt images in the printable receipt template set by the merchant; and a first printing unit, used to print receipts displaying the multiple receipt images according to the set of printing instructions.
[0065] This application provides a receipt printing setting device, applied to a front-end for setting a receipt printing template. The device includes: a second display unit for displaying a print color selection component for merchants to select the print color of the receipt in the receipt printing template setting interface; a sixth obtaining unit for obtaining the print color data of the receipt selected by the merchant through the print color selection component; and a third sending unit for sending the receipt printing template set by the merchant to a printing device server in the cloud. The receipt printing template includes the print color data of the receipt selected by the merchant, so that the printing device server converts the color of the receipt data to be printed on the receipt to the print color selected by the merchant. When a receipt needs to be printed according to the receipt printing template set by the merchant, a printing instruction set is generated based on the receipt printing template and the printable instance data provided by the front-end, and the printing instruction set is sent to the printing device set up in the store operated by the merchant, so that the printing device prints a receipt with the receipt data color of the print color selected by the merchant according to the printing instruction set.
[0066] This application provides a receipt printing device applied to a cloud-based printing equipment server. The device includes: a seventh obtaining unit, used to obtain a receipt template set by a merchant, the receipt template including receipt printing color data selected by the merchant; and a second generating unit, used to generate a printing instruction set based on the receipt template and the printable instance data provided by the front end when a receipt needs to be printed, and send the printing instruction set to the printing equipment set up in the store operated by the merchant, so that the printing equipment prints a receipt with the receipt data color selected by the merchant according to the printing instruction set.
[0067] This application provides a receipt printing device, applied to printing equipment installed in a merchant's shop. The device includes: an eighth obtaining unit, used to obtain a set of printing instructions sent by a cloud-based printing equipment server. The set of printing instructions is generated based on a receipt template and data of an instance to be printed. The receipt template includes receipt printing color data selected by the merchant. The receipt template is set by the merchant through a front-end and sent to the printing equipment server by the front-end. The receipt printing color data selected by the merchant is selected by the merchant through a printing color selection component in the receipt template setting interface displayed on the front-end. The data of the instance to be printed is provided to the printing equipment server by the front-end; and a second printing unit, used to print a receipt with the receipt data color matching the receipt printing color selected by the merchant, according to the set of printing instructions.
[0068] This application provides an electronic device, including: a processor; and a memory for storing a computer program, which is executed by the processor to perform the above-described method for setting up and printing receipts.
[0069] This application provides a computer storage medium storing a computer program, which is executed by a processor to perform the above-described method for setting up and printing receipts.
[0070] Compared with the prior art, the embodiments of this application have the following advantages:
[0071] This application provides a method for setting up printed receipts. This method allows the user to obtain multiple receipt images and their corresponding display positions within the receipt image editing area of the receipt template setting interface. Then, the multiple receipt images are sent to the cloud to obtain image identification data for each image. This generates a printed receipt template containing the image identification data based on the display positions. Finally, the printed receipt template is sent to the cloud, enabling the cloud to obtain the multiple receipt images based on the image identification data and instruct the printing equipment set up in the merchant's store to print receipts displaying the multiple receipt images. In this method, the printed receipt template can be set by the merchant, and the merchant can upload multiple images to the printed receipt through the multiple receipt image editing area. This allows the printing equipment to print receipts with a mixture of multiple images and text, solving the problem that printing equipment can only print receipts containing text, thereby improving printing efficiency.
[0072] This application provides a method for setting up receipt printing. This method allows merchants to select receipt printing color data using a color selection component in the receipt template settings interface. The receipt template, including the merchant's selected color data, is then sent to a cloud-based printing device server. The server converts the colors of the receipt data to the merchant's chosen color. When printing a receipt based on the merchant's template, a printing instruction set is generated using the template and the printable instance data provided by the front end. This instruction set is then sent to the printing device located in the merchant's store, enabling the device to print a receipt with the merchant's selected color. This method allows merchants to set up the receipt template and select the color data via the color selection component, enabling the printing device to print color receipts. This solves the problem of printing devices only being able to print black and white receipts, thus improving printing efficiency. Attached Figure Description
[0073] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings.
[0074] Figure 1 is a schematic diagram of the first scenario of the method for setting up a printed receipt provided in this application.
[0075] Figure 2 is a schematic diagram of the second scenario of the method for setting up the printed receipt provided in this application.
[0076] Figure 3 is a schematic diagram of the third scenario of the method for setting up the printed receipt provided in this application.
[0077] Figure 4 is a schematic diagram of the fourth scenario of the method for setting up the printed receipt provided in this application.
[0078] Figure 5 is a schematic diagram of the fifth scenario of the method for setting up the printed receipt provided in this application.
[0079] Figure 6 is a schematic diagram of the sixth scenario of the method for setting up the printed receipt provided in this application.
[0080] Figure 7 is a schematic diagram of the seventh scenario of the method for setting up the printed receipt provided in this application.
[0081] Figure 8 is a flowchart of the method for setting up a printed receipt provided in the first embodiment of this application.
[0082] Figure 9 is a flowchart of the receipt printing method provided in the second embodiment of this application.
[0083] Figure 10 is a flowchart of the receipt printing method provided in the third embodiment of this application.
[0084] Figure 11 is a flowchart of the method for setting up a printed receipt provided in the fourth embodiment of this application.
[0085] Figure 12 is a flowchart of the receipt printing method provided in the fifth embodiment of this application.
[0086] Figure 13 is a flowchart of the receipt printing method provided in the sixth embodiment of this application.
[0087] Figure 14 is a schematic diagram of the receipt setting device provided in the seventh embodiment of this application.
[0088] Figure 15 is a schematic diagram of the receipt printing device provided in the eighth embodiment of this application.
[0089] Figure 16 is a schematic diagram of the receipt printing device provided in the ninth embodiment of this application.
[0090] Figure 17 is a schematic diagram of the receipt printing device provided in the tenth embodiment of this application.
[0091] Figure 18 is a schematic diagram of the receipt printing device provided in the eleventh embodiment of this application.
[0092] Figure 19 is a schematic diagram of the receipt printing device provided in the twelfth embodiment of this application.
[0093] Figure 20 is a schematic diagram of an electronic device provided in the thirteenth embodiment of this application. Detailed Implementation
[0094] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application. Therefore, this application is not limited to the specific implementations disclosed below.
[0095] This application provides a method for setting up a receipt, a method for printing a receipt, a device for setting up a receipt, a device for printing a receipt, an electronic device, and a computer storage medium. The following specific embodiments describe the method for setting up a receipt, the method for printing a receipt, the device for setting up a receipt, the device for printing a receipt, the electronic device, and the computer storage medium. The method for printing a receipt, the device for setting up a receipt, the device for printing a receipt, the electronic device, and the computer storage medium are all based on the method for setting up a receipt. To more clearly demonstrate the method for setting up a receipt provided by the embodiments of this application, we will first introduce the application scenarios of the method for setting up a receipt provided by the embodiments of this application. Before introducing the application scenarios of the method for setting up a receipt provided by the embodiments of this application, we will first briefly introduce the implementation background of the embodiments of this application. With the development of cloud printing technology, cloud printing technology can print using various types of cloud printers. A cloud printer is a printing device connected via the Internet, which allows users to print from any device that supports an Internet connection without a direct physical connection or a traditional local area network (LAN) connection. Ordinary printers, on the other hand, typically connect to a local server via a network cable, and then the local server connects to a remote server. The core concept of cloud printing technology is to process and manage print jobs through cloud servers, thereby enabling a print experience anytime, anywhere, and across devices. When printing an order receipt, the cloud printer needs to parse the instruction set corresponding to the content of the order receipt sent by the server into the cloud printer's memory, and then execute the printing operation. However, currently, due to various limitations, most cloud printers can only print text when printing order receipts. Furthermore, for color printing of receipts, traditional Bluetooth and USB printing are usually the primary methods, while cloud printers can only print black and white text, severely limiting the application of cloud printers.
[0096] Based on this, this application provides a method for setting up printed receipts. This method allows the user to obtain multiple receipt images set by the merchant and the display position information corresponding to each receipt image through the receipt image editing area in the receipt template setting interface. Then, the multiple receipt images are sent to the cloud to obtain image identification data corresponding to each image. This generates a printed receipt template containing the image identification data based on the display position information. Finally, the printed receipt template is sent to the cloud, enabling the cloud to obtain the multiple receipt images based on the image identification data and instruct the printing equipment set up in the merchant's store to print a receipt displaying the multiple receipt images based on the printed receipt template. In this method, the printed receipt template can be set by the merchant, and the merchant can upload multiple images to the printed receipt through the multiple receipt image editing area. This allows the printing equipment to print a receipt with multiple images and text mixed together, solving the problem that printing equipment can only print receipts containing text, thereby improving the printing efficiency of receipts.
[0097] Another embodiment of this application provides a method for setting up receipt printing. This method allows merchants to select receipt printing color data using a color selection component in the receipt template setting interface. The receipt template, including the merchant's selected color data, is then sent to a cloud-based printing device server. The server converts the colors of the receipt data to the merchant's chosen color. When a receipt needs to be printed based on the merchant's template, a printing instruction set is generated using the template and the printable instance data provided by the front end. This instruction set is then sent to the printing device located in the merchant's store, enabling the device to print a receipt with the merchant's selected color. This method allows merchants to set up the receipt template and select the color data using the color selection component, enabling the printing device to print color receipts. This solves the problem of printing devices only being able to print black and white receipts, thereby improving printing efficiency.
[0098] The following describes in detail the application scenarios of the receipt setting method provided in this application, with reference to Figures 1-7. Taking Merchant A's receipt setting process as an example, please refer to Figure 1. Figure 1 is a schematic diagram of the first scenario of the receipt setting method provided in this application. After Merchant A enters the printer settings interface, the printer settings interface will display various receipt template types, such as customer copy, merchant copy, and kitchen copy. Taking the customer copy receipt template as an example, the merchant can click the edit button corresponding to the customer copy to edit it. After clicking the edit button, the second page will appear, as shown in Figure 2. Figure 2 is a schematic diagram of the second scenario of the receipt setting method provided in this application. The second page displays a receipt color selection button. Through the color selection button, the user can set the presentation color of the receipt to black or orange. The display area of the second page is used to display the specific content presented on the receipt. The second page also includes a module editing button and a module sorting button. By triggering the module editing button, you can enter the print receipt template settings interface, which includes multiple receipt image editing areas. By triggering the module sorting button, you can adjust the order of the multiple receipt image editing areas in the print receipt template settings interface.
[0099] After clicking the module edit button, you will enter the third page, as shown in Figure 3. Figure 3 is a schematic diagram of the third scenario of the receipt printing setting method provided in this application. The third page is the receipt printing setting interface, which displays multiple receipt image editing areas for merchants to set receipt images. These include areas for displaying receipt type, merchant brand logo, estimated order delivery time, customer information, product information, promotional information, and merchant operations. Through these multiple receipt image editing areas, you can obtain multiple receipt images set by the merchant and the display position information for each receipt image. Taking the display of the merchant brand logo as an example, by triggering the edit button corresponding to the merchant brand logo area, you will enter the logo area editing page, as shown in Figure 4. Figure 4 is a schematic diagram of the fourth scenario of the receipt printing setting method provided in this application. On the logo area editing page, you can upload a store logo image in the image display area. When uploading, you can also crop the size of the store logo image and set its display shape. For example, you can set the store logo image to a rectangle or a square for display. Similarly, in the merchant operation area, merchants can upload custom images or choose from several pre-defined templates in the image template market. The merchant image upload settings interface is shown in Figure 5, which illustrates the fifth scenario of the receipt printing settings method provided in this application. Merchants can choose to edit the merchant operation area using a combination of images and text, images only, or text only. After uploading multiple images in the receipt printing template settings interface, the front-end sends these images to the cloud image storage. The image storage or front-end generates image identification data for each image, which can be a hash value or other identifier. This image identification data is then written into the receipt printing template, generating a receipt printing template containing image identification data based on the display location information of multiple receipt images. This template is then sent to the cloud-based printing device server. When a receipt needs to be printed based on the template, the printing device server obtains the printable instance data from the front-end. This printable instance data includes customer information, such as the customer's name, address, and contact information. The printing device server retrieves multiple receipt images from the image storage terminal based on the image identification data. Then, the printing device server generates a printing instruction set based on the multiple receipt images, the printable instance data provided by the front end, and the print receipt template. The printing instruction set is then sent to the printing devices set up in the store operated by the merchant, so that the printing devices print receipts displaying multiple receipt images according to the printing instruction set.
[0100] The above is an overall scenario description of the receipt setting method provided in this application embodiment. The following, in conjunction with Figures 6 and 7, describes the process in this application where the merchant sets up a receipt template, and the front end sends the receipt template to the cloud-based printing device server so that the printing device server, based on the receipt template, instructs the printing device set up in the merchant's store to print a receipt displaying multiple receipt images. The front end 10-1, which sets up the receipt template, executes step S701: Displaying a receipt image editing area for the merchant to set receipt images in the receipt template setting interface; then, executing step S702: Obtaining the multiple receipt images set by the merchant and the display position information corresponding to each receipt image through the multiple receipt image editing areas. Next, step S703 is executed: the multiple receipt images are sent to the image storage terminal 10-2 in the cloud; step S704: image identification data corresponding to the multiple receipt images is obtained; step S705: a print receipt template containing image identification data based on the display location information is generated; then, step S706 is executed: the print receipt template set by the merchant is sent to the printing device server 10-3 in the cloud. Step S707: the front-end 10-1 of the print receipt template sends the instance data to be printed to the printing device server 10-2. Then, step S708 is executed: the printing device server 10-3 obtains multiple receipt images corresponding to the printing receipt template from the image storage terminal 10-2 in the cloud based on the image identification data of the multiple receipt images in the printing receipt template; then, step S709 is executed: when a receipt needs to be printed according to the printing receipt template, the printing device server 10-3 generates a printing instruction set based on the multiple receipt images, the printable instance data provided by the front end 10-1, and the printing receipt template; then, step S710 is executed: the printing device server 10-3 sends the printing instruction set to the printing device 10-4 set up in the store operated by the merchant. Finally, after receiving the printing instruction set, the printing device 10-4 executes step S711: prints the receipt displaying the multiple receipt images according to the printing instruction set.
[0101] The above is the overall implementation process of the receipt setting method provided in this application embodiment. This method obtains multiple receipt images set by the merchant and the display position information corresponding to each receipt image through the receipt image editing area in the receipt template setting interface. Then, it sends the multiple receipt images to the cloud to obtain image identification data corresponding to the multiple receipt images, thereby generating a receipt template containing image identification data based on the display position information. Finally, it sends the receipt template to the cloud, enabling the cloud to obtain the multiple receipt images according to the image identification data and, based on the receipt template, instruct the printing equipment set in the merchant's store to print a receipt displaying the multiple receipt images. In this method, the receipt template can be set by the merchant, and the merchant can upload multiple images to the receipt through the multiple receipt image editing area. This allows the printing equipment to print receipts with multiple images and text mixed together, solving the problem that printing equipment can only print receipts with text, thereby improving the printing efficiency of receipts.
[0102] In another implementation scenario of the receipt setting method provided in this application, a print color selection component for merchants to select the print color of the receipt can also be displayed in the print receipt template setting interface. Merchants can select the print color data of the receipt through the print color selection component, and send the print receipt template including the print color data selected by the merchant to the printing device server in the cloud. The printing device server then converts the color of the receipt data to be printed in the receipt to the color selected by the merchant based on the print color data selected by the merchant. When it is necessary to print a receipt according to the print receipt template set by the merchant, a print instruction set is generated based on the print receipt template and the print instance data provided by the front end. The print instruction set is sent to the printing device set in the store operated by the merchant, so that the printing device prints a receipt with the print color of the receipt data as selected by the merchant according to the print instruction set. In this method, the receipt template can be set by the merchant, and the merchant can select the receipt printing color data through the printing color selection component, so that the printing device can print color receipts, solving the problem that the printing device can only print black and white receipts, thereby improving the printing efficiency of receipts.
[0103] Figures 1, 2, 3, 4, 5, 6, and 7 described above illustrate one application scenario of the receipt setting method of this application. The embodiments of this application do not specifically limit the application scenario of the receipt setting method. The above-described application scenario of the receipt setting method is merely one embodiment of the application scenario of the receipt setting method provided in this application. The purpose of providing this application scenario embodiment is to facilitate understanding of the receipt setting method provided in this application, and is not intended to limit the receipt setting method provided in this application. Other application scenarios of the receipt setting method in this application will not be described in detail.
[0104] First Embodiment
[0105] This embodiment provides a method for setting up receipt printing, which will be described below with reference to Figure 8. The applicable scenarios for this receipt printing setting method can be referred to the above scenario embodiments. For some examples of this embodiment, please refer to the above scenario embodiments.
[0106] Please refer to Figure 8, which is a flowchart of the method for setting up a printed receipt provided in the first embodiment of this application.
[0107] The method for setting up a printed receipt according to this application is applied to the front end for setting up a printed receipt template, and includes the following steps.
[0108] Step S801: In the receipt template settings interface, display the receipt image editing area for merchants to set receipt images.
[0109] This step displays the receipt image editing area for merchants to set receipt images in the receipt template settings interface. In this embodiment, taking order receipts printed by catering merchants as an example, merchants can customize the order receipts to be printed through the front-end of the receipt template settings. For example, merchants can upload multiple images through the receipt image editing area displayed in the receipt template settings interface, and can also enter text in the text editing area of the receipt template and adjust the font size as needed. Specifically, displaying the receipt image editing area for merchants to set receipt images in the receipt template settings interface includes: displaying multiple receipt image upload entry components for merchants to upload multiple receipt images in the receipt template settings interface. Please refer to Figure 3. The multiple receipt image upload entry components displayed in the receipt template settings interface for merchants to upload multiple receipt images include: a merchant logo image upload entry component displayed in the merchant logo settings area for merchants to upload merchant logo images, and a merchant operation image upload entry component displayed in the merchant operation settings area for merchants to upload merchant operation images.
[0110] It should be noted that each receipt image upload component supports uploading only one image. For example, referring to Figure 4, the merchant logo image upload component in the merchant logo settings interface (the image display area in Figure 4 is also an image upload component) only supports uploading one merchant logo image. Referring to Figure 5, in the merchant operations display area, merchants can upload images through the merchant operations image upload component (the image upload area in Figure 5). Since the receipt template settings interface contains multiple receipt image editing areas, merchants can set multiple receipt images for display through multiple image upload components in these areas. In specific implementation, before displaying the receipt image editing area for merchants to set receipt images in the receipt template settings interface, the receipt template settings interface is first displayed on the front end. Specifically, the front end can respond to the detection of a trigger operation in the merchant center of a mini-program or official account, displaying the merchant center service list; and respond to the detection of a trigger operation for smart hardware in the merchant center service list, displaying the receipt template settings interface.
[0111] Step S802: Obtain multiple receipt images set by the merchant and the display position information corresponding to each receipt image through multiple receipt image editing areas.
[0112] This step is used to obtain multiple receipt images set by the merchant and the display position information corresponding to each receipt image through multiple receipt image editing areas. It should be noted that in the front-end receipt template settings interface, merchants can set multiple receipt images for display on the receipt through multiple image upload entry components in multiple receipt image editing areas. Since the receipt images are displayed in the receipt image editing areas, once the location of the receipt image editing area is determined, the display position of the receipt image in each corresponding receipt image editing area is also determined. In specific implementation, the display position information corresponding to each receipt image is obtained in the following way: In response to detecting a trigger operation on the receipt display position in the settings page, a receipt image editing area for editing the display position is displayed, wherein a display position includes at least one receipt image; In response to detecting an image editing operation on the editing area of the receipt image, the receipt display position information where the image editing operation is located is obtained, the display position information includes the display position and the editing area position. It should be noted that in the settings page, after the front-end detects a trigger operation on the receipt display position, it will enter another page. This page displays the receipt image editing area for editing the display position. Furthermore, a display position can include one or more receipt images. After the front-end detects an image editing operation on the editing area of the receipt image, it can obtain the receipt display position information where the image editing operation is located. This display position information includes not only the display position of the receipt image but also the location of the editing area used to edit the receipt image. Triggering the edit button at this editing area location will take you to the editing page (for example, the interface shown in Figure 4 or Figure 5). Referring to Figure 2, in the settings page, after the merchant triggers the "Module Sorting" button, they enter multiple receipt image editing areas (i.e., the interface corresponding to Figure 3). This interface can be used to set the position of each area (module) in the receipt image editing area on the receipt. Once the display position of a module on the receipt is determined, since the receipt image is set within a module, the display position information corresponding to each receipt image can be obtained based on the module's display position information.
[0113] In this embodiment, merchants can select and upload multiple images by triggering multiple image upload entry components. There are two ways for merchants to upload images: one is custom upload, where merchants can freely upload images that meet their needs. These images can be user-defined photos used to identify merchant characteristics, such as images used to identify promotional information. The other method is for merchants to select a fixed image template from the image template library and then edit based on that template. Therefore, the image can also be generated using an image template, such as one for inviting positive reviews, adding the store to favorites, displaying the merchant's phone number, or announcing member days. When selecting images through an image template, merchants can also edit the images and text on the template to better meet their usage needs.
[0114] Step S803: Send the multiple receipt images to the cloud.
[0115] This step involves the front-end sending multiple receipt images uploaded by the merchant to the cloud. Specifically, the cloud includes a printing device server and an image storage terminal. Sending the multiple receipt images to the cloud specifically means sending them to the image storage terminal.
[0116] Step S804: Obtain the image identification data corresponding to the multiple receipt images.
[0117] This step involves the front-end sending multiple receipt images uploaded by the merchant to the image storage terminal, and then obtaining image identification data corresponding to these receipt images. It should be noted that the image identification data can be generated either by the front-end receiving the multiple receipt images uploaded by the merchant and sending them to the cloud along with the image identification data, or by the image storage terminal receiving the multiple receipt images uploaded by the merchant and then generating image identification data corresponding to each receipt image based on these images. This image identification data can specifically be a hash value, an index, or other image data—any data that can identify the multiple receipt images set by the merchant. In this embodiment, the generation of image identification data at the image storage terminal is described as an example. Specifically, the hash value corresponding to the multiple receipt images returned by the image storage terminal is obtained. This hash value is used to identify the multiple receipt images in the image storage terminal.
[0118] Step S805: Generate a printable receipt template containing image identifier data based on the displayed location information.
[0119] This step is used to generate a print receipt template, which includes display position information for multiple receipt images and image identification data. Since the image identification data includes hash values, generating a print receipt template containing image identification data based on the display position information includes: generating a print receipt template containing hash values based on the display position information.
[0120] Step S806: Send the printed receipt template to the cloud so that the cloud can obtain the multiple receipt images according to the image identification data, and print receipts displaying the multiple receipt images on the printing equipment set in the store operated by the merchant based on the printed receipt template.
[0121] This step involves the front end sending a printed receipt template to the cloud, enabling the cloud to instruct the printing equipment set up in the merchant's store to print receipts displaying the multiple receipt images based on the printed receipt template. Specifically, sending the printed receipt template to the cloud means sending it to the printing equipment server. When the cloud obtains the multiple receipt images based on the image identification data, it specifically obtains the multiple receipt images from the image storage terminal based on the hash values of the multiple receipt images in the printed receipt template set by the merchant. Obtaining the multiple receipt images from the image storage terminal based on the hash values of the multiple receipt images in the printed receipt template set by the merchant includes: sending an image retrieval request message to the image storage terminal requesting to obtain the image corresponding to the multiple receipt images, the image retrieval request message including the hash values corresponding to the multiple receipt images; and obtaining the multiple receipt images returned by the image storage terminal.
[0122] After obtaining multiple receipt images based on image identification data, the cloud-based printing server will print receipts displaying these multiple images using printing receipt templates set up in the merchant's store. Specifically, when a receipt needs to be printed according to the merchant's set printing receipt template, a printing instruction set is generated based on the multiple receipt images, the printable instance data provided by the front end, and the printing receipt template. This printing instruction set is then sent to the printing devices set up in the merchant's store, enabling the printing devices to print receipts displaying the multiple receipt images according to the printing instruction set. In practice, after the front-end detects the merchant's confirmation of uploaded image, it sends the uploaded image to the cloud image storage terminal for storage and sends the printed receipt template set by the merchant to the cloud printing device server for storage. The printing device server then retrieves multiple receipt images from the image storage terminal based on the image identifier data of the multiple receipt images in the merchant's printed receipt template. When a receipt needs to be printed according to the merchant's printed receipt template, a printing instruction set is generated based on the multiple receipt images, the printable instance data provided by the front-end, and the printed receipt template. Alternatively, the front-end can detect the merchant's confirmation of uploaded image only after detecting the confirmation of the merchant's printed receipt settings. In practice, the front-end also needs to obtain the printable instance data, specifically the order data sent by the order server. In practical applications, the printable instance data provided by the front-end can be obtained from the order data sent by the order server. This printable instance data can include the recipient's name, contact information, delivery address, and specific food items. The receipt template can have commonly used fields set in a fixed format, such as merchant address, order date, and font size. It's important to note that before the printing server generates the print instruction set, the front-end sends print instructions to the printing server. These instructions include the instance data to be printed. Specifically, when the printing server generates the print instruction set based on multiple receipt images, the instance data provided by the front-end, and the receipt template, it responds to the print instructions by generating the print instruction set. The printing server then sends the print instruction set to the printing device, causing the printing device to print a receipt displaying multiple receipt images, recipient information, and food details.
[0123] As one embodiment, on the cloud-based image storage terminal, the image identification data can be the image's hash value. The front-end can write the hash values corresponding to multiple receipt images into the receipt template set by the merchant, serving as the image identification data for the multiple receipt images. Specifically, after the front-end sends multiple receipt images to the cloud-based image storage terminal, it receives the hash values corresponding to the multiple receipt images returned by the image storage terminal. These hash values are used to identify the multiple receipt images in the image storage terminal. The front-end writes these hash values into the receipt template set by the merchant, serving as the image identification data for the multiple receipt images. When the front-end retrieves multiple receipt images from the image storage terminal based on the image identification data of the multiple receipt images in the receipt template set by the merchant, it specifically obtains the hash values corresponding to the multiple receipt images from the receipt template set by the merchant and sends an image retrieval request message to the image storage terminal requesting the retrieval of the multiple receipt images. This image retrieval request message includes the hash values corresponding to the multiple receipt images, thereby obtaining the multiple receipt images returned by the image storage terminal.
[0124] As one embodiment, on the cloud-based image storage terminal, the image identification data can be the image's hash value. The front-end can also set image indexes in the merchant's printed receipt template to identify multiple receipt images, serving as the image identification data for these multiple receipt images. In specific implementation, after the front-end sends multiple receipt images to the cloud-based image storage terminal, the front-end receives the hash values corresponding to the multiple receipt images returned by the image storage terminal. These hash values are used to identify the multiple receipt images in the image storage terminal. The front-end sets image indexes in the merchant's printed receipt template to identify the multiple receipt images, serving as the image identification data for these multiple receipt images. Simultaneously, the front-end establishes a correspondence between the image indexes and the corresponding hash values for the multiple receipt images, and sends this correspondence to the printing device server. When the frontend retrieves multiple receipt images from the image storage based on the image identifier data of multiple receipt images in the receipt template set by the merchant, it specifically obtains the image index from the receipt template, and then obtains the hash value corresponding to each receipt image based on the correspondence between the image index and the hash value of the corresponding receipt image. Next, the frontend sends an image retrieval request message to the image storage, which includes the hash value of the corresponding receipt image, thereby obtaining the multiple receipt images returned by the image storage.
[0125] As one embodiment, on the cloud-based image storage terminal, the image identification data can be the image's hash value. The front-end can write the hash values corresponding to multiple receipt images into the receipt template set by the merchant, serving as the image identification data for multiple receipt images. In practical applications, the image index used to identify multiple receipt images can also be set on the printing device server. Specifically, after the front-end sends multiple receipt images to the cloud-based image storage terminal, the front-end obtains the hash values corresponding to the multiple receipt images returned by the image storage terminal. These hash values are used to identify the multiple receipt images in the image storage terminal. The front-end writes the hash values corresponding to the multiple receipt images into the receipt template set by the merchant, serving as the image identification data for multiple receipt images. The printing device server also sets up an image index to identify multiple receipt images. Simultaneously, the printing device server establishes a correspondence between the image index and the hash values corresponding to the multiple receipt images, and replaces the hash values corresponding to the multiple receipt images in the receipt template set by the merchant with the image index. When the front-end retrieves multiple receipt images from the image storage based on the image identifier data of multiple receipt images in the receipt template set by the merchant, the front-end specifically obtains the image index from the receipt template set by the merchant, obtains the hash value corresponding to the multiple receipt images according to the correspondence between the image index and the hash value corresponding to the multiple receipt images, and sends an image retrieval request message to the image storage to request the multiple receipt images. The image retrieval request message includes the hash value corresponding to the multiple receipt images, thereby obtaining the multiple receipt images returned by the image storage.
[0126] In this embodiment, the front-end also obtains the link addresses of the multiple receipt images returned by the image storage terminal according to the image acquisition request message. Obtaining the multiple receipt images returned by the image storage terminal includes: downloading the multiple receipt images from the image storage terminal according to the link addresses of the multiple receipt images. It should be noted that after the front-end sends an image acquisition request message to the image storage terminal to request multiple receipt images, the front-end obtains the link addresses of the multiple receipt images returned by the image storage terminal according to the image acquisition request message. Specifically, when obtaining the multiple receipt images returned by the image storage terminal, the front-end downloads the multiple receipt images from the image storage terminal according to the link addresses of the multiple receipt images. The link address of the image can specifically be the Uniform Resource Locator (URL) of the image.
[0127] In specific implementation, if the receipt image is a QR code image containing a QR code, the QR code in the QR code image is identified to obtain the string information corresponding to the QR code; the string information is sent to the cloud so that the QR code image can be generated based on the string information when needed. It should be noted that the source of the QR code image can be either the original uploaded image or a cropped image. After the string information is sent to the cloud, the QR code image can be generated based on the string information, either when the cloud-based printing device server needs to obtain the QR code image or when the printing device itself needs to obtain the QR code image.
[0128] In practical applications, the front-end also needs to detect whether the color schemes of the multiple receipt images uploaded by the merchant match the receipt printing color scheme selected by the merchant. If not, the front-end converts the colors of the uploaded receipt images according to the merchant's selected receipt printing color scheme, obtaining multiple color-converted receipt images, and displays these converted images on the front-end for the merchant to view. Specifically, when the front-end sends the multiple receipt images to the image storage terminal, it sends the color-converted receipt images directly to the image storage terminal. For example, if the merchant uploads images with colors including black, white, red, and orange, and the merchant selects black, white, and orange for receipt printing, the front-end will convert the uploaded image colors to black, white, and orange according to the merchant's selected receipt printing color scheme. As another example, if the merchant uploads a pure black image, but the merchant sets the receipt color to orange, the receipt will ultimately be converted to orange. It should be noted that the receipt printing color scheme selected by the merchant is a color scheme supported by the printing device.
[0129] In this embodiment, the front end also adjusts the color and size of the images. Specifically, it processes the colors of multiple receipt images uploaded by the merchant based on an image color processing strategy to obtain multiple receipt images with color processing that meet preset color requirements; and it adjusts the size of multiple receipt images uploaded by the merchant based on an image size processing strategy to obtain multiple receipt images with adjusted sizes within a preset image size range. It should be noted that when using a cloud printer to print order receipts, the memory occupied by the instruction set corresponding to the order receipt content generally does not exceed the storage capacity of the cloud printer's memory. When the instruction set corresponding to the order receipt content exceeds the storage capacity of the cloud printer's memory, the cloud printer may experience lag or crashes, resulting in order receipt printing failure. Therefore, to avoid generating excessively large instruction sets, images require color conversion, and the size of a single image must not exceed 12KB. Generally, the entire order receipt content, after being converted into a printing instruction set, should not occupy more than 60KB of memory. Of course, different printing devices have different memory requirements for the printing instruction set; it might be that the printing instruction set should not occupy more than 140KB of memory, or other requirements. In practice, the printing content of the order receipt should be adjusted according to the specific memory requirements of the printing device to ensure that the corresponding printing instruction set meets the printing requirements of the printing device. Similarly, the image size also needs to be adjusted. The image size requirements are: the aspect ratio of a cropped square image is 1:1, and the aspect ratio of a cropped rectangular image is 1.6:1.
[0130] The above is the overall process of the receipt setting method provided in this application embodiment. This method obtains multiple receipt images set by the merchant and the display position information corresponding to each receipt image through the receipt image editing area in the receipt template setting interface. Then, it sends the multiple receipt images to the cloud to obtain image identification data corresponding to the multiple receipt images, thereby generating a receipt template containing image identification data based on the display position information. Finally, it sends the receipt template to the cloud, enabling the cloud to obtain the multiple receipt images according to the image identification data and, based on the receipt template, instruct the printing equipment set in the merchant's store to print a receipt displaying the multiple receipt images. In this method, the receipt template can be set by the merchant, and the merchant can upload multiple images to the receipt through the multiple receipt image editing area. This allows the printing equipment to print receipts with multiple images and text mixed together, solving the problem that printing equipment can only print receipts with text, thereby improving the printing efficiency of receipts.
[0131] Second Embodiment
[0132] Corresponding to the first embodiment, the second embodiment of this application provides a receipt printing method applied to a cloud-based printing device server. The parts in the second embodiment that are the same as those in the first embodiment will not be described again; please refer to the relevant parts of the first embodiment for details.
[0133] Please refer to Figure 9, which is a flowchart of the receipt printing method provided in the second embodiment of this application.
[0134] The receipt printing method of this application embodiment is applied to a cloud-based printing device server and includes the following steps: Step S901: Obtain a receipt template set by the merchant. The receipt template includes image identification data corresponding to multiple receipt images and display position information corresponding to each receipt image. Step S902: Based on the image identification data of the multiple receipt images in the receipt template, obtain multiple receipt images corresponding to the receipt template from a cloud-based image storage terminal. The multiple receipt images are provided to the image storage terminal by the front-end that sets the receipt template. Step S903: When it is necessary to print a receipt according to the receipt template, print a receipt displaying the multiple receipt images on the printing device set in the store operated by the merchant, according to the instructions of the receipt template.
[0135] In specific implementation, the printing equipment set up in the store operated by the merchant, according to the printed receipt template, prints a receipt displaying the multiple receipt images. This includes: generating a printing instruction set based on the multiple receipt images, the printable instance data provided by the front end, and the printed receipt template; sending the printing instruction set to the printing equipment set up in the store operated by the merchant, so that the printing equipment prints a receipt displaying the multiple receipt images according to the printing instruction set. It should be noted that when the printing equipment server receives a print task sent by the front end, it determines the print template based on the merchant identification information of the merchant to which the front end belongs. Specifically, in response to the receipt printing instruction sent by the front end, it obtains the merchant identification information of the merchant to which the front end belongs; based on the merchant identification information, it obtains the printed receipt template and multiple receipt images corresponding to the merchant identification information.
[0136] In this embodiment, the printing device can specifically be a cloud printer, and the printing device server can specifically be the server corresponding to the cloud printer. After obtaining the print receipt template set by the merchant, multiple receipt images, and the print instance data provided by the front end, the printing device server needs to first convert the print receipt data into an instruction set that the cloud printer can recognize, and then send the instruction set to the cloud printer. After receiving the instruction set sent by the server, the cloud printer can cache it and recognize the print characters in the instruction set, thereby printing the print data. The instruction set can specifically be the ESC instruction set, which is a simplified version of the ESC print control command. Currently, most order receipt printing uses the ESC instruction set. A significant feature of the ESC instruction set is that a large portion of its instructions are a string of codes starting with the ESC control character. Therefore, after obtaining the print receipt, the print receipt data needs to be converted into the corresponding instruction set. There is a correspondence between the print receipt data and the corresponding instruction set. Based on this correspondence, a print instruction set corresponding to the print receipt data can be generated.
[0137] In practice, the printing device server can generate and send printing instruction sets to the printing device in various ways. The first method is for the printing device server to generate and send printing instruction sets based on the actual service scenario. As one example, after receiving multiple receipt images from the printing device server, the printing device converts these images into a printing device image index. Specifically, the printing device server obtains multiple receipt images corresponding to the printed receipt template from the image storage end and sends these images to the printing device. The printing device then stores these images, marks them with an index (as the printing device image index), and sends it to the printing device server. The printing device server receives the image index used to identify the multiple receipt images in the printing device. When generating the printing instruction set based on the multiple receipt images, the printable instance data provided by the front end, and the printable receipt template, the printing device server specifically generates the printing instruction set based on the printing device image index, the printable instance data provided by the front end, and the printable receipt template. When a printing device prints according to a print instruction set, it first parses the print instruction set and replaces the print device image index with the image originally stored by the printing device that corresponds to the print device image index. As one embodiment, after the printing device server obtains multiple receipt images, it converts these images into a print device image index and then sends it to the printing device. Specifically, after obtaining multiple receipt images corresponding to the print receipt template from the image storage terminal, the printing device server sets an image index on the printing device to identify the multiple receipt images, and sends the multiple receipt images and the print device image index to the printing device. When the printing device server generates a print instruction set based on the multiple receipt images, the printable instance data provided by the front end, and the print receipt template, it specifically generates the print instruction set based on the print device image index, the printable instance data provided by the front end, and the print receipt template. When the printing device prints according to the print instruction set, it first parses the print instruction set, obtains the image corresponding to the print device image index from the printing device server, and replaces the print device image index with this image.
[0138] The second method involves the printing server sending multiple cached receipt images to the printing device. The reason for caching the images first is that when an order receipt contains both images and text, the corresponding print instruction set for the images can become too large, easily causing printing failures or slowdowns. Therefore, the printing server first sends the images to the printing device for storage and indexing. As one implementation, the printing device sets an image print instruction set index. Specifically, after the printing server obtains multiple receipt images corresponding to the receipt template from the image storage, it generates an image print instruction set based on these images and sends the image print instruction set to the printing device. Upon receiving the image print instruction set, the printing device marks the image print instruction set with an index, which serves as the image print instruction set index, and then sends it to the printing server. The printing device server receives the image printing instruction set index sent by the printing device. When generating a printing instruction set based on multiple receipt images, printable instance data provided by the front end, and the printable receipt template, specifically, it generates a text printing instruction set based on the printable instance data and printable receipt template, establishing a correspondence between the image printing instruction set index and the text printing instruction set. When sending the printing instruction set to the printing device located in the merchant's store, specifically, it sends the text printing instruction set to the printing device and also sends the correspondence between the image printing instruction set index and the text printing instruction set to the printing device. As one embodiment, the printing device server sets the image printing instruction set index by obtaining multiple receipt images corresponding to the printable receipt template from the image storage terminal and generating an image printing instruction set based on these multiple receipt images. In this embodiment, the printing device server sets an image printing instruction set index for the image printing instruction set and sends the image printing instruction set and the image printing instruction set index to the printing device. When generating a print instruction set based on multiple receipt images, printable instance data provided by the front end, and printable receipt templates, specifically, a text print instruction set is generated based on the printable instance data and printable receipt templates provided by the front end, establishing a correspondence between image print instruction set indexes and text print instruction sets. When sending the print instruction set to the printing equipment set up in the merchant's store, specifically, the text print instruction set is sent to the printing equipment, along with the correspondence between the image print instruction set indexes and the text print instruction sets.
[0139] In the second method of generating print instruction sets, after obtaining the image print instruction set index, the printing device can know which image print instruction set corresponds to the print instruction set sent by the printing device server, and then the printing device prints the receipt according to the image print instruction set and the print instruction set.
[0140] The third method involves real-time encoding and issuing print command sets while the receipt is previewed on the front end. In practice, if the printing device server receives the preview print command from the front end, it generates an image print command set based on multiple receipt images, a receipt text print command set based on the receipt template, and obtains the print command set from both the image and text sets. This print command set is then sent to the printing device, which prints the receipt according to the command set. It should be noted that the printing device server generates the print command set by calling the Napos SDK.
[0141] Third Embodiment
[0142] Corresponding to the first and second embodiments, the third embodiment of this application provides a receipt printing method, applied to a printing device installed in a merchant's shop. The parts in the third embodiment that are the same as those in the first and second embodiments will not be described again; please refer to the relevant parts of the first and second embodiments for details.
[0143] Please refer to Figure 10, which is a flowchart of the receipt printing method provided in the third embodiment of this application.
[0144] The receipt printing method of this application embodiment is applied to printing equipment installed in a merchant's shop, and includes the following steps. Step S1001: Obtain a printing instruction set sent by the printing equipment server in the cloud. The printing instruction set is generated based on multiple receipt images, printable instance data provided by the front end, and a print receipt template. The print receipt template includes image identification data corresponding to multiple receipt images and display position information corresponding to each receipt image. The print receipt template is set by the merchant through the front end and sent by the front end to the printing equipment server. The multiple receipt images are obtained by the merchant through the multiple receipt image editing area in the print receipt template setting interface displayed on the front end. The multiple receipt images are sent by the front end to the image storage terminal in the cloud, and the printing equipment server obtains them from the image storage terminal according to the image identification data of the multiple receipt images in the print receipt template set by the merchant. Step S1002: Print the receipt displaying the multiple receipt images according to the printing instruction set.
[0145] Optionally, it also includes: obtaining multiple receipt images corresponding to the printed receipt template sent by the printing device server; setting an image index for identifying the multiple receipt images as a printing device image index; and sending the printing device image index to the printing device server.
[0146] Optionally, it further includes: obtaining an image printing instruction set sent by the printing device server, the image printing instruction set being generated based on multiple receipt images corresponding to the receipt template; setting an image printing instruction set index for the image printing instruction set; sending the image printing instruction set index to the printing device server; obtaining the correspondence between the image printing instruction set index and the text printing instruction set, the text printing instruction set being generated based on the printable instance data provided by the front end and the receipt template; obtaining the text printing instruction set sent by the printing device server based on the correspondence between the image printing instruction set index and the text printing instruction set; and printing a receipt displaying the multiple receipt images according to the printing instruction set, including: printing a receipt displaying the multiple receipt images according to the image printing instruction set and the text printing instruction set.
[0147] Optionally, it also includes: obtaining an image printing instruction set and an image printing instruction set index sent by the printing device server, wherein the image printing instruction set is generated based on multiple receipt images corresponding to the receipt template; obtaining a correspondence between the image printing instruction set index sent by the printing device server and a text printing instruction set, wherein the text printing instruction set is generated based on the printable instance data provided by the front end and the receipt template; obtaining the text printing instruction set based on the correspondence between the image printing instruction set index sent by the printing device server and the text printing instruction set; and printing a receipt displaying the multiple receipt images according to the printing instruction set, including: printing a receipt displaying the multiple receipt images according to the image printing instruction set and the text printing instruction set.
[0148] Optionally, it also includes: obtaining an image printing instruction set and a receipt text printing instruction set sent by the printing device server, wherein the image printing instruction set is generated based on the plurality of receipt images, and the receipt text printing instruction set is generated based on the printed receipt template; the step of printing a receipt displaying the plurality of receipt images according to the printing instruction set includes: printing a receipt displaying the plurality of receipt images according to the image printing instruction set and the receipt text printing instruction set.
[0149] Fourth embodiment
[0150] Corresponding to the first embodiment, the fourth embodiment of this application provides a method for setting up a printed receipt, applied to the front end for setting up a printed receipt template. The parts in the fourth embodiment that are the same as in the first embodiment will not be described again; please refer to the relevant parts of the first embodiment for details.
[0151] Please refer to Figure 11, which is a flowchart of the method for setting up a printed receipt provided in the fourth embodiment of this application.
[0152] The receipt printing setting method of this application embodiment is applied to the front end of setting a receipt printing template, and includes the following steps: Step S1101: Display a print color selection component for merchants to select the receipt printing color in the receipt printing template setting interface. Step S1102: Obtain the receipt printing color data selected by the merchant through the print color selection component. Step S1103: Send the receipt printing template set by the merchant to the printing device server in the cloud. The receipt printing template includes the receipt printing color data selected by the merchant, so that the printing device server converts the color of the receipt data to be printed on the receipt to the receipt printing color selected by the merchant according to the receipt printing color data selected by the merchant. When it is necessary to print a receipt according to the receipt printing template set by the merchant, a print instruction set is generated according to the receipt printing template and the printable instance data provided by the front end. The print instruction set is sent to the printing device set in the store operated by the merchant, so that the printing device prints a receipt with the receipt data color of the receipt printing color selected by the merchant according to the print instruction set.
[0153] Optionally, the receipt printing color available for the merchant to select in the print color selection component is a receipt printing color supported by the printing device.
[0154] Optionally, the method further includes: obtaining multiple receipt images uploaded by the merchant; detecting whether the color types of the multiple receipt images uploaded by the merchant are consistent with the color types corresponding to the receipt printing color data selected by the merchant; if not, converting the colors of the multiple receipt images uploaded by the merchant according to the color types corresponding to the receipt printing color data selected by the merchant to obtain multiple receipt images after color conversion; displaying the multiple receipt images after color conversion; responding to the merchant's confirmation operation for the multiple receipt images after color conversion, sending the multiple receipt images after color conversion as images displayed on the receipts printed by the printing device to the image storage terminal in the cloud; the printing device server also obtains the multiple receipt images after color conversion from the image storage terminal; the step of generating a printing instruction set based on the printed receipt template and the printable instance data provided by the front end includes: generating a printing instruction set based on the multiple receipt images after color conversion, the printable instance data provided by the front end, and the printed receipt template. It should be noted that after the front-end receives multiple receipt images uploaded by the merchant, it needs to determine whether the color of the image corresponds to the color type of the receipt printing color data selected by the merchant. If it does, the image can be sent directly to the cloud image storage. If not, the image color needs to be converted according to the color type of the receipt printing color data selected by the merchant.
[0155] This application provides a method for setting up receipt printing. This method allows merchants to select receipt printing color data using a color selection component in the receipt template settings interface. The receipt template, including the merchant's selected color data, is then sent to a cloud-based printing device server. The server converts the colors of the receipt data to the merchant's chosen color. When a receipt needs to be printed based on the merchant's template, a printing instruction set is generated using the template and the printable instance data provided by the front end. This instruction set is then sent to the printing device located in the merchant's store, enabling the device to print a receipt with the merchant's selected color. This method allows merchants to set up the receipt template and select the color data using the color selection component, enabling the printing device to print color receipts. This solves the problem of printing devices only being able to print black and white receipts, thus improving printing efficiency.
[0156] Fifth embodiment
[0157] Corresponding to the fourth embodiment, the fifth embodiment of this application provides a receipt printing method applied to a cloud-based printing device server. The parts in the fifth embodiment that are the same as those in the fourth embodiment will not be described again; please refer to the relevant parts of the fourth embodiment for details.
[0158] Please refer to Figure 12, which is a flowchart of the receipt printing method provided in the fifth embodiment of this application.
[0159] The receipt printing method of this application embodiment is applied to a cloud-based printing device server and includes the following steps: Step S1201: Obtain a receipt template set by the merchant, the receipt template including the receipt printing color data selected by the merchant; Step S1202: When a receipt needs to be printed according to the receipt template, generate a printing instruction set based on the receipt template and the printable instance data provided by the front end, and send the printing instruction set to the printing device set up in the store operated by the merchant, so that the printing device prints a receipt with the receipt data color selected by the merchant according to the printing instruction set.
[0160] Optionally, the color represented by the receipt printing color data selected by the merchant is the receipt printing color supported by the printing device.
[0161] Optionally, the method further includes: obtaining multiple receipt images from a cloud-based image storage terminal, wherein the multiple receipt images stored in the image storage terminal are obtained based on multiple receipt images uploaded by the merchant to the front end; detecting whether the color types of the multiple receipt images stored in the image storage terminal are consistent with the color types corresponding to the receipt printing color data selected by the merchant; if not, converting the colors of the multiple receipt images stored in the image storage terminal according to the color types corresponding to the receipt printing color data selected by the merchant to obtain multiple color-converted receipt images, which are then displayed as images on the receipts printed by the printing device; the step of generating a printing instruction set based on the printed receipt template and the printable instance data provided by the front end includes: generating a printing instruction set based on the color-converted multiple receipt images, the printable instance data provided by the front end, and the printed receipt template. It should be noted that the multiple receipt images stored in the image storage terminal can be the original images uploaded by the merchant, images processed by a size adjustment strategy, or images that have already been color-converted. In practice, after the printing server obtains multiple receipt images from the image storage terminal, it needs to determine whether the colors of the images are supported by the printing colors selected by the merchant. If they are, the printing server does not need to convert the colors of the multiple receipt images obtained from the image storage terminal. If not, the printing server needs to convert the colors of the multiple receipt images obtained from the image storage terminal.
[0162] Sixth Embodiment
[0163] Corresponding to the fourth and fifth embodiments, the sixth embodiment of this application provides a receipt printing method, applied to a printing device installed in a merchant's shop. The parts of the sixth embodiment that are the same as those in the fourth and fifth embodiments will not be described again; please refer to the relevant parts of the fourth and fifth embodiments for details.
[0164] Please refer to Figure 13, which is a flowchart of the receipt printing method provided in the sixth embodiment of this application.
[0165] The receipt printing method of this application embodiment is applied to a printing device installed in a merchant's shop, and includes the following steps. Step S1301: Obtain a printing instruction set sent by the printing device server in the cloud. The printing instruction set is generated based on a receipt template and data of an instance to be printed. The receipt template includes the receipt printing color data selected by the merchant. The receipt template is set by the merchant through a front-end and sent by the front-end to the printing device server. The receipt printing color data selected by the merchant is selected by the merchant through a printing color selection component in the receipt template setting interface displayed on the front-end. The data of the instance to be printed is provided to the printing device server by the front-end. Step S1302: Print a receipt with the receipt data color of the receipt printing color selected by the merchant according to the printing instruction set.
[0166] Optionally, the color represented by the receipt printing color data selected by the merchant is the receipt printing color supported by the printing device.
[0167] Optionally, the printing instruction set is generated based on multiple color-converted receipt images, a printed receipt template, and data of the instance to be printed. The multiple color-converted receipt images are the images to be displayed on the receipts printed by the printing device. The multiple color-converted receipt images are obtained by converting the colors of multiple receipt images uploaded by the merchant through the front end based on the receipt printing color data selected by the merchant.
[0168] Seventh Embodiment
[0169] Corresponding to the receipt printing setting method provided in the first embodiment of this application, the seventh embodiment of this application also provides a receipt printing setting device. Since the device embodiment is basically similar to the first embodiment, the description is relatively simple; relevant details can be found in the description of the first embodiment. The device embodiments described below are merely illustrative.
[0170] Please refer to Figure 14, which is a schematic diagram of the receipt printing device provided in the seventh embodiment of this application.
[0171] The receipt setting device 1400 is used in the front end for setting a receipt template. The device includes: a first display unit 1401, used to display a receipt image editing area for merchants to set receipt images in a receipt template setting interface; a first obtaining unit 1402, used to obtain multiple receipt images set by the merchant and the display position information corresponding to each receipt image through multiple receipt image editing areas; a first sending unit 1403, used to send the multiple receipt images to the cloud; a second obtaining unit 1404, used to obtain image identification data corresponding to the multiple receipt images; a first generating unit 1405, used to generate a receipt template containing image identification data based on the display position information; and a second sending unit 1406, used to send the receipt template to the cloud, so that the cloud obtains the multiple receipt images according to the image identification data, and instructs the printing equipment set in the store operated by the merchant to print receipts displaying the multiple receipt images based on the receipt template.
[0172] Eighth embodiment
[0173] Corresponding to the second embodiment, the eighth embodiment of this application provides a receipt printing device. Since the device embodiment is basically similar to the second embodiment, the description is relatively simple; relevant details can be found in the description of the second embodiment. The device embodiments described below are merely illustrative.
[0174] Please refer to Figure 15, which is a schematic diagram of the receipt printing device provided in the eighth embodiment of this application.
[0175] The receipt printing device 1500 is applied to a cloud-based printing equipment server. The device includes: a third obtaining unit 1501, used to obtain a printing receipt template set by a merchant, the printing receipt template including image identification data corresponding to multiple receipt images and display position information corresponding to each receipt image; a fourth obtaining unit 1502, used to obtain multiple receipt images corresponding to the printing receipt template from a cloud-based image storage terminal based on the image identification data of the multiple receipt images in the printing receipt template, the multiple receipt images being provided to the image storage terminal by the front end that sets the printing receipt template; and an indicating unit 1503, used to, when a receipt needs to be printed according to the printing receipt template, instruct the printing equipment set in the store operated by the merchant to print a receipt displaying the multiple receipt images.
[0176] Ninth Embodiment
[0177] Corresponding to the third embodiment, the ninth embodiment of this application provides a receipt printing device. Since the device embodiment is basically similar to the third embodiment, the description is relatively simple; relevant details can be found in the description of the third embodiment. The device embodiments described below are merely illustrative.
[0178] Please refer to Figure 16, which is a schematic diagram of the receipt printing device provided in the ninth embodiment of this application.
[0179] The receipt printing device 1600 is applied to printing equipment installed in a merchant's shop. The device includes: a fifth obtaining unit 1601, used to print a receipt displaying multiple receipt images according to the receipt template when a receipt needs to be printed; and a first printing unit 1602, used to print a receipt displaying multiple receipt images according to the printing instruction set.
[0180] Tenth Embodiment
[0181] Corresponding to the fourth embodiment, the tenth embodiment of this application provides a receipt printing device. Since the device embodiment is basically similar to the fourth embodiment, the description is relatively simple; relevant details can be found in the description of the fourth embodiment. The device embodiments described below are merely illustrative.
[0182] Please refer to Figure 17, which is a schematic diagram of the receipt printing device provided in the tenth embodiment of this application.
[0183] The receipt setting device 1700 is used in the front end for setting a receipt template. The device includes: a second display unit 1701 for displaying a print color selection component for merchants to choose the print color of the receipt in the receipt template setting interface; a sixth obtaining unit 1702 for obtaining the print color data selected by the merchant through the print color selection component; and a third sending unit 1703 for sending the receipt template set by the merchant to a cloud-based printing device server, wherein the receipt template includes the print color data selected by the merchant. This allows the printing device server to convert the color of the receipt data to be printed on the receipt according to the receipt printing color data selected by the merchant. When it is necessary to print a receipt according to the receipt template set by the merchant, a printing instruction set is generated based on the receipt template and the printable instance data provided by the front end. The printing instruction set is then sent to the printing device set up in the store operated by the merchant, so that the printing device can print a receipt with the receipt data color selected by the merchant according to the printing instruction set.
[0184] Eleventh Embodiment
[0185] Corresponding to the fifth embodiment, the eleventh embodiment of this application provides a receipt printing device. Since the device embodiment is basically similar to the fifth embodiment, the description is relatively simple; relevant details can be found in the description of the fifth embodiment. The device embodiment described below is merely illustrative.
[0186] Please refer to Figure 18, which is a schematic diagram of the receipt printing device provided in the eleventh embodiment of this application.
[0187] The receipt printing device 1800 is applied to a cloud-based printing server. The device includes: a seventh obtaining unit 1801, used to obtain a receipt template set by the merchant, the receipt template including the receipt printing color data selected by the merchant; and a second generating unit 1802, used to generate a printing instruction set based on the receipt template and the printable instance data provided by the front end when a receipt needs to be printed, and send the printing instruction set to the printing equipment set up in the store operated by the merchant, so that the printing equipment prints a receipt with the receipt data color selected by the merchant according to the printing instruction set.
[0188] Twelfth Embodiment
[0189] Corresponding to the sixth embodiment, the twelfth embodiment of this application provides a receipt printing device. Since the device embodiment is basically similar to the sixth embodiment, the description is relatively simple; relevant details can be found in the description of the sixth embodiment. The device embodiments described below are merely illustrative.
[0190] Please refer to Figure 19, which is a schematic diagram of the receipt printing device provided in the twelfth embodiment of this application.
[0191] The receipt printing device 1900 is applied to printing equipment installed in a merchant's shop. The device includes: an eighth obtaining unit 1901, used to obtain a set of printing instructions sent by a cloud-based printing equipment server. The set of printing instructions is generated based on a receipt template and data of an instance to be printed. The receipt template includes the receipt printing color data selected by the merchant. The receipt template is set by the merchant through a front-end and sent to the printing equipment server by the front-end. The receipt printing color data selected by the merchant is selected by the merchant through a printing color selection component in the receipt template setting interface displayed on the front-end. The data of the instance to be printed is provided to the printing equipment server by the front-end; and a second printing unit 1902, used to print a receipt with the receipt data color matching the receipt printing color selected by the merchant, according to the set of printing instructions.
[0192] Thirteenth Embodiment
[0193] Corresponding to the methods of the first to sixth embodiments of this application, the thirteenth embodiment of this application also provides an electronic device.
[0194] As shown in Figure 20, Figure 20 is a schematic diagram of an electronic device provided in the thirteenth embodiment of this application.
[0195] In this embodiment, an optional hardware structure of the electronic device 2000, as shown in FIG20, includes: at least one processor 2001, at least one memory 2002, and at least one communication bus 2005; the memory 2002 contains a program 2003 and data 2004. The bus 2005 can be a communication device for transmitting data between components within the electronic device 2000, such as an internal bus (e.g., CPU-memory bus, where the processor is the central processing unit, or CPU for short) or an external bus (e.g., a Universal Serial Bus port, a Peripheral Component Interconnect Fast Port). Additionally, the electronic device also includes: at least one network interface 2006 and at least one peripheral interface 2007. Network interface 2006 provides wired or wireless communication with external network 2008 (e.g., the Internet, intranet, local area network, mobile communication network, etc.). In some embodiments, network interface 2006 may include any number of network interface controllers (NICs), radio frequency (RF) modules, repeaters, transceivers, modems, routers, gateways, any combination of wired network adapters, wireless network adapters, Bluetooth adapters, infrared adapters, near field communication (NFC) adapters, cellular network chips, etc. Peripheral interface 2007 is used to connect to peripherals, which may be peripheral 1 (2009 in Figure 20), peripheral 2 (2010 in Figure 20), and peripheral 3 (2011 in Figure 20) as shown in the figure. Peripherals are peripheral devices, which may include, but are not limited to, cursor control devices (e.g., mouse, touchpad, or touchscreen), keyboards, and displays (e.g., cathode ray tube displays, liquid crystal displays). The display or light-emitting diode display, video input device (e.g., camera or input interface coupled to a video file), etc. The processor 2001 may be a CPU, an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The memory 2002 may include high-speed RAM (Random Access Memory) and may also include non-volatile memory, such as at least one disk storage device. The processor 2001 invokes programs and data stored in the memory 2002 to execute the methods of the first to sixth embodiments of this application.
[0196] Fourteenth Embodiment
[0197] Corresponding to the methods of the first to sixth embodiments of this application, the fourteenth embodiment of this application also provides a computer storage medium storing a computer program that is executed by a processor to perform the methods of the first to sixth embodiments of this application.
[0198] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
[0199] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-persistent storage in computer-readable media, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media. 1. Computer-readable media includes both permanent and non-persistent, removable and non-removable media. Information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media do not include non-transitory computer-readable storage media, such as modulated data signals and carrier waves. 2. Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
Claims
1. A method of setting a print slip, characterized by, The method, applied to setting up a print receipt template in the front end, includes: The receipt template settings interface displays a receipt image editing area for merchants to set receipt images; By using multiple receipt image editing areas, the merchant can obtain multiple receipt images set up and the display position information corresponding to each receipt image. Send the multiple receipt images to the cloud; Obtain the image identification data corresponding to the multiple receipt images; Generate a printable receipt template containing image identifier data based on the displayed location information; The printed receipt template is sent to the cloud, so that the cloud can obtain the multiple receipt images based on the image identification data, and print receipts displaying the multiple receipt images based on the printing equipment set in the store operated by the merchant, according to the printed receipt template.
2. The method of claim 1, wherein, The display location information corresponding to each receipt image is obtained in the following way: In response to detecting a trigger operation on the settings page regarding the receipt display position, a receipt image editing area for editing the display position is displayed, wherein a display position includes at least one receipt image; In response to detecting an image editing operation on the editing area of the receipt image, the receipt display location information where the image editing operation is located is obtained, and the display location information includes the display location and the editing area location.
3. The method of claim 1, wherein, The cloud includes: a printing device server and an image storage terminal; Sending the multiple receipt images to the cloud includes: Send the multiple receipt images to the image storage terminal; Sending the printed receipt template to the cloud includes: The printed receipt template is sent to the printing device server.
4. The method of claim 3, wherein, The image identification data includes a hash value; The method further includes: Obtain the hash value corresponding to the plurality of receipt images returned by the image storage terminal. The hash value corresponding to the plurality of receipt images is used to identify the plurality of receipt images in the image storage terminal. The process of generating a printable receipt template containing image identifier data based on the display location information includes: Generate a print receipt template containing a hash value based on the displayed location information.
5. The method of claim 4, wherein, The step of obtaining the plurality of receipt images based on the image identification data includes: The multiple receipt images are obtained from the image storage terminal based on the hash values of the multiple receipt images in the receipt template set by the merchant.
6. The method of claim 5, wherein, The step of obtaining the multiple receipt images from the image storage terminal based on the hash values of the multiple receipt images in the receipt template set by the merchant includes: Send an image retrieval request message to the image storage terminal to request the image retrieval request message corresponding to the plurality of receipt images, the image retrieval request message including the hash value corresponding to the plurality of receipt images; Obtain the multiple receipt images returned by the image storage terminal.
7. The method of claim 6, wherein, Also includes: Obtain the link addresses of the multiple receipt images returned by the image storage terminal based on the image retrieval request message; Obtaining the plurality of receipt images returned by the image storage terminal includes: downloading the plurality of receipt images from the image storage terminal according to the link addresses of the plurality of receipt images.
8. The method of claim 1, wherein, The receipt image editing area displayed in the receipt template settings interface for merchants to set receipt images includes: The receipt template settings interface displays multiple receipt image upload entry components for merchants to upload multiple receipt images.
9. The method of claim 8, wherein, The component that displays multiple receipt image upload entry points in the receipt template settings interface for merchants to upload multiple receipt images includes: The merchant logo setting area displays a merchant logo image upload portal component for merchants to upload merchant logo images, while the merchant operation setting area displays a merchant operation image upload portal component for merchants to upload merchant operation images.
10. The method of claim 3, wherein, Also includes: The system checks whether the color scheme of multiple receipt images uploaded by the merchant matches the color scheme of the receipts selected by the merchant for printing. If not, then the colors of the multiple receipt images uploaded by the merchant will be converted according to the receipt printing color selected by the merchant to obtain multiple receipt images after color conversion; Display multiple receipt images after the color conversion; Sending the multiple receipt images to the image storage terminal includes: sending the multiple receipt images after color conversion to the image storage terminal.
11. The method of claim 1, wherein, Also includes: Based on the image color processing strategy, the colors of multiple receipt images uploaded by merchants are processed to obtain multiple receipt images with color processing that meet the preset color requirements; Based on image size processing strategies, the sizes of multiple receipt images uploaded by merchants are adjusted to obtain multiple receipt images with adjusted sizes within the preset image size range.
12. The method of claim 3, wherein, Also includes: Obtain the instance data to be printed; Send a print command to the server of the printing device, the print command including the data of the instance to be printed; The step of instructing the printing equipment installed in the merchant's store to print a receipt displaying the multiple receipt images, based on the printed receipt template and the multiple receipt images, includes: In response to the print command, a print command set is generated based on the multiple receipt images, the printable instance data provided by the front end, and the print receipt template; According to the set of printing instructions, the printing equipment set up in the store operated by the merchant is instructed to print out receipts displaying the multiple receipt images.
13. The method of claim 12, wherein, The process of obtaining the instance data to be printed includes: Obtain order data sent by the order server; The printable instance data is obtained based on the order data.
14. The method of claim 1, wherein, Also includes: If the receipt image is a QR code image containing a QR code, then the QR code in the QR code image is identified to obtain the string information corresponding to the QR code; The string information is sent to the cloud so that the QR code image can be generated based on the string information when the QR code image is needed.
15. A slip printing method characterized by comprising: A cloud-based printing device server, the method comprising: Obtain the print receipt template set by the merchant, wherein the print receipt template includes image identification data corresponding to multiple receipt images and display position information corresponding to each receipt image; Based on the image identification data of multiple receipt images in the printed receipt template, multiple receipt images corresponding to the printed receipt template are obtained from the image storage terminal in the cloud. The multiple receipt images are provided to the image storage terminal by the front end of the printed receipt template. When it is necessary to print a receipt according to the receipt template, the printing equipment set in the store operated by the merchant according to the receipt template will print a receipt displaying the multiple receipt images.
16. The method of claim 15, wherein, The step of printing receipts displaying the multiple receipt images, as indicated by the receipt template and installed in the store operated by the merchant, includes: A printing instruction set is generated based on the multiple receipt images, the printable instance data provided by the front end, and the printable receipt template. The printing instruction set is then sent to the printing equipment located in the store operated by the merchant, so that the printing equipment prints a receipt displaying the multiple receipt images according to the printing instruction set.
17. The method according to claim 15, characterized in that, Also includes: In response to the receipt printing command sent by the front end, obtain the merchant identification information of the merchant to which the front end belongs; Based on the merchant identification information, obtain a printed receipt template and multiple receipt images corresponding to the merchant identification information.
18. The method according to claim 16, characterized in that, Also includes: After obtaining multiple receipt images corresponding to the printed receipt template from the image storage terminal, the multiple receipt images are sent to the printing device; Obtain the image index sent by the printing device for identifying the plurality of receipt images in the printing device, and use it as the printing device image index; The step of generating a print instruction set based on the multiple receipt images, the printable instance data provided by the front end, and the printable receipt template includes: generating a print instruction set based on the print device image index, the printable instance data provided by the front end, and the printable receipt template.
19. The method of claim 16, wherein, Also includes: After obtaining multiple receipt images corresponding to the printed receipt template from the image storage terminal, an image index is set to identify the multiple receipt images in the printing device, serving as the printing device image index; Send the multiple receipt images and the image index of the printing device to the printing device; The step of generating a print instruction set based on the multiple receipt images, the printable instance data provided by the front end, and the printable receipt template includes: generating a print instruction set based on the print device image index, the printable instance data provided by the front end, and the printable receipt template.
20. The method of claim 16, wherein, Also includes: After obtaining multiple receipt images corresponding to the printed receipt template from the image storage terminal, an image printing instruction set is generated based on the multiple receipt images; Send the image printing instruction set to the printing device; Obtain the image printing instruction set index set for the image printing instruction set sent by the printing device; The step of generating a printing instruction set based on the multiple receipt images, the printable instance data provided by the front end, and the printable receipt template includes: generating a text printing instruction set based on the printable instance data provided by the front end and the printable receipt template, and establishing a correspondence between the image printing instruction set index and the text printing instruction set; Sending the print instruction set to the printing device located in the store operated by the merchant includes: sending the document print instruction set to the printing device; The method further includes sending the correspondence between the image printing instruction set index and the document printing instruction set to the printing device.
21. The method of claim 16, wherein, Also includes: After obtaining multiple receipt images corresponding to the printed receipt template from the image storage terminal, an image printing instruction set is generated based on the multiple receipt images; Set the image printing instruction set index for the image printing instruction set; Send the image printing instruction set and the image printing instruction set index to the printing device; The step of generating a printing instruction set based on the multiple receipt images, the printable instance data provided by the front end, and the printable receipt template includes: generating a text printing instruction set based on the printable instance data provided by the front end and the printable receipt template, and establishing a correspondence between the image printing instruction set index and the text printing instruction set; Sending the print instruction set to the printing device located in the store operated by the merchant includes: sending the document print instruction set to the printing device; The method further includes sending the correspondence between the image printing instruction set index and the document printing instruction set to the printing device.
22. The method of claim 16, wherein, Also includes: If a preview print instruction is received from the front end, an image print instruction set is generated based on the multiple receipt images, and a receipt text print instruction set is generated based on the print receipt template. Based on the image printing instruction set and the receipt text printing instruction set, a printing instruction set is obtained; The set of printing instructions is sent to the printing device.
23. A slip printing method characterized by comprising: The method, applicable to printing equipment installed in a merchant-operated store, includes: The system obtains a set of printing instructions sent by a cloud-based printing device server. This set is generated based on multiple receipt images, printable instance data provided by the front end, and a printable receipt template. The printable receipt template includes image identification data corresponding to multiple receipt images and display position information for each image. The template is set by the merchant through the front end and sent to the printing device server. The multiple receipt images are obtained by the merchant through the multiple receipt image editing area in the printable receipt template setting interface displayed on the front end. These images are sent by the front end to an image storage terminal in the cloud, and the printing device server retrieves them from the image storage terminal based on the image identification data of the multiple receipt images in the printable receipt template set by the merchant. Print receipts displaying the multiple receipt images according to the print instruction set.
24. The method of claim 23, wherein, Also includes: Obtain multiple receipt images corresponding to the printed receipt template sent by the printing device server; An image index is set for each of the multiple receipt images to identify the multiple receipt images, serving as an image index for the printing device; The image index of the printing device is sent to the printing device server.
25. The method according to claim 23, characterized in that, Also includes: Obtain the image printing instruction set sent by the printing device server, wherein the image printing instruction set is generated based on multiple receipt images corresponding to the printed receipt template; Set an image printing instruction set index for the aforementioned image printing instruction set; Send the image printing instruction set index to the printing device server; Obtain the correspondence between the image printing instruction set index and the text printing instruction set, wherein the text printing instruction set is generated based on the printable instance data provided by the front end and the print receipt template; Based on the correspondence between the image printing instruction set index and the document printing instruction set, the document printing instruction set sent by the printing device server is obtained; The step of printing receipts displaying the multiple receipt images according to the print instruction set includes: Print receipts displaying the multiple receipt images according to the image printing instruction set and the text printing instruction set.
26. The method according to claim 23, characterized in that, Also includes: Obtain the image printing instruction set and image printing instruction set index sent by the printing device server. The image printing instruction set is generated based on multiple receipt images corresponding to the printed receipt template. Obtain the correspondence between the image printing instruction set index and the document printing instruction set sent by the printing device server, wherein the document printing instruction set is generated based on the printable instance data provided by the front end and the print receipt template; The document printing instruction set is obtained based on the correspondence between the image printing instruction set index and the document printing instruction set sent by the printing device server. The step of printing receipts displaying the multiple receipt images according to the print instruction set includes: Print receipts displaying the multiple receipt images according to the image printing instruction set and the text printing instruction set.
27. The method according to claim 23, characterized in that, Also includes: Obtain the image printing instruction set and the receipt text printing instruction set sent by the printing device server. The image printing instruction set is generated based on the multiple receipt images, and the receipt text printing instruction set is generated based on the printed receipt template. The step of printing receipts displaying the multiple receipt images according to the print instruction set includes: Print receipts displaying the multiple receipt images according to the image printing instruction set and the receipt text printing instruction set.
28. A method for setting up a printed receipt, characterized in that, The method, applied to setting up a print receipt template in the front end, includes: The print receipt template settings interface displays a print color selection component for merchants to choose the print color of the receipt; The receipt printing color data selected by the merchant is obtained through the printing color selection component; The merchant's printed receipt template is sent to the cloud-based printing device server. The printed receipt template includes the receipt printing color data selected by the merchant. The printing device server then converts the color of the receipt data to be printed in the receipt to the color selected by the merchant. When a receipt needs to be printed based on the merchant's printed receipt template, a printing instruction set is generated based on the printed receipt template and the printable instance data provided by the front end. The printing instruction set is then sent to the printing device located in the merchant's store, so that the printing device prints a receipt with the receipt data color selected by the merchant.
29. The method of claim 28, wherein, The receipt printing color available for selection by the merchant in the print color selection component is the receipt printing color supported by the printing device.
30. The method of claim 28, wherein, Also includes: Obtain multiple receipt images uploaded by the merchant; The color scheme of the multiple receipt images uploaded by the merchant is checked to see if it matches the color scheme of the receipt printing color data selected by the merchant. If not, then convert the colors of the multiple receipt images uploaded by the merchant according to the color type corresponding to the receipt printing color data selected by the merchant, and obtain multiple receipt images after color conversion; Displaying multiple receipts after the color conversion; In response to the merchant's confirmation of the multiple receipt images after color conversion, the multiple receipt images after color conversion are sent to the image storage terminal in the cloud as images displayed on the receipts printed by the printing device. The printing device server also obtains the multiple color-converted receipt images from the image storage terminal; The step of generating a printing instruction set based on the printed receipt template and the printable instance data provided by the front end includes: generating a printing instruction set based on the multiple color-converted receipt images, the printable instance data provided by the front end, and the printed receipt template.
31. A slip printing method characterized by comprising: A cloud-based printing device server, the method comprising: Obtain the receipt template set by the merchant, the receipt template including the receipt printing color data selected by the merchant; When a receipt needs to be printed according to the receipt template, a printing instruction set is generated based on the receipt template and the printable instance data provided by the front end. The printing instruction set is then sent to the printing equipment set up in the store operated by the merchant, so that the printing equipment prints a receipt with the receipt data color selected by the merchant according to the printing instruction set.
32. The method of claim 31, wherein, The color selected by the merchant for the receipt printing color data represents the receipt printing colors supported by the printing device.
33. The method according to claim 31, characterized in that, Also includes: Multiple receipt images are obtained from the image storage terminal in the cloud, and the multiple receipt images stored in the image storage terminal are obtained based on the multiple receipt images uploaded by the merchant to the front end; The color types of the multiple receipt images stored in the image storage terminal are checked to see if they match the color types corresponding to the receipt printing color data selected by the merchant. If not, the colors of the multiple receipt images stored in the image storage terminal are converted according to the color type corresponding to the receipt printing color data selected by the merchant, and the multiple receipt images after color conversion are obtained as images displayed on the receipt printed by the printing device. The step of generating a printing instruction set based on the printed receipt template and the printable instance data provided by the front end includes: generating a printing instruction set based on the multiple color-converted receipt images, the printable instance data provided by the front end, and the printed receipt template.
34. A method for printing receipts, characterized in that, The method, applicable to printing equipment installed in a merchant-operated store, includes: The system receives a set of printing instructions sent by the cloud-based printing device server. This set of instructions is generated based on a receipt template and data of instances to be printed. The receipt template includes the receipt printing color data selected by the merchant. The receipt template is set by the merchant through a front-end and sent to the printing device server by the front-end. The receipt printing color data selected by the merchant is chosen by the merchant through a printing color selection component in the receipt template settings interface displayed on the front-end. The data of instances to be printed is provided to the printing device server by the front-end. According to the print instruction set, print a receipt with the color of the receipt data selected by the merchant.
35. The method of claim 34, wherein, The color data for receipt printing selected by the merchant represents the receipt printing colors supported by the printing device.
36. The method according to claim 34, characterized in that, The printing instruction set is generated based on multiple color-converted receipt images, a printed receipt template, and data of the instance to be printed. The multiple color-converted receipt images are the images to be displayed on the receipts printed by the printing device. The multiple color-converted receipt images are obtained by converting the colors of multiple receipt images uploaded by the merchant through the front end based on the receipt printing color data selected by the merchant.
37. A print receipt setting device, characterized by comprising: The device, used for setting up a print receipt template, includes: The first display unit is used to display the receipt image editing area for merchants to set receipt images in the receipt template settings interface; The first obtaining unit is used to obtain multiple receipt images set by the merchant and the display position information corresponding to each receipt image through multiple receipt image editing areas; The first sending unit is used to send the multiple receipt images to the cloud; The second obtaining unit is used to obtain image identification data corresponding to the plurality of receipt images; The first generation unit is used to generate a printable receipt template containing image identification data based on the display location information; The second sending unit is used to send the printed receipt template to the cloud, so that the cloud can obtain the multiple receipt images according to the image identification data, and print receipts displaying the multiple receipt images based on the printing receipt template and the printing equipment set in the store operated by the merchant.
38. A receipt printing device, characterized in that, A cloud-based printing device server, the device comprising: The third obtaining unit is used to obtain the printed receipt template set by the merchant. The printed receipt template includes image identification data corresponding to multiple receipt images and display position information corresponding to each receipt image. The fourth obtaining unit is used to obtain multiple receipt images corresponding to the printing receipt template from the image storage terminal in the cloud based on the image identification data of multiple receipt images in the printing receipt template. The multiple receipt images are provided to the image storage terminal by the front end of the printing receipt template. The instruction unit is used to, when it is necessary to print a receipt according to the printed receipt template, instruct the printing equipment set in the store operated by the merchant to print a receipt displaying the multiple receipt images.
39. A receipt printing device, characterized in that, A printing device for use in a merchant-operated store, the device comprising: The fifth obtaining unit is used to obtain a set of printing instructions sent by the printing device server in the cloud. The set of printing instructions is generated based on multiple receipt images, printable instance data provided by the front end, and a printable receipt template. The printable receipt template includes image identification data corresponding to multiple receipt images and display position information corresponding to each receipt image. The printable receipt template is set by the merchant through the front end and sent to the printing device server by the front end. The multiple receipt images are obtained by the merchant through the multiple receipt image editing area in the printable receipt template setting interface displayed on the front end. The multiple receipt images are sent by the front end to the image storage terminal in the cloud, and the printing device server obtains them from the image storage terminal based on the image identification data of the multiple receipt images in the printable receipt template set by the merchant. The first printing unit is used to print receipts displaying the multiple receipt images according to the printing instruction set.
40. A receipt printing device, characterized in that, The device, used for setting up a print receipt template, includes: The second display unit is used to display the print color selection component for merchants to select the print color of the receipt in the print receipt template settings interface; The sixth obtaining unit is used to obtain the receipt printing color data selected by the merchant through the printing color selection component; The third sending unit is used to send the receipt template set by the merchant to the printing device server in the cloud. The receipt template includes the receipt printing color data selected by the merchant, so that the printing device server can convert the color of the receipt data to be printed on the receipt to the receipt printing color selected by the merchant. When it is necessary to print a receipt according to the receipt template set by the merchant, a printing instruction set is generated according to the receipt template and the printable instance data provided by the front end, and the printing instruction set is sent to the printing device set up in the store operated by the merchant, so that the printing device prints a receipt with the receipt data color selected by the merchant according to the printing instruction set.
41. A receipt printing device, characterized in that, A cloud-based printing device server, the device comprising: The seventh obtaining unit is used to obtain the printed receipt template set by the merchant, wherein the printed receipt template includes the receipt printing color data selected by the merchant; The second generation unit is used to generate a printing instruction set based on the printing receipt template and the printable instance data provided by the front end when it is necessary to print a receipt according to the printing receipt template, and send the printing instruction set to the printing equipment set up in the store operated by the merchant, so that the printing equipment prints a receipt with the receipt data color selected by the merchant according to the printing instruction set.
42. A receipt printing apparatus, characterized by comprising: A printing device for use in a merchant-operated store, the device comprising: The eighth obtaining unit is used to obtain a set of printing instructions sent by the printing device server in the cloud. The set of printing instructions is generated based on the receipt template and the data of the instance to be printed. The receipt template includes the receipt printing color data selected by the merchant. The receipt template is set by the merchant through the front end and sent to the printing device server by the front end. The receipt printing color data selected by the merchant is selected by the merchant through the printing color selection component in the receipt template setting interface displayed on the front end. The data of the instance to be printed is provided to the printing device server by the front end. The second printing unit is used to print a receipt with the receipt data color selected by the merchant, according to the printing instruction set.
43. An electronic device, characterized in that, include: processor; A memory for storing a computer program that is executed by a processor to perform the method described in any one of claims 1-36.
44. A computer storage medium, characterized in that, The computer storage medium stores a computer program that is executed by a processor to perform the method described in any one of claims 1-36.