WO2015018271A1 - Method and device for sharing printing within family - Google Patents

Method and device for sharing printing within family Download PDF

Info

Publication number
WO2015018271A1
WO2015018271A1 PCT/CN2014/082404 CN2014082404W WO2015018271A1 WO 2015018271 A1 WO2015018271 A1 WO 2015018271A1 CN 2014082404 W CN2014082404 W CN 2014082404W WO 2015018271 A1 WO2015018271 A1 WO 2015018271A1
Authority
WO
WIPO (PCT)
Prior art keywords
home gateway
printing
capability
print
parameter value
Prior art date
Application number
PCT/CN2014/082404
Other languages
French (fr)
Chinese (zh)
Inventor
叶小玲
杨俊�
吕鑫
Original Assignee
华为终端有限公司
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 华为终端有限公司 filed Critical 华为终端有限公司
Publication of WO2015018271A1 publication Critical patent/WO2015018271A1/en

Links

Classifications

    • 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/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1218Reducing or saving of used resources, e.g. avoiding waste of consumables or improving usage of hardware resources
    • G06F3/122Reducing or saving of used resources, e.g. avoiding waste of consumables or improving usage of hardware resources with regard to computing resources, e.g. memory, CPU
    • 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/1229Printer resources management or printer maintenance, e.g. device status, power levels
    • G06F3/1232Transmitting printer device capabilities, e.g. upon request or periodically
    • 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/1237Print job management
    • G06F3/1241Dividing a job according to job requirements, e.g. black/white and colour pages, covers and body of books, tabs
    • 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/1237Print job management
    • G06F3/126Job scheduling, e.g. queuing, determine appropriate device
    • 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/1285Remote printer device, e.g. being remote from client or server
    • G06F3/1288Remote printer device, e.g. being remote from client or server in client-server-printer device configuration

