CN111427521A - Electronic bill printing method, server, system and equipment - Google Patents
Electronic bill printing method, server, system and equipment Download PDFInfo
- Publication number
- CN111427521A CN111427521A CN202010202549.4A CN202010202549A CN111427521A CN 111427521 A CN111427521 A CN 111427521A CN 202010202549 A CN202010202549 A CN 202010202549A CN 111427521 A CN111427521 A CN 111427521A
- Authority
- CN
- China
- Prior art keywords
- printing
- client
- terminal
- task
- data message
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 230000002159 abnormal effect Effects 0.000 claims abstract description 20
- 230000001121 heart beat frequency Effects 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 6
- 230000003139 buffering effect Effects 0.000 claims 1
- 230000007246 mechanism Effects 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000006467 substitution reaction Methods 0.000 description 3
- 238000012546 transfer Methods 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1293—Printer information exchange with computer
- G06F3/1295—Buffering means
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1202—Dedicated interfaces to print systems specifically adapted to achieve a particular effect
- G06F3/1203—Improving or facilitating administration, e.g. print management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1223—Dedicated interfaces to print systems specifically adapted to use a particular technique
- G06F3/1237—Print job management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1223—Dedicated interfaces to print systems specifically adapted to use a particular technique
- G06F3/1275—Print workflow management, e.g. defining or changing a workflow, cross publishing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Accessory Devices And Overall Control Thereof (AREA)
Abstract
The invention relates to an electronic bill printing method, a server, a system and equipment, and belongs to the technical field of printing. The method establishes a long connection with a client based on the heartbeat of the client; receiving a printing task request, caching a printing data message in a preset database according to the printing task request, wherein the printing data message is carried by the printing task request; receiving a printing task pulling request based on the batch codes, pulling a printing data message in a preset database according to the printing task pulling request, sending the printing data message to a client terminal, and sending the unprinted data message to a printing terminal, so that the printing terminal prints an electronic receipt of the unprinted task. Based on the equipment heartbeat mechanism, long connection is established between the client and the server, so that a printing instruction and a printing data packet are accurately transmitted, the timeliness and the accuracy of the printing instruction are ensured, and abnormal conditions such as packet loss, instruction pushing delay and the like existing in remote equipment electronic surface sheet printing are solved.
Description
Technical Field
The invention belongs to the technical field of printing, and particularly relates to an electronic bill printing method, a server, a system and equipment.
Background
According to the existing industry technical solution, abnormal conditions such as packet loss and instruction pushing delay exist, the printing instruction is accurately transmitted and the data packet is printed based on an equipment heartbeat mechanism in the fast cloud printing, and the timeliness and the accuracy of the printing instruction are guaranteed.
With the progress of science and technology, the development of the express delivery industry is vigorous. In the face of mass express mails, people invent an electronic receipt used for recording express company information and goods receiving and dispatching client information. The electronic bill printing speed is high, the occupied area is small, the order matching is automatically completed when the order information applies for the express number, and the time for checking the express bill and the order information by a worker during traditional delivery is saved. Thus, electronic coupons are huge for the express industry to power. The electronic bill has the advantages that the labor cost is effectively saved for the express company, and based on the electronic bill, the company integrates various system capabilities such as big data analysis, intelligent sorting, freight monitoring and intelligent scanning, and the whole operation efficiency of the express company is improved.
However, in the process of printing an electronic document, a server of a developer usually initiates print pushing to transmit print data to an application program interface and then transmits the print data downwards, and due to the complexity and diversity of network environments, when a bottom layer protocol sends a data packet, a message is difficult to guarantee 100% accuracy of pushing, so that the message has a packet loss condition, and whether a print instruction is received by a printer cannot be known exactly, so that the print accuracy is reduced.
Disclosure of Invention
In order to at least solve the problems in the prior art, the invention provides an electronic bill printing method, a server, a system and equipment, which have the characteristics of high printing accuracy, no packet loss phenomenon and the like.
The technical scheme provided by the invention is as follows:
on one hand, the electronic bill printing method is applied to the express delivery industry and comprises the following steps:
establishing long connection with a client based on the heartbeat of the client, generating batch codes based on a pseudo-random algorithm according to a batch code acquisition request sent by the client according to the heartbeat frequency, and caching the batch codes in a preset database;
receiving a printing task request, and caching a printing data message in the preset database according to the printing task request, wherein the printing data message is carried by the printing task request;
receiving a printing task pulling request based on batch codes, pulling a printing data message in the preset database according to the printing task pulling request, sending the printing data message to the client terminal, and sending the unprinted data message to the printing terminal, so that the printing terminal prints the electronic bill of the unprinted task.
Optionally, the establishing a long connection with the client based on the heartbeat of the client, generating a batch code based on a pseudo-random algorithm according to a batch code acquisition request sent by the client according to the heartbeat frequency, and caching the batch code in a preset database, further includes:
and detecting the working state of the printing terminal, and if the working state of the printing terminal is abnormal, sending abnormal warning information of the printing terminal to a preset terminal.
Optionally, after sending the unprinted data packet to the printing terminal, the method further includes:
updating a printing task list;
and sending the print status write back to the client and/or the printing terminal.
Optionally, the method further comprises:
judging whether the preset database has a fault or not;
and if the fault occurs, checking a printing task in the memory, and sending the printing task to the target printing terminal.
In yet another aspect, a server includes: the printing system comprises a generating module, a receiving module and a printing module;
the generating module is used for establishing long connection with the client based on the heartbeat of the client, generating batch codes based on a pseudo-random algorithm according to a batch code acquisition request sent by the client according to the heartbeat frequency, and caching the batch codes in a preset database;
the receiving module is used for receiving a printing task request, caching a printing data message in the preset database according to the printing task request, wherein the printing task request carries the printing data message;
the printing module is used for receiving a printing task pulling request based on batch codes, pulling a printing data message in the preset database according to the printing task pulling request, sending the printing data message to the client terminal, and sending the unprinted data message to the printing terminal, so that the printing terminal prints the electronic receipt of the unprinted tasks.
In yet another aspect, an electronic form printing system includes: the server, the client, the preset database and the printing terminal; the client, the preset database and the printing terminal are respectively connected with the server;
the client is used for acquiring a print task and pushing a print task request to the server;
the server is used for establishing long connection with the client based on the heartbeat of the client, generating batch codes based on a pseudo-random algorithm according to a batch code acquisition request sent by the client according to the heartbeat frequency, and caching the batch codes in a preset database; receiving a printing task request, and caching a printing data message in the preset database according to the printing task request, wherein the printing data message is carried by the printing task request; receiving a printing task pulling request based on batch codes, pulling a printing data message in the preset database according to the printing task pulling request, sending the printing data message to the client terminal, and sending the unprinted data message to a printing terminal so that the printing terminal prints an electronic receipt of the unprinted task;
the preset database is used for caching the batch codes and the printing data messages;
and the printing terminal is used for printing the electronic bill of the unprinted tasks.
Optionally, the server is further configured to determine whether the preset database fails; and if the fault occurs, checking a printing task in the memory, and sending the printing task to the target printing terminal.
Optionally, the server is further configured to update the print job list; and sending the print status write back to the client and/or the printing terminal.
Optionally, the server is further configured to:
and detecting the working state of the printing terminal, and if the working state of the printing terminal is abnormal, sending abnormal warning information of the printing terminal to a preset terminal.
In still another aspect, an electronic sheet printing apparatus includes: a processor, and a memory coupled to the processor;
the memory is used for storing a computer program; the processor is used for calling the computer program to execute any one of the electronic bill printing methods.
The invention has the beneficial effects that:
the method, the server, the system and the equipment provided by the embodiment of the invention establish long connection with the client based on the heartbeat of the client, generate batch secondary codes based on a pseudorandom algorithm according to a batch code acquisition request sent by the client according to the heartbeat frequency, and buffer the batch codes in a preset database; receiving a printing task request, caching a printing data message in a preset database according to the printing task request, wherein the printing data message is carried by the printing task request; receiving a printing task pulling request based on the batch codes, pulling a printing data message in a preset database according to the printing task pulling request, sending the printing data message to a client terminal, and sending the unprinted data message to a printing terminal, so that the printing terminal prints an electronic receipt of the unprinted task. Based on the equipment heartbeat mechanism, long connection is established between the client and the server, so that a printing instruction and a printing data packet are accurately transmitted, the timeliness and the accuracy of the printing instruction are ensured, and abnormal conditions such as packet loss, instruction pushing delay and the like existing in remote equipment electronic surface sheet printing are solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of an electronic form printing method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a server according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an electronic surface sheet printing system according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic surface sheet printing apparatus according to an embodiment of the present invention.
Reference numerals:
21-a generating module; 22-a receiving module; 23-a printing module; 31-a server; 32-a client; 33-preset database; 34-a printing terminal; 41-a processor; 42-memory.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without any inventive step, are within the scope of the present invention.
Example (b):
in order to solve the technical problem provided by the present invention, an embodiment of the present invention provides an electronic form printing method.
Fig. 1 is a schematic flow chart of an electronic receipt printing method according to an embodiment of the present invention, and referring to fig. 1, the electronic receipt printing method according to the embodiment of the present invention may include the following steps:
s11, establishing long connection with the client based on the heartbeat of the client, generating batch codes based on a pseudo-random algorithm according to a batch code acquisition request sent by the client according to the heartbeat frequency, and caching the batch codes in a preset database.
Specifically, in the embodiment of the present invention, the server may establish a long connection with the client based on the heartbeat of the client, and the server may obtain the batch code according to a preset method, for example, in the embodiment, it is preferable that the server generates the batch code according to a pseudo-random algorithm, and may also generate the batch code according to other methods, which is not limited herein. Optionally, the preset database is selected as Redis, and the server may cache the acquired batch code in the Redis. It should be noted that the default database is selected as Redis, which is only exemplary and not limiting.
In this embodiment, the term "heartbeat" does not mean a physiological heartbeat of a person or a living being, but means that a health condition of a device is determined and whether or not a partner is "alive" is determined by periodically transmitting information between a host server and each device. In this embodiment, the heartbeat period may be selected to be 1 second, and if no information is received for more than 1 second, it is determined that a packet loss situation may exist, and an early warning is issued. A long connection means that multiple packets can be sent continuously over one connection, and during the connection hold period, if no packet is sent, a link check packet needs to be sent in both directions. Redis is an open source log-type and Key-Value database which is written by using ANSI C language, supports network, can be based on memory and can also be persistent.
In this embodiment, the heartbeat cycle requests the server to obtain the batch code.
Optionally, the method includes establishing a long connection with the client based on the heartbeat of the client, generating batch codes based on a pseudo-random algorithm according to a batch code acquisition request sent by the client according to the heartbeat frequency, and caching the batch codes in a preset database, and further includes: and detecting the working state of the printing terminal, and if the working state of the printing terminal is abnormal, sending abnormal warning information of the printing terminal to a preset terminal.
Specifically, in order to ensure the accuracy and no packet loss of the printed electronic bill, the heartbeat time of the device and the working state of the detection device may be recorded, and if the working state is not online or under other abnormal conditions, the warning information that the printing terminal is abnormal is sent to the preset terminal.
And S12, receiving the printing task request, caching the printing data message in a preset database according to the printing task request, wherein the printing data message is carried by the printing task request.
Optionally, the printing the data message includes: waybill number, express information, etc. After the order number and the express information are obtained, the order can be obtained, and the order is added into the printing task list.
Specifically, a client side pushes a print task request to a server, the server receives the print task request, generates batch secondary codes based on a pseudorandom algorithm according to the print task request, and acquires an order according to the batch secondary codes and express delivery information carried in the print task request. For example, the information of the waybill number, the waybill transfer station and the like can be acquired, so that complete order information is acquired, and the order is added to the printing task list.
Alternatively, in order to ensure the accuracy of the information, before the batch code is acquired, the status of the printing apparatus may be detected again, for example, to check whether the printing apparatus is online or not, and the like.
For example, a user can input express information such as sender information, recipient information and the like through a client, the client sends a print task request carrying the express information to a server, the server receives the print task request, and obtains cached batch codes in a preset database (preferably Redis), so that information such as an invoice number and a transfer station is obtained, a complete order is generated, and the order is added into a print task list to wait for printing.
S13, receiving a print task pulling request based on the batch code, pulling a print data message in a preset database according to the print task pulling request, sending the print data message to a client terminal, and sending an unprinted data message to a printing terminal, so that the printing terminal prints an electronic receipt of the unprinted task.
Specifically, a printing terminal or a client sends a printing task pulling request to a server, the server receives the printing task pulling request, pulls unprinted tasks in a printing task list according to the printing task pulling request, and sends the unprinted tasks to the printing terminal, so that the printing terminal prints electronic tickets of the unprinted tasks.
For example, the client requests the server to acquire a print task in a preset database based on a batch code acquired by the heartbeat frequency, the client receives a print data message acquired based on the batch code and informs the server that the print task is successfully acquired, and the server sends the unprinted data message to the printing terminal so that the printing terminal prints an electronic receipt of the unprinted task.
For example, a user may send a print job pull request to a server through a print terminal, i.e., a printer, or a client, and after receiving the print job pull request, the server sends an unprinted job in a print job list to the print terminal, thereby completing printing of an electronic receipt of the unprinted job.
Optionally, after sending the unprinted job to the printing terminal, the method further includes: updating a printing task list; and sending the printing state write-back to the client and/or the printing terminal.
Specifically, in order to further ensure that no packet loss occurs, after the unprinted job is sent to the printing terminal, the printing job list is updated, and the status of the printed job is updated to be printed. After printing is finished, the printing state write-back can be sent to the client and/or the printing terminal, so that a user can know the printing state, and the phenomenon of no packet loss is confirmed to be printed for the second time.
In order to ensure the accuracy of printing, the method further comprises the following steps: and deleting the printed batch codes in the preset database.
Optionally, the method further comprises: judging whether the preset database has a fault or not; and if the fault occurs, checking the print task in the memory, and sending the print task to the target printing terminal.
For example, after the client establishes long connection with the server, whether the system is degraded or not can be judged, that is, whether redis fails or not can be judged, if redis fails, the availability of heartbeat of the device is ensured, a print task is checked in the Map memory, and the print task is pushed to a target print terminal or the client.
The electronic bill printing method provided by the embodiment of the invention comprises the steps of establishing long connection with a client based on the heartbeat of the client, generating batch codes based on a pseudo-random algorithm according to a batch code acquisition request sent by the client according to the heartbeat frequency, and caching the batch codes in a preset database; receiving a printing task request, caching a printing data message in a preset database according to the printing task request, wherein the printing data message is carried by the printing task request; receiving a printing task pulling request based on the batch codes, pulling a printing data message in a preset database according to the printing task pulling request, sending the printing data message to a client terminal, and sending the unprinted data message to a printing terminal, so that the printing terminal prints an electronic receipt of the unprinted task. Based on the equipment heartbeat mechanism, long connection is established between the client and the server, so that a printing instruction and a printing data packet are accurately transmitted, the timeliness and the accuracy of the printing instruction are ensured, and abnormal conditions such as packet loss, instruction pushing delay and the like existing in remote equipment electronic surface sheet printing are solved.
Example (b):
based on a general inventive concept, embodiments of the present invention also provide a server.
Fig. 2 is a schematic structural diagram of a server according to an embodiment of the present invention.
Referring to fig. 2, a server according to an embodiment of the present invention includes: a generating module 21, a receiving module 22 and a printing module 23;
the generation module 21 is configured to establish a long connection with the client based on the heartbeat of the client, generate batch codes based on a pseudo-random algorithm according to a batch code acquisition request sent by the client according to the heartbeat frequency, and cache the batch codes in a preset database;
the receiving module 22 is configured to receive a print job request, and cache a print data packet in a preset database according to the print job request, where the print job request carries the print data packet;
the printing module 23 is configured to receive a print job pull request based on the batch code, pull a print data packet in a preset database according to the print job pull request, send the print data packet to the client terminal, and send an unprinted data packet to the printing terminal, so that the printing terminal prints an electronic receipt of an unprinted job.
With regard to the above-described embodiments, the specific manner in which the respective modules perform operations has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
The server provided by the embodiment of the invention establishes long connection with the client based on the heartbeat of the client, generates batch codes based on a pseudo-random algorithm according to a batch code acquisition request sent by the client according to the heartbeat frequency, and caches the batch codes in a preset database; receiving a printing task request, caching a printing data message in a preset database according to the printing task request, wherein the printing data message is carried by the printing task request; receiving a printing task pulling request based on the batch codes, pulling a printing data message in a preset database according to the printing task pulling request, sending the printing data message to a client terminal, and sending the unprinted data message to a printing terminal, so that the printing terminal prints an electronic receipt of the unprinted task. Based on the equipment heartbeat mechanism, long connection is established between the client and the server, so that a printing instruction and a printing data packet are accurately transmitted, the timeliness and the accuracy of the printing instruction are ensured, and abnormal conditions such as packet loss, instruction pushing delay and the like existing in remote equipment electronic surface sheet printing are solved.
Example (b):
based on a general inventive concept, embodiments of the present invention also provide an electronic receipt printing system.
Fig. 3 is a schematic structural diagram of an electronic surface sheet printing system according to an embodiment of the present invention.
Referring to fig. 3, an electronic bill printing system according to an embodiment of the present invention includes: the server 31, the client 32, the preset database 33, and the printing terminal 34 described in any of the above embodiments; the client, the preset database and the printing terminal are respectively connected with the server.
The client 32 is used for acquiring a print task and pushing a print task request to the server;
the server 31 is used for establishing long connection with the client based on the heartbeat of the client, generating batch codes based on a pseudo-random algorithm according to a batch code acquisition request sent by the client according to the heartbeat frequency, and caching the batch codes in a preset database; receiving a printing task request, caching a printing data message in a preset database according to the printing task request, wherein the printing data message is carried by the printing task request; receiving a printing task pulling request based on the batch code, pulling a printing data message in a preset database according to the printing task pulling request, sending the printing data message to a client terminal, and sending the unprinted data message to a printing terminal so that the printing terminal can print an electronic receipt of the unprinted task;
a preset database 33 for caching batch codes and printing data messages;
and a printing terminal 34 for printing the electronic receipt of the unprinted job.
Optionally, the server 31 is further configured to determine whether the preset database fails; and if the fault occurs, checking the print task in the memory, and sending the print task to the target printing terminal.
Optionally, the server 31, further configured to update the print job list; and sending the printing state write-back to the client and/or the printing terminal.
Optionally, the server 31 is further configured to: and detecting the working state of the printing terminal, and if the working state of the printing terminal is abnormal, sending abnormal warning information of the printing terminal to a preset terminal.
The electronic receipt printing system provided by the embodiment of the invention comprises a server, a client, a preset database and a printing terminal, and long connection is established between the client and the server based on a device heartbeat mechanism, so that a printing instruction and a printing data packet are accurately transmitted, the timeliness and the accuracy of the printing instruction are ensured, and abnormal conditions such as packet loss, instruction pushing delay and the like in remote device electronic receipt printing are solved.
Example (b):
based on a general inventive concept, embodiments of the present invention also provide an electronic receipt printing apparatus.
Fig. 4 is a schematic structural diagram of an electronic surface sheet printing apparatus according to an embodiment of the present invention.
Referring to fig. 4, an electronic bill printing apparatus according to an embodiment of the present invention may include: a processor 41, and a memory 42 connected to the processor 41;
the memory 42 is used for storing computer programs; the processor 41 is configured to invoke a computer program to execute the electronic form printing method according to any of the above embodiments.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that the terms "first," "second," and the like in the description of the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present invention, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.
Claims (10)
1. An electronic bill printing method is applied to the express industry and comprises the following steps:
establishing long connection with a client based on the heartbeat of the client, generating batch codes based on a pseudo-random algorithm according to a batch code acquisition request sent by the client according to the heartbeat frequency, and caching the batch codes in a preset database;
receiving a printing task request, and caching a printing data message in the preset database according to the printing task request, wherein the printing data message is carried by the printing task request;
receiving a printing task pulling request based on batch codes, pulling a printing data message in the preset database according to the printing task pulling request, sending the printing data message to the client terminal, and sending the unprinted data message to the printing terminal, so that the printing terminal prints the electronic bill of the unprinted task.
2. The method according to claim 1, wherein the establishing of the long connection with the client based on the heartbeat of the client, the generating of the batch code based on the pseudo-random algorithm according to the batch code acquisition request sent by the client according to the heartbeat frequency, and the buffering of the batch code in the preset database further comprises:
and detecting the working state of the printing terminal, and if the working state of the printing terminal is abnormal, sending abnormal warning information of the printing terminal to a preset terminal.
3. The method of claim 1, wherein after sending the unprinted data message to a printing terminal, further comprising:
updating a printing task list;
and sending the print status write back to the client and/or the printing terminal.
4. The method of claim 1, further comprising:
judging whether the preset database has a fault or not;
and if the fault occurs, checking a printing task in the memory, and sending the printing task to the target printing terminal.
5. A server, comprising: the printing system comprises a generating module, a receiving module and a printing module;
the generating module is used for establishing long connection with the client based on the heartbeat of the client, generating batch codes based on a pseudo-random algorithm according to a batch code acquisition request sent by the client according to the heartbeat frequency, and caching the batch codes in a preset database;
the receiving module is used for receiving a printing task request, caching a printing data message in the preset database according to the printing task request, wherein the printing task request carries the printing data message;
the printing module is used for receiving a printing task pulling request based on batch codes, pulling a printing data message in the preset database according to the printing task pulling request, sending the printing data message to the client terminal, and sending the unprinted data message to the printing terminal, so that the printing terminal prints the electronic receipt of the unprinted tasks.
6. An electronic sheet printing system, comprising: the server, client, provisioning database, and printing terminal of claim 5; the client, the preset database and the printing terminal are respectively connected with the server;
the client is used for acquiring a print task and pushing a print task request to the server;
the server is used for establishing long connection with the client based on the heartbeat of the client, generating batch codes based on a pseudo-random algorithm according to a batch code acquisition request sent by the client according to the heartbeat frequency, and caching the batch codes in a preset database; receiving a printing task request, and caching a printing data message in the preset database according to the printing task request, wherein the printing data message is carried by the printing task request; receiving a printing task pulling request based on batch codes, pulling a printing data message in the preset database according to the printing task pulling request, sending the printing data message to the client terminal, and sending the unprinted data message to a printing terminal so that the printing terminal prints an electronic receipt of the unprinted task;
the preset database is used for caching the batch codes and the printing data messages;
and the printing terminal is used for printing the electronic bill of the unprinted tasks.
7. The system of claim 6, wherein the server is further configured to determine whether the preset database fails; and if the fault occurs, checking a printing task in the memory, and sending the printing task to the target printing terminal.
8. The system of claim 6, wherein the server is further configured to update a print job list; and sending the print status write back to the client and/or the printing terminal.
9. The system of claim 6, wherein the server is further configured to:
and detecting the working state of the printing terminal, and if the working state of the printing terminal is abnormal, sending abnormal warning information of the printing terminal to a preset terminal.
10. An electronic sheet printing apparatus, comprising: a processor, and a memory coupled to the processor;
the memory is used for storing a computer program; the processor is used for calling the computer program to execute the electronic receipt printing method of any one of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010202549.4A CN111427521B (en) | 2020-03-20 | 2020-03-20 | Electronic face sheet printing method, server, system and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010202549.4A CN111427521B (en) | 2020-03-20 | 2020-03-20 | Electronic face sheet printing method, server, system and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111427521A true CN111427521A (en) | 2020-07-17 |
CN111427521B CN111427521B (en) | 2024-04-09 |
Family
ID=71549746
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010202549.4A Active CN111427521B (en) | 2020-03-20 | 2020-03-20 | Electronic face sheet printing method, server, system and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111427521B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111950242A (en) * | 2020-07-31 | 2020-11-17 | 上海中通吉网络技术有限公司 | Method, system, equipment and storage medium for generating centralized international logistics list |
CN112181326A (en) * | 2020-09-29 | 2021-01-05 | 上海汉图科技有限公司 | Printing method, device and equipment |
CN112783454A (en) * | 2021-02-01 | 2021-05-11 | 江苏保旺达软件技术有限公司 | Virtual printing method, system, electronic equipment and storage medium |
CN113627863A (en) * | 2021-10-14 | 2021-11-09 | 深圳美云集网络科技有限责任公司 | E-commerce platform logistics aggregation method and system, storage medium and electronic equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004334447A (en) * | 2003-05-06 | 2004-11-25 | Kyocera Mita Corp | Printed matter order receiving system through network |
US7692807B1 (en) * | 2004-04-01 | 2010-04-06 | Applied Discovery, Inc. | System and method for batch printing high-volume electronic documents from a network |
CN109918028A (en) * | 2019-01-28 | 2019-06-21 | 苏州凸现信息科技有限公司 | A kind of computer based remote printing method and its system |
-
2020
- 2020-03-20 CN CN202010202549.4A patent/CN111427521B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004334447A (en) * | 2003-05-06 | 2004-11-25 | Kyocera Mita Corp | Printed matter order receiving system through network |
US7692807B1 (en) * | 2004-04-01 | 2010-04-06 | Applied Discovery, Inc. | System and method for batch printing high-volume electronic documents from a network |
CN109918028A (en) * | 2019-01-28 | 2019-06-21 | 苏州凸现信息科技有限公司 | A kind of computer based remote printing method and its system |
Non-Patent Citations (1)
Title |
---|
张;李明明;冯陈伟;: "基于Android的无线打印点餐系统" * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111950242A (en) * | 2020-07-31 | 2020-11-17 | 上海中通吉网络技术有限公司 | Method, system, equipment and storage medium for generating centralized international logistics list |
CN112181326A (en) * | 2020-09-29 | 2021-01-05 | 上海汉图科技有限公司 | Printing method, device and equipment |
CN112783454A (en) * | 2021-02-01 | 2021-05-11 | 江苏保旺达软件技术有限公司 | Virtual printing method, system, electronic equipment and storage medium |
CN113627863A (en) * | 2021-10-14 | 2021-11-09 | 深圳美云集网络科技有限责任公司 | E-commerce platform logistics aggregation method and system, storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN111427521B (en) | 2024-04-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111427521B (en) | Electronic face sheet printing method, server, system and equipment | |
CN105357038B (en) | Monitor the method and system of cluster virtual machine | |
CN106777026B (en) | Method, device and system for supporting final consistency of micro-service architecture transaction | |
US20170318076A1 (en) | Naming of distributed business transactions | |
KR100324976B1 (en) | Data processing apparatus, method and computer program product for carrying out workload management with respect to a group of servers in an asynchronous client/server computing system | |
US7290086B2 (en) | Method, apparatus and program storage device for providing asynchronous status messaging in a data storage system | |
EP3598302A1 (en) | Method and apparatus for managing effectiveness of information processing task | |
US8266301B2 (en) | Deployment of asynchronous agentless agent functionality in clustered environments | |
CN105302676B (en) | Active and standby the mechanism data transmission method and device of a kind of distributed file system | |
CN115640110B (en) | Distributed cloud computing system scheduling method and device | |
US20080133739A1 (en) | Response time benchmarking | |
CN110752943A (en) | Distributed fault diagnosis system and method for power transmission line | |
CN107688512A (en) | One kind optimization virtual-machine data backup method and system | |
CN109144972A (en) | A kind of method and back end of Data Migration | |
CN108845865A (en) | A kind of monitoring service dispositions method, system and storage medium | |
CN109409948A (en) | Transaction method for detecting abnormality, device, equipment and computer readable storage medium | |
CN114553867A (en) | Cloud-native cross-cloud network monitoring method and device and storage medium | |
CN113518013B (en) | Processing method and device for realizing heartbeat mechanism | |
JP3766540B2 (en) | Notification transmission method in network including notification service and network for using the same | |
US20160125330A1 (en) | Rolling upgrade of metric collection and aggregation system | |
CN117370053A (en) | Information system service operation-oriented panoramic monitoring method and system | |
CN112596865A (en) | System for pushing to-do message based on workflow affair | |
US10459776B2 (en) | Transmission of large messages in computer systems | |
CN117435420B (en) | DPU-based data plane log acquisition method and system | |
TW201019223A (en) | Automatic program real-time update method and system for remote test unit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |