A method and system for additional printing of bills

By using the cloud server for OCR processing and logical judgment in additional bill printing, the problem of low efficiency in additional bill printing in the existing technology is solved, fast and convenient additional bill printing is achieved, and the overall printing efficiency is improved.

CN111831237BActive Publication Date: 2024-09-24SHANGHAI SUMI TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010691024.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-17
Publication Date
2024-09-24
Estimated Expiration
2040-07-17

AI Technical Summary

Technical Problem

In the existing technology, when additional printing of a bill is required, the printing template needs to be readjusted or the entire bill reprinted, resulting in time consumption and reduced efficiency.

Method used

Monitor the bill data issued by the host computer through the printing device, create a temporary thread to process the data, and transmit the data to the cloud server for OCR processing. It determines whether additional printing is needed based on the preset logic, and finally sends the additional printing data to the printing device through the MQTT protocol. to print.

Benefits of technology

It realizes fast and convenient additional printing of bills, improves printing efficiency, reduces waiting time, and ensures the efficiency and user experience of bill printing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111831237B
    Figure CN111831237B
Patent Text Reader

Abstract

The present invention provides a method for additional printing of bills, comprising the following steps: a working thread of a printing device monitors bill data sent by a host computer, the bill data being image data; when the printing device monitors the first bill data sent by the host computer, a first printing task is created; a first temporary thread of the printing device processes the first bill data; when the printing device monitors that the first temporary thread has completed processing, a second temporary thread is created to transmit the first bill data to a first cloud server; the first cloud server transmits the first bill data to an OCR cloud server; the OCR cloud server processes the bill data to form additional printing judgment information, and transmits it to the first cloud server; the first cloud server parses and judges the additional printing judgment information according to the judgment logic; when it is determined that additional printing information is generated, the first cloud server sends the additional printing data to the printing device; the printing device creates a third temporary thread to print the information that needs to be additionally printed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention mainly relates to the field of information technology, and in particular to a method and system for additional printing of bills. Background Art

[0002] At present, the common commercial printing mode uses a mobile phone or a host computer to receive an order and then send it to the fixed format receipt issued by the printing host computer through a USB or Bluetooth channel. However, when the user (such as a merchant) wants to dynamically add some promotional content to a specific receipt, it is necessary to readjust the printing template or even reprint the entire receipt. This repetitive operation process consumes more time and also reduces the efficiency of receipt printing. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a method for additional printing of bills, so as to realize fast and convenient additional printing of bills.

[0004] To solve the above technical problems, the present invention provides a method for additional printing of bills, comprising the following steps: a working thread of a printing device monitors bill data sent by a host computer, wherein the bill data is image data; when the printing device monitors the first bill data sent by the host computer, a first printing task is created for the first bill data; the printing device creates a first temporary thread for the first printing task to process the first bill data; when the working thread of the printing device monitors that the first temporary thread has completed processing, the printing device creates a second temporary thread to transmit the first bill data to a first cloud server through the host computer; the first cloud server transmits the first bill data to an OCR cloud server; the OCR cloud server processes the first bill data to form additional printing judgment information, and transmits the additional printing judgment information to the first cloud server; the first cloud server parses and judges the additional printing judgment information according to a pre-set judgment logic to determine whether additional printing information is generated; when it is determined that additional printing information is generated, the first cloud server sends the additional printing data to the printing device; the printing device creates a third temporary thread to print the bill information that needs to be additionally printed.

[0005] In one embodiment of the present invention, the OCR cloud server processes the data to form additional printing determination information, including: the OCR cloud server electronically images the received data, performs optical character recognition on the electronic image formed after imaging, and retrieves the additional printing determination information on the electronic image.

[0006] In one embodiment of the present invention, the first cloud server requests identity authentication for the first bill data before transmitting the first cloud server to the OCR cloud server.

[0007] In one embodiment of the present invention, the printing device is provided with a dynamic buffer; after the additional printing process of the first printing task is completed, the second printing task in the buffer is started to be processed; and the storage space of the first printing task in the buffer is released.

[0008] In one embodiment of the present invention, the first cloud server sends the additional print data to the printing device via the MQTT protocol.

[0009] In one embodiment of the present invention, the first bill data is transmitted to the first cloud server via the Hypertext Transfer Protocol.

[0010] In one embodiment of the present invention, when data is transmitted via the hypertext transfer protocol, it is encoded in Base64 format and encrypted in Sodium standard.

[0011] The present invention also provides a bill additional printing system, comprising:

