A bill printing method, device and storage medium
The first application obtains the bill information stored in the second application and transcodes it to the printer, which solves the problem of cumbersome ticket printing operations in the prior art, and realizes the user's convenient bill printing process.
Patent Information
- Application Number
- CN202111215182.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-19
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2041-10-19
AI Technical Summary
Existing smart printer applications have cumbersome operations in bill printing, and users need to download bill files to the terminal or use special applications provided by the manufacturer to print.
The first application receives the user's printing request, obtains the bill information stored in the second application, and displays the bill information interface. The user can select the target bill information, transcode it into the target printer readable format, and send it to the printer.
It simplifies user operations. Users do not need to manually download ticket files or use special applications, but directly implement ticket printing through subroutines, improving operational convenience and user experience.
Smart Images

Figure CN113934386B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of printing control, and in particular to a ticket printing method, device and storage medium. Background Art
[0002] With the development of smart printers, all printers on the market now have printing applications that help users operate from their mobile phones and simplify the printing process. However, existing applications are basically limited to document or image printing, and can only print documents or image information stored locally on the user's mobile phone. When a user needs to print bill information, such as an invoice, he needs to first download the invoice to the mobile terminal, and select the invoice image or corresponding document for printing through the application. The operation is cumbersome and will cause inconvenience in daily use. Summary of the invention
[0003] In order to overcome the problems existing in the related art, this specification provides a ticket printing method, device and storage medium.
[0004] According to a first aspect of an embodiment of this specification, a ticket printing method is provided, the method comprising:
[0005] receiving a first print request from a user in a first application, wherein the first application is a subprogram of a second application;
[0006] Acquire the ticket information in the storage area of the second application and display the ticket information interface, wherein the ticket information interface includes a ticket selection button;
[0007] Receive target ticket information selected by the user;
[0008] The target ticket information is transcoded into a format readable by a target printer, and the transcoded ticket information is sent to the target printer.
[0009] According to a second aspect of the embodiments of this specification, there is provided a bill printing device, comprising:
[0010] A request receiving module, configured to receive a first print request from a user in a first application, where the first application is a subprogram of a second application;
[0011] An information acquisition module, used to acquire the ticket information in the storage area of the second application and display the ticket information interface, wherein the ticket information interface includes a ticket selection button;
[0012] A selection receiving module is used to receive target ticket information selected by the user;
[0013] The information sending module is used to transcode the target ticket information into a format readable by the target printer, and send the transcoded ticket information to the target printer.
[0014] According to a third aspect of the embodiments of this specification, there is provided a non-transitory computer-readable storage medium having a computer program stored thereon, which implements the steps of the above-mentioned ticket printing method when executed by a processor.
[0015] The technical solution provided in the embodiments of this specification obtains the ticket information stored in the second application through the first application, so that the user does not need to download the ticket file to the terminal personally, or specifically download the application provided by the manufacturer separately for printing, which facilitates the user's printing operation and better conforms to the current user habits.
[0016] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in this specification, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in one or more embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 It is a flow chart of a ticket printing method shown in an exemplary embodiment of the present application.
[0019] Figure 2 It is a flow chart of a complete method for ticket printing shown in an exemplary embodiment of the present application.
[0020] Figure 3 It is a schematic diagram of a bill information interface shown in an exemplary embodiment of the present application.
[0021] Figure 4 It is a schematic diagram of a ticket printing device shown in an exemplary embodiment of the present application.
[0022] Figure 5 It is a schematic diagram of another ticket printing device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0023] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this specification. Instead, they are merely examples of devices and methods consistent with some aspects of this specification as detailed in the appended claims.
[0024] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. The singular forms "a", "the" and "the" used in this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0025] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0026] The implementation scheme of the present application will be described in detail below with reference to the accompanying drawings.
[0027] At present, existing smart printers are usually combined with supporting applications, so that users can control the printer to print through mobile terminals. However, existing applications are limited to document printing or image printing, and can only print files stored in the user's mobile phone. Especially when the user has a need to print invoices, it is necessary to first download the electronic invoice to the mobile terminal, and select the invoice image or the corresponding document to print through the application. The operation is cumbersome and will cause inconvenience in daily use.
[0028] A flowchart of a bill printing method shown in an exemplary embodiment of the present application is as follows Figure 1 shown.
[0029] In step S101, a first print request from a user is received in a first application, where the first application is a subprogram of a second application.
[0030] The user's first print request may be an operation of the user to open the first application. The first application is a subroutine of the second application. Under normal circumstances, the first application, as a subroutine, can obtain information of the second application without the need for re-login or verification. The second application may be WeChat, Alipay or other types of payment software. After the user purchases and sells goods, provides or receives services, and engages in other business activities through the second application, the application can record the payment receipts generated by this consumption behavior, such as electronic invoices. When the user needs to print a bill, the subroutine of the second application, that is, the first application, can be opened. In an exemplary embodiment, WeChat can be used as the second application. After the user consumes through WeChat, the subsequent printing process can be operated through the WeChat subroutine provided in this application, that is, the WeChat applet.
[0031] In step S102, the ticket information in the storage area of the second application is obtained, and a ticket information interface is displayed, wherein the ticket information interface includes a ticket selection button.
[0032] After receiving the first print request from the user, the first application actively obtains the ticket information stored by the second application and generates a ticket information interface for the user. Figure 3 As shown, in this embodiment, the bill is electronic invoice information, and the bill information interface may include information such as merchant name, consumption amount, consumption time, company or personal title, project notes, etc., and is arranged in order from recent to distant consumption time. In addition, the interface also includes a bill selection button and an invoice reimbursement notice consent button. After the user chooses to agree to the invoice reimbursement notice, the user can select at least one electronic invoice to be printed through the bill selection button.
[0033] In step S103, the target ticket information selected by the user is received.
[0034] The target ticket information is the ticket information selected by the user and needs to be printed. The target ticket information can be one or more tickets. When the user selects multiple tickets, the ticket information interface can display the number of selected tickets. When the number of tickets selected by the user reaches the upper limit for printing, the user can be prompted that the target ticket information cannot be selected any more.
[0035] In step S104, the target ticket information is transcoded into a format readable by the target printer, and the transcoded ticket information is sent to the target printer.
[0036] At present, the image formats supported by the commonly used systems can basically be read by the printer. The first application transcodes the target bill information selected by the user into a file type that can be read by the target printer. For bill information such as electronic invoices, the optional transcoding target can be a common file format such as PDF. The target printer is the printer that establishes a connection relationship with the first application. The specific connection method is described in the subsequent description.
[0037] Based on the above method, the method of obtaining the ticket information stored in the second application through the first application eliminates the need for users to download the ticket file to the terminal personally, or specifically download the application provided by the manufacturer for printing, which facilitates user printing operations and better meets the usage habits of today's users.
[0038] Preferably, the step of obtaining the ticket information in the storage area in the second application program includes:
[0039] accessing the second application storage area through an internal program interface, wherein the internal program interface is an application program interface between the first application and the second application;
[0040] Obtain the ticket information in the application storage area.
[0041] An application programming interface, also known as an API, is a computing interface. It defines the interactions between multiple software intermediaries, as well as the types of calls or requests that can be made, how to make calls or requests, the data format to be used, the conventions to be followed, and so on. The internal application programming interface is the API between the first application and the second application. The first application obtains the ticket information in the storage area of the application through the API. In one embodiment, a user performs a ticket printing operation through a WeChat applet. After receiving a print request selected by the user, the applet obtains the ticket list and link address in WeChat through the WeChat card package API. In the case where the WeChat software stores the ticket information it generates in the WeChat card package, the applet can directly access and obtain the information through the internal program interface; in the case where the ticket information is not stored locally, the WeChat card package can first download the ticket information through the network, and then the WeChat applet can retrieve it.
[0042] Through this method, the entire operation process can be implemented through the second application and its subprograms, and access and acquisition are all implemented inside the second application, which is simple and convenient, and does not require the user to perform verification operations. Further optimize the running speed.
[0043] In some embodiments, a flowchart of a complete method for printing a bill is shown in an exemplary embodiment of the present application. Figure 2 shown.
[0044] In step S101-1, in response to receiving a first print request, a first preset interface is displayed, wherein the first preset interface includes option buttons for picture printing, document printing, and ticket printing; wherein the first print request is triggered, for example, by a "request print" button in a first application.
[0045] In step S101 - 2 , a user's printing option is received.
[0046] After receiving the user's first print request, the user's requirements for specific printing types can be further obtained. In addition to receipt printing, the user can also choose image printing or document printing. Receiving the user's image printing or document printing requirements through the application and performing subsequent printing operations can be implemented according to the existing functions in the existing application, and this application will not go into details here.
[0047] In step S101 - 3 , in response to the user's printing option being receipt printing, a second printing request is received, that is, a request for receipt printing.
[0048] When the user selects the option button for receipt printing, the first application responds to the user operation and determines that the user demand is receipt printing.
[0049] Through the above method, user-selectable printing type options are increased, enriching the printing operations that can be implemented by the first application, meeting the rest of the current users' daily printing needs, and better conforming to the current user habits.
[0050] In step S111, a connection is established with the target printer, and a second preset interface is displayed, wherein the second preset interface includes prompt information indicating that the connection with the target printer is successful.
[0051] The first application can be connected to the target printer through the terminal in a variety of ways. For a smart printer with a print server, the print server can be used as a network connection solution to connect to the terminal in the same local area network. For a printer with a USB interface, it can be directly connected to the terminal through a data cable. After the connection is established, a second preset interface is displayed, including a prompt message that the target printer is successfully connected, so as to inform the user that the terminal has the printing conditions.
[0052] It is understandable that the present application does not limit the specific execution order of this step. The first application can connect to the target printer after receiving the user's print request, or can complete the above operation at any time before the first application sends the transcoded ticket information to the target printer.
[0053] According to the method, after the first application is connected to the target printer via the terminal, a second preset interface is generated to inform the user that the terminal has the printing conditions.
[0054] The solution provided by the present application can at least provide the following beneficial effects: by obtaining the ticket information stored in the second application through the first application, the user does not need to personally download the ticket file to the terminal, or specifically download the application provided by the manufacturer for printing. The entire operation process can be implemented through the second application and its subroutines, and access and acquisition are all implemented within the second application. The method is simple and convenient, does not require the user to perform verification operations, and can also meet the user's other daily printing needs at the same time, facilitating the user's printing operations and better meeting the usage habits of today's users.
[0055] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0056] Corresponding to the embodiments of the aforementioned method, this specification also provides embodiments of a device and a terminal to which it is applied.
[0057] A schematic diagram of a bill printing device shown in an exemplary embodiment of the present application is as follows Figure 4 As shown, specifically including:
[0058] A request receiving module 401, configured to receive a first print request from a user in a first application, where the first application is a subprogram of a second application;
[0059] An information acquisition module 402, used to acquire the ticket information in the storage area of the second application and display the ticket information interface, wherein the ticket information interface includes a ticket selection button;
[0060] A selection receiving module 403 is used to receive target ticket information selected by a user;
[0061] The information sending module 404 is used to transcode the target ticket information into a format readable by the target printer, and send the transcoded ticket information to the target printer.
[0062] In one example, the information acquisition module acquires the ticket information in the storage area of the application program, specifically for:
[0063] accessing the second application storage area through an internal program interface, wherein the internal program interface is an application program interface between the first application and the second application;
[0064] Obtain the ticket information in the application storage area.
[0065] In one example, receiving a print request from a user in the first application is specifically configured to:
[0066] In response to receiving a first print request, displaying a first preset interface, the first preset interface including option buttons for picture printing, document printing, and receipt printing;
[0067] Receive user's print options;
[0068] In response to the selected print option being receipt printing, a second print request is received.
[0069] In one example, after the request receiving module receives the user's print request, the device further includes a printer connection module, which is specifically configured to:
[0070] Connecting with the printer, displaying a second preset interface, wherein the second preset interface includes prompt information indicating that the connection with the target printer is successful.
[0071] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only illustrative, and some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this specification. Ordinary technicians in this field can understand and implement it without paying creative work.
[0072] A schematic diagram of another bill printing device shown in an exemplary embodiment of the present application is as follows Figure 5 shown.
[0073] In an exemplary embodiment, the present application further provides a non-transitory computer-readable storage medium including instructions, such as a memory 503 including instructions, and the instructions can be executed by a processing component 502 of an apparatus 501 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0074] When the instructions in the memory 503 are executed by the processing component 502, the device 501 is enabled to execute a bill printing method, including:
[0075] receiving a first print request from a user in a first application, wherein the first application is a subprogram of a second application;
[0076] Acquire the ticket information in the storage area of the second application and display the ticket information interface, wherein the ticket information interface includes a ticket selection button;
[0077] Receive target ticket information selected by the user;
[0078] The target ticket information is transcoded into a format readable by a target printer, and the transcoded ticket information is sent to the target printer.
[0079] It should be understood that the present description is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
[0080] Those skilled in the art will readily appreciate other embodiments of the specification after considering the specification and practicing the invention claimed herein. The specification is intended to cover any variations, uses or adaptations of the specification that follow the general principles of the specification and include common knowledge or customary techniques in the art that are not claimed in the specification. The specification and examples are to be considered exemplary only, and the true scope and spirit of the specification are indicated by the following claims.
Claims
1. A bill printing method, characterized in that: Applied to a first application, the method comprises: Receiving a first print request from a user in a first application, where the first application is a subprogram of a second application, and the first print request from the user is an opening operation of the first application by the user; Acquire the ticket information in the storage area of the second application and display the ticket information interface, wherein the ticket information interface includes a ticket selection button; Receive target ticket information selected by the user; The target ticket information is transcoded into a format readable by a target printer, and the transcoded ticket information is sent to the target printer.
2. The method according to claim 1, characterized in that The step of obtaining the ticket information in the storage area of the second application program includes: accessing the second application storage area through an internal program interface, wherein the internal program interface is an application program interface between the first application and the second application; Obtain the ticket information in the application storage area.
3. The method according to claim 1, characterized in that Receiving a print request from a user in a first application includes: In response to receiving a first print request, displaying a first preset interface, the first preset interface including option buttons for picture printing, document printing, and receipt printing; Receive user's print options; In response to the selected print option being receipt printing, a second print request is received.
4. The method according to claim 1, characterized in that: After receiving the user's print request, the method further includes: Connecting with the target printer, displaying a second preset interface, wherein the second preset interface includes prompt information indicating successful connection with the target printer.
5. A bill printing device, characterized in that: Applied to a first application program, the device comprises: A request receiving module, configured to receive a first print request from a user in a first application, wherein the first application is a subprogram of a second application, and the first print request from the user is an opening operation of the first application by the user; An information acquisition module, used to acquire the ticket information in the storage area of the second application and display the ticket information interface, wherein the ticket information interface includes a ticket selection button; A selection receiving module is used to receive target ticket information selected by the user; The information sending module is used to transcode the target ticket information into a format readable by the target printer, and send the transcoded ticket information to the target printer.
6. The device according to claim 5, characterized in that The information acquisition module acquires the ticket information in the storage area of the application program, specifically used for: accessing the second application storage area through an internal program interface, wherein the internal program interface is an application program interface between the first application and the second application; Obtain the ticket information in the application storage area.
7. The device according to claim 5, characterized in that The first application receives a print request from a user, specifically for: In response to receiving a first print request, displaying a first preset interface, the first preset interface including option buttons for picture printing, document printing, and receipt printing; Receive user's print options; In response to the selected print option being receipt printing, a second print request is received.
8. The device according to claim 5, characterized in that After the request receiving module receives the user's print request, the device further includes a printer connecting module, which is specifically used to: Connecting with the printer, displaying a second preset interface, wherein the second preset interface includes prompt information indicating that the connection with the target printer is successful.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of any method described in claims 1 to 4 are implemented.
Citation Information
Patent Citations
Printing method and device and electronic equipment
CN112650456A