Printing control method, printer and storage medium

By performing window-shifting and reading of bitmap data in a thermal printer to update the point history matrix, the problem of limited storage space for the point history table is solved, and the efficiency of point history and the accuracy of heat generation control are improved.

CN121821972APending Publication Date: 2026-04-10JIANGMEN DASCOM COMP PERIPHERAL
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGMEN DASCOM COMP PERIPHERAL
Filing Date
2025-11-12
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

The low efficiency of dot history printing in thermal printers is mainly due to the limited storage space of the dot history table, which increases the time required to read large amounts of data and affects printing efficiency.

Method used

By performing windowed shift reading of bitmap data in the bitmap matrix, the point history matrix is ​​updated, reducing the amount of data read and improving the efficiency of point history reading.

Benefits of technology

By using window-swiping shift reading, data reading time is reduced, improving the dot history efficiency and heat generation control accuracy of thermal printers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121821972A_ABST
    Figure CN121821972A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a printing control method, a printer and a storage medium, and the method comprises the following steps: according to all point resume data in a current point resume matrix, a preset displacement amount and a preset data displacement direction, carrying out window-sliding displacement reading on bitmap data in a bitmap dot matrix to obtain an updated point resume matrix, the preset target position of the point resume matrix is associated with the point resume matrix; and determining a first heating energy level corresponding to the updated point resume matrix, and printing the current point resume data in the preset target position according to the heating energy level. According to the embodiment of the invention, the point resume efficiency of the thermal printer can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to, but are not limited to, the technical field of printers, and particularly relate to a printing control method, a printer, and a storage medium. BACKGROUND

[0002] In the related art, after obtaining a bitmap, a thermal printer reads a certain number of point data one by one, converts the obtained point data into a search word, looks up corresponding point history data in a preset point history table according to the search word, determines the heat generation level of each point data constituting the search word, and then repeats the above process from the point data that has not been read.

[0003] The size of the point history table is in an exponential relationship with the number of point data read. If the number of point data read in one search is large, the size of the point history table will exponentially increase, and a large storage space is needed to store such a point history table. However, the hardware cost of the thermal printer is limited, and in order to reduce the hardware cost as much as possible, the storage space is compressed to be small, thereby limiting the number of point data read in one search. This makes the point history of the entire bitmap need to go through the construction of multiple search words. Since the data read needs time, and the construction of each search word needs to read the data in the bitmap that has not been read, the point history of the entire bitmap needs to consume a large amount of data reading time, greatly reducing the efficiency of the point history. SUMMARY

[0004] Embodiments of the present application provide a printing control method, a printer, and a storage medium, which can improve the point history efficiency of a thermal printer.

[0005] In one aspect, the present application provides a printing control method, comprising the following steps: According to all point history data in the current point history matrix, a preset shift amount, and a preset data shift direction, the bitmap data in the bitmap matrix is windowed and shifted to read, and an updated point history matrix is obtained, wherein a preset target position of the point history matrix is associated with the point history matrix; A first heat generation level corresponding to the updated point history matrix is determined, and the current point history data in the preset target position is printed according to the heat generation level.

[0006] In one embodiment, according to all point history data in the current point history matrix, a preset shift amount, and a preset data shift direction, the bitmap data in the bitmap matrix is windowed and shifted to read, and an updated point history matrix is obtained, comprising: determining, according to the preset displacement amount and each first data in all the point history data, each second data in the plurality of bitmap data of the bitmap dot array corresponding to each first data, wherein the first data is located at a preset boundary position of the point history matrix, the second data is not located at the point history matrix, and a distance between the second data and the corresponding first data in the bitmap dot array is less than or equal to the preset displacement amount in the preset data displacement direction; displacing, according to the preset data displacement direction and the preset displacement amount, all the point history data; writing, according to a position corresponding to each first data, each second data into the point history matrix.

[0007] In an embodiment, the writing, according to a position corresponding to each first data, each second data into the point history matrix, comprises: determining, in response to a result of each second data being failure, each second data as padding data respectively; writing, according to a position corresponding to each first data, each padding data into the point history matrix.

[0008] In an embodiment, the determining the first heat energy level corresponding to the updated point history matrix comprises: determining, from a plurality of preset control matrices, a target control matrix matching the updated point history matrix, wherein the control matrix is associated with a control heat energy level; taking the control heat energy level associated with the target control matrix as the first heat energy level.

[0009] In an embodiment, the method further comprises: in response to the bitmap dot array being generated, writing, according to the preset data displacement direction, a first bitmap data in the bitmap dot array into the preset target position, and writing, according to the first bitmap data, a plurality of third data in the bitmap dot array into the point history matrix, wherein the relative positions of the third data and the first bitmap data in the point history matrix and in the bitmap dot array are the same; determining a second heat energy level corresponding to the point history matrix after the data writing is completed, and printing the first bitmap data according to the second heat energy level.

[0010] In an embodiment, the preset data displacement direction comprises a displacement direction for a data row, and the current point history data in the preset target position is located at a target data column in the bitmap dot array. The method further comprises: In response to completing the point history of all bitmap data in the target data column, and the target data column is not the last data column of the bitmap matrix, all point history data in the point history matrix are cleared. The first target bitmap data at the starting position of the next data column is written to the preset target position, and multiple fourth data in the bitmap dot matrix are written to the dot history matrix according to the first target bitmap data, wherein the relative position of the fourth data and the first target bitmap data in the dot history matrix is ​​the same as the relative position in the bitmap dot matrix. The third heat generation level corresponding to the point history matrix after the data writing is completed is determined, and the first target bitmap data is printed according to the third heat generation level.