[0012] The printing device and the host computer are configured as follows: the printing device monitors the bill data sent by the host computer through a working thread, and the bill data is image data; when the printing device monitors the first bill data sent by the host computer, the printing device creates a first printing task for the first bill data; the printing device creates a first temporary thread for the first printing task to process the first bill data;

[0013] When the working thread of the printing device monitors that the processing of the first temporary thread is completed, the printing device creates a second temporary thread and transmits the first ticket data to the first cloud server through the host computer;

[0014] The first cloud server and the OCR server are configured as follows: the first cloud server transmits the first ticket data to the OCR cloud server; the OCR cloud server processes the first ticket data to form additional printing determination information, and transmits the additional printing determination information to the first cloud server; the first cloud server parses and determines the additional printing determination information according to a pre-set judgment logic to determine whether to generate additional printing information; when it is determined that additional printing information is generated, the first cloud server sends the additional printing data to the printing device; the printing device is also configured to create a third temporary thread to print the ticket information that needs to be additionally printed.

[0015] Compared with the prior art, the present invention has the following advantages: key information is identified through the content of the printed bill, and the required content is dynamically added to the bill that meets the requirements according to the preset key information characteristics, thereby realizing fast and efficient additional printing of the bill. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings are provided to provide a further understanding of the present application. They are included and constitute a part of the present application. The accompanying drawings illustrate embodiments of the present application and together with the present specification serve to explain the principles of the present invention. In the accompanying drawings:

[0017] Figure 1 The present invention is a flowchart of a method for additionally printing receipts according to an embodiment of the present invention.

[0018] Figure 2 It is a schematic diagram of the effect of additionally printing a bill according to an embodiment of the present invention.

[0019] Figure 3 The figure is a schematic diagram of the implementation environment of the system for additionally printing receipts according to an embodiment of the present invention. DETAILED DESCRIPTION

[0020] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0021] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0022] As shown in this application, unless the context clearly indicates an exception, the words "a", "an", "a kind" and / or "the" do not refer to the singular, but also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.

[0023] Flowcharts are used in the present application to illustrate the operations performed by the system according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, various steps may be processed in reverse order or simultaneously. At the same time, other operations may be added to these processes, or one or more operations may be removed from these processes.

[0024] The embodiments of the present application describe a method and system for additional printing of receipts. Figure 1 FIG. 1 is a flow chart of a method for printing additional bills according to an embodiment of the present invention. Figure 1As shown, in one embodiment, the method for additional printing of bills of the present invention includes step 101, the working thread of the printing device monitors the bill data sent by the host computer, and the bill data is image data. Step 102, when the printing device monitors the first bill data sent by the host computer, it creates a first printing task for the first bill data. Step 103, the printing device creates a first temporary thread for the first printing task to process the first bill data. Step 104, when the working thread of the printing device monitors that the first temporary thread has completed processing, the printing device creates a second temporary thread and transmits the first bill data to the first cloud server through the host computer. Step 105, the first cloud server transmits the first bill data to the OCR cloud server. Step 106, the OCR cloud server processes the first bill data to form additional printing determination information, and transmits the additional printing determination information to the first cloud server. Step 107, the first cloud server parses and judges the additional printing determination information according to the pre-set judgment logic to determine whether to generate additional printing information; when it is determined that the additional printing determination information is generated, the first cloud server sends the additional printing data to the printing device. Step 108: The printing device creates a third temporary thread to print the ticket information that needs to be printed additionally.

[0025] In step 101, the working thread of the printing device monitors the ticket data sent by the host computer, and the ticket data is image data. After the printing device is powered on, it is connected to the host computer via USB or Bluetooth, and the printing device and the host computer are connected to the first cloud server through the network. The host computer can be a desktop computer, a mobile device, or a handheld dedicated device. The ticket data is transmitted in the form of image data, which can enhance the confidentiality of the user's initial ticket data and improve the security of user information.

[0026] In step 102, when the printing device monitors the first bill data sent by the host computer, a first print task is created for the first bill data. When the working thread of the printing device monitors the bill data sent by the host computer, a dynamic buffer is set in the internal storage area of ​​the printing device. When the printing device monitors the first bill data sent by the host computer, a first print task is created for the first bill data in the dynamic buffer. The dynamic buffer can cache several print tasks.

[0027] In step 103, the printing device creates a first temporary thread for the first printing task to process the first ticket data.