Definitions

  • the present invention relates to the field of shared printing technologies, and in particular, to a home sharing printing method and apparatus.
  • the home gateway supports the Universal Serial Bus (USB) printing function, which enables sharing of print services within the home.
  • Home network devices can print files or pictures through a USB printer connected to the home gateway.
  • USB Universal Serial Bus
  • SAMBA is a software that implements the Server Message Block (SMB) protocol on the operating system Linux or UNIX. It consists of a server and a client program. The role of the SAMBA server is to share the printer, notify the presence and name of the network user's printer, and answer the PC print information, and deliver the print content to the Common UNIX Printing System (CUPS) for three-way interaction. In this process, the print file is transmitted to the gateway as a complete task through the SMB protocol. After the entire file transfer is completed, the SAMBA server prints the file through the CUPS command.
  • SMB Server Message Block
  • CUPS Common UNIX Printing System
  • the home gateway is different from a personal computer (PC)
  • its memory cache space
  • the gateway device may be abnormal. Affect the normal use of the gateway device, and even cause the gateway to crash.
  • the invention provides a home sharing printing method and device, which supports large file printing in case of limited memory, avoids abnormality of the gateway device, reduces resource occupation of the printing sharing device, and shortens printing time.
  • the first aspect provides a home sharing printing method, the method comprising:
  • the terminal device sends the negotiation capability request message to the home gateway; receiving the negotiation capability response message returned by the home gateway, and determining the printing capability of the home gateway according to the negotiation capability response message ;
  • the negotiation capability response packet carries a first parameter value that reflects a printing capability of the home gateway
  • the determining, according to the printing capability of the home gateway, the service content in the print request is divided into at least one print file segment, specifically:
  • the negotiation capability response message further carries a second parameter value reflecting a working state of the printer connected to the home gateway;
  • Determining, according to the negotiation capability response message, the printing capability of the home gateway further comprising:
  • the printer is in an idle state, dividing the service content in the print request into at least one print file segment according to the printing capability of the home gateway;
  • the printer If the printer is in a full load operation state and the data capacity corresponding to the first parameter value is zero, the printing is canceled.
  • the method further includes:
  • the data size of the print file segment is sequentially incremented according to the order of the print file segments.
  • the sending, by the sending, the printing file segment to the home gateway for printing specifically includes:
  • the sending, by the sending, the print file segment to the home gateway for printing specifically includes:
  • the negotiation capability request message is sent to the home gateway again, and the negotiation capability response message returned by the home gateway is received again, and the next printing of the print file segment is performed.
  • the method before the resending the negotiation capability request message to the home gateway, the method further includes: determining the last time Whether the time distance of sending the negotiation capability request message to the home gateway exceeds a preset second waiting delay, and if yes, sending the negotiation capability request message again; otherwise, entering a waiting delay state.
  • the method further includes:
  • a home sharing printing method is further provided, where the method includes:
  • the home gateway When receiving the negotiation capability request message sent by the terminal device, the home gateway constructs a negotiation capability response message, where the negotiation capability response message carries a first parameter value reflecting the printing capability of the home gateway;
  • Receiving, by the terminal device, the service content in the print request is divided into the print file segments sent after the at least one print file segment according to the printing capability of the home gateway, and controlling the printer to print the received The print file segment.
  • the receiving, by the terminal device, the negotiation capability response packet, when the terminal device sends the negotiation capability request packet specifically includes:
  • the home gateway determines whether the print capability request message is limited in size, and if so, statistics the remaining data capacity of the home gateway, and the remaining data capacity As the first parameter value, otherwise, the first parameter value is set as a preset first identifier.
  • the negotiation capability response packet further carries a printer working status that is connected to the home gateway.
  • Second parameter value Second parameter value
  • the method further includes:
  • the second parameter value is set to an identifier that is in an active state; otherwise, the second parameter value is set to be idle. The identity of the state;
  • the second parameter value is set to an identifier at a full load operating state.
  • a terminal device is further provided, where the terminal device includes:
  • a transceiver module configured to receive a print request, and when receiving the print request, send a negotiation capability request message to the home gateway, and receive a negotiation capability response message returned by the home gateway;
  • the negotiation capability response packet carries a first parameter value that reflects a printing capability of the home gateway
  • the processing module is specifically configured to determine a printing capability of the home gateway according to the first parameter value in the negotiation capability response message.
  • the processing module is specifically configured to code the service content in the print request received by the transceiver module by a page, and obtain a single page Data and data size; and, the encoded business content is connected by page, accumulating the data size in the connected page, combining the connected data into one print file segment, and making each of the print files The size of the data of the segment does not exceed the data capacity corresponding to the first parameter value of the printing capability of the home gateway.
  • the negotiation capability response packet received by the transceiver module further carries a reflection and the home gateway a second parameter value of the connected printer operating state
  • the processing module is further configured to determine an operating state of the printer according to the second parameter value; if the printer is in an idle state, divide the service content in the print request according to the printing capability of the home gateway At least one print file segment;
  • the printer If the printer is in a full load operation state and the data capacity corresponding to the first parameter value is zero, the printing is canceled.
  • the processing module is further configured to: when the data size of the single page exceeds the printing capability of the home gateway When the first parameter value corresponds to the data capacity, the working state of the printer is determined according to the second parameter value in the negotiation capability response message, and if the printer is in the idle state, canceling printing; if the printer is in the working state, Then enter the wait delay state and preset the first waiting delay At the end, the negotiation capability request message is sent to the home gateway again.
  • the data size of the print file segment divided by the processing module is sequentially performed according to the sequence of the print file segment Increment.
  • the processing module is configured to send the print file segment to the home gateway for printing, and specifically includes determining, in the print request, Whether the number of the print file segments of the business content exceeds one, and if so, the print file segments are sent one by one to the home gateway for printing; if not, the print file segments are sent to the family The gateway prints.
  • the processing module is configured to send the print file segments one by one to the home gateway for printing, specifically Including the sending, by the transceiver module, one of the print file segments to the home gateway for printing; when the print file segment is printed, sending the negotiation capability request message to the home gateway through the transceiver module again. And receiving the negotiation capability response message returned by the home gateway again, and performing negotiation printing of the next print file segment.
  • an eighth possible implementation manner of the third aspect before the processing module sends the negotiation capability request packet to the home gateway by using the transceiver module again And determining whether the time distance of the last time the negotiation capability request message is sent to the home gateway exceeds a preset second waiting delay, and if yes, sending the negotiation capability request message through the transceiver module again. ; Otherwise, enter the state of waiting for delay.
  • the processing module is further used after receiving the negotiation capability response message returned by the home gateway again Re-determining the printing capability of the home gateway according to the re-received negotiation capability response message, and adjusting the service in the print request when the printing capability of the home gateway changes — — The print file segment of the content.
  • the fourth aspect further provides a home gateway of the printing device, where the home gateway includes: a transceiver, configured to receive a negotiation capability request message sent by the terminal device;
  • a processor configured to: when the transceiver receives the print capability request message, construct a negotiation capability response message, where the negotiation capability response message carries a first parameter that reflects a printing capability of the home gateway Value
  • the transceiver is further configured to receive a print file segment that is sent by the terminal device after the service content in the print request is divided into at least one print file segment according to the printing capability in the negotiation capability response message;
  • the processor is further configured to control the printer to print the received segment of the print file after the transceiver receives the segment of the print file.
  • the processor is specifically configured to: when the transceiver receives the negotiation capability request packet, determine the print capability request packet Whether the size is limited, if yes, the remaining data capacity of the home gateway is counted, and the remaining data capacity is used as the first parameter value, otherwise, the first parameter value is set as a preset first identifier. .
  • the negotiation capability response packet configured by the processor further carries a reflection and the home gateway a second parameter value of the connected printer operating state
  • the processor uses the remaining data capacity as the first parameter value, it is further used to determine whether there is a file being printed when the remaining data capacity is not zero, and if so, Setting the second parameter value as an identifier in an active state; otherwise setting the second parameter value to an identifier in an idle state; and, when the remaining data capacity is zero, setting the second parameter value It is the identifier of the working state at full load.
  • the home sharing printing method and device provided by the present invention support large file printing under a memory-limited type device such as a home gateway, avoiding abnormality of the gateway device, reducing resource occupation of the printing sharing device, and shortening printing time.
  • FIG. 1 is a structural diagram of a home sharing printing system according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of a home sharing printing method according to Embodiment 1 of the present invention.
  • FIG. 3 is a flow chart of a specific method of S 1 06 in FIG. 2;
  • FIG. 4 is a flowchart of a home sharing printing method according to Embodiment 1 of the present invention.
  • FIG. 5 is a schematic structural diagram of a terminal device according to Embodiment 2 of the present invention.
  • FIG. 6 is a schematic structural diagram of a home gateway of a printing device according to Embodiment 2 of the present invention. detailed description
  • the home sharing printing method and apparatus provided by the embodiments of the present invention can be used in the case where sharing printing is required, and is particularly suitable for a home network with limited configuration such as memory.
  • 1 is a structural diagram of a home sharing printing system according to an embodiment of the present invention. As shown in FIG. 1, the home sharing printing system includes a terminal device 1, a home gateway 2, and a printer 3 that are sequentially connected.
  • the terminal device 1 may be a PC or other network device, and can interact with the user to receive a print request initiated by the user.
  • the home gateway 2 may be a SAMBA server or the like, and a home gateway 2 may be connected to a plurality of terminal devices 1 or may be connected to a plurality of printers 3. In general, the home gateway 2 utilizes the SMB protocol between the SAMBA server and the terminal device 1. — Communicate to transfer the content that needs to be printed in the print request, and use the CUPS program to send the printer to the printer via the original (RAW) datagram socket protocol or l ine pr inter remote (LPR). Documentation.
  • RAW original
  • LPR l ine pr inter remote
  • the home sharing printing method of the present invention includes:
  • the S10 terminal device receives the print request, and when receiving the print request, proceeds to S102.
  • the terminal device sends a negotiation capability request message to the home gateway.
  • a print request is initiated by the terminal device (ie, the client).
  • the terminal device When receiving the print request, the terminal device sends a negotiation capability request message to the home gateway.
  • the negotiation capability request message is used for the transmission storage capability of the server that the terminal device requests the home gateway.
  • the negotiation capability request message may include: a file that processes the request or a path Fid, a requested information level, and the like.
  • the file or path Fid field for processing the request is a path for identifying the negotiation requested by the terminal device, so as to extend the storage path of the print file determined by the client.
  • the Fid field is empty by default, and can also be the last negotiation capability, or the print file storage path specified by the user. When the Fid field is the default empty field, the negotiation capability request message can be considered as having no limit size.
  • the requested information level is the priority level used to identify the request sent by the terminal device.
  • the terminal device receives the negotiation capability response message returned by the home gateway.
  • the negotiation Capability Reply message is used by the home gateway to reply to the print capability of the server.
  • the negotiation capability response message carries a first parameter value reflecting the printing capability of the home gateway. ⁇
  • the first parameter is used to identify the printing capability of the home gateway, and after receiving the negotiation capability request message, the home gateway determines its own remaining data capacity (ie, printing capability), and then uses the remaining data capacity as a reflection printing capability.
  • the first parameter value usually the Count field, is fed back to the terminal device through the negotiation capability response message.
  • the Count field in the Negotiation Capability Reply message can also be the current remaining capacity* configuration factor, which is configured by the user, such as 50%.
  • the terminal device determines, according to the negotiation capability response message, the printing capability of the home gateway.
  • the terminal device After receiving the negotiation capability response message, the terminal device determines the printing capability of the home gateway according to the first parameter value carried in the negotiation capability response message.
  • the first parameter value can directly use the current remaining capacity of the home gateway, or the current remaining capacity * the capacity after the configuration factor, which is usually a value, such as a capacity of 1M or 200k.
  • the terminal device divides the service content in the print request into at least one print file segment according to the printing capability of the home gateway.
  • the terminal device first encodes the service content in the print request by page, and acquires data and data size of the single page; and then connects the encoded service content according to the page, and accumulates the data in the connected page.
  • the size, the connected data is combined into at least one print file segment, and the data size of each of the print file segments does not exceed the data capacity corresponding to the first parameter value of the print capability of the home gateway.
  • the data size of the print file segment is sequentially increased according to the order of the print file segments.
  • the data size of the print file segment does not exceed the data capacity corresponding to the first parameter value
  • the data size of the print file segment is sequentially increased, the print file segment that is printed first is the smallest, and the subsequent print file segment is gradually increased.
  • the printing speed can be further increased.
  • the larger the print file segment the less the entire print file is transferred, which can reduce the transfer time of the entire print file (that is, the total time of printing).
  • the smaller the print file segment is the smaller the time required to transmit only the print file segment, the earlier the print file segment print time can be started, and the load of the home gateway can be reduced. Therefore, it is possible to shorten the total print time by appropriately adjusting the data size of the print file segment.
  • S106 may specifically include the following steps:
  • S1 061 The terminal device determines whether the number of the print file segments of the service content in the print request exceeds one. If yes, the process proceeds to S1 062, otherwise, the process proceeds to S 1063.
  • the terminal device sends the print file segments one by one to the home gateway for printing. Specifically, the terminal device sends one of the print file segments to the home gateway for printing. After receiving the print file segment, the home gateway can print according to the existing smb process: Open File -> Write File -> Close -> wr i te -> c lose ).
  • the terminal device sends the negotiation capability request message to the home gateway again, and receives the negotiation capability response message returned by the home gateway again, and performs the next negotiation printing, according to the The printing capability of the home gateway sends the next print file segment to the home gateway for printing, that is, S102 to S106 in FIG. 1 are repeatedly executed, and so on, until the entire print service content is printed.
  • the terminal device sends the print file segment to the home gateway for printing, and ends printing.
  • the home gateway After receiving the print file segment, the home gateway can print according to the existing smb process. After the home gateway prints the print file segment, the print is finished.
  • the negotiation capability response message received in S103 further carries a second parameter value, which is a Data field, reflecting a working state of the printer connected to the home gateway. Then, S103 further includes: determining an operating state of the printer according to the second parameter value. If the printer is in an idle state (STATUS_IDLE), dividing the service content in the print request into at least one print file segment according to the printing capability of the home gateway; if the printer is in a working state (STATUS-WORKING) If the printer is in the full-load working state ( STATUS_DI SK_FULL ) and the data capacity corresponding to the first parameter value is zero, indicating that the server space of the home gateway is insufficient, the printing is canceled and the resources are released.
  • STATUS_IDLE idle state
  • STATUS-WORKING full-load working state
  • STATUS_DI SK_FULL full-load working state
  • the method may further include: when the data of the single page is large, corresponding to the first parameter value of the printing capability of the home gateway.
  • the working status of the printer is determined according to the second parameter value in the negotiation capability response message. If the printer is in the idle state (STATUS_IDLE), the printing is canceled, and the resource is released; if the printer is in the working state (STATUS_WORKING) And entering the waiting delay state, and sending the negotiation capability request message to the home gateway again when the preset first waiting delay ends.
  • the first waiting delay can be configured according to the network conditions, or can be configured by the user, for example, using 5 Oms * entry times.
  • the method before the resending the negotiation capability request message to the home gateway, the method further includes:
  • the second waiting delay is to provide a certain processing time to the server of the home gateway.
  • the SAMBA server needs processing time to interact with the printer and send the print file to the printer. Therefore, when the next negotiation is performed, a certain waiting delay algorithm is added. For example, use: Print the data size of the file segment X (multiplied by) a certain delay.
  • the method further includes:
  • FIG. 4 is a flowchart of a home sharing printing method on the home gateway side according to the embodiment. As shown in FIG. 4, the home sharing printing method includes:
  • the home gateway When receiving the negotiation capability request message sent by the terminal device, the home gateway constructs the negotiation. — — Capability response message.
  • the negotiation capability response message carries a first parameter value reflecting the printing capability of the home gateway, which is usually a Count field.
  • the S201 specifically includes: when receiving the negotiation capability request message sent by the terminal device, the home gateway determines whether the print capability request message is limited in size, and if yes, statistics the remaining data capacity of the home gateway, and the The remaining data capacity is used as the first parameter value. Otherwise, the first parameter value is set to a preset first identifier, and the first identifier may be a preset value such as 0 or FFFF.
  • the F id field in the negotiation capability request packet sent by the terminal device is empty or less than or equal to 0, the remaining capacity in the default file transmission storage path is counted, and the remaining capacity in the statistics is filled in the Count field.
  • the home gateway statistics the specified Fid field correspondingly. The remaining data capacity in the file transfer storage path, and the remaining capacity counted as the first parameter value is filled in the Count field. If there is no remaining capacity, set the Count field to 0.
  • the Count field in the Negotiation Capability Reply message can also be the current remaining capacity * configuration factor, which is configured by the user, such as 50%.
  • the negotiation capability response message further carries a second parameter value, which is a Sta tus field, that reflects a working state of the printer connected to the home gateway.
  • the method further includes:
  • the second parameter value is set to the identifier of the working state, that is, STATUS-WORKING; otherwise the second The parameter value is set to the identifier in the idle state, that is, STATUS_IDLE; when the remaining data capacity is zero, the server space of the home gateway is insufficient, and the second parameter value is set.
  • STATUS_IDLE the identifier in the idle state
  • the first parameter value and the second parameter value are fed back to the terminal device by using the negotiation capability response message.
  • S202. Receive a print file segment that is sent by the terminal device according to the printing capability of the home gateway, and divide the service content in the print request into at least one print file segment, and control the printer to print the received print file segment.
  • the home gateway After receiving the first print file segment, the home gateway can print according to the existing smb process: open file -> write file -> close file (open -> wr i te -> c lose ).
  • the server of the home gateway When receiving the print file segment, the server of the home gateway is stored in the corresponding file transfer storage path. After the completion of the receiving, the print file segment is sent to the printer, and the task is cleared. Further, S201 to S202 are repeated to print the next print file segment.
  • the home sharing printing method provided by the embodiment of the invention can solve the problem that the network print sharing device such as the home gateway has limited memory, supports large file printing, reduces the resource occupation of the printing sharing device, shortens the printing time, and avoids abnormality of the gateway device. .
  • FIG. 5 is a schematic structural diagram of a terminal device according to the embodiment.
  • the terminal device of the present invention includes: a transceiver module 401 and a processing module 402.
  • the transceiver module 401 is configured to receive a print request, and when receiving the print request, send a negotiation capability request message to the home gateway, and receive a negotiation capability response message returned by the home gateway.
  • a print request is initiated by the terminal device (ie, the client).
  • the transceiver module 401 of the terminal device Upon receiving the print request, the transceiver module 401 of the terminal device sends a negotiation capability request message to the home gateway.
  • the negotiation capability request message is used for the transmission storage capability of the server that the terminal device requests the home gateway.
  • the negotiation capability request message may include: information of a plurality of fields such as a file or a path Fid that processes the request, a requested information level, and the like.
  • the file or path Fid field for processing the request is a path for identifying the negotiation requested by the terminal device, so as to extend the storage path of the print file determined by the client.
  • the Fid field is empty by default, and can also be the last negotiation capability, or the print file storage path specified by the user. When the Fid field is the default empty field, the negotiation capability request message can be considered as having no limit size.
  • the requested information level is a priority level used to identify the request sent by the terminal device.
  • the Negotiation Capability Reply message is used by the home gateway to reply to the print capability of the server.
  • the Negotiation Capability Reply message carries a first parameter value reflecting the printing capability of the home gateway. ⁇
  • the first parameter is used to identify the printing capability of the home gateway, and after receiving the negotiation capability request message, the home gateway determines its own remaining data capacity (ie, printing capability), and then uses the remaining data capacity as a reflection printing capability.
  • the first parameter value usually the Count field, is fed back to the terminal device through the negotiation capability response message.
  • the Count field in the Negotiation Capability Reply message can also be the current remaining capacity * configuration factor, which is configured by the user, such as 50%.
  • the processing module 402 is configured to determine, according to the negotiation capability response message received by the transceiver module 401, the printing capability of the home gateway, and according to the printing capability of the home gateway, the print request received by the transceiver module 401
  • the business content is divided into at least one print file segment, and one of the print file segments is sequentially sent to the home gateway for printing by the transceiver module 401.
  • the processing module 402 determines the printing capability of the home gateway according to the first parameter value carried in the negotiation capability response message.
  • the first parameter value can directly use the current remaining capacity of the home gateway, or the capacity of the current remaining capacity * configuration factor, which is usually a value, such as a capacity of 1M or 200k.
  • the processing module 402 is configured to encode the service content in the print request received by the transceiver module 401 by a page, and obtain a single page of data and data size; and, the encoding After the business content is connected by page, accumulate the size of the data in the connected page, will - the connected data is combined into at least one print file segment, and the size of the data of each of the print file segments does not exceed the data capacity corresponding to the first parameter value of the print capability of the home gateway.
  • the data size of the print file segment divided by the processing module 402 is sequentially increased according to the order of the print file segments.
  • the data size of the print file segment is sequentially increased, the print file segment that is printed first is the smallest, and the subsequent print file segment is gradually increased.
  • the printing speed can be further increased.
  • the larger the print file segment the less the entire print file is transferred, which reduces the transfer time of the entire print file (that is, the total print time).
  • the number of print file segments is small, the smaller the time required to transmit only the print file segment, the time for printing the print file segment can be started in advance, and the load of the home gateway is reduced. Therefore, it is possible to shorten the total print time by appropriately adjusting the data size of the print file segment.
  • the processing module 402 sends the print file segment to the home gateway through the transceiver module 401 for printing.
  • the processing module 402 first determines whether the number of the print file segments of the service content in the print request exceeds one, and if yes, sends the print file segments one by one to the home gateway for printing; otherwise The print file segment is sent to the home gateway for printing, and the printing is ended.
  • the processing module 402 is configured to send the print file segments one by one to the home gateway for printing, and specifically includes: sending a print file segment to the home gateway for printing. After receiving the first print file segment, the home gateway can print according to the existing smb process: open file -> write file -> close file (open -> wr i te -> c los e ) .
  • the processing module 402 sends the negotiation capability request message to the home gateway through the transceiver module 401, and receives the negotiation capability response message returned by the home gateway again, and performs the next negotiation printing. And sending the next print file segment to the home gateway for printing according to the printing capability of the home gateway, and so on, until the entire print service content is printed.
  • the negotiation capability response message received by the transceiver module 401 further carries a second parameter value, which is a Status field, reflecting a working state of the printer connected to the home gateway.
  • the processing module 402 is further configured to determine an operating state of the printer according to the second parameter value. If the printer is in an idle state (STATUS_IDLE), dividing the service content in the print request into at least one print file segment according to the printing capability of the home gateway; if the printer is in a working state (STATUS-WORKING) And enter the waiting delay state; if the printer is in the full load working state (STATUS_DI SK_FULL ) and the data capacity corresponding to the first parameter value is zero, the printing is canceled, and the resource is released.
  • STATUS_IDLE idle state
  • STATUS-WORKING a working state
  • STATUS-WORKING full load working state
  • STATUS_DI SK_FULL full load working state
  • the processing module 402 is further configured to: when the data size of the single page exceeds the data capacity corresponding to the first parameter value of the printing capability of the home gateway, Determining the working state of the printer according to the second parameter value in the negotiation capability response message, canceling printing if the printer is in an idle state (STATUS_IDLE); if the printer is in a working state (STATUS-WORK ING), And entering the waiting delay state, and sending the negotiation capability request message to the home gateway again when the preset first waiting delay ends.
  • the first waiting delay can be configured according to the network conditions, or can be configured by the user, for example, using 50ms * number of entries.
  • the processing module 402 is further configured to determine whether the time distance of sending the negotiation capability request message to the home gateway is exceeded. a preset second waiting delay. If yes, the negotiation capability request message is sent again through the transceiver module; otherwise, the waiting delay state is entered.
  • the second waiting delay is to provide a certain processing time to the server of the home gateway.
  • the SAMBA server needs processing time to interact with the printer and send the print file to the printer. Therefore, when the next negotiation is performed, a certain waiting delay algorithm is added. For example, use: Print the data size of the file segment X (multiplied by) a certain delay.
  • the processing module 402 After the processing module 402 receives the negotiation capability response message returned by the home gateway, the processing module 402 is further configured to re-determine the printing capability of the home gateway according to the re-received negotiation capability response message. When the printing capability of the home gateway changes, the print file segment of the business content in the print request is adjusted.
  • FIG. 6 is a schematic structural diagram of a home gateway of a printing device according to the embodiment.
  • the home gateway of the present invention includes: a transceiver 501 and a processor 502.
  • the transceiver 501 is configured to receive a negotiation capability request message sent by the terminal device.
  • the processor 502 is configured to construct a negotiation capability response message when the transceiver 501 receives the print capability request message.
  • the negotiation capability response message carries a first parameter value reflecting the printing capability of the home gateway, which is usually a Count field.
  • the processor 502 is specifically configured to: when the transceiver 501 receives the negotiation capability request message, determine whether the print capability request message is limited in size, and if yes, count the remaining data capacity of the home gateway, and The remaining data capacity is used as the first parameter value. Otherwise, the first parameter value is set to a preset first identifier, and the first identifier may be a preset value such as 0 or FFFF.
  • the processor 502 counts the remaining capacity in the default file transmission storage path, and fills the remaining capacity in the Count field.
  • the processor 502 collects the specified F.
  • the remaining data capacity in the file transfer storage path corresponding to the id field, and the remaining capacity as the first parameter value is filled in the Count field. If there is no remaining capacity, set the Count field to 0.
  • the Count field in the negotiation capability response message may also be — — The current remaining capacity* configuration factor, which is configured by the user, such as 50%.
  • the transceiver 501 is further configured to receive a print file segment that is sent by the terminal device after the service content in the print request is divided into at least one print file segment according to the printing capability in the negotiation capability response message.
  • the processor 502 is further configured to control the printer to print the received segment of the print file after the transceiver 501 receives the segment of the print file.
  • the transceiver 501 After receiving the first print file segment, the transceiver 501 can follow the existing smb process: open the file -> write file -> close the file (open -> wr i te -> c lose ) The process prints.
  • the processor 502 stores the corresponding file transfer storage path.
  • the processor 502 sends the print file segment to the printer by using the transceiver 501, and clears the task. By analogy, the next print file segment is printed.
  • the negotiation capability response message constructed by the processor 502 further carries a second parameter value, which is a Data field, reflecting a working state of the printer connected to the home gateway.
  • the processor 502 is further configured to: when the remaining data capacity is not zero, determine whether there is a file being printed, and if so, the first The second parameter value is set to the identifier of the working state, that is, STATUS-WORKING; otherwise, the second parameter value is set to the identifier of the idle state, that is, STATUS_IDLE; and, when the remaining data capacity is zero , indicating that the server space of the home gateway is insufficient, and setting the second parameter value to the identifier of the full-load working state, that is, STATUS_DI SK_FULL.
  • the processor 502 uses the transceiver 501 to feed back the first parameter value and the second parameter value to the terminal device through the negotiation capability response message.
  • the home sharing printing method and device provided by the invention can solve the problem that the network print sharing device such as the home gateway has limited memory, supports large file printing, reduces the resource occupation of the printing sharing device, shortens the printing time, and avoids abnormality of the gateway device.
  • the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software or a combination of both, in order to clearly illustrate the hardware and
  • the interchangeability of the software has been generally described in terms of the composition and steps of the examples in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
  • RAM random access memory
  • ROM read only memory
  • electrically programmable ROM electrically erasable programmable ROM
  • registers hard disk, removable disk, CD-ROM, or any other form of storage known in the art. In the medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

Related to are a method and device for sharing printing within a family. The method comprises: when receiving a printing request, a terminal device sending a negotiation capability request message to a home gateway; receiving a negotiation capability response message returned by the home gateway, and according to the negotiation capability response message, determining the printing capability of the home gateway; and according to the printing capability of the home gateway, dividing service contents in the printing request into at least one printing file segment, and sending the printing file segment to the home gateway for printing. Therefore, in the case where the memory is limited, the present invention supports the printing of large files, thereby preventing a gateway device from being in an abnormal condition, reducing the occupancy of resources of a printing sharing device, and shortening the printing time.

Description