[0011] In one embodiment, the preset data shift direction includes a shift direction for a data column, and the current point history data at the preset target position is located in the target data row in the bitmap matrix; The method further includes: In response to completing the point history of all bitmap data in the target data row, and the target data row is not the last data row of the bitmap matrix, all point history data in the point history matrix are cleared. The second target bitmap data at the beginning of the next data row is written to the preset target position, and multiple fifth data in the bitmap dot matrix are written to the dot history matrix according to the second target bitmap data, wherein the relative position of the fifth data and the second target bitmap data in the dot history matrix is ​​the same as the relative position in the bitmap dot matrix; The fourth heat level corresponding to the point history matrix after the data writing is completed is determined, and the second target bitmap data is printed according to the fourth heat level.

[0012] On the other hand, embodiments of this application also provide a printer, including: At least one processor; At least one memory for storing at least one program; The printing control method described above is implemented when at least one of the programs is executed by at least one of the processors.

[0013] On the other hand, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions for performing the printing control method as described above.

[0014] On the other hand, embodiments of this application also provide a computer program product, including a computer program or computer instructions, the computer program or computer instructions being stored in a computer-readable storage medium, a printer processor reading the computer program or computer instructions from the computer-readable storage medium, and the processor executing the computer program or computer instructions to cause the communication device to perform the printing control method as described above.

[0015] This application provides a printing control method, a printer, and a storage medium. The method includes performing a windowed shift reading of bitmap data in a bitmap matrix based on all point history data in the current point history matrix, a preset shift amount, and a preset data shift direction to obtain an updated point history matrix. A preset target position of the point history matrix is ​​associated with the point history matrix. A first heating energy level corresponding to the updated point history matrix is ​​determined, and the current point history data at the preset target position is printed according to the heating energy level. By performing a windowed shift reading of the bitmap data based on the preset shift amount and preset data shift direction, the point history matrix can be updated using new bitmap data within the window, without needing to read data of the same size as the point history matrix from the bitmap matrix. This significantly reduces the amount of data read, effectively reducing data reading time and improving the point history efficiency of the thermal printer. Attached Figure Description

[0016] Figure 1 This is a schematic diagram illustrating the influence of the heating element's resistance unit on heat transfer in related technologies; Figure 2 This is a schematic diagram of point history calorific value control in related technologies; Figure 3 This is a schematic diagram of the control hardware architecture of the printing control method provided in the embodiments of this application; Figure 4 This is a schematic flowchart of a printing control method provided in one embodiment of this application; Figure 5A This is a schematic diagram of a bitmap dot matrix provided in one embodiment of this application; Figure 5B This application is based on one embodiment. Figure 5A A schematic diagram of the provided point history matrix; Figure 5C This application is based on one embodiment. Figure 5A An illustration of the updated point history matrix; Figure 5D yes Figure 5B A schematic diagram of the point history data after data shifting; Figure 5EThis is a schematic diagram of a bitmap matrix provided in another embodiment of this application; Figure 5F This application is based on one embodiment. Figure 5E A schematic diagram of the provided point history matrix; Figure 5G yes Figure 5F A schematic diagram of the point history data after data shifting; Figure 5H yes Figure 5G A diagram showing the point history matrix after filling in the data; Figure 6 This is a flowchart illustrating a printing control method provided in another embodiment of this application; Figure 7 This is a schematic diagram of a point history matrix provided in one embodiment of this application; Figure 8 This is a schematic diagram of the overall execution flow of a printing control method provided in one embodiment of this application; Figure 9 This is a schematic diagram of a bitmap matrix provided in another embodiment of this application; Figure 10 This is a schematic diagram of a heat level table provided in one embodiment of this application; Figure 11 This is a schematic diagram of the structure of a printer provided in one embodiment of this application. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0018] It should be noted that although the flowchart shows a logical order, in some cases, the steps shown or described may be executed in a different order than that shown in the flowchart. In the description of the embodiments of this application, "multiple" (or more than) means two or more, "greater than," "less than," and "exceeding" are understood to exclude the number itself, while "above," "below," and "within" are understood to include the number itself. If "first," "second," etc., are described, they are only used to distinguish technical features and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or the order of the technical features indicated. Furthermore, in the description of the embodiments of this application, the various values ​​mentioned (such as first value, second value, etc.) can be flexibly represented as a single numeric code or an enumerated type value.

[0019] In related technologies, thermal printers control the heating of the thermal printhead on the printer according to the content to be printed, thereby forming the printed content on thermal printing media such as thermal paper or ribbon. The working principle of the thermal printhead is to heat the thermal printing media by the instantaneous rise and fall of the temperature of the heating element unit to achieve printing. See [link to documentation]. Figure 1 The temperature rise and fall of each heating element unit is affected by its own initial temperature (heat storage) and the heat transfer from surrounding heating element resistance units. The higher the printing speed, the greater the impact of heat storage, and the more prone it is to phenomena such as ghosting. Therefore, it is necessary to adjust the heating energy level of the current heating point according to whether the points around it are heating. (See [reference needed]). Figure 2 When the heating energy level is changed, the heating time of the heating element will be changed, thereby adjusting the heating energy at different points to achieve the goal of energy balance. This control is called point history.

