Printing receipt setting method and device and receipt printing method and device
By adding a ticket image editing area to the printing ticket template setting interface of the cloud printer, merchants can set up multiple ticket pictures and their placement information, generate a print ticket template containing picture identification data, and send it to the cloud to realize the printing of color tickets, solving the problem that existing cloud printers can only print text, improve printing efficiency and expand the application scope.
Patent Information
- Application Number
- CN202411963309.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-25
AI Technical Summary
Existing cloud printers can only print text, and can only print black and white text, which seriously restricts its application.
By displaying the ticket image editing area in the print ticket template setting interface, merchants can set up multiple ticket pictures and their placement information, generate a print ticket template containing picture identification data, and send it to the cloud to print color tickets.
It solves the problem that cloud printers can only print text, improves the printing efficiency of orders, and supports color receipt printing, expanding the application scope of cloud printers.
Smart Images

Figure CN119883149A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method for setting up a printed receipt, a method for printing a receipt, a device for setting up a printed receipt, a device for printing a receipt, an electronic device and a computer storage medium. Background Art
[0002] With the development of cloud printing technology, cloud printing technology can be used for printing through various models of cloud printers. When printing the order receipt to be printed, the cloud printer needs to parse the instruction set corresponding to the content of the order receipt to be printed sent by the server into the memory of the cloud printer, and then execute the printing operation.
[0003] However, when using cloud printers to print order receipts, cloud printers can only print text. In addition, for color receipt printing products, traditional Bluetooth and USB printing are usually used, while cloud printers can only print black and white text, which seriously limits the application of cloud printers.
[0004] Therefore, how to solve the problem that cloud printers can only print text and can only print black and white text is an issue that needs to be solved urgently. Summary of the invention
[0005] The present application provides a method for setting up printing receipts, which solves the problem that cloud printers can only print text and can only print black and white text, and improves the printing efficiency of orders; the present application also provides a method for printing receipts, a device for setting up printing receipts, a receipt printing device, an electronic device and a computer storage medium.
[0006] The present application provides a method for setting up a printed receipt, which is applied to a front end for setting up a printed receipt template, the method comprising: displaying a receipt picture editing area for a merchant to set a receipt picture in a printed receipt template setting interface; obtaining a plurality of receipt pictures set by the merchant and display location information corresponding to each receipt picture through a plurality of the receipt picture editing areas; sending the plurality of receipt pictures to a cloud; obtaining picture identification data corresponding to the plurality of receipt pictures; generating a printed receipt template containing the picture identification data based on the display location information; sending the printed receipt template to the cloud, so that the cloud obtains the plurality of receipt pictures according to the picture identification data, and instructs a printing device set up in a store operated by the merchant to print out a receipt displaying the plurality of receipt pictures based on the printed receipt template.
[0007] Optionally, the display location information corresponding to each receipt image is obtained in the following manner:
[0008] In response to detecting a triggering operation on a receipt display position in a setting page, displaying a receipt image editing area for editing the display position, wherein one display position includes at least one receipt image;
[0009] In response to detecting an image editing operation on an editing area of the receipt image, obtaining receipt display position information where the image editing operation is performed, the display position information including a display position and an editing area position.
[0010] Optionally, the cloud includes: a printing device server and a picture storage terminal;
[0011] The sending of the plurality of receipt images to the cloud comprises: sending the plurality of receipt images to the image storage end;
[0012] The sending the printed receipt template to the cloud comprises: sending the printed receipt template to the printing device server.
[0013] Optionally, the image identification data includes a hash value;
[0014] The method further includes: obtaining hash values corresponding to the plurality of receipt images returned by the image storage end, wherein the hash values corresponding to the plurality of receipt images are used to identify the plurality of receipt images in the image storage end;
[0015] The generating of a print receipt template containing image identification data based on the display location information includes: generating a print receipt template containing a hash value based on the display location information.
[0016] Optionally, obtaining the multiple receipt images according to the image identification data includes: obtaining the multiple receipt images from the image storage end according to hash values of the multiple receipt images in a printing receipt template set by the merchant.
[0017] Optionally, obtaining the multiple receipt images from the image storage end according to the hash values of the multiple receipt images in the printed receipt template set by the merchant includes: sending a picture acquisition request message to the picture storage end for requesting to obtain the pictures corresponding to the multiple receipt images, the picture acquisition request message including the hash values corresponding to the multiple receipt images; and obtaining the multiple receipt images returned by the picture storage end.
[0018] Optionally, it also includes: obtaining the link addresses of the multiple receipt images returned by the image storage end according to the image acquisition request message;
[0019] The obtaining of the multiple receipt images returned by the image storage end includes: downloading the multiple receipt images from the image storage end according to the link addresses of the multiple receipt images.
[0020] Optionally, the receipt image editing area displayed in the print receipt template setting interface for the merchant to set the receipt image includes: displaying multiple receipt image upload entry components in the print receipt template setting interface for the merchant to upload multiple receipt images.
[0021] Optionally, the multiple receipt image upload entry components for merchants to upload multiple receipt images are displayed in the receipt printing template setting interface, including: a merchant logo image upload entry component for merchants to upload merchant logo images is displayed in the merchant logo setting area, and a merchant operation image upload entry component for merchants to upload merchant operation images is displayed in the merchant operation area setting area.
[0022] 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 colors selected by the merchant to obtain multiple receipt images after the color conversion; and displaying the multiple receipt images after the color conversion;
[0023] The sending of the plurality of receipt images to the image storage end includes: sending the plurality of receipt images after color conversion to the image storage end.
[0024] 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 after color processing that meet preset color requirements;
[0025] The sizes of multiple receipt images uploaded by the merchant are adjusted based on the image size processing strategy to obtain multiple receipt images after the size adjustment whose sizes are within a preset image size range.
[0026] Optionally, the method further includes: obtaining the instance data to be printed; sending a printing instruction to the printing device server, wherein the printing instruction includes the instance data to be printed;
[0027] The method of instructing a printing device set in a store operated by the merchant to print out a receipt displaying the multiple receipt images based on the print receipt template and the multiple receipt images comprises: in response to the print instruction, generating a print instruction set based on the multiple receipt images, the instance data to be printed provided by the front end, and the print receipt template; and instructing a printing device set in the store operated by the merchant to print out a receipt displaying the multiple receipt images based on the print instruction set.
[0028] Optionally, obtaining the instance data to be printed includes: obtaining order data sent by an order service end; and obtaining the instance data to be printed according to the order data.
[0029] Optionally, it also includes: if the receipt image is a QR code image containing a QR code, 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.
[0030] The present application provides a receipt printing method, which is applied to a printing device server in the cloud, the method comprising: obtaining a printed receipt template set by a merchant, the printed receipt template comprising picture identification data corresponding to a plurality of receipt images and display location information corresponding to each receipt image; obtaining a plurality of receipt images corresponding to the printed receipt template from a picture storage in the cloud according to the picture identification data of the plurality of receipt images in the printed receipt template, the plurality of receipt images being provided to the picture storage by a front end that sets the printed receipt template; when it is necessary to print a receipt according to the printed receipt template, instructing a printing device set in a store operated by the merchant to print out a receipt displaying the plurality of receipt images according to the printed receipt template.
[0031] Optionally, the printing device set in the store operated by the merchant is instructed to print out a receipt displaying the multiple receipt images according to the print receipt template, including: generating a printing instruction set according to the multiple receipt images, the instance data to be printed provided by the front end and the print 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 out a receipt displaying the multiple receipt images according to the printing instruction set.
[0032] Optionally, it also includes: in response to a receipt printing instruction sent by the front end, obtaining merchant identification information of the merchant to which the front end belongs; based on the merchant identification information, obtaining a printed receipt template and multiple receipt images corresponding to the merchant identification information.
[0033] Optionally, the method further includes: after obtaining a plurality of receipt images corresponding to the printed receipt template from the image storage end, sending the plurality of receipt images to the printing device; obtaining an image index sent by the printing device for identifying the plurality of receipt images in the printing device as a printing device image index;
[0034] The method of generating a printing instruction set based on the multiple receipt images, the instance data to be printed provided by the front end, and the printing receipt template includes: generating a printing instruction set based on the printing device image index, the instance data to be printed provided by the front end, and the printing receipt template.
[0035] Optionally, it also includes: after obtaining multiple ticket images corresponding to the print ticket template from the image storage end, setting a picture index for identifying the multiple ticket images in the printing device as a printing device picture index; sending the multiple ticket images and the printing device picture index to the printing device; generating a printing instruction set based on the multiple ticket images, the instance data to be printed provided by the front end and the print ticket template, including: generating a printing instruction set based on the printing device picture index, the instance data to be printed provided by the front end and the print ticket template.
[0036] Optionally, the method further includes: after obtaining a plurality of receipt images corresponding to the receipt printing template from the image storage end, generating a picture printing instruction set according to the plurality of receipt images; sending the picture printing instruction set to the printing device; obtaining a picture printing instruction set index set for the picture printing instruction set sent by the printing device;
[0037] The generating of the printing instruction set according to the plurality of receipt images, the example data to be printed provided by the front end, and the printing receipt template includes: generating a copy printing instruction set according to the example data to be printed provided by the front end and the printing receipt template, and establishing a corresponding relationship between the image printing instruction set index and the copy printing instruction set;
[0038] The sending of the printing instruction set to a printing device disposed in a store operated by the merchant includes: sending the copy printing instruction set to the printing device;
[0039] The method further includes: sending the corresponding relationship between the image printing instruction set index and the document printing instruction set to the printing device.
[0040] Optionally, the method further includes: after obtaining a plurality of receipt images corresponding to the receipt printing template from the image storage end, generating a picture printing instruction set according to the plurality of receipt images; setting a picture printing instruction set index for the picture printing instruction set; and sending the picture printing instruction set and the picture printing instruction set index to the printing device;
[0041] The generating of the printing instruction set according to the plurality of receipt images, the example data to be printed provided by the front end, and the printing receipt template includes: generating a copy printing instruction set according to the example data to be printed provided by the front end and the printing receipt template, and establishing a corresponding relationship between the image printing instruction set index and the copy printing instruction set;
[0042] The sending of the printing instruction set to a printing device disposed in a store operated by the merchant includes: sending the copy printing instruction set to the printing device;
[0043] The method further includes: sending the corresponding relationship between the image printing instruction set index and the document printing instruction set to the printing device.
[0044] Optionally, it also includes: if a preview printing instruction is received from the front end, generating an image printing instruction set based on the multiple receipt images, and generating a receipt text printing instruction set based on the print receipt template; obtaining a printing instruction set based on the image printing instruction set and the receipt text printing instruction set; and sending the printing instruction set to the printing device.
[0045] The present application provides a receipt printing method, which is applied to a printing device set in a store operated by a merchant, the method comprising: obtaining a printing instruction set sent by a printing device server in the cloud, the printing instruction set being generated based on multiple receipt images, instance data to be printed provided by a front end, and a printing receipt template, the printing receipt template comprising image identification data corresponding to multiple receipt images and display location information corresponding to each receipt image, the printing receipt template being set by the merchant through a front end and sent by the front end to the printing device server, the multiple receipt images being obtained by the merchant through multiple receipt image editing areas in a printing receipt template setting interface displayed on the front end, the multiple receipt images being sent by the front end to a picture storage in the cloud, and being obtained by the printing device server from the picture storage based on the image identification data of the multiple receipt images in the printing receipt template set by the merchant; and printing a receipt displaying the multiple receipt images according to the printing instruction set.
[0046] Optionally, it also includes: obtaining multiple receipt images corresponding to the printed receipt template and 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.
[0047] Optionally, it also includes: obtaining an image printing instruction set sent by the printing device server, the image printing instruction set is generated based on multiple ticket images corresponding to the print ticket 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 a correspondence between the image printing instruction set index and a copy printing instruction set, the copy printing instruction set is generated based on the instance data to be printed provided by the front end and the print ticket template; obtaining the copy printing instruction set sent by the printing device server based on the correspondence between the image printing instruction set index and the copy printing instruction set; printing a ticket displaying the multiple ticket images according to the printing instruction set, including: printing a ticket displaying the multiple ticket images according to the image printing instruction set and the copy printing instruction set.
[0048] Optionally, it also includes: obtaining a picture printing instruction set and a picture printing instruction set index sent by the printing device server, wherein the picture printing instruction set is generated according to a plurality of receipt pictures corresponding to the print receipt template; obtaining a correspondence between the picture printing instruction set index sent by the printing device server and a copy printing instruction set, wherein the copy printing instruction set is generated according to the to-be-printed instance data provided by the front end and the print receipt template; obtaining the copy printing instruction set according to the correspondence between the picture printing instruction set index sent by the printing device server and the copy printing instruction set;
[0049] 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 text printing instruction set.
[0050] Optionally, it also includes: obtaining an image printing instruction set and a 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 printing receipt template; 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 receipt text printing instruction set.
[0051] The present application provides a method for setting up a printing receipt, which is applied to a front end for setting up a printing receipt template, the method comprising: displaying a printing color selection component for a merchant to select a printing color for a receipt in a printing receipt template setting interface; obtaining the printing color data for the receipt selected by the merchant through the printing color selection component; sending the printing receipt template set by the merchant to a printing device server on the cloud, the printing receipt template including the printing color data for the receipt selected by the merchant, so that the printing device server converts the color of the receipt data to be printed in the receipt into the printing color of the receipt selected by the merchant according to the printing color data for the receipt selected by the merchant, and when it is necessary to print a receipt according to the printing receipt template set by the merchant, a printing instruction set is generated according to the printing receipt template and the instance data to be printed provided by the front end, and the printing instruction set is sent to a printing device set in a store operated by the merchant, so that the printing device prints out a receipt with the receipt data color as the printing color selected by the merchant according to the printing instruction set.
[0052] Optionally, the receipt printing color for the merchant to select in the printing color selection component is a receipt printing color supported by the printing device.
[0053] Optionally, it also 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, and obtaining multiple receipt images after the color conversion; displaying the multiple receipt images after the color conversion; in response to the merchant's confirmation operation on the multiple receipt images after the color conversion, sending the multiple receipt images after the color conversion as images displayed in the receipt printed by the printing device to the image storage end in the cloud; the printing device server also obtains the multiple receipt images after the color conversion from the image storage end; generating a printing instruction set according to the printing receipt template and the instance data to be printed provided by the front end, including: generating a printing instruction set according to the multiple receipt images after the color conversion, the instance data to be printed provided by the front end and the printing receipt template.
[0054] The present application provides a receipt printing method, which is applied to a printing device server in the cloud, and the method includes: obtaining a receipt printing template set by a merchant, the receipt printing template including receipt printing color data selected by the merchant; when a receipt needs to be printed according to the receipt printing template, generating a printing instruction set according to the receipt printing template and instance data to be printed provided by the front end, and sending the printing instruction set to a printing device set in a store operated by the merchant, so that the printing device prints a receipt with the receipt data color being the receipt printing color selected by the merchant according to the printing instruction set.
[0055] Optionally, the color represented by the receipt printing color data selected by the merchant is a receipt printing color supported by the printing device.
[0056] Optionally, it also includes: obtaining multiple receipt images from a picture storage terminal in the cloud, the multiple receipt images stored in the picture storage terminal are obtained based on the multiple receipt images uploaded by the merchant at the front end; detecting whether the number of color types of the multiple receipt images stored in the picture storage terminal is consistent with the color type corresponding to the receipt printing color data selected by the merchant; if not, converting the colors of the multiple receipt images stored in the picture storage terminal according to the color type corresponding to the receipt printing color data selected by the merchant, and obtaining multiple receipt images after color conversion as images displayed in the receipt printed by the printing device; generating a printing instruction set according to the printing receipt template and the instance data to be printed provided by the front end, including: generating a printing instruction set according to the multiple receipt images after color conversion, the instance data to be printed provided by the front end and the printing receipt template.
[0057] The present application provides a receipt printing method, which is applied to a printing device set in a store operated by a merchant, the method comprising: obtaining a printing instruction set sent by a printing device server in the cloud, the printing instruction set being generated based on a printing receipt template and instance data to be printed, the printing receipt template comprising receipt printing color data selected by the merchant, the printing receipt template being 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 being selected by the merchant through a printing color selection component in a printing receipt template setting interface displayed on the front end, and the instance data to be printed being provided by the front end to the printing device server; according to the printing instruction set, printing a receipt whose receipt data color is the receipt printing color selected by the merchant.
[0058] Optionally, the color represented by the receipt printing color data selected by the merchant is a receipt printing color supported by the printing device.
[0059] Optionally, the printing instruction set is generated based on multiple receipt images after color conversion, a printing receipt template and instance data to be printed. The multiple receipt images after color conversion are images that need to be displayed in the receipt printed by the printing device. The multiple receipt images after color conversion 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.
[0060] The present application provides a device for setting up a printed receipt, which is applied to a front end for setting up a printed receipt template, the device comprising: a first display unit, for displaying a receipt picture editing area for a merchant to set a receipt picture in a printed receipt template setting interface; a first obtaining unit, for obtaining, through a plurality of the receipt picture editing areas, a plurality of receipt pictures set by the merchant and display position information corresponding to each receipt picture; a first sending unit, for sending the plurality of receipt pictures to a cloud; a second obtaining unit, for obtaining picture identification data corresponding to the plurality of receipt pictures; a first generating unit, for generating a printed receipt template containing picture identification data based on the display position information; a second sending unit, for sending the printed receipt template to the cloud, so that the cloud obtains the plurality of receipt pictures according to the picture identification data, and instructs a printing device set up in a store operated by the merchant to print out a receipt displaying the plurality of receipt pictures based on the printed receipt template.
[0061] The present application provides a receipt printing device, which is applied to a printing device server in the cloud, and the device includes: a third obtaining unit, which is used to obtain a printed receipt template set by a merchant, and the printed receipt template includes picture identification data corresponding to multiple receipt images and display location information corresponding to each receipt image; a fourth obtaining unit, which is used to obtain multiple receipt images corresponding to the printed receipt template from a picture storage end in the cloud according to the picture identification data of the multiple receipt images in the printed receipt template, and the multiple receipt images are provided to the picture storage end by a front end that sets the printed receipt template; an instructing unit, which is used to instruct a printing device set in a store operated by the merchant to print out a receipt displaying the multiple receipt images according to the printed receipt template when a receipt needs to be printed according to the printed receipt template.
[0062] The present application provides a receipt printing device, which is applied to a printing device set up in a store operated by a merchant, and the device includes: a fifth obtaining unit, which is used to obtain a printing instruction set sent by a printing device server on the cloud, the printing instruction set is generated based on multiple receipt images, instance data to be printed provided by a front end, and a printing receipt template, the printing receipt template includes image identification data corresponding to multiple receipt images and display location information corresponding to each receipt image, the printing receipt template is set by the merchant through a front end and sent by the front end to the printing device server, the multiple receipt images are obtained by the merchant through multiple receipt image editing areas in a printing receipt template setting interface displayed on the front end, the multiple receipt images are sent by the front end to a picture storage end on the cloud, and are obtained from the picture storage end by the printing device server according to the image identification data of the multiple receipt images in the printing receipt template set by the merchant; a first printing unit, which is used to print a receipt displaying the multiple receipt images according to the printing instruction set.
[0063] The present application provides a device for setting up a printing receipt, which is applied to a front end for setting up a printing receipt template, the device comprising: a second display unit, for displaying a printing color selection component for a merchant to select a printing color for a receipt in a printing receipt template setting interface; a sixth obtaining unit, for obtaining the printing color data for the receipt selected by the merchant through the printing color selection component; a third sending unit, for sending the printing receipt template set by the merchant to a printing device server on the cloud, the printing receipt template comprising the printing color data for the receipt selected by the merchant, so that the printing device server converts the color of the receipt data to be printed in the receipt into the printing color of the receipt selected by the merchant according to the printing color data for the receipt selected by the merchant, and when it is necessary to print a receipt according to the printing receipt template set by the merchant, a printing instruction set is generated according to the printing receipt template and the instance data to be printed provided by the front end, and the printing instruction set is sent to a printing device set in a store operated by the merchant, so that the printing device prints out a receipt with the color of the receipt data being the printing color of the receipt selected by the merchant according to the printing instruction set.
[0064] The present application provides a receipt printing device, which is applied to a printing device server in the cloud, and the device includes: a seventh obtaining unit, which is used to obtain a receipt printing template set by a merchant, and the receipt printing template includes receipt printing color data selected by the merchant; a second generating unit, which is used to generate a printing instruction set according to the receipt printing template and the instance data to be printed provided by the front end when a receipt needs to be printed according to the receipt printing template, and send the printing instruction set to a printing device set in a store operated by the merchant, so that the printing device prints a receipt with the receipt data color as the receipt printing color selected by the merchant according to the printing instruction set.
[0065] The present application provides a receipt printing device, which is applied to a printing device set up in a store operated by a merchant, the device comprising: an eighth obtaining unit, used to obtain a printing instruction set sent by a printing device server in the cloud, the printing instruction set is generated based on a printing receipt template and instance data to be printed, the printing receipt template includes receipt printing color data selected by the merchant, the printing 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 a printing receipt template setting interface displayed on the front end, and the instance data to be printed is provided to the printing device server by the front end; a second printing unit, used to print out a receipt whose receipt data color is the receipt printing color selected by the merchant according to the printing instruction set.
[0066] The present application provides an electronic device, comprising: a processor; a memory for storing a computer program, wherein the computer program is run by the processor to execute the above-mentioned receipt setting method and receipt printing method.
[0067] The present application provides a computer storage medium, which stores a computer program. The computer program is run by a processor to execute the above-mentioned receipt setting method and receipt printing method.
[0068] Compared with the prior art, the embodiments of the present application have the following advantages:
[0069] The present application provides a method for setting up a printed receipt, which can obtain multiple receipt images set by a merchant and the display location information corresponding to each receipt image through the receipt image editing area in the printed receipt template setting interface, then send the multiple receipt images to the cloud, obtain the image identification data corresponding to the multiple receipt images, and then generate a printed receipt template containing the image identification data based on the display location information, and finally send 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 device set in the store operated by the merchant to print out 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 in the printed receipt through multiple receipt image editing areas, so that the printing device can print a printed receipt with a mixture of multiple images and text, which solves the problem that the printing device can only print printed receipts with text, thereby improving the printing efficiency of the printed receipt.
[0070] The present application provides a printing receipt setting method, which can select the receipt printing color data through the printing color selection component in the printing receipt template setting interface, and send the printing receipt template including the receipt printing color data selected by the merchant to the printing device server in the cloud, so that the printing device server converts the color of the receipt data to be printed in the receipt into the receipt printing color selected by the merchant according to the receipt printing color data selected by the merchant, and when it is necessary to print the receipt according to the printing receipt template set by the merchant, a printing instruction set is generated according to the printing receipt template and the instance data to be printed provided by the front end, and the printing instruction set is sent to the printing device set in the store operated by the merchant, so that the printing device prints out the receipt with the receipt data color selected by the merchant according to the printing instruction set. In this method, the printing 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 a color printed receipt, which solves the problem that the printing device can only print black and white printed receipts, thereby improving the printing efficiency of the printed receipt. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0072] Figure 1 This is a schematic diagram of the first scenario of the receipt printing setting method provided in this application.
[0073] Figure 2 This is a schematic diagram of the second scenario of the receipt printing setting method provided in this application.
[0074] Figure 3 This is a schematic diagram of the third scenario of the receipt printing setting method provided in this application.
[0075] Figure 4 Schematic diagram of the fourth scenario of the receipt printing setting method provided in this application.
[0076] Figure 5 Schematic diagram of the fifth scenario of the receipt printing setting method provided in this application.
[0077] Figure 6 Schematic diagram of the sixth scenario of the receipt printing setting method provided in this application.
[0078] Figure 7 Schematic diagram of the seventh scenario of the receipt printing setting method provided in this application.
[0079] Figure 8 This is a flowchart of the method for setting up printing receipts provided in the first embodiment of the present application.
[0080] Fig. 9 This is a flowchart of the receipt printing method provided in the second embodiment of the present application.
[0081] Fig.10 This is a flowchart of the receipt printing method provided in the third embodiment of the present application.
[0082] Fig.11 This is a flowchart of the method for setting up printing receipts provided in the fourth embodiment of the present application.
[0083] Fig.12 This is a flowchart of the receipt printing method provided in the fifth embodiment of the present application.
[0084] Fig.13 This is a flowchart of the receipt printing method provided for the sixth embodiment of the present application.
[0085] Fig.14 A schematic diagram of a receipt printing device provided in the seventh embodiment of the present application.
[0086] Fig.15 A schematic diagram of a receipt printing device provided in the eighth embodiment of the present application.
[0087] Fig.16 A schematic diagram of a receipt printing device provided in the ninth embodiment of the present application.
[0088] Fig.17 A schematic diagram of a device for printing receipts provided in the tenth embodiment of the present application.
[0089] Fig.18 A schematic diagram of a receipt printing device provided for the eleventh embodiment of the present application.
[0090] Fig.19 A schematic diagram of a receipt printing device provided for the twelfth embodiment of the present application.
[0091] Fig. 20 A schematic diagram of an electronic device provided for the thirteenth embodiment of the present application. DETAILED DESCRIPTION
[0092] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application. Therefore, the present application is not limited to the specific implementation disclosed below.
[0093] The present application provides a printing ticket setting method, a ticket printing method, a printing ticket setting device, a ticket printing device, an electronic device and a computer storage medium. The following describes the printing ticket setting method, the ticket printing method, the printing ticket setting device, the ticket printing device, the electronic device and the computer storage medium respectively through specific embodiments. The ticket printing method, the printing ticket setting device, the ticket printing device, the electronic device and the computer storage medium are all implemented based on the printing ticket setting method. In order to more clearly show the printing ticket setting method provided by the embodiment of the present application, the application scenario of the printing ticket setting method provided by the embodiment of the present application is first introduced. Before introducing the application scenario of the printing ticket setting method provided by the embodiment of the present application, the implementation background of the embodiment of the present application is first briefly introduced. With the development of cloud printing technology, cloud printing technology can be printed through various models of cloud printers. Cloud printers are a printing device connected via the Internet, which allows users to print from any device that supports Internet connection without direct physical connection or traditional local area network (LAN) connection. When printing, ordinary printers are generally connected to a local server via a network cable, and then the local server is connected to a remote server. The core concept of cloud printing technology is to process and manage printing tasks through cloud servers, so as to achieve a printing experience anytime, anywhere and across devices. When printing the order receipt to be printed, the cloud printer needs to parse the instruction set corresponding to the content of the order receipt to be printed issued by the server into the memory of the cloud printer, and then execute the printing operation. However, when using cloud printers to print order receipts, due to various restrictions, general cloud printers can only print text. In addition, for color receipt printing products, traditional Bluetooth and USB printing are usually used, while cloud printers can only print black and white text, which seriously limits the application of cloud printers.
[0094] Based on this, an embodiment of the present application provides a method for setting up a printed receipt, which can obtain multiple receipt images set by a merchant and the display location information corresponding to each receipt image through the receipt image editing area in the printed receipt template setting interface, and then send the multiple receipt images to the cloud, obtain the image identification data corresponding to the multiple receipt images, and then generate a printed receipt template containing the image identification data based on the display location information, and finally, send 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 device set in the store operated by the merchant to print out 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 in the printed receipt through multiple receipt image editing areas, so that the printing device can print a printed receipt with a mixture of multiple images and text, which solves the problem that the printing device can only print printed receipts with text, thereby improving the printing efficiency of the printed receipt.
[0095] Another embodiment of the present application provides a method for setting a printed receipt, which can select the receipt printing color data through the printing color selection component in the printing receipt template setting interface, and send the printing receipt template including the receipt printing color data selected by the merchant to the printing device server in the cloud, so that the printing device server converts the color of the receipt data to be printed in the receipt into the receipt printing color selected by the merchant according to the receipt printing color data selected by the merchant, and when it is necessary to print the receipt according to the printing receipt template set by the merchant, a printing instruction set is generated according to the printing receipt template and the instance data to be printed provided by the front end, and the printing instruction set is sent to the printing device set in the store operated by the merchant, so that the printing device prints out the receipt with the receipt data color selected by the merchant according to the printing instruction set. In this method, the printing 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 a colored printed receipt, which solves the problem that the printing device can only print black and white printed receipts, thereby improving the printing efficiency of the printed receipt.
[0096] The following combination Figure 1-Figure 7 The application scenarios of the printing receipt setting method provided by this application are introduced in detail. Take the process of merchant A setting up printing receipt as an example, see Figure 1 , Figure 1This is a schematic diagram of the first scenario of the method for printing receipts provided in this application. After merchant A enters the printer setting interface, the printer setting interface will display multiple types of receipt templates, such as customer copy, merchant copy, kitchen copy, etc. Taking the customer copy receipt template as an example, the merchant can click the edit button corresponding to the customer copy to edit the customer copy. After clicking the edit button, enter the second page, see Figure 2 , Figure 2 The second scenario schematic diagram of the printing receipt setting method provided in this application, the second page displays the selection button for the receipt color, 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 printing receipt template setting interface. The printing receipt template setting interface includes multiple receipt image editing areas; by triggering the module sorting button, you can adjust the order of multiple receipt image editing areas in the printing receipt template setting interface.
[0097] After clicking the module edit button, you will enter the third page. Figure 3 , Figure 3 The third scenario diagram of the printing receipt setting method provided in this application, the third page is the printing receipt setting interface, which displays multiple receipt image editing areas for merchants to set receipt images, such as the area for displaying the receipt type, the area for displaying the merchant brand logo, the area for displaying the estimated delivery time of the order, the area for displaying customer information, the area for displaying product information, the area for displaying discount information, the area for displaying merchant operations, etc. Through multiple receipt image editing areas, you can obtain multiple receipt images set by the merchant and the display location information corresponding to each receipt image. Taking the display of the merchant brand logo area as an example, enter the logo area editing page by triggering the edit button corresponding to the merchant brand logo area, please refer to Figure 4 , Figure 4 This is a schematic diagram of the fourth scenario of the printing receipt setting method provided for this application. In 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 you can set the display shape of the store logo image. For example, you can set the store logo image to a rectangle or a square for display. Similarly, in the merchant operation display area, merchants can customize whether to upload pictures, or they can choose several fixed template styles in the picture template market. The merchant's customized uploaded picture setting interface can be seen in Figure 5 , Figure 5A fifth scenario schematic diagram of the printing receipt setting method provided for this application. Merchants can choose to edit the merchant operation area in a combination of images and texts, images only, or text only. After the merchant uploads multiple pictures in the printing receipt template setting interface, the front end can send multiple receipt pictures to the image storage end in the cloud. The image storage end or the front end will generate image identification data corresponding to the multiple receipt pictures. The image identification data can specifically be a hash value or other identification data that can refer to the picture, and the image identification data is written into the printing receipt template, thereby generating a printing receipt template containing image identification data based on the display position information of multiple receipt pictures, and sending the printing receipt template to the printing device server in the cloud. When it is necessary to print a receipt according to the printing receipt template, the printing device server obtains the instance data to be printed from the front end, and the instance data to be printed includes customer information, such as the customer's name, address, and contact information. The printing device server obtains multiple receipt pictures from the picture storage end according to the picture identification data. The printing device server then generates a printing instruction set based on the multiple receipt images, the instance data to be printed provided by the front end, and the printing receipt template, and sends the printing instruction set to the printing device set in the store operated by the merchant, so that the printing device prints a receipt showing multiple receipt images according to the printing instruction set.
[0098] The above is an overall scenario description of the printing receipt setting method provided in the embodiment of the present application. Figure 6 and Figure 7The process in which the merchant sets a printing receipt template in this application, and the front end sends the printing receipt template to the printing device server on the cloud so that the printing device server can print out a receipt with multiple receipt images based on the printing receipt template instructions set in the store operated by the merchant. The front end 10-1 for setting the printing receipt template executes step S701: displays a receipt image editing area for the merchant to set the receipt image in the printing receipt template setting interface; then, executes step S702: obtains multiple receipt images set by the merchant and the display location information corresponding to each receipt image through multiple receipt image editing areas. After that, executes step S703: sends the multiple receipt images to the image storage end 10-2 on the cloud, step S704: obtains the image identification data corresponding to the multiple receipt images; step S705: generates a printing receipt template containing image identification data based on the display location information; then, executes step S706: sends the printing receipt template set by the merchant to the printing device server 10-3 on the cloud. Step S707: The front end 10-1 of the printing receipt template is set to send the instance data to be printed to the printing device server 10-2. Then, execute step S708: the printing device server 10-3 obtains multiple receipt images corresponding to the printing receipt template from the cloud image storage end 10-2 according to the image identification data of the multiple receipt images in the printing receipt template; thereafter, execute step S709: when it is necessary to print a receipt according to the printing receipt template, the printing device server 10-3 generates a printing instruction set according to the multiple receipt images, the instance data to be printed provided by the front end 10-1 and the printing receipt template; thereafter, execute step S710: the printing device server 10-3 sends the printing instruction set to the printing device 10-4 set in the store operated by the merchant. Finally, after the printing device 10-4 obtains the printing instruction set, execute step S711: print out a receipt showing multiple receipt images according to the printing instruction set.
[0099] The above is the overall implementation process of the printing receipt setting method provided by the embodiment of the present application. The printing receipt setting method can obtain multiple receipt images set by the merchant and the display location information corresponding to each receipt image through the receipt image editing area in the printing receipt template setting interface, and then send the multiple receipt images to the cloud to obtain the image identification data corresponding to the multiple receipt images, and then generate a printing receipt template containing the image identification data based on the display location information. Finally, the printing receipt template is sent to the cloud, so that the cloud obtains the multiple receipt images according to the image identification data, and instructs the printing device set in the store operated by the merchant to print out the receipt displaying the multiple receipt images based on the printing receipt template. In this method, the printing receipt template can be set by the merchant, and the merchant can upload multiple images in the printing receipt through multiple receipt image editing areas, so that the printing device can print a printed receipt with a mixture of multiple images and text, which solves the problem that the printing device can only print printed receipts with text, thereby improving the printing efficiency of the printed receipt.
[0100] In another implementation scenario of the printing receipt setting method provided in an embodiment of the present application, a printing color selection component for merchants to select the receipt printing color can also be displayed in the printing receipt template setting interface. Merchants can select the receipt printing color data through the printing color selection component, and send the printing receipt template including the receipt printing color data selected by the merchant to the printing device server in the cloud, so that the printing device server converts the color of the receipt data to be printed in the receipt into 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 printing receipt template set by the merchant, a printing instruction set is generated according to the printing receipt template and the instance data to be printed provided by the front end, and the printing instruction set is sent to a printing device set in a store operated by the merchant, so that the printing device prints a receipt with the receipt data color as the receipt printing color selected by the merchant according to the printing 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 print color selection component, so that the printing device can print a color receipt, solving the problem that the printing device can only print black and white receipts, thereby improving the printing efficiency of the receipt.
[0101] The above-mentioned Figure 1 , Figure 2 , Figure 3 , Figure 4 , Figure 5 , Figure 6 and Figure 7This is a diagram of an application scenario of the printing receipt setting method of the present application. The application scenario of the printing receipt setting method is not specifically limited in the embodiments of the present application. The application scenario of the printing receipt setting method is only an embodiment of the application scenario of the printing receipt setting method provided by the present application. The purpose of providing this application scenario embodiment is to facilitate the understanding of the printing receipt setting method provided by the present application, and is not used to limit the printing receipt setting method provided by the present application. Other application scenarios of the printing receipt setting method in the embodiments of the present application will not be described one by one.
[0102] First embodiment
[0103] This embodiment provides a method for printing a receipt. Figure 8 The applicable scenarios of the printing receipt setting method can refer to the above scenario embodiments, and some examples of this embodiment can refer to the above scenario embodiments.
[0104] Please refer to Figure 8 , which is a flowchart of the method for setting up printing receipts provided in the first embodiment of the present application.
[0105] The printing receipt setting method of the embodiment of the present application is applied to the front end of setting the printing receipt template, and includes the following steps.
[0106] Step S801: Displaying a receipt image editing area for merchants to set receipt images in the print receipt template setting interface.
[0107] This step is used to display the receipt image editing area for merchants to set receipt images in the print receipt template setting interface. In this embodiment, taking the order receipts printed by merchants in the catering industry as an example, the merchant can customize the order receipts to be printed by setting the front end of the print receipt template. For example, the merchant can upload multiple images through the receipt image editing area for merchants to set receipt images displayed in the print receipt template setting interface, or enter text in the text editing area in the print receipt template and adjust the font size of the text as needed. In specific implementation, the receipt image editing area for merchants to set receipt images is displayed in the print receipt template setting interface, including: multiple receipt image upload entry components for merchants to upload multiple receipt images are displayed in the print receipt template setting interface. Please continue to refer to Figure 3 The multiple receipt image upload entry components for merchants to upload multiple receipt images are displayed in the printing receipt template setting interface, including: a merchant logo image upload entry component for merchants to upload merchant logo images is displayed in the merchant logo setting area, and a merchant operation image upload entry component for merchants to upload merchant operation images is displayed in the merchant operation area setting area.
[0108] It should be noted that each receipt image upload entry component can support uploading one image, for example, please continue to participate Figure 4 , for the merchant logo image upload entry component in the merchant logo setting interface ( Figure 4 The image display area in the image upload entry component only supports uploading a logo image of a merchant. Figure 5 In the merchant operation display area, merchants can upload merchant operation pictures through the entry component ( Figure 5 Since the print receipt template setting interface includes multiple receipt image editing areas, merchants can set multiple receipt images for display in the receipt through multiple image upload entry components in the multiple receipt image editing areas. In specific implementation, before displaying the receipt image editing area for merchants to set receipt images in the print receipt template setting interface, the print receipt template setting interface is first displayed on the front end. Specifically, the front end may display the merchant center service list in response to detecting a trigger operation of the merchant center in the mini program or official account, and display the print receipt template setting interface in response to detecting a trigger operation for smart hardware in the merchant center service list.
[0109] Step S802: Obtain multiple receipt images set by the merchant and display location information corresponding to each receipt image through the multiple receipt image editing areas.
[0110] 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 printing receipt template setting interface, the merchant can set multiple receipt images in the receipt for display through multiple image upload entry components in multiple receipt image editing areas. Since the receipt image is displayed in the receipt image editing area, after the position 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 manner: in response to detecting a trigger operation on the receipt display position in the setting page, displaying a receipt image editing area for editing the display position, wherein one display position includes at least one receipt image; in response to detecting an image editing operation on the editing area of the receipt image, obtaining the receipt display position information where the image editing operation is located, and 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 responds to detecting a trigger operation on the receipt display position, the front end will enter another page, in which the receipt image editing area for editing the display position will be displayed. In addition, a display position may include a receipt image or multiple receipt images. After the front end responds to detecting 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 performed. The display position information includes not only the display position of the receipt image, but also the editing area position for specifically editing the receipt image. The editing page can be entered by triggering the edit button on the editing area position (for example, Figure 4 or Figure 5 Please continue to see Figure 2 In the settings page, after the merchant triggers the "Module Sort" button, he enters the multiple receipt image editing areas (i.e. Figure 3 The corresponding interface) can be used to set the position of each area (module) in the receipt image editing area on the receipt. When the display position of the module in the receipt is determined, since the receipt image is set in the module, the display position information corresponding to each receipt image can be obtained based on the display position information of the module in the receipt.
[0111] In the embodiment of the present application, the merchant triggers multiple picture upload entry components and selects multiple pictures to upload. There are two ways for merchants to upload pictures. One is custom upload. Merchants can freely upload pictures that meet their needs. The picture can be a picture taken by the user to identify the characteristics of the merchant, such as a picture used to identify the merchant's promotional information. The other is that the merchant can select a fixed picture template in the picture template library, and then edit it based on this picture template. Therefore, the picture can also be a picture generated by using a picture template. For example, the picture template can be an invitation for good reviews, a favorite store, a merchant phone number, a member day, etc. When the merchant selects a picture through a picture template, the picture and text can also be edited on the picture template to better meet the merchant's usage needs.
[0112] Step S803: Send the multiple receipt images to the cloud.
[0113] This step is used for the front end to send multiple receipt images uploaded by the merchant to the cloud. In specific implementation, the cloud includes: a printing device server and a picture storage end. The sending of the multiple receipt images to the cloud specifically refers to sending the multiple receipt images to the picture storage end.
[0114] Step S804: Obtain image identification data corresponding to the multiple receipt images.
[0115] This step is used to obtain the picture identification data corresponding to the multiple receipt pictures after the front end sends the multiple receipt pictures uploaded by the merchant to the picture storage end. It should be noted that the picture identification data can be generated after the front end obtains the multiple receipt pictures uploaded by the merchant, and when the front end sends the multiple receipt pictures to the cloud, it sends them together with the picture identification data. It can also be generated when the picture storage end obtains the multiple receipt pictures uploaded by the merchant, and then generates the picture identification data corresponding to the multiple receipt pictures based on the multiple receipt pictures. The picture identification data can specifically be a hash value, an index, or other data of the picture, as long as it can refer to the data of the multiple receipt pictures set by the merchant. In the embodiment of the present application, the generation of the picture identification data at the picture storage end is described as an example. Specifically: the hash value corresponding to the multiple receipt pictures returned by the picture storage end is obtained, and the hash value corresponding to the multiple receipt pictures is used to identify the multiple receipt pictures in the picture storage end.
[0116] Step S805: Generate a print receipt template containing image identification data based on the display location information.
[0117] This step is used to generate a print receipt template, which includes display location information of multiple receipt images and image identification data. Since the image identification data includes a hash value, the generation of a print receipt template containing image identification data based on the display location information includes: generating a print receipt template containing a hash value based on the display location information.
[0118] Step S806: Send the printed receipt template to the cloud, so that the cloud obtains the multiple receipt images according to the image identification data, and instructs a printing device set in the store operated by the merchant to print out a receipt displaying the multiple receipt images based on the printed receipt template.
[0119] This step is used for the front end to send the printed receipt template to the cloud, so that the cloud instructs the printing device set in the store operated by the merchant to print out the receipt showing the multiple receipt images based on the printed receipt template. In specific implementation, the sending of the printed receipt template to the cloud is specifically to send the printed receipt template to the printing device server. When the cloud obtains the multiple receipt images according to the image identification data, it is specifically to obtain the multiple receipt images from the image storage end according to the hash values of the multiple receipt images in the printed receipt template set by the merchant. The obtaining of the multiple receipt images from the image storage end according to the hash values of the multiple receipt images in the printed receipt template set by the merchant includes: sending a picture acquisition request message to the picture storage end for requesting to obtain the picture corresponding to the multiple receipt images, the picture acquisition request message including the hash value corresponding to the multiple receipt images; obtaining the multiple receipt images returned by the picture storage end.
[0120] After the printing device server in the cloud obtains multiple receipt images according to the image identification data, it will instruct the printing device set in the store operated by the merchant to print out a receipt showing multiple receipt images based on the printing receipt template. Specifically, when it is necessary to print a receipt according to the printing receipt template set by the merchant, a printing instruction set is generated according to the multiple receipt images, the instance data to be printed provided by the front end, and the printing receipt template, and the printing instruction set is sent to the printing device set in the store operated by the merchant, so that the printing device prints out a receipt showing the multiple receipt images according to the printing instruction set. During specific implementation, after the front end detects the confirmation operation of the merchant uploading the picture, the picture uploaded by the merchant is sent to the picture storage end of the cloud for storage, and the printing receipt template set by the merchant is sent to the printing device server end of the cloud for storage, so that the printing device server end obtains multiple ticket pictures from the picture storage end according to the picture identification data of multiple ticket pictures in the printing receipt template set by the merchant, and when it is necessary to print the ticket according to the printing receipt template set by the merchant, a printing instruction set is generated according to multiple ticket pictures, the instance data to be printed provided by the front end and the printing receipt template. Of course, it can also be that the front end detects the confirmation operation of the merchant uploading the picture after the front end responds to the confirmation operation of the printing receipt set by the merchant. During specific implementation, the front end also needs to obtain the instance data to be printed. When obtaining the instance data to be printed, it is specifically to obtain the order data sent by the order service end, and then obtain the instance data to be printed according to the order data. In actual application, the instance data to be printed provided by the front end can be obtained from the order data sent by the order service end, and the instance data to be printed can specifically be the name of the consignee, the contact information of the consignee, the delivery address, and the specific content of the meal. Commonly used fields can be fixed in the print receipt template, such as the merchant address field, order date field, font size field, etc. It should be noted that before the printing device server generates the print instruction set, the front end will also send a print instruction to the printing device server, and the print instruction includes the instance data to be printed. When the printing device server generates a print instruction set based on multiple receipt images, the instance data to be printed provided by the front end, and the print receipt template, specifically, the printing device server responds to the print instruction and generates a print instruction set based on multiple receipt images, the instance data to be printed provided by the front end, and the print receipt template. The printing device server sends the print instruction set to the printing device, so that the printing device prints out a receipt showing multiple receipt images, consignee information, meal content and other information according to the print instruction set.
[0121] As an embodiment, at the image storage end in the cloud, the identification data of the image can be the hash value of the image, and the front end can write the hash values corresponding to the multiple receipt images in the printing receipt template set by the merchant as the image identification data of the multiple receipt images. In specific implementation, after the front end sends the multiple receipt images to the image storage end in the cloud, the front end will obtain the hash values corresponding to the multiple receipt images returned by the image storage end, and the hash values corresponding to the multiple receipt images are used to identify the multiple receipt images in the image storage end, and the front end will write the hash values corresponding to the multiple receipt images in the printing receipt template set by the merchant as the image identification data of the multiple receipt images. When the front end obtains multiple receipt images from the image storage end according to the image identification data of the multiple receipt images in the printing receipt template set by the merchant, the front end specifically obtains the hash values corresponding to the multiple receipt images from the printing receipt template set by the merchant, and sends a picture acquisition request message for requesting to obtain multiple receipt images to the image storage end, and the picture acquisition request message includes the hash values corresponding to the multiple receipt images, thereby obtaining multiple receipt images returned by the image storage end.
[0122] As an embodiment, at the image storage end in the cloud, the identification data of the image can be the hash value of the image, and the front end can also set an image index for identifying multiple receipt images in the printing receipt template set by the merchant as the image identification data of the multiple receipt images. In specific implementation, after the front end sends multiple receipt images to the image storage end in the cloud, the front end will obtain the hash values corresponding to the multiple receipt images returned by the image storage end, and the hash values corresponding to the multiple receipt images are used to identify the multiple receipt images in the image storage end. The front end sets an image index for identifying multiple receipt images in the printing receipt template set by the merchant as the image identification data of the multiple receipt images. At the same time, the front end establishes a corresponding relationship between the image index and the hash value corresponding to the multiple receipt images, and sends the corresponding relationship between the image index and the hash value corresponding to the multiple receipt images to the printing device server. When the front end obtains multiple receipt images from the image storage end according to the image identification data of multiple receipt images in the receipt printing template set by the merchant, the front end specifically obtains the image index from the receipt printing template set by the merchant, and obtains the hash values corresponding to the multiple receipt images according to the corresponding relationship between the image index and the hash values corresponding to the multiple receipt images. Then, the front end sends a picture acquisition request message for requesting to obtain multiple receipt images to the picture storage end, and the picture acquisition request message includes the hash values corresponding to the multiple receipt images, thereby obtaining multiple receipt images returned by the picture storage end.
[0123] As an embodiment, at the image storage end in the cloud, the identification data of the image can be the hash value of the image, and the front end can write the hash values corresponding to multiple receipt images in the printing receipt template set by the merchant as the image identification data of multiple receipt images. In actual application, the image index used to identify multiple receipt images can also be set at the printing device service end. During specific implementation, after the front end sends multiple receipt images to the image storage end in the cloud, the front end obtains the hash values corresponding to multiple receipt images returned by the image storage end, and the hash values corresponding to multiple receipt images are used to identify multiple receipt images in the image storage end. The front end writes the hash values corresponding to multiple receipt images in the printing receipt template set by the merchant as the image identification data of multiple receipt images. The printing device service end is also provided with an image index for identifying multiple receipt images. At the same time, the printing device service end establishes a corresponding relationship between the image index and the hash value corresponding to multiple receipt images, and replaces the hash value corresponding to multiple receipt images in the printing receipt template set by the merchant with the image index. When the front end obtains multiple receipt images from the image storage end according to the image identification data of multiple receipt images in the printed receipt template set by the merchant, the front end specifically obtains the image index from the printed receipt template set by the merchant, obtains the hash values corresponding to the multiple receipt images according to the correspondence between the image index and the hash values corresponding to the multiple receipt images, and sends an image acquisition request message to the image storage end for requesting to obtain the multiple receipt images, the image acquisition request message includes the hash values corresponding to the multiple receipt images, thereby obtaining the multiple receipt images returned by the image storage end.
[0124] In the embodiment of the present application, the front end will also obtain the link addresses of the multiple receipt images returned by the image storage end according to the image acquisition request message; the obtaining of the multiple receipt images returned by the image storage end includes: downloading the multiple receipt images from the image storage end according to the link addresses of the multiple receipt images. It should be noted that after the front end sends a picture acquisition request message to the picture storage end for requesting to obtain multiple receipt images, the front end will obtain the link addresses of the multiple receipt images returned by the picture storage end according to the picture acquisition request message. When obtaining the multiple receipt images returned by the picture storage end, the multiple receipt images are specifically downloaded from the picture storage end according to the link addresses of the multiple receipt images. The link address of the image can specifically be the uniform resource locator URL (Uniform Resource Locator) of the image.
[0125] In a 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 string information corresponding to the QR code; the string information is sent to the cloud, so that the QR code image is generated based on the string information when the QR code image needs to be obtained. It should be noted that the source of the QR code image can be either the original uploaded image or the cropped image. After the string information is sent to the cloud, the QR code image can be generated based on the string information when the printing device server on the cloud needs to obtain the QR code image or when the printing device needs to obtain the QR code image.
[0126] In actual application, the front end also needs to detect 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, the colors of the multiple receipt images uploaded by the merchant are converted according to the receipt printing colors selected by the merchant, and multiple receipt images after the color conversion are obtained, and the multiple receipt images after the color conversion are displayed at the front end for the merchant to view. When the front end sends the multiple receipt images to the image storage end, it specifically sends the multiple receipt images after the color conversion to the image storage end. For example, the color types of the pictures uploaded by the merchant include black, white, red, and orange, and correspondingly, the receipt printing color types selected by the merchant are black, white, and orange. At this time, the front end will convert the color of the pictures uploaded by the merchant into black, white, and orange according to the receipt printing color types selected by the merchant. For another example, if the picture uploaded by the merchant is pure black, and the receipt color set by the merchant is orange, then the receipt will eventually turn into orange. It should be noted that the receipt printing color type selected by the merchant is the color type supported by the printing device.
[0127] In this embodiment, the front end will also adjust the color and size of the image. Specifically, the color of multiple receipt images uploaded by the merchant is processed based on the image color processing strategy to obtain multiple receipt images after color processing that meet the preset color requirements; the size of multiple receipt images uploaded by the merchant is adjusted based on the image size processing strategy to obtain multiple receipt images after size adjustment whose sizes are within the 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 content of the order receipt generally does not exceed the storage capacity of the cloud printer memory. When the instruction set corresponding to the content of the order receipt exceeds the storage capacity of the cloud printer memory, the cloud printer will freeze or freeze, resulting in failure to print the order receipt. Therefore, in order to avoid the generated instruction set capacity being too large, for pictures, on the one hand, color conversion is required, and on the other hand, the size of a single picture shall not exceed 12K. Under normal circumstances, the memory occupied by the entire order receipt after the content is converted into the printing instruction set shall not exceed 60K. Of course, for different printing devices, the memory requirements for the printing instruction set are also different. It may also be that the memory occupied by the printing instruction set shall not exceed 140K, or other data. In specific implementation, the printing content of the order receipt is adjusted according to the specific memory requirements of the printing device so that the printing instruction set corresponding to the order receipt meets the printing requirements of the printing device. Similarly, the size of the picture also needs to be adjusted. The size requirements of the picture are: the square picture after cutting is 1:1, and the aspect ratio of the rectangular picture after cutting is 1.6:1.
[0128] The above is the overall process of the printing receipt setting method provided by the embodiment of the present application. The printing receipt setting method can obtain multiple receipt images set by the merchant and the display location information corresponding to each receipt image through the receipt image editing area in the printing receipt template setting interface, and then send the multiple receipt images to the cloud to obtain the image identification data corresponding to the multiple receipt images, and then generate a printing receipt template containing the image identification data based on the display location information. Finally, the printing receipt template is sent to the cloud, so that the cloud obtains the multiple receipt images according to the image identification data, and instructs the printing device set in the store operated by the merchant to print out the receipt displaying the multiple receipt images based on the printing receipt template. In this method, the printing receipt template can be set by the merchant, and the merchant can upload multiple images in the printing receipt through multiple receipt image editing areas, so that the printing device can print a printed receipt with a mixture of multiple images and text, which solves the problem that the printing device can only print printed receipts with text, thereby improving the printing efficiency of the printed receipt.
[0129] Second embodiment
[0130] Corresponding to the first embodiment, the second embodiment of the present application provides a receipt printing method, which is applied to a printing device server in the cloud. The same parts of the second embodiment as the first embodiment will not be introduced again, and please refer to the relevant parts of the first embodiment for details.
[0131] Please refer to Fig. 9 , which is a flow chart of the receipt printing method provided in the second embodiment of the present application.
[0132] The receipt printing method of the embodiment of the present application is applied to the printing device server in the cloud, and includes the following steps. Step S901: Obtain a printed receipt template set by the merchant, wherein the printed receipt template includes image identification data corresponding to multiple receipt images and display location information corresponding to each receipt image. Step S902: According to the image identification data of the multiple receipt images in the printed receipt template, obtain multiple receipt images corresponding to the printed receipt template from the image storage end in the cloud, wherein the multiple receipt images are provided to the image storage end by the front end of the printed receipt template. Step S903: When it is necessary to print a receipt according to the printed receipt template, instruct the printing device set in the store operated by the merchant to print out a receipt displaying the multiple receipt images according to the printed receipt template.
[0133] In a specific implementation, the printing device set in the store operated by the merchant is instructed to print out a receipt showing the multiple receipt images according to the printing receipt template, including: generating a printing instruction set according to the multiple receipt images, the instance data to be printed provided by the front end, and the printing 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 out a receipt showing the multiple receipt images according to the printing instruction set. It should be noted that when the printing device service end receives the printing task sent by the front end, the printing template is determined specifically according to 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, the merchant identification information of the merchant to which the front end belongs is obtained; based on the merchant identification information, the printing receipt template and multiple receipt images corresponding to the merchant identification information are obtained.
[0134] In this embodiment, the printing device can be specifically a cloud printer, and the printing device server can be specifically a server corresponding to the cloud printer. After the printing device server obtains the printing receipt template set by the merchant, multiple receipt images, and the instance data to be printed provided by the front end, it is necessary to first convert the above-mentioned order receipt data to be printed into an instruction set recognizable by the cloud printer, and then send the instruction set to the cloud printer. After the cloud printer receives the instruction set sent by the server, it can cache it and identify the printing characters in the instruction set, thereby printing out the data to be printed. The instruction set can be specifically an ESC instruction set, which is a simplified version of the ESC print control command. Most order ticket printing now uses the ESC instruction set. The salient feature of the ESC instruction set is that a large part of the instructions are a string of codes starting with the ESC control character. Therefore, after obtaining the order receipt to be printed, the order receipt data needs to be converted into a corresponding instruction set. There is a corresponding relationship between the order receipt data and the corresponding instruction set. Based on this corresponding relationship, a printing instruction set corresponding to the order receipt data can be generated.
[0135] During specific implementation, the printing device service end can generate a printing instruction set in a variety of ways and send the printing instruction set to the printing device. The first way is that the printing device service end generates a printing instruction set based on the actual service scenario and sends the printing instruction set to the printing device. As an embodiment, after the printing device obtains multiple receipt images sent by the printing device service end, the printing device converts the multiple receipt images into a printing device image index. Specifically, after the printing device service end obtains multiple receipt images corresponding to the printing receipt template from the image storage end, the multiple receipt images are sent to the printing device. After the printing device obtains multiple receipt images, the multiple receipt images are stored, and indexes are marked for the multiple receipt images as the printing device image index, and sent to the printing device service end, and the printing device service end obtains the image index sent by the printing device for identifying multiple receipt images in the printing device. When the printing device service end generates the printing instruction set according to the multiple receipt images, the instance data to be printed provided by the front end, and the printing receipt template, the printing instruction set is specifically generated according to the printing device image index, the instance data to be printed provided by the front end, and the printing receipt template. When the printing device prints according to the printing instruction set, the printing instruction set is first parsed, and the printing device image index is replaced with the image corresponding to the printing device image index that was originally stored in the printing device. As an embodiment, after the printing device service end obtains multiple receipt images, the printing device service end converts the multiple receipt images into the printing device image index, and then sends it to the printing device. Specifically, after the printing device service end obtains multiple receipt images corresponding to the printing receipt template from the image storage end, the printing device service end sets the image index used to identify the multiple receipt images in the printing device as the printing device image index, and sends the multiple receipt images and the printing device image index to the printing device. When the printing device service end generates the printing instruction set according to the multiple receipt images, the instance data to be printed provided by the front end, and the printing receipt template, the printing instruction set is specifically generated according to the printing device image index, the instance data to be printed provided by the front end, and the printing receipt template. When the printing device prints according to the printing instruction set, the printing instruction set is first parsed, and the image corresponding to the printing device image index is obtained from the printing device service end, and the printing device image index is replaced with the image.
[0136] The second method is that the printing device server sends multiple receipt cache images to the printing device. The reason why the images are cached to the printing device first is that when there are images and texts in the order receipt to be printed, the printing instruction set corresponding to the image is too large, which can easily cause the printing device to fail to print or print too slowly. Therefore, the printing device server first sends the image to the printing device for storage and indexes it. As an embodiment, the printing device sets an image printing instruction set index. Specifically, after the printing device server obtains multiple receipt images corresponding to the printing receipt template from the image storage end, it generates an image printing instruction set based on the multiple receipt images and sends the image printing instruction set to the printing device. After the printing device obtains the image printing instruction set, it marks the index for the image printing instruction set as the image printing instruction set index and sends it to the printing device server. The printing device service end obtains the image printing instruction set index set for the image printing instruction set sent by the printing device. When generating the printing instruction set according to multiple receipt images, the instance data to be printed provided by the front end, and the printing receipt template, the copy printing instruction set is specifically generated according to the instance data to be printed provided by the front end and the printing receipt template, and the corresponding relationship between the image printing instruction set index and the copy printing instruction set is established. When sending the printing instruction set to the printing device set in the store operated by the merchant, the copy printing instruction set is specifically sent to the printing device; and the corresponding relationship between the image printing instruction set index and the copy printing instruction set is sent to the printing device. As an embodiment, the printing device service end sets the image printing instruction set index, specifically, after the printing device service end obtains multiple receipt images corresponding to the printing receipt template from the image storage end, the image printing instruction set is generated according to the multiple receipt images. In this embodiment, the printing device service end sets the 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 printing instruction set based on multiple receipt images, the example data to be printed provided by the front end, and the printing receipt template, specifically, a text printing instruction set is generated based on the example data to be printed provided by the front end and the printing receipt template, and a corresponding relationship between the image printing instruction set index and the text printing instruction set is established. When sending the printing instruction set to a printing device set in a store operated by a merchant, specifically, the text printing instruction set is sent to the printing device, and the corresponding relationship between the image printing instruction set index and the text printing instruction set is sent to the printing device.
[0137] In the second method of generating a printing instruction set, after the printing device obtains the image printing instruction set index, it can know which image printing instruction set the printing instruction set sent by the printing device server corresponds to, so that the printing device prints the receipt according to the image printing instruction set and the printing instruction set.
[0138] The third method is to encode and send the printing instruction set in real time when previewing the printed receipt on the front end. In specific implementation, if the printing device server receives the preview printing instruction sent by the front end, it generates an image printing instruction set based on multiple receipt images, generates a receipt text printing instruction set based on the printing receipt template, obtains a printing instruction set based on the image printing instruction set and the receipt text printing instruction set, sends the printing instruction set to the printing device, and the printing device prints the receipt according to the printing instruction set. It should be noted that when the printing device server generates the printing instruction set, it is specifically implemented by calling Napos Sdk.
[0139] Third embodiment
[0140] Corresponding to the first and second embodiments, the third embodiment of the present application provides a receipt printing method, which is applied to a printing device set in a store operated by a merchant. The parts of the third embodiment that are the same as those of the first and second embodiments are not introduced again, and please refer to the relevant parts of the first and second embodiments for details.
[0141] Please refer to Fig.10 , which is a flow chart of the receipt printing method provided in the third embodiment of the present application.
[0142] The receipt printing method of the embodiment of the present application is applied to a printing device set in a store operated by a merchant, and includes the following steps. Step S1001: Obtain a printing instruction set sent by a printing device server in the cloud, the printing instruction set is generated based on multiple receipt images, the instance data to be printed provided by the front end, and the printing receipt template, the printing receipt template includes image identification data corresponding to multiple receipt images and display location information corresponding to each receipt image, the printing receipt template is set by the merchant through the front end and sent by the front end to the printing device server, the multiple receipt images are obtained by the merchant through the multiple receipt image editing areas in the printing receipt template setting interface displayed on the front end, the multiple receipt images are sent by the front end to the image storage end in the cloud, and are obtained from the image storage end by the printing device server according to the image identification data of the multiple receipt images in the printing receipt template set by the merchant. Step S1002: According to the printing instruction set, print a receipt showing the multiple receipt images.
[0143] Optionally, it also includes: obtaining multiple receipt images corresponding to the printed receipt template and 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.
[0144] Optionally, it also includes: obtaining an image printing instruction set sent by the printing device server, the image printing instruction set is generated based on multiple ticket images corresponding to the print ticket 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 a correspondence between the image printing instruction set index and a copy printing instruction set, the copy printing instruction set is generated based on the instance data to be printed provided by the front end and the print ticket template; obtaining the copy printing instruction set sent by the printing device server based on the correspondence between the image printing instruction set index and the copy printing instruction set; printing a ticket displaying the multiple ticket images according to the printing instruction set, including: printing a ticket displaying the multiple ticket images according to the image printing instruction set and the copy printing instruction set.
[0145] Optionally, it also includes: obtaining an image printing instruction set and an image printing instruction set index sent by the printing device server, the image printing instruction set being generated based on multiple ticket images corresponding to the print ticket template; obtaining a correspondence between the image printing instruction set index sent by the printing device server and a copy printing instruction set, the copy printing instruction set being generated based on the instance data to be printed provided by the front end and the print ticket template; obtaining the copy printing instruction set based on the correspondence between the image printing instruction set index sent by the printing device server and the copy printing instruction set; printing a ticket displaying the multiple ticket images according to the printing instruction set, including: printing a ticket displaying the multiple ticket images according to the image printing instruction set and the copy printing instruction set.
[0146] Optionally, it also includes: obtaining an image printing instruction set and a 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 printing receipt template; 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 receipt text printing instruction set.
[0147] Fourth embodiment
[0148] Corresponding to the first embodiment, the fourth embodiment of the present application provides a method for setting a printing receipt, which is applied to the front end of setting a printing receipt template. The same parts of the fourth embodiment as the first embodiment are not introduced again, and please refer to the relevant parts of the first embodiment for details.
[0149] Please refer to Fig.11 , which is a flowchart of the method for setting up printing receipts provided in the fourth embodiment of the present application.
[0150] The printing receipt setting method of the embodiment of the present application is applied to the front end of setting the printing receipt template, and includes the following steps. Step S1101: Display a printing color selection component for merchants to select the printing color of the receipt in the printing receipt template setting interface. Step S1102: Obtain the printing color data of the receipt selected by the merchant through the printing color selection component. Step S1103: Send the printing receipt template set by the merchant to the printing device server in the cloud, and the printing receipt template includes the printing 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 in the receipt to the printing color of the receipt selected by the merchant according to the printing color data of the receipt selected by the merchant. When it is necessary to print a receipt according to the printing receipt template set by the merchant, generate a printing instruction set according to the printing receipt template and the instance data to be printed provided by the front end, and send the printing instruction set to the printing device set in the store operated by the merchant, so that the printing device prints a receipt with the color of the receipt data as the printing color selected by the merchant according to the printing instruction set.
[0151] Optionally, the receipt printing color for the merchant to select in the printing color selection component is a receipt printing color supported by the printing device.
[0152] Optionally, it also 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, and obtaining multiple receipt images after the color conversion; displaying the multiple receipt images after the color conversion; in response to the merchant's confirmation operation on the multiple receipt images after the color conversion, sending the multiple receipt images after the color conversion as images displayed in the receipt printed by the printing device to the image storage end in the cloud; the printing device server also obtains the multiple receipt images after the color conversion from the image storage end; generating a printing instruction set according to the printing receipt template and the instance data to be printed provided by the front end, including: generating a printing instruction set according to the multiple receipt images after the color conversion, the instance data to be printed provided by the front end and the printing receipt template. It should be noted that after the front end obtains 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 so, the image can be sent directly to the cloud image storage end. If not, the image color needs to be converted according to the color type corresponding to the receipt printing color data selected by the merchant.
[0153] The embodiment of the present application provides a method for setting a printed receipt, which can select the receipt printing color data through the printing color selection component in the printing receipt template setting interface, and send the printing receipt template including the receipt printing color data selected by the merchant to the printing device server on the cloud, so that the printing device server converts the color of the receipt data to be printed in the receipt into the receipt printing color selected by the merchant according to the receipt printing color data selected by the merchant, and when it is necessary to print the receipt according to the printing receipt template set by the merchant, a printing instruction set is generated according to the printing receipt template and the instance data to be printed provided by the front end, and the printing instruction set is sent to the printing device set in the store operated by the merchant, so that the printing device prints out the receipt with the receipt data color selected by the merchant according to the printing instruction set. In this method, the printing 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 a colored printed receipt, which solves the problem that the printing device can only print black and white printed receipts, thereby improving the printing efficiency of the printed receipt.
[0154] Fifth embodiment
[0155] Corresponding to the fourth embodiment, the fifth embodiment of the present application provides a receipt printing method, which is applied to a printing device server in the cloud. The same parts of the fifth embodiment as those of the fourth embodiment will not be introduced again, and please refer to the relevant parts of the fourth embodiment for details.
[0156] Please refer to Fig.12 , which is a flow chart of the receipt printing method provided in the fifth embodiment of the present application.
[0157] The receipt printing method of the embodiment of the present application is applied to the printing device server in the cloud, and includes the following steps. Step S1201: Obtain the receipt printing template set by the merchant, the receipt printing template includes the receipt printing color data selected by the merchant; Step S1202: When it is necessary to print a receipt according to the receipt printing template, generate a printing instruction set according to the receipt printing template and the instance data to be printed provided by the front end, and send the printing instruction set to the printing device set in the store operated by the merchant, so that the printing device prints out a receipt with the receipt data color as the receipt printing color selected by the merchant according to the printing instruction set.
[0158] Optionally, the color represented by the receipt printing color data selected by the merchant is a receipt printing color supported by the printing device.
[0159] Optionally, it also includes: obtaining multiple receipt images from a picture storage terminal in the cloud, the multiple receipt images stored in the picture storage terminal are obtained based on the multiple receipt images uploaded by the merchant on the front end; detecting whether the color types of the multiple receipt images stored in the picture 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 picture storage terminal according to the color types corresponding to the receipt printing color data selected by the merchant, and obtaining multiple receipt images after the color conversion as images displayed in the receipt printed by the printing device; generating a printing instruction set based on the printing receipt template and the instance data to be printed provided by the front end, including: generating a printing instruction set based on the multiple receipt images after the color conversion, the instance data to be printed provided by the front end, and the printing receipt template. It should be noted that the multiple receipt images stored in the picture storage terminal can be the original images uploaded by the merchant, or can be images processed by a size adjustment strategy, or can be images after the color conversion. During specific implementation, after the printing server obtains multiple receipt images from the image storage end, it needs to determine whether the color of the image is supported by the printing color selected by the merchant. If so, the printing server does not need to convert the colors of the multiple receipt images obtained from the image storage end. If not, the printing server needs to convert the colors of the multiple receipt images obtained from the image storage end.
[0160] Sixth embodiment
[0161] Corresponding to the fourth and fifth embodiments, the sixth embodiment of the present application provides a receipt printing method, which is applied to a printing device set in a store operated by a merchant. The parts of the sixth embodiment that are the same as those of the fourth and fifth embodiments are not introduced again. For details, please refer to the relevant parts of the fourth and fifth embodiments.
[0162] Please refer to Fig.13 , which is a flow chart of the receipt printing method provided in the sixth embodiment of the present application.
[0163] The receipt printing method of the embodiment of the present application is applied to a printing device set in a store operated by a merchant, and includes the following steps. Step S1301: Obtain a printing instruction set sent by a printing device server in the cloud, the printing instruction set is generated based on a printing receipt template and instance data to be printed, the printing receipt template includes the receipt printing color data selected by the merchant, the printing receipt template is set by the merchant through the 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 the printing color selection component in the printing receipt template setting interface displayed on the front end, and the instance data to be printed is provided by the front end to the printing device server; Step S1302: According to the printing instruction set, print out a receipt whose receipt data color is the receipt printing color selected by the merchant.
[0164] Optionally, the color represented by the receipt printing color data selected by the merchant is a receipt printing color supported by the printing device.
[0165] Optionally, the printing instruction set is generated based on multiple receipt images after color conversion, a printing receipt template and instance data to be printed. The multiple receipt images after color conversion are images that need to be displayed in the receipt printed by the printing device. The multiple receipt images after color conversion 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.
[0166] Seventh embodiment
[0167] Corresponding to the printing receipt setting method provided in the first embodiment of the present application, the seventh embodiment of the present application also provides a printing receipt setting device. Since the device embodiment is basically similar to the first embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the first embodiment. The device embodiment described below is only illustrative.
[0168] Please refer to Fig.14 , which is a schematic diagram of a receipt printing setting device provided in the seventh embodiment of the present application.
[0169] The printing receipt setting device 1400 is applied to the front end of setting the printing receipt template, and the device includes: a first display unit 1401, which is used to display a receipt picture editing area for merchants to set receipt pictures in the printing receipt template setting interface; a first obtaining unit 1402, which is used to obtain multiple receipt pictures set by the merchant and the display position information corresponding to each receipt picture through multiple receipt picture editing areas; a first sending unit 1403, which is used to send the multiple receipt pictures to the cloud; a second obtaining unit 1404, which is used to obtain the picture identification data corresponding to the multiple receipt pictures; a first generating unit 1405, which is used to generate a printing receipt template containing the picture identification data based on the display position information; a second sending unit 1406, which is used to send the printing receipt template to the cloud, so that the cloud obtains the multiple receipt pictures according to the picture identification data, and instructs the printing device set in the store operated by the merchant to print out the receipt displaying the multiple receipt pictures based on the printing receipt template.
[0170] Eighth embodiment
[0171] Corresponding to the second embodiment, the eighth embodiment of the present application provides a receipt printing device. Since the device embodiment is basically similar to the second embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the second embodiment. The device embodiment described below is only illustrative.
[0172] Please refer to Fig.15 , which is a schematic diagram of the receipt printing device provided in the eighth embodiment of the present application.
[0173] The receipt printing device 1500 is applied to a printing device server in the cloud, and the device includes: a third obtaining unit 1501, used to obtain a printed receipt template set by a merchant, wherein the printed receipt template includes image identification data corresponding to multiple receipt images and display location information corresponding to each receipt image; a fourth obtaining unit 1502, used to obtain multiple receipt images corresponding to the printed receipt template from a picture storage in the cloud according to the image identification data of the multiple receipt images in the printed receipt template, wherein the multiple receipt images are provided to the picture storage by the front end of the printed receipt template; an indicating unit 1503, used to instruct a printing device set in a store operated by the merchant to print out a receipt displaying the multiple receipt images according to the printed receipt template when a receipt needs to be printed according to the printed receipt template.
[0174] Ninth embodiment
[0175] Corresponding to the third embodiment, the ninth embodiment of the present application provides a receipt printing device. Since the device embodiment is basically similar to the third embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the third embodiment. The device embodiment described below is only illustrative.
[0176] Please refer to Fig.16 , which is a schematic diagram of the receipt printing device provided in the ninth embodiment of the present application.
[0177] The receipt printing device 1600 is applied to a printing device set up in a store operated by a merchant, and the device includes: a fifth obtaining unit 1601, which is used to instruct the printing device set up in the store operated by the merchant to print out a receipt displaying the multiple receipt images according to the printing receipt template when a receipt needs to be printed according to the printing receipt template; a first printing unit 1602, which is used to print a receipt displaying the multiple receipt images according to the printing instruction set.
[0178] Tenth embodiment
[0179] Corresponding to the fourth embodiment, the tenth embodiment of the present application provides a device for printing a receipt. Since the device embodiment is basically similar to the fourth embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the fourth embodiment. The device embodiment described below is only illustrative.
[0180] Please refer to Fig.17 , which is a schematic diagram of a receipt printing setting device provided in the tenth embodiment of the present application.
[0181] The printing receipt setting device 1700 is applied to the front end of setting the printing receipt template, and the device includes: a second display unit 1701, which is used to display a printing color selection component for merchants to select the printing color of the receipt in the printing receipt template setting interface; a sixth obtaining unit 1702, which is used to obtain the printing color data of the receipt selected by the merchant through the printing color selection component; a third sending unit 1703, which is used to send the printing receipt template set by the merchant to the printing device server in the cloud, and the printing receipt template includes the printing 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 in the receipt into 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 the receipt according to the receipt printing template set by the merchant, a printing instruction set is generated according to the receipt printing template and the instance data to be printed provided by the front end, and the printing instruction set is sent to a printing device set in a store operated by the merchant, so that the printing device prints a receipt with the receipt data color as the receipt printing color selected by the merchant according to the printing instruction set.
[0182] Eleventh Embodiment
[0183] Corresponding to the fifth embodiment, the eleventh embodiment of the present application provides a receipt printing device. Since the device embodiment is basically similar to the fifth embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the fifth embodiment. The device embodiment described below is only illustrative.
[0184] Please refer to Fig.18 , which is a schematic diagram of the receipt printing device provided in the eleventh embodiment of the present application.
[0185] The receipt printing device 1800 is applied to a printing device server in the cloud, and the device includes: a seventh obtaining unit 1801, used to obtain a printing receipt template set by a merchant, and the printing receipt template includes the receipt printing color data selected by the merchant; a second generating unit 1802, used to generate a printing instruction set according to the printing receipt template and the instance data to be printed provided by the front end when a receipt needs to be printed according to the printing receipt template, and send the printing instruction set to a printing device set in a store operated by the merchant, so that the printing device prints a receipt with the receipt data color as the receipt printing color selected by the merchant according to the printing instruction set.
[0186] Twelfth Embodiment
[0187] Corresponding to the sixth embodiment, the twelfth embodiment of the present application provides a receipt printing device. Since the device embodiment is basically similar to the sixth embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the sixth embodiment. The device embodiment described below is only illustrative.
[0188] Please refer to Fig.19 , which is a schematic diagram of the receipt printing device provided in the twelfth embodiment of the present application.
[0189] The receipt printing device 1900 is applied to a printing device set up in a store operated by a merchant, and the device includes: an eighth obtaining unit 1901, used to obtain a printing instruction set sent by a printing device server on the cloud, the printing instruction set is generated according to a printing receipt template and instance data to be printed, the printing receipt template includes the receipt printing color data selected by the merchant, the printing 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 a printing receipt template setting interface displayed on the front end, and the instance data to be printed is provided by the front end to the printing device server; a second printing unit 1902, used to print out a receipt whose receipt data color is the receipt printing color selected by the merchant according to the printing instruction set.
[0190] Thirteenth Embodiment
[0191] Corresponding to the methods of the first to sixth embodiments of the present application, the thirteenth embodiment of the present application further provides an electronic device.
[0192] like Fig. 20 As shown, Fig. 20 A schematic diagram of an electronic device provided for the thirteenth embodiment of the present application.
[0193] In this embodiment, an optional hardware structure of the electronic device 2000 can be as follows: Fig. 20 As shown, the electronic device 2000 includes: at least one processor 2001, at least one memory 2002 and at least one communication bus 2005; the memory 2002 includes a program 2003 and data 2004. The bus 2005 may be a communication device for transmitting data between components inside the electronic device 2000, such as an internal bus (for example, a CPU-memory bus, the processor is a central processing unit, referred to as CPU), an external bus (for example, a universal serial bus port, a peripheral component interconnect express port), etc. In addition, the electronic device also includes: at least one network interface 2006, at least one peripheral interface 2007. The network interface 2006 provides wired or wireless communication with an external network 2008 (e.g., the Internet, an intranet, a local area network, a mobile communication network, etc.); in some embodiments, the 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. The peripheral interface 2007 is used to connect to peripherals, and the peripherals may be peripherals 1 ( Fig. 20 2009), Peripheral 2( Fig. 20 2010) and Peripheral 3 ( Fig. 202011 in the figure). Peripherals are peripheral devices, and peripheral devices may include but are not limited to cursor control devices (such as mice, touch pads or touch screens), keyboards, displays (such as cathode ray tube displays, liquid crystal displays). Displays or light-emitting diode displays, video input devices (for example, cameras or input interfaces coupled to video archives for communication), etc. Processor 2001 may be a CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application. Memory 2002 may include high-speed RAM (full name: Random Access Memory) memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk storage. Among them, processor 2001 calls the programs and data stored in memory 2002 to execute the methods of the first to sixth embodiments of the present application.
[0194] Fourteenth Embodiment
[0195] Corresponding to the methods of the first to sixth embodiments of the present application, the fourteenth embodiment of the present application also provides a computer storage medium, which stores a computer program, and the computer program is run by a processor to execute the methods of the first to sixth embodiments of the present application.
[0196] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
[0197] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory. Memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium. 1. Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The 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 technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmitting medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable storage media such as modulated data signals and carrier waves. 2. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented 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, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
Claims
1. A method for printing a receipt, characterized in that: Applied to the front end of setting up a printing receipt template, the method includes: In the print receipt template setting interface, a receipt image editing area is displayed for merchants to set receipt images; Obtaining multiple receipt images set by the merchant and display location information corresponding to each receipt image through the multiple receipt image editing areas; Sending the multiple receipt images to the cloud; Obtaining image identification data corresponding to the plurality of receipt images; Generate a printed receipt template containing image identification data based on the display location information; The printed receipt template is sent to the cloud, so that the cloud obtains the multiple receipt images according to the image identification data, and instructs a printing device set in a store operated by the merchant to print out a receipt displaying the multiple receipt images based on the printed receipt template.
2. The method according to claim 1, characterized in that The display location information corresponding to each receipt image is obtained in the following manner: In response to detecting a triggering operation on a receipt display position in a setting page, displaying a receipt image editing area for editing the display position, wherein one display position includes at least one receipt image; In response to detecting an image editing operation on an editing area of the receipt image, obtaining receipt display position information where the image editing operation is performed, the display position information including a display position and an editing area position.
3. The method according to claim 1, characterized in that The cloud includes: a printing device server and a picture storage terminal; The sending of the plurality of receipt images to the cloud comprises: Sending the plurality of receipt images to the image storage end; The step of sending the printed receipt template to the cloud comprises: The printed receipt template is sent to the printing device server.
4. The method according to claim 1, characterized in that: The receipt image editing area for merchants to set receipt images is displayed in the receipt template setting interface, including: In the printing receipt template setting interface, multiple receipt image upload entry components are displayed for merchants to upload multiple receipt images.
5. The method according to claim 3, characterized in that: Also includes: Get the instance data to be printed; Sending a printing instruction to the printing device server, wherein the printing instruction includes the instance data to be printed; The method of instructing a printing device disposed in a store operated by the merchant to print a receipt displaying the plurality of receipt images according to the receipt printing template and the plurality of receipt images comprises: In response to the printing instruction, generating a printing instruction set according to the plurality of receipt images, the to-be-printed instance data provided by the front end, and the printing receipt template; According to the printing instruction set, a printing device set in a store operated by the merchant is instructed to print out a receipt showing the multiple receipt images.
6. A receipt printing method, characterized in that: Applied to a printing device server in the cloud, the method comprises: Obtaining a printing receipt template set by the merchant, wherein the printing receipt template includes image identification data corresponding to multiple receipt images and display position information corresponding to each receipt image; According to the image identification data of the multiple receipt images in the printed receipt template, a plurality of receipt images corresponding to the printed receipt template are obtained from the image storage end in the cloud, wherein the multiple receipt images are provided to the image storage end by the front end of setting the printed receipt template; When it is necessary to print a receipt according to the receipt printing template, a printing device set in a store operated by the merchant prints out a receipt showing the multiple receipt images according to the instructions of the receipt printing template.
7. A receipt printing method, characterized in that: Applied to a printing device arranged in a store operated by a merchant, the method comprises: Obtain a printing instruction set sent by a printing device server on the cloud, wherein the printing instruction set is generated based on a plurality of receipt images, instance data to be printed provided by a front end, and a printing receipt template, wherein the printing receipt template includes image identification data corresponding to a plurality of receipt images and display location information corresponding to each receipt image, wherein the printing receipt template is set by a merchant through a front end and sent by the front end to the printing device server, wherein the plurality of receipt images are obtained by the merchant through a plurality of receipt image editing areas in a printing receipt template setting interface displayed on the front end, wherein the plurality of receipt images are sent by the front end to an image storage end on the cloud, and are obtained by the printing device server from the image storage end based on the image identification data of the plurality of receipt images in the printing receipt template set by the merchant; According to the printing instruction set, a receipt displaying the plurality of receipt images is printed.
8. A method for printing a receipt, characterized in that: Applied to the front end of setting up a printing receipt template, the method includes: Display the printing color selection component for merchants to select the printing color of receipts in the printing receipt template setting interface; Obtaining the receipt printing color data selected by the merchant through the printing color selection component; The receipt printing template set by the merchant is sent to the printing device server in the cloud, and 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 in the receipt into 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 printing instruction set is generated according to the receipt printing template and the instance data to be printed provided by the front end, and the printing 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 as the receipt printing color selected by the merchant according to the printing instruction set.
9. A receipt printing method, characterized in that: Applied to a printing device server in the cloud, the method comprises: Obtaining a receipt printing template set by a merchant, wherein the receipt printing template includes receipt printing color data selected by the merchant; When it is necessary to print a receipt according to the receipt printing template, a printing instruction set is generated according to the receipt printing template and the instance data to be printed provided by the front end, and the printing instruction set is sent to a printing device set in a store operated by the merchant, so that the printing device prints out a receipt with the receipt data color being the receipt printing color selected by the merchant according to the printing instruction set.
10. A receipt printing method, characterized in that: Applied to a printing device arranged in a store operated by a merchant, the method comprises: Obtaining a printing instruction set sent by a printing device server on the cloud, wherein the printing instruction set is generated according to a printing receipt template and instance data to be printed, wherein the printing receipt template includes the receipt printing color data selected by the merchant, wherein the printing receipt template is set by the merchant through a front end and sent by the front end to the printing device server, wherein the receipt printing color data selected by the merchant is selected by the merchant through a printing color selection component in a printing receipt template setting interface displayed on the front end, and wherein the instance data to be printed is provided by the front end to the printing device server; According to the printing instruction set, a receipt is printed whose receipt data color is the receipt printing color selected by the merchant.
Citation Information
Cited By
Color receipt printing method and device, computer equipment and readable storage medium
CN120191135A
Receipt printing setting method and apparatus, and method and apparatus for printing receipt
WO2026137960A1