Printhead heating control method and related device
By assigning multiple heating levels and energy segments to the pixels of a thermal printer and dynamically adjusting the heating control, the problem of balancing accuracy and power consumption in thermal printers is solved, achieving high-quality, energy-saving printing results and extending the life of the equipment.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- WUHAN JINGCHEN INTELLIGENT IDENTIFICATION TECH CO LTD
- Filing Date
- 2025-11-27
- Publication Date
- 2026-06-18
AI Technical Summary
Existing thermal printers cannot effectively control the balance between the accuracy and power consumption of the heating process during printing, resulting in unsatisfactory printing results. In particular, when printing high-precision images, problems such as blurry images, overheating and damage to the print head, or paper discoloration are prone to occur.
By assigning multiple heating energy levels to each pixel in the image to be printed, and allocating corresponding heating energy segments according to the heating energy levels, and dynamically adjusting the total heating energy and energy segments in combination with printing parameters and environmental conditions, precise heating control is achieved.
It improves printing quality, saves energy and reduces emissions, extends the life of the print head, and ensures consistent printing quality, adapting to changes in different image content, environmental conditions and paper types.
Smart Images

Figure CN2025138223_18062026_PF_FP_ABST
Abstract
Description
Printhead heating control methods and related equipment
[0001] This application claims priority to Chinese Patent Application No. 202411812320.7, filed on October 12, 2024, entitled "Printhead Heating Control Method and Related Equipment"; Chinese Patent Application No. 202510078854.X, entitled "Heating Control Method, Apparatus and Electronic Equipment for Thermal Printer"; and Chinese Patent Application No. 202510218228.6, entitled "Thermal Printing Method, Apparatus, Equipment, Storage Medium and Program Product", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the fields of computer and communication technology, and more specifically, to a printhead heating control method and related equipment. Background Technology
[0003] Thermal printers are widely used in printing invoices, barcodes, and labels. Their working principle involves controlling the temperature of the heating element in the thermal printhead to conduct heat to the thermal paper, creating a chemical reaction that displays the image. Existing thermal printers mostly use simple constant-temperature heating control, unable to dynamically adjust the heating intensity according to the different requirements of the printed content. This method easily leads to unsatisfactory print results, especially when printing high-precision images, resulting in problems such as blurry images, overheating damaging the printhead, or paper discoloration. Current technology still has many shortcomings in flexible heating control for different printing needs, especially when printing complex content or using different types of thermal paper. How to effectively balance the accuracy and power consumption of the heating process has become a technical challenge. Summary of the Invention
[0004] The embodiments of this application provide a printhead heating control method and related equipment, which can at least to some extent overcome the problem of the prior art's inability to effectively control the balance between the accuracy and power consumption of the heating process.
[0005] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0006] According to one aspect of the embodiments of this application, a printhead heating control method is provided, comprising: assigning heating energy levels to each pixel in the image to be printed, wherein there are multiple heating energy levels; assigning at least one corresponding heating energy segment to each pixel according to the heating energy level of each pixel; and heating each pixel on the printing paper according to the corresponding heating energy segment.
[0007] In some feasible embodiments of this application, the printhead heating control method further includes: determining the total heating energy based on printing parameters; and determining the heating energy corresponding to each heating energy segment based on the total heating energy.
[0008] In some feasible embodiments of this application, the printing parameters include printhead temperature, battery voltage, and paper type; determining the total heating energy based on the printing parameters specifically includes:
[0009] Obtain the printhead temperature, battery voltage, and paper type; determine the total heating energy based on the printhead temperature, battery voltage, and paper type.
[0010] In some feasible embodiments of this application, determining the heating energy corresponding to each heating energy segment based on the total heating energy specifically includes: allocating the heating energy to each heating energy segment proportionally based on the total heating energy, wherein the sum of the energy of all heating energy segments is equal to the total heating energy.
[0011] In some feasible embodiments of this application, the heating energy segment includes a first energy segment, a second energy segment, and a third energy segment. The step of allocating heating energy to each heating energy segment according to the total heating energy in proportion specifically includes: allocating heating energy to the first energy segment according to a first proportion; allocating heating energy to the second energy segment according to a second proportion; and allocating heating energy to the third energy segment according to a third proportion.
[0012] In some feasible embodiments of this application, the heating energy segment includes a heating time period, and determining the heating energy corresponding to each heating energy segment based on the total heating energy specifically includes: determining the heating time corresponding to each heating time period based on the total heating energy.
[0013] In some feasible embodiments of this application, the heating energy segment includes a heating power segment, and determining the heating energy corresponding to each heating energy segment based on the total heating energy specifically includes: determining the heating power corresponding to each heating power segment based on the total heating energy.
[0014] In some feasible embodiments of this application, the step of allocating at least one corresponding heating energy segment to each pixel based on the heating energy level of each pixel specifically includes: determining the heating energy corresponding to each pixel based on the heating energy level of each pixel; allocating at least one heating energy segment to each pixel based on the heating energy, wherein the total energy of all heating energy segments allocated to each pixel is equal to the heating energy corresponding to that pixel.
[0015] In some feasible embodiments of this application, the step of assigning heating energy levels to each pixel in the image to be printed specifically includes: assigning heating energy levels to each pixel row by row according to the image to be printed, forming pixel data corresponding to each heating energy level.
[0016] In some feasible embodiments of this application, at least one heating energy segment is assigned to each pixel according to the heating energy level of each pixel. Specifically, this includes: assigning a heating energy segment to each pixel according to the pixel data corresponding to each heating energy level, thereby forming pixel data corresponding to each heating energy segment.
[0017] In some feasible embodiments of this application, the step of assigning heating energy levels to each pixel in the image to be printed according to the image to be printed specifically includes: performing information processing on the image to be printed, dividing the image to be printed into pixels; and assigning heating energy levels to each pixel according to the division of the image to be printed.
[0018] In some feasible embodiments of this application, heating each pixel on the printing paper according to the corresponding heating energy segment specifically includes: in response to the start of printing, aligning the paper head with the printing line; counting the number of paper feed lines, and when the number of lines with data is counted, heating the pixels of that line according to the corresponding heating energy segment.
[0019] In some feasible embodiments of this application, before assigning heating energy levels to each pixel in the image to be printed according to the image to be printed, the method further includes: receiving an image to be printed sent by a user, the image to be printed being edited by the user.
[0020] In some feasible embodiments of this application, the image to be printed includes a row to be printed and at least one target row; the heating energy segment includes a heating duration; assigning a heating energy level to each pixel in the image to be printed specifically includes: determining the heating energy level of each pixel in the row to be printed based on the dot matrix data of the row to be printed and at least one target row in the image to be printed; the target row is adjacent to the row to be printed; heating each pixel according to the corresponding heating energy segment specifically includes: heating each pixel according to the heating duration corresponding to each pixel.
[0021] In some feasible embodiments of this application, the heating energy level of each pixel in the row to be printed is determined based on the dot matrix data of the row to be printed and at least one target row in the image to be printed. Specifically, this includes: determining the thermal history data corresponding to each heating energy level based on the dot matrix data of the row to be printed and at least one target row in the image to be printed. The thermal history data is used to characterize whether each pixel in the row to be printed needs to be heated at each heating energy level; and determining the heating energy level of each pixel in the row to be printed based on the thermal history data corresponding to each heating energy level.
[0022] In some feasible embodiments of this application, determining the thermal history data corresponding to each heating level includes: calculating the dot matrix data of the row to be printed and at least one target row according to the thermal history algorithm formula corresponding to each heating level, so as to obtain the thermal history data corresponding to each heating level.
[0023] In some feasible embodiments of this application, determining the heating energy level of each pixel in the row to be printed based on the thermal history data corresponding to each heating energy level includes: determining the target heating energy level that needs to be heated for each pixel in the row to be printed based on the thermal history data corresponding to each heating energy level; and determining the target heating energy level with the longest heating time for each pixel as the heating energy level for each pixel.
[0024] In some feasible embodiments of this application, at least one target row is the preceding N rows and the following M rows corresponding to the row to be printed, where N and M are non-negative integers and N and M are not both 0; the number of pixels in the target row in the dot matrix data is greater than or equal to the row to be printed.
[0025] In some feasible embodiments of this application, the printhead heating control method further includes: allocating heating duration to each heating energy level according to a preset method.
[0026] In some feasible embodiments of this application, each pixel is heated according to the heating duration corresponding to each pixel, specifically including: starting heating each pixel simultaneously, and controlling the total heating time of each pixel according to the heating duration corresponding to each pixel.
[0027] In some feasible embodiments of this application, the heating duration is allocated to each heating level according to a preset method, specifically including: determining at least one target heating level that needs to have its heating duration adjusted and the adjustment method of each target heating level according to the positional pattern of the pixels corresponding to each heating level in the content to be printed; increasing or decreasing the heating duration of each target heating level according to the adjustment method of each target heating level.
[0028] In some feasible embodiments of this application, the increase or decrease in duration does not exceed a preset proportion of the original heating duration.
[0029] In some feasible embodiments of this application, the target heating energy level requiring heating duration adjustment and the adjustment method of each target heating energy level are determined based on the positional pattern of the pixels corresponding to each heating energy level in the content to be printed. This includes: determining whether the pixels corresponding to each heating energy level need to have their heating energy reduced based on their position in the content to be printed; if so, determining that heating energy level is the first target heating energy level for which heating duration needs to be reduced; and determining whether the pixels corresponding to each heating energy level need to have their heating energy increased based on their position in the content to be printed; if so, determining that heating energy level is the second target heating energy level for which heating duration needs to be increased.
[0030] In some feasible embodiments of this application, the heating time of each target heating energy level is increased or decreased, including: reducing the heating time of the first target heating energy level, determining the total reduced heating time td, and allocating td to each second target heating energy level.
[0031] In some feasible embodiments of this application, the heating time of each target heating energy level is increased or decreased, including: determining the heating time ti that the second target heating energy level with the highest energy level needs to be increased, and allocating ti to other second target heating energy levels.
[0032] In some feasible embodiments of this application, the dot matrix data is binary data, in which pixels that need to be heated are represented by bit value 1, and pixels that do not need to be heated are represented by bit value 0.
[0033] In some feasible embodiments of this application, before determining the heating energy level of each pixel in the row to be printed based on the dot matrix data of the row to be printed and at least one target row, the method further includes: receiving the dot matrix data of the content to be printed, wherein the content to be printed is edited by the user; and obtaining the dot matrix data of the row to be printed and at least one target row from the dot matrix data of the content to be printed.
[0034] In some feasible embodiments of this application, the heating energy segment includes a target heating duration; according to the heating energy level of each pixel, at least one corresponding heating energy segment is allocated to each pixel, specifically including: determining the number of heating times for each pixel according to the heating energy level of each pixel; each heating corresponds to a preset initial heating duration; adjusting the initial heating duration corresponding to each heating based on the current working state parameters of the print head to obtain the target heating duration corresponding to each heating; heating each pixel according to the corresponding heating energy segment, specifically including: heating each pixel according to the target heating duration corresponding to each heating and the heating level of each pixel.
[0035] In some feasible embodiments of this application, the initial heating time corresponding to each heating is adjusted based on the current working state parameters of the printhead to obtain the target heating time corresponding to each heating. This includes: adjusting the initial heating time corresponding to each heating based on the current temperature value of the printhead, and / or the current driving voltage value of the printhead, and / or the number of target heating points corresponding to each heating level to obtain the target heating time corresponding to each heating.
[0036] In some feasible embodiments of this application, the initial heating duration for each heating cycle is adjusted based on the current temperature value of the printhead, and / or the current driving voltage value of the printhead, and / or the number of target heating points corresponding to each heating level, to obtain the target heating duration for each heating cycle. This includes: adjusting the initial heating duration for each heating cycle based on the current temperature value of the printhead and the reference temperature value of the printhead to obtain a first adjusted heating duration for each heating cycle; adjusting the first adjusted heating duration for each heating cycle based on the current driving voltage value of the printhead and the driving voltage threshold value of the printhead to obtain a second adjusted heating duration for each heating cycle; and adjusting the second adjusted heating duration for each heating cycle based on the number of target heating points corresponding to each heating level to obtain the target heating duration for each heating cycle.
[0037] In some feasible embodiments of this application, adjusting the first adjusted heating duration corresponding to each heating cycle based on the current driving voltage value of the printhead and the driving voltage threshold of the printhead to obtain the second adjusted heating duration corresponding to each heating cycle includes: determining a voltage compensation coefficient based on the current driving voltage value of the printhead; and adjusting the first adjusted heating duration corresponding to each heating cycle based on the voltage compensation coefficient, the current driving voltage value, and the driving voltage threshold to obtain the second adjusted heating duration corresponding to each heating cycle.
[0038] In some feasible embodiments of this application, the second adjusted heating time corresponding to each heating is adjusted according to the number of target heating points corresponding to each heating level to obtain the target heating time corresponding to each heating, including: determining the heating point number compensation coefficient according to the number of target heating points corresponding to each heating level; adjusting the second adjusted heating time corresponding to each heating according to the heating point number compensation coefficient and the number of target heating points corresponding to each heating level to obtain the target heating time corresponding to each heating.
[0039] In some feasible embodiments of this application, the above-mentioned printhead heating control method further includes: dividing the current row into at least one printing segment according to the number of target heating points; controlling the printhead to complete the thermal printing of the current row according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point, including: controlling the printhead to sequentially complete the thermal printing of each printing segment according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point.
[0040] In some feasible embodiments of this application, the print head is controlled to sequentially complete the thermal printing of each printing segment according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point. This includes: controlling the print head to sequentially heat the target heating points corresponding to each printing segment in time intervals according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point, so as to complete the thermal printing of each printing segment.
[0041] In some feasible embodiments of this application, determining the heating level corresponding to each of the multiple target heating points includes: determining the heating level corresponding to each of the multiple target heating points based on the printing data of the current row and its adjacent rows.
[0042] In some feasible embodiments of this application, after the print head completes the thermal printing of the current line according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point, the method further includes: cooling the print head, and determining the heating parameters of the print head when printing the next line of the current line during the cooling process.
[0043] According to one aspect of the embodiments of this application, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the printhead heating control method as described in the above embodiments.
[0044] According to one aspect of the embodiments of this application, an electronic device is provided, including: one or more processors; and a storage device configured to store one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the printhead heating control method as described in the above embodiments.
[0045] According to one aspect of the embodiments of this application, a computer program product is provided, including a computer program, characterized in that, when executed by a processor, the computer program implements the printhead heating control method as described in the above embodiments.
[0046] In some embodiments of this application, the technical solutions provided by the present application, through precise allocation of heating energy levels and heating energy segments, combined with dynamic heating control, can flexibly cope with different image content, environmental conditions and paper types, improve printing effect, save energy and reduce emissions and extend the service life of the print head, effectively control the balance between the accuracy and power consumption of the heating process, and also ensure the consistency of printing quality.
[0047] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0048] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0049] Figure 1 illustrates an exemplary implementation environment in which the technical solutions of the embodiments of this application can be applied.
[0050] Figure 2 shows a schematic flowchart of a printhead heating control method provided in an embodiment of this application.
[0051] Figure 3 shows a schematic diagram of energy level allocation for the image to be printed.
[0052] Figure 4 shows a schematic flowchart of another printhead heating control method provided in an embodiment of this application.
[0053] Figure 5 shows a diagram illustrating the relationship between sensor acquisition and heating control according to an embodiment of this application.
[0054] Figure 6 shows a timing diagram of energy level heating control provided in one embodiment of this application.
[0055] Figure 7 shows a schematic diagram of energy level heating control provided in one embodiment of this application.
[0056] Figure 8 shows a schematic flowchart of another printhead heating control method provided in an embodiment of this application.
[0057] Figure 9 shows an example diagram of dot matrix data for a row to be printed and a target row provided in an embodiment of this application.
[0058] Figure 10 shows an example diagram of the allocation of heating time for each heating energy level provided in an embodiment of this application.
[0059] Figure 11 shows a schematic flowchart of another printhead heating control method provided in an embodiment of this application.
[0060] Figure 12 shows an example diagram of the setting of heating energy levels for each pixel according to an embodiment of this application.
[0061] Figure 13 shows an example diagram of the calculation results of the heating energy level of a thermal pixel provided in an embodiment of this application.
[0062] Figure 14 shows a schematic flowchart of another printhead heating control method provided in an embodiment of this application.
[0063] Figure 15 shows an example diagram of fine-tuning the heating time of each heating level provided in an embodiment of this application.
[0064] Figure 16 shows a schematic flowchart of another printhead heating control method provided in an exemplary embodiment of this application;
[0065] Figure 17 shows a schematic flowchart of another printhead heating control method provided in an exemplary embodiment of this application;
[0066] Figure 18 shows a schematic flowchart of another printhead heating control method provided in an exemplary embodiment of this application;
[0067] Figure 19 shows a schematic flowchart of another printhead heating control method provided by an exemplary embodiment of this application. Detailed Implementation
[0068] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0069] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0070] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0071] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0072] Figure 1 is an implementation environment diagram of the printhead heating control method provided in one embodiment. As shown in Figure 1, the implementation environment includes a thermal printer, which includes a control mechanism 100, an execution mechanism 200, and a data acquisition mechanism 300.
[0073] The control mechanism 100 is electrically connected to the execution mechanism 200 and the acquisition mechanism 300, respectively, and is configured to acquire various data information obtained by the acquisition mechanism 300 and control the execution mechanism 200 to execute various instructions. The control mechanism 100 can be various integrated circuits and circuit boards such as microcontrollers, processors, and systems on a chip (SoC).
[0074] The actuator 200 may include a print head, a motor, a paper feeding mechanism, a paper return mechanism, and other mechanisms that specifically perform printing.
[0075] The data acquisition mechanism 300 includes a touch panel, various sensors, and communication chips, configured to acquire various external data and information.
[0076] When a user sends an image to be printed to the thermal printer, the control mechanism 100 acquires the image through the acquisition mechanism 300, and then assigns a heating energy level to each pixel in the image based on the image. After assigning the heating energy levels, the execution mechanism 200 can be controlled to perform the printing task. Specifically, based on the heating energy level of each pixel, at least one corresponding heating energy segment is assigned to each pixel. During printing, the execution mechanism 200 heats each pixel on the printing paper according to the corresponding heating energy segment, completing the printing of the image.
[0077] It should be noted that there are multiple heating energy levels allocated above.
[0078] The control system 400 can also be a smartphone, tablet, laptop, desktop computer, or other device connected to the printer body, but is not limited to these. The control mechanism 100, the actuator 200, and the acquisition mechanism 300 can be connected via Bluetooth, USB, or other communication methods, which are not limited herein.
[0079] The implementation details of the technical solutions in the embodiments of this application are described in detail below:
[0080] Figure 2 shows a flowchart of a printhead heating control method according to an embodiment of this application. This printhead heating control method can be executed by a printer, which may be the printer shown in Figure 1. Referring to Figure 2, the printhead heating control method includes at least:
[0081] S100 assigns heating energy levels to each pixel in the image to be printed, based on the image to be printed. There are multiple heating energy levels.
[0082] S200: Based on the heating energy level of each pixel, assign at least one corresponding heating energy segment to each pixel.
[0083] The S300 heats each pixel according to its corresponding heating energy level.
[0084] This application ensures that each area receives adequate heating during printing by assigning appropriate energy levels and heating sections to each pixel, thereby avoiding overheating or underheating and enabling high-precision images to be printed completely and clearly, especially with greater accuracy in detail.
[0085] Because the heating energy for each pixel is allocated according to actual needs, excessive heating energy is avoided for the entire image, thus reducing energy consumption. Especially for large background areas, low-energy pixels will reduce heating intensity, improving overall energy efficiency.
[0086] The precise heating control described above avoids overheating and helps protect the printhead from damage caused by overheating, thereby extending the lifespan of the equipment.
[0087] At the same time, whether it is simple text or complex images or barcodes, ideal printing results can be obtained by different energy level allocations and heating energy segment control, meeting different printing needs.
[0088] In summary, in the embodiments of this application, by dynamically adjusting the heating intensity according to the different printing content, the details of the image are fully displayed, reducing the occurrence of problems such as overheating and blurring. Through temperature feedback and multi-level control, damage to the print head due to overheating is avoided, extending the service life of the equipment. Furthermore, the heating parameters can be automatically adjusted according to different types of thermal paper and environmental conditions, enabling the printer to maintain stable printing results under various conditions.
[0089] In the S100, by assigning an appropriate heating energy level to each pixel based on the characteristics of the image, the uniform heating intensity across the entire image can be avoided, thus precisely controlling the heating amount in each area during the printing process. For example, a higher energy level can be assigned to areas with rich details (such as text, barcodes, and lines) to ensure print clarity, while a lower energy level can be assigned to background areas to avoid wasting energy or overheating.
[0090] In some embodiments of this application, prior to step S100, the method further includes:
[0091] Receives a printable image sent by a user, the printable image being edited by the user.
[0092] In this embodiment, by receiving user-edited images, the printing system can process and print images according to the user's specific needs. Whether it's adjusted colors, brightness, or complex graphic content, the printing process can automatically optimize heating control based on these adjustments, ensuring the print quality matches the user's expectations. Different users may edit a wide variety of images, such as richly colored pictures or intricately detailed graphics. Receiving and processing user-edited images ensures the printer can precisely heat different areas based on the user's edits, avoiding print quality deviations caused by a uniform heating strategy. Because the user has edited the image, it may have specific detail or color adjustments. By receiving these edited images, the printer can accurately analyze the needs of each pixel, ensuring the heat distribution matches the characteristics of the edited image, thereby improving print detail and color consistency. After the image has been edited by the user, especially involving color and detail adjustments, the printer can optimize heating energy based on these adjustments, avoiding printing errors caused by standardized processing. Thus, the printed output is more faithful to the user's creation, presenting a higher quality print result.
[0093] Specifically, in some embodiments, the specific implementation of step S100 can be found in the following embodiments. This embodiment is a detailed description of step S100 in the printhead heating control method shown in the embodiment corresponding to FIG2. In the printhead heating control method, step S100 may include the following steps:
[0094] The image to be printed is processed by dividing it into pixels.
[0095] The image to be printed is divided into pixels, and heating energy levels are assigned to each pixel.
[0096] In this embodiment, as shown in Figure 3, the image is first divided into pixels and heating energy levels are allocated. This allows the printer to more precisely control every detail during the printing process, effectively avoiding printing errors caused by image complexity or varying color depths in traditional printing methods, thus improving the overall print quality. Furthermore, by allocating energy levels to each pixel, the printer can provide different heating energy levels according to the needs of different areas, ensuring that each area is printed with appropriate heating energy, thereby improving printing accuracy. The precise allocation of heating energy levels for each pixel avoids overheating or underheating of certain areas, effectively preventing energy waste and improving resource utilization efficiency in the printing process. Therefore, this embodiment can flexibly adjust according to different types of images (such as color complexity, contrast, and level of detail) to adapt to various printing needs, improving printing speed and quality.
[0097] In some embodiments, the heating power of the thermal printhead can be controlled using a PWM method based on the heating intensity level (heating energy level) of each heating point (pixel). By adjusting the duty cycle of the pulses, the energizing time of the heating element is changed, achieving precise temperature control for different areas. The more complex and dense the printed content, the longer the heating time, and vice versa. When printing high-precision images, the heating intensity of fine areas and background areas differs, effectively avoiding overheating or underheating.
[0098] In some embodiments of this application, as shown in FIG4, before step S200 or step S300, the method further includes:
[0099] S400 determines the total heating energy based on the printing parameters.
[0100] S500, based on the total heating energy, determine the heating energy corresponding to each heating energy segment.
[0101] In this embodiment, by determining the total heating energy based on the specific parameters of the printing task and rationally distributing it to each heating energy segment, the heating intensity of each area during the printing process can be better controlled, thereby ensuring clearer image details and quality. For complex areas, the energy distribution is more reasonable, avoiding image blurring or unclearness caused by overheating or underheating. Dynamically adjusting the total heating energy and distributing it to different energy segments according to demand avoids energy waste during the heating process. By reducing unnecessary energy output, not only is the printer's energy efficiency improved, but the burden on the thermal printhead is also reduced, thereby extending the equipment's lifespan.
[0102] This embodiment can flexibly adjust the heating energy according to different printing parameters (such as paper type, image content, etc.), enabling the device to maintain stable output and high-quality printing results in various printing scenarios. Whether printing complex images or simple text, optimal heating control can be achieved. Through reasonable energy distribution, not only is print quality improved, but printing stability and speed are also enhanced. Paper jams, paper damage, or printing errors caused by uneven heating are avoided, ensuring long-term stable operation of the device.
[0103] Specifically, in some embodiments, before printing begins, the thermal printer analyzes the image or text information to be printed, extracting its density, content complexity, and level of detail to generate heating requirement parameters. Based on a preset printing parameter library, different image contents are categorized, such as high-density images, text, and barcodes, to determine the required heating intensity for each part.
[0104] Meanwhile, the thermal printer uses temperature and humidity sensors to detect the temperature and humidity conditions of the printing environment and adjusts the heating parameters accordingly to adapt to different environmental conditions. Specifically, it appropriately increases the heating intensity in low-temperature environments and decreases the heating intensity in high-temperature environments to prevent overheating. The thermal printer also identifies the type of thermal paper by reading the markings on the thermal paper (such as barcodes or RFID) or user presets. Different thermal papers respond differently to temperature, so the system adjusts the printhead heating profile based on the characteristics of the thermal paper.
[0105] In the S400, by adjusting the total heating energy according to different printing tasks and environmental conditions, problems such as overheating or underheating caused by a fixed energy setting can be avoided. For example, printing complex images or high-resolution text may require higher total heating energy, while printing simple text or barcodes can reduce the total heating energy, thereby optimizing energy use. At the same time, adjusting the total heating energy according to changes in paper type (such as plain paper, thermal paper, or specially coated paper) or ambient temperature ensures print quality and stable equipment operation.
[0106] Specifically, in some embodiments, the specific implementation of step S400 can be found in the following embodiments. This embodiment is a detailed description of step S400 in the printhead heating control method shown in the embodiment corresponding to FIG4. In the printhead heating control method, the printing parameters include printhead temperature, battery voltage, and paper type. Step S400 may include the following steps:
[0107] Get printhead temperature, battery voltage, and paper type.
[0108] The total heating energy is determined based on the printhead temperature, battery voltage, and paper type.
[0109] In this embodiment, by monitoring and adjusting (which can be in real-time) the printhead temperature, battery voltage, and paper type, the heating control for each printing task is ensured to be optimal. This avoids overheating or underheating problems caused by fixed energy allocation. The total heating energy can be dynamically adjusted according to changes in different paper types and printhead temperatures, thereby improving the stability and clarity of print results and preventing printing problems such as color difference and blurriness. By optimizing the utilization of battery voltage, not only is excessive battery discharge avoided, but the heating energy can also be dynamically adjusted according to the actual battery state, thereby reducing energy consumption and extending the lifespan of the device.
[0110] Specifically, as shown in Figure 5, the determination of the total heating energy in this application mainly includes the detection of environmental conditions corresponding to the printhead temperature and battery voltage, and the detection of paper type corresponding to the paper type.
[0111] This thermal printer uses a temperature sensor 501 to collect the printhead temperature, a battery-side circuit instrument 502 to collect the voltage, and a scanning mechanism 503 to scan a label to obtain the paper type. The data is then comprehensively analyzed in the main control device 504 to obtain the total energy (which can be in the form of duration) and the energy of each pixel. Finally, the main control device 504 can control the printhead 505 to perform multi-stage heating.
[0112] Environmental condition testing mainly includes printhead temperature testing and battery voltage testing. Environmental condition testing is a crucial step in ensuring print quality and equipment performance. The operating environment of the printhead directly affects its heating effect and lifespan; in particular, printhead temperature and battery voltage play a vital role in the stability and efficiency of the thermal printing process.
[0113] Specifically, before printing a piece of content, the temperature of the print head and the battery voltage are detected, assuming they are T and V respectively. When T is less than the reference temperature Tr, it means that the ambient temperature is too low, and the heating time needs to be increased in order to reach the reference heating energy, and vice versa. Similarly, when V is less than the reference voltage Vr, it means that the battery voltage is too low, and the heating time also needs to be increased in order to reach the reference heating energy.
[0114] Different paper types may have different materials and processes, requiring different heating energy. Therefore, it is necessary to detect the paper type before printing and set the appropriate heating parameters accordingly. Paper type detection can be done automatically or manually. Automatic detection uses RFID tags with pre-written parameters on the thermal paper, recording information such as paper type, thickness, and applicable temperature. By reading this information, the system can automatically identify the paper type. Manual input involves the user editing the paper information in advance on a mobile app. When the phone is connected to the printer and printing is initiated, the app sends the edited paper information to the printer. The printer then assigns a specific heating time to the label paper to be printed. Alternatively, the user can send the paper information to the printer through the printer's control panel.
[0115] This embodiment can meet printing needs under various environments and conditions. Whether it is low voltage, complex paper or high temperature environment, it can automatically adjust the total heating energy to ensure printing stability and efficiency.
[0116] In the S500, more precise heating control can be achieved by dynamically adjusting the distribution of heating energy segments. For example, high-density images or high-contrast areas may require stronger heating energy, while low-density areas or backgrounds require less energy. Reasonable energy allocation ensures fine and accurate printing results while avoiding waste. By precisely controlling the energy values of each heating segment, different printing content can be handled more effectively, ensuring a more balanced heating process throughout the image and preventing overheating or underheating in certain areas. Furthermore, since different paper types or printing modes may have different heating requirements (e.g., thermal paper requires lower temperatures, while plain paper may require higher temperatures), the allocation of total heating energy ensures the equipment's adaptability and efficient operation under various conditions.
[0117] Specifically, in some embodiments, the specific implementation of step S500 can be found in the following embodiments. This embodiment is a detailed description of step S500 in the printhead heating control method shown in the embodiment corresponding to FIG4. In the printhead heating control method, step S500 may include the following steps:
[0118] Based on the total heating energy, the heating energy is distributed proportionally to each heating energy segment, and the sum of the energy of all heating energy segments equals the total heating energy.
[0119] In this embodiment, the energy allocation for each heating energy segment is first determined based on the total heating energy (i.e., the total heat required by the heating system). Then, according to the specific needs of each heating segment (such as area size, heat consumption characteristics, etc.), the total heating energy is allocated according to a certain proportion. The sum of the allocated energy segments must equal the pre-set total heating energy. This embodiment ensures a more uniform and efficient heating process for the printhead, avoiding problems of excessive or insufficient heat. Through reasonable energy allocation, print quality is improved, equipment failure rate is reduced, and thermal management of the printing equipment is optimized, thereby achieving higher printing efficiency and stability.
[0120] In some specific embodiments, the aforementioned heating energy segment includes a first energy segment, a second energy segment, and a third energy segment. The aforementioned energy distribution scheme specifically includes: distributing heating energy to the first energy segment according to a first ratio; distributing heating energy to the second energy segment according to a second ratio; and distributing heating energy to the third energy segment according to a third ratio.
[0121] In this embodiment, at least three heating energy segments are included. Heating energy is distributed among these three segments according to a corresponding ratio, with each segment receiving a different amount of energy in a specific proportional relationship. This allows for more precise adjustment of the heating energy distribution, ensuring that each segment receives an appropriate amount of heat. Allocating different energy to each heating segment based on specific needs improves the uniformity of the heating process, avoids localized overheating or underheating, and enhances printing quality. Precise heating control prevents equipment damage or malfunctions caused by uneven heating, extending the equipment's lifespan.
[0122] For example, in one embodiment, the heating energy segment includes only three energy segments: a first energy segment, a second energy segment, and a third energy segment. The heating energy allocated to each segment can conform to the following formula: 4E1 = 2E2 = E3. Wherein, E1 is the heating energy of the first energy segment, E2 is the heating energy of the second energy segment, and E3 is the heating energy of the third energy segment.
[0123] Based on the heating energy segment allocation scheme described above, the total heating energy is equal to 7 times the heating energy of the first energy segment. Various energy allocation schemes can be obtained by combining the first, second, and third energy segments.
[0124] In some embodiments, the heating energy segment includes a heating time period. The above-mentioned determination of the heating energy corresponding to each heating energy segment based on the total heating energy is equivalent to determining the heating time corresponding to each heating time period based on the total heating energy.
[0125] Specifically, taking the three energy segments mentioned above—the first energy segment, the second energy segment, and the third energy segment—as examples, when the heating energy segment includes a heating time period, the first energy segment, the second energy segment, and the third energy segment correspond to the first time period, the second time period, and the third time period, respectively. When allocating energy, different heating times can be assigned to them, while other heating parameters (such as power, distance, etc.) remain constant, which can ensure that the heating energy is different for each heating time period.
[0126] The heating time allocated to the first, second, and third time periods can be expressed by the following formula: 4T1 = 2T2 = T3. Where T1 is the heating time for the first time period, T2 is the heating time for the second time period, and T3 is the heating time for the third time period.
[0127] It should be noted that the first time period, the second time period, and the third time period are three consecutive and non-overlapping time periods. Generally, their order by time is the first time period, the second time period, and the third time period.
[0128] In the above embodiments, by rationally allocating the heating time, the temperature of each heating segment can be raised to the required temperature within an appropriate time, thereby avoiding excessive or insufficient temperature fluctuations that could affect print quality and ensuring a more efficient heating process. Precise and reasonable heating time allocation allows each heating segment to obtain the required heat within the appropriate time, helping to avoid overheating or underheating, thus preventing overheating or undercooling of the heating segments, improving the energy efficiency of the equipment, and ensuring its stability.
[0129] In other embodiments, the heating energy segment includes a heating power segment, and the above-mentioned determination of the heating energy corresponding to each heating energy segment based on the total heating energy is equivalent to determining the heating power corresponding to each heating power segment based on the total heating energy.
[0130] Specifically, taking the three energy segments mentioned above—the first energy segment, the second energy segment, and the third energy segment—as examples, when the heating energy segment includes the heating power segment, the first energy segment, the second energy segment, and the third energy segment correspond to the first power segment, the second power segment, and the third power segment, respectively. When distributing energy, different heating powers can be assigned to them, while other heating parameters (such as power, distance, etc.) remain constant, which can ensure that the heating energy of each heating power segment is different.
[0131] The heating power allocated to the first, second, and third power segments can be expressed by the following formula: 4P1 = 2P2 = P3. Where P1 is the heating power of the first power segment, P2 is the heating power of the second power segment, and P3 is the heating power of the third power segment.
[0132] It should be noted that the first power segment, the second power segment, and the third power segment are three different power segments.
[0133] In some embodiments, the three power segments also correspond to three consecutive time periods, and the duration of the time periods corresponding to the three power segments is equal. Generally, the order of the time segments is the first power segment, the second power segment, and the third power segment, in order to conform to the law of gradually increasing heating power and reduce the warm-up time.
[0134] In other embodiments, the three power segments correspond to the same time period, and heating is performed using heating heads with different power (or the power can be superimposed using the same heating head).
[0135] In the above embodiments, distributing the total heating energy according to heating power segments allows for more precise power control of each segment, preventing overheating or underheating and ensuring uniform temperature rise. By rationally setting the power levels of each heating segment, the heating process can reach the required temperature in the shortest possible time, reducing ineffective heating time and improving energy efficiency. Excessive heating power may cause overheating or even damage to the equipment. Proper control of the heating power can avoid this problem and extend the equipment's lifespan. Both excessively high and low temperatures affect print quality. Precise control of the heating power ensures that the printhead temperature remains within the ideal range, thereby guaranteeing printing stability and high-quality output.
[0136] In the S200, the heating output of the printhead can be precisely controlled by assigning a specific heating energy band to each pixel. For example, high-energy pixels may require a stronger heating energy band (high energy output), while low-energy pixels correspond to a lower heating energy band (low energy output). This allocation method avoids uneven heating during the heating process, allowing the details and complex areas of the image to be fully displayed, while the background areas are not overheated.
[0137] Specifically, in some embodiments, the specific implementation of step S200 can be found in the following embodiments. This embodiment is a detailed description of step S200 in the printhead heating control method shown in the embodiment corresponding to FIG2. In the printhead heating control method, step S200 may include the following steps:
[0138] The heating energy corresponding to each pixel is determined based on the heating energy level of each pixel.
[0139] Based on the heating energy, at least one heating energy segment is assigned to each pixel, and the total energy of all heating energy segments assigned to each pixel is equal to the heating energy corresponding to that pixel.
[0140] In this embodiment, by allocating heating energy according to the heating energy level of each pixel, it is ensured that each pixel receives appropriate heating energy. This not only improves heating accuracy but also avoids overheating or underheating. Allocating heating energy to each pixel by assigning a corresponding heating energy segment allows for more efficient use of heating energy, making the overall heating process more efficient and preventing energy waste. Furthermore, the heating energy segments for different pixels can be adjusted according to actual conditions, enabling more precise temperature control during the heating process, avoiding temperature fluctuations, and ensuring stable operation of the device.
[0141] Because the heating energy is precisely distributed to each pixel, the energy distribution during printing is more uniform, effectively avoiding printing defects caused by uneven temperature, such as color cast and printing failures, thus improving print quality. At the same time, precise energy distribution also reduces the risk of overheating, helping to extend the equipment's lifespan.
[0142] Specifically, in some embodiments, the three time periods described above—the first time period, the second time period, and the third time period—are used for illustration.
[0143] In the aforementioned embodiments, we already know that the heating times allocated to the first, second, and third time periods can conform to the following formula: 4T1 = 2T2 = T3. Therefore, based on the combination of each heating time period, we can obtain a heating time period allocation scheme corresponding to seven different energy levels. Here, we define these seven different energy levels from low to high as the first energy level, the second energy level, the third energy level, the fourth energy level, the fifth energy level, the sixth energy level, and the seventh energy level, and define the heating time corresponding to the first time period as one unit duration.
[0144] In this embodiment, the first energy level is allocated only to the first heating time period, with a total heating time of 1 unit time. The second energy level is allocated only to the second heating time period, with a total heating time of 2 units. The third energy level is allocated the first heating time period plus the second heating time period, with a total heating time of 3 units. The fourth energy level is allocated only to the third heating time period, with a total heating time of 4 units. The fifth energy level is allocated the first heating time period plus the third heating time period, with a total heating time of 5 units. The sixth energy level is allocated the second heating time period plus the third heating time period, with a total heating time of 6 units. The seventh energy level is allocated the first heating time period plus the second heating time period plus the third heating time period, with a total heating time of 7 units. In other words, this embodiment achieves 7 levels of unit time duration control through the combination of the first, second, and third heating time periods, resulting in more precise temperature control during the heating process.
[0145] Specifically, in some other embodiments, the three power segments described above—the first power segment, the second power segment, and the third power segment—are used for illustration.
[0146] In the aforementioned embodiments, we already know that the heating power allocated to the first, second, and third power segments conforms to the following formula: 4P1 = 2P2 = P3. Therefore, based on the combination of each heating power segment, we can obtain a heating power segment allocation scheme corresponding to seven different energy levels. Here, we define these seven different energy levels from low to high as the first energy level, the second energy level, the third energy level, the fourth energy level, the fifth energy level, the sixth energy level, and the seventh energy level, and define the heating power corresponding to the first power segment as one unit power.
[0147] Specifically, for the first energy level, its allocated heating power segment is only the first power segment, with a total heating power of 1 unit power. For the second energy level, its allocated heating power segment is only the second power segment, with a total heating power of 2 units power. For the third energy level, its allocated heating power segment is the first power segment plus the second power segment, with a total heating power of 3 units power. For the fourth energy level, its allocated heating power segment is only the third power segment, with a total heating power of 4 units power. For the fifth energy level, its allocated heating power segment is the first power segment plus the third power segment, with a total heating power of 5 units power. For the sixth energy level, its allocated heating power segment is the second power segment plus the third power segment, with a total heating power of 6 units power. For the seventh energy level, its allocated heating power segment is the first power segment plus the second power segment plus the third power segment, with a total heating power of 7 units power.
[0148] In summary, this embodiment effectively solves the problems of uneven energy distribution and inaccurate heating during the printing process by allocating at least one heating energy segment to each pixel based on the heating energy level of the pixel. This makes the printing process more refined, not only improving heating efficiency and print quality, but also optimizing the temperature control process, avoiding equipment damage and extending the service life of the equipment.
[0149] In the S300, the printhead heats the paper at different intensities based on the heating level and heating energy range of each pixel, thereby achieving the best printing effect.
[0150] High-energy pixels are fully heated to ensure accurate display of details and colors; low-energy pixels are not overheated, avoiding problems such as image blurring or excessive blackening of background areas, and ensuring precise control of the heating process.
[0151] Specifically, in some embodiments, the specific implementation of step S300 can be referred to the following embodiments. This embodiment is a detailed description of step S300 in the printhead heating control method shown in the embodiment corresponding to FIG2. In the printhead heating control method, step S300 may include the following steps:
[0152] In response to the start of printing, the paper feed aligns the paper tip with the print line.
[0153] The number of paper feed lines is counted. When the count reaches the line with data, the pixels of that line are heated according to the corresponding heating energy segment.
[0154] In this embodiment, heating each row of pixels according to the heating energy range ensures that the heat distribution of each row meets the image requirements during printing. Different pixel areas may require different heating energies depending on the image content, avoiding overheating or underheating. By counting the number of paper rows and precisely controlling the heating area, it is ensured that the print head heats the paper at the appropriate time, without unnecessary energy waste. Simultaneously, synchronization between paper feeding and the printing process is ensured, improving printing efficiency. Precise heating control avoids color differences or loss of detail, guaranteeing the consistency and accuracy of the printed image with the original image. The on-demand heating method during the heating process avoids unnecessary heating, reduces energy waste, and extends the equipment's lifespan.
[0155] It should be noted that during the printing process, printing timing control also needs to be monitored. Printing timing control mainly includes controlling the SPI_CLK, SPI_MOSI, LATCH, and STB pins of the print head. Specifically, SPI_CLK is the SPI communication clock line for print data transmission; SPI_MOSI is the SPI communication data line for print data transmission; LATCH is the print data latch pin, latching data to the print head on the falling edge; and STB is the heating control pin, with heating initiated when the level is high.
[0156] The timing sequence for printing one line of data is shown in Figure 6. During the idle period, the data to be heated in stage I is sent to the print head first. Before the start of stage I, a LATCH signal is sent to latch the data to the print head. During stage I, the data to be heated in stage II is sent to the print head. Before the start of stage II, a LATCH signal is sent to latch the data to the print head. During stage II, the data to be heated in stage III is sent to the print head. After stage III completes the heating of the last stage of data, the cooling stage begins.
[0157] In some embodiments of this application, step S100 described above may specifically include:
[0158] Based on the image to be printed, heating energy levels are assigned to each pixel row by row to form pixel data corresponding to each heating energy level.
[0159] In this embodiment, the row-by-row, pixel-by-pixel heating energy level allocation method ensures that the printing needs of each pixel are precisely considered. This refined processing method can fully utilize the printer's heating capacity and improve print quality. Therefore, by allocating heating energy row by row, this embodiment can rationally allocate heating energy according to the specific content and characteristics of each row of images. This reduces ineffective heating and overheating while maintaining temperature control accuracy, ensuring a more uniform printing effect. Fine-grained heating energy level allocation for each row of pixels effectively improves the accuracy of energy distribution during the printing process, avoiding problems such as printing defects and uneven images that may occur in traditional methods due to neglecting the differences in the needs of local areas, thereby improving the overall printing effect. At the same time, fine-grained energy level allocation reduces unnecessary energy waste during the printing process. The heating needs of each pixel are accurately met, which helps improve heating efficiency and save energy and resources.
[0160] In some other embodiments corresponding to the above embodiments, step S200 may specifically include:
[0161] Based on the pixel data corresponding to each heating energy level, a heating energy segment is assigned to each pixel, forming pixel data corresponding to each heating energy segment.
[0162] In this embodiment, by further allocating the heating energy levels to different heating energy segments, the heating process can be controlled at a finer granularity. This helps achieve more precise heating control, avoiding print quality problems caused by excessively high or low heating energy (such as scorching due to overheating, or insufficient color depth due to underheating). By assigning one or more heating energy segments to each pixel, the heating process can be finely adjusted according to the specific characteristics of the image, ensuring that the heating of each pixel is more uniform and meets the requirements. This helps solve problems such as uneven heating and poor print quality that may occur in traditional methods. By precisely allocating heating energy segments, waste of resources and energy is avoided. Each pixel is allocated to an appropriate heating energy segment according to its printing needs, thereby improving the efficiency of energy use, reducing the pressure on printer hardware, and extending its service life. Through refined allocation of heating energy segments, printing tasks can be completed faster and more accurately, especially when processing complex images (such as images with rich details and diverse color levels), maintaining high printing accuracy and speed.
[0163] Specifically, as shown in Figure 7, for two rows of pixels, heating energy levels are assigned to each pixel row by row. The eight pixels in the first row are all assigned heating energy level 7, which can be converted into binary form. The printing data corresponding to the seventh energy level is represented as 11111111, where 1 indicates that the pixel is printed using the corresponding seventh energy level.
[0164] During printing, this translates to all pixels being heated using the first, second, and third heating energy segments. In binary form, the print data corresponding to the first heating energy segment is represented as 11111111, where 1 indicates that the pixel is printed using the first heating energy segment; the print data corresponding to the second heating energy segment is represented as 11111111, where 1 indicates that the pixel is printed using the second heating energy segment; and the print data corresponding to the third heating energy segment is represented as 11111111, where 1 indicates that the pixel is printed using the third heating energy segment.
[0165] The eight pixels in the second row are assigned heating energy levels one by one, namely the sixth energy level, the fifth energy level, the fourth energy level, the third energy level, the fourth energy level, the fifth energy level, and the sixth energy level.
[0166] This can be converted to binary form. The printing data corresponding to the sixth energy level is represented as 10000001, where 1 indicates that the pixel is printed using the corresponding sixth energy level; the printing data corresponding to the fifth energy level is represented as 01000010, where 1 indicates that the pixel is printed using the corresponding fifth energy level; the printing data corresponding to the fourth energy level is represented as 00100100, where 1 indicates that the pixel is printed using the corresponding fourth energy level; and the printing data corresponding to the third energy level is represented as 00011000, where 1 indicates that the pixel is printed using the corresponding third energy level.
[0167] During printing, the corresponding heating energy segments are as follows: the first and last pixels are not heated by the first heating energy segment; the second and second-to-last pixels are not heated by the second heating energy segment; the third and third-to-last pixels are heated by the third heating energy segment; and the two middle pixels are not heated by the third heating energy segment. Converting this to binary form, the print data corresponding to the first heating energy segment is represented as 01011010, where 1 indicates that the pixel uses the corresponding first heating energy segment for printing; the print data corresponding to the second heating energy segment is represented as 10011001, where 1 indicates that the pixel uses the corresponding second heating energy segment for printing; and the print data corresponding to the third heating energy segment is represented as 11100111, where 1 indicates that the pixel uses the corresponding third heating energy segment for printing.
[0168] Figure 8 shows a flowchart of another printhead heating control method provided in an embodiment of this application. As shown in Figure 8, the printhead heating control method may include at least:
[0169] S802. Based on the dot matrix data of the row to be printed and at least one target row, determine the heating energy level of each pixel in the row to be printed, wherein the target row is adjacent to the row to be printed and there are multiple heating energy levels.
[0170] Optionally, before performing thermal printing, the thermal printer needs to acquire the dot matrix data of the content to be printed. This dot matrix data is obtained by processing various data, including the content information, thermal paper size, and printhead configuration, and is used to indicate whether each pixel needs to be heated. During thermal printing, the printer heats each row of pixels on the thermal paper sequentially based on the dot matrix data of the content.
[0171] Specifically, the dot matrix data received by the thermal printer is binary data. Pixels that need to be heated are represented by a bit value of 1, and pixels that do not need to be heated are represented by a bit value of 0. Each row on the thermal paper is divided into multiple bytes, with 8 pixels as a unit. The thermal printer typically performs calculations on a byte-by-byte basis when printing each row. Please refer to Figure 9, which is an example diagram of the dot matrix data of a row to be printed and a target row provided in an embodiment of this application. As shown in Figure 9, taking 8 pixels in the row to be printed as an example, the dot matrix data of the 8 pixels in the row to be printed (i.e., the current row) is 11111110, which means that the first 7 pixels need to be heated, while the last pixel does not.
[0172] In one possible implementation, before determining the heating energy level of each pixel in the row to be printed based on the dot matrix data of the row to be printed and at least one target row, the thermal printer can receive dot matrix data of the content to be printed edited by the user. The content to be printed can be in various forms such as text or images. When acquiring dot matrix data, the thermal printer can either have the user-operated client generate the dot matrix data for the content to be printed and send it to the thermal printer, or the client can send the content to be printed to the thermal printer and then the thermal printer generates the dot matrix data. When generating dot matrix data, if the user has specific processing requirements for the content to be printed (such as color adjustment, brightness adjustment, font size adjustment, etc.), the content to be printed can be processed accordingly before generating the corresponding dot matrix data, ensuring that the printing effect is consistent with the user's expectations.
[0173] Optionally, during the printing process, after the print head heats the pixels, some residual heat remains on each pixel, which diffuses to its surroundings. When multiple pixels needing heating are located around a pixel requiring heating, that pixel is affected not only by the heat applied by the print head but also by the diffused heat from the surrounding pixels. This can cause heat overflow, potentially resulting in a heavier print than expected. Such pixels can lead to problems like dense lines, blurred barcodes, or even paper melting in the final print. Conversely, pixels without surrounding heat remain cool and may print with a lighter imprint, potentially resulting in a less clear final print.
[0174] Based on this, in this embodiment of the application, to achieve a more accurate printing effect, the overall thermal energy of the line to be printed and its surroundings can be analyzed by combining the heating status of the pixels in the line to be printed itself and the heating status of the pixels in the surrounding adjacent lines. The heating energy required for each pixel in the line is then determined, and heating control is performed according to the required heating energy for each pixel, thereby ensuring that the content to be printed is printed completely and clearly. In specific implementation, the dot matrix data of the line to be printed itself, as well as the dot matrix data of at least one target line adjacent to the line to be printed, can be determined, and the heating energy required for the pixels in the line to be printed can be analyzed based on the dot matrix data of multiple lines. This analysis not only considers the heating requirements of the pixels themselves, but also fully considers the thermal energy influence of the surrounding pixels, including the heating status and heat diffusion of adjacent pixels in neighboring rows.
[0175] In one possible implementation, at least one neighboring target row selected for the row to be printed can be the N rows preceding and the M rows following the row to be printed, where N and M are non-negative integers and not both 0. That is, selection starts from the row adjacent to the row to be printed, and at least one row is selected as the target row. Furthermore, considering that pixels are affected not only by heat directly above and below, but also by overflowing heat from the sides and above and below, the total heat received by a pixel can be affected. Therefore, the number of pixels in the target row can be greater than or equal to the number of pixels in the row to be printed in the dot matrix data. Please refer to Figure 3. Taking N=2 and M=1 as an example, the previous row, the two rows before the current row, and the future row are selected as the target row. In addition, one more pixel is selected on the left and right sides of the previous row. That is, when determining the heating energy level of 8 pixels in the current row, the 8 pixels of the current row (dot matrix 11111110), the 10 pixels of the previous row (dot matrix 0000111111), the 8 pixels of the two rows before the current row (dot matrix 00000010), and the 8 pixels of the future row (dot matrix 10000001) are selected to form the dot matrix data required for calculation.
[0176] It should be noted that the selection scheme for the target row and the number of pixels in the target row is not limited to the examples above, but can be selected according to actual needs, professional experience, etc., and this application embodiment does not limit it in this regard.
[0177] Furthermore, to more systematically control the heating energy received by each pixel, several heating energy levels can be defined based on the heating capacity of the print head, with each heating energy level corresponding to a different heating energy. That is, in this embodiment, based on the dot matrix data of the row to be printed and at least one target row, appropriate heating energy levels can be assigned to each pixel in the row to be printed, ensuring that each pixel receives adequate heating energy during printing. This avoids the problem of overheating or underheating of individual pixels, resulting in more accurate detail representation of the printed content.
[0178] S804. Determine the heating duration of each pixel based on the heating energy level of each pixel.
[0179] Optionally, considering that the heating time is directly related to the total amount of energy applied and is a key factor in controlling the accuracy of the printing effect, after determining the heating energy level of each pixel in the row to be printed, the heating time of each pixel is further determined based on the heating energy level, so that each pixel can obtain the heating energy corresponding to its own heating energy level through an appropriate heating time.
[0180] S806. Heat each pixel on the printing paper according to the heating time corresponding to each pixel.
[0181] Optionally, the thermal printer executes the heating operation strictly according to the heating duration calculated for each pixel. This is typically achieved through a series of heating elements (such as tiny heating points in the thermal printhead) that respond quickly and accurately to commands, heating the corresponding pixels on the paper. During this process, the synchronization and precision of each heating element are maintained to ensure uniformity and consistency across the entire printed surface. By combining multi-line dot matrix data from the current and adjacent lines to determine the heating energy level of each pixel in the row to be printed and precisely configuring the heating duration, fine-grained control of heating energy at the pixel level is achieved.
[0182] This application provides a printhead heating control method. Based on the dot matrix data of the row to be printed and at least one target row, the heating energy level of each pixel in the row to be printed is determined. The target row is adjacent to the row to be printed and has multiple heating energy levels. The heating duration of each pixel is determined based on its heating energy level. Each pixel on the printing paper is heated according to its corresponding heating duration. When heating pixels, this application combines the dot matrix data of the current row and adjacent rows to determine the heating energy level of each pixel in the row to be printed. Furthermore, the heating duration of each pixel is configured according to its required heating energy level, and each pixel is heated using an appropriate heating duration. This allows analysis of the thermal energy present in the surrounding environment of the row to be printed from the dot matrix data of adjacent rows. By comprehensively analyzing the thermal energy of the row to be printed and its surroundings, the required heating energy level of each pixel in the row to be printed can be more accurately determined, thereby more precisely controlling the heating duration of each pixel. This achieves fine control of heating energy at the pixel level, resulting in clearer printing effects for each pixel and improved overall printing quality.
[0183] To facilitate determining the heating duration of each pixel based on its heating energy level, the heating duration corresponding to each heating energy level needs to be preset. Therefore, in some embodiments of this application, the printhead heating control method may include at least:
[0184] The heating time is allocated to each heating level according to the preset method.
[0185] Optionally, for a heating time distribution scheme for several heating energy levels, in order to facilitate calculation and control, it is possible to set the heating time from the first energy level to the Xth energy level, where X is a positive integer greater than 1, that is, the heating time of the Xth energy level is the longest and the heating time of the first energy level is the shortest.
[0186] It should be noted that the specific values of the preset mode and heating time can be selected and allocated according to actual needs in practical applications. This application embodiment does not limit the preset mode, nor does it limit the specific heating time of each heating energy level.
[0187] Furthermore, based on the heating duration allocated to each heating energy level, step S206 in the printhead heating control method may further include the following steps:
[0188] Simultaneously, heating begins on each pixel, and the total heating time for each pixel is controlled according to the heating duration corresponding to each pixel.
[0189] Optionally, considering that heating time increases with increasing energy level, the heating time of higher energy levels necessarily includes the heating time of lower energy levels. Therefore, for heating efficiency, it is not necessary to heat each level sequentially. Instead, heating can begin simultaneously for each pixel, and the total heating time for each pixel can be controlled according to its corresponding heating duration. That is, for pixel A, which needs to be heated at the first energy level, and pixel B, which needs to be heated at the second energy level, heating begins simultaneously. After the heating time at the first energy level ends, pixel A stops heating, while pixel B continues heating until the heating time at the second energy level ends.
[0190] Specifically, let's take X=7 as an example. Please refer to Figure 10, which is an example diagram of the allocation of heating time for each heating energy level provided by an embodiment of this application. As shown in Figure 10, we can first assume that the longest heating time of a pixel is the heating time of the highest energy level, that is, the heating time of the seventh energy level is t. The total heating time is divided into 7 parts, and the heating time of each level is t / 7 more than the heating time of the previous level. By analogy, the heating times of each level of data are as follows: the heating time of the first energy level is t / 7*1, the heating time of the second energy level is t / 7*2, the heating time of the third energy level is t / 7*3, the heating time of the fourth energy level is t / 7*4, the heating time of the fifth energy level is t / 7*5, and the heating time of the sixth energy level is t / 7*6. After calculating the heating energy level of each pixel in the row to be printed, start heating each pixel simultaneously and stop heating the pixel after the heating time of the corresponding heating energy level is completed. In Figure 10, the blank squares in each heating time represent the heating time already completed, and the blue squares represent the heating time that needs to be extended compared to the lower energy level.
[0191] In this embodiment, by rationally allocating the heating duration of the heating energy level and simultaneously controlling the heating of each pixel, the total heating time required to print each line is at most only the heating duration of the highest heating energy level, thereby improving the heating control efficiency and printing efficiency during the printing process.
[0192] In some embodiments of this application, the specific implementation of step S802 can be found in the following embodiments. Figure 11 shows a flowchart of a printhead heating control method. This embodiment is a detailed description of step S802 in the printhead heating control method shown in the corresponding embodiment of Figure 8. In the printhead heating control method, step S802 may further include the following steps:
[0193] S1102. Based on the dot matrix data of the row to be printed and at least one target row, determine the thermal history data corresponding to each heating level. The thermal history data is used to characterize whether each pixel in the row to be printed needs to be heated under each heating level.
[0194] S1104. Determine the heating level of each pixel in the row to be printed based on the thermal history data corresponding to each heating level.
[0195] Optionally, when determining the heating energy level for each pixel in the row to be printed, the thermal history data corresponding to each heating energy level can be calculated first, that is, whether each pixel in the row to be printed needs to be heated under each heating energy level can be calculated, and then the corresponding heating energy level can be determined for each pixel according to the thermal history data corresponding to each heating energy level.
[0196] For example, if there are two heating levels, a first level and a second level, then each heating level corresponding to the row to be printed will have two sets of thermal history data. The thermal history data for the first level indicates which pixels in the row need heating from the first level and which do not. Similarly, the thermal history data for the second level indicates which pixels in the row need heating from the second level and which do not. Based on the thermal history data, it can be determined whether each pixel needs heating at each heating level, thus identifying the corresponding heating level for each pixel in the row to be printed.
[0197] Specifically, in this embodiment, a corresponding heating energy level is pre-constructed for each pixel to be heated based on the surrounding thermal energy information. Please refer to Figure 12, which is an example diagram of the setting of heating energy levels for each pixel provided in this embodiment. As shown in Figure 12, taking a total of 7 heating energy levels as an example, each heating energy level is sequentially represented as the first energy level, the second energy level, the third energy level, the fourth energy level, the fifth energy level, the sixth energy level, and the seventh energy level for description purposes.
[0198] Furthermore, according to the exemplary heating time setting method in the above embodiments, the heating time of the seventh energy level is the longest, and the heating time of the first energy level is the shortest. Referring to Figure 12, it can be seen that, considering the actual printing effect, the heating energy level should be adaptively set for pixels in different positions due to varying degrees of influence from surrounding heat energy. If a pixel is not heated by surrounding pixels (i.e., has no excess heat energy), then it should be set to a heating energy level with a longer heating time, such as the seventh energy level, so that the pixel itself has sufficient heat energy to achieve the desired printing effect. Similarly, for pixels surrounded by many heated pixels (i.e., with a lot of overflowing heat energy), a heating energy level with a shorter heating time should be set, such as the first energy level, so that the pixel will not be overheated and affect the printing effect.
[0199] It should be noted that the pixel configurations corresponding to each heating energy level in actual practice are not limited to those in the examples above. The above only lists one or two possibilities for each level, while in actual settings, each level may have multiple corresponding pixel configurations. In addition, the pixel configurations corresponding to each heating energy level can also be set according to business experience and actual needs, and are not limited to the examples given in the above embodiments. This application does not limit the setting method of heating energy levels.
[0200] Based on the pre-defined matching relationship between pixels and heating energy levels, in order to facilitate the calculation of thermal history data for each heating energy level during printing, a thermal history algorithm formula corresponding to each heating energy level can be calculated based on the pre-defined heating energy level. This allows for binary bit operations to be performed on the binary dot matrix data of the line to be printed and the target line during actual printing to obtain the thermal history data corresponding to each heating energy level, thereby obtaining information on whether each pixel needs to be heated in each heating energy level.
[0201] In this embodiment, the dot matrix data of the row to be printed (the current row) is represented as cur, the dot matrix data of the previous row is represented as pre1, the dot matrix data of the two rows before that is represented as pre2, and the dot matrix data of the future row is represented as fut. Furthermore, if the number of pixels in a target row is greater than that in the current row, the target row with more pixels needs to be further divided into multiple dot matrix data sets with the same number of pixels as the current row. For example, if the current row has 8 pixels, and the previous row has one more pixel on the left and one more pixel on the right than the current row (a total of 10 pixels), then the previous row needs to determine the dot matrix data for pixels 1-8 as pre1_left and the dot matrix data for pixels 3-10 as pre1_right, thereby enabling binary calculations between multiple dot matrix data sets of equal size.
[0202] Based on the above data, the thermal history algorithm formulas for heating energy levels 1 to 7 can be obtained according to the setting of the heating energy levels:
[0203] Formula for Level 7 Thermal History Algorithm:
[0204] his7=cur&(~pre1)&(~pre1_left)&(~pre1_righ)&(~pre2)&fut;
[0205] The formula for the 6-level heat history algorithm is: his6 = his7|
[0206] cur&(~pre1)&(~pre1_left)&(~pre1_righ)&(~pre2)&(~fut);
[0207] The formula for the 5-level heat history algorithm is: his5 = his6|
[0208] cur&(~pre1)&(~pre1_left)&(pre1_righ)&(~pre2)&(~fut);
[0209] The formula for the 4-level heat history algorithm is: his4 = his5|
[0210] cur&(pre1)&(~pre1_left)&(~pre1_righ)&(~pre2)&(~fut);
[0211] The formula for the Level 3 heat history algorithm is: his3 = his4|
[0212] cur&(pre1)&(pre1_left)&(~pre1_righ)&(~pre2)&(~fut)|
[0213] cur&(pre1)&(~pre1_left)&(pre1_righ)&(~pre2)&(~fut);
[0214] The formula for the Level 2 heat history algorithm is: his2 = his3|
[0215] cur&(pre1)&(pre1_left)&(pre1_righ)&(~pre2)&(~fut);
[0216] Level 1 heat history algorithm formula: his1 = his2|
[0217] cur&(pre1)&(pre1_left)&(pre1_righ)&(pre2)&(~fut);
[0218] Among them, for the operators in the formula, "&" represents bitwise AND operation, "|" represents bitwise OR operation, and "~" represents bitwise NOT operation.
[0219] Further, let's continue with the calculation example using the dot matrix data in Figure 9. From the dot matrix data table in Figure 9, we can see that the dot matrix data of the row to be printed (current row) is: cur = 11111110 = 0xFE; the dot matrix data of the previous row is: pre1 = 00011111 = 0x1F; the dot matrix data to the left of the previous row is: pre1_lef t = 00001111 = 0x0F; the dot matrix data to the right of the previous row is: pre1_right = 00111111 = 0x3F; the dot matrix data of the two rows before is: pre2 = 00000010 = 0x02; and the dot matrix data of the future row is: fut = 10000001 = 0x81. The thermal history data for each heating level is calculated using the corresponding thermal history algorithm formula. The thermal history data for each heating level of the row to be printed can be calculated as follows: Grade 7 thermal history data: Grade7 = 10000000 = 0x80; Grade 6 thermal history data: Grade6 = 11000000 = 0xC0; Grade 5 thermal history data: Grade5 = 11100000 = 0xE0; Grade 4 thermal history data: Grade4 = 11100000 = 0xE0; Grade 3 thermal history data: Grade3 = 11110000 = 0xF0; Grade 2 thermal history data: Grade2 = 11111100 = 0xFC; Grade 1 thermal history data: Grade1 = 11111110 = 0xFE.
[0220] As can be seen, in each level of thermal history data, a 1 indicates that the pixel in the row to be printed needs heating, and a 0 indicates that the pixel in the row to be printed does not need heating. In the example of 8 pixels, the first pixel is 1 in thermal history data levels 1 to 7, which means that the first pixel needs heating levels 1 to 7; the second pixel is 1 in thermal history data levels 1 to 6, and 0 in thermal history data level 7, which means that the second pixel needs heating levels 1 to 6, but does not need heating at level 7; the third pixel is 1 in thermal history data levels 1 to 5, and 0 in thermal history data levels 6 and 7, which means that the third pixel needs heating levels 1 to 5, but does not need heating at levels 6 and 7.
[0221] Based on this, when determining the heating energy level corresponding to each pixel, first, according to the thermal history data corresponding to each heating energy level, determine the target heating energy level that needs to be heated for each pixel in the row to be printed. For example, in the above example, the target heating energy levels that need to be heated for the first pixel are all energy levels from the first to the seventh, and the target heating energy levels that need to be heated for the second pixel are all energy levels from the first to the sixth. Since the heating time increases with the increase of the energy level, the heating time of a higher energy level must have passed through the heating time of a lower energy level. Therefore, the target heating energy level with the longest heating duration corresponding to each pixel can be directly determined as the heating energy level of each pixel, and then the heating time of each pixel is determined according to the heating energy level corresponding to each pixel.
[0222] Taking the example, the target heating energy level with the longest heating time for the first pixel is the seventh energy level, so the heating energy level of the first pixel is the seventh energy level; the target heating energy level with the longest heating time for the second pixel is the sixth energy level, so the heating energy level of the second pixel is the sixth energy level; correspondingly, the energy level of the third pixel is the fifth energy level; the energy level of the fourth pixel is the third energy level; the energy levels of the fifth and sixth pixels are both the second energy level; the energy level of the seventh pixel is the first energy level; the eighth pixel has no heating energy level that needs to be heated, that is, no heating is required.
[0223] In a possible embodiment, please refer to FIG. 13. FIG. 13 is an example diagram of the calculation result of the heating energy level of a thermal pixel provided by an embodiment of the present application. Taking the character "中" as an example, the heating energy levels corresponding to each pixel as shown in FIG. 13 can be calculated.
[0224] In an embodiment of the present application, a method for controlling the heating of a print head is provided. According to the heating information of the pixel itself and the thermal energy information existing around it, multiple heating energy levels with different heating times are set, as well as the thermal history algorithm formula corresponding to each heating energy level. Thus, in the actual printing process, the printing system of the thermal printer can perform binary bit operations on the binary dot matrix data of the row to be printed and the target row, obtain the thermal history data corresponding to each heating energy level, and then obtain the heating energy level corresponding to each pixel according to the thermal history data at each level. Since the calculation process not only takes into account the thermal energy requirements of the pixel itself but also fully considers the possible influence of the thermal energy of other pixels in the surrounding environment on its heating effect. Therefore, the determined heating energy level is more in line with the actual printing requirements and can ensure the clarity and accuracy of the printing effect.
[0225] To achieve more precise printing results, the heating time of each pixel can be fine-tuned based on its position within the content to be printed, in addition to the heating time allocated to each pixel according to the heating energy level. For example, pixels at the edge, where there is no heat energy nearby, can compensate with a small amount of heating time to ensure they receive sufficient heat, thus preventing blurry printing. For pixels in the last row, whose future rows do not require heating, their heating time needs to be appropriately reduced to avoid trailing effects.
[0226] Therefore, in some embodiments of this application, when performing the step of allocating heating time to each heating level according to a preset method, a flowchart of a printhead heating control method as shown in FIG14 can also be specifically executed. In the printhead heating control method, the step of allocating heating time to each heating level according to a preset method can further include the following steps:
[0227] S1402. Based on the positional pattern of the pixels corresponding to each heating energy level in the content to be printed, determine at least one target heating energy level that needs to be adjusted for heating duration and the adjustment method for each target heating energy level.
[0228] S1404. Adjust the heating time of each target heating level according to the adjustment method of each target heating level.
[0229] In this embodiment, by setting each heating energy level, it can be determined that the pixels of each heating energy level have a certain positional pattern in the content to be printed. Then, based on the positional pattern of the pixels corresponding to each heating energy level in the content to be printed—for example, whether they are in a position with little or no excess heat or a position with a lot of overflowing heat—at least one target heating energy level requiring heating time adjustment, as well as the adjustment method for each target heating energy level, can be determined. This allows for more precise adjustment of the heating time of each heating energy level to achieve accurate heating control of each pixel.
[0230] Specifically, for the position of each pixel in each heating energy level, it can be determined whether the pixel corresponding to each heating energy level needs to reduce the heating energy. If so, the heating energy level is determined as the first target heating energy level that needs to reduce the heating time. It can also be determined whether the pixel corresponding to each heating energy level needs to increase the heating energy. If so, the heating energy level is determined as the second target heating energy level that needs to increase the heating time.
[0231] For example, as can be seen from the heating levels of each pixel in the Chinese character "中" in Figure 13, the second and third levels have a greater impact on the vertical lines of the character "中". The second and third levels can be determined as the second target heating levels, and the heating time of the second and third levels can be appropriately increased. In this way, the content of the vertical lines can be printed more clearly, but it should not be too large to prevent obvious trailing due to heat overflow. The seventh and first levels have a greater impact on the horizontal lines. The seventh level generally appears at the beginning of heating and requires a relatively large heating energy. Therefore, the seventh level can also be determined as the second target heating level, and the heating time of the seventh level can be appropriately increased. The first level generally appears at the end of printing and does not require too much heating energy. Therefore, the first level can be determined as the first target heating level, and the heating time of the first level can be appropriately reduced to avoid trailing.
[0232] In a preferred embodiment, when fine-tuning the duration of the first target heating level and the second target heating level, the increase and decrease amplitudes of the duration do not exceed a preset ratio of the original heating duration. That is, the adjusted duration is generally selected within the range of 0 to the original heating duration, to avoid destroying the duration control balance between the heating levels due to an overly large adjusted duration.
[0233] In some embodiments of the present application, a feasible duration adjustment scheme is provided. When there are both a first target heating level and a second target heating level, the heating duration of the first target heating level can be first reduced to determine the total reduced heating duration td, and td can be allocated to each second target heating level that needs to extend the heating duration. It is also possible to first determine the highest level among the second target heating levels, increase its heating duration ti, and then allocate ti to other lower second target heating levels. In this way, fine-tuning the duration of each heating level based on the total extended and reduced duration can control the overall heating duration within a suitable range.
[0234] For example, please refer to Figure 15, which is an example diagram of fine-tuning the heating time of each heating level according to an embodiment of this application. The first level is the first target heating level, and the second, third, and seventh levels are the second target heating levels. As shown in Figure 15(A), one adjustment method is to compensate the reduced heating time td of the first level to the second and third levels, and the seventh level directly obtains its heating time ti based on the total time, resulting in the following heating times for levels 1 to 7: T1 = t / 7 * 1 - td; T2 = t / 7 * 2 + a * td; T3 = t / 7 * 3 + b * td; T4 = t / 7 * 4; T5 = t / 7 * 5; T6 = t / 7 * 6; T7 = t / 7 * 7 + ti, where a and b are coefficients for allocating td to the third and second levels, i.e., a + b = 1. As shown in Figure 9(B), if the reduced heating time of the first energy level is insufficient to compensate for the second and third energy levels, the extended time ti of the seventh energy level can also be used to compensate for part of the second and third energy levels. Thus, the heating times of levels 1 to 7 are as follows: T1 = t / 7*1 - td; T2 = t / 7*2 + a*td + c*ti; T3 = t / 7*3 + b*td + d*ti; T4 = t / 7*4; T5 = t / 7*5; T6 = t / 7*6; T7 = t / 7*7 + ti, where a + b = 1; c + d ≤ 1.
[0235] This application provides a printhead heating control method. Based on the allocation of heating time for pixels according to heating energy levels, the heating time of each pixel is finely adjusted according to its positional characteristics within the content to be printed. Each pixel, based on its specific positional attributes, receives a heating time slightly longer or shorter than the standard heating time set based on the heating energy level. Through this method, this application not only enables more flexible and precise adjustment of the heating time for each heating energy level but also achieves more accurate heating control for each pixel. This refined heating fine-tuning strategy improves the quality of the printed output.
[0236] Figure 16 shows a flowchart of another printhead heating control method provided in an embodiment of this application. As shown in Figure 16, the printhead heating control method may include at least:
[0237] S1601: Obtain multiple target heating points that the printhead needs to enable when printing the current line.
[0238] The current line is the row that the printing device controller is currently processing and is about to print.
[0239] Optionally, the printing device controller retrieves the print data of the current line from memory, parses the print data of the current line to obtain multiple pixels contained in the print data of the current line, and determines multiple target heating points that need to be activated during the printing of the current line by the print head based on the multiple pixels. It is understood that the print data of the current line may be, but is not limited to, text, images, or a combination of text and images. The print data of the current line may be grayscale data or color data, and the specific form is not limited in the embodiments of this application.
[0240] In this embodiment, the printing device controller obtains multiple target heating points that the print head needs to activate when printing the current line, so that subsequent calculations can be performed only on the multiple target heating points to be activated. This not only effectively ensures the quality of thermal printing, but also saves the computing resources of the printing device and speeds up the printing process.
[0241] S1602: Determine the heating level corresponding to each of the multiple target heating points; different heating levels correspond to different heating times, and each heating corresponds to a preset initial heating duration.
[0242] Understandably, not all target heating points require the same energy input. If the pixels around the current row position corresponding to a target heating point are relatively dense, the target heating point may have residual heat due to previous heating operations. In this case, the target heating point requires less energy input to avoid overheating and resulting in excessive print density. If the pixels around the current row position corresponding to a target heating point are relatively scattered, the target heating point may not have accumulated enough heat. In this case, the target heating point requires more energy input to avoid insufficient heating and resulting in excessively low print density.
[0243] Optionally, the printing device controller determines the pixel distribution around the current row position corresponding to each target heating point based on the printing data of the current row and its neighboring rows. Then, based on the pixel distribution around the current row position corresponding to each target heating point, it determines the heating level corresponding to each target heating point. The neighboring rows may include, but are not limited to, the N rows preceding the current row and the M rows following the current row (N and M are both positive integers, and N and M may be equal or unequal).
[0244] Specifically, the printing device controller can use a thermal history algorithm to divide multiple target heating points in the current row into Q different heating levels (Q is a positive integer) based on the printing data of the current row and its neighboring rows. The target heating points under each heating level can be regarded as a group of target heating points, and Q heating cycles can be used to gradually heat each group of target heating points.
[0245] For example, the printing device controller uses a thermal history algorithm to divide multiple target heating points in the current row into six different heating levels, L1 to L6, based on the printing data of the current row and its three adjacent rows before and one adjacent row. The number of heating times corresponding to the six heating levels, L1 to L6, decreases sequentially, and each heating time corresponds to a preset initial heating duration.
[0246] For example, the initial heating time t1 corresponding to the first heating can be set to 60us, heating the target heating point with heating level L1; the initial heating time t2 corresponding to the second heating can be set to 60us, heating the target heating points with heating levels L1 and L2; the initial heating time t3 corresponding to the third heating can be set to 30us, heating the target heating points with heating levels L1 to L3; the initial heating time t4 corresponding to the fourth heating is 30us, heating the target heating points with heating levels L1 to L4; the initial heating time t5 corresponding to the fifth heating is 30us, heating the target heating points with heating levels L1 to L5; and the initial heating time t6 corresponding to the sixth heating is 60us, heating the target heating points with heating levels L1 to L6.
[0247] In this embodiment, the printing device controller determines the heating level corresponding to each of the multiple target heating points. Each heating level corresponds to a different number of heating cycles, and each heating cycle corresponds to a preset initial heating duration. This facilitates the subsequent reasonable control of the energy input of each target heating point based on the target heating level, thereby achieving on-demand heating of each target heating point and effectively ensuring the quality of thermal printing.
[0248] S1603: Based on the current working status parameters of the printhead, adjust the initial heating time corresponding to each heating cycle to obtain the target heating time corresponding to each heating cycle.
[0249] The current working status parameters of the print head are the working status parameters when the print head is about to print the current line. The current working status parameters may be, but are not limited to, at least one of the following: current temperature value, current driving voltage value, and the number of target heating points corresponding to each heating level.
[0250] Optionally, the printing device controller adjusts the initial heating duration for each heating cycle based on the current temperature value of the printhead, and / or the current driving voltage value of the printhead, and / or the number of target heating points corresponding to each heating level, to obtain the target heating duration for each heating cycle.
[0251] For example, after printing the previous line of the current line and before printing the current line, the printing device controller obtains the temperature value of the middle part of the print head as the current temperature value, obtains the drive voltage value of the print head as the current drive voltage value, and determines the number of target heating points corresponding to each heating level. Then, based on the current temperature value of the print head, the current drive voltage value of the print head, and the number of target heating points corresponding to each heating level, the initial heating durations t1 to t6 are adjusted to obtain the target heating durations t1′ to t6′ corresponding to each heating.
[0252] It is worth noting that this embodiment only describes a preferred implementation of the present application. After printing the previous line of the current line and before starting to print the current line, the printing device controller may also selectively obtain one or two of the following: the current temperature value of the print head, the current driving voltage value of the print head, and the number of target heating points corresponding to each heating level, in order to adjust the initial heating time. This embodiment of the present application does not limit this.
[0253] In this embodiment, the printing device controller adjusts the initial heating time corresponding to each heating cycle based on the current working status parameters of the print head, thereby obtaining the target heating time corresponding to each heating cycle. It can adaptively adjust the heating parameters of the print head according to the actual situation, ensuring that the print head reasonably heats each target heating point during the printing of the current line, effectively guaranteeing the quality of thermal printing.
[0254] S1604: Based on the target heating duration corresponding to each heating cycle and the heating level corresponding to each target heating point, control the print head to complete the thermal printing of the current line.
[0255] Optionally, the printing device controller controls the print head to activate multiple heating cycles based on the target heating duration for each heating cycle and the heating level for each target heating point, thereby gradually completing the thermal printing of the current line.
[0256] For example, during the printing of the current line, the printing device controller can control the print head to activate heating six times. During each heating process, the printing device controller controls the pins of the target heating points under each heating level to heat the corresponding target heating points. After each heated target heating point comes into contact with the printing medium, the corresponding printed content of the current line can be generated on the printing medium.
[0257] For example, the printer controller can first set a corresponding power-on duration t1′ for all target heating points with heating level L1, and control all target heating points with heating level L1 to perform heating; then set a corresponding power-on duration t2′ for all target heating points with heating levels L1 and L2, and control the target heating points with heating levels L1 and L2 to perform heating; next, set a corresponding power-on duration t3′ for all target heating points with heating levels L1 to L3, and control the target heating points with heating levels L1 to L3 to perform heating; next, set a corresponding power-on duration t4′ for all target heating points with heating levels L1 to L4, and control the target heating points with heating levels L1 to L4 to perform heating; next, set a corresponding power-on duration t5′ for all target heating points with heating levels L1 to L5, and control the target heating points with heating levels L1 to L5 to perform heating; finally, set a corresponding power-on duration t6′ for all target heating points with heating levels L1 to L6, and control the target heating points with heating levels L1 to L6 to perform heating.
[0258] In this embodiment, the printing device controller controls the print head to gradually complete the thermal printing of the current row according to the target heating time corresponding to each heating and the heating level corresponding to each target heating point. This can avoid problems such as uneven printing density and ribbon breakage, and effectively ensure the quality of thermal printing.
[0259] In the aforementioned printhead heating control method, the printing device controller acquires multiple target heating points that the printhead needs to activate when printing the current line. These target heating points are then divided into multiple different heating levels, each corresponding to a different number of heating cycles. Each heating cycle corresponds to a preset initial heating duration, enabling hierarchical management of the target heating points on the printhead. This facilitates on-demand heating of each target heating point during the printing of the current line. By adjusting the initial heating duration corresponding to each heating cycle based on the printhead's current operating status parameters, the target heating duration for each heating cycle is obtained. This allows for adaptive adjustment of the printhead's heating parameters according to actual working conditions, ensuring that the printhead provides appropriate heating to each target heating point during the printing of the current line. By controlling the printhead to complete the thermal printing of the current line based on the target heating duration and the heating level corresponding to each target heating point, the system combines the hierarchical target heating points and the adjusted target heating duration to control the printhead to complete thermal printing, avoiding problems such as uneven print density and ribbon breakage. This method effectively guarantees the quality of thermal printing.
[0260] In some embodiments of this application, as shown in FIG17, another printhead heating control method is provided, including the following steps:
[0261] S1701: Obtain multiple target heating points that the printhead needs to enable when printing the current line.
[0262] Specifically, S1701 is the same as S1601, and will not be repeated here.
[0263] S1702: Determine the heating level corresponding to each of the multiple target heating points based on the print data of the current line and its adjacent lines.
[0264] The adjacent rows can include, but are not limited to, the n rows preceding the current row and the m rows following it (n and m are both positive integers, and n and m can be equal or unequal). Different heating levels correspond to different heating times, and each heating corresponds to a preset initial heating duration.
[0265] Optionally, the printing device controller uses thermal history calculation to obtain the pixel distribution around the current row position corresponding to each target heating point based on the printing data of the current row and its neighboring rows, thereby dividing multiple target heating points into multiple different heating levels to reasonably control the energy input of each target heating point.
[0266] For example, the printing device controller can divide multiple target heating points into Q different heating levels (Q is a positive integer) based on the printing data of the current line and its three adjacent lines before and one adjacent line after, using a thermal history algorithm, and then perform Q heating cycles to gradually heat the target heating points of each level. The number of heating cycles corresponding to the Q heating levels is different, and each of the Q heating cycles corresponds to a preset initial heating duration.
[0267] Taking the example of a printer controller dividing multiple target heating points into six different heating levels, L1 to L6, the number of heating cycles corresponding to these six heating levels can decrease sequentially. For example, the initial heating time t1 for the first heating cycle can be set to 60us, heating the target heating point at heating level L1; the initial heating time t2 for the second heating cycle can be set to 60us, heating the target heating points at heating levels L1 to L2; the initial heating time t3 for the third heating cycle can be set to 30us, heating the target heating points at heating levels L1 to L3; the initial heating time t4 for the fourth heating cycle is 30us, heating the target heating points at heating levels L1 to L4; the initial heating time t5 for the fifth heating cycle is 30us, heating the target heating points at heating levels L1 to L5; and the initial heating time t6 for the sixth heating cycle is 60us, heating the target heating points at heating levels L1 to L6.
[0268] In this embodiment, the printing device controller determines the heating level corresponding to each of the multiple target heating points based on the printing data of the current row and its adjacent rows. It can reasonably control the energy input of each target heating point in combination with the actual printing content, so as to heat each target heating point on demand and effectively ensure the quality of thermal printing.
[0269] S1703: Based on the current temperature value of the printhead, and / or the current driving voltage value of the printhead, and / or the number of target heating points corresponding to each heating level, adjust the initial heating time corresponding to each heating to obtain the target heating time corresponding to each heating.
[0270] The current temperature value of the printhead is the temperature value of the middle part of the printhead after the printhead has finished printing the previous line and before it starts printing the current line; the current drive voltage value of the printhead is the drive voltage value after the printhead has finished printing the previous line and before it starts printing the current line.
[0271] Understandably, after the printhead finishes printing the line preceding the current line and before starting to print the current line, the target heating points on it may retain residual heat from previous heating operations. Therefore, the heating duration of each heating cycle can be adjusted based on the printhead's current temperature to ensure high-quality printing of the current line under the current temperature conditions. Furthermore, the drive voltage of the printhead may be insufficient after printing the line preceding the current line and before starting to print the current line. Therefore, the heating duration of each heating cycle can be adjusted based on the printhead's current drive voltage to ensure high-quality printing of the current line under the current voltage conditions. On the other hand, the number of target heating points corresponding to each heating level may affect the total energy demand during each heating cycle when printing the current line. To ensure that the energy provided by the printhead within a preset time period does not exceed the maximum energy limit that can be provided within that time period, the heating duration of each heating cycle can be adjusted based on the number of target heating points corresponding to each heating level to ensure high-quality printing of the current line under the current printing content conditions.
[0272] For example, the printing device controller adjusts the initial heating duration t1 to t6 for each heating cycle based on the current temperature value of the printhead, the reference temperature value of the printhead, and the temperature compensation coefficient corresponding to the reference temperature value, to obtain the first adjusted heating duration t11 to t61 for each heating cycle; it adjusts the first adjusted heating duration t11 to t61 for each heating cycle based on the current driving voltage value of the printhead and the driving voltage threshold value of the printhead, to obtain the second adjusted heating duration t12 to t62 for each heating cycle; and it adjusts the second adjusted heating duration for each heating cycle based on the number of target heating points corresponding to each heating level, to obtain the target heating duration t1′ to t6′ for each heating cycle.
[0273] It is worth noting that this embodiment only describes a preferred implementation of the present application. After printing the previous line of the current line and before printing the current line, the printing device controller may also adjust the initial heating time corresponding to each heating based solely on the current temperature value of the print head, for example, using t11 to t61 as the target heating time corresponding to each heating. Alternatively, it may adjust the initial heating time corresponding to each heating based on the current temperature value of the print head and the current driving voltage value, for example, using t12 to t62 as the target heating time corresponding to each heating. The present application embodiment does not limit this.
[0274] In this embodiment, after obtaining the initial heating duration corresponding to each heating cycle, the printing device controller adjusts the initial heating duration corresponding to each heating cycle according to the current temperature conditions of the print head, and / or the current voltage conditions, and / or the current printing content conditions. This allows the final target heating duration to adapt to the current working state of the print head, thereby effectively ensuring the quality of thermal printing.
[0275] S1704: Based on the target heating duration corresponding to each heating cycle and the heating level corresponding to each target heating point, control the print head to complete the thermal printing of the current line.
[0276] Specifically, S1704 is the same as S1604, and will not be repeated here.
[0277] S1705: Cool the printhead and determine the printhead heating parameters when printing the next line of the current line during the cooling process.
[0278] Optionally, after controlling the print head to complete the thermal printing of the current line, the print device controller does not immediately start thermal printing the next line. Instead, it cools the print head and determines the heating parameters of the print head for printing the next line during the cooling process. This allows the controller to directly control the print head to complete the thermal printing of the next line after the cooling phase is complete. Specifically, the print device controller can cool the print head by controlling the built-in cooling fan or other heat dissipation devices, or it can directly control the print head to stop heating for natural cooling. This embodiment does not limit the specific method used.
[0279] Understandably, if the current line is not the first line printed after the printing device starts the printing task, the printing device controller controls the print head to cool down after the previous line is printed. During the print head cooling phase, the printing device controller executes steps S1701 to S1703 of this embodiment to determine the heating parameters of the print head (i.e., the target heating duration mentioned above) when printing the current line. After the cooling phase ends, the printing device controller executes steps S1704 of this embodiment to complete the thermal printing of the current line. After the current line is printed, the printing device controller controls the print head to cool down again, and determines the heating parameters of the print head when printing the next line during the cooling process, so that after this cooling phase ends, the printer head can be controlled to complete the thermal printing of the next line.
[0280] In this embodiment, the printing device controller controls the print head to cool down and determines the heating parameters for printing the next line while the print head is cooling down. On the one hand, this effectively prevents the print head from overheating due to continuous operation and damaging the thermal element, thus maintaining a stable printing effect. On the other hand, it can make reasonable use of the cooling time to calculate the heating parameters for printing the next line, thereby improving printing efficiency. The above method can effectively ensure the quality of thermal printing.
[0281] In the above-described printhead heating control method, the printing device controller determines the heating level corresponding to each of the multiple target heating points based on the printing data of the current line and its adjacent lines. This facilitates the rational control of the energy input of each target heating point according to the preset number of heating cycles and heating duration during the printing of the current line, allowing for on-demand heating of each target heating point. After obtaining the initial heating duration for each heating cycle, the controller adjusts the initial heating duration based on the current temperature conditions, and / or current voltage conditions, and / or current printing content conditions of the printhead, ensuring that the final target heating duration effectively adapts to the current working state of the printhead. By controlling the printhead to cool down and determining the heating parameters for printing the next line during the cooling process, the controller not only effectively prevents damage to the thermal elements caused by continuous overheating of the printhead, maintaining stable printing results, but also rationally utilizes the cooling time to calculate the heating parameters for printing the next line, improving printing efficiency. The above method effectively guarantees the quality of thermal printing.
[0282] In some embodiments of this application, as shown in FIG18, another printhead heating control method is provided, including the following steps:
[0283] S1801: Obtain multiple target heating points that the printhead needs to enable when printing the current line.
[0284] Specifically, S1801 is the same as S1601, and will not be repeated here.
[0285] S1802: Divide the current line into at least one print segment based on the number of target heating points.
[0286] Understandably, the printhead can be, but is not limited to, a dot-matrix thermal printhead, and the multiple heating points on the printhead can be, but are not limited to, arranged in a row, with each heating point having a corresponding heating switch pin. During printing, the print equipment controller can control the heating of each target heating point by controlling the energization of its pins. To control the total operating current of the printhead and extend its lifespan, the print equipment controller can divide the current line into at least one printing segment based on the number of target heating points corresponding to that line, allowing for segmented printing of the current line when there are a large number of target heating points.
[0287] Optionally, the printing device controller employs a three-segmentation algorithm, combining the number of target heating points corresponding to the current line and the total number of heating points on the print head to divide the current line into at least one printing segment. Specifically, if the number of target heating points is less than or equal to one-third of the total number of heating points, the printing device controller divides the current line into one printing segment, meaning that subsequent printing of the current line does not require segmentation; if the number of target heating points is greater than one-third but less than two-thirds of the total number of heating points on the print head, the printing device controller divides the current line into two printing segments of equal length and non-overlapping, so that the current line can be printed in two segments subsequently; if the number of target heating points is greater than or equal to two-thirds of the total number of heating points, the printing device controller divides the current line into three printing segments of equal length and non-overlapping, so that the current line can be printed in three segments subsequently.
[0288] For example, assuming the total number of heating points on the print head is 864, if the number of target heating points corresponding to the current line is less than or equal to 864 / 3, the print device controller treats the current line as a single print segment; if the number of target heating points is greater than 864 / 3 and less than 864 / 2, the print device controller divides the current line into two print segments of equal length and non-overlapping; if the number of target heating points is greater than or equal to 864 / 2, the print device controller divides the current line into three print segments of equal length and non-overlapping.
[0289] In this embodiment, the printing device controller divides the current row into at least one printing segment according to the number of target heating points, which can effectively avoid excessive total operating current of the print head and affect the service life of the print head, thus improving the safety and reliability of thermal printing.
[0290] S1803: Determine the heating level corresponding to each of the multiple target heating points; different heating levels correspond to different heating times, and each heating corresponds to a preset initial heating duration.
[0291] Optionally, the printing device controller uses a thermal history algorithm to divide the target heating points in each printing segment into Q different heating levels (Q is a positive integer) based on the printing data of the current line and its adjacent lines. The target heating points under each heating level can be regarded as a group of target heating points, and Q heating cycles can be used to gradually heat each group of target heating points for each printing segment.
[0292] The following example illustrates how the printer controller divides the current line into three printing segments and assigns six different heating levels (L1 to L6) to the target heating points within each segment. Each of the three printing segments has target heating points with heating levels L1 to L6. The number of heating cycles for each of the six heating levels (L1 to L6) decreases sequentially, and each heating cycle corresponds to a preset initial heating duration (t1 to t6). For example, the initial heating time t1 corresponding to the first heating can be set to 60us, heating the target heating point with heating level L1 in a certain printing segment; the initial heating time t2 corresponding to the second heating can be set to 60us, heating the target heating point with heating level L1 to L2 in the same printing segment; the initial heating time t3 corresponding to the third heating can be set to 30us, heating the target heating point with heating level L1 to L3 in the same printing segment; the initial heating time t4 corresponding to the fourth heating is 30us, heating the target heating point with heating level L1 to L4 in the same printing segment; the initial heating time t5 corresponding to the fifth heating is 30us, heating the target heating point with heating level L1 to L5 in the same printing segment; and the initial heating time t6 corresponding to the sixth heating is 60us, heating the target heating point with heating level L1 to L6 in the same printing segment.
[0293] In this embodiment, for at least one pre-defined printing segment, the printing device controller divides the target heating points in each printing segment into multiple different heating levels, thereby determining the heating level corresponding to each of the multiple target heating points in the current row. This allows for reasonable control of the energy input of each target heating point in conjunction with the actual printing content, ensuring that the target heating points in each printing segment are heated as needed. This helps to improve the quality of thermal printing through segmented printing and hierarchical management.
[0294] S1804: Based on the current temperature value of the printhead and the reference temperature value of the printhead, adjust the initial heating time corresponding to each heating cycle to obtain the first adjusted heating time corresponding to each heating cycle.
[0295] Understandably, after printing the previous line and before printing the current line, the target heating points on the print head may have residual heat due to the previous heating operation. Therefore, the initial heating time for each heating operation can be adjusted by combining the current temperature value of the print head and the reference temperature value of the print head, thus obtaining the first adjusted heating time for each heating operation.
[0296] Optionally, the printing device controller determines a temperature compensation coefficient based on the current temperature of the print head. Then, based on the temperature compensation coefficient, the current temperature, and the reference temperature, it adjusts the initial heating time for each heating cycle to obtain the first adjusted heating time for each cycle. The specific calculation formula is as follows: t q1 =t q -(T-T0)*B (1)
[0297] Where tq is the initial heating time corresponding to the qth heating (q is a positive integer); tq1 is the first adjusted heating time corresponding to the qth heating; T is the current temperature value of the printhead; T0 is the reference temperature value of the printhead, which can be set to the temperature value of the printhead at room temperature, 25℃; B is the temperature compensation coefficient corresponding to the current temperature value, which can be set to 0.025.
[0298] S1805: Based on the current drive voltage value of the printhead and the drive voltage threshold of the printhead, adjust the first adjustment heating time corresponding to each heating cycle to obtain the second adjustment heating time corresponding to each heating cycle.
[0299] Understandably, after printing the previous line and before starting to print the current line, the print head's drive voltage may not be high enough. Therefore, by combining the print head's current drive voltage and drive voltage threshold, the first adjustment heating time corresponding to each heating cycle can be further adjusted to obtain the second adjustment heating time corresponding to each heating cycle, so as to ensure that the print head can complete the printing task of the current line with high quality under the current voltage conditions.
[0300] Optionally, the printing device controller determines a voltage compensation coefficient based on the current drive voltage value of the print head. Then, based on the voltage compensation coefficient, the current drive voltage value, and the drive voltage threshold, it adjusts the first adjusted heating time for each heating cycle to obtain the second adjusted heating time for each heating cycle. The specific calculation formula is as follows:
[0301] Wherein, tq1 is the first adjusted heating duration corresponding to the qth heating (q is a positive integer); tq2 is the second adjusted heating duration corresponding to the qth heating; V is the current driving voltage value of the printhead; V0 is the driving voltage threshold of the printhead, which can be set to 12.2V, but is not limited to; a is the voltage compensation coefficient when the current driving voltage value of the printhead is less than 11.6V, which can be set to 0.09, but is not limited to; b is the voltage compensation coefficient when the current driving voltage value of the printhead is not less than 11.6V and less than 12V, which can be set to 0.10, but is not limited to; c is the voltage compensation coefficient when the current driving voltage value of the printhead is not less than 12V and less than 12.2V, which can be set to 0, but is not limited to; d is the voltage compensation coefficient when the current driving voltage value of the printhead is not less than 12.2V, which can be set to 0, but is not limited to.
[0302] S1806: Based on the number of target heating points corresponding to each heating level, adjust the second adjustment heating time corresponding to each heating to obtain the target heating time corresponding to each heating.
[0303] Understandably, when the print head is printing the current line, the number of target heating points corresponding to each heating level may affect the total energy demand in each heating process. If the number of target heating points for a certain energy level is large, it means that more energy needs to be provided within a preset time period when heating the target heating points of that energy level. In order to ensure that the energy provided by the print head within the preset time period does not exceed the maximum energy limit that can be provided within that time period, the second adjustment heating time corresponding to each heating can be further extended according to the number of target heating points corresponding to each heating level, so as to obtain the target heating time corresponding to each heating, and ensure that the print head can complete the printing task of the current line with high quality under the current printing content conditions.
[0304] Optionally, the printing equipment controller determines a heating point compensation coefficient based on the target number of heating points corresponding to each heating level. Then, based on the heating point compensation coefficient and the target number of heating points corresponding to each heating level, it adjusts the second adjusted heating time for each heating cycle to obtain the target heating time for each heating cycle. The specific calculation formula is as follows:
[0305] Wherein, tq2 is the second adjusted heating duration corresponding to the qth heating (q is a positive integer); tq' is the target heating duration corresponding to the qth heating; dot_Lq is the target number of heating points corresponding to heating level Lq; e is the heating point compensation coefficient when the target number of heating points corresponding to heating level Lq is less than 72, which can be set to 0.01, but is not limited to; f is the heating point compensation coefficient when the target number of heating points corresponding to heating level Lq is not less than 72 and less than 144, which can be set to 0.1, but is not limited to; g is the heating point compensation coefficient when the target number of heating points corresponding to heating level Lq is not less than 144 and less than 216, which can be set to 0.15, but is not limited to; f is the heating point compensation coefficient when the target number of heating points corresponding to heating level Lq is not less than 216, which can be set to 0.19, but is not limited to.
[0306] In this embodiment, the printing device controller adjusts the initial heating duration for each heating cycle based on the current temperature and reference temperature of the printhead, resulting in a first adjusted heating duration for each heating cycle. This allows the heating parameters of the printhead to effectively adapt to the current temperature conditions. Furthermore, by adjusting the first adjusted heating duration based on the current driving voltage and the driving voltage threshold of the printhead, a second adjusted heating duration is obtained, allowing the heating parameters of the printhead to effectively adapt to the current voltage conditions. Finally, by adjusting the second adjusted heating duration based on the number of target heating points corresponding to each heating level, a target heating duration is obtained, enabling the heating parameters of the printhead to effectively adapt to the current printing content conditions, thereby effectively ensuring the quality of thermal printing.
[0307] S1807: Based on the target heating time corresponding to each heating and the heating level corresponding to each target heating point, control the print head to complete the thermal printing of each printing segment in sequence.
[0308] Optionally, the printing device controller controls the print head to sequentially complete the thermal printing of each printing segment according to the moving direction of the printing medium (such as labels, paper, etc.), based on the target heating time corresponding to each heating and the heating level corresponding to each target heating point in at least one divided printing segment, thereby gradually completing the thermal printing of the current line.
[0309] For example, suppose the printer controller divides the current line into three printing segments and classifies the target heating points in each segment into six different heating levels, L1 to L6. During the printing of the current line, the printer controller can sequentially print the three segments according to the direction of movement of the printing medium. Understandably, the printer controller can control the timing of the printer's motor and printhead, using a step-by-step motor and six-times-heating printhead operation to print each segment.
[0310] For each of the three printing segments, the printing equipment controller can first set a corresponding power-on duration t1′ for all target heating points with heating level L1, controlling all target heating points with heating level L1 to be heated. Then, it can set a corresponding power-on duration t2′ for all target heating points with heating levels L1 and L2, controlling the heating points with heating levels L1 to L2 to be heated. Next, it can set a corresponding power-on duration t3′ for all target heating points with heating levels L1 to L3, controlling the heating points with heating levels L1 to L4 to be heated. Finally, it can set a corresponding power-on duration t5′ for all target heating points with heating levels L1 to L5, controlling the heating points with heating levels L1 to L5 to be heated. Finally, set the corresponding power-on duration t6′ for all target heating points with heating levels L1 to L6, control the target heating points with heating levels L1 to L6 to be heated, thereby enabling six heating cycles to complete the thermal printing of each printing segment.
[0311] In this embodiment, the printing device controller controls the print head to gradually complete the thermal printing of the current line according to the target heating time corresponding to each heating and the heating level corresponding to each target heating point. This not only controls the total operating current of the print head and extends its service life, but also heats the target heating points in each printing segment as needed according to the heating level and target heating time, avoiding problems such as uneven printing density and ribbon breakage, thereby effectively ensuring the quality of thermal printing.
[0312] S1808: Cools the printhead and determines the printhead heating parameters when printing the next line of the current line during the cooling process.
[0313] Specifically, S1808 is the same as S1705, and will not be repeated here.
[0314] In the above-described printhead heating control method, the printing device controller divides the current line into at least one printing segment based on the number of target heating points. This effectively prevents excessive total operating current of the printhead from affecting its lifespan, thus improving the safety and reliability of thermal printing. By determining the heating level of the target heating points in each printing segment, the energy input of each target heating point can be rationally controlled according to the actual printing content, avoiding insufficient or excessive energy input and improving the quality of thermal printing. By adjusting the initial heating duration of each heating cycle to the target heating duration based on the current temperature, voltage, and printing content, the thermal printhead can adapt to the current working conditions in a timely manner, improving the adaptability of thermal printing. By heating the target heating points in each printing segment on demand according to the target heating duration and heating level corresponding to each target heating point, the printhead is controlled to gradually complete the thermal printing of the current line, avoiding problems such as uneven print density and ribbon breakage, effectively ensuring the quality of thermal printing. The above method effectively improves the safety, reliability, and adaptability of thermal printing while ensuring its quality.
[0315] In some embodiments of this application, as shown in FIG19, a printhead heating control method is provided, including the following steps:
[0316] S1901: Obtain multiple target heating points that the printhead needs to enable when printing the current line.
[0317] Specifically, S1901 is the same as S1601, and will not be repeated here.
[0318] S1902: Divide the current line into at least one print segment based on the number of target heating points.
[0319] Specifically, S1902 is the same as S1802, and will not be repeated here.
[0320] S1903: Determine the heating level corresponding to each of the multiple target heating points; different heating levels correspond to different heating times, and each heating corresponds to a preset initial heating duration.
[0321] Specifically, S1903 is the same as S1803, and will not be repeated here.
[0322] S1904: Based on the current temperature value of the printhead and the reference temperature value of the printhead, adjust the initial heating time corresponding to each heating cycle to obtain the first adjusted heating time corresponding to each heating cycle.
[0323] Specifically, S1904 is the same as S1804, and will not be repeated here.
[0324] S1905: Determine the voltage compensation coefficient based on the current drive voltage value of the printhead.
[0325] Understandably, if the current drive voltage value of the printhead does not reach the drive voltage threshold (e.g., 12.2V), the print equipment controller needs to extend the heating time of each target heating point to ensure that the printhead can complete high-quality printing tasks even under low voltage conditions.
[0326] Optionally, the printer controller determines the corresponding voltage compensation coefficient based on the voltage range of the current drive voltage value. For example, when the current drive voltage value is less than 11.6V, the voltage compensation coefficient a can be set to 0.09; when the current drive voltage value is not less than 11.6V and less than 12V, the voltage compensation coefficient b can be set to 0.10; when the current drive voltage value is not less than 12V and less than 12.2V, the voltage compensation coefficient c can be set to 0.11; and when the current drive voltage value is not less than 12.2V, the voltage compensation coefficient d can be set to 0.
[0327] S1906: Based on the voltage compensation coefficient, the current driving voltage value, and the driving voltage threshold, adjust the first adjusted heating time corresponding to each heating cycle to obtain the second adjusted heating time corresponding to each heating cycle.
[0328] Optionally, the printer controller extends the first adjusted heating time corresponding to each heating cycle based on the voltage compensation coefficient, the current driving voltage value, and the driving voltage threshold, to obtain the second adjusted heating time corresponding to each heating cycle. For details, please refer to equation (2) above; it will not be elaborated further here.
[0329] In this embodiment, the printing device controller adjusts the first adjusted heating time corresponding to each heating cycle based on the voltage compensation coefficient, the current driving voltage value, and the driving voltage threshold, thereby obtaining the second adjusted heating time corresponding to each heating cycle. This effectively adapts to the current voltage conditions and ensures the quality of thermal printing even when the current driving voltage value is low.
[0330] S1907: Determine the heating point number compensation coefficient based on the target heating point number corresponding to each heating level.
[0331] Understandably, when there are a large number of target heating points for a particular heating cycle, the printhead needs to provide more energy within a preset time period. To ensure that the capacity provided by the printhead within the preset time period does not exceed the maximum energy limit that the printhead can provide within that time period, the printing equipment controller can determine a heating point compensation coefficient based on the number of target heating points corresponding to each heating level, thereby further extending the second adjustment heating duration corresponding to each heating cycle.
[0332] Optionally, the printing equipment controller determines the corresponding heating point compensation coefficient based on the range of the target heating point count for each heating level. For example, if the target heating point count for a certain heating level is less than 72, the heating point compensation coefficient e can be set to 0.01; if the target heating point count for a certain heating level is not less than 72 and less than 144, the heating point compensation coefficient can be set to 0.1; if the target heating point count for a certain heating level is not less than 144 and less than 216, the heating point compensation coefficient can be set to 0.15; and if the target heating point count for a certain heating level is not less than 216, the heating point compensation coefficient can be set to 0.19.
[0333] S1908: Based on the heating point compensation coefficient and the target heating point quantity corresponding to each heating level, adjust the second adjustment heating time corresponding to each heating to obtain the target heating time corresponding to each heating.
[0334] Optionally, the printer controller extends the second adjustment heating time corresponding to each heating cycle based on the heating point compensation coefficient and the target heating point quantity corresponding to each heating level, thereby obtaining the target heating time corresponding to each heating cycle. For details, please refer to equation (3) above, which will not be repeated here.
[0335] In this embodiment, the printing device controller adjusts the second adjustment heating time corresponding to each heating based on the heating point compensation coefficient and the target heating point number corresponding to each heating level, thereby obtaining the target heating time corresponding to each heating. This enables the printing head heating parameters to effectively adapt to the current printing content conditions, and can effectively ensure the quality of thermal printing even when the number of target heating points in a single heating is large.
[0336] S1909: Based on the target heating duration corresponding to each heating and the heating level corresponding to each target heating point, control the print head to heat the target heating points corresponding to each printing segment in a time-segmented manner to complete the thermal printing of each printing segment.
[0337] Optionally, the printer controller controls the print head to sequentially complete the thermal printing of each printing segment according to the moving direction of the printing medium, based on the target heating duration corresponding to each heating and the heating level corresponding to each target heating point in at least one printing segment. Specifically, the printer controller activates multiple heating cycles for each printing segment in different time periods to gradually complete the thermal printing of each printing segment.
[0338] For example, suppose the printer controller divides the current line into three printing segments and divides the target heating points in each printing segment into six different heating levels, L1 to L6. Then, during the printing of the current line, the printer controller can sequentially activate the heating of the target heating points corresponding to the three printing segments in six time periods according to the direction of movement of the printing medium to complete the thermal printing of each printing segment.
[0339] Specifically, for each of the three printing segments, the printing equipment controller can first set a corresponding power-on duration t1′ for all target heating points of heating level L1, controlling all target heating points of heating level L1 to be heated. After the first heating, a corresponding power-on duration t2′ is set for all target heating points of heating levels L1 and L2, controlling the target heating points of heating levels L1 and L2 to be heated. After the second heating, a corresponding power-on duration t3′ is set for all target heating points of heating levels L1 to L3, controlling the target heating points of heating levels L1 to L3 to be heated. After the third heating, a corresponding power-on duration t4′ is set for all target heating points of heating levels L1 to L4, controlling the target heating points of heating levels L1 to L4 to be heated. After the fourth heating, a corresponding power-on duration t5′ is set for all target heating points of heating levels L1 to L5, controlling the target heating points of heating levels L1 to L5 to be heated. After the fifth heating cycle, a corresponding power-on duration t6′ is set for all target heating points with heating levels L1 to L6, and the target heating points with heating levels L1 to L6 are controlled to be heated, thereby completing six heating cycles for each printing segment.
[0340] In this embodiment, the printing device controller controls the print head to sequentially heat the target heating points corresponding to each printing segment in stages according to the target heating duration and heating level of each target heating point, so as to complete the thermal printing of each printing segment. This not only controls the total operating current of the print head and extends its service life, but also heats the target heating points in each printing segment as needed according to the heating level and target heating duration, avoiding problems such as uneven printing density and ribbon breakage, thereby effectively ensuring the quality of thermal printing.
[0341] S1910: Cool the printhead and determine the printhead heating parameters when printing the next line of the current line during the cooling process.
[0342] Specifically, S1910 is the same as S1705, and will not be repeated here.
[0343] In the aforementioned printhead heating control method, the printing device controller adjusts the first adjusted heating duration for each heating cycle based on the voltage compensation coefficient, the current driving voltage value, and the driving voltage threshold, resulting in a second adjusted heating duration for each heating cycle. This effectively adapts to the current voltage conditions, enabling high-quality thermal printing even when the current driving voltage value is low. Furthermore, by adjusting the second adjusted heating duration for each heating cycle based on the heating point number compensation coefficient and the number of target heating points corresponding to each heating level, the controller obtains the target heating duration for each heating cycle. This effectively adapts to the current printing content conditions, ensuring safe and reliable thermal printing even when the number of target heating points in a single heating cycle is large. Finally, by controlling the printhead to sequentially heat the target heating points corresponding to each printing segment in stages based on the target heating duration for each heating cycle and the heating level corresponding to each target heating point, the thermal printing of each segment is completed. This effectively extends the printhead's lifespan while avoiding problems such as uneven print density and ribbon breakage. The above method achieves safe, reliable, and high-quality thermal printing, thus effectively guaranteeing the quality of thermal printing.
[0344] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0345] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for controlling printhead heating, wherein, include: Each pixel in the image to be printed is assigned a heating energy level, and there are multiple heating energy levels; Based on the heating energy level of each pixel, at least one corresponding heating energy segment is assigned to each pixel. Each pixel is heated according to its corresponding heating energy level.
2. The printhead heating control method as described in claim 1, wherein, The method further includes: Determine the total heating energy based on the printing parameters; Based on the total heating energy, determine the heating energy corresponding to each heating energy segment.
3. The method as described in claim 2, wherein, The printing parameters include printhead temperature, battery voltage, and paper type; The process of determining the total heating energy based on printing parameters specifically includes: Get printhead temperature, battery voltage, and paper type; The total heating energy is determined based on the printhead temperature, battery voltage, and paper type.
4. The method as described in claim 2 or 3, wherein, The step of determining the heating energy corresponding to each heating energy segment based on the total heating energy specifically includes: Based on the total heating energy, the heating energy is distributed proportionally to each heating energy segment, and the sum of the energy of all heating energy segments equals the total heating energy.
5. The method of claim 4, wherein, The heating energy segment includes a first energy segment, a second energy segment, and a third energy segment. The allocation of heating energy to each heating energy segment according to the total heating energy, in proportion to the total heating energy, specifically includes: The heating energy is distributed to the first energy segment according to the first ratio; According to the second ratio, the heating energy is distributed to the second energy segment; The heating energy is distributed to the third energy segment according to the third ratio.
6. The method according to any one of claims 2 to 5, wherein, The heating energy segment includes a heating time period. Determining the heating energy corresponding to each heating energy segment based on the total heating energy specifically includes: Based on the total heating energy, determine the heating time corresponding to each heating time period.
7. The method as described in any one of claims 2 to 5, wherein, The heating energy segment includes a heating power segment. Determining the heating energy corresponding to each heating energy segment based on the total heating energy specifically includes: Based on the total heating energy, determine the heating power corresponding to each heating power segment.
8. The printhead heating control method according to any one of claims 1 to 7, wherein, The step of assigning at least one corresponding heating energy segment to each pixel based on the heating energy level of each pixel specifically includes: The heating energy corresponding to each pixel is determined based on the heating energy level of each pixel. Based on the heating energy, at least one heating energy segment is assigned to each pixel, and the total energy of all heating energy segments assigned to each pixel is equal to the heating energy corresponding to that pixel.
9. The method according to any one of claims 1 to 8, wherein, The process of assigning heating energy levels to each pixel in the image to be printed specifically includes: Heating energy levels are assigned to each pixel in the image to be printed, line by line, to form pixel data corresponding to each heating energy level.
10. The method of claim 9, wherein, Based on the heating energy level of each pixel, at least one corresponding heating energy segment is assigned to each pixel, specifically including: Based on the pixel data corresponding to each heating energy level, a heating energy segment is assigned to each pixel, forming pixel data corresponding to each heating energy segment.
11. The method according to any one of claims 1 to 10, wherein, The process of assigning heating energy levels to each pixel in the image to be printed specifically includes: The image to be printed is processed by dividing it into pixels; The image to be printed is divided into pixels, and heating energy levels are assigned to each pixel.
12. The method as claimed in any one of claims 1 to 11, wherein, The step of heating each pixel according to the corresponding heating energy segment specifically includes: In response to the start of printing, the paper feed aligns the paper tip with the print line; The number of paper feed lines is counted. When the number of lines containing data in the printed image is reached, the pixels of that line are heated according to the corresponding heating energy segment.
13. The method as claimed in any one of claims 1 to 12, wherein, Before assigning heating energy levels to each pixel in the image to be printed, the method further includes: Receive the image to be printed sent by the user, the image being printed being edited by the user.
14. The method of claim 1, wherein, The image to be printed includes rows to be printed and at least one target row; the heating energy segment includes heating duration; The process of assigning heating energy levels to each pixel in the image to be printed specifically includes: Based on the dot matrix data of the row to be printed and at least one target row in the image to be printed, the heating energy level of each pixel in the row to be printed is determined; the target row is adjacent to the row to be printed. The step of heating each pixel according to the corresponding heating energy segment specifically includes: Each pixel is heated according to its corresponding heating time.
15. The method of claim 14, wherein, The step of determining the heating energy level of each pixel in the row to be printed based on the dot matrix data of the row to be printed and at least one target row in the image to be printed specifically includes: Based on the dot matrix data of the rows to be printed and at least one target row in the image to be printed, determine the thermal history data corresponding to each heating level. The thermal history data is used to characterize whether each pixel in the row to be printed needs to be heated at each heating level. The heating energy level of each pixel in the row to be printed is determined based on the thermal history data corresponding to each heating energy level.
16. The method of claim 15, wherein, The determination of the thermal history data corresponding to each heating energy level includes: The dot matrix data of the row to be printed and at least one target row are calculated according to the thermal history algorithm formula corresponding to each heating energy level to obtain the thermal history data corresponding to each heating energy level.
17. The method of claim 15 or 16, wherein, The step of determining the heating energy level of each pixel in the row to be printed based on the thermal history data corresponding to each heating energy level includes: Based on the thermal history data corresponding to each heating level, the target heating level that needs to be heated for each pixel in the row to be printed is determined respectively; The target heating energy level with the longest heating time corresponding to each pixel is determined as the heating energy level of each pixel.
18. The method as claimed in any one of claims 14 to 17, wherein, The at least one target row is the N rows before and the M rows after the row to be printed, where N and M are non-negative integers and N and M are not both 0; the number of pixels in the target row in the dot matrix data is greater than or equal to the row to be printed.
19. The method of claim 14, wherein, The printhead heating control method further includes: allocating heating time to each heating level according to a preset method.
20. The method according to any one of claims 14 to 19, wherein, The step of heating each pixel according to the heating time corresponding to each pixel specifically includes: Simultaneously, heating begins on each pixel, and the total heating time for each pixel is controlled according to the heating duration corresponding to each pixel.
21. The printhead heating control method as described in claim 19 or 20, wherein, The process of allocating heating time to each heating energy level according to a preset method specifically includes: Based on the positional pattern of the pixels corresponding to each heating energy level in the content to be printed, determine at least one target heating energy level that needs to be adjusted for heating duration and the adjustment method for each target heating energy level. The heating time of each target heating level is increased or decreased according to the adjustment method of each target heating level.
22. The method of claim 21, wherein, The increase and decrease in duration do not exceed a preset proportion of the original heating duration.
23. The method of claim 21 or 22, wherein, The process of determining the target heating energy level requiring heating time adjustment and the adjustment method for each target heating energy level based on the positional patterns of pixels corresponding to each heating energy level within the content to be printed includes: Based on the position of the pixel corresponding to each heating energy level in the content to be printed, determine whether the pixel corresponding to each heating energy level needs to reduce the heating energy. If so, determine that heating energy level as the first target heating energy level that needs to reduce the heating time. Based on the position of the pixel corresponding to each heating energy level in the content to be printed, determine whether the pixel corresponding to each heating energy level needs to be heated more. If so, determine that the heating energy level is the second target heating energy level that needs to be heated for longer.
24. The method according to any one of claims 21 to 23, wherein, The process of increasing or decreasing the heating time for each target heating energy level includes: Reduce the heating time of the first target heating level, determine the total reduced heating time td, and allocate td to each of the second target heating levels.
25. The method according to any one of claims 21 to 23, wherein, The process of increasing or decreasing the heating time for each target heating energy level includes: Determine the additional heating time ti required for the second target heating energy level with the highest energy level, and allocate ti to other second target heating energy levels.
26. The method according to any one of claims 14 to 25, wherein, The dot matrix data is binary data, in which pixels that need to be heated are represented by a bit value of 1, and pixels that do not need to be heated are represented by a bit value of 0.
27. The method according to any one of claims 14 to 25, wherein, Before determining the heating energy level of each pixel in the row to be printed based on the dot matrix data of the row to be printed and at least one target row, the method further includes: Receive dot matrix data of content to be printed, wherein the content to be printed is edited by the user; Obtain the dot matrix data of the line to be printed and at least one target line from the dot matrix data of the content to be printed.
28. The method of claim 1, wherein, The heating energy range includes the target heating duration; The step of assigning at least one corresponding heating energy segment to each pixel based on the heating energy level of each pixel specifically includes: The number of times each pixel is heated is determined based on its heating energy level; each heating cycle corresponds to a preset initial heating duration. Based on the current working status parameters of the print head, the initial heating time corresponding to each heating is adjusted to obtain the target heating time corresponding to each heating. The step of heating each pixel according to the corresponding heating energy segment specifically includes: Each pixel is heated according to the target heating duration corresponding to each heating and the heating level of each pixel.
29. The method of claim 28, wherein, The step of adjusting the initial heating duration for each heating cycle based on the current operating status parameters of the print head to obtain the target heating duration for each heating cycle includes: Based on the current temperature value of the printhead, and / or the current driving voltage value of the printhead, and / or the number of target heating points corresponding to each heating level, the initial heating time corresponding to each heating is adjusted to obtain the target heating time corresponding to each heating.
30. The method of claim 28 or 29, wherein, The step of adjusting the initial heating duration for each heating cycle based on the current temperature value of the print head, and / or the current driving voltage value of the print head, and / or the number of target heating points corresponding to each heating level, to obtain the target heating duration for each heating cycle, includes: Based on the current temperature value of the print head and the reference temperature value of the print head, the initial heating time corresponding to each heating is adjusted to obtain the first adjusted heating time corresponding to each heating. Based on the current driving voltage value of the print head and the driving voltage threshold of the print head, the first adjusted heating time corresponding to each heating is adjusted to obtain the second adjusted heating time corresponding to each heating. Based on the number of target heating points corresponding to each heating level, the second adjustment heating time corresponding to each heating is adjusted to obtain the target heating time corresponding to each heating.
31. The method of claim 30, wherein, The step of adjusting the first adjusted heating duration corresponding to each heating cycle based on the current driving voltage value of the print head and the driving voltage threshold of the print head, to obtain the second adjusted heating duration corresponding to each heating cycle, includes: Determine the voltage compensation coefficient based on the current drive voltage value of the print head; Based on the voltage compensation coefficient, the current driving voltage value, and the driving voltage threshold, the first adjusted heating duration corresponding to each heating cycle is adjusted to obtain the second adjusted heating duration corresponding to each heating cycle.
32. The method of claim 30 or 31, wherein, The step of adjusting the second adjusted heating time corresponding to each heating cycle based on the number of target heating points corresponding to each heating level, to obtain the target heating time corresponding to each heating cycle, includes: The heating point number compensation coefficient is determined based on the number of target heating points corresponding to each heating level. Based on the heating point compensation coefficient and the target heating point quantity corresponding to each heating level, the second adjusted heating time corresponding to each heating is adjusted to obtain the target heating time corresponding to each heating.
33. The method of claim 28, wherein, The method further includes: Based on the number of target heating points, the current row is divided into at least one print segment; The step of controlling the print head to complete the thermal printing of the current row based on the target heating duration corresponding to each heating and the heating level corresponding to each target heating point includes: Based on the target heating duration corresponding to each heating cycle and the heating level corresponding to each target heating point, the print head is controlled to sequentially complete the thermal printing of each printing segment.
34. The method of claim 33, wherein, The step of controlling the print head to sequentially complete the thermal printing of each printing segment according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point includes: Based on the target heating duration corresponding to each heating cycle and the heating level corresponding to each target heating point, the print head is controlled to sequentially heat the target heating points corresponding to each printing segment in time intervals to complete the thermal printing of each printing segment.
35. The method according to any one of claims 28 to 34, wherein, Determining the heating level corresponding to each of the plurality of target heating points includes: Based on the printed data of the current row and its neighboring rows, the heating level corresponding to each of the multiple target heating points is determined.
36. The method as claimed in any one of claims 28 to 35, wherein, After controlling the print head to complete the thermal printing of the current row based on the target heating duration corresponding to each heating and the heating level corresponding to each target heating point, the method further includes: The printhead is cooled, and during the cooling process, the heating parameters of the printhead are determined when printing the next line of the current line.
37. A computer-readable medium having a computer program stored thereon, wherein, When the computer program is executed by the processor, it implements the printhead heating control method as described in any one of claims 1 to 36.
38. An electronic device, wherein, include: 0 One or more processors; A storage device configured to store one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the printhead heating control method as described in any one of claims 1 to 36.
39. A computer program product comprising a computer program, wherein, When the computer program is executed by the processor, it implements the printhead heating control method as described in any one of claims 1 to 36.