Data equally-dividing method of rolling mask and printing method of thermal printer

By using the data aliquoting method of scrolling masks in the thermal printer, the mask group in the preset mask table and the data to be printed are used to perform calculations, which solves the problem of long printing operation time of the thermal printer, and achieves faster printing speed and more uniform printing density.

CN119806442APending Publication Date: 2025-04-11ZHUHAI JIUYIN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411882377.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

Existing thermal printers have a long calculation time when printing, especially when printing in large sizes, resulting in too long running time.

Method used

The data aliquoting method of scroll mask is used to perform and calculate the mask group in the preset mask table and the data to be printed to achieve equal division of data, thereby improving the calculation speed during printing.

Benefits of technology

It effectively improves the printing speed of thermal printers, reduces calculation time, and ensures the consistency of the density of the printed content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806442A_ABST
    Figure CN119806442A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of thermal printers, in particular to a rolling mask data equally-dividing and thermal printer printing method, and the method comprises the steps: obtaining to-be-printed data and an equally-dividing number of the to-be-printed data; according to the equal score of the to-be-printed data, a corresponding mask group is determined in a preset mask table, and the preset mask table comprises mask groups corresponding to different equal scores; and performing AND operation on the to-be-printed data and the masks in the determined mask group, and determining each obtained AND operation result as equally divided data of the to-be-printed data. According to the method, the data to be printed and the masks in the mask group are subjected to AND operation, the data to be printed are equally divided, the operation speed of the thermal printer during printing is effectively increased, the calculation time is shortened, and finally the printing speed of the thermal printer is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of thermal printers, and in particular to a data equalization method of a rolling mask and a thermal printer printing method. Background Art

[0002] Because the printing principle of thermal printers is to develop consumables by heating them at hot spots, the current is too large during heating, and currently portable thermal printers are all powered by lithium batteries, and the current supply is limited. And due to the limitations of the print head material, the current of one-time heating cannot exceed the limit. Usually, during production, print head manufacturers will separate multiple heating switches STB and heat them in sections. However, when the number of heating points in each section is inconsistent or even very different, the different number of heating points will cause the current passing through each section to be very different, resulting in different heating energy for each section, and resulting in obvious differences in heating concentration between sections. In addition, the current of some points is too large, and the voltage drops sharply, which cannot be compensated by changing the heating time through the algorithm.

[0003] In order to solve the difference between segments due to the large difference in current and voltage, the common practice in the market is to evenly distribute the number of points that need to be heated to multiple heating segments. This process is not physically segmented, but the algorithm is used to split two adjacent heating points into two heating segments for two heatings. In this way, the number of points heated in each segment can be the same, and the voltage and current of each heating segment can be consistent, avoiding different heating concentrations in each segment. However, this method has the following obvious defects: Since each BIT of the print data must be judged, calculated, and moved to the cache, the running time is too long. When calculating on a small-size printer, this phenomenon is not very obvious, but when used on a large-size printer (such as A4), it will be obvious that the running time is too long. Summary of the invention

[0004] The purpose of the present invention is to provide a rolling mask data equal division and thermal printer printing method, which is used to solve the problem of long printing operation time of existing thermal printers.

[0005] In order to solve the above technical problems, in a first aspect, the present invention provides a data equal division method of a rolling mask, comprising the following steps:

[0006] Obtaining data to be printed and equal fractions of the data to be printed;

[0007] According to the number of equal parts of the data to be printed, a corresponding mask group is determined in a preset mask table, wherein the preset mask table contains mask groups corresponding to different number of equal parts;

[0008] An AND operation is performed on the data to be printed and the masks in the determined mask group, and each obtained AND operation result is determined as the equally divided data of the data to be printed.

[0009] In combination with the above-mentioned first aspect, in some possible implementations, the preset mask table is a two-dimensional array, the first dimension data in the two-dimensional array is an equal number, and the second dimension data in the two-dimensional array is a mask group corresponding to different equal numbers.

[0010] In combination with the first aspect above, in some possible implementations, the value of the equal fraction is all integers in the range of [1, 8], and each mask in the mask group is a byte of 8 BIT bits.

