Order printing method and device, storage medium and computer device

By receiving the order's identification information to determine the order type and matching the print template, the problem of a single order print format is solved, thus satisfying diverse printing needs and improving efficiency.

CN115309351BActive Publication Date: 2026-02-24PINGAN YIQIANBAO E COMMERCE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210925456.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-03
Publication Date
2026-02-24
Estimated Expiration
2042-08-03

AI Technical Summary

Technical Problem

In existing technologies, the order printing format is fixed, which cannot meet the diverse needs of users, and changing the printing format requires upgrading and modifying the POS terminal, resulting in low printing efficiency.

Method used

By receiving the identification information of the orders to be printed, determining the order type and matching the corresponding print template, obtaining various transaction information, and finally printing based on the print template and transaction information, the system avoids using the same print format for all orders and meets the different print format needs of users.

Benefits of technology

It improved order printing efficiency, reduced the need for POS terminal upgrades, and lowered the workload for staff.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115309351B_ABST
    Figure CN115309351B_ABST
Patent Text Reader

Abstract

The application discloses an order printing method and device, a storage medium and computer equipment, relates to the field of information technology, and mainly aims at improving the printing efficiency of orders. The method comprises the following steps: receiving a printing instruction corresponding to a to-be-printed order, wherein the printing instruction comprises identification information corresponding to the to-be-printed order; determining an order type to which the to-be-printed order belongs based on the identification information, and determining a printing template corresponding to the order type; obtaining each item of transaction information corresponding to the to-be-printed order based on the printing template; and printing the to-be-printed order based on the printing template and the each item of transaction information. The application is suitable for printing order information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information technology, and in particular to an order printing method, apparatus, storage medium, and computer equipment. Background Technology

[0002] During daily shopping, it is necessary to print out the transaction order information of the goods so that customers can better understand the merchant's service measures and communication methods. This facilitates timely interaction between both parties and provides great convenience for effective communication.

[0003] Currently, order information is typically printed using a fixed printing format. However, changing the printing format requires upgrading the POS machine, which reduces order printing efficiency. Summary of the Invention

[0004] This invention provides an order printing method, apparatus, storage medium, and computer equipment, which mainly improves the efficiency of order printing.

[0005] According to a first aspect of the present invention, an order printing method is provided, comprising:

[0006] Receive a print instruction corresponding to an order to be printed, wherein the print instruction includes identification information corresponding to the order to be printed;

[0007] Based on the identification information, the order type of the order to be printed is determined, and the print template corresponding to the order type is determined;

[0008] Based on the print template, obtain the transaction information corresponding to the order to be printed;

[0009] Based on the print template and the transaction information, the order to be printed is printed.

[0010] According to a second aspect of the present invention, an order printing apparatus is provided, comprising:

[0011] A receiving unit is configured to receive a printing instruction corresponding to an order to be printed, wherein the printing instruction includes identification information corresponding to the order to be printed;

[0012] The determining unit is used to determine the order type to which the order to be printed belongs based on the identification information, and to determine the printing template corresponding to the order type;

[0013] The acquisition unit is used to acquire various transaction information corresponding to the order to be printed based on the printing template;

[0014] The printing unit is used to print the order to be printed based on the printing template and the various transaction information.

[0015] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0016] Receive a print instruction corresponding to an order to be printed, wherein the print instruction includes identification information corresponding to the order to be printed;

[0017] Based on the identification information, the order type of the order to be printed is determined, and the print template corresponding to the order type is determined;

[0018] Based on the print template, obtain the transaction information corresponding to the order to be printed;

[0019] Based on the print template and the transaction information, the order to be printed is printed.

[0020] According to a fourth aspect of the present invention, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to perform the following steps:

[0021] Receive a print instruction corresponding to an order to be printed, wherein the print instruction includes identification information corresponding to the order to be printed;

[0022] Based on the identification information, the order type of the order to be printed is determined, and the print template corresponding to the order type is determined;

