Disclosure of Invention
The embodiment of the invention provides an Oneepass printing control method, device, equipment and storage medium, and solves the problem of how to ensure that each production line supports independently controlled printing tasks when multiple production lines in an Oneepass printing system print.
In a first aspect, an embodiment of the present invention provides an Onepass printing control method, including:
dividing all physical channels into a plurality of groups according to printing requirements, wherein each group corresponds to a production line, each production line comprises x physical channels, x is not less than 1, and x is an integer;
n logic channels are configured for each production line, n is more than or equal to x, and n is an integer;
receiving a printing command, and extracting corresponding printing data from a printing memory by taking the logic channel as a unit;
and processing the printing data according to the printing parameters and inputting the processed printing data into a corresponding physical channel for printing.
Each physical channel corresponds to one spray head or y rows of spray nozzles on the corresponding spray head, y is larger than or equal to 1, and the printing parameters are generated according to the printing requirements and the characteristics of the printing equipment.
Preferably, the printing requirements include: the width information of the product to be printed along the arrangement direction of the spray heads is divided into a plurality of groups according to the printing requirement, and each group corresponds to one production line and comprises the following steps:
and dividing all physical channels in the equipment to be printed into a plurality of groups according to the width information of the products to be printed along the arrangement direction of the spray heads, wherein each group corresponds to one production line.
Preferably, the printing requirements further include: the information of the number of copies to be printed of a product to be printed;
the method comprises the following steps that n logic channels are configured for each production line, n is larger than or equal to x, and n is an integer, and the method further comprises the following steps:
generating a printing task queue according to the information of the number of copies to be printed of a product to be printed;
reading printing parameters according to the printing task queue and establishing a target printing task of each production line;
storing the target print job of each production line in a job processing buffer;
and establishing a mapping relation among a physical channel, a logic channel, a production line and a task processing buffer according to the printing requirement.
Preferably, the receiving a print command and extracting corresponding print data from a print memory by using the logical channel as a unit includes:
receiving a printing command, and extracting the target printing task of each production line from the task processing buffer according to the mapping relation;
and calculating the storage address of the printing data corresponding to the logic channel ignited this time according to the printing parameters of the target printing task, and extracting the corresponding printing data from the printing memory according to the storage address.
Preferably, the calculating, according to the printing parameter of the target printing task, a storage address of the printing data corresponding to the logic channel at this time of firing, and extracting, according to the storage address, the corresponding printing data from the printing memory further includes:
calculating the actual storage address of the printing data corresponding to the logic channel ignited this time according to the printing parameters of the target printing task;
determining a required reading address of the printing data corresponding to the logic channel according to the printing parameters and the memory addressing requirement of the target printing task;
determining invalid data in the print data to be read according to the actual storage address and the required reading address;
and reading the printing data, removing the invalid data and writing the invalid data into a data cache.
Preferably, the print data processing includes one or more of a masking process, a feathering process, and a merging process.
In a second aspect, an embodiment of the present invention provides an Onepass printing control apparatus, including:
the production line distribution module is used for dividing all the physical channels into a plurality of groups according to the printing requirements, each group corresponds to one production line, each production line comprises x physical channels, x is more than or equal to 1, and x is an integer;
the logic channel configuration module is used for configuring n logic channels for each production line, wherein n is more than or equal to x, and n is an integer;
the printing data extraction module is used for receiving a printing command and extracting corresponding printing data from a printing memory by taking the logic channel as a unit;
the printing module is used for inputting the printing data into a corresponding physical channel for printing after processing the printing data according to the printing parameters;
each physical channel corresponds to one spray head or y rows of spray nozzles on the corresponding spray head, y is larger than or equal to 1, and the printing parameters are generated according to the printing requirements and the characteristics of the printing equipment. .
Preferably, the apparatus further comprises: and the triggering printing module is used for reading printing parameters according to the printing task queue, establishing a target printing task of each production line and storing the target printing task of each production line into a task processing buffer.
In a third aspect, an embodiment of the present invention provides an Onepass printing control apparatus, including: at least one processor, at least one memory, and computer program instructions stored in the memory, which when executed by the processor, implement the method of the first aspect of the embodiments described above.
In a fourth aspect, embodiments of the present invention provide a storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of the first aspect in the above embodiments.
In summary, according to the Onepass printing control method, apparatus, device and medium provided in the embodiments of the present invention, all physical channels are divided into a plurality of groups according to the printing requirements, each group corresponds to one production line, n logical channels are configured for each production line, and then data extraction and processing are performed by using the logical channels as a bridge, so that each production line can independently control a corresponding printing task and can accurately print on a predetermined position.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Referring to fig. 2, an embodiment of the present invention provides an Onepass printing control method, where all physical channels are divided into a plurality of groups according to a printing requirement, each group corresponds to a production line, n logical channels are configured for each production line, and then data is extracted and processed by using the logical channels as a bridge, so that each production line can independently control a corresponding printing task and can accurately print on a predetermined position. The method specifically comprises the following steps:
s1, dividing all physical channels into a plurality of groups according to printing requirements, wherein each group corresponds to a production line, each production line comprises x physical channels, x is more than or equal to 1, and x is an integer;
s2, configuring n logic channels for each production line, wherein n is larger than or equal to x and is an integer;
s3, receiving a printing command, and extracting corresponding printing data from a printing memory by taking the logic channel as a unit;
and S4, processing the print data according to the print parameters and inputting the processed print data into a corresponding physical channel for printing.
Specifically, all physical channels are divided into a plurality of groups according to printing requirements input by customers, each group corresponds to a production line, each production line comprises x physical channels, x is more than or equal to 1, and x is an integer, wherein when the production line only occupies half of a certain physical channel, the production line is treated as a physical channel in the invention, and if the production line actually occupies 3 half physical channels, the production line comprises 4 physical channels in the invention; and configuring n logical channels for each production line according to the number of the physical channels owned by each production line, wherein the number of the logical channels owned by each production line can be the same as the number of the physical channels owned by each production line, one physical channel corresponds to one logical channel at the moment, and the corresponding printing data extracted from the printing memory by taking the logical channels as units can be accurately input into the corresponding physical channels in the corresponding production lines after the corresponding relations among the production lines, the logical channels and the physical channels are established. When the number of the logical channels owned by each production line is larger than that of the physical channels owned by each production line, a plurality of logical channels corresponding to a certain physical channel or a plurality of logical channels not corresponding to a certain physical channel necessarily exist, when a certain physical channel corresponds to a plurality of logical channels, the corresponding printing data is extracted from a printing memory by taking the logical channel as a unit, then the printing data corresponding to all the logical channels in the physical channels are merged, and then the processing is carried out according to the printing parameters and the input is carried out on the physical channels; and when a certain logical channel does not have a corresponding physical channel, the logical channel does not perform any operation. The printing parameters are generated according to the printing requirements and the characteristics of the printing equipment, and specifically include: the number of nozzles corresponding to the physical channels, the maximum number of channels, the last channel serial number and channel control parameters in each production line, and other parameters related to printing, wherein the physical channels included in each production line can be located in one Onepass printing device or multiple Onepass printing devices, and the specific situation is not limited herein.
Referring to fig. 3, in the present embodiment, each production line is located in the same Onepass printing apparatus, one nozzle corresponds to one physical channel, the number of the physical channels is equal to the number of the logical channels, one physical channel corresponds to one logical channel, no two production lines share one physical channel, the printing apparatus has 12 nozzles, that is, 12 physical channels, and each physical channel is numbered from PCH0 to PCH11, PCH0 represents the first physical channel, PCH1 represents the second physical channel, and PCH3 represents the third physical channel … … PCH11 represents the twelfth physical channel, with a certain end point in the nozzle arrangement direction (X-axis direction) as a starting point and a direction perpendicular to the nozzle arrangement as a printing direction (Y-axis direction). The 12 logic channels are distributed according to the number of the physical channels, the 12 logic channels are numbered from LCH0 to LCH11, LCH0 represents a first logic channel, LCH1 represents a second logic channel … … LCH11 represents a twelfth logic channel, the first logic channel LCH0 corresponds to a first physical channel PCH0, the second logic channel LCH1 corresponds to a second physical channel PCH1, and the like. Determining a production line corresponding to the logical channel corresponding to each physical channel according to the production line corresponding to each physical channel, where in this embodiment, the physical channels PCH0 to PCH2 belong to production line 1, and the logical channels LCH0 to LCH2 belong to production line 1; physical channels PCH 3-PCH 6 belong to production line 2, and logical channels LCH 3-LCH 6 belong to production line 2; the physical channel PCH7 belongs to production line 3, and the logical channel LCH7 belongs to production line 3; physical channels PCH 8-PCH 11 belong to production line 4, and logical channels LCH 8-LCH 11 belong to production line 4; by numbering each physical channel and each logical channel, the relative position of the production line corresponding to each logical channel and each logical channel in the corresponding production line can be determined according to the number, the data length corresponding to each logical channel is equal to the length of the physical channel, the length of the physical channel represents the number of nozzles owned by the physical channel, and the data length of the logical channel can be larger than the length of the physical channel. According to the method, the corresponding relation among the physical channels, the logical channels and the production lines is established, the one-to-one corresponding relation among the physical channels, the logical channels and the production lines is ensured, and further, the independent control of each production line is ensured.
In another embodiment, each production line is located in the same Onepass printing device, one nozzle corresponds to one physical channel, the number of logical channels is greater than that of physical channels, and at least two production lines share one physical channel, the printing device has 12 nozzles in total, that is, 12 physical channels, each physical channel is numbered with a certain end point in the nozzle arrangement direction (X-axis direction) as a starting point, the direction perpendicular to the nozzle arrangement direction is the printing direction (Y-axis direction), in the present embodiment, the leftmost end in the nozzle arrangement direction is taken as a starting point, the number of each physical channel is from PCH0 to PCH11, PCH0 represents the first physical channel, PCH1 represents the second physical channel, and PCH2 represents the third physical channel … … PCH11 represents the twelfth physical channel. In this embodiment, if there are 4 production lines, if the number of logical channels is 4 times of the number of physical channels, 48 logical channels are allocated in total, and the 48 logical channels are numbered from LCH0 to LCH47, LCH0 represents the first logical channel, LCH1 represents the second logical channel … … LCH47 represents the forty-eighth logical channel, logical channels LCH0 to LCH11 belong to production line 1, logical channels LCH12 to LCH23 belong to production line 2, logical channels LCH24 to LCH35 belong to production line 3, and logical channels LCH36 to LCH47 belong to production line 4; by numbering each physical channel and each logical channel, the relative position of the production line corresponding to each logical channel and each logical channel in the corresponding production line can be determined according to the numbers, the data length corresponding to each logical channel is equal to the length of the physical channel, and the length of the physical channel represents the number of nozzles owned by the physical channel. In the embodiment, when the production lines share the physical channel, the plurality of logical channels are configured for each physical channel, and then the plurality of logical channels are distributed to different production lines according to the task parameters, so that the shared physical channel is split into different production lines, and the independent control of each production line is ensured.
Preferably, the printing requirements include: the width information of the product to be printed along the arrangement direction of the spray heads is divided into a plurality of groups according to the printing requirement, and each group corresponds to one production line and comprises the following steps:
and dividing all physical channels in the equipment to be printed into a plurality of groups according to the width information of the products to be printed along the arrangement direction of the spray heads, wherein each group corresponds to one production line, and the production lines are flexibly configured according to customer requirements and are convenient to apply.
Preferably, the printing requirements further include: the information of the number of copies to be printed of a product to be printed; referring to fig. 4, after the step S2, the method further includes:
s01, generating a printing task queue according to the information of the number of copies to be printed of the product to be printed;
s02, reading printing parameters according to the printing task queue, and establishing a target printing task of each production line;
s03, storing the target printing task of each production line into a task processing buffer;
s04, establishing the mapping relation among the physical channel, the logic channel, the production line and the task processing buffer according to the printing requirement.
Specifically, referring to fig. 5, in this embodiment, all the physical channels are divided into 4 groups, i.e., a production line 1, a production line 2, a production line 3, and a production line 4, according to the width of the product to be printed along the arrangement direction of the nozzles, and then, according to the number of copies of the product to be printed, a print job queue is generated for the production line 1, the production line 2, the production line 3, and the production line 4, respectively, in this embodiment, the print job queue of the production line 1 currently has only 1 job queue, i.e., the job queue of the background image in fig. 5, the print job queues of the production line 2 have a plurality of date job queues, i.e., date job queues in fig. 5, such as "10 month 1 day in 2018, 10 month 2 day in 2018, and 10 month 3 day … … in 2018, the print job queues of the production line 3 have a plurality of job queues in fig. 5, i.e., the" rainy day, cloudy day, sunny day … … ", the print job queues of the, 100001, 100002 … … "; the number of printing tasks contained in a printing task queue of four production lines is the same as the number of copies to be printed of products to be printed, then each production line sequentially reads printing parameters according to the printing task queue, a target printing task is established while the printing parameters are read, the target printing task is stored to a certain area in a task processing buffer after the target printing task is established, each production line in the task processing buffer is provided with a corresponding target printing task storage area, each production line is provided with a physical channel and a logical channel which correspond to each other, the mapping relation among the physical channels, the logical channels, the production lines and the task processing buffer can be determined according to the corresponding relation, each production line can be independently controlled according to the mapping relation, and after a printing command is received, corresponding printing data extracted from a printing memory by taking the logical channels as units can be conveniently, quickly and accurately processed according to the mapping relation And inputting a corresponding physical channel for printing.
Preferably, referring to fig. 6, in the present embodiment, the step S3: receiving a printing command, and extracting corresponding printing data from a printing memory by taking the logic channel as a unit specifically comprises the following steps:
s31, receiving a printing command, and extracting the target printing task of each production line from the task processing buffer according to the mapping relation;
and S32, calculating the storage address of the printing data corresponding to the logic channel ignited this time according to the printing parameters of the target printing task, and extracting the corresponding printing data from the printing memory according to the storage address.
Referring to fig. 7, in the present embodiment, the step S32: calculating a storage address of the printing data corresponding to the logic channel ignited this time according to the printing parameters of the target printing task, and extracting the corresponding printing data from the printing memory according to the storage address specifically comprises the following steps:
s321, calculating an actual storage address of the printing data corresponding to the logic channel ignited this time according to the printing parameters of the target printing task;
s322, determining a required reading address of the printing data corresponding to the logic channel according to the printing parameters and the memory addressing requirement of the target printing task;
s323, determining invalid data in the print data to be read according to the actual storage address and the required reading address;
and S324, reading the printing data, removing the invalid data and writing the invalid data into a data cache.
Specifically, in this embodiment, the extraction of the print data requires that the print data are aligned by an integer multiple of bytes, such as 64 bits and 56 bits, but the actually stored print data are misaligned, so that an alignment operation is required when the print data are read, an actual storage address of the print data corresponding to the logic channel at this time can be calculated according to a print parameter, and then a required read address of the print data corresponding to the logic channel is determined according to a memory addressing requirement, so that the data stored in a range from the required read address to the actual storage address is invalid data in the print data, and finally the print data is read, and the invalid data is written into a data cache after being removed, where the print data in the data cache are aligned by an integer multiple of bytes.
Preferably, the print data processing includes: one or more of a masking process, a feathering process, and a merging process. Specifically, the printing data in the data cache and the data determined according to the printing requirements are subjected to related calculation according to the printing parameters, certain physical channels need ink discharging and certain physical channels do not need ink discharging for one-time printing, and the physical channels which do not need ink discharging need shielding processing according to the data extracted by the corresponding logic channels so as not to discharge ink; when certain images need higher printing quality, feathering the images during printing to ensure that the printing effect of the images is better, and specifically performing the AND operation on the printing data corresponding to the images and feathering template data to ensure that the printed images have better effect; when the variable image is printed, each image in a class of variable images has a same background image, and the same position of each image has a variable image which changes according to a certain rule.
Referring to fig. 8, an embodiment of the present invention provides an Onepass printing control apparatus, including:
the production line distribution module 10 is used for dividing all the physical channels into a plurality of groups according to the printing requirements, each group corresponds to one production line, each production line comprises x physical channels, x is more than or equal to 1, and x is an integer;
a logic channel configuration module 20, configured to configure n logic channels for each production line, where n is greater than or equal to x, and n is an integer;
a print data extracting module 30, configured to receive a print command, and extract corresponding print data from the print memory by using the logical channel as a unit;
and the printing module 40 is configured to input the print data into a corresponding physical channel for printing after processing the print data according to the print parameters.
Preferably, the apparatus further comprises: and the triggering printing module is used for reading printing parameters according to the printing task queue, establishing a target printing task of each production line and storing the target printing task of each production line into a task processing buffer. Referring to fig. 9, each production line has a trigger print module for triggering the corresponding production line to establish a target print task, for example, the production line 1 in fig. 9 has a production line 1 trigger print module and a production line 1 task queue, and after being processed by print control, the task is output through the production line 1 output interface and is finally input to the printing device 1; the production line 2 is provided with a production line 2 trigger printing module and a production line 2 task queue, and the tasks are processed by printing control, then are output through an output interface of the production line 2 and finally are input into the printing equipment 2; the production line n is provided with a production line n trigger printing module and a production line n task queue, and the tasks are processed by printing control, then are output through a production line n output interface and finally are input into the printing equipment n; and each production line is ensured to be triggered and controlled independently.
Preferably, the printing requirements include: the width information of the product to be printed along the arrangement direction of the spray heads is divided into a plurality of groups according to the printing requirement, and each group corresponds to one production line and comprises the following steps:
and dividing all physical channels in the equipment to be printed into a plurality of groups according to the width information of the products to be printed along the arrangement direction of the spray heads, wherein each group corresponds to one production line.
Preferably, the print data extraction module 30 further includes:
the target printing task extraction unit is used for receiving a printing command and extracting the target printing task of each production line from the task processing buffer according to the mapping relation;
and the printing data extraction unit is used for calculating the storage address of the printing data corresponding to the logic channel ignited this time according to the printing parameters and extracting the corresponding printing data from the printing memory according to the storage address.
Preferably, the calculating, according to the printing parameter, a storage address of the printing data corresponding to the logic channel at this time of firing, and extracting, according to the storage address, the corresponding printing data from the printing memory further includes:
calculating the actual storage address of the printing data corresponding to the logic channel ignited this time according to the printing parameters;
determining a required reading address of the printing data corresponding to the logic channel according to the printing parameters and the memory addressing requirement;
determining invalid data in the print data to be read according to the actual storage address and the required reading address;
and reading the printing data, removing the invalid data and writing the invalid data into a data cache.
In addition, the Onepass printing control method of the embodiment of the present invention described in conjunction with fig. 2 may be implemented by an Onepass printing control apparatus. Fig. 10 is a schematic diagram illustrating a hardware structure of the Onepass print control apparatus according to the embodiment of the present invention.
The Onepass print control device may include a processor 401 and memory 402 storing computer program instructions.
Specifically, the processor 401 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured as one or more Integrated circuits implementing embodiments of the present invention.
Memory 402 may include mass storage for data or instructions. By way of example, and not limitation, memory 402 may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, tape, or Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 402 may include removable or non-removable (or fixed) media, where appropriate. The memory 402 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 402 is a non-volatile solid-state memory. In a particular embodiment, the memory 402 includes Read Only Memory (ROM). Where appropriate, the ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory or a combination of two or more of these.
The processor 401 reads and executes the computer program instructions stored in the memory 402 to implement any one of the Onepass printing control methods in the above embodiments.
In one example, the Onepass print control device may also include a communication interface 403 and a bus 410. As shown in fig. 10, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 410 to complete communication therebetween.
The communication interface 403 is mainly used for implementing communication between modules, apparatuses, units and/or devices in the embodiments of the present invention.
Bus 410 includes hardware, software, or both that couple the components of the Onepass print control device to each other. By way of example, and not limitation, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hypertransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus or a combination of two or more of these. Bus 410 may include one or more buses, where appropriate. Although specific buses have been described and shown in the embodiments of the invention, any suitable buses or interconnects are contemplated by the invention.
In addition, in combination with the Onepass printing control method in the above embodiments, embodiments of the present invention may provide a computer-readable storage medium to implement. The computer readable storage medium having stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the Onepass printing control methods in the embodiments described above.
In summary, according to the Onepass printing control method, apparatus, device and medium provided in the embodiments of the present invention, all physical channels are divided into a plurality of groups according to the printing requirements, each group corresponds to one production line, n logical channels are configured for each production line, and then data extraction and processing are performed by using the logical channels as a bridge, so that each production line can independently control a corresponding printing task and can accurately print on a predetermined position.
It is to be understood that the invention is not limited to the specific arrangements and instrumentality described above and shown in the drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications and additions or change the order between the steps after comprehending the spirit of the present invention.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this patent describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
As described above, only the specific embodiments of the present invention are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present invention, and these modifications or substitutions should be covered within the scope of the present invention.