[0011] In combination with the above-mentioned first aspect, in some possible implementations, when the equal number is 1, 2, 3, 4, 5, 6, 7, and 8, the mask groups corresponding to different equal numbers in the second dimension data in the two-dimensional array are: {0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x55, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x92, 0x49, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x 88,0x44,0x22,0x11,0x00,0x00,0x00,0x00}, {0x84,0x42,0x21,0x10,0x08,0x00,0x00,0x00}, {0x82,0x41,0x20,0x10,0 x08,0x04,0x00,0x00}, {0x81,0x40,0x20,0x10,0x08,0x04,0x02,0x00}, {0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01}.

[0012] In combination with the first aspect, in some possible implementations, performing an AND operation on the to-be-printed data and the determined mask in the mask group includes:

[0013] According to the order of the non-zero valid masks in the mask group from front to back, each byte of the data to be printed is sequentially ANDed with the valid masks in the determined mask group, and the number of AND operations for each byte is equal to the equal fraction, and after the operation of the current byte is completed, the last valid mask used in the previous byte operation process is used as the first valid mask used in the next byte operation process, and when the valid masks in the mask group are used up, the first valid mask in the mask group is returned.

[0014] In order to solve the above technical problems, in a second aspect, the present invention also provides a thermal printer printing method, comprising the following steps:

[0015] Obtaining data to be printed and equal fractions of the data to be printed;

[0016] According to the number of equal parts of the data to be printed, a corresponding mask group is determined in a preset mask table, wherein the preset mask table contains mask groups corresponding to different number of equal parts;

[0017] Performing an AND operation on the data to be printed and the masks in the determined mask group, and determining each obtained AND operation result as the equally divided data of the data to be printed;

[0018] The equally divided data of the data to be printed are stored in the area to be printed, and printed.

[0019] In combination with the above second aspect, in some possible implementations, the preset mask table is a two-dimensional array, the first dimension data in the two-dimensional array is an equal number, and the second dimension data in the two-dimensional array is a mask group corresponding to different equal numbers.

[0020] In combination with the above second aspect, in some possible implementations, the value of the equal fraction is all integers in the range of [1,8], and each mask in the mask group is a byte of 8 BIT bits.

[0021] In combination with the above-mentioned second aspect, in some possible implementations, when the equal number is 1, 2, 3, 4, 5, 6, 7, and 8, the mask groups corresponding to different equal numbers in the second dimension data in the two-dimensional array are: {0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x55, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x92, 0x49, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x 88,0x44,0x22,0x11,0x00,0x00,0x00,0x00}, {0x84,0x42,0x21,0x10,0x08,0x00,0x00,0x00}, {0x82,0x41,0x20,0x10,0 x08,0x04,0x00,0x00}, {0x81,0x40,0x20,0x10,0x08,0x04,0x02,0x00}, {0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01}.

[0022] In combination with the second aspect, in some possible implementations, performing an AND operation on the to-be-printed data and the determined mask in the mask group includes:

[0023] According to the order of the non-zero valid masks in the mask group from front to back, each byte of the data to be printed is sequentially ANDed with the valid masks in the determined mask group, and the number of AND operations for each byte is equal to the equal fraction, and after the operation of the current byte is completed, the last valid mask used in the previous byte operation process is used as the first valid mask used in the next byte operation process, and when the valid masks in the mask group are used up, the first valid mask in the mask group is returned.

[0024] The present invention has the following beneficial effects: the present invention obtains in advance a mask table containing mask groups corresponding to different equal numbers, and according to the equal numbers of the data to be printed, performs an AND operation on the data to be printed and the masks in the mask groups corresponding to the equal numbers, and determines each obtained AND operation result as the equal-division data of the data to be printed, thereby realizing equal division of the data to be printed, effectively improving the operation speed of the thermal printer during printing, reducing the calculation time, and ultimately improving the printing speed of the thermal printer. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0026] Figure 1 A flowchart of a method for equally dividing data using a rolling mask according to an embodiment of the present invention;