[0023] Based on the print template, obtain the transaction information corresponding to the order to be printed;

[0024] Based on the print template and the transaction information, the order to be printed is printed.

[0025] According to the order printing method, apparatus, storage medium, and computer equipment provided by the present invention, compared with the current method of printing using only one fixed printing format, the present invention receives a printing instruction corresponding to an order to be printed, wherein the printing instruction includes identification information corresponding to the order to be printed; and determines the order type to which the order to be printed belongs based on the identification information, and determines a printing template corresponding to the order type; simultaneously, obtains various transaction information corresponding to the order to be printed based on the printing template; and finally prints the order to be printed based on the printing template and the various transaction information. This avoids printing all orders using the same printing format, meets the different printing format needs of users, and avoids the problem of upgrading and modifying POS terminals to change the printing format, thereby improving order printing efficiency and reducing the workload of staff. Attached Figure Description

[0026] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0027] Figure 1 A flowchart of an order printing method provided by an embodiment of the present invention is shown;

[0028] Figure 2 A flowchart of another order printing method provided by an embodiment of the present invention is shown;

[0029] Figure 3 A schematic diagram of the structure of an order printing device provided in an embodiment of the present invention is shown;

[0030] Figure 4 A schematic diagram of another order printing device provided in an embodiment of the present invention is shown;

[0031] Figure 5 A schematic diagram of the physical structure of a computer device provided in an embodiment of the present invention is shown. Detailed Implementation

[0032] The present invention will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the present application can be combined with each other.

[0033] Currently, using only one printing format to print orders cannot meet users' printing needs. At the same time, upgrading POS printing terminals to change the printing format reduces the efficiency of order printing.

[0034] To address the aforementioned problems, embodiments of the present invention provide an order printing method, such as... Figure 1 As shown, the method includes:

[0035] 101. Receive the print instruction corresponding to the order to be printed, wherein the print instruction includes the identification information corresponding to the order to be printed.

[0036] The order to be printed can be a product transaction order, and the identification information can specifically be icon information, order ID information, etc.

[0037] In order to overcome the problem of low order printing efficiency in the prior art, this invention determines the order template corresponding to the order to be printed by the order type to which the order to be printed belongs, and obtains the transaction information corresponding to the order to be printed through the order template. Finally, the order to be printed is printed based on the printing template and the transaction information. This avoids printing all orders in the same printing format, meets the different printing format requirements of users, and avoids the problem of upgrading and modifying the POS terminal to change the printing format. This improves the order printing efficiency and reduces the workload of staff.

[0038] Specifically, to print orders, this invention discloses a printing system including a transaction payment module, a business processing module, a print push module, a cache module, and a printing terminal. The transaction payment module supports mobile payment, mobile scanning payment, cash payment, bank card payment, membership payment, points payment, and coupon payment. After a payment transaction is completed, a print instruction corresponding to the transaction order is automatically generated. Upon receiving the print instruction, the transaction information is transmitted to the business processing module for processing. The business processing module stores various print formats. Based on the identification information corresponding to the order to be printed, the business processing module determines the print format corresponding to the order to be printed and sends the transaction information and the print format to the print push module. The print push module then pushes the transaction information to the printing terminal corresponding to the order to be printed for printing. The print push module and the printing terminal transmit transaction information via the MQTT protocol. The MQTT protocol is a message queue transmission protocol that uses a publish-subscribe mechanism. Subscribers only receive data they have subscribed to, and do not receive non-subscribed data, which ensures necessary data exchange while avoiding the storage and processing of invalid data. After receiving the transaction information, the printing terminal will send a receipt to the print push module. At the same time, the merchant can also view the transaction details through the APP or merchant management platform. After selecting the corresponding transaction information, the merchant can click the reprint button. The APP or merchant management platform will send the transaction number and reprint request to the merchant billing system. The merchant billing system will then find the corresponding transaction based on the transaction number and send the corresponding transaction information to the print push system to push it to the POS terminal for printing.