一 一 家庭共享打印方法及装置  Home sharing printing method and device
本申请要求于 2013 年 08 月 09 日提交中国专利局、 申请号为 201310347302. 发明名称为 "家庭共享打印方法及装置 "的中国专利申请的 优先权, 其全部内容通过引用包含于本申请中。 技术领域 The present application claims priority to Chinese Patent Application No. 201310347302, the entire disclosure of which is hereby incorporated by reference. Technical field
本发明涉及共享打印技术领域, 尤其涉及一种家庭共享打印方法及装置。  The present invention relates to the field of shared printing technologies, and in particular, to a home sharing printing method and apparatus.
背景技术 Background technique
家庭网关支持通用串行总线 (Universal Serial Bus, USB)打印功能, 可实现家庭内部的打印服务共享, 家庭网络设备均可以通过家庭网关连接的 USB打印机, 进行文件或图片的打印。  The home gateway supports the Universal Serial Bus (USB) printing function, which enables sharing of print services within the home. Home network devices can print files or pictures through a USB printer connected to the home gateway.
SAMBA是在操作系统 Linux或 UNIX上实现月良务信息块( Server Message Block, SMB)协议的一个软件, 由服务器及客户端程序构成。 SAMBA服务器的 角色是共享打印机, 通告网络用户打印机的存在和名称, 以及应答 PC打印信 息, 并传递打印内容给通用 UNIX打印系统 ( Common UNIX Printing System, CUPS), 达到三方交互。 在此过程中, 打印文件作为一个完整的任务, 通过 SMB 协议传输到网关上, 整个文件传输完成后, SAMBA服务器通过 CUPS指令进行 文件打印。  SAMBA is a software that implements the Server Message Block (SMB) protocol on the operating system Linux or UNIX. It consists of a server and a client program. The role of the SAMBA server is to share the printer, notify the presence and name of the network user's printer, and answer the PC print information, and deliver the print content to the Common UNIX Printing System (CUPS) for three-way interaction. In this process, the print file is transmitted to the gateway as a complete task through the SMB protocol. After the entire file transfer is completed, the SAMBA server prints the file through the CUPS command.
然而, 由于家庭网关与个人计算机 (Personal Computer, PC) 等不同, 其内存(緩存空间)受限, 当打印的文件大小超过网关设备所能承受的内存要 求时, 会导致网关设备出现异常, 从而影响网关设备的正常使用, 严重的甚至 导致网关死机。 - - 发明内容 However, since the home gateway is different from a personal computer (PC), its memory (cache space) is limited. When the size of the printed file exceeds the memory requirement of the gateway device, the gateway device may be abnormal. Affect the normal use of the gateway device, and even cause the gateway to crash. - - Invention content
提供一种家庭共享打印方法及装置, 在内存受限的情况下, 支持大文件 的打印, 避免网关设备出现异常, 降低打印共享设备的资源占用, 缩短打印时 间。  The invention provides a home sharing printing method and device, which supports large file printing in case of limited memory, avoids abnormality of the gateway device, reduces resource occupation of the printing sharing device, and shortens printing time.
第一方面提供了一种家庭共享打印方法, 所述方法包括:  The first aspect provides a home sharing printing method, the method comprising:
当接收到打印请求时, 终端设备发送协商能力请求报文至家庭网关; 接收所述家庭网关返回的协商能力应答报文, 并根据所述协商能力应答 报文, 确定所述家庭网关的打印能力;  Receiving the print request, the terminal device sends the negotiation capability request message to the home gateway; receiving the negotiation capability response message returned by the home gateway, and determining the printing capability of the home gateway according to the negotiation capability response message ;
根据所述家庭网关的打印能力, 将所述打印请求中的业务内容分成至少 一个打印文件段, 并将所述打印文件段逐个发送至所述家庭网关进行打印。  And dividing the service content in the print request into at least one print file segment according to the printing capability of the home gateway, and sending the print file segments one by one to the home gateway for printing.
结合第一方面, 在第一方面的第一种可能的实施方式中, 所述协商能力 应答报文中携带有反映所述家庭网关的打印能力的第一参数值;  With reference to the first aspect, in a first possible implementation manner of the first aspect, the negotiation capability response packet carries a first parameter value that reflects a printing capability of the home gateway;
所述根据所述协商能力应答报文, 确定所述家庭网关的打印能力, 具体 为:  Determining, according to the negotiation capability response message, the printing capability of the home gateway, specifically:
根据所述协商能力应答报文中的所述第一参数值, 确定所述家庭网关的 打印能力。  Determining, according to the first parameter value in the negotiation capability response message, the printing capability of the home gateway.
结合第一方面, 在第一方面的第二种可能的实施方式中, 所述根据所述 家庭网关的打印能力,将所述打印请求中的业务内容分成至少一个打印文件段 , 具体包括:  With reference to the first aspect, in a second possible implementation manner of the first aspect, the determining, according to the printing capability of the home gateway, the service content in the print request is divided into at least one print file segment, specifically:
将所述打印请求中的业务内容按页编码, 并获取单页的数据和数据大小; 将所述编码后的业务内容按页连接, 累加所连接的页中的数据大小, 将 所连接的数据组合成一个打印文件段,并使每一个所述打印文件段的数据的大 'J、不超过所述家庭网关的打印能力的第一参数值对应的数据容量。  And encoding the service content in the print request by page, and acquiring the data and data size of the single page; connecting the encoded business content according to the page, accumulating the data size in the connected page, and connecting the connected data Combining a print file segment and making the data of each of the print file segments large, not exceeding the data capacity corresponding to the first parameter value of the print capability of the home gateway.
结合第一方面的第二种可能的实施方式, 在第一方面的第三种可能的实 - - 施方式中,所述协商能力应答报文中还携带有反映与所述家庭网关相连接的打 印机工作状态的第二参数值; In conjunction with the second possible implementation of the first aspect, the third possible implementation in the first aspect In the method, the negotiation capability response message further carries a second parameter value reflecting a working state of the printer connected to the home gateway;
所述根据所述协商能力应答报文, 确定所述家庭网关的打印能力, 还包 括:  Determining, according to the negotiation capability response message, the printing capability of the home gateway, further comprising:
根据所述第二参数值确定所述打印机的工作状态;  Determining an operating state of the printer according to the second parameter value;
如果所述打印机处于空闲状态, 则根据所述家庭网关的打印能力, 将所 述打印请求中的业务内容分成至少一个打印文件段;  If the printer is in an idle state, dividing the service content in the print request into at least one print file segment according to the printing capability of the home gateway;
如果所述打印机处于工作状态, 则进入等待延时状态;  If the printer is in an active state, enter a wait delay state;
如果所述打印机处于满负荷工作状态且所述第一参数值对应的数据容量 为零, 则取消打印。  If the printer is in a full load operation state and the data capacity corresponding to the first parameter value is zero, the printing is canceled.
结合第一方面的第三种可能的实施方式, 在第一方面的第四种可能的实 施方式中, 在所述获取单页的数据和数据大小之后, 还包括:  In conjunction with the third possible implementation of the first aspect, in the fourth possible implementation manner of the first aspect, after the acquiring the data and data size of the single page, the method further includes:
当所述单页的数据大 d、超过所述家庭网关的打印能力的第一参数值对应 的数据容量时,根据所述协商能力应答报文中的第二参数值判断所述打印机的 工作状态, 如果打印机处于空闲状态时, 取消打印; 如果打印机处于工作状态 时, 则进入等待延时状态, 并在预设的第一等待时延结束时, 再次发送所述协 商能力请求报文至所述家庭网关。  When the data of the single page is larger than the data capacity corresponding to the first parameter value of the printing capability of the home gateway, determining the working state of the printer according to the second parameter value in the negotiation capability response message If the printer is in an idle state, cancel printing; if the printer is in the working state, enter a waiting delay state, and when the preset first waiting delay ends, send the negotiation capability request message to the Home gateway.
结合第一方面的第二种可能的实施方式, 在第一方面的第五种可能的实 施方式中, 所述打印文件段的数据大小根据所述打印文件段的顺序依次递增。  In conjunction with the second possible implementation of the first aspect, in a fifth possible implementation of the first aspect, the data size of the print file segment is sequentially incremented according to the order of the print file segments.
结合第一方面, 在第一方面的第六种可能的实施方式中, 所述将所述打 印文件段逐个发送至所述家庭网关进行打印, 具体包括:  With reference to the first aspect, in a sixth possible implementation manner of the first aspect, the sending, by the sending, the printing file segment to the home gateway for printing, specifically includes:
判断所述打印请求中的业务内容的所述打印文件段的个数是否超过一个, 如果是, 将所述打印文件段逐个发送至所述家庭网关进行打印; 如果否, 则将 所述打印文件段发送至所述家庭网关进行打印。 一 一 结合第一方面的第六种可能的实施方式, 在第一方面的第七种可能的实 施方式中, 所述将所述打印文件段逐个发送至所述家庭网关进行打印, 具体包 括: Determining whether the number of the print file segments of the service content in the print request exceeds one, and if yes, sending the print file segments one by one to the home gateway for printing; if not, the print file is The segment is sent to the home gateway for printing. With the sixth possible implementation of the first aspect, in a seventh possible implementation manner of the first aspect, the sending, by the sending, the print file segment to the home gateway for printing, specifically includes:
发送一个所述打印文件段至所述家庭网关进行打印;  Sending one of the print file segments to the home gateway for printing;
当所述打印文件段打印完毕时, 再次发送协商能力请求报文至所述家庭 网关, 并再次接收所述家庭网关返回的协商能力应答报文, 进行下一个所述打 印文件段的协商打印。  When the print file segment is printed, the negotiation capability request message is sent to the home gateway again, and the negotiation capability response message returned by the home gateway is received again, and the next printing of the print file segment is performed.
结合第一方面的第七种可能的实施方式, 在第一方面的第八种可能的实 施方式中, 在所述再次发送协商能力请求报文至所述家庭网关之前, 还包括: 判断上一次发送所述协商能力请求报文至所述家庭网关的时间距离是否 超过预设的第二等待时延, 如果是, 则再次发送协商能力请求报文; 否则, 进 入等待延时的状态。  With reference to the seventh possible implementation manner of the first aspect, in an eighth possible implementation manner of the first aspect, before the resending the negotiation capability request message to the home gateway, the method further includes: determining the last time Whether the time distance of sending the negotiation capability request message to the home gateway exceeds a preset second waiting delay, and if yes, sending the negotiation capability request message again; otherwise, entering a waiting delay state.
结合第一方面的第七种可能的实施方式, 在第一方面的第九种可能的实 施方式中, 在所述再次接收所述家庭网关返回的协商能力应答报文之后,还包 括:  With reference to the seventh possible implementation manner of the first aspect, in a ninth possible implementation manner of the first aspect, after the receiving the negotiation capability response message returned by the home gateway, the method further includes:
根据所述再次接收的协商能力应答报文, 重新确定所述家庭网关的打印 能力, 当所述家庭网关的打印能力有变化时,调整所述打印请求中的业务内容 的打印文件段。  And determining, according to the re-received negotiation capability response message, the printing capability of the home gateway, and when the printing capability of the home gateway changes, adjusting a print file segment of the service content in the print request.
第二方面, 还提供了一种家庭共享打印方法, 所述方法包括:  In a second aspect, a home sharing printing method is further provided, where the method includes:
当接收终端设备发送的协商能力请求报文时, 家庭网关构造协商能力应 答报文,所述协商能力应答报文中携带有反映所述家庭网关的打印能力的第一 参数值;  When receiving the negotiation capability request message sent by the terminal device, the home gateway constructs a negotiation capability response message, where the negotiation capability response message carries a first parameter value reflecting the printing capability of the home gateway;
接收所述终端设备根据所述家庭网关的打印能力将打印请求中的业务内 容分成至少一个打印文件段后发送的打印文件段,并控制打印机打印接收到的 所述打印文件段。 Receiving, by the terminal device, the service content in the print request is divided into the print file segments sent after the at least one print file segment according to the printing capability of the home gateway, and controlling the printer to print the received The print file segment.
结合第二方面, 在第二方面的第一种可能的实施方式中, 所述当接收终 端设备发送的协商能力请求报文时, 家庭网关构造协商能力应答报文, 具体包 括:  With reference to the second aspect, in a first possible implementation manner of the second aspect, the receiving, by the terminal device, the negotiation capability response packet, when the terminal device sends the negotiation capability request packet, specifically includes:
当接收终端设备发送的协商能力请求报文时, 所述家庭网关判断所述打 印能力请求报文是否限制大小, 如果是, 统计所述家庭网关剩余的数据容量, 并将所述剩余的数据容量作为所述第一参数值, 否则,将所述第一参数值设置 为预设的第一标识。  When receiving the negotiation capability request message sent by the terminal device, the home gateway determines whether the print capability request message is limited in size, and if so, statistics the remaining data capacity of the home gateway, and the remaining data capacity As the first parameter value, otherwise, the first parameter value is set as a preset first identifier.
结合第二方面的第一种可能的实施方式, 在第二方面的第二种可能的实 施方式中,所述协商能力应答报文中还携带有反映与所述家庭网关相连接的打 印机工作状态的第二参数值;  With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the negotiation capability response packet further carries a printer working status that is connected to the home gateway. Second parameter value;
在将所述剩余的数据容量作为所述第一参数值之后, 还包括:  After the remaining data capacity is used as the first parameter value, the method further includes:
当所述剩余的数据容量不为零时,判断是否有正在打印的文件,如果有, 将所述第二参数值设置为处于工作状态的标识;否则将所述第二参数值设置为 处于空闲状态的标识;  When the remaining data capacity is not zero, it is determined whether there is a file being printed, and if so, the second parameter value is set to an identifier that is in an active state; otherwise, the second parameter value is set to be idle. The identity of the state;
当所述剩余的数据容量为零时, 将所述第二参数值设置为处于满负荷工 作状态的标识。  When the remaining data capacity is zero, the second parameter value is set to an identifier at a full load operating state.
第三方面, 还提供了一种终端设备, 所述终端设备包括:  In a third aspect, a terminal device is further provided, where the terminal device includes:
收发模块, 用于接收打印请求, 当接收到所述打印请求时, 发送协商能 力请求报文至家庭网关, 并接收所述家庭网关返回的协商能力应答报文;  a transceiver module, configured to receive a print request, and when receiving the print request, send a negotiation capability request message to the home gateway, and receive a negotiation capability response message returned by the home gateway;
处理模块, 用于根据所述收发模块接收到的所述协商能力应答报文, 确 定所述家庭网关的打印能力,根据所述家庭网关的打印能力,将所述收发模块 接收到的所述打印请求中的业务内容分成至少一个打印文件段,并通过所述收 发模块将所述打印文件段逐个发送至所述家庭网关进行打印。 — — 结合第三方面, 在第三方面的第一种可能的实施方式中, 所述协商能力 应答报文中携带有反映所述家庭网关的打印能力的第一参数值; a processing module, configured to determine, according to the negotiation capability response message received by the transceiver module, the printing capability of the home gateway, and the printing received by the transceiver module according to the printing capability of the home gateway The service content in the request is divided into at least one print file segment, and the print file segments are sent to the home gateway one by one through the transceiver module for printing. In combination with the third aspect, in a first possible implementation manner of the third aspect, the negotiation capability response packet carries a first parameter value that reflects a printing capability of the home gateway;
所述处理模块具体用于根据所述协商能力应答报文中的所述第一参数值, 确定所述家庭网关的打印能力。  The processing module is specifically configured to determine a printing capability of the home gateway according to the first parameter value in the negotiation capability response message.
结合第三方面, 在第三方面的第二种可能的实施方式中, 所述处理模块 具体用于将所述收发模块接收到的所述打印请求中的业务内容按页编码,并获 取单页的数据和数据大小; 以及, 将所述编码后的业务内容按页连接, 累加所 连接的页中的数据大小,将所连接的数据组合成一个打印文件段, 并使每一个 所述打印文件段的数据的大小不超过所述家庭网关的打印能力的第一参数值 对应的数据容量。  With reference to the third aspect, in a second possible implementation manner of the third aspect, the processing module is specifically configured to code the service content in the print request received by the transceiver module by a page, and obtain a single page Data and data size; and, the encoded business content is connected by page, accumulating the data size in the connected page, combining the connected data into one print file segment, and making each of the print files The size of the data of the segment does not exceed the data capacity corresponding to the first parameter value of the printing capability of the home gateway.
结合第三方面的第二种可能的实施方式, 在第三方面的第三种可能的实 施方式中,所述收发模块接收的所述协商能力应答报文中还携带有反映与所述 家庭网关相连接的打印机工作状态的第二参数值;  With reference to the second possible implementation manner of the third aspect, in a third possible implementation manner of the third aspect, the negotiation capability response packet received by the transceiver module further carries a reflection and the home gateway a second parameter value of the connected printer operating state;
所述处理模块还用于根据所述第二参数值确定所述打印机的工作状态; 如果所述打印机处于空闲状态, 则根据所述家庭网关的打印能力, 将所 述打印请求中的业务内容分成至少一个打印文件段;  The processing module is further configured to determine an operating state of the printer according to the second parameter value; if the printer is in an idle state, divide the service content in the print request according to the printing capability of the home gateway At least one print file segment;
如果所述打印机处于工作状态, 则进入等待延时状态;  If the printer is in an active state, enter a wait delay state;
如果所述打印机处于满负荷工作状态且所述第一参数值对应的数据容量 为零, 则取消打印。  If the printer is in a full load operation state and the data capacity corresponding to the first parameter value is zero, the printing is canceled.
结合第三方面的第三种可能的实施方式, 在第三方面的第四种可能的实 施方式中,所述处理模块还用于当所述单页的数据大小超过所述家庭网关的打 印能力的第一参数值对应的数据容量时,根据所述协商能力应答报文中的第二 参数值判断所述打印机的工作状态, 如果打印机处于空闲状态时, 取消打印; 如果打印机处于工作状态时, 则进入等待延时状态, 并在预设的第一等待时延 结束时, 再次发送所述协商能力请求报文至所述家庭网关。 With reference to the third possible implementation manner of the third aspect, in a fourth possible implementation manner of the third aspect, the processing module is further configured to: when the data size of the single page exceeds the printing capability of the home gateway When the first parameter value corresponds to the data capacity, the working state of the printer is determined according to the second parameter value in the negotiation capability response message, and if the printer is in the idle state, canceling printing; if the printer is in the working state, Then enter the wait delay state and preset the first waiting delay At the end, the negotiation capability request message is sent to the home gateway again.
结合第三方面的第二种可能的实施方式, 在第三方面的第五种可能的实 施方式中,所述处理模块分成的所述打印文件段的数据大小根据所述打印文件 段的顺序依次递增。  With reference to the second possible implementation manner of the third aspect, in a fifth possible implementation manner of the third aspect, the data size of the print file segment divided by the processing module is sequentially performed according to the sequence of the print file segment Increment.
结合第三方面, 在第三方面的第六种可能的实施方式中, 所述处理模块 用于将所述打印文件段发送至所述家庭网关进行打印,具体包括用于判断所述 打印请求中的业务内容的所述打印文件段的个数是否超过一个,如果是,将所 述打印文件段逐个发送至所述家庭网关进行打印; 如果否, 则将所述打印文件 段发送至所述家庭网关进行打印。  With reference to the third aspect, in a sixth possible implementation manner of the third aspect, the processing module is configured to send the print file segment to the home gateway for printing, and specifically includes determining, in the print request, Whether the number of the print file segments of the business content exceeds one, and if so, the print file segments are sent one by one to the home gateway for printing; if not, the print file segments are sent to the family The gateway prints.
结合第三方面的第六种可能的实施方式, 在第三方面的第七种可能的实 施方式中,所述处理模块用于将所述打印文件段逐个发送至所述家庭网关进行 打印,具体包括用于通过所述收发模块发送一个所述打印文件段至所述家庭网 关进行打印; 当所述打印文件段打印完毕时,再次通过所述收发模块发送协商 能力请求报文至所述家庭网关,并再次接收所述家庭网关返回的协商能力应答 报文, 进行下一个所述打印文件段的协商打印。  With reference to the sixth possible implementation manner of the third aspect, in a seventh possible implementation manner of the third aspect, the processing module is configured to send the print file segments one by one to the home gateway for printing, specifically Including the sending, by the transceiver module, one of the print file segments to the home gateway for printing; when the print file segment is printed, sending the negotiation capability request message to the home gateway through the transceiver module again. And receiving the negotiation capability response message returned by the home gateway again, and performing negotiation printing of the next print file segment.
结合第三方面的第七种可能的实施方式, 在第三方面的第八种可能的实 施方式中 ,所述处理模块在再次通过所述收发模块发送协商能力请求报文至所 述家庭网关之前,还用于判断上一次发送所述协商能力请求报文至所述家庭网 关的时间距离是否超过预设的第二等待时延,如果是, 则再次通过所述收发模 块发送协商能力请求报文; 否则, 进入等待延时的状态。  With reference to the seventh possible implementation manner of the third aspect, in an eighth possible implementation manner of the third aspect, before the processing module sends the negotiation capability request packet to the home gateway by using the transceiver module again And determining whether the time distance of the last time the negotiation capability request message is sent to the home gateway exceeds a preset second waiting delay, and if yes, sending the negotiation capability request message through the transceiver module again. ; Otherwise, enter the state of waiting for delay.
结合第三方面的第七种可能的实施方式, 在第三方面的第九种可能的实 施方式中,所述处理模块在再次接收所述家庭网关返回的协商能力应答报文之 后,还用于根据所述再次接收的协商能力应答报文, 重新确定所述家庭网关的 打印能力, 当所述家庭网关的打印能力有变化时,调整所述打印请求中的业务 — — 内容的打印文件段。 With reference to the seventh possible implementation manner of the third aspect, in a ninth possible implementation manner of the third aspect, the processing module is further used after receiving the negotiation capability response message returned by the home gateway again Re-determining the printing capability of the home gateway according to the re-received negotiation capability response message, and adjusting the service in the print request when the printing capability of the home gateway changes — — The print file segment of the content.
第四方面, 还提供了一种打印设备的家庭网关, 所述家庭网关包括: 收发器, 用于接收终端设备发送的协商能力请求报文;  The fourth aspect, further provides a home gateway of the printing device, where the home gateway includes: a transceiver, configured to receive a negotiation capability request message sent by the terminal device;
处理器, 用于当所述收发器接收到所述打印能力请求报文时, 构造协商 能力应答报文,所述协商能力应答报文中携带有反映所述家庭网关的打印能力 的第一参数值;  a processor, configured to: when the transceiver receives the print capability request message, construct a negotiation capability response message, where the negotiation capability response message carries a first parameter that reflects a printing capability of the home gateway Value
所述收发器还用于接收所述终端设备根据所述协商能力应答报文中的打 印能力将打印请求中的业务内容分成至少一个打印文件段后发送的打印文件 段;  The transceiver is further configured to receive a print file segment that is sent by the terminal device after the service content in the print request is divided into at least one print file segment according to the printing capability in the negotiation capability response message;
所述处理器还用于在所述收发器接收到所述打印文件段之后, 控制打印 机打印接收到的所述打印文件段。  The processor is further configured to control the printer to print the received segment of the print file after the transceiver receives the segment of the print file.
结合第四方面, 在第四方面的第一种可能的实施方式中, 所述处理器具 体用于当所述收发器接收到所述协商能力请求报文时,判断所述打印能力请求 报文是否限制大小, 如果是, 统计所述家庭网关剩余的数据容量, 并将所述剩 余的数据容量作为所述第一参数值, 否则,将所述第一参数值设置为预设的第 一标识。  With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, the processor is specifically configured to: when the transceiver receives the negotiation capability request packet, determine the print capability request packet Whether the size is limited, if yes, the remaining data capacity of the home gateway is counted, and the remaining data capacity is used as the first parameter value, otherwise, the first parameter value is set as a preset first identifier. .
结合第四方面的第一种可能的实施方式, 在第四方面的第二种可能的实 施方式中,所述处理器构造的所述协商能力应答报文中还携带有反映与所述家 庭网关相连接的打印机工作状态的第二参数值;  With reference to the first possible implementation manner of the fourth aspect, in a second possible implementation manner of the fourth aspect, the negotiation capability response packet configured by the processor further carries a reflection and the home gateway a second parameter value of the connected printer operating state;
所述处理器在在将所述剩余的数据容量作为所述第一参数值之后, 还用 于当所述剩余的数据容量不为零时, 判断是否有正在打印的文件, 如果有, 将 所述第二参数值设置为处于工作状态的标识;否则将所述第二参数值设置为处 于空闲状态的标识; 以及, 当所述剩余的数据容量为零时, 将所述第二参数值 设置为处于满负荷工作状态的标识。 - - 本发明提供的家庭共享打印方法及装置, 在内存受限类型设备如家庭网 关下, 支持大文件的打印, 避免网关设备出现异常, 降低打印共享设备的资源 占用, 缩短打印时间。 附图说明 After the processor uses the remaining data capacity as the first parameter value, it is further used to determine whether there is a file being printed when the remaining data capacity is not zero, and if so, Setting the second parameter value as an identifier in an active state; otherwise setting the second parameter value to an identifier in an idle state; and, when the remaining data capacity is zero, setting the second parameter value It is the identifier of the working state at full load. The home sharing printing method and device provided by the present invention support large file printing under a memory-limited type device such as a home gateway, avoiding abnormality of the gateway device, reducing resource occupation of the printing sharing device, and shortening printing time. DRAWINGS
为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例中所需 要使用的附图作简单地介绍,显而易见地, 下面描述中的附图仅仅是本发明的 一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings to be used in the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention, Those skilled in the art can also obtain other drawings based on these drawings without paying any creative work.
图 1为本发明实施例提供的家庭共享打印系统结构图;  1 is a structural diagram of a home sharing printing system according to an embodiment of the present invention;
图 2为本发明实施例一提供的家庭共享打印方法流程图;  2 is a flowchart of a home sharing printing method according to Embodiment 1 of the present invention;
图 3为图 2中 S 1 06的具体方法流程图;  3 is a flow chart of a specific method of S 1 06 in FIG. 2;
图 4为本发明实施例一提供的家庭共享打印方法流程图;  4 is a flowchart of a home sharing printing method according to Embodiment 1 of the present invention;
图 5为本发明实施例二提供的终端设备的结构示意图;  FIG. 5 is a schematic structural diagram of a terminal device according to Embodiment 2 of the present invention;
图 6为本发明实施例二提供的打印设备的家庭网关的结构示意图。 具体实施方式  FIG. 6 is a schematic structural diagram of a home gateway of a printing device according to Embodiment 2 of the present invention. detailed description
下面通过附图和实施例, 对本发明的技术方案做进一步的详细描述。 本发明实施例提供的家庭共享打印方法及装置, 可用于需要共享打印的 场合, 尤其适用于内存等配置受限的家庭网络中。 图 1是本发明实施例提供的 家庭共享打印系统结构图,如图 1所示, 该家庭共享打印系统包括依次连接的 终端设备 1、家庭网关 2和打印机 3。终端设备 1可以是 PC或者其他网络设备, 可与用户进行交互,接收用户发起的打印请求。 家庭网关 2可以是 SAMBA服务 器等, 一个家庭网关 2可与多个终端设备 1相连接,也可与多个打印机 3相连 接。一般来说, 家庭网关 2利用 SAMBA服务器与终端设备 1之间通过 SMB协议 — — 进行通信, 以传输打印请求中所需要打印的内容, 而利用 CUPS程序通过原始 ( RAW )数据报套接字协议或者远程行式打印机( l ine pr inter remote, LPR ) 等来向打印机发送文档。 The technical solution of the present invention will be further described in detail below through the accompanying drawings and embodiments. The home sharing printing method and apparatus provided by the embodiments of the present invention can be used in the case where sharing printing is required, and is particularly suitable for a home network with limited configuration such as memory. 1 is a structural diagram of a home sharing printing system according to an embodiment of the present invention. As shown in FIG. 1, the home sharing printing system includes a terminal device 1, a home gateway 2, and a printer 3 that are sequentially connected. The terminal device 1 may be a PC or other network device, and can interact with the user to receive a print request initiated by the user. The home gateway 2 may be a SAMBA server or the like, and a home gateway 2 may be connected to a plurality of terminal devices 1 or may be connected to a plurality of printers 3. In general, the home gateway 2 utilizes the SMB protocol between the SAMBA server and the terminal device 1. — Communicate to transfer the content that needs to be printed in the print request, and use the CUPS program to send the printer to the printer via the original (RAW) datagram socket protocol or l ine pr inter remote (LPR). Documentation.
实施例一  Embodiment 1
图 1 是本实施例提供的终端设备侧的家庭共享打印方法流程图, 如图 1 所示, 本发明的家庭共享打印方法包括:  1 is a flowchart of a home sharing printing method on a terminal device side provided by this embodiment. As shown in FIG. 1, the home sharing printing method of the present invention includes:
S10 终端设备接收打印请求, 当接收到打印请求时, 进入 S102。  The S10 terminal device receives the print request, and when receiving the print request, proceeds to S102.
S102、 终端设备发送协商能力请求报文至家庭网关。  S102. The terminal device sends a negotiation capability request message to the home gateway.
当用户有文件(文档或图片等)需要打印时, 通过终端设备 (即客户端) 发起打印请求。终端设备在接收到该打印请求时,发送协商能力请求报文至家 庭网关。  When the user has a file (document or picture, etc.) that needs to be printed, a print request is initiated by the terminal device (ie, the client). When receiving the print request, the terminal device sends a negotiation capability request message to the home gateway.
协商能力请求报文用于终端设备请求家庭网关的服务器的传输存储能力。 协商能力请求报文可以包括: 处理请求的文件或路径 Fid, 请求的信息级别等 多个字段的信息。其中, 处理请求的文件或路径 Fid字段是用于标识终端设备 所请求协商的路径, 以扩展由客户端决定打印文件的存储路径。 Fid字段默认 为空, 也可以为上次协商能力, 或者由用户指定的打印文件存储路径。 当 Fid 字段为默认的空字段时, 可以认为该协商能力请求报文没有限制大小。请求的 信息级别是用于标识终端设备发送的请求的优先级别。  The negotiation capability request message is used for the transmission storage capability of the server that the terminal device requests the home gateway. The negotiation capability request message may include: a file that processes the request or a path Fid, a requested information level, and the like. The file or path Fid field for processing the request is a path for identifying the negotiation requested by the terminal device, so as to extend the storage path of the print file determined by the client. The Fid field is empty by default, and can also be the last negotiation capability, or the print file storage path specified by the user. When the Fid field is the default empty field, the negotiation capability request message can be considered as having no limit size. The requested information level is the priority level used to identify the request sent by the terminal device.
S 103、 终端设备接收所述家庭网关返回的协商能力应答报文。  S103. The terminal device receives the negotiation capability response message returned by the home gateway.
协商能力应答报文用于家庭网关回复服务器的打印能力。 协商能力应答 报文中携带有反映所述家庭网关的打印能力的第一参数值。釆用第一参数来标 识家庭网关的打印能力, 家庭网关在接收到协商能力请求报文时, 确定其自身 所剩余的数据容量 (即打印能力 )之后, 将该剩余的数据容量作为反映打印能 力的第一参数值,通常为 Count字段,通过协商能力应答报文反馈给终端设备。 — — 当然, 为了达到保护资源的目的, 协商能力应答报文中 Count 字段也可 以为当前剩余容量 *配置因子, 该配置因子由用户进行配置, 如 50%。 The Negotiation Capability Reply message is used by the home gateway to reply to the print capability of the server. The negotiation capability response message carries a first parameter value reflecting the printing capability of the home gateway.第一 The first parameter is used to identify the printing capability of the home gateway, and after receiving the negotiation capability request message, the home gateway determines its own remaining data capacity (ie, printing capability), and then uses the remaining data capacity as a reflection printing capability. The first parameter value, usually the Count field, is fed back to the terminal device through the negotiation capability response message. – Of course, in order to achieve the purpose of protecting resources, the Count field in the Negotiation Capability Reply message can also be the current remaining capacity* configuration factor, which is configured by the user, such as 50%.
51 04、 终端设备根据所述协商能力应答报文, 确定所述家庭网关的打印 能力。  51. The terminal device determines, according to the negotiation capability response message, the printing capability of the home gateway.
终端设备在接收到协商能力应答报文后, 根据协商能力应答报文中携带 的第一参数值,确定家庭网关的打印能力。 第一参数值可以直接釆用家庭网关 的当前剩余容量, 也可以是当前剩余容量 *配置因子后的容量, 一般通常为数 值, 如 1M或 200k等的容量。  After receiving the negotiation capability response message, the terminal device determines the printing capability of the home gateway according to the first parameter value carried in the negotiation capability response message. The first parameter value can directly use the current remaining capacity of the home gateway, or the current remaining capacity * the capacity after the configuration factor, which is usually a value, such as a capacity of 1M or 200k.
51 05、 终端设备根据所述家庭网关的打印能力, 将所述打印请求中的业 务内容分成至少一个打印文件段。  51 05. The terminal device divides the service content in the print request into at least one print file segment according to the printing capability of the home gateway.
具体地, 终端设备先将所述打印请求中的业务内容按页编码, 并获取单 页的数据和数据大小; 再将所述编码后的业务内容按页连接, 累加所连接的页 中的数据大小,将所连接的数据组合成至少一个打印文件段, 并使每一个所述 打印文件段的数据大小不超过所述家庭网关的打印能力的第一参数值对应的 数据容量。  Specifically, the terminal device first encodes the service content in the print request by page, and acquires data and data size of the single page; and then connects the encoded service content according to the page, and accumulates the data in the connected page. The size, the connected data is combined into at least one print file segment, and the data size of each of the print file segments does not exceed the data capacity corresponding to the first parameter value of the print capability of the home gateway.
可选的, 所述打印文件段的数据大小根据所述打印文件段的顺序依次递 增。 在使打印文件段的数据大小不超过第一参数值对应的数据容量的前提下 , 使打印文件段的数据大小依次递增, 最先打印的打印文件段最小,后面的打印 文件段逐渐增大, 可以进一步提高打印速度。 打印文件段越大, 整个打印文件 传输的次数越少, 可以降低整个打印文件的传输时间 (即打印的总时间)。 而 当打印文件段越小时,仅传输该打印文件段所需的时间越小, 则可以提前开始 该打印文件段打印的时间, 降低家庭网关的负载。 因而, 合理地对打印文件段 的数据大小进行调整, 可以缩短打印总时间。  Optionally, the data size of the print file segment is sequentially increased according to the order of the print file segments. Under the premise that the data size of the print file segment does not exceed the data capacity corresponding to the first parameter value, the data size of the print file segment is sequentially increased, the print file segment that is printed first is the smallest, and the subsequent print file segment is gradually increased. The printing speed can be further increased. The larger the print file segment, the less the entire print file is transferred, which can reduce the transfer time of the entire print file (that is, the total time of printing). However, the smaller the print file segment is, the smaller the time required to transmit only the print file segment, the earlier the print file segment print time can be started, and the load of the home gateway can be reduced. Therefore, it is possible to shorten the total print time by appropriately adjusting the data size of the print file segment.
51 06、 终端设备将所述打印文件段发送至所述家庭网关进行打印。 — — 如图 3所示, S106可以具体包括以下步骤: 51 06. The terminal device sends the print file segment to the home gateway for printing. - As shown in Figure 3, S106 may specifically include the following steps:
S 1 061、 终端设备判断所述打印请求中的业务内容的所述打印文件段的个 数是否超过一个, 如果是, 进入 S1 062 , 否则进入 S 1063。  S1 061. The terminal device determines whether the number of the print file segments of the service content in the print request exceeds one. If yes, the process proceeds to S1 062, otherwise, the process proceeds to S 1063.
51 062、 终端设备将所述打印文件段逐个发送至所述家庭网关进行打印。 具体地, 终端设备发送一个所述打印文件段至所述家庭网关进行打印。 家庭网关在接收到一个所述打印文件段后, 可以按照现有的 smb流程: 打开文 件-〉写文件-〉关闭文件( open -〉 wr i te -〉 c lose ) 的流程进行打印。  51 062. The terminal device sends the print file segments one by one to the home gateway for printing. Specifically, the terminal device sends one of the print file segments to the home gateway for printing. After receiving the print file segment, the home gateway can print according to the existing smb process: Open File -> Write File -> Close -> wr i te -> c lose ).
当所述打印文件段打印完毕时, 终端设备再次发送协商能力请求报文至 所述家庭网关, 并再次接收所述家庭网关返回的协商能力应答报文, 进行下一 次协商打印, 以根据所述家庭网关的打印能力,将下一个所述打印文件段发送 至所述家庭网关进行打印, 即重复执行图 1 中的 S102 ~ S106 , 以此类推, 直 到整个打印业务内容打印完毕。  When the print file segment is printed, the terminal device sends the negotiation capability request message to the home gateway again, and receives the negotiation capability response message returned by the home gateway again, and performs the next negotiation printing, according to the The printing capability of the home gateway sends the next print file segment to the home gateway for printing, that is, S102 to S106 in FIG. 1 are repeatedly executed, and so on, until the entire print service content is printed.
51 063、 终端设备将所述打印文件段发送至所述家庭网关进行打印, 结束 打印。  51 063. The terminal device sends the print file segment to the home gateway for printing, and ends printing.
家庭网关在接收到一个所述打印文件段后, 可以按照现有的 smb 流程进 行打印。 在家庭网关打印完该打印文件段后, 结束打印。  After receiving the print file segment, the home gateway can print according to the existing smb process. After the home gateway prints the print file segment, the print is finished.
可选的, S103 中接收到的协商能力应答报文中还携带有反映与所述家庭 网关相连接的打印机工作状态的第二参数值, 通常为 S ta tus 字段。 则 S103 还包括: 根据所述第二参数值确定所述打印机的工作状态。如果所述打印机处 于空闲状态(STATUS_ IDLE ), 则根据所述家庭网关的打印能力, 将所述打印请 求中的业务内容分成至少一个打印文件段; 如果所述打印机处于工作状态 ( STATUS-WORKING ), 则进入等待延时状态; 如果所述打印机处于满负荷工作 状态( STATUS_DI SK_FULL )且所述第一参数值对应的数据容量为零, 说明家庭 网关的服务器空间不足, 则取消打印, 释放资源。 - - 可选的, S105中在所述获取单页的数据和数据大小之后, 还可以包括: 当所述单页的数据大 d、超过所述家庭网关的打印能力的第一参数值对应 的数据容量时,根据所述协商能力应答报文中的第二参数值判断所述打印机的 工作状态, 如果打印机处于空闲状态 (STATUS_ IDLE ) 时, 取消打印, 释放资 源; 如果打印机处于工作状态 ( STATUS_WORKING ) 时, 则进入等待延时状态, 并在预设的第一等待时延结束时,再次发送所述协商能力请求报文至所述家庭 网关。 第一等待时延可以根据网络情况配置, 也可以由用户配置, 例如, 釆用 5 Oms *进入次数来设置。 Optionally, the negotiation capability response message received in S103 further carries a second parameter value, which is a Data field, reflecting a working state of the printer connected to the home gateway. Then, S103 further includes: determining an operating state of the printer according to the second parameter value. If the printer is in an idle state (STATUS_IDLE), dividing the service content in the print request into at least one print file segment according to the printing capability of the home gateway; if the printer is in a working state (STATUS-WORKING) If the printer is in the full-load working state ( STATUS_DI SK_FULL ) and the data capacity corresponding to the first parameter value is zero, indicating that the server space of the home gateway is insufficient, the printing is canceled and the resources are released. After the data of the single page and the size of the data are obtained in S105, the method may further include: when the data of the single page is large, corresponding to the first parameter value of the printing capability of the home gateway. In the data capacity, the working status of the printer is determined according to the second parameter value in the negotiation capability response message. If the printer is in the idle state (STATUS_IDLE), the printing is canceled, and the resource is released; if the printer is in the working state (STATUS_WORKING) And entering the waiting delay state, and sending the negotiation capability request message to the home gateway again when the preset first waiting delay ends. The first waiting delay can be configured according to the network conditions, or can be configured by the user, for example, using 5 Oms * entry times.
可选的, S106中在所述再次发送协商能力请求报文至所述家庭网关之前, 还包括:  Optionally, before the resending the negotiation capability request message to the home gateway, the method further includes:
判断上一次发送所述协商能力请求报文至所述家庭网关的时间距离是否 超过预设的第二等待时延, 如果是, 则再次发送协商能力请求报文; 否则, 进 入等待延时的状态。第二等待时延是为了提供一定的处理时间给家庭网关的服 务器, SAMBA服务器需要处理时间与打印机交互并将打印文件发送给打印机, 因而, 在进行下一次协商时, 增加一定的等待时延算法, 例如釆用: 打印文件 段的数据大小 X (乘以)一定的时延的方式。  Determining whether the time distance of the last time the negotiation capability request message is sent to the home gateway exceeds a preset second waiting delay, and if yes, sending the negotiation capability request message again; otherwise, entering the waiting delay state . The second waiting delay is to provide a certain processing time to the server of the home gateway. The SAMBA server needs processing time to interact with the printer and send the print file to the printer. Therefore, when the next negotiation is performed, a certain waiting delay algorithm is added. For example, use: Print the data size of the file segment X (multiplied by) a certain delay.
可选的, 在所述再次接收所述家庭网关返回的协商能力应答报文之后, 还包括:  Optionally, after the receiving the negotiation capability response message returned by the home gateway, the method further includes:
根据所述再次接收的协商能力应答报文, 重新确定所述家庭网关的打印 能力, 当所述家庭网关的打印能力有变化时,调整所述打印请求中的业务内容 的打印文件段。  And determining, according to the re-received negotiation capability response message, the printing capability of the home gateway, and when the printing capability of the home gateway changes, adjusting a print file segment of the service content in the print request.
图 4 是本实施例提供的家庭网关侧的家庭共享打印方法流程图, 如图 4 所示, 所述家庭共享打印方法包括:  FIG. 4 is a flowchart of a home sharing printing method on the home gateway side according to the embodiment. As shown in FIG. 4, the home sharing printing method includes:
S20 当接收终端设备发送的协商能力请求报文时, 家庭网关构造协商 — — 能力应答报文。 S20: When receiving the negotiation capability request message sent by the terminal device, the home gateway constructs the negotiation. — — Capability response message.
所述协商能力应答报文中携带有反映所述家庭网关的打印能力的第一参 数值, 通常为 Count字段。 S201具体包括: 当接收终端设备发送的协商能力 请求报文时,所述家庭网关判断所述打印能力请求报文是否限制大小,如果是, 统计所述家庭网关剩余的数据容量,并将所述剩余的数据容量作为所述第一参 数值, 否则, 将所述第一参数值设置为预设的第一标识, 该第一标识可以为 0 或 FFFF等预设的数值。  The negotiation capability response message carries a first parameter value reflecting the printing capability of the home gateway, which is usually a Count field. The S201 specifically includes: when receiving the negotiation capability request message sent by the terminal device, the home gateway determines whether the print capability request message is limited in size, and if yes, statistics the remaining data capacity of the home gateway, and the The remaining data capacity is used as the first parameter value. Otherwise, the first parameter value is set to a preset first identifier, and the first identifier may be a preset value such as 0 or FFFF.
如果终端设备发送的协商能力请求报文中的 F id字段为空或者小于等于 0 , 则统计默认的文件传输存储路径下的剩余容量, 将统计到的剩余容量填入 Count字段中。  If the F id field in the negotiation capability request packet sent by the terminal device is empty or less than or equal to 0, the remaining capacity in the default file transmission storage path is counted, and the remaining capacity in the statistics is filled in the Count field.
如果终端设备发送的协商能力请求报文中的 Fid字段大于 0,则说明存在 指定的文件传输存储路径, 认为协商能力请求报文中有限制大小, 相应地, 家 庭网关统计该指定的 Fid字段对应的文件传输存储路径下剩余的数据容量,将 统计到的剩余容量作为所述第一参数值, 填入 Count字段中。如果没有剩余容 量, 则将 Count字段设为 0。  If the Fid field in the negotiation capability request packet sent by the terminal device is greater than 0, the specified file transmission storage path exists, and the negotiation capability request packet has a restriction size. Accordingly, the home gateway statistics the specified Fid field correspondingly. The remaining data capacity in the file transfer storage path, and the remaining capacity counted as the first parameter value is filled in the Count field. If there is no remaining capacity, set the Count field to 0.
当然, 为了达到保护资源的目的, 协商能力应答报文中 Count 字段也可 以为当前剩余容量 *配置因子, 该配置因子由用户进行配置, 如 50%。  Of course, in order to protect resources, the Count field in the Negotiation Capability Reply message can also be the current remaining capacity * configuration factor, which is configured by the user, such as 50%.
可选的, 所述协商能力应答报文中还携带有反映与所述家庭网关相连接 的打印机工作状态的第二参数值, 通常为 Sta tus字段。 则在将所述剩余的数 据容量作为所述第一参数值之后, 还包括:  Optionally, the negotiation capability response message further carries a second parameter value, which is a Sta tus field, that reflects a working state of the printer connected to the home gateway. After the remaining data capacity is used as the first parameter value, the method further includes:
当所述剩余的数据容量不为零时,判断是否有正在打印的文件,如果有, 将所述第二参数值设置为处于工作状态的标识, 即为 STATUS-WORKING; 否则 将所述第二参数值设置为处于空闲状态的标识, 即为 STATUS_ IDLE; 当所述剩 余的数据容量为零时,说明家庭网关的服务器空间不足, 将所述第二参数值设 — — 置为处于满负荷工作状态的标识, 即为 STATUS_DI SK_FULL。 When the remaining data capacity is not zero, it is determined whether there is a file being printed, and if so, the second parameter value is set to the identifier of the working state, that is, STATUS-WORKING; otherwise the second The parameter value is set to the identifier in the idle state, that is, STATUS_IDLE; when the remaining data capacity is zero, the server space of the home gateway is insufficient, and the second parameter value is set. — — Set to the ID at full load, ie STATUS_DI SK_FULL.
将所述第一参数值及第二参数值通过协商能力应答报文反馈给终端设备。 S202 , 接收所述终端设备根据所述家庭网关的打印能力将打印请求中的 业务内容分成至少一个打印文件段后发送的打印文件段 ,并控制打印机打印接 收到的所述打印文件段。  The first parameter value and the second parameter value are fed back to the terminal device by using the negotiation capability response message. S202. Receive a print file segment that is sent by the terminal device according to the printing capability of the home gateway, and divide the service content in the print request into at least one print file segment, and control the printer to print the received print file segment.
家庭网关在接收到第一个所述打印文件段后,可以按照现有的 smb流程: 打开文件-〉写文件-〉关闭文件(open -〉 wr i te -〉 c lose )的流程进行打印。 家庭 网关的服务器在接收打印文件段时,存储在对应的文件传输存储路径,接收完 成后, 将打印文件段发送给打印机, 并清除任务。 进而, 再重复 S201 ~ S202 , 进行下一个打印文件段的打印。  After receiving the first print file segment, the home gateway can print according to the existing smb process: open file -> write file -> close file (open -> wr i te -> c lose ). When receiving the print file segment, the server of the home gateway is stored in the corresponding file transfer storage path. After the completion of the receiving, the print file segment is sent to the printer, and the task is cleared. Further, S201 to S202 are repeated to print the next print file segment.
本发明实施例提供的家庭共享打印方法, 能够解决家庭网关等网络打印 共享设备内存受限情况下, 支持大文件的打印, 同时降低打印共享设备的资源 占用, 缩短打印时间, 避免网关设备出现异常。  The home sharing printing method provided by the embodiment of the invention can solve the problem that the network print sharing device such as the home gateway has limited memory, supports large file printing, reduces the resource occupation of the printing sharing device, shortens the printing time, and avoids abnormality of the gateway device. .
以上是对本发明所提供的家庭共享打印方法进行的详细描述, 下面对本 发明提供的家庭共享打印装置进行详细描述。  The above is a detailed description of the home sharing printing method provided by the present invention, and the home sharing printing apparatus provided by the present invention will be described in detail below.
实施例二  Embodiment 2
图 5是本实施例提供的终端设备的结构示意图, 如图 5所示, 本发明的 终端设备包括: 收发模块 401和处理模块 402。  FIG. 5 is a schematic structural diagram of a terminal device according to the embodiment. As shown in FIG. 5, the terminal device of the present invention includes: a transceiver module 401 and a processing module 402.
收发模块 401 用于接收打印请求, 当接收到所述打印请求时, 发送协商 能力请求报文至家庭网关, 并接收所述家庭网关返回的协商能力应答报文。  The transceiver module 401 is configured to receive a print request, and when receiving the print request, send a negotiation capability request message to the home gateway, and receive a negotiation capability response message returned by the home gateway.
当用户有文件(文档或图片等)需要打印时, 通过终端设备 (即客户端) 发起打印请求。终端设备的收发模块 401在接收到该打印请求时,发送协商能 力请求报文至家庭网关。  When the user has a file (document or picture, etc.) that needs to be printed, a print request is initiated by the terminal device (ie, the client). Upon receiving the print request, the transceiver module 401 of the terminal device sends a negotiation capability request message to the home gateway.
协商能力请求报文用于终端设备请求家庭网关的服务器的传输存储能力。 — — 协商能力请求报文可以包括: 处理请求的文件或路径 Fid, 请求的信息级别等 多个字段的信息。其中, 处理请求的文件或路径 Fid字段是用于标识终端设备 所请求协商的路径, 以扩展由客户端决定打印文件的存储路径。 Fid字段默认 为空, 也可以为上次协商能力, 或者由用户指定的打印文件存储路径。 当 Fid 字段为默认的空字段时, 可以认为该协商能力请求报文没有限制大小。请求的 信息级别是用于标识终端设备发送的请求的优先级别。 The negotiation capability request message is used for the transmission storage capability of the server that the terminal device requests the home gateway. — The negotiation capability request message may include: information of a plurality of fields such as a file or a path Fid that processes the request, a requested information level, and the like. The file or path Fid field for processing the request is a path for identifying the negotiation requested by the terminal device, so as to extend the storage path of the print file determined by the client. The Fid field is empty by default, and can also be the last negotiation capability, or the print file storage path specified by the user. When the Fid field is the default empty field, the negotiation capability request message can be considered as having no limit size. The requested information level is a priority level used to identify the request sent by the terminal device.
协商能力应答报文用于家庭网关回复服务器的打印能力。 协商能力应答 报文中携带有反映所述家庭网关的打印能力的第一参数值。釆用第一参数来标 识家庭网关的打印能力, 家庭网关在接收到协商能力请求报文时, 确定其自身 所剩余的数据容量 (即打印能力 )之后, 将该剩余的数据容量作为反映打印能 力的第一参数值,通常为 Count字段,通过协商能力应答报文反馈给终端设备。  The Negotiation Capability Reply message is used by the home gateway to reply to the print capability of the server. The Negotiation Capability Reply message carries a first parameter value reflecting the printing capability of the home gateway.第一 The first parameter is used to identify the printing capability of the home gateway, and after receiving the negotiation capability request message, the home gateway determines its own remaining data capacity (ie, printing capability), and then uses the remaining data capacity as a reflection printing capability. The first parameter value, usually the Count field, is fed back to the terminal device through the negotiation capability response message.
当然, 为了达到保护资源的目的, 协商能力应答报文中 Count 字段也可 以为当前剩余容量 *配置因子, 该配置因子由用户进行配置, 如 50%。  Of course, in order to protect resources, the Count field in the Negotiation Capability Reply message can also be the current remaining capacity * configuration factor, which is configured by the user, such as 50%.
处理模块 402用于根据收发模块 401接收到的所述协商能力应答报文, 确定所述家庭网关的打印能力, 按照所述家庭网关的打印能力, 将收发模块 401接收到的所述打印请求中的业务内容分成至少一个打印文件段, 并通过收 发模块 401逐次发送一个所述打印文件段至所述家庭网关进行打印。  The processing module 402 is configured to determine, according to the negotiation capability response message received by the transceiver module 401, the printing capability of the home gateway, and according to the printing capability of the home gateway, the print request received by the transceiver module 401 The business content is divided into at least one print file segment, and one of the print file segments is sequentially sent to the home gateway for printing by the transceiver module 401.
处理模块 402在收发模块 401接收到协商能力应答报文后, 根据协商能 力应答报文中携带的第一参数值,确定家庭网关的打印能力。 第一参数值可以 直接釆用家庭网关的当前剩余容量, 也可以是当前剩余容量 *配置因子后的容 量, 一般通常为数值, 如 1M或 200k等的容量。  After receiving the negotiation capability response message, the processing module 402 determines the printing capability of the home gateway according to the first parameter value carried in the negotiation capability response message. The first parameter value can directly use the current remaining capacity of the home gateway, or the capacity of the current remaining capacity * configuration factor, which is usually a value, such as a capacity of 1M or 200k.
在确定了家庭网关的打印能力之后, 处理模块 402 用于将收发模块 401 接收到的所述打印请求中的业务内容按页编码,并获取单页的数据和数据大小; 以及, 将所述编码后的业务内容按页连接, 累加所连接的页中的数据大小, 将 - - 所连接的数据组合成至少一个打印文件段,并使每一个所述打印文件段的数据 的大小不超过所述家庭网关的打印能力的第一参数值对应的数据容量。 After determining the printing capability of the home gateway, the processing module 402 is configured to encode the service content in the print request received by the transceiver module 401 by a page, and obtain a single page of data and data size; and, the encoding After the business content is connected by page, accumulate the size of the data in the connected page, will - the connected data is combined into at least one print file segment, and the size of the data of each of the print file segments does not exceed the data capacity corresponding to the first parameter value of the print capability of the home gateway.
可选的, 处理模块 402 分成的所述打印文件段的数据大小根据所述打印 文件段的顺序依次递增。在使打印文件段的数据大小不超过第一参数值对应的 数据容量的前提下,使打印文件段的数据大小依次递增, 最先打印的打印文件 段最小, 后面的打印文件段逐渐增大, 可以进一步提高打印速度。 打印文件段 越大, 整个打印文件传输的次数越少, 可以降低整个打印文件的传输时间(即 打印的总时间)。 而当打印文件段越小时, 仅传输该打印文件段所需的时间越 小, 则可以提前开始该打印文件段打印的时间, 降低家庭网关的负载。 因而, 合理地对打印文件段的数据大小进行调整, 可以缩短打印总时间。  Optionally, the data size of the print file segment divided by the processing module 402 is sequentially increased according to the order of the print file segments. Under the premise that the data size of the print file segment does not exceed the data capacity corresponding to the first parameter value, the data size of the print file segment is sequentially increased, the print file segment that is printed first is the smallest, and the subsequent print file segment is gradually increased. The printing speed can be further increased. The larger the print file segment, the less the entire print file is transferred, which reduces the transfer time of the entire print file (that is, the total print time). When the number of print file segments is small, the smaller the time required to transmit only the print file segment, the time for printing the print file segment can be started in advance, and the load of the home gateway is reduced. Therefore, it is possible to shorten the total print time by appropriately adjusting the data size of the print file segment.
处理模块 402通过收发模块 401将所述打印文件段发送至所述家庭网关 进行打印。  The processing module 402 sends the print file segment to the home gateway through the transceiver module 401 for printing.
具体地, 处理模块 402 先判断所述打印请求中的业务内容的所述打印文 件段的个数是否超过一个,如果是, 则将所述打印文件段逐个发送至所述家庭 网关进行打印; 否则将所述打印文件段发送至所述家庭网关进行打印, 结束打 印。  Specifically, the processing module 402 first determines whether the number of the print file segments of the service content in the print request exceeds one, and if yes, sends the print file segments one by one to the home gateway for printing; otherwise The print file segment is sent to the home gateway for printing, and the printing is ended.
处理模块 402用于将所述打印文件段逐个发送至所述家庭网关进行打印, 具体包括用于先发送一个所述打印文件段至所述家庭网关进行打印。家庭网关 在接收到第一个所述打印文件段后, 可以按照现有的 smb 流程: 打开文件-〉 写文件-〉关闭文件(open -〉 wr i te -〉 c los e )的流程进行打印。 当所述打印文件 段打印完毕时,处理模块 402再次通过收发模块 401发送协商能力请求报文至 所述家庭网关, 并再次接收所述家庭网关返回的协商能力应答报文, 进行下一 次协商打印, 以根据所述家庭网关的打印能力,将下一个所述打印文件段发送 至所述家庭网关进行打印, 以此类推, 直到整个打印业务内容打印完毕。 - - 可选的, 收发模块 401 接收的所述协商能力应答报文中还携带有反映与 所述家庭网关相连接的打印机工作状态的第二参数值, 通常为 S ta tus字段。 处理模块 402则还用于根据所述第二参数值确定所述打印机的工作状态。如果 所述打印机处于空闲状态 (STATUS_ IDLE ), 则根据所述家庭网关的打印能力, 将所述打印请求中的业务内容分成至少一个打印文件段;如果所述打印机处于 工作状态 ( STATUS-WORKING ), 则进入等待延时状态; 如果所述打印机处于满 负荷工作状态 (STATUS_DI SK_FULL )且所述第一参数值对应的数据容量为零, 则取消打印, 释放资源。 The processing module 402 is configured to send the print file segments one by one to the home gateway for printing, and specifically includes: sending a print file segment to the home gateway for printing. After receiving the first print file segment, the home gateway can print according to the existing smb process: open file -> write file -> close file (open -> wr i te -> c los e ) . When the print file segment is printed, the processing module 402 sends the negotiation capability request message to the home gateway through the transceiver module 401, and receives the negotiation capability response message returned by the home gateway again, and performs the next negotiation printing. And sending the next print file segment to the home gateway for printing according to the printing capability of the home gateway, and so on, until the entire print service content is printed. Optionally, the negotiation capability response message received by the transceiver module 401 further carries a second parameter value, which is a Status field, reflecting a working state of the printer connected to the home gateway. The processing module 402 is further configured to determine an operating state of the printer according to the second parameter value. If the printer is in an idle state (STATUS_IDLE), dividing the service content in the print request into at least one print file segment according to the printing capability of the home gateway; if the printer is in a working state (STATUS-WORKING) And enter the waiting delay state; if the printer is in the full load working state (STATUS_DI SK_FULL ) and the data capacity corresponding to the first parameter value is zero, the printing is canceled, and the resource is released.
可选的, 处理模块 402 在所述获取单页的数据和数据大小之后, 还用于 当所述单页的数据大小超过所述家庭网关的打印能力的第一参数值对应的数 据容量时,根据所述协商能力应答报文中的第二参数值判断所述打印机的工作 状态, 如果打印机处于空闲状态 (STATUS_ IDLE ) 时, 取消打印; 如果打印机 处于工作状态(STATUS-WORK ING )时, 则进入等待延时状态, 并在预设的第一 等待时延结束时,再次发送所述协商能力请求报文至所述家庭网关。 第一等待 时延可以根据网络情况配置, 也可以由用户配置, 例如, 釆用 50ms *进入次数 来设置。  Optionally, after the obtaining the data and data size of the single page, the processing module 402 is further configured to: when the data size of the single page exceeds the data capacity corresponding to the first parameter value of the printing capability of the home gateway, Determining the working state of the printer according to the second parameter value in the negotiation capability response message, canceling printing if the printer is in an idle state (STATUS_IDLE); if the printer is in a working state (STATUS-WORK ING), And entering the waiting delay state, and sending the negotiation capability request message to the home gateway again when the preset first waiting delay ends. The first waiting delay can be configured according to the network conditions, or can be configured by the user, for example, using 50ms * number of entries.
可选的, 处理模块 402在再次通过收发模块 401发送协商能力请求报文 至所述家庭网关之前,还用于判断上一次发送所述协商能力请求报文至所述家 庭网关的时间距离是否超过预设的第二等待时延,如果是, 则再次通过所述收 发模块发送协商能力请求报文; 否则, 进入等待延时的状态。 第二等待时延是 为了提供一定的处理时间给家庭网关的服务器, SAMBA服务器需要处理时间与 打印机交互并将打印文件发送给打印机, 因而, 在进行下一次协商时, 增加一 定的等待时延算法, 例如釆用: 打印文件段的数据大小 X (乘以)一定的时延 的方式。 — — 可选的, 处理模块 402 在再次接收所述家庭网关返回的协商能力应答报 文之后,还用于根据所述再次接收的协商能力应答报文, 重新确定所述家庭网 关的打印能力, 当所述家庭网关的打印能力有变化时,调整所述打印请求中的 业务内容的打印文件段。 Optionally, before the sending, by the sending module 401, the processing capability request message to the home gateway, the processing module 402 is further configured to determine whether the time distance of sending the negotiation capability request message to the home gateway is exceeded. a preset second waiting delay. If yes, the negotiation capability request message is sent again through the transceiver module; otherwise, the waiting delay state is entered. The second waiting delay is to provide a certain processing time to the server of the home gateway. The SAMBA server needs processing time to interact with the printer and send the print file to the printer. Therefore, when the next negotiation is performed, a certain waiting delay algorithm is added. For example, use: Print the data size of the file segment X (multiplied by) a certain delay. After the processing module 402 receives the negotiation capability response message returned by the home gateway, the processing module 402 is further configured to re-determine the printing capability of the home gateway according to the re-received negotiation capability response message. When the printing capability of the home gateway changes, the print file segment of the business content in the print request is adjusted.
图 6是本实施例提供的打印设备的家庭网关的结构示意图,如图 6所示, 本发明的家庭网关包括: 收发器 501和处理器 502。  FIG. 6 is a schematic structural diagram of a home gateway of a printing device according to the embodiment. As shown in FIG. 6, the home gateway of the present invention includes: a transceiver 501 and a processor 502.
收发器 501用于接收终端设备发送的协商能力请求报文。  The transceiver 501 is configured to receive a negotiation capability request message sent by the terminal device.
处理器 502用于当收发器 501接收到所述打印能力请求报文时, 构造协 商能力应答报文。  The processor 502 is configured to construct a negotiation capability response message when the transceiver 501 receives the print capability request message.
所述协商能力应答报文中携带有反映所述家庭网关的打印能力的第一参 数值, 通常为 Count字段。  The negotiation capability response message carries a first parameter value reflecting the printing capability of the home gateway, which is usually a Count field.
处理器 502具体用于当收发器 501接收到所述协商能力请求报文时, 判 断所述打印能力请求报文是否限制大小,如果是, 统计所述家庭网关剩余的数 据容量, 并将所述剩余的数据容量作为所述第一参数值, 否则, 将所述第一参 数值设置为预设的第一标识, 该第一标识可以为 0或 FFFF等预设的数值。  The processor 502 is specifically configured to: when the transceiver 501 receives the negotiation capability request message, determine whether the print capability request message is limited in size, and if yes, count the remaining data capacity of the home gateway, and The remaining data capacity is used as the first parameter value. Otherwise, the first parameter value is set to a preset first identifier, and the first identifier may be a preset value such as 0 or FFFF.
如果终端设备发送的协商能力请求报文中的 F id字段为空或者小于等于 0 , 则处理器 502统计默认的文件传输存储路径下的剩余容量,将统计到的剩余容 量填入 Count字段中。  If the F id field in the negotiation capability request packet sent by the terminal device is empty or less than or equal to 0, the processor 502 counts the remaining capacity in the default file transmission storage path, and fills the remaining capacity in the Count field.
如果终端设备发送的协商能力请求报文中的 F id字段大于 0 ,则说明存在 指定的文件传输存储路径, 认为协商能力请求报文中有限制大小, 相应地, 处 理器 502统计该指定的 F id字段对应的文件传输存储路径下剩余的数据容量, 将统计到的剩余容量作为所述第一参数值, 填入 Count字段中。如果没有剩余 容量, 则将 Count字段设为 0。  If the F id field in the negotiation capability request packet sent by the terminal device is greater than 0, the specified file transmission storage path exists, and the negotiation capability request packet has a restricted size. Accordingly, the processor 502 collects the specified F. The remaining data capacity in the file transfer storage path corresponding to the id field, and the remaining capacity as the first parameter value is filled in the Count field. If there is no remaining capacity, set the Count field to 0.
当然, 为了达到保护资源的目的, 协商能力应答报文中 Count 字段也可 — — 以为当前剩余容量 *配置因子, 该配置因子由用户进行配置, 如 50%。 Of course, in order to achieve the purpose of protecting resources, the Count field in the negotiation capability response message may also be — — The current remaining capacity* configuration factor, which is configured by the user, such as 50%.
收发器 501 还用于接收所述终端设备根据所述协商能力应答报文中的打 印能力将打印请求中的业务内容分成至少一个打印文件段后发送的打印文件 段。  The transceiver 501 is further configured to receive a print file segment that is sent by the terminal device after the service content in the print request is divided into at least one print file segment according to the printing capability in the negotiation capability response message.
处理器 502还用于在收发器 501接收到所述打印文件段之后, 控制打印 机打印接收到的所述打印文件段。  The processor 502 is further configured to control the printer to print the received segment of the print file after the transceiver 501 receives the segment of the print file.
收发器 501在接收到第一个所述打印文件段后, 处理器 502 可以按照现 有的 smb流程: 打开文件-〉写文件-〉关闭文件( open -〉 wr i te -〉 c lose )的流程 进行打印。 收发器 501在接收打印文件段时, 处理器 502存储在对应的文件传 输存储路径, 收发器 501接收完成后, 处理器 502利用收发器 501将打印文件 段发送给打印机, 并清除任务。 以此类推, 进行下一个打印文件段的打印。  After receiving the first print file segment, the transceiver 501 can follow the existing smb process: open the file -> write file -> close the file (open -> wr i te -> c lose ) The process prints. When the transceiver 501 receives the print file segment, the processor 502 stores the corresponding file transfer storage path. After the transceiver 501 receives the completion, the processor 502 sends the print file segment to the printer by using the transceiver 501, and clears the task. By analogy, the next print file segment is printed.
可选的, 处理器 502 构造的所述协商能力应答报文中还携带有反映与所 述家庭网关相连接的打印机工作状态的第二参数值, 通常为 S ta tus字段。  Optionally, the negotiation capability response message constructed by the processor 502 further carries a second parameter value, which is a Data field, reflecting a working state of the printer connected to the home gateway.
处理器 502 在将所述剩余的数据容量作为所述第一参数值之后, 还用于 当所述剩余的数据容量不为零时, 判断是否有正在打印的文件, 如果有, 将所 述第二参数值设置为处于工作状态的标识, 即为 STATUS-WORKING; 否则将所 述第二参数值设置为处于空闲状态的标识, 即为 STATUS_ IDLE; 以及, 当所述 剩余的数据容量为零时,说明家庭网关的服务器空间不足,将所述第二参数值 设置为处于满负荷工作状态的标识, 即为 STATUS_DI SK_FULL。  After the remaining data capacity is used as the first parameter value, the processor 502 is further configured to: when the remaining data capacity is not zero, determine whether there is a file being printed, and if so, the first The second parameter value is set to the identifier of the working state, that is, STATUS-WORKING; otherwise, the second parameter value is set to the identifier of the idle state, that is, STATUS_IDLE; and, when the remaining data capacity is zero , indicating that the server space of the home gateway is insufficient, and setting the second parameter value to the identifier of the full-load working state, that is, STATUS_DI SK_FULL.
处理器 502利用收发器 501将所述第一参数值及第二参数值通过协商能 力应答报文反馈给终端设备。  The processor 502 uses the transceiver 501 to feed back the first parameter value and the second parameter value to the terminal device through the negotiation capability response message.
本发明提供的家庭共享打印方法及装置, 能够解决家庭网关等网络打印 共享设备内存受限情况下, 支持大文件的打印, 同时降低打印共享设备的资源 占用, 缩短打印时间, 避免网关设备出现异常。 — — 专业人员应该还可以进一步意识到, 结合本文中所公开的实施例描述的 各示例的单元及算法步骤, 能够以电子硬件、计算机软件或者二者的结合来实 现, 为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般 性地描述了各示例的组成及步骤。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的 应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明 的范围。 The home sharing printing method and device provided by the invention can solve the problem that the network print sharing device such as the home gateway has limited memory, supports large file printing, reduces the resource occupation of the printing sharing device, shortens the printing time, and avoids abnormality of the gateway device. . The skilled person should further realize that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software or a combination of both, in order to clearly illustrate the hardware and The interchangeability of the software has been generally described in terms of the composition and steps of the examples in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
结合本文中所公开的实施例描述的方法或算法的步骤可以用硬件、 处理 器执行的软件模块, 或者二者的结合来实施。 软件模块可以置于随机存储器 The steps of a method or algorithm described in connection with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. Software modules can be placed in random access memory
( RAM )、 内存、 只读存储器(ROM )、 电可编程 R0M、 电可擦除可编程 R0M、 寄 存器、 硬盘、 可移动磁盘、 CD-R0M、 或技术领域内所公知的任意其它形式的存 储介质中。 (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage known in the art. In the medium.
以上所述的具体实施方式, 对本发明的目的、 技术方案和有益效果进行 了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已, 并不用于限定本发明的保护范围, 凡在本发明的精神和原则之内, 所做的任何 修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。  The embodiments, the technical solutions, and the beneficial effects of the present invention are further described in detail. It is to be understood that the foregoing description is only exemplary embodiments of the present invention and is not intended to limit the present invention. The scope of the protection, any modifications, equivalents, improvements, etc., made within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims

权 利 要 求 Rights request
1、 一种家庭共享打印方法, 其特征在于, 所述方法包括: 1. A home sharing printing method, characterized in that the method includes:
当接收到打印请求时, 终端设备发送协商能力请求报文至家庭网关; 接收所述家庭网关返回的协商能力应答报文,并根据所述协商能力应答报 文, 确定所述家庭网关的打印能力; When receiving the print request, the terminal device sends a negotiation capability request message to the home gateway; receives the negotiation capability response message returned by the home gateway, and determines the printing capability of the home gateway based on the negotiation capability response message. ;
根据所述家庭网关的打印能力,将所述打印请求中的业务内容分成至少一 个打印文件段, 并将所述打印文件段发送至所述家庭网关进行打印。 According to the printing capability of the home gateway, the service content in the print request is divided into at least one print file segment, and the print file segment is sent to the home gateway for printing.
2、 根据权利要求 1所述的方法, 其特征在于, 所述协商能力应答报文中 携带有反映所述家庭网关的打印能力的第一参数值; 2. The method according to claim 1, wherein the negotiation capability response message carries a first parameter value reflecting the printing capability of the home gateway;
所述根据所述协商能力应答报文,确定所述家庭网关的打印能力 ,具体为: 根据所述协商能力应答报文中的所述第一参数值,确定所述家庭网关的打 印能力。 Determining the printing capability of the home gateway based on the negotiation capability response message specifically includes: determining the printing capability of the home gateway based on the first parameter value in the negotiation capability response message.
3、 根据权利要求 1所述的方法, 其特征在于, 所述根据所述家庭网关的 打印能力,将所述打印请求中的业务内容分成至少一个打印文件段,具体包括: 将所述打印请求中的业务内容按页编码, 并获取单页的数据和数据大小; 将所述编码后的业务内容按页连接, 累加所连接的页中的数据大小,将所 连接的数据组合成一个打印文件段,并使每一个所述打印文件段的数据的大小 不超过所述家庭网关的打印能力的第一参数值对应的数据容量。 3. The method according to claim 1, characterized in that: dividing the service content in the print request into at least one print file segment according to the printing capability of the home gateway, specifically including: dividing the print request into The business content in is coded by page, and the data and data size of a single page are obtained; the coded business content is connected by page, the data size in the connected pages is accumulated, and the connected data are combined into a print file segments, and the data size of each print file segment does not exceed the data capacity corresponding to the first parameter value of the printing capability of the home gateway.
4、 根据权利要求 3所述的方法, 其特征在于, 所述协商能力应答报文中 还携带有反映与所述家庭网关相连接的打印机工作状态的第二参数值; 4. The method according to claim 3, wherein the negotiation capability response message also carries a second parameter value that reflects the working status of the printer connected to the home gateway;
所述根据所述协商能力应答报文,确定所述家庭网关的打印能力,还包括: 根据所述第二参数值确定所述打印机的工作状态; Determining the printing capability of the home gateway based on the negotiation capability response message further includes: determining the working status of the printer based on the second parameter value;
如果所述打印机处于空闲状态, 则根据所述家庭网关的打印能力, 将所述 打印请求中的业务内容分成至少一个打印文件段; If the printer is in an idle state, the printer is configured according to the printing capability of the home gateway. The business content in the print request is divided into at least one print file segment;
如果所述打印机处于工作状态, 则进入等待延时状态; If the printer is in working state, it enters the waiting delay state;
如果所述打印机处于满负荷工作状态且所述第一参数值对应的数据容量 为零, 则取消打印。 If the printer is working at full capacity and the data capacity corresponding to the first parameter value is zero, printing is canceled.
5、 根据权利要求 4所述的方法, 其特征在于, 在所述获取单页的数据和 数据大小之后, 还包括: 5. The method according to claim 4, characterized in that, after obtaining the data and data size of a single page, it further includes:
当所述单页的数据大小超过所述家庭网关的打印能力的第一参数值对应 的数据容量时,根据所述协商能力应答报文中的第二参数值判断所述打印机的 工作状态; When the data size of the single page exceeds the data capacity corresponding to the first parameter value of the printing capability of the home gateway, determine the working status of the printer according to the second parameter value in the negotiation capability response message;
如果打印机处于空闲状态时, 取消打印; If the printer is idle, cancel printing;
如果打印机处于工作状态时, 则进入等待延时状态, 并在预设的第一等待 时延结束时, 再次发送所述协商能力请求报文至所述家庭网关。 If the printer is in the working state, it enters the waiting delay state, and when the preset first waiting delay ends, the negotiation capability request message is sent to the home gateway again.
6、 根据权利要求 3所述的方法, 其特征在于, 所述打印文件段的数据大 小根据所述打印文件段的顺序依次递增。 6. The method according to claim 3, characterized in that the data size of the print file segments increases sequentially according to the order of the print file segments.
7、 根据权利要求 1所述的方法, 其特征在于, 所述将所述打印文件段发 送至所述家庭网关进行打印, 具体包括: 7. The method according to claim 1, wherein sending the print file segment to the home gateway for printing specifically includes:
判断所述打印请求中的业务内容的所述打印文件段的个数是否超过一个, 如果是, 将所述打印文件段逐个发送至所述家庭网关进行打印; 如果否, 则将 所述打印文件段发送至所述家庭网关进行打印。 Determine whether the number of the print file segments of the service content in the print request exceeds one. If so, send the print file segments one by one to the home gateway for printing; if not, send the print file segments The segments are sent to the home gateway for printing.
8、 根据权利要求 7所述的方法, 其特征在于, 所述将所述打印文件段逐 个发送至所述家庭网关进行打印, 具体包括: 8. The method according to claim 7, wherein said sending the print file segments one by one to the home gateway for printing specifically includes:
发送一个所述打印文件段至所述家庭网关进行打印; Send one of the print file segments to the home gateway for printing;
当所述打印文件段打印完毕时,再次发送协商能力请求报文至所述家庭网 关, 并再次接收所述家庭网关返回的协商能力应答报文, 进行下一个所述打印 文件段的协商打印。 When the printing of the print file segment is completed, the negotiation capability request message is sent to the home gateway again, and the negotiation capability response message returned by the home gateway is received again, and the next printing is performed. Negotiated printing of file segments.
9、 根据权利要求 8所述的方法, 其特征在于, 在所述再次发送协商能力 请求报文至所述家庭网关之前, 还包括: 9. The method according to claim 8, characterized in that, before sending the negotiation capability request message to the home gateway again, it further includes:
判断上一次发送所述协商能力请求报文至所述家庭网关的时间距离是否 超过预设的第二等待时延; Determine whether the time distance between the last time the negotiation capability request message was sent to the home gateway exceeds the preset second waiting delay;
如果是, 则再次发送协商能力请求报文; If so, send the negotiation capability request message again;
否则, 进入等待延时的状态。 Otherwise, enter the waiting delay state.
10、 据权利要求 8所述的方法, 其特征在于, 在所述再次接收所述家庭网 关返回的协商能力应答报文之后, 还包括: 10. The method according to claim 8, characterized in that, after receiving the negotiation capability response message returned by the home gateway again, it further includes:
根据所述再次接收的协商能力应答报文,重新确定所述家庭网关的打印能 力, 当所述家庭网关的打印能力有变化时,调整所述打印请求中的业务内容的 打印文件段。 According to the re-received negotiation capability response message, the printing capability of the home gateway is re-determined, and when the printing capability of the home gateway changes, the printing file segment of the service content in the printing request is adjusted.
11、 一种家庭共享打印方法, 其特征在于, 所述方法包括: 11. A home sharing printing method, characterized in that the method includes:
当接收终端设备发送的协商能力请求报文时,家庭网关构造协商能力应答 报文,所述协商能力应答报文中携带有反映所述家庭网关的打印能力的第一参 数值; When receiving the negotiation capability request message sent by the terminal device, the home gateway constructs a negotiation capability response message, and the negotiation capability response message carries a first parameter value that reflects the printing capability of the home gateway;
接收所述终端设备根据所述家庭网关的打印能力将打印请求中的业务内 容分成至少一个打印文件段后发送的打印文件段,并控制打印机打印接收到的 所述打印文件段。 Receive the print file segment sent by the terminal device after dividing the service content in the print request into at least one print file segment according to the printing capability of the home gateway, and control the printer to print the received print file segment.
12、 根据权利要求 1 1所述的方法, 其特征在于, 所述当接收终端设备发 送的协商能力请求报文时, 家庭网关构造协商能力应答报文, 具体包括: 当接收终端设备发送的协商能力请求报文时,所述家庭网关判断所述打印 能力请求报文是否限制大小, 如果是, 统计所述家庭网关剩余的数据容量, 并 将所述剩余的数据容量作为所述第一参数值, 否则,将所述第一参数值设置为 预设的第一标识。 12. The method according to claim 11, characterized in that, when receiving the negotiation capability request message sent by the terminal device, the home gateway constructs a negotiation capability response message, specifically including: when receiving the negotiation capability request message sent by the terminal device When printing a capability request message, the home gateway determines whether the size of the printing capability request message is limited. If so, counts the remaining data capacity of the home gateway and uses the remaining data capacity as the first parameter value. , otherwise, set the first parameter value to Default first identifier.
1 3、 根据权利要求 12所述的方法, 其特征在于, 所述协商能力应答报文 中还携带有反映与所述家庭网关相连接的打印机工作状态的第二参数值; 13. The method according to claim 12, wherein the negotiation capability response message also carries a second parameter value that reflects the working status of the printer connected to the home gateway;
在将所述剩余的数据容量作为所述第一参数值之后, 还包括: After using the remaining data capacity as the first parameter value, the method further includes:
当所述剩余的数据容量不为零时, 判断是否有正在打印的文件, 如果有, 将所述第二参数值设置为处于工作状态的标识;否则将所述第二参数值设置为 处于空闲状态的标识; When the remaining data capacity is not zero, determine whether there is a file being printed, and if so, set the second parameter value to the identification of the working state; otherwise, set the second parameter value to the idle state Identification of status;
当所述剩余的数据容量为零时,将所述第二参数值设置为处于满负荷工作 态的标识。 When the remaining data capacity is zero, the second parameter value is set to an indicator of a full-load working state.
14、 一种终端设备, 其特征在于, 所述终端设备包括: 14. A terminal device, characterized in that the terminal device includes:
收发模块, 用于接收打印请求, 当接收到所述打印请求时, 发送协商能力 请求报文至家庭网关, 并接收所述家庭网关返回的协商能力应答报文; A transceiver module, configured to receive a print request, and when receiving the print request, send a negotiation capability request message to the home gateway, and receive a negotiation capability response message returned by the home gateway;
处理模块, 用于根据所述收发模块接收到的所述协商能力应答报文,确定 所述家庭网关的打印能力,根据所述家庭网关的打印能力,将所述收发模块接 收到的所述打印请求中的业务内容分成至少一个打印文件段,并通过所述收发 模块将所述打印文件段发送至所述家庭网关进行打印。 A processing module, configured to determine the printing capability of the home gateway according to the negotiation capability response message received by the transceiver module, and print the printing capability received by the transceiver module according to the printing capability of the home gateway. The service content in the request is divided into at least one print file segment, and the print file segment is sent to the home gateway for printing through the transceiver module.
15、 根据权利要求 14所述的终端设备, 其特征在于, 所述协商能力应答 报文中携带有反映所述家庭网关的打印能力的第一参数值; 15. The terminal device according to claim 14, wherein the negotiation capability response message carries a first parameter value that reflects the printing capability of the home gateway;
所述处理模块具体用于根据所述协商能力应答报文中的所述第一参数值, 确定所述家庭网关的打印能力。 The processing module is specifically configured to determine the printing capability of the home gateway according to the first parameter value in the negotiation capability response message.
16、 根据权利要求 14所述的终端设备, 其特征在于, 所述处理模块具体 用于将所述收发模块接收到的所述打印请求中的业务内容按页编码,并获取单 页的数据和数据大小; 以及, 将所述编码后的业务内容按页连接, 累加所连接 的页中的数据大小,将所连接的数据组合成一个打印文件段, 并使每一个所述 打印文件段的数据的大小不超过所述家庭网关的打印能力的第一参数值对应 的数据容量。 16. The terminal device according to claim 14, wherein the processing module is specifically configured to encode the business content in the print request received by the transceiver module on a page basis, and obtain the data of a single page and Data size; and, connect the encoded business content by page, accumulate the data size in the connected pages, combine the connected data into a print file segment, and make each of the The data size of the print file segment does not exceed the data capacity corresponding to the first parameter value of the printing capability of the home gateway.
17、 根据权利要求 16所述的终端设备, 其特征在于, 所述收发模块接收 的所述协商能力应答报文中还携带有反映与所述家庭网关相连接的打印机工 作状态的第二参数值; 17. The terminal device according to claim 16, wherein the negotiation capability response message received by the transceiver module also carries a second parameter value reflecting the working status of the printer connected to the home gateway. ;
所述处理模块还用于根据所述第二参数值确定所述打印机的工作状态; 如果所述打印机处于空闲状态, 则根据所述家庭网关的打印能力, 将所述 打印请求中的业务内容分成至少一个打印文件段; The processing module is also configured to determine the working status of the printer according to the second parameter value; if the printer is in an idle state, divide the service content in the print request into At least one print file segment;
如果所述打印机处于工作状态, 则进入等待延时状态; If the printer is in working state, it enters the waiting delay state;
如果所述打印机处于满负荷工作状态且所述第一参数值对应的数据容量 为零, 则取消打印。 If the printer is working at full capacity and the data capacity corresponding to the first parameter value is zero, printing is canceled.
18、 根据权利要求 17所述的终端设备, 其特征在于, 所述处理模块还用 于当所述单页的数据大小超过所述家庭网关的打印能力的第一参数值对应的 数据容量时,根据所述协商能力应答报文中的第二参数值判断所述打印机的工 作状态,如果打印机处于空闲状态时,取消打印;如果打印机处于工作状态时, 则进入等待延时状态, 并在预设的第一等待时延结束时, 再次发送所述协商能 力请求报文至所述家庭网关。 18. The terminal device according to claim 17, wherein the processing module is further configured to: when the data size of the single page exceeds the data capacity corresponding to the first parameter value of the printing capability of the home gateway, The working status of the printer is determined according to the second parameter value in the negotiation capability response message. If the printer is in the idle state, printing is canceled; if the printer is in the working status, the printer enters the waiting delay state, and in the preset state When the first waiting delay ends, the negotiation capability request message is sent to the home gateway again.
19、 根据权利要求 16所述的终端设备, 其特征在于, 所述处理模块分成 的所述打印文件段的数据大小根据所述打印文件段的顺序依次递增。 19. The terminal device according to claim 16, wherein the data size of the print file segments divided by the processing module increases sequentially according to the order of the print file segments.
20、 根据权利要求 15所述的终端设备, 其特征在于, 所述处理模块用于 将所述打印文件段发送至所述家庭网关进行打印,具体包括用于判断所述打印 请求中的业务内容的所述打印文件段的个数是否超过一个,如果是,将所述打 印文件段逐个发送至所述家庭网关进行打印; 如果否, 则将所述打印文件段发 送至所述家庭网关进行打印。 20. The terminal device according to claim 15, wherein the processing module is configured to send the print file segment to the home gateway for printing, specifically including determining the business content in the print request. Whether the number of the print file segments exceeds one, if so, send the print file segments one by one to the home gateway for printing; if not, send the print file segments to the home gateway for printing .
21、 根据权利要求 20所述的终端设备, 其特征在于, 所述处理模块用于 将所述打印文件段逐个发送至所述家庭网关进行打印,具体包括用于通过所述 收发模块发送一个所述打印文件段至所述家庭网关进行打印;当所述打印文件 段打印完毕时,再次通过所述收发模块发送协商能力请求报文至所述家庭网关, 并再次接收所述家庭网关返回的协商能力应答报文,进行下一个所述打印文件 段的协商打印。 21. The terminal device according to claim 20, characterized in that: the processing module is configured to send the print file segments one by one to the home gateway for printing, specifically including: sending a segment of the print file through the transceiver module. Send the print file segment to the home gateway for printing; when the print file segment is printed, send a negotiation capability request message to the home gateway again through the transceiver module, and receive the negotiation returned by the home gateway again. The capability response message is used to negotiate and print the next print file segment.
22、 根据权利要求 21所述的终端设备, 其特征在于, 所述处理模块在再 次通过所述收发模块发送协商能力请求报文至所述家庭网关之前,还用于判断 上一次发送所述协商能力请求报文至所述家庭网关的时间距离是否超过预设 的第二等待时延, 如果是, 则再次通过所述收发模块发送协商能力请求报文; 否则, 进入等待延时的状态。 22. The terminal device according to claim 21, characterized in that, before sending a negotiation capability request message to the home gateway through the transceiver module again, the processing module is also used to determine the last time the negotiation was sent. Whether the time distance between the capability request message and the home gateway exceeds the preset second waiting delay, if so, send the negotiation capability request message through the transceiver module again; otherwise, enter the waiting delay state.
23、 根据权利要求 21所述的终端设备, 其特征在于, 所述处理模块在再 次接收所述家庭网关返回的协商能力应答报文之后,还用于根据所述再次接收 的协商能力应答报文, 重新确定所述家庭网关的打印能力, 当所述家庭网关的 打印能力有变化时, 调整所述打印请求中的业务内容的打印文件段。 23. The terminal device according to claim 21, characterized in that, after receiving the negotiation capability response message returned by the home gateway again, the processing module is further configured to respond according to the negotiation capability response message received again. , re-determine the printing capability of the home gateway, and adjust the print file segment of the service content in the print request when the printing capability of the home gateway changes.
24、 一种打印设备的家庭网关, 其特征在于, 所述家庭网关包括: 收发器, 用于接收终端设备发送的协商能力请求报文; 24. A home gateway for a printing device, characterized in that the home gateway includes: a transceiver, configured to receive a negotiation capability request message sent by a terminal device;
处理器, 用于当所述收发器接收到所述打印能力请求报文时,构造协商能 力应答报文,所述协商能力应答报文中携带有反映所述家庭网关的打印能力的 第一参数值; A processor configured to construct a negotiation capability response message when the transceiver receives the printing capability request message, where the negotiation capability response message carries a first parameter reflecting the printing capability of the home gateway. value;
所述收发器还用于接收所述终端设备根据所述协商能力应答报文中的打 印能力将打印请求中的业务内容分成至少一个打印文件段后发送的打印文件 段; The transceiver is also configured to receive a print file segment sent by the terminal device after dividing the business content in the print request into at least one print file segment according to the print capability in the negotiation capability response message;
所述处理器还用于在所述收发器接收到所述打印文件段之后,控制打印机 打印接收到的所述打印文件段。 The processor is also configured to control the printer after the transceiver receives the print file segment. Print the received print file segment.
25、 根据权利要求 24所述的家庭网关, 其特征在于, 所述处理器具体用 于当所述收发器接收到所述协商能力请求报文时,判断所述打印能力请求报文 是否限制大小, 如果是, 统计所述家庭网关剩余的数据容量, 并将所述剩余的 数据容量作为所述第一参数值, 否则,将所述第一参数值设置为预设的第一标 识。 25. The home gateway according to claim 24, wherein the processor is specifically configured to determine whether the printing capability request message has a size limit when the transceiver receives the negotiation capability request message. , if so, count the remaining data capacity of the home gateway, and use the remaining data capacity as the first parameter value; otherwise, set the first parameter value as the preset first identifier.
26、 根据权利要求 25所述的家庭网关, 其特征在于, 所述处理器构造的 所述协商能力应答报文中还携带有反映与所述家庭网关相连接的打印机工作 状态的第二参数值; 26. The home gateway according to claim 25, wherein the negotiation capability response message constructed by the processor also carries a second parameter value that reflects the working status of the printer connected to the home gateway. ;
所述处理器在在将所述剩余的数据容量作为所述第一参数值之后,还用于 当所述剩余的数据容量不为零时, 判断是否有正在打印的文件, 如果有, 将所 述第二参数值设置为处于工作状态的标识;否则将所述第二参数值设置为处于 空闲状态的标识; 以及, 当所述剩余的数据容量为零时, 将所述第二参数值设 置为处于满负荷工作状态的标识。 After using the remaining data capacity as the first parameter value, the processor is also configured to determine whether there is a file being printed when the remaining data capacity is not zero, and if so, set all the files to be printed. The second parameter value is set to an identifier in the working state; otherwise, the second parameter value is set to an identifier in the idle state; and, when the remaining data capacity is zero, the second parameter value is set to Indicates that it is working at full capacity.
PCT/CN2014/082404 2013-08-09 2014-07-17 Method and device for sharing printing within family WO2015018271A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310347302.1A CN104346109A (en) 2013-08-09 2013-08-09 Method and device for home shared printing
CN201310347302.1 2013-08-09

Publications (1)

Publication Number Publication Date
WO2015018271A1 true WO2015018271A1 (en) 2015-02-12

Family

ID=52460632

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/082404 WO2015018271A1 (en) 2013-08-09 2014-07-17 Method and device for sharing printing within family

Country Status (2)

Country Link
CN (1) CN104346109A (en)
WO (1) WO2015018271A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108509160B (en) * 2018-02-13 2020-05-12 平安科技(深圳)有限公司 Post order printing method, electronic device and computer readable storage medium
CN109032540A (en) * 2018-08-01 2018-12-18 珠海奔图电子有限公司 Method of printing, unit and computer readable storage medium
CN112637367B (en) * 2021-03-09 2021-05-14 武汉绿色网络信息服务有限责任公司 File sharing method, device, equipment and storage medium based on home network
CN113238884B (en) * 2021-05-06 2022-02-08 国家计算机网络与信息安全管理中心 Firmware file detection method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1738345A (en) * 2004-08-20 2006-02-22 佳能株式会社 Image supply device and control method thereof and printing system
US20100253962A1 (en) * 2009-04-01 2010-10-07 Seiko Epson Corporation Signal conversion apparatus
CN102375704A (en) * 2010-08-11 2012-03-14 东友科技股份有限公司 Printing method and system under limited capacity of memory
WO2012162978A1 (en) * 2011-05-30 2012-12-06 Technicolor (China) Technology Co., Ltd. Method for providing print service

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1738345A (en) * 2004-08-20 2006-02-22 佳能株式会社 Image supply device and control method thereof and printing system
US20100253962A1 (en) * 2009-04-01 2010-10-07 Seiko Epson Corporation Signal conversion apparatus
CN102375704A (en) * 2010-08-11 2012-03-14 东友科技股份有限公司 Printing method and system under limited capacity of memory
WO2012162978A1 (en) * 2011-05-30 2012-12-06 Technicolor (China) Technology Co., Ltd. Method for providing print service

Also Published As

Publication number Publication date
CN104346109A (en) 2015-02-11

Similar Documents

Publication Publication Date Title
US10284626B2 (en) Transporting operations of arbitrary size over remote direct memory access
EP2728459B1 (en) Image Processing System
US9110611B2 (en) Non-transitory computer-readable mediums and image processing apparatus
US9906581B2 (en) Information processing apparatus, control method, and storage medium
WO2015018271A1 (en) Method and device for sharing printing within family
CN108028833A (en) A kind of method, system and the relevant device of NAS data accesses
CN106330855B (en) Communication system, management server, and control method
WO2011157026A1 (en) Method and mobile terminal for realizing audio transmission
US9588725B2 (en) Printing system, printing control method in cluster environment, and printing control program
US9323482B2 (en) Print control system, method of controlling printing, and recording medium
JP2000215144A (en) Server connecting multifunctional peripheral device to network
CN110535811B (en) Remote memory management method and system, server, client and storage medium
JP6289057B2 (en) COMMUNICATION DEVICE AND ITS CONTROL METHOD, PRINTING DEVICE, ITS CONTROL METHOD, AND PROGRAM
US8427702B2 (en) Page parallel raster image processing
US9582227B2 (en) Printer control apparatus, printing control method, and printing control system for transmitting a reception request signal and adjusting a transmission interval of a transmission request signal
EP2921949A1 (en) Printing system, print server and method for submitting print jobs
US20030226464A1 (en) Method to keep copies of device queued jobs in the network queue until print delivery is guaranteed
JP2009188655A (en) Communication control method, information processing system, information processor, and program
JP2012060571A (en) Image processor, job processing method and program
JP2011116083A (en) Printer and control method therefor, program
JPH05204565A (en) Network print control system
WO2023162127A1 (en) System, method, and program for collecting data
JP3661385B2 (en) Output device and host device
JP3779833B2 (en) Printer system, printer method, and terminal device
JP7427464B2 (en) Communication devices, communication methods and programs

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14835388

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14835388

Country of ref document: EP

Kind code of ref document: A1