CN108509163B - Printing control method and printing control device - Google Patents

Printing control method and printing control device Download PDF

Info

Publication number
CN108509163B
CN108509163B CN201810178190.4A CN201810178190A CN108509163B CN 108509163 B CN108509163 B CN 108509163B CN 201810178190 A CN201810178190 A CN 201810178190A CN 108509163 B CN108509163 B CN 108509163B
Authority
CN
China
Prior art keywords
terminal
printer
target
agent terminal
printed
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.)
Active
Application number
CN201810178190.4A
Other languages
Chinese (zh)
Other versions
CN108509163A (en
Inventor
聂龙羽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201810178190.4A priority Critical patent/CN108509163B/en
Publication of CN108509163A publication Critical patent/CN108509163A/en
Application granted granted Critical
Publication of CN108509163B publication Critical patent/CN108509163B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1236Connection management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/1284Local printer device

Abstract

The application provides a printing control method and a printing control device, the method comprises the following steps: inquiring available agent terminals and printers driven by each agent terminal; determining a target printer in the printer; determining a target agent terminal for driving the target printer among the agent terminals; and transmitting a control instruction and data to be printed to the target agent terminal, wherein the control instruction is used for instructing the target agent terminal to drive the target printer to print the data to be printed. According to the embodiment of the invention, the printer which is not in direct communication connection with the main control terminal is controlled by the main control terminal to execute printing, the limitation of a communication link between the terminal and the printer is broken through, and the printing operation is more flexible.

Description

Printing control method and printing control device
Technical Field
The present application relates to the field of printing technologies, and in particular, to a printing control method, a printing control apparatus, and a computer-readable storage medium.
Background
The current terminal controls the printer to print, and only can control the printer which is in communication connection with the terminal, but cannot control the printer which is not in direct communication connection with the terminal.
For example, as shown in fig. 1, terminal X is in communication connection with printer a and printer B, and terminal Y is in communication connection with printer C and printer D, then terminal X can drive printer a and printer B to print, but cannot control printer C and printer D to print.
This may cause inconvenience to the user, for example, when the user is using the terminal X, the printer a and the printer B are far from the user, and the printer C and the printer D are close to the user, but since the user can drive the printer a and the printer B only through the terminal X to print, the user can take the print file only from the printer far from the user.
Disclosure of Invention
In view of the above, the present application provides a print control method, a print control apparatus, and a computer-readable storage medium to solve the deficiencies in the related art.
According to a first aspect of embodiments of the present invention, there is provided a print control method including:
inquiring available agent terminals and printers driven by each agent terminal;
determining a target printer in the printer;
determining a target agent terminal for driving the target printer among the agent terminals;
and transmitting a control instruction and data to be printed to the target agent terminal, wherein the control instruction is used for instructing the target agent terminal to drive the target printer to print the data to be printed.
Alternatively, the querying for available agent terminals and the printer driven by each agent terminal may include:
inquiring available agent terminals;
and inquiring a printer driven by the agent terminal.
Alternatively, the querying for available agent terminals and the printer driven by each agent terminal may include:
inquiring a printer in a working state;
inquiring an agent terminal for driving the printer;
determining available ones of the proxy terminals.
Optionally, the querying available agent terminals and the printer driven by each agent terminal include:
automatically discovering available agent terminals in a network according to a preset protocol;
determining printers driven by the available agent terminals;
and storing the identification of the available agent terminal and the identification of the printer driven by the available agent terminal in a registry according to the incidence relation between the available agent terminal and the printer driven by the available agent terminal.
Optionally, the determining, in the agent terminal, a target agent terminal for driving the target printer includes:
querying the target printer in the registry;
and determining a target agent terminal for driving the target printer in the registry according to the association relation.
Optionally, the control instruction includes:
a task scheduling instruction and/or a compensation instruction;
the task scheduling instruction is used for indicating a printing mode of the target agent terminal for driving the target printer to print the data to be printed, and the compensation instruction is used for indicating a reaction mode when the target agent terminal drives the target printer to unfinished printing of the data to be printed.
According to a second aspect of the embodiments of the present invention, there is provided a print control method including:
receiving a control instruction and data to be printed transmitted by a main control terminal;
determining a target printer for printing the data to be printed according to the control instruction;
and driving the target printer to print the data to be printed according to the control instruction.
Optionally, the method further comprises:
before receiving a control instruction and data to be printed transmitted by a main control terminal, broadcasting the agent terminal to other terminals in a network according to a preset protocol, wherein the agent terminal is an available agent terminal.
According to a third aspect of embodiments of the present invention, there is provided a print control apparatus including:
the inquiry module is used for inquiring available agent terminals and printers driven by each agent terminal;
a printer determination module for determining a target printer among the printers;
a terminal determination module for determining a target agent terminal for driving the target printer among the agent terminals;
and the transmission module is used for transmitting a control instruction and the data to be printed to the target agent terminal, wherein the control instruction is used for indicating the target agent terminal to drive the target printer to print the data to be printed.
Optionally, the query module includes:
the discovery submodule is used for automatically discovering the available proxy terminal in the network according to a preset protocol;
a printer determination submodule for determining a printer driven by the available agent terminal;
and the storage submodule is used for storing the identification of the available agent terminal and the identification of the printer driven by the available agent terminal in a registry according to the incidence relation between the available agent terminal and the printer driven by the available agent terminal.
Optionally, the terminal determining module includes:
a query submodule for querying the target printer in the registry;
and the terminal determining submodule is used for determining a target agent terminal for driving the target printer in the registry according to the association relation.
Optionally, the control instruction includes:
a task scheduling instruction and/or a compensation instruction;
the task scheduling instruction is used for indicating a printing mode of the target agent terminal for driving the target printer to print the data to be printed, and the compensation instruction is used for indicating a reaction mode when the target agent terminal drives the target printer to unfinished printing of the data to be printed.
According to a fourth aspect of the embodiments of the present invention, there is provided a print control apparatus including:
the receiving module is used for receiving the control instruction and the data to be printed which are transmitted by the main control terminal;
the determining module is used for determining a target printer for printing the data to be printed according to the control instruction;
and the driving module is used for driving the target printer to print the data to be printed according to the control instruction.
Optionally, the apparatus is adapted to proxy a terminal, and the apparatus further includes:
and the broadcasting module is used for broadcasting the available agent terminal to other terminals in the network according to a preset protocol before the receiving module receives the control instruction and the data to be printed which are transmitted by the main control terminal.
According to a fifth aspect of embodiments of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the print control method of any of the above embodiments.
According to the embodiment of the invention, the main control terminal can transmit the control instruction and the data to be printed to the proxy terminal by inquiring the proxy terminal and the printer driven by the proxy terminal, so that the proxy terminal is controlled to drive the printer to print the data according to the control instruction, the printer which is not in direct communication connection with the main control terminal is controlled by the main control terminal to execute printing, the limitation of a communication link between the terminal and the printer is broken through, and the printing operation is more flexible.
The control instruction transmitted by the main control terminal to the agent terminal can comprise a task scheduling instruction and/or a compensation instruction, the agent terminal can be instructed to drive the printing mode of the target printer to print the data to be printed through the task scheduling instruction, and the agent terminal can be instructed to drive the printer to not finish the reaction mode when the data to be printed is printed through the compensation instruction.
In addition, before receiving the control instruction and the data to be printed transmitted by the main control terminal, the agent terminal can broadcast the available agent terminal to other terminals in the network according to a preset protocol, so that the main control terminal in the network can determine which agent terminals are available agent terminals in time, and then transmit the control instruction and the data to be printed to the agent terminals.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
Fig. 1 is a schematic diagram illustrating an application scenario of a printing method in the related art.
Fig. 2 is a schematic flowchart illustrating a print control method according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of an application scenario of the print control method according to the embodiment of the present invention.
Fig. 4 is a schematic flow chart illustrating querying available agent terminals and printers driven by each of the agent terminals according to an embodiment of the present invention.
Fig. 5 is a schematic flowchart illustrating determination of a target proxy terminal for driving the target printer among the proxy terminals according to an embodiment of the present invention.
Fig. 6 is a schematic flowchart illustrating a print control method according to an embodiment of the present invention.
Fig. 7 is a schematic flowchart illustrating another print control method according to an embodiment of the present invention.
Fig. 8 is a diagram illustrating a hardware configuration of a terminal where a printing apparatus is located according to an embodiment of the present invention.
Fig. 9 is a schematic block diagram showing a print control apparatus according to an embodiment of the present invention.
FIG. 10 is a schematic block diagram illustrating a query module in accordance with an embodiment of the present invention.
Fig. 11 is a schematic block diagram illustrating a terminal determination module according to an embodiment of the present invention.
Fig. 12 is a schematic block diagram showing a print control apparatus according to an embodiment of the present invention.
Fig. 13 is a schematic block diagram showing another print control apparatus according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Fig. 2 is a schematic flowchart illustrating a print control method according to an embodiment of the present invention. The method shown in this embodiment may be applied to a terminal, and for distinguishing from an agent terminal in a subsequent embodiment, a terminal to which the method shown in this embodiment is applied is temporarily called a main control terminal, where the main control terminal may be an electronic device such as a personal computer, a notebook computer, a mobile phone, a POS machine, a cash register, and the like.
As shown in fig. 2, the print control method of the present embodiment may include the steps of:
in step S11, the available agent terminals and the printer driven by each of the agent terminals are inquired.
In one embodiment, querying available agent terminals and printers driven by each of the agent terminals may include:
step S111, inquiring available agent terminals;
and step S112, inquiring the printer driven by the agent terminal.
In an embodiment, the main control terminal may query an available proxy terminal in a local area network where the main control terminal is located, where the proxy terminal may broadcast the available proxy terminal to other terminals in the local area network, and the main control terminal may determine that the proxy terminal is an available proxy terminal when receiving the proxy terminal broadcast that the proxy terminal is an available proxy terminal.
It should be noted that the master control terminal and the proxy terminal are not limited to be in one local area network, the master control terminal queries an available proxy terminal in the local area network where the master control terminal is located is merely an example, and the master control terminal may query proxy terminals other than the local area network where the master control terminal is located.
The communication modes of the master control terminal and the proxy terminal may include a wired communication mode and a wireless communication mode, wherein the wireless communication mode may be, for example, bluetooth, infrared, WiFi, Near Field Communication (NFC), and the like.
In one embodiment, for an available proxy terminal, a device connected to the proxy terminal may be queried, and if the connected device includes a printer, the printer is a printer driven by the proxy terminal.
In one embodiment, querying available agent terminals and printers driven by each of the agent terminals may include:
step S113, inquiring the printer in a working state;
step S114, determining a proxy terminal for driving the printer;
and step S115, determining available proxy terminals in the proxy terminals.
In one embodiment, the main control terminal may first query the printer in addition to the proxy terminal in the above manner.
For example, the printer may upload information on whether it is in an operating state and identity information of an agent terminal for driving the printer to the server. The main control terminal can communicate with the server to acquire information whether the printer is in a working state, and further can determine the printer in the working state according to the information.
Further, after the printer in the working state is determined, the server may further communicate with the server to acquire the identity information of the agent terminal for driving the printer in the working state. And for the agent terminal acquiring the identity information, whether the received broadcast message contains the message that the agent terminal broadcasts the agent terminal which is available can be determined, and if the received broadcast message contains the message, the agent terminal can be determined to be the available agent terminal.
In step S12, a target printer is determined among the printers.
In one embodiment, after querying the printers, the user may select one or more of the printers as the target printer, as desired.
In step S13, a target proxy terminal for driving the target printer is determined among the proxy terminals.
In one embodiment, after the target printer is determined, since there may be a plurality of terminals capable of driving the target printer, but the plurality of terminals are not necessarily all available proxy terminals, that is, are not necessarily all terminals controllable by the main control terminal, the target proxy terminal for driving the target printer may be determined among the available proxy terminals to ensure that the main control terminal is capable of controlling the target proxy terminal to drive the target printer.
Step S14, transmitting a control instruction and data to be printed to the target agent terminal, where the control instruction is used to instruct the target agent terminal to drive the target printer to print the data to be printed.
In one embodiment, the master control terminal transmits the control instruction and the data to be printed to the target agent terminal, and the target agent terminal can be controlled to drive the target printer to print the data to be printed according to the control instruction.
Fig. 3 is a schematic diagram of an application scenario of the print control method according to the embodiment of the present invention.
As shown in fig. 3, the available proxy terminals queried by the master terminal Z are a proxy terminal X and a proxy terminal Y, where the proxy terminal X is in communication connection with the printer a and the printer B, and the proxy terminal Y is in communication connection with the printer C and the printer D.
If the determined target printer is the printer A, the target agent terminal used for driving the target printer in the agent terminal is the agent terminal X, the main control terminal Z can run a printing agent program, the printing agent program can transmit a control instruction and data to be printed to the agent terminal X through a self-built printing protocol, and the agent terminal X can drive the printer A to print the data to be printed according to the control instruction.
Therefore, the master control terminal can transmit the control instruction and the data to be printed to the agent terminal by inquiring the agent terminal and the printer driven by the agent terminal, so that the agent terminal is controlled to drive the printer to print the data according to the control instruction, the printer which is not in direct communication connection with the master control terminal is controlled by the master control terminal to execute printing, the limitation of a communication link between the terminal and the printer is broken through, and the printing operation is more flexible.
For example, the main control terminal Z shown in fig. 3 is a personal computer, and if a user needs to print data through a nearest printer, for example, the nearest printer is a printer a, a control instruction and data to be printed may be transmitted to the agent terminal X through the main control terminal Z, so that the agent terminal X drives the printer a to print the data to be printed according to the control instruction, and the user can conveniently and quickly obtain the content to be printed.
For example, the main control terminal Z shown in fig. 3 is a cash register, and the agent terminal X and the agent terminal Y are also cash registers, and if a customer of the user pays a purchase meal on the main control terminal Z and gets a meal at the agent terminal X, the user can transmit a control instruction and data to be printed to the agent terminal X through the main control terminal Z, so that the agent terminal X drives the printer a to print the data to be printed according to the control instruction, for example, a payment bill of the customer is printed, and thus the customer does not need to turn back to the main control terminal Z to obtain the payment bill after getting the meal, which is beneficial to improving the purchase experience of the customer.
In addition, since the command types of different printers may be different, for example, the command type of the printer a shown in fig. 3 is TSPL, and the command type of the printer C is ESC/POS, and since the main control terminal Z does not directly drive the printer a and the printer C to print, the control command transmitted by the main control terminal Z to the agent terminal X and the control command transmitted to the agent terminal Y may be the same type, regardless of the command types of the different printers. The unification of instructions transmitted from the main control terminal to the agent terminal is ensured, and the operation complexity of generating the instructions for controlling the printer by the main control terminal is reduced.
Fig. 4 is a schematic flow chart illustrating querying available agent terminals and printers driven by each of the agent terminals according to an embodiment of the present invention. As shown in fig. 4, on the basis of the embodiment shown in fig. 2, the querying available agent terminals and the printers driven by each agent terminal include:
and step S116, automatically discovering available agent terminals in the network according to a preset protocol.
In one embodiment, the preset protocol may be a Bonjour protocol.
Step S117, determining the printer driven by the available proxy terminal.
Step S118, storing the identification of the available agent terminal and the identification of the printer driven by the available agent terminal in a registry according to the incidence relation between the available agent terminal and the printer driven by the available agent terminal.
In one embodiment, the association of available agent terminals and printers driven by the available agent terminals is represented, for example, by a tree diagram, then the identities of the available agent terminals may be stored as parent nodes in the registry and the identities of the printers driven by the available agent terminals may be stored as child nodes.
Fig. 5 is a schematic flowchart illustrating determination of a target proxy terminal for driving the target printer among the proxy terminals according to an embodiment of the present invention. As shown in fig. 5, on the basis of the embodiment shown in fig. 4, the determining, in the agent terminal, a target agent terminal for driving the target printer includes:
step S131, inquiring the target printer in the registry;
step S132, determining a target agent terminal for driving the target printer in the registry according to the association relationship.
In one embodiment, the target printer can be quickly queried according to the registry, and further, the target agent terminal driving the target printer can be quickly queried according to the association relationship of the target agent terminal of the target printer driving the target printer.
In one embodiment, the control instructions include:
a task scheduling instruction and/or a compensation instruction;
the task scheduling instruction is used to instruct the target agent terminal to drive a printing mode of the target printer for printing the data to be printed, for example, a plurality of copies of the target data are printed, which data in the target data are printed, and the like. The compensation instruction is used for indicating a reaction mode when the target agent terminal drives the target printer to drive the target printer to unfinish printing of the data to be printed, for example, the data to be printed is continuously printed when the data to be printed is unfinished printing, or the agent terminal generates feedback information and transmits the feedback information to the main control terminal.
Fig. 6 is a schematic flowchart illustrating a print control method according to an embodiment of the present invention. The method shown in this embodiment may be applied to a terminal, and in order to distinguish from a main control terminal in a subsequent embodiment, a terminal to which the method shown in this embodiment is applied is temporarily called a proxy terminal, where the proxy terminal may be an electronic device such as a personal computer, a notebook computer, a mobile phone, a POS machine, and a cash register.
As shown in fig. 6, the printing control method may include the steps of:
step S61, receiving a control instruction and data to be printed transmitted by the main control terminal;
step S62, determining a target printer for printing the data to be printed according to the control instruction;
and step S63, driving the target printer to print the data to be printed according to the control instruction.
In an embodiment, the main control terminal may be the main control terminal applied in the embodiment shown in fig. 2, and the agent terminal may drive the target printer to print the data to be printed according to the control instruction by receiving the control instruction and the data to be printed transmitted by the main control terminal, so that the printer which is not in direct communication connection with the main control terminal is controlled by the main control terminal to execute printing, and the limitation of a communication link between the terminal and the printer is broken through, so that the printing operation is more flexible.
Fig. 7 is a schematic flowchart illustrating another print control method according to an embodiment of the present invention. As shown in fig. 7, on the basis of the embodiment shown in fig. 6, the method includes:
and step S64, before receiving the control instruction and the data to be printed transmitted by the main control terminal, broadcasting the available agent terminal to other terminals in the network according to a preset protocol.
In one embodiment, the predetermined protocol may be a Bonjour protocol. By broadcasting the available agent terminals to other terminals in the network, the main control terminal in the network can determine which agent terminals are available agent terminals in time, and further transmit control instructions and data to be printed to the agent terminals.
Corresponding to the embodiment of the printing control method, the application also provides an embodiment of the printing device.
The embodiment of the printing device can be applied to the terminal. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and as a logical device, the device is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor of the terminal where the device is located. From a hardware aspect, as shown in fig. 8, the present application is a hardware structure diagram of a terminal where a printing apparatus is located, except for the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 8, the printing where the apparatus is located in the embodiment may also include other hardware according to an actual function of the printing, which is not described again.
Fig. 9 is a schematic block diagram showing a print control apparatus according to an embodiment of the present invention. The method shown in this embodiment may be applied to a terminal, and for distinguishing from an agent terminal in a subsequent embodiment, a terminal to which the method shown in this embodiment is applied is temporarily called a main control terminal, where the main control terminal may be an electronic device such as a personal computer, a notebook computer, a mobile phone, a POS machine, a cash register, and the like.
As shown in fig. 9, the print control apparatus of the present embodiment may include:
an inquiry module 91, configured to inquire about available agent terminals and printers driven by each of the agent terminals;
a printer determination module 92 for determining a target printer among the printers;
a terminal determination module 93 for determining a target proxy terminal for driving the target printer among the proxy terminals;
a transmission module 94, configured to transmit a control instruction and data to be printed to the target agent terminal, where the control instruction is used to instruct the target agent terminal to drive the target printer to print the data to be printed.
FIG. 10 is a schematic block diagram illustrating a query module in accordance with an embodiment of the present invention. As shown in fig. 10, on the basis of the embodiment shown in fig. 9, the query module 91 includes:
a discovery sub-module 911, configured to automatically discover available agent terminals in the network according to a preset protocol;
a printer determination sub-module 912 for determining a printer driven by the available agent terminal;
the storage sub-module 913 is configured to store the identifier of the available proxy terminal and the identifier of the printer driven by the available proxy terminal in a registry according to the association relationship between the available proxy terminal and the printer driven by the available proxy terminal.
Fig. 11 is a schematic block diagram illustrating a terminal determination module according to an embodiment of the present invention. As shown in fig. 11, based on the embodiment shown in fig. 10, the terminal determining module 93 includes:
a query submodule 931 configured to query the target printer in the registry;
a terminal determining submodule 932, configured to determine, in the registry, a target agent terminal for driving the target printer according to the association relationship.
In one embodiment, the control instructions include:
a task scheduling instruction and/or a compensation instruction;
the task scheduling instruction is used for indicating a printing mode of the target agent terminal for driving the target printer to print the data to be printed, and the compensation instruction is used for indicating a reaction mode when the target agent terminal drives the target printer to unfinished printing of the data to be printed.
Fig. 12 is a schematic block diagram showing a print control apparatus according to an embodiment of the present invention. The method shown in this embodiment may be applied to a terminal, and in order to distinguish from a proxy terminal in the subsequent embodiments, a terminal to which the method shown in this embodiment is applied is temporarily called a proxy terminal, where the proxy terminal may be an electronic device such as a personal computer, a notebook computer, a mobile phone, a POS machine, and a cash register.
As shown in fig. 12, the print control apparatus includes:
a receiving module 121, configured to receive a control instruction and data to be printed, which are transmitted by the main control terminal;
a determining module 122, configured to determine, according to the control instruction, a target printer for printing the data to be printed;
and the driving module 123 is configured to drive the target printer to print the data to be printed according to the control instruction.
Fig. 13 is a schematic block diagram showing another print control apparatus according to an embodiment of the present invention. Applicable to proxy terminals, as shown in fig. 13, on the basis of the embodiment shown in fig. 12, the apparatus further includes:
a broadcasting module 124, configured to broadcast, according to a preset protocol, the proxy terminal as an available proxy terminal to other terminals in the network before the receiving module receives the control instruction and the data to be printed, which are transmitted by the main control terminal.
An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, performs the print control method according to any one of fig. 2 to 5.
An embodiment of the present invention is a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, performs a print control method in the embodiment shown in fig. 6 or 7.
The implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (12)

1. A print control method characterized by comprising:
the method comprises the following steps that a main control terminal automatically discovers an available agent terminal in a network according to a preset protocol, and determines a printer driven by the available agent terminal, wherein the preset protocol comprises a Bonjour protocol, the main control terminal and the agent terminal are in the same local area network or not, and the main control terminal and the agent terminal comprise: at least one of a POS machine and a cash register;
determining at least one target printer selected by a user among the printers;
determining a target agent terminal for driving the target printer among the agent terminals;
transmitting a control instruction and data to be printed to the target agent terminal, wherein the control instruction is used for instructing the target agent terminal to drive each target printer to print the data to be printed, the data to be printed comes from the same payment bill, and the control instruction comprises: the system comprises a task scheduling instruction and/or a compensation instruction, wherein the task scheduling instruction is used for indicating a printing mode of driving each target printer to print the data to be printed by the target agent terminal, and the compensation instruction is used for indicating a reaction mode when the target agent terminal drives each target printer to unfinish printing of the data to be printed.
2. The method of claim 1, wherein automatically discovering available agent terminals within a network according to a predetermined protocol and determining printers driven by the available agent terminals comprises:
automatically discovering available agent terminals in a network according to a preset protocol;
determining printers driven by the available agent terminals;
and storing the identification of the available agent terminal and the identification of the printer driven by the available agent terminal in a registry according to the incidence relation between the available agent terminal and the printer driven by the available agent terminal.
3. The method of claim 2, wherein determining, among the agent terminals, a target agent terminal for driving the target printer comprises:
querying the target printer in the registry;
and determining a target agent terminal for driving the target printer in the registry according to the association relation.
4. A print control method characterized by comprising:
the method comprises the following steps that an agent terminal receives a control instruction and data to be printed transmitted by a main control terminal, the main control terminal and the agent terminal are in the same local area network or not in the same local area network, the control instruction and the data to be printed are sent to a determined target agent terminal after the main control terminal automatically discovers an available agent terminal in the network according to a preset protocol, the target agent terminal drives the agent terminal of a target printer after the main control terminal determines the target printer from printers driven by the discovered available agent terminal, the preset protocol comprises a Bonjour protocol, and the control instruction comprises: the main control terminal and the agent terminal comprise: at least one of a POS machine and a cash register;
determining at least one target printer selected by a user to print the data to be printed according to the control instruction;
and driving the target printer to print the data to be printed according to the control instruction, wherein the data to be printed are sent out from the same payment bill.
5. The method of claim 4, adapted for a proxy terminal, the method further comprising:
before receiving a control instruction and data to be printed transmitted by a main control terminal, broadcasting the agent terminal to other terminals in a network according to a preset protocol, wherein the agent terminal is an available agent terminal.
6. A print control apparatus, comprising:
the inquiry module is used for the main control terminal to automatically find an available agent terminal in a network according to a preset protocol and determine a printer driven by the available agent terminal, wherein the preset protocol comprises a Bonjour protocol, the main control terminal and the agent terminal are in the same local area network or not, and the main control terminal and the agent terminal comprise: at least one of a POS machine and a cash register;
a printer determination module for determining at least one target printer selected by a user among the printers;
a terminal determination module for determining a target agent terminal for driving the target printer among the agent terminals;
a transmission module, configured to transmit a control instruction and data to be printed to the target agent terminal, where the control instruction is used to instruct the target agent terminal to drive each target printer to print the data to be printed, and the data to be printed comes from the same payment bill, and the control instruction includes: the system comprises a task scheduling instruction and/or a compensation instruction, wherein the task scheduling instruction is used for indicating a printing mode of driving each target printer to print the data to be printed by the target agent terminal, and the compensation instruction is used for indicating a reaction mode when the target agent terminal drives each target printer to unfinish printing of the data to be printed.
7. The apparatus of claim 6, wherein the query module comprises:
the discovery submodule is used for automatically discovering the available proxy terminal in the network according to a preset protocol;
a printer determination submodule for determining a printer driven by the available agent terminal;
and the storage submodule is used for storing the identification of the available agent terminal and the identification of the printer driven by the available agent terminal in a registry according to the incidence relation between the available agent terminal and the printer driven by the available agent terminal.
8. The apparatus of claim 7, wherein the terminal determining module comprises:
a query submodule for querying the target printer in the registry;
and the terminal determining submodule is used for determining a target agent terminal for driving the target printer in the registry according to the association relation.
9. A print control apparatus, comprising:
a receiving module, configured to receive, by an agent terminal, a control instruction and data to be printed transmitted by a master control terminal, where the master control terminal and the agent terminal are in the same local area network or not in the same local area network, where the control instruction and the data to be printed are sent to a determined target agent terminal after the master control terminal automatically discovers an available agent terminal in a network according to a preset protocol, and the target agent terminal determines a target printer from printers driven by the discovered available agent terminal and drives the agent terminal of the target printer, where the preset protocol includes a Bonjour protocol, and the control instruction includes: the main control terminal and the agent terminal comprise: at least one of a POS machine and a cash register;
the determining module is used for determining at least one target printer which is selected by a user and used for printing the data to be printed according to the control instruction;
and the driving module is used for driving the target printer to print the data to be printed according to the control instruction, and the data to be printed is sent out from the same payment bill.
10. The apparatus of claim 9, adapted for a proxy terminal, the apparatus further comprising:
and the broadcasting module is used for broadcasting the available agent terminal to other terminals in the network according to a preset protocol before the receiving module receives the control instruction and the data to be printed which are transmitted by the main control terminal.
11. A computer-readable storage medium on which a computer program is stored, characterized in that the program, when executed by a processor, executes the print control method according to any one of claims 1 to 3.
12. A computer-readable storage medium on which a computer program is stored, characterized in that the program, when executed by a processor, executes the print control method according to claim 4 or 5.
CN201810178190.4A 2018-03-05 2018-03-05 Printing control method and printing control device Active CN108509163B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810178190.4A CN108509163B (en) 2018-03-05 2018-03-05 Printing control method and printing control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810178190.4A CN108509163B (en) 2018-03-05 2018-03-05 Printing control method and printing control device

Publications (2)

Publication Number Publication Date
CN108509163A CN108509163A (en) 2018-09-07
CN108509163B true CN108509163B (en) 2021-09-07

Family

ID=63377090

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810178190.4A Active CN108509163B (en) 2018-03-05 2018-03-05 Printing control method and printing control device

Country Status (1)

Country Link
CN (1) CN108509163B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109976684A (en) * 2019-02-28 2019-07-05 苏州博瑞凯德信息技术有限公司 A kind of adapter distribution print system, method and device
CN112445433A (en) * 2019-08-29 2021-03-05 钉钉控股(开曼)有限公司 File printing method, device, equipment and system
CN111638859A (en) * 2020-05-29 2020-09-08 北京字节跳动网络技术有限公司 Cloud printing method, device, system, equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100565062B1 (en) * 2003-12-13 2006-03-30 삼성전자주식회사 System for selecting printer via a wireless network and method thereof
CN102508624A (en) * 2011-10-26 2012-06-20 苏州工业园区鑫海胜电子有限公司 Transparent proxy printing method for local area network
CN104254844B (en) * 2012-06-26 2017-12-19 惠普发展公司,有限责任合伙企业 The network printer is exposed to WI FI clients
CN103179120A (en) * 2013-03-21 2013-06-26 天闻数媒科技(北京)有限公司 Method and system for realizing printing of mobile device
CN105988760A (en) * 2015-02-10 2016-10-05 上海品奇数码科技有限公司 Printing-based interactive display method and system

Also Published As

Publication number Publication date
CN108509163A (en) 2018-09-07

Similar Documents

Publication Publication Date Title
US10120629B2 (en) Printing devices and terminal devices that switch communication modes
CN108509163B (en) Printing control method and printing control device
US9210732B2 (en) Wireless communication device registration in a wireless network
CN103369171B (en) Image-data processing apparatus and management equipment
JP6682862B2 (en) Wireless communication terminal, wireless communication system, and wireless communication program
US20030100335A1 (en) Adaptor for wireless network
US9235364B2 (en) Method and apparatus to perform image forming job by using network
EP3065013B1 (en) Device control method, server, system and computer storage medium
JP6939256B2 (en) Information processing device, information processing program, and control method of information processing device
CN103019630B (en) Print system, printing equipment and Method of printing
JP2002312145A5 (en)
CN104808955A (en) Information terminal, printing system, control method for printing system, and storage medium
US20170149985A1 (en) Image forming apparatus and image forming system
CN103218182A (en) Image forming system, image forming device, non-transitory computer readable medium, and image forming method
CN1996228A (en) Apparatus, system, and method of processing printing operation on home network
JP5304201B2 (en) Computer program, server device, portable device, and system for controlling job processing
US20100027069A1 (en) Image forming apparatus and control method thereof
JP4402370B2 (en) Service providing apparatus and information processing method
US10846030B2 (en) Communication device and non-transitory computer-readable medium storing computer-readable instructions for communication device or server
JP2018132881A (en) Communication system and print mediation server and computer program for terminal device
JP7114951B2 (en) Computer program for terminal device and terminal device
JP6458828B2 (en) Image recording device
KR100621106B1 (en) Wireless network-based printing system
JP2004362240A (en) Printer controller and printer control program
JP2001312432A (en) Network server and its control method

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