[0039] For example, in a C-to-B QR code transaction, after the consumer scans the merchant's payment code, the transaction request is sent to the business processing module. This module records the transaction, and after the acquiring process, it sends the transaction to the gateway via a two-way link (UnionPay / NetUnion). After receiving the two-way link processing result, the business processing module updates the transaction status and returns it to the consumer. For failed transactions, the failure reason is returned; for successful transactions, the transaction order is pushed to the merchant's billing system. At the same time, the print information and print template required for a successful transaction are sent to the print push module. The print push module then determines the printing terminal corresponding to the order to be printed and sends the transaction information and print template to that printing terminal for printing.

[0040] 102. Based on the identification information, determine the order type to which the order to be printed belongs, and determine the printing template corresponding to the order type.

[0041] The order types can be categorized according to payment methods: mobile phone scanning payment corresponds to mobile phone scanning order type, mobile phone being scanned payment corresponds to mobile phone being scanned order type, cash payment corresponds to cash order type, bank card payment corresponds to bank card order type, member points payment corresponds to member order type, and coupon payment methods correspond to coupon order type. The order payment method corresponding to the order to be printed can be determined through the identification information.

[0042] In this embodiment of the invention, based on the identification information, the transaction method corresponding to the order to be printed can be determined, and based on the transaction method, the order type corresponding to the order to be printed can be determined. Since different order types correspond to different printing templates, the printing template corresponding to the order to be printed can be determined based on the order type. Finally, the order to be printed is printed according to the printing template. Different order types correspond to different printing templates, thereby meeting the user's printing needs.

[0043] 103. Based on the print template, obtain the transaction information corresponding to the order to be printed.

[0044] Different printing templates correspond to different printing formats. The transaction information includes all information about the commodity transaction, such as transaction time information, transaction amount information, quantity of traded goods information, and transaction location information.

[0045] In this embodiment of the invention, after determining the print template corresponding to the order to be printed, the print format corresponding to the order to be printed is determined. The print template includes various title items, such as transaction time title item, transaction location title item, transaction quantity title item, transaction amount title item, and transaction order number title item. The system automatically generates the corresponding transaction information after each title item based on the various transaction information. Finally, based on the print template and various transaction information, the order to be printed is printed, which can meet the user's various printing needs.

[0046] 104. Based on the printing template and the various transaction information, print the order to be printed.

[0047] In this embodiment of the invention, after obtaining the transaction information corresponding to the order to be printed based on the printing template, a print order corresponding to the order to be printed is generated based on the printing template and the transaction information, and the print order is sent to the printing device for printing. Thus, by determining the order template corresponding to the order to be printed based on its order type, and by obtaining the transaction information corresponding to the order to be printed through the order template, the order to be printed is finally printed based on the printing template and the transaction information. This avoids printing all orders using the same printing format, meets the different printing format needs of users, and avoids the problem of upgrading the POS terminal to change the printing format, thereby improving order printing efficiency and reducing the workload of staff.

[0048] According to the order printing method provided by the present invention, compared with the current method of printing using only one fixed printing format, the present invention receives a printing instruction corresponding to an order to be printed, wherein the printing instruction includes identification information corresponding to the order to be printed; and determines the order type to which the order to be printed belongs based on the identification information, and determines a printing template corresponding to the order type; simultaneously, obtains various transaction information corresponding to the order to be printed based on the printing template; and finally prints the order to be printed based on the printing template and the various transaction information. This method avoids printing all orders using the same printing format, meets the different printing format needs of users, and avoids the problem of upgrading and modifying the POS terminal to change the printing format, thereby improving order printing efficiency and reducing the workload of staff.

[0049] Furthermore, to better illustrate the above-described order printing process, as a refinement and extension of the above embodiments, this invention provides another order printing method, such as... Figure 2 As shown, the method includes:

[0050] 201. Receive the print instruction corresponding to the order to be printed, wherein the print instruction includes the identification information corresponding to the order to be printed.

[0051] In this embodiment of the invention, after payment is made for a transaction, the system automatically generates a print instruction corresponding to the order to be printed for the transaction. Based on the identification information carried in the print instruction, the system determines the print type of the order to be printed, and finally prints the order to be printed based on the print template corresponding to that print type. For example, based on the identification information corresponding to the order to be printed, if the order type is determined to be a cash payment order, then the print template corresponding to the cash payment order type is determined, and the order to be printed is printed using the print template corresponding to the cash payment order type.

[0052] 202. Based on the identification information, determine the order type to which the order to be printed belongs, and determine the printing template corresponding to the order type.

[0053] In this embodiment of the invention, the order type can be divided by transaction payment method or by store, that is, different transaction stores correspond to different order types, such as store A corresponding to order type A, store B corresponding to order type B, and store C corresponding to order type C. If the order type is divided by store, the identification information includes the store identifier corresponding to the order to be printed, that is, the store identifier to which the transaction product belongs. Based on the store identifier, the order type to which the order to be printed belongs is determined, and the printing template corresponding to the order type is determined. In order to determine the printing template corresponding to the order type, the method further includes: constructing printing templates corresponding to different order types; and establishing a mapping relationship between the different order types and their corresponding printing templates.

[0054] Specifically, firstly, print templates corresponding to different order types are constructed, and different print templates correspond to different print formats, so as to meet the different printing needs of users. Then, a mapping relationship between the different order types and their corresponding print templates is established so that the print template can be determined and linked after the order type is determined.

[0055] 203. Based on the print template, obtain the transaction information corresponding to the order to be printed.

[0056] In this embodiment of the invention, after determining the printing template corresponding to the order to be printed, it is necessary to obtain various transaction information corresponding to the order based on the printing template. Therefore, step 203 specifically includes: obtaining the transaction time information, transaction location information, transaction amount information, transaction quantity information, transaction name information, transaction order number information, and transaction method information corresponding to the order to be printed based on the printing template.

[0057] Specifically, the printing template includes various title items. Based on each title item, the transaction information corresponding to the title item is automatically obtained. For example, the transaction time title item automatically links to the transaction time information, the transaction location title item automatically links to the transaction location information, and the transaction store name information automatically links to the transaction store information. Finally, based on each title item in the printing template, the transaction information corresponding to the order to be printed can be obtained. Then, based on the printing template and the transaction information, the order to be printed is printed.

[0058] 204. Based on the order type, determine the first printing terminal corresponding to the order to be printed.

[0059] In this embodiment of the invention, when the printing demand is high at the same time, the printing work of the same printing device will be busy. In order to avoid the problem of low printing efficiency caused by busy printing, this embodiment of the invention includes multiple printing terminals, i.e. multiple printing devices, and different printing devices correspond to different order types. Based on this, before determining the first printing terminal corresponding to the order to be printed according to the order type, the method further includes: obtaining the terminal identifiers corresponding to different printing terminals respectively; and establishing a mapping relationship between the different order types and the different printing terminals based on the terminal identifiers.

[0060] Specifically, each printing device has its own unique terminal identifier. For example, the terminal identifier for printing device 1 is D1, the terminal identifier for printing device 2 is D2, and the terminal identifier for printing device 3 is D3. Based on the terminal identifier, a mapping relationship between different order types and different printing devices is established so that after determining the order type, the system can automatically link the corresponding printing device based on the order type and finally send the print template and the various transaction information to the printing device corresponding to the order type for printing.

[0061] 205. Send the print template and the transaction information to the first printing terminal for printing.

[0062] In this embodiment of the invention, after determining the first printing terminal corresponding to the order to be printed, i.e., the first printing device, it is necessary to send the printing template and the various transaction information to the first printing terminal for printing. Based on this, step 205 specifically includes: storing the first identifier corresponding to the first printing terminal, the printing template, and the various transaction information to a message queue; receiving a consumption instruction sent by the printing terminal, wherein the consumption instruction carries the second identifier corresponding to the printing terminal; determining whether the first identifier is the same as the second identifier; if the first identifier is the same as the second identifier, then sending the printing template and the various transaction information in the message queue to the printing terminal for printing.

[0063] Specifically, after determining the first printing terminal corresponding to the order to be printed, the first identifier, print template, and various transaction information corresponding to the first printing terminal are stored in a message queue to wait for the printing device to read the message from the message queue for consumption. In order to determine whether the printing device reading the message is the first printing device, that is, to determine whether the second printing terminal is the first printing terminal, it is first necessary to determine whether the identifier information corresponding to the printing device reading the message is equal to the first identifier. If it is equal to the first identifier, then the device reading the message is determined to be the first printing device, and the print template and various transaction information are transmitted to the second printing device for printing. If the identifier information is not equal to the first identifier information, then the printing device reading the message is determined to be not the first printing device. At this time, it is prohibited to transmit the print template and various transaction information in the message queue to the printing device. In another embodiment of the present invention, the method further includes, before the print template and transaction information are published, requesting the server to generate the ID and Key of the corresponding printing device and informing the corresponding printing device, wherein the printing device generates a subscription request based on its own ID and Key when subscribing to the message queue, wherein the Key is used to encrypt the subscription request information, and after receiving the request, the server parses out the ID and Key in the request and verifies whether they are correct. If the verification is correct, a subscription channel is established based on the corresponding ID so that the print template and various transaction information are sent to the printing device for printing through the subscription channel.

[0064] Furthermore, if the second identifier is equal to the first identifier, after sending the print template and various transaction information to the second printing terminal for printing, in order to avoid duplicate printing and alleviate the memory of the message queue, the method further includes: deleting the first identifier, print template and various transaction information corresponding to the first printing terminal from the message queue.

[0065] Specifically, after the order printing is completed, the print template and all transaction information in the message queue are deleted to release the available memory of the message queue and ensure the effective storage of other messages.

[0066] According to another order printing method provided by the present invention, compared with the current method of printing using only one fixed printing format, the present invention receives a printing instruction corresponding to an order to be printed, wherein the printing instruction includes identification information corresponding to the order to be printed; and based on the identification information, determines the order type to which the order to be printed belongs, and determines a printing template corresponding to the order type; simultaneously, based on the printing template, obtains various transaction information corresponding to the order to be printed; and finally prints the order to be printed based on the printing template and the various transaction information. This method avoids printing all orders using the same printing format, meets the different printing format needs of users, and avoids the problem of upgrading and modifying the POS terminal to change the printing format, thereby improving order printing efficiency and reducing the workload of staff.

[0067] Furthermore, as Figure 1 In specific implementation, embodiments of the present invention provide an order printing device, such as... Figure 3 As shown, the device includes: a receiving unit 31, a determining unit 32, an acquiring unit 33, and a printing unit 34.

[0068] The receiving unit 31 can be used to receive a printing instruction corresponding to an order to be printed, wherein the printing instruction includes identification information corresponding to the order to be printed.

[0069] The determining unit 32 can be used to determine the order type to which the order to be printed belongs based on the identification information, and to determine the printing template corresponding to the order type.

[0070] The acquisition unit 33 can be used to acquire various transaction information corresponding to the order to be printed based on the printing template.

[0071] The printing unit 34 can be used to print the order to be printed based on the printing template and the various transaction information.

[0072] In specific application scenarios, in order to establish a mapping relationship between different order types and their corresponding print templates, such as... Figure 4 As shown, the device also includes a construction unit 35.

[0073] The building unit 35 can be used to build print templates corresponding to different order types.

[0074] The construction unit 35 can be specifically used to establish a mapping relationship between the different order types and their corresponding print templates.