[0028] In step 104, when the working thread of the printing device monitors that the processing of the first temporary thread is completed, the printing device creates a second temporary thread, and transmits the first bill data to the first cloud server through the host computer. Specifically, when the working thread of the printing device monitors that the first temporary thread has completed printing the first bill data, a second temporary thread is created, and the first bill data is transmitted to the first cloud server through the host computer. In one embodiment, the first bill data is transmitted to the first cloud server via the hypertext transfer protocol. When transmitted via the hypertext transfer protocol, the data is encoded in Base64 format and encrypted according to the Sodium standard. Base64 format encoding is a method of representing binary data based on 64 printable characters. Sodium is an easy-to-use software library that provides encryption, decryption, signing, password hashing and other functions.

[0029] In some embodiments, if the working thread of the printing device monitors that the first temporary thread fails to print out the first receipt data, a request may be sent to the upper computer to resend the receipt data for processing.

[0030] In step 105, the first cloud server transmits the first bill data to the OCR cloud server. In some embodiments, the first cloud server may transmit the first bill data to the OCR cloud server in a hypertext transfer protocol manner.

[0031] In step 106, the OCR cloud server processes the first bill data to form additional printing determination information, and transmits the additional printing determination information to the first cloud server. Specifically, the OCR cloud server electronically images the received first bill data, performs optical character recognition on the electronic image formed after imaging, and retrieves the additional printing determination information on the electronic image. The additional printing determination information is, for example, the consumption amount information on the electronic image of the bill. Optical Character Recognition (OCR) is a process of detecting dark and light patterns of characters to be printed, determining their shapes, and then converting the shapes into computer text and symbol data using character recognition methods.

[0032] In step 107, the first cloud server analyzes and judges the additional printing determination information according to the pre-set judgment logic to determine whether to generate additional printing information; when it is determined that the additional printing information is generated, the first cloud server sends the additional printing data to the printing device. In one embodiment, for example, the additional printing determination information obtained in the previous step is the consumption amount, and the pre-set judgment logic is that a discount coupon for a designated product is given when the consumption amount is greater than or equal to a certain amount. Then, when the consumption amount reaches this amount standard, additional printed ticket data information "X discount for designated product" will be generated. When it is determined that this additional printing determination information is generated, the first cloud server sends the additional printing data to the printing device. When it is determined that the additional printing information is not generated, the current ticket printing process ends.

[0033] In some embodiments, the first cloud server sends the additional print data to the printing device via the MQTT protocol. The MQTT (Message Queuing Telemetry Transport) protocol is a client-server based message publish / subscribe transmission protocol.

[0034] In step 108, the printing device creates a third temporary thread to print the ticket information that needs to be printed additionally. After the printing is completed, the current ticket printing process ends. After the additional printing process of the first printing task is completed, the second printing task in the aforementioned dynamic buffer is processed; and the storage space of the first printing task in the dynamic buffer is released.

[0035] Figure 2 2 is a schematic diagram of the effect of additionally printing a bill according to an embodiment of the present invention. When there is an additional bill printing task, the entire bill 200 is, for example, shown in area 202, wherein the printing area of ​​the first bill data is 201a, and the additionally printed bill information is located in area 202a. When no additional bill printing task is generated, the entire bill 200 is, for example, shown in area 201.

[0036] The invoice additional printing method of the present application recognizes key information of the invoice content printed out through a USB or Bluetooth channel, and dynamically prints the required content to the invoice that meets the requirements based on preset key information features, thereby achieving fast and convenient additional printing of the invoice.

[0037] The present application also provides a ticket additional printing system, including a printing device, a host computer, a first cloud server and an OCR server.

[0038] The printing device and the host computer are configured such that the printing device monitors the bill data sent by the host computer through a working thread. The bill data is image data. When the printing device monitors the first bill data sent by the host computer, a first printing task is created for the first bill data. Then, the printing device creates a first temporary thread for the first printing task to process the first bill data.

[0039] When the working thread of the printing device monitors that the processing of the first temporary thread is completed, the printing device creates a second temporary thread and transmits the first bill data to the first cloud server through the host computer. In one embodiment, the first bill data is transmitted to the first cloud server via the hypertext transfer protocol. When the data is transmitted via the hypertext transfer protocol, it is encoded in Base64 format and encrypted in Sodium standard. Base64 format encoding is a method of representing binary data based on 64 printable characters. Sodium is an easy-to-use software library that provides encryption, decryption, signing, password hashing and other functions.

[0040] In some embodiments, if the working thread of the printing device monitors that the first temporary thread fails to print out the first receipt data, a request may be sent to the upper computer to resend the receipt data for processing.

