Onepass print data high-efficiency processing method, device, equipment and storage medium
By configuring dual-port data cache for pipeline processing, the problem of inefficient data merging in Onepass printing is solved, the data processing is realized within one clock cycle, the printing efficiency is improved, and the nozzle can receive the next print data in a timely manner.
Patent Information
- Application Number
- CN201910761226.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-17
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2039-08-17
AI Technical Summary
Onepass printing is inefficient during data merging, which causes the nozzle to wait for multiple clock cycles to receive the next print data, which cannot match the system print cycle, reducing printing efficiency.
By configuring two data caches for pipeline processing, the data in the first data cache is first stored in the second data cache, then logical operations are performed and the results are stored in the first data cache, and finally read from the first data cache The result is printed, so that the data is fetched and written within one clock cycle, matching the system printing cycle.
The printing efficiency is improved, and the nozzle can receive the next printing data without waiting, which improves the matching degree of data processing efficiency with the system printing cycle.
Smart Images

Figure CN112394887B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of inkjet printing, and in particular relates to a method, device, equipment and storage medium for high-efficiency data processing. Background Art
[0002] Onepass printing has the advantages of high efficiency and high output, and is suitable for large-scale, continuous printing. In order to print various image data from multiple image storage devices on the printing paper, Onepass printing needs to merge the data in the channel during the data processing process, and needs to take out the existing data in the data cache and rewrite it into the cache after calculation with the new data. The reading, calculation and writing operations all require at least one clock cycle, so the data merging operation requires at least 3 clock cycles to complete. It only takes one clock cycle for the print head to get the data for printing. After printing once, the print head needs to wait for two cycles to receive the next print data. Therefore, the data merging operation cycle cannot match the system printing cycle, thereby reducing printing efficiency.
[0003] In the prior art, the patent publication number CN103909730A discloses a method, device and inkjet printer for high-efficiency data processing, and its technical solution mainly combines the use of a processor, an internal memory and an external memory to reduce the cost of image dot matrix data splitting delay processing and improve the image dot matrix data splitting delay processing speed. However, this technical solution does not involve data merging within the printing channel, so it cannot solve the problem of low efficiency in the data merging process within the printing channel. Summary of the invention
[0004] In view of this, the present invention provides a method, device, equipment and storage medium for efficiently processing Onepass printing data, so as to solve the technical problem in the prior art of low printing efficiency caused by merging data in the channel and then rewriting it into the cache during Onepass printing.
[0005] The technical solution adopted by the present invention is:
[0006] A method for efficiently processing Onepass printed data, the method comprising the following steps:
[0007] S1, configuring a second data cache identical to the first data cache for a first data cache storing first print data;
[0008] S2, storing the first print data stored in the first data cache to a corresponding address in the second data cache;
[0009] S3, taking out the first print data and the second print data from the second data buffer and performing a logic operation;
[0010] S4, storing the result of the logic operation into corresponding addresses in the first data cache and the second data cache;
[0011] S5. Output and print the result of the logic operation stored in the first data cache.
[0012] As a preferred technical solution of the above-mentioned Onepass print data high-efficiency processing method, the step S5 further includes the following steps:
[0013] S6, storing the next first print data stored in the first data cache to a corresponding address in the second data cache;
[0014] S7, taking out the next first print data from the second data buffer and performing a logic operation with the corresponding second print data;
[0015] S8, storing the result of the logic operation obtained in step S7 to a corresponding address in the first data cache;
[0016] S9, outputting and printing the result of the logic operation stored in the first data cache;
[0017] S10, repeating the above steps S6 to S9 until all the first print data printed by the Onepass are processed.
[0018] As a preferred technical solution for the above-mentioned Onepass printing data high-efficiency processing method, the result of each logical operation is output to a corresponding physical channel for output printing.
[0019] As a preferred technical solution of the above-mentioned Onepass print data efficient processing method, the logical operation includes a logical AND operation, a logical NOT operation and / or a logical OR operation.
[0020] As a preferred technical solution for the above-mentioned Onepass print data efficient processing method, the first data cache and the second data cache are both dual-port data caches.
[0021] As a preferred technical solution for the above-mentioned Onepass printing data efficient processing method, the first printing data is label image data.
[0022] As a preferred technical solution of the above-mentioned Onepass printing data efficient processing method, the second printing data is background image data.
[0023] As a preferred technical solution of the above-mentioned Onepass print data high-efficiency processing method, the step S5 also includes the following steps:
[0024] The result of the logic operation is stored in the corresponding address in the second data cache.
[0025] On the other hand, the present invention also provides a Onepass print data high-efficiency processing device, comprising:
[0026] A data cache configuration module, configured to configure a second data cache identical to the first data cache for a first data cache storing first print data;
[0027] A first data storage module, used for storing the first print data stored in the first data cache to a corresponding address in the second data cache;
[0028] A data operation module, used for taking out the first printing data and the second printing data from the second data buffer to perform a logic operation;
[0029] A second data storage module, used for storing the result of the logic operation into corresponding addresses in the first data cache and the second data cache;
[0030] A printing module is used to output and print the result of the logic operation stored in the first data cache.
[0031] As a preferred technical solution of the above-mentioned Onepass print data efficient processing device, the logical operation includes a logical AND operation, a logical NOT operation and / or a logical OR operation.
[0032] As a preferred technical solution for the above-mentioned Onepass print data high-efficiency processing device, the first data cache and the second data cache are both dual-port data caches.
[0033] As a preferred technical solution of the above-mentioned Onepass printing data efficient processing device, the first printing data is label image data.
[0034] As a preferred technical solution of the above-mentioned Onepass printing data efficient processing device, the second printing data is background image data.
[0035] As a preferred technical solution for the above-mentioned Onepass print data high-efficiency processing device, the second data storage module is also used to store the result of the logical operation to the corresponding address in the second data cache.
[0036] In a third aspect, the present invention further provides a Onepass printing device, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, wherein when the computer program instructions are executed by the processor, any one of the above-mentioned Onepass printing data efficient processing methods is implemented.
[0037] In a fourth aspect, the present invention further provides a storage medium, which implements any of the above-mentioned Onepass print data efficient processing methods when the computer program instructions are executed by a processor.
[0038] In summary, the beneficial effects of the present invention are as follows:
[0039] The present invention stores the first print data stored in the first data cache into the second data cache, performs a logic operation on the first print data stored in the second data cache and the second print data, stores the result of the logic operation in the first data cache, and finally reads the result of the logic operation in the first data cache for printing; it establishes two data caches to perform pipeline processing on the print data, so that the print data is taken out from the target address in the cache, and then written into the cache target address after calculation within one clock cycle. The data processing cycle matches the system printing cycle, so the nozzle can receive the next print data without waiting, thereby improving the printing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 is a schematic diagram of the structure of a target image to be printed in Embodiment 1 of the present invention;
[0041] Figure 2 This is a schematic diagram of the structure of image A in the target image to be printed in embodiment 1 of the present invention;
[0042] Figure 3 This is a schematic diagram of the structure of a B image in a target image to be printed according to Embodiment 1 of the present invention;
[0043] Figure 4 This is a schematic diagram of the structure of buff01 in Example 1 of the present invention;
[0044] Figure 5 It is a schematic diagram of the structure of buff01' in Example 1 of the present invention;
[0045] Figure 6 Schematic diagram of the structure of buff11 in Example 1 of the present invention;
[0046] Figure 7 is a schematic diagram of the structure of a target image to be printed in Embodiment 3 of the present invention;
[0047] Figure 8 is a schematic diagram of the structure of a target image to be printed in Embodiment 4 of the present invention;
[0048] Fig. 9 This is a schematic diagram of the structure of image A in the target image to be printed in embodiment 4 of the present invention;
[0049] Fig.10Schematic diagram of the structure of the B image in the target image to be printed in embodiment 4 of the present invention. DETAILED DESCRIPTION
[0050] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.
[0051] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0052] Embodiment 1:
[0053] The purpose of the embodiment 1 of the present invention is to print out Figure 1 The image shown is that image A and image B are printed on the same substrate, and image A and image B are both independent images. In this embodiment 1, image A is background image data, and image B is label image data (that is, image A is a constant background, image B is a specific label, and printing image A and image B at the same time is to print the label image on one side of the background image, and the label is, for example, the number "1122445669" representing the product model, and the label image can be changed).
[0054] In the embodiment 1 of the present invention, the number of nozzles (one nozzle corresponds to one printing channel) of the Onepass printing device is 7, and the starting point of all printing channels is Figure 1At the coordinate (0,0), the 7 nozzles are arranged in sequence along the X-axis. During Onepass printing, the print medium moves in the Y-axis. From left to right, the 7 nozzles are the first nozzle P1, the second nozzle P2, the third nozzle P3, the fourth nozzle P4, the fifth nozzle P5, the sixth nozzle P6 and the seventh nozzle P7. There are 100 nozzles in one nozzle (one nozzle corresponds to one pixel).
[0055] When the printing system prints image A alone, a data cache is set for each nozzle in the printing system, and each data cache stores the data in the nozzle corresponding to the data cache. The seven data caches are buff01, buff02, buff03, buff04, buff05, buff06 and buff07 (buff01, buff02, buff03, buff04, buff05, buff06 and buff07 correspond to the first nozzle P1, the second nozzle P2, the third nozzle P3, the fourth nozzle P4, the fifth nozzle P5, the sixth nozzle P6 and the seventh nozzle P7, respectively), and these seven data caches can be accessed simultaneously. In this embodiment, each data cache is a dual-port data cache (of course, the data cache can also use a single-port data cache, and the type of data cache is not limited here), such as Figure 4 As shown, the first address of buff01 is addrA01, the data in the first address is iDataA01, the second address of buff01 is addrB01, the data in the second address is oDataB01, and the structure of the remaining data caches is similar to that of the data cache buff01.
[0056] like Figure 2As shown in the figure, the width of image A along the nozzle arrangement direction is 290 pixels, and the starting printing position of image A is the 30th pixel position of the third nozzle. A printing coordinate system with pixels as the basic unit is established, and the starting point coordinates of all printing channels are set to (0,0). When the Y-axis coordinate value is 350, the starting printing image coordinate value of image A on the X-axis in the printing coordinate system is 230 and the ending printing image coordinate value is 520. At this time, the printing range of the image on the X-axis is 230 to 520. It can be seen that the print data corresponding to each nozzle stored in buff01, buff02 and buff07 is "0", and the print data corresponding to each nozzle stored in buff04 and buff05 is "1"; the print data corresponding to the first 30 nozzles stored in buff03 is "0", and the print data corresponding to the last 70 nozzles stored in buff03 is "1"; the print data corresponding to the first 30 nozzles stored in buff06 is "1", and the print data corresponding to the last 70 nozzles stored in buff06 is "0". (buff01, buff02, buff03, buff04, buff05, buff06 and buff07 are the data caches of each nozzle when printing image A separately)
[0057] When the printing system prints image B alone, a data cache is provided for each nozzle in the printing system, and each data cache stores data in the nozzle corresponding to the data cache. The seven data caches are buff01', buff02', buff03', buff04', buff05', buff06' and buff07' (buff01', buff02', buff03', buff04', buff05', buff06' and buff07' correspond to the first nozzle P1, the second nozzle P2, the third nozzle P3, the fourth nozzle P4, the fifth nozzle P5, the sixth nozzle P6 and the seventh nozzle P7 respectively, and the data stored in buff01', buff02', buff03', buff04', buff05', buff06' and buff07' are data to be written), and these seven data caches can be accessed simultaneously. Each data cache is a dual-port data cache (of course, the data cache can also be a single-port data cache, and the type of data cache is not limited here). Figure 5 As shown, the first address of buff01' is addrA01', the data in the first address is iDataA01', the second address of buff01' is addrB01', the data in the second address is oDataB01', and the structure of the remaining data caches is similar to that of the data cache buff01'.
[0058] like Figure 3As shown in the figure, the width of image B along the nozzle arrangement direction is 110 pixels, and the starting printing position of image B is the 50th pixel position of the first nozzle. When the Y-axis coordinate value is 350, the starting printing image coordinate value of image B on the X-axis in the printing coordinate system is 50 and the ending printing image coordinate value is 160, then the printing range of the image on the X-axis is 50 to 160. It can be seen from this that the print data corresponding to each nozzle stored in buff03', buff04', buff05', buff06' and buff07' is "0", the print data corresponding to the first 50 nozzles stored in buff01' is "0", and the print data corresponding to the last 50 nozzles stored in buff01' is "1"; the print data corresponding to the first 60 nozzles stored in buff02' is "1", and the print data corresponding to the last 40 nozzles stored in buff02' is "0" (buff01', buff02', buff03', buff04', buff05', buff06' and buff07' are the data caches of each nozzle when printing image B separately).
[0059] To combine image A and image B Figure 3 As shown in the figure, when printing on the same substrate, the data cached in the corresponding nozzles in image A and image B must be processed and then read into the nozzle. The Onepass print data high-efficiency processing method in embodiment 1 of the present invention specifically includes the following steps (taking the first nozzle as an example):
[0060] S1, set a data cache buff11 (buff11 is equivalent to the second data cache) with the same structure as the data cache buff01 (buff01 is equivalent to the first data cache), such as Figure 6 As shown, the first address of buff11 is addrA11, the data in the first address is iDataA11, the second address of buff11 is addrB11, and the data in the second address is oDataB11;
[0061] S2, connect the first address addrA11 of buff11 to the second address addrB01 of buff01, and the first address addrA11 of buff11 obtains the first print data in the second address addrB01 of buff01 (this step has one clock delay); at this time, the data stored in the data cache buff11 and the data stored in buff01 are both the first print data (that is, buff11 serves as a shadow cache of buff01);
[0062] S3, performing a logical OR operation on the data oDataB11 (first print data) in the second address addrB11 of buff11 and the data oDataB01' (second print data) in the second address addrB01' of buff01' to obtain a result (this step has one clock delay);
[0063] For example, when the Y-axis coordinate value is 350, the 55th nozzle printing data (value "1") stored in buff11 and the 55th nozzle printing data (value "0") stored in buff01' are ORed together to obtain a printing data value of "1".
[0064] S4, storing the calculation results obtained in step S3 into the first address addrA01 of buff01 and the first address addrA11 of buff11 respectively (this step has one clock delay);
[0065] S5. Read the data iDataB01 from the second address addrB01 of buff01 as print data and input it into the first nozzle for inkjet.
[0066] As shown in the above steps S1 to S5, the printing data is realized within one clock cycle through double-buffer (two data caches) pipeline processing, and the operations of taking out the target address from the cache, completing the calculation and then writing into the cache target address are completed; its data processing cycle matches the system printing cycle, so the nozzle can receive the next printing data without waiting, thereby improving printing efficiency.
[0067] The data processing process of the remaining nozzles is the same as that of the first nozzle, that is, the data in buff01 and buff01' are ORed, the data in buff02 and buff02' are ORed, the data in buff03 and buff03' are ORed, the data in buff04 and buff04' are ORed, the data in buff05 and buff05' are ORed, the data in buff06 and buff06' are ORed, and the data in buff07 and buff07' are ORed.
[0068] Multi-channel merging is to merge (logical operation) the data of multiple channels when printing images A and B separately, thereby forming the print data of the print target.
[0069] Embodiment 2:
[0070] The Onepass print data high-efficiency processing method in Example 2 of the present invention is improved on the basis of the Onepass print data high-efficiency processing method in Example 1. Specifically, the Onepass print data high-efficiency processing method in Example 2 specifically includes the following steps:
[0071] S1, set a data cache buff11 (buff11 is equivalent to the second data cache) with the same structure as the data cache buff01 (buff01 is equivalent to the first data cache), such as Figure 6 As shown, the first address of buff11 is addrA11, the data in the first address is iDataA11, the second address of buff11 is addrB11, and the data in the second address is oDataB11;
[0072] S2, connect the first address addrA11 of buff11 to the second address addrB01 of buff01, and the first address addrA11 of buff11 obtains the first print data in the second address addrB01 of buff01 (this step has one clock delay); at this time, the data stored in the data cache buff11 and the data stored in buff01 are both the first print data (that is, buff11 serves as a shadow cache of buff01);
[0073] S3, performing a logical OR operation on the data oDataB11 (first print data) in the second address addrB11 of buff11 and the data oDataB01' (second print data) in the second address addrB01' of buff01' to obtain a result (this step has one clock delay);
[0074] For example, when the Y-axis coordinate value is 350, the 55th nozzle printing data (value "1") stored in buff11 and the 55th nozzle printing data (value "0") stored in buff01' are ORed together to obtain a printing data value of "1".
[0075] S4, storing the calculation results obtained in step S3 into the first address addrA01 of buff01 and the first address addrA11 of buff11 respectively (this step has one clock delay);
[0076] S5. Read the data iDataB01 from the second address addrB01 of buff01 as print data and input it into the first nozzle for inkjet (after the inkjet is completed, the first nozzle prints a horizontal row of ink with a Y-axis coordinate value of 350).
[0077] S6. Data cache buff01 receives the next first print data (the first print data with the Y-axis coordinate value of the 351st in Figure A), and data cache buff01' receives the next second print data (the first print data with the Y-axis coordinate value of the 351st in Figure B). The first address addrA11 of buff11 obtains the next first print data in the second address addrB01 of buff01 (this step has a clock delay); at this time, the data stored in the data cache buff11 and the data stored in buff01 are both the next first print data;
[0078] S7, perform a logical OR operation on the data oDataB11 (the next first print data) in the second address addrB11 of buff11 and the data oDataB01' (the next second print data) in the second address addrB01' of buff01' to obtain a result (this step has one clock delay);
[0079] For example, when the Y-axis coordinate value is 351, the 55th nozzle printing data (value "1") stored in buff11 and the 55th nozzle printing data (value "0") stored in buff01' are ORed together to obtain a printing data value of "1".
[0080] S8, storing the calculation results obtained in step S7 into the first address addrA01 of buff01 and the first address addrA11 of buff11 respectively (this step has one clock delay);
[0081] S9, output and print the result of the logical operation stored in the data buffer buff01;
[0082] S10, repeat the above steps S6 to S9 until all the first print data printed by Onepass are processed (the value of the first print data is different depending on the Y coordinate). After step S10 is completed, the printout is printed. Figure 1 Image shown.
[0083] Embodiment 3:
[0084] like Figure 7 As shown, the image to be printed in Embodiment 3 of the present invention is the image to be printed in Embodiment 1 with image C added to the right of image A. In this Embodiment 3, image A is background image data, image B is first label image data, and image C is second label data (i.e., image A is an unchanging background, image B is a specific label, and image C is also a specific label).
[0085] When the printing system prints image C alone, a data cache is set for each nozzle in the printing system, and each data cache stores data in the nozzle corresponding to the data cache. The seven data caches are buff01", buff02", buff03", buff04", buff05", buff06" and buff07" (buff01", buff02", buff03", buff04", buff05", buff06" and buff07" correspond to the first nozzle P1, the second nozzle P2, the third nozzle P3, the fourth nozzle P4, the fifth nozzle P5, the sixth nozzle P6 and the seventh nozzle P7 respectively), and these seven data caches can be accessed simultaneously. Each data cache is a dual-port data cache. The first address of buff01" is addrA01", the data in the first address is iDataA01", the second address of buff01" is addrB01", the data in the second address is oDataB01", the structure of the remaining data cache is similar to the structure of data cache buff01".
[0086] The width of image C along the nozzle arrangement direction is 100 pixels, and the starting printing position of image C is the 70th pixel position of the sixth nozzle (the 70th pixel from left to right). When the Y-axis coordinate value is 350, the starting printing image coordinate value of image C on the X-axis in the printing coordinate system is 570 and the ending printing image coordinate value is 670, so the printing range of the image on the X-axis is 570 to 670. It can be seen that the print data corresponding to each nozzle stored in buff01", buff02", buff03", buff04" and buff05" is "0", the print data corresponding to the first 70 nozzles stored in buff06" is "0", and the print data corresponding to the last 30 nozzles stored in buff06" is "1"; the print data corresponding to the first 70 nozzles stored in buff07" is "1", and the print data corresponding to the last 30 nozzles stored in buff07" is "0" (buff01", buff02", buff03", buff04", buff05", buff06" and buff07" are the data caches of each nozzle when printing image C separately).
[0087] The method for processing Onepass print data in Example 3 is to execute the method for processing Onepass print data in Example 1 twice, and the specific steps are as follows (taking the first nozzle as an example):
[0088] S1, set a data cache buff11 with the same structure as data cache buff01;
[0089] S2, connect the first address addrA11 of buff11 to the second address addrB01 of buff01, and the first address addrA11 of buff11 obtains the first print data in the second address addrB01 of buff01 (this step has one clock delay);
[0090] S3, performing a logical OR operation on the data oDataB11 (first print data) in the second address addrB11 of buff11 and the data oDataB01' (second print data) in the second address addrB01' of buff01' to obtain a first operation result (this step has one clock delay);
[0091] For example, when the Y-axis coordinate value is 350, the 55th nozzle printing data (value "1") stored in buff11 and the 55th nozzle printing data (value "0") stored in buff01' are ORed together to obtain a printing data value of "1".
[0092] S4, storing the first operation result obtained in step S3 into the first address addrA01 of buff01 and the first address addrA11 of buff11 respectively (this step has one clock delay);
[0093] S5, connect the first address addrA11 of buff11 to the second address addrB01 of buff01, and the first address addrA11 of buff11 obtains the data in the second address addrB01 of buff01 (this step has one clock delay);
[0094] S6, performing a logical OR operation on the data oDataB11 in the second address addrB11 of buff11 and the data oDataB01" (third print data) in the second address addrB01" of buff01", to obtain a second operation result (this step has one clock delay);
[0095] For example, when the Y-axis coordinate value is 350, the 55th nozzle printing data stored in buff11 (value "1") and the 55th nozzle printing data stored in buff01" (value "0") are ORed together, and the resulting printing data value is "1".
[0096] S7, storing the second operation result obtained in step S6 into the first address addrA01 of buff01 and the first address addrA11 of buff11 respectively (this step has one clock delay);
[0097] S8. Read the data iDataB01 from the second address addrB01 of buff01 as print data and input it to the first nozzle for inkjet.
[0098] As shown in the above steps S1 to S8, the double-buffer pipeline operation can also realize the operation of taking out the target address from the cache, completing the calculation and then writing the print data into the cache target address within one clock cycle.
[0099] The rest of the working principle of Example 3 is the same as that of Example 1.
[0100] Embodiment 4:
[0101] The purpose of embodiment 4 of the present invention is to print out Figure 8 The image shown (i.e. Figure 8 ), Figure 8 The image in is Fig. 9 Remove the image A in Fig.10 The image A and the image B are both independent images.
[0102] The number of nozzles (one nozzle corresponds to one printing channel) of the Onepass printing device in Example 1 of the present invention is 7, which are respectively the first nozzle P1, the second nozzle P2, the third nozzle P3, the fourth nozzle P4, the fifth nozzle P5, the sixth nozzle P6 and the seventh nozzle P7 from left to right. There are 100 nozzles in one nozzle (one nozzle corresponds to one pixel).
[0103] When the printing system prints image A alone, a data cache is set for each nozzle in the printing system, and each data cache stores the data in the nozzle corresponding to the data cache. The seven data caches are buff01, buff02, buff03, buff04, buff05, buff06 and buff07 (buff01, buff02, buff03, buff04, buff05, buff06 and buff07 correspond to the first nozzle P1, the second nozzle P2, the third nozzle P3, the fourth nozzle P4, the fifth nozzle P5, the sixth nozzle P6 and the seventh nozzle P7, respectively), and these seven data caches can be accessed simultaneously. Each data cache is a dual-port data cache, such as Figure 4 As shown, the first address of buff01 is addrA01, the data in the first address is iDataA01, the second address of buff01 is addrB01, the data in the second address is oDataB01, and the structure of the remaining data caches is similar to that of the data cache buff01.
[0104] like Figure 2As shown in the figure, the width of image A along the nozzle arrangement direction is 290 pixels, and the starting printing position of image A is the 30th pixel position of the third nozzle. A printing coordinate system with pixels as the basic unit is established, and the starting point coordinates of all printing channels are set to (0,0). When the Y-axis coordinate value is 350, the starting printing image coordinate value of image A on the X-axis in the printing coordinate system is 230 and the ending printing image coordinate value is 520. At this time, the printing range of the image on the X-axis is 230 to 520. It can be seen that the print data corresponding to each nozzle stored in buff01, buff02 and buff07 is "0", and the print data corresponding to each nozzle stored in buff04 and buff05 is "1"; the print data corresponding to the first 30 nozzles stored in buff03 is "0", and the print data corresponding to the last 70 nozzles stored in buff03 is "1"; the print data corresponding to the first 30 nozzles stored in buff06 is "1", and the print data corresponding to the last 70 nozzles stored in buff06 is "0". (buff01, buff02, buff03, buff04, buff05, buff06 and buff07 are the data caches of each nozzle when printing image A separately)
[0105] When the printing system prints image B alone, a data cache is set for each nozzle in the printing system, and each data cache stores the data in the nozzle corresponding to the data cache. The seven data caches are buff01', buff02', buff03', buff04', buff05', buff06' and buff07' (buff01', buff02', buff03', buff04', buff05', buff06' and buff07' correspond to the first nozzle P1, the second nozzle P2, the third nozzle P3, the fourth nozzle P4, the fifth nozzle P5, the sixth nozzle P6 and the seventh nozzle P7, respectively), and these seven data caches can be accessed simultaneously. Each data cache is a dual-port data cache, such as Figure 5 As shown, the first address of buff01' is addrA01', the data in the first address is iDataA01', the second address of buff01' is addrB01', the data in the second address is oDataB01', and the structure of the remaining data caches is similar to that of the data cache buff01'.
[0106] like Figure 3As shown in the figure, the width of image B along the nozzle arrangement direction is 110 pixels, and the starting printing position of image B is the 80th pixel position of the third nozzle. When the Y-axis coordinate value is 350, the starting printing image coordinate value of image B on the X-axis in the printing coordinate system is 280 and the ending printing image coordinate value is 390, so the printing range of the image on the X-axis is 280 to 390. It can be seen that the print data corresponding to each nozzle stored in buff01', buff02', buff05', buff06' and buff07' is "0", the print data corresponding to the first 80 nozzles stored in buff03' is "0", and the print data corresponding to the last 20 nozzles stored in buff01' is "1"; the print data corresponding to the first 90 nozzles stored in buff04' is "1", and the print data corresponding to the last 10 nozzles stored in buff02' is "0" (buff01', buff02', buff03', buff04', buff05', buff06' and buff07' are the data caches of each nozzle when printing image B separately).
[0107] To print out Figure 8 For the image shown, the data cached in the corresponding nozzles in image A and image B must be processed before being read into the nozzle. The data high-efficiency processing method in embodiment 4 of the present invention specifically includes the following steps (taking the first nozzle as an example):
[0108] S1. Set a data cache buff11 with the same structure as data cache buff01. The first address of buff11 is addrA11, the data in the first address is iDataA11, the second address of buff11 is addrB11, and the data in the second address is oDataB11.
[0109] S2, connect the first address addrA11 of buff11 to the second address addrB01 of buff01, and the first address addrA11 of buff11 obtains the data in the second address addrB01 of buff01 (this step has one clock delay); at this time, the print data stored in the data cache buff11 is the same as the print data stored in buff01 (that is, buff11 serves as a shadow cache of buff01);
[0110] S3, performing a logical operation on the data oDataB11 in the second address addrB11 of buff11 and the data oDataB01' in the second address addrB01' of buff01' to obtain a result (this step has one clock delay);
[0111] The specific logic operation in step S3 is to first perform a logical negation operation on the data oDataB01' to obtain the operation result oDataC, and then perform an AND operation on the data oDataC and the data oDataB11. For example, when the Y-axis coordinate value is 350, first perform a logical negation operation on the 55th nozzle printing data (value "0") stored in buff01' to obtain the operation result oDataC (value "1"), and then perform a logical AND operation on oDataC (value "1") and the 55th nozzle printing data (value "0") stored in buff11 to obtain the final operation result.
[0112] S4, storing the final calculation result obtained in step S3 into the first address addrA01 of buff01 and the first address addrA11 of buff11 respectively (this step has one clock delay);
[0113] S5. Read the data iDataB01 from the second address addrB01 of buff01 as print data and input it into the first nozzle for inkjet.
[0114] As shown in the above steps S1 to S5, the double-buffer pipeline operation is used to implement the operation of taking out the target address from the cache, completing the calculation, and then writing the print data into the cache target address within one clock cycle.
[0115] The data processing process of the remaining nozzles is the same as that of the first nozzle, that is, the data in buff01 and buff01' are ORed, the data in buff02 and buff02' are ORed, the data in buff03 and buff03' are ORed, the data in buff04 and buff04' are ORed, the data in buff05 and buff05' are ORed, the data in buff06 and buff06' are ORed, and the data in buff07 and buff07' are ORed.
[0116] In addition, in combination with the data high-efficiency processing method in the above-mentioned embodiments 1 to 5, the embodiment of the present invention can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any of the Onepass print data high-efficiency processing methods in the above-mentioned embodiments is implemented.
[0117] Embodiment 5:
[0118] Embodiment 5 of the present invention discloses a Onepass print data high-efficiency processing device, comprising the following modules:
[0119] A cache establishment module is used to set a data cache buff1 that is the same as the existing data cache buff0;
[0120] A data storage module, used for storing the print data stored in the data buffer buff0 into the data buffer buff1;
[0121] A data operation module, used for performing a logic operation on the print data stored in the data buffer buff1 and the print data to be merged, and then storing the resultant data in the data buffers buff0 and buff1;
[0122] Data reading module, used to read data from buff0.
[0123] Through the coordinated work of the above modules, a double buffer (two data buffers) is established to perform pipeline processing on the print data, so that the print data can be taken out from the target address in the cache, calculated, and then written into the cache target address within one clock cycle; the data processing cycle matches the system printing cycle, so the nozzle can receive the next print data without waiting, thereby improving printing efficiency.
[0124] Embodiment 6:
[0125] Embodiment 6 of the present invention discloses a Onepass printing device, which may include a processor and a memory storing computer program instructions. The processor may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present invention.
[0126] The memory may include a large capacity memory for data or instructions. By way of example and not limitation, the memory may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory may include a removable or non-removable (or fixed) medium. Where appropriate, the memory may be inside or outside a data processing device. In a particular embodiment, the memory is a non-volatile solid-state memory. In a particular embodiment, the memory includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or a flash memory or a combination of two or more of these.
[0127] The processor implements any one of the Onepass print data efficient processing methods in the above embodiments by reading and executing computer program instructions stored in the memory.
[0128] The Onepass print data high-efficiency processing method, device, equipment and storage medium provided by the present invention are described in detail above. The principle and implementation mode of the present invention are described in detail using specific examples herein. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification is only the implementation mode of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the content of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention. It should not be understood as limiting the present invention.
Claims
1. A method for efficiently processing Onepass print data, characterized in that: The data high-efficiency processing method comprises the following steps: S1, configuring a second data cache identical to the first data cache for a first data cache storing first print data; S2, storing the first print data stored in the first data cache to a corresponding address in the second data cache; S3, taking out the first print data and the second print data from the second data buffer and performing a logic operation; S4, storing the result of the logic operation into corresponding addresses in the first data cache and the second data cache; S5, inputting the result of the logic operation stored in the first data cache as print data to the nozzle for inkjet; The data high-efficiency processing method enables the printing data processing cycle to match the system printing cycle, and the nozzle can receive the next printing data without waiting.
2. The Onepass print data efficient processing method according to claim 1, characterized in that: The step S5 further includes the following steps: S6, storing the next first print data stored in the first data cache to a corresponding address in the second data cache; S7, taking out the next first print data from the second data buffer and performing a logic operation with the corresponding second print data; S8, storing the result of the logic operation obtained in step S7 to a corresponding address in the first data cache; S9, outputting and printing the result of the logic operation stored in the first data cache; S10, repeating the above steps S6 to S9 until all the first print data printed by the Onepass are processed.
3. The Onepass print data efficient processing method according to any one of claims 1 to 2, characterized in that: The logic operation includes a logic AND operation, a logic NOT operation and / or a logic OR operation.
4. The Onepass print data efficient processing method according to claim 3, characterized in that: The first data cache and the second data cache are both dual-port data caches.
5. The Onepass print data efficient processing method according to claim 4, characterized in that: The first printing data is label image data.
6. The Onepass print data efficient processing method according to claim 5, characterized in that: The second printing data is background image data.
7. A Onepass print data high-efficiency processing device, characterized in that: The processing device comprises: A data cache configuration module, configured to configure a second data cache identical to the first data cache for a first data cache storing first print data; A first data storage module, used for storing the first print data stored in the first data cache to a corresponding address in the second data cache; A data operation module, used for taking out the first printing data and the second printing data from the second data buffer to perform a logic operation; A second data storage module, used for storing the result of the logic operation into corresponding addresses in the first data cache and the second data cache; A printing module, used for inputting the result of the logic operation stored in the first data buffer as printing data to the nozzle for inkjet; The processing device makes the cycle of printing data processing match with the system printing cycle, and the nozzle can receive the next printing data without waiting.
8. A Onepass printing device, characterized in that: The printing device comprises: at least one processor, at least one memory, and computer program instructions stored in the memory, and when the computer program instructions are executed by the processor, the method according to any one of claims 1 to 6 is implemented.
9. A storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.