[0075] In specific application scenarios, in order to obtain various transaction information corresponding to the order to be printed, the acquisition unit 33 can be used to obtain, based on the printing template, the transaction time information, transaction location information, transaction amount information, transaction quantity information, transaction name information, transaction order number information, and transaction method information corresponding to the order to be printed.

[0076] In a specific application scenario, in order to print the order to be printed, the printing unit 34 includes a determining module 341 and a printing module 342.

[0077] The determining module 341 can be used to determine the first printing terminal corresponding to the order to be printed based on the order type.

[0078] The printing module 342 can be used to send the printing template and the various transaction information to the first printing terminal for printing.

[0079] In specific application scenarios, in order to establish the mapping relationship between the different order types and the different printing terminals, the printing unit 34 further includes an acquisition module 343 and a construction module 344.

[0080] The acquisition module 343 can be used to acquire the terminal identifiers corresponding to different printing terminals.

[0081] The construction module 344 can be used to establish a mapping relationship between different order types and different printing terminals based on the terminal identifier.

[0082] In a specific application scenario, in order to print the order to be printed, the printing module 342 includes a storage submodule, a receiving submodule, a judgment submodule and a printing submodule.

[0083] The storage submodule can be used to store the first identifier, the print template, and the various transaction information corresponding to the first printing terminal into a message queue.

[0084] The receiving submodule can be used to receive a consumption instruction sent by the printing terminal, wherein the consumption instruction carries a second identifier corresponding to the printing terminal.

[0085] The judgment submodule can be used to determine whether the first identifier is the same as the second identifier.

[0086] The printing submodule can be used to send the print template in the message queue and the various transaction information to the printing terminal for printing if the first identifier is the same as the second identifier.

[0087] In specific application scenarios, in order to delete messages in the message queue, the printing module 342 also includes a deletion submodule.

[0088] The deletion submodule can be used to delete the first identifier, print template and transaction information corresponding to the first printing terminal in the message queue.

[0089] It should be noted that other corresponding descriptions of the functional modules involved in the order printing device provided in this embodiment of the invention can be found in [reference needed]. Figure 1 The corresponding description of the method shown will not be repeated here.

[0090] Based on the above, Figure 1 Accordingly, this embodiment of the invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the following steps: receiving a print instruction corresponding to an order to be printed, wherein the print instruction includes identification information corresponding to the order to be printed; determining the order type to which the order to be printed belongs based on the identification information, and determining a print template corresponding to the order type; obtaining various transaction information corresponding to the order to be printed based on the print template; and printing the order to be printed based on the print template and the various transaction information.

[0091] Based on the above, Figure 1 The method shown and as Figure 3 The embodiment of the device shown in the invention also provides a physical structure diagram of a computer device, such as... Figure 5 As shown, the computer device includes: a processor 41, a memory 42, and a computer program stored in the memory 42 and executable on the processor. Both the memory 42 and the processor 41 are mounted on a bus 43. When the processor 41 executes the program, it performs the following steps: receiving a print instruction corresponding to an order to be printed, wherein the print instruction includes identification information corresponding to the order to be printed; determining the order type to which the order to be printed belongs based on the identification information, and determining a print template corresponding to the order type; obtaining various transaction information corresponding to the order to be printed based on the print template; and printing the order to be printed based on the print template and the various transaction information.

[0092] By utilizing the technical solution of this invention, the invention receives a printing instruction corresponding to an order to be printed, wherein the printing instruction includes identification information corresponding to the order to be printed; and based on the identification information, determines the order type to which the order to be printed belongs, and determines a printing template corresponding to the order type; simultaneously, based on the printing template, obtains various transaction information corresponding to the order to be printed; and finally, prints the order to be printed based on the printing template and the various transaction information. This avoids printing all orders using the same printing format, meets users' different printing format needs, and avoids the problem of upgrading and modifying POS terminals to change the printing format, thereby improving order printing efficiency and reducing the workload of staff.

