Data printing method, system and device
By implementing data subcontracting and sending functions in the first POS terminal, and subcontracting the data to be printed to the second POS terminal for printing, the problem of lack of printing functions of the first POS terminal is solved, and efficient printing data transmission and printing efficiency are achieved.
Patent Information
- Application Number
- CN202411771128.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-05-06
AI Technical Summary
In the prior art, the first POS terminal cannot print data directly due to lack of printing functions and needs to be connected to the second POS terminal. However, the second POS terminal can only print its own data and cannot improve the printing efficiency of the first POS terminal.
By implementing the data sub-packaging and sending functions in the first POS terminal, the data to be printed is sub-packed and sent to the second POS terminal for printing, and the second POS terminal receives and adds it to the printing queue for printing.
The data of the first POS terminal is directly transmitted to the second POS terminal, reducing the manual operation requirement and improving the printing efficiency of the printing data.
Smart Images

Figure CN119937943A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a data printing method, system and device. Background Art
[0002] With the advancement of technology, the models, functions and corresponding usage scenarios of equipment are constantly being subdivided, so equipment with different needs will appear on the market. For example, in the modern catering industry, with the popularization of various convenient ordering methods, ordering equipment suitable for different usage scenarios has also emerged.
[0003] In the prior art, taking the first POS terminal and the second POS terminal as examples, the first POS terminal refers to an ordering device without a printing function, that is, a device that only needs to record ordering data. When the first POS terminal needs to print data, it needs to connect to a dedicated second POS terminal and then print the print data of the first POS terminal through the second POS terminal. The second POS terminal has its own printing function, and generally, after discovering that the printing efficiency of the first POS terminal is low, merchants will purchase a second POS terminal to improve the ordering efficiency. However, these second POS terminals can only print their own print data and cannot improve the problem of low printing efficiency of the first POS terminal. Summary of the invention
[0004] In order to solve the above technical problems, the present application provides a data printing method, system and device for effectively coordinating printing work.
[0005] The technical solution provided in this application is described below:
[0006] A first aspect of the present application provides a data printing method, which is applied to a first POS terminal, where the first POS terminal does not have a printing function, and the method includes:
[0007] Get the data to be printed;
[0008] If the amount of the data to be printed exceeds a preset threshold, the data to be printed is sub-packed;
[0009] The packaged data to be printed is sent to a second POS terminal so that the second POS terminal prints the data to be printed, wherein the second POS terminal has a printing function.
[0010] Optionally, sending the packetized data to be printed to a second POS terminal includes:
[0011] The packetized data to be printed is sent to a proxy server so that the proxy server forwards the packetized data to be printed to the second POS terminal, wherein the proxy server establishes preset communication connections with the first POS terminal and the second POS terminal respectively.
[0012] A second aspect of the present application provides a data printing method, which is applied to a second POS terminal, where the second POS terminal has a printing function, and the method includes:
[0013] Receiving the data to be printed after being packaged, wherein the data to be printed after being packaged is the data to be printed obtained by the first POS terminal, and when the data amount of the data to be printed exceeds a preset threshold, the data to be printed is packaged, and the first POS terminal does not have a printing function;
[0014] The packetized data to be printed is added to a print queue for printing.
[0015] Optionally, adding the packetized data to be printed to a print queue for printing includes:
[0016] If the print queue is empty, the packetized data to be printed is added to the print queue for printing.
[0017] Optionally, the data to be printed carries a priority identifier, and the step of adding the packetized data to be printed to a print queue for printing includes:
[0018] If the print queue is not empty, the packetized data to be printed is added to the print queue for printing according to the printing order determined by the priority identifier.
[0019] Optionally, the receiving of the packetized data to be printed includes:
[0020] The packetized data to be printed is received from the proxy server, wherein the packetized data to be printed is data sent by the first POS terminal to the proxy server, wherein the proxy server establishes preset communication connections with the first POS terminal and the second POS terminal respectively.
[0021] Optionally, after adding the packetized data to be printed to a print queue for printing, the method further includes:
[0022] Send a printing completion notification message to the first POS terminal.
[0023] A third aspect of the present application provides a data printing system, the system comprising a first POS terminal and a second POS terminal, wherein the first POS terminal is used for:
[0024] Get the data to be printed;
[0025] If the amount of the data to be printed exceeds a preset threshold, the data to be printed is sub-packed;
[0026] sending the packetized data to be printed to the second POS terminal so that the second POS terminal prints the data to be printed, wherein the second POS terminal has a printing function;
[0027] The second POS terminal is used for:
[0028] receiving the packetized data to be printed, wherein the packetized data to be printed is the data to be printed obtained by the first POS terminal, and when the amount of the data to be printed exceeds a preset threshold, the data to be printed is packetized, and the first POS terminal does not have a printing function;
[0029] The packetized data to be printed is added to a print queue for printing.
[0030] Optionally, the first POS terminal is specifically used for:
[0031] The packetized data to be printed is sent to a proxy server so that the proxy server forwards the packetized data to be printed to the second POS terminal, wherein the proxy server establishes preset communication connections with the first POS terminal and the second POS terminal respectively.
[0032] Optionally, the second POS terminal is specifically used for:
[0033] If the print queue is empty, the packetized data to be printed is added to the print queue for printing.
[0034] Optionally, the second POS terminal is further used for:
[0035] If the print queue is not empty, the packetized data to be printed is added to the print queue for printing according to the printing order determined by the priority identifier.
[0036] Optionally, the second POS terminal is further used for:
[0037] The packetized data to be printed is received from the proxy server, wherein the packetized data to be printed is data sent by the first POS terminal to the proxy server, wherein the proxy server establishes preset communication connections with the first POS terminal and the second POS terminal respectively.
[0038] Optionally, the second POS terminal is further used for:
[0039] Send a printing completion notification message to the first POS terminal.
[0040] A fourth aspect of the present application provides a data printing device, the device comprising:
[0041] Processor, memory, input-output unit, and bus;
[0042] The processor is connected to the memory, the input and output unit, and the bus;
[0043] The memory stores a program, and the processor calls the program to execute the optional method in the first aspect and any one of the first aspect, the second aspect and any one of the second aspect.
[0044] The fifth aspect of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the method described in the first aspect and any item in the first aspect, the second aspect and any item in the second aspect is executed.
[0045] It can be seen from the above technical solutions that this application has the following advantages:
[0046] The present application generates direct data interaction between the first POS terminal and the second POS terminal, so that when the first POS terminal has a printing demand, the printing data can be sent to the second POS terminal, so that the second POS terminal prints the printing data corresponding to the first POS terminal, so that when the first POS terminal is used to generate data, the printing data can be directly transmitted to the second POS terminal, thereby reducing the need for manual operation and improving the printing efficiency of the printing data. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solution in the present application, 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 of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0048] Figure 1 This is a flow chart of an embodiment of a data printing method in this application;
[0049] Figure 2 This is a flow chart of another embodiment of the data printing method in the present application;
[0050] Figure 3 A schematic diagram of the structure of an embodiment of a data printing system in this application;
[0051] Figure 4 This is a schematic diagram of the structure of an embodiment of a data printing device in the present application. DETAILED DESCRIPTION
[0052] It should be noted that the data printing method provided in the present application can be applied to a terminal, for example, the terminal can be a smart phone or computer, tablet computer, smart TV, smart watch, portable computer terminal, or a fixed terminal such as a desktop computer, and among the interactive objects of the terminal, the total number of objects that the terminal can interact with is not 1. At the same time, the number of devices with interactive objects carrying printing functions is greater than or equal to 1, and these interactive objects need to be connected in the same local area network.
[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0054] See also Figure 1 The present application first provides an embodiment of a data printing method, which comprises:
[0055] S101, a first POS terminal obtains data to be printed;
[0056] The first POS terminal is used to obtain or generate data to be printed, and the first POS terminal does not have a printing function. In actual situations, the first POS terminal will generate printed text according to the input information of the operator. For example, when the restaurant is used as the actual usage scenario, the first POS terminal is an ordering device used by restaurant staff to take orders from users. In actual use, the staff only needs to input the user's order data. It is mainly used for recording, so that the staff can re-enter the user's order data on the printing device according to the record and print the corresponding consumption voucher of the user to the device with printing function. The data that needs to be printed is the data to be printed.
[0057] S102: If the amount of the data to be printed exceeds a preset threshold, the first POS terminal divides the data to be printed into packets;
[0058] The first POS terminal will limit the data volume when transmitting the print data. When the total data volume of the print data generated by the first POS terminal is greater than the limit, the print data will be sub-packeted for transmission. Specifically, the first POS terminal determines the maximum number of bytes of the sub-packet of the print data according to a preset number of bytes to limit the maximum value of the data transmitted each time.
[0059] The preset threshold is the maximum amount of data that can be contained in each packet when the first POS terminal packets the sent data, and is used to limit the amount of data transmitted by the first POS terminal in a single transmission.
[0060] Specifically, when the total amount of data to be printed generated by the first POS terminal is greater than the limit, the print data will be packetized for transmission, so that the first POS terminal determines the maximum number of bytes of the packet of the print data according to a preset threshold to limit the maximum value of data transmitted each time. If the amount of the print data does not exceed the preset threshold, the first POS terminal will package all the data to be printed into one data for transmission.
[0061] S103: The first POS terminal sends the packaged data to be printed to the second POS terminal, so that the second POS terminal prints the data to be printed, wherein the second POS terminal has a printing function.
[0062] The first POS terminal is used to obtain or generate the user's data to be printed, and the second POS terminal at least has a printing function.
[0063] The following description uses a restaurant as a usage scenario. The first POS terminal is generally a portable smart device used for ordering food, and the second POS terminal can print receipts corresponding to the ordering menus of the first POS terminal and the second POS terminal itself. In this usage scenario, the second POS terminal can be a front desk settlement computer, or it can be a portable ordering device that has both the functions of the first POS terminal and the printing function.
[0064] In actual situations, the restaurant's ordering equipment will be updated and iterated, so that the restaurant's ordering equipment will have the above two types of POS terminals at the same time, namely the second POS terminal with printing function and the first POS terminal without printing function. In general, there is no necessary requirement to print menu credentials on the spot. Therefore, the device used by the waiter when taking orders for users can be the first POS terminal or the second POS terminal. From the above description, it can be seen that the second POS terminal that meets the portability requirement (corresponding function of the first POS terminal) does exist, and because the second POS terminal has a printing function, it will be used as a node providing printing function in the local area network to establish a point-to-point connection with the first POS terminal to assist devices without printing function to print.
[0065] S104, the second POS terminal receives the packetized data to be printed, wherein the packetized data to be printed is the data to be printed obtained by the first POS terminal, and when the amount of the data to be printed exceeds a preset threshold, the first POS terminal does not have a printing function for the packetized data to be printed;
[0066] In actual situations, the first POS terminal and the second POS terminal are connected in the same local area network, so the first POS terminal can discover devices through the local area network and establish a point-to-point connection (P2P connection), so that the first POS terminal sends a print instruction to the idle second POS terminal, so that the second POS terminal prints the to-be-printed data generated or obtained by the first POS terminal.
[0067] The second POS terminal connected to the first POS terminal will receive the data to be printed from the first POS terminal. Before the second POS terminal prints the data to be printed fed back by the first POS terminal, the second POS terminal will use a preset label to distinguish the data source of the printing data from the printing data generated by the second POS terminal.
[0068] Specifically, when a restaurant is used as the application scenario, after the second POS terminal obtains the data to be printed from the first POS terminal, it will add the device tag of the first POS terminal or the identity of the user served by the first POS terminal (such as the actual service table number of the first POS terminal or the user information obtained by the member customer when joining the membership, etc.) to the data to be printed so that the second POS terminal can distinguish the data source of the printing data and generate complete printing data.
[0069] The second POS terminal can have the same functions as the first POS terminal. Therefore, for the data to be printed obtained by the second POS terminal itself, the information of the printing data will be added with the identity of the second POS terminal itself or the identity of the user served by the second POS terminal, so that the layout of the actual output print file remains the same.
[0070] After being turned on, the second POS terminal and the first POS terminal will be connected to the same local area network in a point-to-point connection (P2P connection) manner, so that when the first POS terminal generates a printing demand, the second POS terminal can interact with the first POS terminal for data, thereby enabling the second POS terminal to receive and print the data to be printed generated by the first POS terminal.
[0071] It should be noted that, in order to ensure the security of data transmission, the first POS terminal and the second POS terminal are connected point-to-point through a local area network. Before data exchange, the first POS terminal and the second POS terminal will authenticate the device through the protocol key. The specific authentication process is as follows:
[0072] When the second POS terminal has established a point-to-point connection with the first POS terminal, the second POS terminal will authenticate the authentication request sent by the first POS terminal.
[0073] The authentication request is an encrypted message, which is encrypted by the protocol key of the agreement between the second POS terminal and the first POS terminal. The specific encryption methods that can be used include but are not limited to: symmetric encryption such as AES, DES, 3DES, AES, RC4, or asymmetric encryption such as RSA, DSA, ECC, etc. The content of the authentication information includes the identity information of the first POS terminal, so that after the second POS terminal completes decryption of the authentication request, it is also necessary to verify the identity information of the first POS terminal, so that the terminal avoids the situation where the wrong device is connected to the second POS terminal through at least one decryption and one identity information verification.
[0074] The second POS terminal will generate a verification result after completing the verification of the decrypted authentication request. When the verification result of the second POS terminal for authenticating the first POS terminal is successful, a connection will be established between the first POS terminal and the second POS terminal with which the first POS terminal has applied to establish a connection. At the same time, the second POS terminal encrypts the verification result according to the protocol key, generates an authentication response according to the encrypted verification result and sends it to the first POS terminal. The first POS terminal that receives the authentication response will complete the authentication according to the authentication response after determining that the authentication is successful, so that when the first POS terminal generates printing data subsequently, the data to be printed will be sent to the second POS terminal.
[0075] The verification result may be a verification failure because the first POS terminal is a newly added device and has not been added to the list of connectable devices of the second POS terminal. Therefore, when a verification failure authentication result is generated, the second POS terminal will feedback the verification failure result as a prompt message to the user interface of the second POS terminal, and display the identity of the first POS terminal to prompt the operator that there is a first POS terminal that is not connected to the second POS terminal.
[0076] S105: The second POS terminal adds the packaged data to be printed to a print queue for printing.
[0077] According to the description of the authentication method in step S104, a corresponding protocol key is proposed between the first POS terminal and the second POS terminal. Therefore, when the data to be printed is transmitted, the data to be printed will also be encrypted by the protocol key. In actual situations, after receiving the complete data to be printed, the second POS terminal will first decrypt the data to be printed so as to obtain the correct data to be printed.
[0078] After confirming the print queue, the second POS terminal will obtain the corresponding data to be printed according to the order of the print queue to execute the print task, wherein the data in the print queue may come from a different first POS terminal or from the second POS terminal itself. Generally, the second POS terminal will print the data to be printed in the print queue only when it is idle. The data to be printed being generated by the second POS terminal itself has the highest priority in the print queue of the second POS terminal.
[0079] In this embodiment, the first POS terminal is connected point-to-point with the second POS terminal in the same local area network, and the security of data during transmission is improved by decentralization and encryption of the transmitted data, so that the first POS terminal without printing function can safely transmit the data to be printed to the second POS terminal with printing function through data transmission, and print the print data through the second POS terminal.
[0080] See also Figure 2 , the present application embodiment provides another embodiment of a data printing method, the embodiment comprising:
[0081] S201, a first POS terminal obtains data to be printed;
[0082] S202: If the amount of the data to be printed exceeds a preset threshold, the first POS terminal divides the data to be printed into packets;
[0083] Steps S201 to S202 in this embodiment are similar to steps S101 to S102 in the aforementioned embodiment, and will not be described in detail here.
[0084] S203: The first POS terminal sends the packetized data to be printed to the proxy server, so that the proxy server forwards the packetized data to be printed to the second POS terminal, wherein the proxy server establishes preset communication connections with the first POS terminal and the second POS terminal respectively.
[0085] Specifically, in addition to the point-to-point connection through the local area network, this embodiment also provides a solution for connecting the first POS terminal and the second POS terminal through a proxy server.
[0086] In this embodiment, the point-to-point connection is not a single POS terminal connection mode, so the role of the proxy server is to complete the data transmission between the first POS terminal and the second POS terminal. When the proxy server performs data transmission, the data will be encrypted to ensure the accuracy of the data. The encryption method is determined by the first POS terminal and the second POS terminal through the protocol key. The encryption methods that can be used include but are not limited to: symmetric encryption such as AES, DES, 3DES, AES, RC4 or asymmetric encryption such as RSA, DSA, ECC.
[0087] S204, the second POS terminal receives the packetized data to be printed sent by the proxy server, the packetized data to be printed is data sent by the first POS terminal to the proxy server, wherein the proxy server establishes preset communication connections with the first POS terminal and the second POS terminal respectively, wherein the packetized data to be printed is data to be printed acquired by the first POS terminal, and when the amount of the data to be printed exceeds a preset threshold, the first POS terminal does not have a printing function after the data to be printed is packetized;
[0088] Specifically, when the first POS terminal and the second POS terminal exchange data through the proxy server, the data sent by the first POS terminal will be sent to the second POS terminal through the proxy server, that is, the proxy server will complete the reception and transmission of data as a transmission terminal. At this time, the protocol key and authentication of the first POS terminal and the second POS terminal are completed with the proxy server, that is, to establish a connection between the first POS terminal and the second POS terminal, both devices need to be in the authentication list of the proxy server.
[0089] It should be noted that packet transmission can improve data transmission efficiency, but there is also a situation where transmission is interrupted, resulting in incomplete data. When the second POS terminal starts to receive the print data sent by the first POS terminal, the second POS terminal will set and start a timer according to the number of subpackets. If the second POS terminal has not received all subpackets when the timer ends, it means that there is a connection interruption, resulting in the inability to send subsequent print data subpackets. When the timer ends, the second POS terminal has not received all packets, and the second POS terminal will send a retransmission instruction to the first POS terminal, so that the first POS terminal reconnects to the second POS terminal according to the retransmission instruction, and continues to send the unsent print data subpackets or directly retransmits the print data.
[0090] S205: The second POS terminal adds the packetized data to be printed to a print queue for printing.
[0091] When connecting through a proxy server, the second POS terminal may process the to-be-printed data of multiple first POS terminals at the same time. In this case, the second POS terminal will sort the received to-be-printed data according to a preset device priority or load strategy. Generally, the priority is sorted according to the timestamp synchronously recorded when the received print data is generated. The load strategy is mainly to schedule the received print data according to the current print task volume of the second POS terminal and generate a print queue corresponding to the second POS terminal. When the print queue is empty, execute step S206; when the print queue is not empty, execute step S207.
[0092] S206: If the print queue is empty, the second POS terminal adds the packetized data to be printed to the print queue for printing.
[0093] If the print queue is empty, it means that the second POS device is in a non-working state. In this state, the corresponding second POS device can directly add the data to be printed to the first position of the print queue and print it.
[0094] S207: If the print queue is not empty, the second POS terminal adds the packetized data to be printed to the print queue for printing according to the printing order determined by the priority identifier.
[0095] In actual situations, the number of second POS terminals in the local area network is greater than or equal to 1. When the printing task of one of the second POS terminals reaches the upper limit of the task sequence, the proxy server will re-encrypt the newly acquired printing data and send it to other second POS terminals, and generate a feedback prompt for the first POS terminal. The feedback prompt at least includes the identity of the target second POS terminal used to print the data to be printed, so as to prompt the first POS terminal to execute the second POS terminal for printing.
[0096] S208: The second POS terminal sends a printing completion notification message to the first POS terminal.
[0097] When the second POS terminal completes printing, the second POS terminal generates a prompt message according to the status of the completed printing and sends it to the proxy server, so that the proxy server sends a printing completion notification message to the first POS terminal to inform the operator that the printing is completed.
[0098] In this embodiment, the first POS terminal and the second POS terminal are connected through a proxy server, so that authentication between the first POS terminal and the second POS terminal can be performed through the proxy server, and the protocol key is synchronized through the proxy server. The first POS terminal and the second POS terminal transmit the data to be printed through the proxy server, and the print queue is generated in the proxy server, so as to reduce the occupancy generated by the first POS terminal and the second POS terminal performing authentication, storing keys, and transmitting and sorting the data to be printed in a centralized manner.
[0099] See also Figure 3 The present application provides an embodiment of a data printing system, which includes:
[0100] The first POS terminal 301 is used for:
[0101] Get the data to be printed;
[0102] If the amount of data to be printed exceeds a preset threshold, the data to be printed is divided into packets;
[0103] Sending the packetized data to be printed to the second POS terminal 302 so that the second POS terminal 302 prints the data to be printed, wherein the second POS terminal 302 has a printing function;
[0104] The second POS terminal 302 is used for:
[0105] Receiving the data to be printed after being packaged, wherein the data to be printed after being packaged is the data to be printed obtained by the first POS terminal 301, and when the amount of the data to be printed exceeds a preset threshold, the data to be printed is packaged, and the first POS terminal 301 does not have a printing function;
[0106] Add the packaged data to be printed to the print queue for printing.
[0107] Optionally, the first POS terminal 301 is specifically used for:
[0108] The packetized data to be printed is sent to the proxy server so that the proxy server forwards the packetized data to be printed to the second POS terminal 302 , wherein the proxy server establishes preset communication connections with the first POS terminal 301 and the second POS terminal 302 , respectively.
[0109] Optionally, the second POS terminal 302 is specifically used for:
[0110] If the print queue is empty, the packetized data to be printed is added to the print queue for printing.
[0111] Optionally, the second POS terminal 302 is further used for:
[0112] If the print queue is not empty, the packetized data to be printed is added to the print queue for printing according to the printing order determined by the priority identifier.
[0113] Optionally, the second POS terminal 302 is further used for:
[0114] The packetized data to be printed is received from the proxy server. The packetized data to be printed is data sent by the first POS terminal 301 to the proxy server. The proxy server has established preset communication connections with the first POS terminal 301 and the second POS terminal 302 respectively.
[0115] Optionally, the second POS terminal 302 is further used for:
[0116] A printing completion notification message is sent to the first POS terminal 301 .
[0117] In this embodiment, the functions of each unit are the same as those described above. Figure 1 and Figure 2 The steps in the illustrated embodiments correspond to each other and will not be described again here.
[0118] See also Figure 4 , the present application embodiment provides another embodiment of a data printing device, including:
[0119] Processor 401, memory 402, input and output unit 403, bus 404;
[0120] The processor 401 is connected to the memory 402, the input and output unit 403 and the bus 404;
[0121] Processor 401 specifically performs Figure 1 to Figure 2 The operations corresponding to the steps in the method are not described in detail here.
[0122] The present application also relates to a computer-readable storage medium on which a program is stored, wherein when the program is run on a computer, the computer is caused to execute any of the above methods.
[0123] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0124] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0125] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0126] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0127] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk, etc. Various media that can store program codes.
Claims
1. A data printing method, characterized in that: Applied to a first POS terminal, the first POS terminal does not have a printing function, the method includes: Get the data to be printed; If the amount of the data to be printed exceeds a preset threshold, the data to be printed is sub-packed; The packaged data to be printed is sent to a second POS terminal so that the second POS terminal prints the data to be printed, wherein the second POS terminal has a printing function.
2. The method according to claim 1, characterized in that: The step of sending the packetized data to be printed to the second POS terminal comprises: The packetized data to be printed is sent to a proxy server so that the proxy server forwards the packetized data to be printed to the second POS terminal, wherein the proxy server establishes preset communication connections with the first POS terminal and the second POS terminal respectively.
3. A data printing method, characterized in that: Applied to a second POS terminal, the second POS terminal having a printing function, the method comprising: Receiving the data to be printed after being packaged, wherein the data to be printed after being packaged is the data to be printed obtained by the first POS terminal, and when the data amount of the data to be printed exceeds a preset threshold, the data to be printed is packaged, and the first POS terminal does not have a printing function; The packetized data to be printed is added to a print queue for printing.
4. The method according to claim 3, characterized in that: The step of adding the packetized data to be printed to a print queue for printing includes: If the print queue is empty, the packetized data to be printed is added to the print queue for printing.
5. The method according to claim 3, characterized in that: The data to be printed carries a priority identifier, and the packetized data to be printed is added to a print queue for printing, including: If the print queue is not empty, the packetized data to be printed is added to the print queue for printing according to the printing order determined by the priority identifier.
6. The method according to claim 3, characterized in that The receiving of the packetized data to be printed includes: The packetized data to be printed is received from the proxy server, wherein the packetized data to be printed is data sent by the first POS terminal to the proxy server, wherein the proxy server establishes preset communication connections with the first POS terminal and the second POS terminal respectively.
7. The method according to any one of claims 3 to 6, characterized in that: After adding the packetized data to be printed to a print queue for printing, the method further includes: Send a printing completion notification message to the first POS terminal.
8. A data printing system, characterized in that: The system comprises a first POS terminal and a second POS terminal, wherein the first POS terminal is used for: Get the data to be printed; If the amount of the data to be printed exceeds a preset threshold, the data to be printed is sub-packed; sending the packetized data to be printed to the second POS terminal so that the second POS terminal prints the data to be printed, wherein the second POS terminal has a printing function; The second POS terminal is used for: receiving the packetized data to be printed, wherein the packetized data to be printed is the data to be printed obtained by the first POS terminal, and when the amount of the data to be printed exceeds a preset threshold, the data to be printed is packetized, and the first POS terminal does not have a printing function; The packetized data to be printed is added to a print queue for printing.
9. A data printing device, characterized in that: The device comprises: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; The memory stores a program, and the processor calls the program to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a program stored thereon, wherein the program, when executed on a computer, performs the method according to any one of claims 1 to 7.