[0020] In the relevant dot history technology, after obtaining the bitmap, the thermal printer reads a certain number of dot data one by one and converts these dot data into a retrieval word. Based on this retrieval word, it searches for the corresponding dot history data in a preset dot history table, thereby determining the heating energy level of each dot data that constitutes this retrieval word. Then, it starts from the dot data that has never been read before and repeats the above process.

[0021] The size of the point history table is exponentially related to the number of point data reads. If a large number of point data are read in a single retrieval, the size of the point history table will increase exponentially, requiring a large storage space to store such a table. However, the hardware cost of thermal printers is limited. To minimize hardware costs, the storage space is compressed to a small size, thus limiting the number of point data reads in a single retrieval. This means that the point history of the entire bitmap needs to go through the construction of multiple search terms. Since reading data takes time, and the construction of each search term requires reading data that has not yet been read in the bitmap, the point history of the entire bitmap consumes a lot of data reading time, greatly reducing the efficiency of the point history.

[0022] To improve the dot history efficiency of thermal printers, this application provides a printing control method, a printer, a computer-readable storage medium, and a computer program product. The method includes performing a windowed shift read of bitmap data in a bitmap dot matrix based on all dot history data in the current dot history matrix, a preset shift amount, and a preset data shift direction to obtain an updated dot history matrix. A preset target position of the dot history matrix is ​​associated with the dot history matrix. The method then determines the first heating energy level corresponding to the updated dot history matrix and prints the current dot history data at the preset target position according to the heating energy level. By performing a windowed shift read of the bitmap data based on the preset shift amount and preset data shift direction, the dot history matrix can be updated using new bitmap data within the window, without needing to read data of the same size as the dot history matrix from the bitmap dot matrix. This significantly reduces the amount of data read, effectively reducing data reading time and contributing to improved dot history efficiency of the thermal printer. In addition, since the window-shifting read will use the new bitmap data in the window, the point history matrix can focus on the original point history data and the new point history data. Since each point history process follows this process, each point history process can focus on the previously determined heat generation level, thereby making the control of heat generation more precise.

[0023] See Figure 3 , Figure 3 A control hardware architecture for implementing the printing control method provided in the embodiments of this application is illustrated. The control hardware architecture includes a thermal controller (and...) Figure 3 The thermal controller (connected to the AHB2 bus THM module) has a point history module and a RAM space with a fixed buffer size. The point history matrix is ​​set in the RAM space. The thermal controller can write a bitmap data read into a matrix position in the point history matrix. The thermal controller implements the printing control method described in this application based on this RAM space.

[0024] See Figure 4 , Figure 4 The flowchart of a printing control method provided in one embodiment of this application is shown. In this embodiment, the printing control method may include steps 410 to 420.

[0025] Step 410: Based on all point history data in the current point history matrix, the preset shift amount, and the preset data shift direction, perform window-shifting reading on the bitmap data in the bitmap point matrix to obtain the updated point history matrix. The preset target position of the point history matrix is ​​associated with the point history matrix. Step 420: Determine the first heat level corresponding to the updated point history matrix, and print the current point history data at the preset target location according to the heat level.

[0026] In one embodiment, the current point history matrix refers to a point history matrix in which data has been written into the RAM space and point history operations have been completed. The point history data in the current point history matrix may include bitmap data and padding data from a bitmap matrix. It should be noted that the padding data can be "0", and the bitmap data includes either "0" or "1". It should also be noted that the size of the point history matrix is ​​not fixed and is determined according to the required precision. Higher precision requirements result in a larger point history matrix, while lower precision requirements result in a smaller point history matrix. The size of the point history matrix is ​​less than or equal to the size of the RAM space.

[0027] In one embodiment, bitmap dot matrix refers to the data dot matrix in bitmap format that the printer converts into the file to be printed as indicated by the print job after receiving the print job. The file to be printed can be an image file, PDF file, WORD file, etc., and is not specifically limited here. It should be noted that the converted bitmap dot matrix is ​​stored in the printer as the original data, and the thermal controller can only read one or more bitmap data from the bitmap dot matrix; it cannot modify any bitmap data within the bitmap dot matrix.

[0028] In one embodiment, window-shifting read refers to determining the next window range that has shifted relative to the current window range based on the bitmap data drawn in the current window range, and reading the bitmap data drawn in the new window range. The size of the window range is fixed at the preset row and column dimensions mentioned above, but the position of the window range changes continuously as the window-shifting read proceeds, thereby continuously reading different bitmap data. The window range before the window-shifting read and the window range at the time of the window-shifting read may overlap. Therefore, each window-shifting read can overwrite the original point history matrix based on a portion of the bitmap data drawn in the window range before the window-shifting read and the newly drawn bitmap data in the window range at the time of the window-shifting read.

[0029] It is important to note that since the window range before the window shift read and the window range during the window shift read may overlap, a portion of the data drawn out in the window range before the window shift read has already been read and written to the point history matrix. Therefore, the window shift read will only read the bitmap data newly drawn into the window range during the window shift read, and will not read all the bitmap data in the window range during the window shift read. The bitmap data in the window range during the window shift read that has already been written into the point history matrix will be shifted in the point history matrix to provide the writing position for the newly drawn bitmap data in the window range during the window shift read.

[0030] For example, suppose we have the following: Figure 5A The bitmap dot matrix shownFigure 5B The illustrated point history matrix has a bitmap pixel array size of 3×3 and a point history matrix size of 2×2. The current windowing range is the 1st and 2nd rows and the 1st and 2nd columns of the bitmap pixel array. Therefore, the point history data in the point history matrix corresponds to the bitmap data in the 1st and 2nd rows and the 1st and 2nd columns of the bitmap pixel array. Assuming that the windowing shift reading specifically involves moving the windowing range to the right, then the data in the 3rd column belonging to the 1st and 2nd rows will be read, and... Figure 5B The point history matrix shown is more Figure 5C The point history matrix is ​​shown.

[0031] In one embodiment, in the process of performing windowing and shifting to read bitmap data in a bitmap matrix based on all point history data in the current point history matrix, a preset shift amount, and a preset data shift direction to obtain an updated point history matrix, specifically, the current windowing range can be determined first based on all point history data in the current point history matrix and all bitmap data in the bitmap matrix. Then, the current windowing range is moved to the next position according to the preset data shift direction and the preset shift amount to form a new windowing range. Bitmap data not located in the point overlay matrix within the new windowing range is read. Finally, the current point history matrix is ​​updated using the bitmap data not located in the point overlay matrix within the new windowing range.

[0032] In one embodiment, the preset data shift direction refers to the direction in which bitmap data already written into the point history matrix within the window range is shifted during window-shift reading. The preset data shift direction can be either a shift direction for data rows or a shift direction for data columns. Furthermore, the shift direction for data rows can be either moving point history data upwards or downwards; this is not specifically limited here. Similarly, the shift direction for data columns can be either moving point history data left or right; this is also not specifically limited here.

[0033] It's important to note that the direction of the window's movement can be determined by a preset data shift direction. Specifically, the preset data shift direction is the opposite of the direction the window's movement will be. For example, using... Figures 5A to 5C Taking the diagram as an example, the direction of movement of the window area is to the right. Figure 5B Become Figure 5C During the process, Figure 5B The midpoint history data is uniformly shifted to the left, reserving the matrix position in the second column for the newly added bitmap data.

[0034] In one embodiment, the preset shift amount refers to the displacement of bitmap data already written into the point history matrix within the window range during window-shifting read operation. The specific manifestation of the preset shift amount is related to the preset data shift direction. If the preset data shift direction is for data rows, then the preset shift amount is n data rows; if the preset data shift direction is for data columns, then the preset shift amount is n data columns. Here, n is a positive integer greater than or equal to 1, with the optimal value of n being 1.

[0035] It's important to note that the preset shift amount is equivalent to the amount of movement of the window area. For example, using... Figures 5A to 5C Taking the diagram as an example, the movement amount of the window area is 1. Figure 5B Become Figure 5C During the process, Figure 5B The preset shift amount for the midpoint resume data to be shifted to the left is also 1.

[0036] In one embodiment, the preset target position refers to a matrix position within the point history matrix that is set to be used to associate the entire point history matrix. For example, as described above... Figure 5B Taking the point history matrix as an example, assuming that the matrix position (1,1) of the point history matrix is ​​associated with the point history matrix B, then (1,1) is the preset target position.

[0037] For a point history matrix, the preset target position is fixed, but the point history data at the preset target position becomes variable due to the windowing and shifting reading of the bitmap data in the bitmap matrix. This allows the bitmap data written to the preset target position to be associated with multiple surrounding bitmap data through the point history matrix. For example, as described above... Figure 5B and Figure 5C Taking the point history matrix shown as an example, Figure 5B The historical data of the point located at (1,1) is associated with Figure 5B The point history matrix shown is Figure 5C The historical data of the point located at (1,1) is associated with Figure 5C The point history matrix is ​​shown.

[0038] In some more specific embodiments, during the process of performing windowed shift reading on the bitmap data in the bitmap matrix based on all point history data in the current point history matrix, a preset shift amount, and a preset data shift direction to obtain the updated point history matrix, specifically, each second data corresponding to each first data in the multiple bitmap data of the bitmap matrix can be determined firstly based on the preset shift amount and each first data in all point history data. Here, the first data is located at a preset boundary position of the point history matrix, the second data is not located in the point history matrix, and the distance between the second data and the corresponding first data in the bitmap matrix is ​​less than or equal to the preset shift amount in the preset data shift direction. Then, each second data is written to the point history matrix according to the position of each first data.

[0039] In one embodiment, the preset boundary position refers to the matrix position of the point history data located on the boundary of the target point history matrix within the point history matrix. The target point history matrix boundary refers to the matrix boundary in the direction opposite to the preset data shift direction. For example, using... Figure 5B Taking the point history matrix shown as an example, assuming the preset data shift direction is left, then the right boundary of the point history matrix is ​​the boundary of the target point history matrix. At this time, the matrix positions (2,1) and (2,2) in the point history matrix are the preset boundary positions.