[0027] Figure 2 A schematic diagram of a process of taking a mask from a mask group corresponding to a single byte in a predetermined mask table for the first time according to an embodiment of the present invention;

[0028] Figure 3 It is a schematic diagram of a process of equally dividing a single byte in the data to be printed according to an embodiment of the present invention;

[0029] Figure 4 The present invention is a flow chart of the steps of a thermal printer printing method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0030] In order to clearly illustrate the technical features of the present invention, the present invention is described in detail below through specific implementation methods in conjunction with the accompanying drawings.

[0031] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.

[0032] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.

[0033] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0034] It should be noted that the concepts such as "first" and "second" mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0035] Although operations or steps are described in a specific order in the drawings in the embodiments of the present invention, it should not be understood that it is required to perform these operations or steps in the specific order shown or in a serial order, or that all the operations or steps shown must be performed to obtain the desired results. In the embodiments of the present invention, these operations or steps may be performed in series; these operations or steps may also be performed in parallel; or some of these operations or steps may be performed.

[0036] At the same time, it is understood that the data involved in the technical solution of the present invention (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of the relevant laws, regulations and relevant provisions. Unless otherwise defined, all technical and scientific terms used in the present invention have the same meanings as those generally understood by technicians in the technical field of the present invention, and all parameters or indicators in the formulas involved in the present invention are normalized values ​​that eliminate the influence of dimensions.

[0037] In order to solve the problem of long printing operation time of existing thermal printers, an embodiment of the present invention provides a data equal division method of a rolling mask and a thermal printer printing method. The method uses a rolling mask to perform an AND operation on the data to be printed and the mask data, thereby realizing equal division of the printing data. While ensuring the consistency of the printed content concentration, the operation speed of the thermal printer during printing is effectively improved, and ultimately the printing speed of the thermal printer is improved.

[0038] The following will describe in detail a rolling mask data equal division and thermal printer printing method provided by an embodiment of the present invention in conjunction with the accompanying drawings.

[0039] Embodiment 1:

[0040] Figure 1 FIG. 4 shows a flow chart of steps of a rolling mask data equalization method provided by an embodiment of the present invention. Figure 1 As shown, the method specifically comprises the following steps:

[0041] Step S100: obtaining data to be printed and equal fractions of the data to be printed;

[0042] Step S200: determining a corresponding mask group in a preset mask table according to the number of equal parts of the data to be printed, wherein the preset mask table contains mask groups corresponding to different numbers of equal parts;

[0043] Step S300: performing rolling AND operation on the data to be printed and the determined masks in the mask group, and determining each obtained AND operation result as the equally divided data of the data to be printed.

[0044] In view of the above steps, in order to make the density of the content printed by the thermal printer consistent, this embodiment will need to redistribute the data to be printed, but it does not mean that every BIT of the data is judged and then cyclically distributed, but according to the number of copies required, the mask is directly used to perform multiple AND operations on the mask and the data to be printed, and new data is obtained. The new data is a part of the data to be printed, that is, the data to be printed after the equal division, and the new data is stored in the area to be printed and printed. In this way, the operation speed of the thermal printer is effectively improved, thereby improving the printing speed of the thermal printer.

[0045] In this embodiment, after obtaining the data to be printed and the equal number of the data to be printed, the equal number of the data to be printed refers to the number of equal parts of the data to be printed, and the corresponding mask group is determined in the preset mask table. The preset mask table is a two-dimensional array, the first dimension data in the two-dimensional array is the equal number of the data, and the second dimension data in the two-dimensional array is the mask group corresponding to different equal numbers of the data. The value of the equal number of the data is all integers in the range of [1,8], and each mask in the mask group is a byte of 8 BIT bits.

[0046] For ease of understanding, for a byte 0XFF, its binary number can be expressed as 11111111, and the 8 1s in the binary number are split into 8 equal parts, namely: 10000000, 01000000, 0010000, 0001000, 0000100, 00000100, 00000010, 00000001. In order to obtain the above 8 equal parts of data, it is only necessary to perform AND operations on the binary number 11111111 with 100000000, 01000000, 0010000, 0001000, 00000100, 00000010, 00000001. Therefore, the above 8 equal parts of data are the operation mask group when the data is distributed into 8 equal parts.

[0047] According to the above method of obtaining the operation mask group when distributing the data into 8 equal parts, the mask groups corresponding to different equal parts can be obtained. The different equal parts are used as the first dimension data in the two-dimensional array, and the mask groups corresponding to the different equal parts are used as the second dimension data in the two-dimensional array, so that a two-dimensional array can be determined. In this embodiment, when the equal parts are 1, 2, 3, 4, 5, 6, 7, and 8, the mask groups corresponding to the different equal parts in the second dimension data in the two-dimensional array are: {0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x55, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x92, 0x49, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x88, 0x44, 0 x22,0x11,0x00,0x00,0x00,0x00}, {0x84,0x42,0x21,0x10,0x08,0x00,0x00,0x00}, {0x82,0x41,0x20,0x10,0x08,0x04,0x00,0x00}, {0x81,0x40,0x20,0x10,0x08,0x04,0x02,0x00}, {0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01}. In the second dimension of the two-dimensional array above, the valid mask in the mask group when the equal score is 1 is 0xFF, and the following data is 0, which is not actually involved in the calculation, and there is no invalid mask. Similarly, when the equal number is 2, there are 2 valid masks in the mask group, 0x55 and 0xaa. Similarly, the number of valid masks in the mask group is equal to the number of equal numbers.

[0048] According to the equal number of data to be printed, after the corresponding mask group is determined in the preset mask table, the data to be printed is ANDed with the mask in the determined mask group, and each ANDed result is determined as the equal number of data to be printed. That is, for each byte in the data to be printed, each byte is ANDed with the valid mask in the determined mask group in turn in the order of the non-zero valid masks in the mask group from front to back, and the number of ANDed operations for each byte is equal to the corresponding equal number, thereby obtaining the equal number of ANDed results corresponding to each byte, and these operation results are used as the equal number of data corresponding to each byte.

[0049] According to the above method, by performing AND operation on the data to be printed and the mask in the mask group, the data to be printed is evenly divided, which can realize one-time 1-byte operation. The operation time is much faster than the 1-BIT bit judgment method in the prior art, and up to 8 equal parts can be divided, and 1-8 equal parts can be selected at will, which effectively improves the operation speed of the thermal printer when printing, reduces the calculation time, and finally improves the printing speed of the thermal printer. According to actual tests, when running 216 bytes of data under the same environment, the operation time using the existing 1-bit operation method is 380us, while the operation time using this solution is 280us.

[0050] However, considering that when printing is performed using 3, 5, 6, 7, etc., which are not evenly distributed, the number of points that need to be heated in a certain section to be printed will still be more than that in other sections, and there will be an obvious sense of layering when printing, especially when printing black blocks. To solve this problem, this embodiment introduces a rolling mask method to perform AND operations on the data to be printed and the masks in the determined mask group, that is, in the order of the non-zero valid masks in the mask group from front to back, each byte of the data to be printed is sequentially ANDed with the valid masks in the determined mask group, and the number of AND operations for each byte is equal to the number of equal parts, and after the operation of the current byte is completed, the last valid mask used in the previous byte operation process is used as the first valid mask used in the next byte operation process, and when the valid masks in the mask group are used, the first valid mask in the mask group is returned.

[0051] When the rolling mask method is used to perform AND operation on the data to be printed and the mask in the determined mask group, taking the equal number as 2 as an example, when the first byte is taken for calculation, the first mask in the mask group is used for calculation when the first equal division is performed, and when the second byte is taken for calculation, the first equal division is performed, and the first mask in the mask group is taken for calculation, instead of taking the first mask in the mask group for calculation again, until the valid masks in the mask group are used up and then return to take the first mask for calculation. By using this rolling mask method, it is possible to avoid using the same mask for the data after the same section of the data to be printed is evenly divided, and the problem of uneven printing density caused by too many heating points in a certain section after distribution due to the inability to evenly distribute can be avoided.

[0052] Figure 2 FIG. 2 shows a schematic flow chart of the process of taking a mask from a mask group corresponding to a single byte in a predetermined preset mask table for the first time. Figure 2 As shown, first determine the corresponding mask group in the preset mask table according to the equal number of data to be printed, and determine the next mask to be operated on the current byte in the corresponding mask group, and then determine whether the total number of the next mask and the previous masks is greater than the equal number. If it is greater than the equal number, re-take the 0th member mask in the mask group, that is, the first mask, as the mask data for calculation. If it is not greater than the average score, directly use the next mask as the mask data for calculation. For example, suppose a byte needs to be divided into 2 equal parts, so the byte needs to be operated twice. Suppose it has been determined that the 2-equal division is the second mask in the corresponding mask group for the first operation. In the second operation, because the next mask is the third data, it is already greater than the equal number, and its data is actually 0, so it is necessary to go back and use the first mask for operation. Figure 3 FIG. 2 shows a flow chart for dividing a single byte of the data to be printed into equal parts. Figure 3 As shown, for a single byte in the cached data to be printed, the single byte is ANDed with each mask in the corresponding mask group obtained. If the number of operations is equal to the number of equal-division segments, the calculation is completed, and the next byte is operated. For example, assuming that a byte needs to be divided into 2 equal parts, the byte needs to be operated twice. If the number of operations is equal to 2, the calculation is completed, and the next byte is operated.

[0053] For ease of understanding, take the number of equal parts as 2 as an example, there are 3 data to be printed, namely 0b11000110, 0b11111111 and 0b11110000, and the corresponding mask group is determined in the preset mask table as {0x55, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}. When the print data 0b11000110 is divided into equal parts, 0x55 is called for the first division, and 0xaa is called for the second division. The operation is now complete. When the print data 0b1111111 is divided into equal parts, 0xaa is called for the first division, and 0x55 is called for the second division. The operation is now complete. When the print data 0b11000110 is divided into equal parts, 0x55 is called for the first division, and 0xaa is called for the second division. The operation is now complete.

[0054] When the data to be printed is ANDed with the mask in the determined mask group by the above-mentioned rolling mask method, the rolling mask method does not have an advantage when dividing the data into 1, 2, 4, or 8 equal parts. However, if the data is divided into 3, 5, 6, or 7 equal parts, the 1 in each part can be made as even as possible, effectively ensuring the uniformity of the printing concentration.

[0055] Embodiment 2:

[0056] Based on the same inventive concept, an embodiment of the present invention further provides a thermal printer printing method. Figure 4 FIG. 4 shows a flow chart of steps of a rolling mask data equalization method provided by an embodiment of the present invention. Figure 4 As shown, the method specifically comprises the following steps:

[0057] Step S10: obtaining the data to be printed and the equal fractions of the data to be printed;

[0058] Step S20: determining a corresponding mask group in a preset mask table according to the number of equal parts of the data to be printed, wherein the preset mask table contains mask groups corresponding to different numbers of equal parts;

[0059] Step S30: performing rolling AND operation on the data to be printed and the masks in the determined mask group, and determining each AND operation result obtained as the equally divided data of the data to be printed;

[0060] Step S40: storing the equally divided data of the data to be printed in the area to be printed, and printing.

[0061] For the above steps, after obtaining the equally divided data of the data to be printed through steps S10-S30, the equally divided data of the data to be printed are stored in the to-be-printed area and printed, and finally the uniform printing of the data to be printed is achieved. Since the process of obtaining the equally divided data of the data to be printed in steps S10-S30 is completely consistent with the process of obtaining the equally divided data of the data to be printed in steps S100-S300 in the above embodiment 1, and step S40 storing the equally divided data of the data to be printed in the to-be-printed area and printing belongs to the prior art, it will not be described in detail here.

[0062] It should be noted that the above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A data equalization method of a rolling mask, characterized in that: The following steps are involved: Obtaining data to be printed and equal fractions of the data to be printed; According to the number of equal parts of the data to be printed, a corresponding mask group is determined in a preset mask table, wherein the preset mask table contains mask groups corresponding to different number of equal parts; An AND operation is performed on the data to be printed and the masks in the determined mask group, and each obtained AND operation result is determined as the equally divided data of the data to be printed.

2. The data dividing method of a rolling mask according to claim 1 is characterized in that: The preset mask table is a two-dimensional array, the first dimension data in the two-dimensional array is an equal number, and the second dimension data in the two-dimensional array is a mask group corresponding to different equal numbers.

3. The data dividing method of a rolling mask according to claim 2 is characterized in that: The values ​​of the equal fractions are all integers in the range of [1, 8], and each mask in the mask group is a byte of 8 BIT bits.

4. The data dividing method of a rolling mask according to claim 3 is characterized in that: When the equal number is 1, 2, 3, 4, 5, 6, 7, and 8, respectively, the mask groups corresponding to different equal numbers in the second dimension data in the two-dimensional array are: {0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x55, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x92, 0x49, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x88, 0x44, 0x2 2,0x11,0x00,0x00,0x00,0x00}, {0x84,0x42,0x21,0x10,0x08,0x00,0x00,0x00}, {0x82,0x41,0x20,0x10,0x08,0x 04,0x00,0x00}, {0x81,0x40,0x20,0x10,0x08,0x04,0x02,0x00}, {0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01}.

5. The data dividing method of a rolling mask according to claim 4 is characterized in that: Performing an AND operation on the to-be-printed data and the determined mask in the mask group includes: According to the order of the non-zero valid masks in the mask group from front to back, each byte of the data to be printed is sequentially ANDed with the valid masks in the determined mask group, and the number of AND operations for each byte is equal to the equal fraction, and after the operation of the current byte is completed, the last valid mask used in the previous byte operation process is used as the first valid mask used in the next byte operation process, and when the valid masks in the mask group are used up, the first valid mask in the mask group is returned.

6. A thermal printer printing method, characterized in that: The following steps are involved: Obtaining data to be printed and equal fractions of the data to be printed; According to the number of equal parts of the data to be printed, a corresponding mask group is determined in a preset mask table, wherein the preset mask table contains mask groups corresponding to different number of equal parts; Performing an AND operation on the data to be printed and the masks in the determined mask group, and determining each obtained AND operation result as the equally divided data of the data to be printed; The equally divided data of the data to be printed are stored in the area to be printed, and printed.

7. A thermal printer printing method according to claim 6, characterized in that: The preset mask table is a two-dimensional array, the first dimension data in the two-dimensional array is an equal number, and the second dimension data in the two-dimensional array is a mask group corresponding to different equal numbers.

8. A thermal printer printing method according to claim 7, characterized in that: The values ​​of the equal fractions are all integers in the range of [1, 8], and each mask in the mask group is a byte of 8 BIT bits.

9. A thermal printer printing method according to claim 8, characterized in that: When the equal number is 1, 2, 3, 4, 5, 6, 7, and 8, respectively, the mask groups corresponding to different equal numbers in the second dimension data in the two-dimensional array are: {0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x55, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x92, 0x49, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x88, 0x44, 0x2 2,0x11,0x00,0x00,0x00,0x00}, {0x84,0x42,0x21,0x10,0x08,0x00,0x00,0x00}, {0x82,0x41,0x20,0x10,0x08,0x 04,0x00,0x00}, {0x81,0x40,0x20,0x10,0x08,0x04,0x02,0x00}, {0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01}.

10. A thermal printer printing method according to claim 9, characterized in that: Performing an AND operation on the to-be-printed data and the determined mask in the mask group includes: According to the order of the non-zero valid masks in the mask group from front to back, each byte of the data to be printed is sequentially ANDed with the valid masks in the determined mask group, and the number of AND operations for each byte is equal to the equal fraction, and after the operation of the current byte is completed, the last valid mask used in the previous byte operation process is used as the first valid mask used in the next byte operation process, and when the valid masks in the mask group are used up, the first valid mask in the mask group is returned.