[0041] The first cloud server and the OCR server are configured such that the first cloud server transmits the first bill data to the OCR cloud server. The OCR cloud server processes the first bill data to form additional printing determination information, and transmits the additional printing determination information to the first cloud server. The additional printing determination information is, for example, the consumption amount information on the electronic image of the bill. In some embodiments, the first cloud server may transmit the first bill data to the OCR cloud server in a hypertext transfer protocol manner.

[0042] The first cloud server parses and judges the additional printing determination information according to the pre-set judgment logic to determine whether to generate additional printing information. When it is determined that the additional printing information is generated, the first cloud server sends the additional printing data to the printing device. In one embodiment, for example, the additional printing determination information obtained in the previous step is the consumption amount, and the pre-set judgment logic is that when the consumption amount is greater than or equal to a certain amount, a discount coupon for a designated product is given. Then, when the consumption amount reaches this amount standard, additional printed ticket data information "X discount on designated product" will be generated. When it is determined that this additional printing determination information is generated, the first cloud server sends the additional printing data to the printing device. When it is determined that the additional printing information is not generated, the current ticket printing process ends.

[0043] In some embodiments, the first cloud server sends the additional print data to the printing device via the MQTT protocol. The MQTT (Message Queuing Telemetry Transport) protocol is a client-server based message publish / subscribe transmission protocol.

[0044] The printing device is also configured to create a third temporary thread to print the ticket information that needs to be printed additionally. After the printing is completed, the current ticket printing process ends. After the additional printing process of the first printing task is completed, the second printing task in the aforementioned dynamic buffer is processed; and the storage space of the first printing task in the dynamic buffer is released.

[0045] Figure 3 The schematic diagram of the implementation environment of the additional receipt printing system of one embodiment of the present invention is shown in FIG. The additional receipt printing system 300 includes an internal communication bus 301, a printing device 302, a host computer 304, and a communication port 305. The system 300 is connected to the network and the server through the communication port. Figure 3 In the example, the communication port 305 can be connected to the first cloud server 306, the server data storage A 307, the OCR server 308, and the server storage B 309 on the server side through the network to realize the transmission and processing of the ticket data.

[0046] The ticket additional printing system 300 may also include a processor and different forms of program storage units and data storage units, such as a read-only memory (ROM) and a random access memory (RAM), which can store various data files used for computer processing and / or communication, as well as possible program instructions executed by the processor. The processor executes these instructions to implement the main part of the method. The results of the processor processing are transmitted to the user interface of the host computer through the communication port for display.

[0047] Compared with first transmitting the image data corresponding to the first ticket data to the server through the host computer for data identification and judgment, determining whether there is any content that needs additional printing, and then transmitting the data back to the host computer and the printing device for printing, the ticket additional printing method and system of the present application can realize the instant printing of the first ticket data (also known as the initial ticket data), reduce the waiting time, and use the printing time of the initial ticket data to determine whether there is information that needs additional printing, so as to realize the timely connection between the initial ticket data and the additional printing data, avoid long waiting intervals, and ensure the efficiency of ticket printing and the user experience. Users may include users of the printing system and those who receive printed tickets.

[0048] The present application uses specific words to describe the embodiments of the present application. For example, "one embodiment", "an embodiment", and / or "some embodiments" refer to a certain feature, structure or characteristic related to at least one embodiment of the present application. Therefore, it should be emphasized and noted that "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or multiple times in different positions in this specification does not necessarily refer to the same embodiment. In addition, some features, structures or characteristics in one or more embodiments of the present application can be appropriately combined.

[0049] Some aspects of the present application may be performed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may be referred to as "data blocks", "modules", "engines", "units", "components" or "systems". The processor may be one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DAPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, or combinations thereof. In addition, various aspects of the present application may be expressed as computer products located in one or more computer-readable media, which include computer-readable program codes. For example, computer-readable media may include, but are not limited to, magnetic storage devices (e.g., hard disks, floppy disks, tapes ...), optical disks (e.g., compact disks CDs, digital versatile disks DVDs ...), smart cards, and flash memory devices (e.g., cards, sticks, key drives ...).

[0050] A computer-readable medium may include a propagated data signal containing computer program code, such as in baseband or as part of a carrier wave. The propagated signal may have a variety of manifestations, including electromagnetic, optical, etc., or a suitable combination. A computer-readable medium may be any computer-readable medium other than a computer-readable storage medium, which may be connected to an instruction execution system, device or apparatus to communicate, propagate or transmit a program for use. The program code on the computer-readable medium may be propagated via any suitable medium, including radio, cable, fiber optic cable, radio frequency signal, or similar medium, or any combination of the above mediums.