[0040] In one embodiment, if the preset data shift direction is the shift direction for a data column, the distance between the second data and the corresponding first data in the bitmap matrix is ​​less than or equal to the preset shift amount in the preset data shift direction. Specifically, this can be manifested as the second data and the first data belonging to the same data row but not the same data column, and the distance between the position of the second data and the position of the first data in the bitmap matrix being less than or equal to the preset shift amount.

[0041] For example, with Figure 5A The bitmap dot matrix shown Figure 5B Taking the point history matrix shown as an example, assuming the preset data shift direction is to the left and the preset displacement is 1, then the matrix position (2,2) in the point history matrix is ​​one of the preset boundary positions. The point history data located at the matrix position (2,2) in the point history matrix is ​​the first data. According to the bitmap matrix, the bitmap data not located in the point history matrix includes the bitmap data at the three matrix positions (1,3), (2,3), (3,1), (3,2), and (3,3). Therefore, the second data is the bitmap data at the position (2,3) in the bitmap matrix. The distance between this data and the first data in this example in the preset data shift direction is 1.

[0042] In one embodiment, if the preset data shift direction is the shift direction for data rows, the distance between the second data and the corresponding first data in the bitmap matrix is ​​less than or equal to the preset shift amount in the preset data shift direction. Specifically, this can be manifested as the second data and the first data belonging to the same data column but not the same data row, and the distance between the position of the second data and the position of the first data in the bitmap matrix being less than or equal to the preset shift amount.

[0043] For example, with Figure 5A The bitmap dot matrix shown Figure 5B Taking the point history matrix shown as an example, assuming the preset data shift direction is upward and the preset displacement is 1, then the matrix position (1,2) in the point history matrix is ​​one of the preset boundary positions. The point history data located at the matrix position (1,2) in the point history matrix is ​​the first data. According to the bitmap matrix, the bitmap data not located in the point history matrix includes the bitmap data at the three matrix positions (1,3), (2,3), (3,1), (3,2), and (3,3). Therefore, the second data is the bitmap data at the position (1,3) in the bitmap matrix. The distance between this data and the first data in this example in the preset data shift direction is 1.

[0044] In one embodiment, shifting all point history data according to a preset data shift direction and a preset shift amount refers to moving all point history data from the current matrix position to a matrix position a preset shift amount away from the current position, based on the preset data shift direction. It should be noted that some point history data, after being shifted, may not be located within the point history matrix; these points will be deleted.

[0045] For example, with Figure 5B Taking the point history matrix shown as an example, assuming the preset data shift direction is to the left and the preset displacement is 1, then the current point history data "1" at (1,1) will be moved to (1,0), the current point history data "0" at (1,2) will be moved to (1,1), the current point history data "1" at (2,1) will be moved to (2,0), and the current point history data "1" at (2,2) will be moved to (2,1). Since the point history matrix does not have the matrix positions (1,0) and (2,0), the point history data that are theoretically moved to these two matrix positions will be deleted. Thus, the point history matrix after data shifting is as follows: Figure 5D As shown.

[0046] In one embodiment, during the process of writing each second data point to the point history matrix according to the position of each first data point, specifically, in response to determining that the result of each second data point is a failure, each second data point can be determined as fill data, and each fill data point can be written to the point history matrix according to the position of each first data point. Specifically, if it is determined that the result of each second data point is a failure, it proves that the current first data point is located at the boundary position of the bitmap bitmap. At this time, there is no corresponding second data point in the bitmap bitmap. Therefore, fill data is needed to ensure the integrity of the point history matrix, thereby ensuring the smooth progress of the point history process.

[0047] For example, with Figure 5E The bitmap dot matrix shown Figure 5F Taking the point history matrix shown as an example, the point history data in the point history matrix corresponds to the bitmap data at the bitmap positions (2,1), (2,2), (3,1), and (3,2) in bitmap matrix A. Assuming the preset boundary positions are (2,1) and (2,2), the preset data shift direction is to the left, and the preset displacement is 1, then theoretically, the bitmap data at positions (4,1) and (4,2) in the bitmap matrix should be the second data. However, bitmap matrix A does not contain positions (4,1) and (4,2). Therefore, determining the second data fails, and the filler data "0" can only be used as the second data. The point history matrix after the corresponding data shift is as follows: Figure 5G As shown, at this point in the history matrix, the matrix positions (2,1) and (2,2) are both filled with "0", that is... Figure 5H As shown.

[0048] In one embodiment, in determining the first calorific level corresponding to the updated point history matrix, a target reference matrix matching the updated point history matrix can be determined from a plurality of preset reference matrices, wherein the reference matrix is ​​associated with a reference calorific level; and then the reference calorific level associated with the target reference matrix is ​​taken as the first calorific level.

[0049] In one embodiment, the comparison matrix refers to a matrix with the same size as the point history matrix and used as a comparison point history matrix. The multiple comparison matrices may include multiple fixed, preset standard comparison matrices, or multiple user-defined comparison matrices; no specific limitation is made here.

[0050] In one embodiment, the multiple control matrices may include multiple fixed, preset standard control matrices and multiple user-defined control matrices. During the process of using the control heating energy level associated with the target control matrix as the first heating energy level, in response to the determination of at least two target control matrices, and at least one standard control matrix and at least one user-defined control matrix being identical, the control heating energy level of the user-defined control matrix is ​​used as the first heating energy level to ensure that the user's customized content can be used preferentially and to meet the user's usage needs.