[0093] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0094] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. An order printing method, characterized in that, include: Receive a print instruction corresponding to an order to be printed, wherein the print instruction includes identification information corresponding to the order to be printed; Based on the identification information, the order payment method and the store to which the order to be printed belongs are determined. Based on the order payment method and the store to which the order belongs, the order type to which the order to be printed belongs is determined, and the printing template corresponding to the order type is determined. Different printing templates correspond to different printing formats. Based on the print template, obtain the transaction information corresponding to the order to be printed; Based on the order type, a first printing terminal corresponding to the order to be printed is determined; the first identifier corresponding to the first printing terminal, the print template, and the various transaction information are stored in a message queue; a consumption instruction sent by the printing terminal is received, wherein the consumption instruction carries a second identifier corresponding to the printing terminal; it is determined whether the first identifier is the same as the second identifier; if so, the print template and the various transaction information in the message queue are sent to the printing terminal for printing; Before sending the print template and transaction information from the message queue to the printing terminal for printing, the process also includes: The printing terminal's ID and Key are pre-generated and stored. The printing terminal generates a subscription request based on its own ID and Key, where the Key is used to encrypt the subscription request. After receiving the subscription request sent by the printing terminal, the ID and Key in the subscription request are parsed out, and the parsed ID and Key are verified to be correct. If correct, a subscription channel is established based on the ID, and the printing template and various transaction information are sent to the printing terminal for printing through the subscription channel.

2. The method according to claim 1, characterized in that, Before determining the print template corresponding to the order type, the method further includes: Create print templates for different order types; Establish a mapping relationship between the different order types and their corresponding print templates.

3. The method according to claim 1, characterized in that, The step of obtaining various transaction information corresponding to the order to be printed based on the printing template includes: Based on the printing template, obtain the transaction time information, transaction location information, transaction amount information, quantity information of traded goods, name information of traded goods, transaction order number information, and transaction method information corresponding to the order to be printed.

4. The method according to claim 1, characterized in that, Before determining the first printing terminal corresponding to the order to be printed based on the order type, the method further includes: Obtain the terminal identifier corresponding to each different printing terminal; Based on the terminal identifier, a mapping relationship is established between different order types and different printing terminals.

5. The method according to claim 1, characterized in that, After sending the print template and transaction information from the message queue to the printing terminal for printing, the method further includes: Delete the first identifier, print template, and all transaction information corresponding to the first printing terminal in the message queue.

6. An order printing device, characterized in that, include: A receiving unit is configured to receive a printing instruction corresponding to an order to be printed, wherein the printing instruction includes identification information corresponding to the order to be printed; The determining unit is configured to determine the order payment method and the store to which the order to be printed belongs based on the identification information, determine the order type to which the order to be printed belongs based on the order payment method and the store to which it belongs, and determine the printing template corresponding to the order type, wherein different printing templates correspond to different printing formats; The acquisition unit is used to acquire various transaction information corresponding to the order to be printed based on the printing template; The printing unit is configured to: determine a first printing terminal corresponding to the order to be printed based on the order type; store a first identifier corresponding to the first printing terminal, a print template, and various transaction information in a message queue; receive a consumption instruction sent by the printing terminal, wherein the consumption instruction carries a second identifier corresponding to the printing terminal; determine whether the first identifier is the same as the second identifier; if so, send the print template and various transaction information in the message queue to the printing terminal for printing; before sending the print template and various transaction information in the message queue to the printing terminal for printing, the unit further includes: pre-generating and storing the printing terminal's own ID and Key; the printing terminal generates a subscription request based on the ID and Key, wherein the Key is used for encrypting the subscription request; after receiving the subscription request sent by the printing terminal, parse the ID and Key in the subscription request, and verify whether the parsed ID and Key are correct; if correct, establish a subscription channel based on the ID, and send the print template and various transaction information to the printing terminal for printing through the subscription channel.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Transaction evidence printing method and system

    CN101966783A

  • Logistics management system, logistic management device of integrated POS machine and information interaction method

    CN107545384A

  • Reprinting method and device

    CN111562893A