[0051] Although the present application has been described with reference to the current specific embodiments, ordinary technicians in this technical field should recognize that the above embodiments are only used to illustrate the present application, and various equivalent changes or substitutions may be made without departing from the spirit of the present application. Therefore, as long as the changes and modifications to the above embodiments are within the essential spirit of the present application, they will fall within the scope of the claims of the present application.

Claims

1. A method for printing additional bills, comprising the following steps: The working thread of the printing device monitors the bill data sent by the host computer, and the bill data is image data; When the printing device monitors the first bill data sent by the host computer, a first printing task is created for the first bill data; The printing device creates a first temporary thread for the first printing task to print the first ticket data; When the working thread of the printing device monitors that the printing of the first temporary thread is completed, the printing device creates a second temporary thread and transmits the first ticket data to the first cloud server through the host computer; The first cloud server transmits the first bill data to the OCR cloud server; The OCR cloud server processes the first bill data to generate additional printing determination information, and transmits the additional printing determination information to the first cloud server; The first cloud server analyzes and judges the additional printing determination information according to a preset judgment logic to determine whether to generate additional printing information; When it is determined that additional printing information is generated, the first cloud server sends the additional printing data to the printing device; The printing device creates a third temporary thread to print the ticket information that needs to be additionally printed.

2. The method for additionally printing a bill according to claim 1, characterized in that: The OCR cloud server processes the data to form the additional printing determination information, including: the OCR cloud server electronically images the received data, performs optical character recognition on the electronic image formed after imaging, and retrieves the additional printing determination information on the electronic image.

3. The method for additionally printing a bill according to claim 1, characterized in that: The first cloud server will request identity authentication for the data before transmitting the first bill data to the OCR cloud server.

4. The method for additional printing of bills according to claim 1, characterized in that: The printing device is provided with a dynamic buffer; after the additional printing process of the first printing task is completed, the second printing task in the buffer starts to be processed; and the storage space of the first printing task in the buffer is released.

5. The method for additional printing of bills according to claim 1, characterized in that: The first cloud server sends the additional print data to the printing device via the MQTT protocol.

6. The method for additionally printing a bill according to claim 1, characterized in that: The first bill data is transmitted to the first cloud server via the Hypertext Transfer Protocol.

7. The method for additionally printing a bill according to claim 6, characterized in that: When transmitted via the hypertext transfer protocol, data is encoded in Base64 format and encrypted according to the Sodium standard.

8. A system for printing additional receipts, comprising: The printing device and host computer are configured as follows: The printing device monitors the ticket data sent by the host computer through the working thread, and the ticket data is image data; When the printing device monitors the first bill data sent by the host computer, a first printing task is created for the first bill data; The printing device creates a first temporary thread for the first printing task to print the first ticket data; When the working thread of the printing device monitors that the printing of the first temporary thread is completed, the printing device creates a second temporary thread and transmits the first ticket data to the first cloud server through the host computer; The first cloud server and OCR server are configured as follows: The first cloud server transmits the first bill data to the OCR cloud server; the OCR cloud server processes the first bill data to form additional printing determination information, and transmits the additional printing determination information to the first cloud server; The first cloud server analyzes and judges the additional printing determination information according to a preset judgment logic to determine whether to generate additional printing information; When it is determined that additional printing information is generated, the first cloud server sends the additional printing data to the printing device; The printing device is further configured to create a third temporary thread to print the ticket information that needs to be additionally printed.

9. The ticket additional printing system according to claim 8, characterized in that: The OCR cloud server processes the data to form the additional printing determination information, including: the OCR cloud server electronically images the received data, performs optical character recognition on the electronic image formed after imaging, and retrieves the additional printing determination information on the electronic image.

10. The ticket additional printing system according to claim 8, characterized in that: The first cloud server will request identity authentication for the data before transmitting the first bill data to the OCR cloud server.

11. The ticket additional printing system according to claim 8, characterized in that: The printing device is provided with a dynamic buffer; after the additional printing process of the first printing task is completed, the second printing task in the buffer starts to be processed; and the storage space of the first printing task in the buffer is released.

12. The ticket additional printing system according to claim 8, characterized in that: The first cloud server sends the additional print data to the printing device via the MQTT protocol.

13. The ticket additional printing system according to claim 8, characterized in that: The first bill data is transmitted to the first cloud server via the Hypertext Transfer Protocol.

14. The ticket additional printing system according to claim 13, characterized in that: When transmitted via the hypertext transfer protocol, data is encoded in Base64 format and encrypted according to the Sodium standard.