[0051] In one embodiment, the heat generation level can be used to characterize the heat output of the printer's thermal head, with different heat generation levels corresponding to different thermal head heat outputs. For example, suppose there are reference matrices A, B, C, D, and E, with corresponding reference heat generation levels 1, 2, 3, 4, and 5, respectively. If the updated point history matrix is ​​the same as the reference matrix B, then the reference matrix B is the target reference matrix, and the reference heat generation level 2 corresponding to the reference matrix B is the first heat generation level of the updated point history matrix.

[0052] In one embodiment, the operation of printing the current point history data at the preset target position according to the heat energy level can be varied. For example, the heat energy level of the bitmap data that needs to be point-hidden can be obtained through real-time point history and used directly. Another example is to construct a heat energy level table to record the heat energy level obtained by each bitmap data after point history, and then print it after recording the heat energy level of all bitmap data, etc. The specific method is not limited here.

[0053] See Figure 6 , Figure 6 A flowchart of a printing control method according to another embodiment of this application is shown. In one embodiment, the printing control method may further include the following steps.

[0054] Step 610: In response to the generation of the bitmap dot matrix, the first bitmap data in the bitmap dot matrix is ​​written to the preset target position according to the preset data shift direction, and multiple third data in the bitmap dot matrix are written to the point history matrix according to the first bitmap data. The relative positions of the third data and the first bitmap data in the point history matrix are the same as their relative positions in the bitmap dot matrix. Step 620: Determine the second heat level corresponding to the point history matrix after the data writing is completed, and print the first bitmap data according to the second heat level.

[0055] In one embodiment, the first bitmap data refers to the first bitmap data in the bitmap matrix that requires point traversal processing relative to a preset data shift direction. For example, using... Figure 5ARegarding the bitmap matrix shown, if the preset data shift direction is to the left, then the bitmap data at position (1,1) in the bitmap matrix can be used as the first bitmap data; if the preset data shift direction is to the right, then the bitmap data at position (3,1) in the bitmap matrix can be used as the first bitmap data; if the preset data shift direction is to the up, then the bitmap data at position (1,3) in the bitmap matrix can be used as the first bitmap data; if the preset data shift direction is to the down, then the bitmap data at position (1,1) in the bitmap matrix can be used as the first bitmap data.

[0056] In one embodiment, the relative positions of the third data and the first bitmap data in the point history matrix and in the bitmap dot matrix are the same. This means that after the third data is written to a matrix position in the point history matrix, the relative distance between this matrix position and the preset target position is the same as the relative distance between the third data's dot matrix position and the first bitmap data's dot matrix position in the bitmap data. Furthermore, the relative direction between this matrix position and the preset target position is also the same as the relative direction between the third data's dot matrix position and the first bitmap data's dot matrix position in the bitmap data. For example, with... Figure 5A The bitmap dot matrix shown Figure 5B Regarding the point history matrix shown, assuming the point history data at position (1,1) in the point history matrix is ​​the first bitmap data mentioned above, then the bitmap data at position (2,1) in the bitmap matrix is ​​a third piece of data. After this third piece of data is written into the point history matrix, the relative distance between this third piece of data's matrix position and the matrix position (1,1) in the point history matrix is... The relative distance between the position of this third data point in the bitmap and the position of the first bitmap data in the bitmap data is also... The same applies to relative directions.

[0057] It should be noted that after writing multiple third-party data into the point history matrix, some matrix positions in the point history matrix are not actually written into the bitmap data. These matrix positions will be filled with padding data to ensure the integrity of the point history matrix.

[0058] It should also be noted that the method of confirming the second heating energy level is the same as the method of confirming the first heating energy level in step 420, and the method of printing the first bitmap data based on the second heating energy level is the same as the method of printing the current point history data in the preset target position in step 420, which will not be repeated here.

[0059] For bitmap matrix, there are multiple rows and multiple columns. The above-described embodiments can complete the point history of a row or column of bitmap data. After completing the point history of a row or column of bitmap data, it is necessary to perform point history on the next row or column of bitmap data. At this time, it is necessary to reread the new row or column of bitmap data and update the point history data in the point history matrix.

[0060] In one embodiment, the preset data shift direction includes a shift direction for data rows. The current point history data at the preset target position is located in the target data column in the bitmap dot matrix. During the implementation of the printing control method, the printer can also respond to the completion of the point history of all bitmap data in the target data column, and the target data column is not the last data column of the bitmap dot matrix. All point history data in the point history matrix is ​​cleared. Then, the first target bitmap data at the starting position of the next data column is written to the preset target position, and multiple fourth data in the bitmap dot matrix are written to the point history matrix according to the first target bitmap data. The relative positions of the fourth data and the first target bitmap data in the point history matrix are the same as their relative positions in the bitmap dot matrix. Then, the third heating energy level corresponding to the point history matrix after the data writing is completed is determined, and the first target bitmap data is printed according to the third heating energy level.

[0061] In one embodiment, the relative position of the fourth data and the first target bitmap data in the point history matrix is ​​the same as their relative position in the bitmap dot matrix. This means that after the fourth data is written into a matrix position in the point history matrix, the relative distance between this matrix position and the preset target position is the same as the relative distance between the dot matrix position of the fourth data in the bitmap data and the dot matrix position of the first target bitmap data in the bitmap data. The relative direction between this matrix position and the preset target position is also the same as the relative direction between the dot matrix position of the fourth data in the bitmap data and the dot matrix position of the first target bitmap data in the bitmap data.

[0062] It should be noted that the method of confirming the third heating energy level is the same as the method of confirming the first heating energy level in step 420, and the method of printing the first target bitmap data based on the third heating energy level is the same as the method of printing the current point history data in the preset target position in step 420, which will not be repeated here.

[0063] In one embodiment, the preset data shift direction includes a shift direction for the data column. The current point history data at the preset target position is located in the target data row in the bitmap dot matrix. During the implementation of the printing control method, the printer can also respond to the completion of the point history of all bitmap data in the target data row, and the target data row is not the last data row of the bitmap dot matrix. All point history data in the point history matrix is ​​cleared. Then, the second target bitmap data at the beginning of the next data row is written to the preset target position. According to the second target bitmap data, multiple fifth data in the bitmap dot matrix are written to the point history matrix. The relative positions of the fifth data and the second target bitmap data in the point history matrix are the same as their relative positions in the bitmap dot matrix. Then, the fourth heating level corresponding to the point history matrix after the data writing is completed is determined, and the second target bitmap data is printed according to the fourth heating level.

[0064] In one embodiment, the relative positions of the fifth data and the second target bitmap data in the point history matrix and in the bitmap dot matrix are the same. This means that after the fifth data is written into a matrix position in the point history matrix, the relative distance between this matrix position and the preset target position is the same as the relative distance between the dot matrix position of the fifth data in the bitmap data and the dot matrix position of the second target bitmap data in the bitmap data. The relative direction between this matrix position and the preset target position is also the same as the relative direction between the dot matrix position of the fifth data in the bitmap data and the dot matrix position of the second target bitmap data in the bitmap data.

[0065] It should be noted that the method of confirming the fourth heating energy level is the same as the method of confirming the first heating energy level in step 420, and the method of printing the second target bitmap data based on the fourth heating energy level is the same as the method of printing the current point history data in the preset target position in step 420, which will not be repeated here.

[0066] The following is an overall embodiment to illustrate the printing control method provided by the above embodiment.

[0067] The dot history module in the printer has 426 reference dots, each reference dot matrix is ​​associated with a reference heating energy level, and the dot history module is configured as follows: Figure 7 The point history matrix shown contains (T, 4) as the preset target location. See also... Figure 8 When printing is required, the host computer (such as a mobile terminal, PC, etc.) sends a print job to the printer, and the printer converts the document to be printed into a format similar to the print job. Figure 9The bitmap dot matrix is ​​then processed. The dot history module first reads the first 5 rows of data from the bitmap dot matrix and triggers dot history processing. After dot history processing begins, columns C1 to C5 of the read data from rows 1 to 5 are written to positions 4 to 0 of T, N1, N2, N3, and N4, respectively. The current dot history matrix is ​​then compared one by one with the 426 reference dot matrices to determine the corresponding heat level. This heat level is the heat level of the bitmap data at point C1 in row 1 of the bitmap dot matrix.

[0068] Next, the data is shifted to the left in the current point history matrix, so that the point history data in columns 4 to 0 in the point history matrix are moved to the position of columns 5 to 1. Then, the data in column C6 is read by window shifting and written to column 0. The current point history matrix is ​​compared with the 426 reference point matrices one by one to determine the heat energy level corresponding to the current point history matrix. This heat energy level is the heat energy level of the bitmap data of point C2 in the first row of the bitmap point matrix.

[0069] This process continues, determining the heat level of each column of the bitmap data in the first row. After all the data in the first row has been written, four columns of "0" data are appended to ensure that the data Cn in the last column is moved to the fourth column position. After outputting the heat level of the last bitmap data, the point history processing of all bitmap data in the current data row is complete. The thermal controller saves the energy level data of all bitmap data in the current data row and controls the heating time of each point according to the energy level.

[0070] While processing the data in the first row, the module simultaneously receives data from the sixth row for data buffering. The module uses internal SRAM as a data buffer, and reading column Cn takes approximately 10 system clock cycles, while comparing and outputting data only requires about 5 system clock cycles. This significantly reduces the time required for software processing, which involves reading data from external RAM and then looking up data in a table.

[0071] After processing the point history of the first row and receiving the data of the sixth row, the point history processing of the second row can be triggered, and so on, until the point history processing of the last row of bitmap data is completed, resulting in the following: Figure 10 The heat generation energy level table.

[0072] In addition to the embodiments described above, one embodiment of this application also provides a printer. See also Figure 11 , Figure 11 This is a schematic diagram of the structure of a printer provided in one embodiment of this application. Figure 11 As shown, the printer includes a memory 1100 and a processor 1200. The number of memory 1100 and processor 1200 can be one or more. Figure 11 Taking a memory 1100 and a processor 1200 as an example; Figure 11The memory 1100 and processor 1200 can be connected via a bus or other means. Figure 11 Taking the example of a connection between China and Israel via a bus.

[0073] The memory 1100, as a computer-readable storage medium, can be used to store one or more software programs, computer-executable programs, and modules, such as the programs, instructions, or modules corresponding to the information processing methods provided in any embodiment of this application. The processor 1200 implements the printing control method provided in any embodiment of this application by executing one or more computer programs, instructions, and modules stored in the memory 1100.

[0074] The memory 1100 may primarily include a program storage area and a data storage area, wherein the program storage area may store the operating system and computer programs required for at least one function. Furthermore, the memory 1100 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 1100 may further include memory remotely located relative to the processor 1200, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0075] In addition to the embodiments described above, one embodiment of this application also provides a computer-readable storage medium storing computer-executable instructions for performing the printing control method as described in any of the preceding embodiments.

[0076] Furthermore, one embodiment of this application also provides a computer program product, including a computer program or computer instructions stored in a computer-readable storage medium. The printer's processor reads the computer program or computer instructions from the computer-readable storage medium and executes the computer program or computer instructions, causing the communication device to perform the printing control method as described in any of the preceding embodiments.

[0077] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0078] The above is a detailed description of the preferred embodiments of this application. However, this application is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.

Claims

1. A printing control method, characterized in that, Includes the following steps: Based on all point history data in the current point history matrix, the preset shift amount, and the preset data shift direction, the bitmap data in the bitmap matrix is ​​read by windowing and shifting to obtain the updated point history matrix. The preset target position of the point history matrix is ​​associated with the point history matrix. Determine the first heat energy level corresponding to the updated point history matrix, and print the current point history data at the preset target location according to the heat energy level.

2. The method according to claim 1, characterized in that, The step involves performing a windowed shift read of the bitmap data in the bitmap matrix based on all point history data in the current point history matrix, a preset shift amount, and a preset data shift direction, to obtain the updated point history matrix, including: Based on the preset shift amount and each first data in all the point history data, determine each second data corresponding to each first data in the multiple bitmap data of the bitmap matrix, wherein the first data is located at a preset boundary position of the point history matrix, the second data is not located in the point history matrix, and the distance between the second data and the corresponding first data in the bitmap matrix is ​​less than or equal to the preset shift amount in the preset data shift direction; The data of all points is shifted according to the preset data shift direction and preset shift amount; Each second data point is written into the point history matrix according to the position of each first data point.

3. The method according to claim 2, characterized in that, The step of writing each second data point into the point history matrix according to the position of each first data point includes: In response to the result of determining each of the second data as a failure, each of the second data is determined as fill data; Each of the filling data is written into the point history matrix according to the position of each of the first data.

4. The method according to claim 1, characterized in that, The determination of the first heat level corresponding to the updated point history matrix includes: A target control matrix matching the updated point history matrix is ​​determined from a set of preset control matrices, wherein the control matrix is ​​associated with the control calorific level; The control pyrogenic energy level associated with the target control matrix is ​​taken as the first pyrogenic energy level.

5. The method according to claim 1, characterized in that, The method further includes: In response to the generation of the bitmap dot matrix, the first bitmap data in the bitmap dot matrix is ​​written to the preset target position according to the preset data shift direction, and multiple third data in the bitmap dot matrix are written to the point history matrix according to the first bitmap data, wherein the relative position of the third data and the first bitmap data in the point history matrix is ​​the same as the relative position in the bitmap dot matrix; Determine the second heat level corresponding to the point history matrix after the data writing is completed, and print the first bitmap data according to the second heat level.

6. The method according to claim 1, characterized in that, The preset data shift direction includes the shift direction for the data row, and the current point history data at the preset target position is located in the target data column in the bitmap matrix; The method further includes: In response to completing the point history of all bitmap data in the target data column, and the target data column is not the last data column of the bitmap matrix, all point history data in the point history matrix are cleared. The first target bitmap data at the starting position of the next data column is written to the preset target position, and multiple fourth data in the bitmap dot matrix are written to the dot history matrix according to the first target bitmap data, wherein the relative position of the fourth data and the first target bitmap data in the dot history matrix is ​​the same as the relative position in the bitmap dot matrix; The third heat generation level corresponding to the point history matrix after the data writing is completed is determined, and the first target bitmap data is printed according to the third heat generation level.

7. The method according to claim 1, characterized in that, The preset data shift direction includes the shift direction for the data column, and the current point history data at the preset target position is located in the target data row in the bitmap matrix; The method further includes: In response to completing the point history of all bitmap data in the target data row, and the target data row is not the last data row of the bitmap matrix, all point history data in the point history matrix are cleared. The second target bitmap data at the beginning of the next data row is written to the preset target position, and multiple fifth data in the bitmap dot matrix are written to the dot history matrix according to the second target bitmap data, wherein the relative position of the fifth data and the second target bitmap data in the dot history matrix is ​​the same as the relative position in the bitmap dot matrix; The fourth heat level corresponding to the point history matrix after the data writing is completed is determined, and the second target bitmap data is printed according to the fourth heat level.

8. A printer, characterized in that, include: At least one processor; At least one memory for storing at least one program; The printing control method as described in any one of claims 1 to 7 is implemented when at least one of the programs is executed by at least one of the processors.

9. A computer-readable storage medium storing computer-executable instructions, characterized in that, The computer-executable instructions are used to execute the printing control method as described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program or computer instructions, characterized in that, The computer program or the computer instructions are stored in a computer-readable storage medium. The printer's processor reads the computer program or the computer instructions from the computer-readable storage medium and executes the computer program or the computer instructions, causing the printer to perform the printing control method according to any one of claims 1 to 7.