Thermal printing method and apparatus, storage medium, and electronic device

By recording the relationship between grayscale levels, number of print dots, and equipment parameters through a preset debugging table, the target heating time was determined, which solved the problem of poor thermal printing effect, improved the printing effect, and reduced resource consumption.

CN118144453BActive Publication Date: 2026-05-29ZHUHAI QUIN TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHUHAI QUIN TECH CO LTD
Filing Date
2024-03-26
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing thermal printing methods suffer from poor printing quality, especially when there are many gray levels. External factors have a significant impact, and adjusting the printing quality is difficult.

Method used

The heating time relationship between different grayscale levels, different number of print dots and target device parameters is recorded by a preset debugging table. The target heating time is determined based on the current parameter value of the printing device, and the heating of the printing components is controlled to complete the printing.

Benefits of technology

It reduces the impact of external factors on printing results, improves the effect of thermal printing, reduces the occupation of equipment resources, and simplifies the debugging process of printing results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118144453B_ABST
    Figure CN118144453B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a thermal printing method and device, a storage medium and an electronic device, wherein the method comprises: determining a gray scale order corresponding to each to-be-printed point in to-be-printed content in a group of gray scale orders, and determining a number of printing points corresponding to each gray scale order; determining a target heating duration corresponding to each gray scale order according to a current parameter value of a target device parameter of a printing device, the number of printing points corresponding to each gray scale order, and a preset debugging table, wherein the target device parameter is used to represent a running state of the printing device, and the preset debugging table is used to record a heating duration corresponding to different gray scale orders, different numbers of printing points, and different parameter values of the target device parameter; and controlling a printing component of the printing device to heat the to-be-printed points corresponding to each gray scale order according to the target heating duration corresponding to each gray scale order, so as to complete printing of the to-be-printed content. Through the present application, the printing effect of the printer is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of thermal film printing technology, and more specifically, to a thermal printing method and apparatus, a storage medium, and an electronic device. Background Technology

[0002] Currently, common thermal printers or thermal transfer printers cannot print in color. Color content must be converted to black and white for printing. However, simple black and white alone are not ideal for printing color images, so grayscale printing is necessary. Grayscale printing divides black and white into multiple levels of gray from light to dark. The more grayscale levels, the more natural the transition between black and white, the stronger the sense of depth in the image, and the better the printed result.

[0003] However, the more grayscale levels there are, the smaller the differences between them become, the more susceptible the grayscale printing effect is to external factors, and the more difficult it is to adjust the printing effect. Therefore, it is evident that thermal printing methods in related technologies suffer from poor printing quality. Summary of the Invention

[0004] This application provides a thermal printing method and apparatus, a storage medium and an electronic device, to at least solve the problem of poor printing effect in related thermal printing methods.

[0005] According to one embodiment of this application, a thermal printing method is provided, comprising: determining a grayscale level corresponding to each printable point in the content to be printed from a preset set of grayscale levels, and determining the number of printable points corresponding to each grayscale level in the set of grayscale levels, wherein the number of printable points corresponding to each grayscale level is the number of printable points in the content to be printed corresponding to each grayscale level; determining a target heating time corresponding to each grayscale level based on the current parameter value of the target device parameters of the printing device, the number of printable points corresponding to each grayscale level, and a preset debugging table, wherein the target device parameters are used to represent the operating state of the printing device, and the preset debugging table is used to record the heating time corresponding to different grayscale levels, different numbers of printable points, and different parameter values ​​of the target device parameters; and controlling the printing component of the printing device to heat the printable points corresponding to each grayscale level according to the target heating time corresponding to each grayscale level, so as to complete the printing of the content to be printed.

[0006] According to another embodiment of this application, a thermal printing device is provided, comprising: a first determining unit, configured to determine the grayscale level corresponding to each printable point in the content to be printed from a preset set of grayscale levels, and to determine the number of printable points corresponding to each grayscale level in the set of grayscale levels, wherein the number of printable points corresponding to each grayscale level is the number of printable points in the content to be printed corresponding to each grayscale level; a second determining unit, configured to determine a target heating time corresponding to each grayscale level based on the current parameter value of the target device parameter of the printing device, the number of printable points corresponding to each grayscale level, and a preset debugging table, wherein the target device parameter is used to represent the operating state of the printing device, and the preset debugging table is used to record the heating time corresponding to different grayscale levels, different printable points, and different parameter values ​​of the target device parameter; and a control unit, configured to control the printing component of the printing device to heat the printable points corresponding to each grayscale level according to the target heating time corresponding to each grayscale level, so as to complete the printing of the content to be printed.

[0007] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, which is configured to execute the above-described thermal printing method when running.

[0008] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the thermal printing method described above through the computer program.

[0009] In this embodiment, a method based on a preset debugging table is used to determine the required heating time of the printing component for the current content to be printed in order to complete printing. This involves determining the grayscale level corresponding to each printable point in the content to be printed from a preset set of grayscale levels, and determining the number of printable points corresponding to each grayscale level in the set of grayscale levels. The number of printable points corresponding to each grayscale level is the number of printable points in the content to be printed corresponding to each grayscale level. Based on the current parameter values ​​of the target device parameters of the printing equipment, the number of printable points corresponding to each grayscale level, and the preset debugging table, the target heating time corresponding to each grayscale level is determined. The target device parameters represent the operating status of the printing equipment, and the preset debugging table records different... The heating time corresponds to different grayscale levels, different numbers of print dots, and different parameter values ​​of the target device. The printing device's printing components are controlled to heat the print dots corresponding to each grayscale level according to the target heating time. This completes the printing of the content to be printed. Since the preset debugging table records the heating time of the printing components corresponding to different grayscale levels, different numbers of print dots, and different device parameters, the most suitable heating time can be determined based on the preset debugging table regardless of changes in the device parameters at any given moment. This reduces the impact of various external factors on the printing effect during the printing process, achieving the technical effect of improving thermal printing quality and solving the problem of poor printing quality in related thermal printing methods. Attached Figure Description

[0010] Figure 1 This is a hardware structure block diagram of an optional thermal printing method according to an embodiment of this application;

[0011] Figure 2 This is a flowchart illustrating an optional thermal printing method according to an embodiment of this application;

[0012] Figure 3 This is a schematic diagram of an optional thermal printing method according to an embodiment of this application;

[0013] Figure 4 This is a schematic diagram of another optional thermal printing method according to an embodiment of this application;

[0014] Figure 5 This is a schematic diagram of another optional thermal printing method according to an embodiment of this application;

[0015] Figure 6 This is a schematic diagram of another optional thermal printing method according to an embodiment of this application;

[0016] Figure 7 This is a flowchart illustrating another optional thermal printing method according to an embodiment of this application;

[0017] Figure 8 This is a structural block diagram of an optional thermal printing apparatus according to an embodiment of this application;

[0018] Figure 9 This is a structural block diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation

[0019] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application.

[0020] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0021] According to one aspect of the embodiments of this application, a thermal printing method is provided. Optionally, in this embodiment, the thermal printing method can be applied to, for example... Figure 1 The hardware environment shown consists of terminal device 102 and printing device 104. Figure 1 As shown, the printing device 104 is connected to the terminal device 102 via a network. The terminal device 102 can transmit the content to be printed to the printing device 104, and the printing device 104 can transmit the printing result to the terminal device 102.

[0022] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to PCs, mobile phones, tablets, smart home devices, etc.

[0023] Optionally, the thermal printing method of this application embodiment can be executed by the printing device 104, by the terminal device 102, or by both the printing device 104 and the terminal device 102. The terminal device 102 can also execute the thermal printing method of this application embodiment by a client installed on it.

[0024] Taking the thermal printing method of this embodiment executed by printing device 104 as an example, this embodiment provides a thermal printing method. Figure 2 This is a schematic flowchart of a thermal printing method according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:

[0025] Step S202: Determine the gray level corresponding to each printable point in the content to be printed from a preset set of gray level levels, and determine the number of printable points corresponding to each gray level in the set of gray level levels, wherein the number of printable points corresponding to each gray level is the number of printable points in the content to be printed where the corresponding gray level is each gray level.

[0026] Step S204: Determine the target heating time corresponding to each gray level based on the current parameter value of the target device parameter of the printing device, the number of print dots corresponding to each gray level, and the preset debugging table. The target device parameter is used to represent the operating status of the printing device, and the preset debugging table is used to record the heating time corresponding to different gray levels, different print dots, and different parameter values ​​of the target device parameter.

[0027] Step S206: Control the printing component of the printing device to heat the printable point corresponding to each grayscale level according to the target heating time corresponding to each grayscale level, so as to complete the printing of the content to be printed.

[0028] The thermal printing method in this embodiment can be applied to scenarios involving printing control of printing devices. Here, "printing device" refers to a device used to convert electronic documents or images into paper documents or images, such as printers and copiers. The printing device can print on the printing medium through a printing component (e.g., a printhead). The printing device can be a thermal printing device, such as a thermal printer or thermal transfer printer, and the printing component for thermal printing can be a thermal printhead. For thermal printing devices, since common thermal printers or thermal transfer printers cannot print in color, they often convert color content to black and white content for printing. However, simple black and white are not ideal for printing color images, so grayscale printing is necessary.

[0029] Grayscale printing divides black and white into multiple shades of gray, ranging from light to dark. The more grayscale levels there are, the more natural the transition between black and white, the stronger the sense of depth in the image, and the better the printed result. However, the more grayscale levels there are, the smaller the differences between them become. This means that factors such as changes in the number of print dots, the temperature of the thermal imager, and the battery level during the printing process have a greater impact on the grayscale printing effect, making it more difficult to adjust the print quality.

[0030] When multiple variables change simultaneously, their impact on the printer's printing quality is not linear, but rather a complex and unpredictable relationship. Related technologies often require the development of complex mathematical models for prediction. However, building such models involves intricate formulas and relational calculations, thus consuming significant resources.

[0031] To at least partially address the aforementioned issues, this embodiment can establish a preset debugging table containing various variable factors. During the printing process, the heating duration corresponding to each grayscale level is determined by consulting the preset debugging table based on the number of printable dots at each grayscale level in the content to be printed and the equipment parameters of the printing device. This allows the printing components to heat each printable dot (dot on the printing medium, for example, a dot on a thermal medium) based on the determined heating duration, ensuring the printing effect of the current content. The equipment parameters here can be parameters corresponding to various variable factors that easily affect the printing effect during grayscale printing, such as the temperature of the thermal sheet.

[0032] In this embodiment, a set of grayscale levels can be preset. Different grayscale levels correspond to different shades of gray in the printable dots. For example, there can be 16 grayscale levels, ranging from 0 to 15. The higher the grayscale level, the higher the shade of gray. During the printing process, the grayscale level corresponding to each printable dot in the printable content can be determined. Here, the printable content can be a large printable line of data transmitted from the terminal device to the printing device, containing a set of printable dots. Each printable dot corresponds to a specific grayscale level. The grayscale level corresponding to each printable dot can be determined based on the indication information corresponding to the printable content. For example, the printer uses a specific communication protocol during data reception. By parsing the data using this protocol, it can determine which of the 16 levels each printable dot belongs to.

[0033] The printing device can also determine the number of print dots corresponding to each grayscale level. That is, in the content to be printed, the corresponding grayscale level is the number of print dots for each grayscale level. Here, the grayscale level corresponding to each print dot can be counted to obtain the statistical result for each grayscale level. Among them, the number of print dots corresponding to some grayscale levels may be zero. For example, the current line to be printed contains 400 print dots, of which 50 print dots are at level 0, 50 print dots are at level 3, 100 print dots are at level 8, 100 print dots are at level 10, 30 print dots are at level 11, 50 print dots are at level 12, and 20 print dots are at level 15.

[0034] To reduce the impact of various variable factors on printing quality, a pre-set debugging table can be used to record the heating time corresponding to different grayscale levels, different print dot counts, and different parameter values ​​of the target device parameters of the printing equipment. Different print dot counts can be represented by dot count ranges. Target device parameters are at least one device parameter that affects printing quality; these can be electrical parameters or other types of parameters. The pre-set debugging table can contain one or more types of debugging tables. The dot count range, the parameter category of the target device parameters, and the type of pre-set debugging table can be set as needed; this embodiment does not impose any limitations on these settings.

[0035] It should be noted that in the preset debugging table, at the same grayscale level, different combinations of the number of print dots and the parameter values ​​of the target device can result in different heating times for the printed parts. That is, different numbers of print dots and different parameter values ​​of the target device can both lead to different heating times for the printed parts. For example, even though both are at grayscale level 15, the printing time for 200 print dots and 400 print dots will be different. The heating energy can be controlled by adjusting the heating time, thereby ensuring the printing effect. Here, the controlled heating time can be the heating time for each dot, or the heating time for all dots corresponding to the same grayscale level.

[0036] By matching the current parameter values ​​of the target device and the number of print dots corresponding to each grayscale level with a preset debugging table, the target heating time corresponding to each grayscale level can be determined. According to the target heating time corresponding to each grayscale level, the printing unit can be controlled to heat the print dots corresponding to each grayscale level. Here, print dots with the same corresponding grayscale level can be heated continuously. Print dots corresponding to adjacent grayscale levels can be printed sequentially or non-sequentially. By heating the print dots corresponding to each grayscale level, the printing of the content can be completed.

[0037] Through steps S202 to S206 above, the grayscale level corresponding to each printable point in the content to be printed is determined from a preset set of grayscale levels, and the number of printable points corresponding to each grayscale level in the set of grayscale levels is determined. The number of printable points corresponding to each grayscale level is the number of printable points in the content to be printed corresponding to each grayscale level. Based on the current parameter values ​​of the target device parameters of the printing device, the number of printable points corresponding to each grayscale level, and a preset debugging table, the target heating time corresponding to each grayscale level is determined. The target device parameters represent the operating status of the printing device, and the preset debugging table records the heating time corresponding to different grayscale levels, different numbers of printable points, and different parameter values ​​of the target device parameters. The printing components of the printing device are controlled to heat the printable points corresponding to each grayscale level according to the target heating time, thereby completing the printing of the content to be printed. This solves the problem of poor printing effect in related thermal printing methods and improves the thermal printing effect.

[0038] In an exemplary embodiment, the preset debugging table may include: a debugging baseline table, which records the standard heating time corresponding to different grayscale levels and different print counts; and a debugging correction table, which records the heating time correction values ​​corresponding to different parameter values ​​of the target device parameters. Compared to using a single data table to record the correspondence between grayscale levels, print counts, and target device parameter values, setting up multiple data tables (the debugging baseline table and the debugging correction table) to store different correspondences improves the convenience of data table setup.

[0039] In this embodiment, the debugging baseline table records the standard heating time matched by different print counts (which can be count ranges) corresponding to different grayscale levels under the standard parameter values ​​of the target device parameters. The debugging correction table records the correction values ​​for the standard heating time under different parameter values ​​of the target device parameters. The correction value for the standard parameter values ​​of the target device parameters recorded in the debugging correction table is 0, and other parameter values ​​can be represented by the difference between the parameter values ​​and the standard parameter values.

[0040] Taking grayscale levels 0-15 as an example, the debugging benchmark table can record the standard heating time for different numbers of printed dots at each grayscale level. For example... Figure 3As shown, from level 0 to level 15, each level corresponds to 6 standard heating times. For example, at level 15, the standard heating time is 1205 when the number of printed dots is between 1 and 144, 1220 when the number of printed dots is between 145 and 288, 1235 when the number of printed dots is between 289 and 432, 1270 when the number of printed dots is between 433 and 576, 1275 when the number of printed dots is between 577 and 720, and 1280 when the number of printed dots is between 721 and 864.

[0041] Correspondingly, based on the current parameter values ​​of the target equipment parameters of the printing device, the number of print dots corresponding to each grayscale level, and the preset debugging table, the target heating time corresponding to each grayscale level is determined, including:

[0042] S11, based on the number of print dots corresponding to each gray level, look up the debugging benchmark table to obtain the standard heating time corresponding to each gray level;

[0043] S12, based on the current parameter values ​​of the target equipment parameters, look up the debugging correction table to obtain the target heating time correction value;

[0044] S13, use the target heating time correction value to correct the standard heating time corresponding to each gray level, and obtain the target heating time corresponding to each gray level.

[0045] For each grayscale level, the standard heating time can be obtained by looking up the debugging benchmark table based on the number of print dots corresponding to each grayscale level. If the current parameter value of the target device is a specified parameter value (a standard parameter value, i.e., a parameter value that does not require correction of the heating time), then the standard heating time corresponding to each grayscale level can be determined as the target heating time corresponding to each grayscale level. Otherwise, the target heating time correction value can be obtained by looking up the debugging correction table based on the current parameter value of the target device, and then the standard heating time corresponding to each grayscale level can be corrected using the target heating time correction value to obtain the target heating time corresponding to each grayscale level.

[0046] For example, if the number of printable dots belonging to level 15 in the content to be printed is between 289 and 432, the standard heating time can be determined to be 1235 microseconds. If the current parameter value of the printer's target device parameters is the same as the standard parameter value, the final heating time is 1235 microseconds. If the current parameter value of the printer's target device parameters is different from the standard parameter value, the corresponding correction value is looked up in the debugging correction table based on the current parameter value to correct 1235 microseconds and obtain the final heating time.

[0047] Optionally, correcting the standard heating time corresponding to each grayscale level using a target heating time correction value can include: determining the target heating time corresponding to each grayscale level as the sum of the standard heating time corresponding to each grayscale level and the target heating time correction value. The correction value can be a numerical value containing a positive or negative sign. If the target heating time correction value is positive, the target heating time corresponding to each grayscale level is greater than the standard heating time corresponding to each grayscale level; if the target heating time correction value is negative, the target heating time corresponding to each grayscale level is less than the standard heating time corresponding to each grayscale level.

[0048] Here, the debugging correction table can be related only to the parameter values ​​of the target device parameters, without involving the grayscale level. That is, the heating time correction value is the same for different grayscale levels and different print dots. Alternatively, different heating time correction values ​​can be set for different grayscale levels and different print dots. Compared with this setting method, using only the parameter values ​​of the target device parameters as variables for the debugging correction table can reduce the complexity of the debugging correction table setting.

[0049] In this embodiment, the heating time is determined based on the debugging benchmark table and the debugging correction table, which can improve the convenience of information acquisition while ensuring the rationality of the heating time setting.

[0050] In an exemplary embodiment, considering that in addition to the printed content itself (grayscale levels and number of print dots) affecting the printing effect, the printing device temperature (which could be the temperature of the printing medium, such as the temperature of the thermal sheet, or the ambient temperature) and the printing device's battery level also affect the printing effect, in this embodiment, the standard heating time can be corrected based on the battery level and temperature parameters. That is, the target device parameters include battery level and temperature parameters, and the adjustment correction table can include a battery level adjustment correction table and a temperature adjustment correction table. The standard parameter values ​​of the target device parameters can include standard battery level values ​​and standard temperature values. Correspondingly, the adjustment baseline table records the heating time matched to different print dots corresponding to each grayscale level under the standard battery level and standard temperature values. The battery level adjustment correction table records the correction values ​​under different differences between the current battery level and the standard battery level. The temperature adjustment correction table records the correction values ​​under different differences between the current temperature and the standard temperature.

[0051] Taking a standard power level of 100% and a standard temperature of 30 degrees Celsius as an example, the power adjustment correction table can be as follows: Figure 4 As shown, different correction values ​​correspond to different battery levels. For example, the correction value is 0 when the battery is 100%, 8 when it's 96%, and 4 when it's 97%. The temperature adjustment correction table can be viewed as follows: Figure 5As shown, different correction values ​​correspond to different temperature values. For example, the correction value is 0 when the temperature is 30 degrees, 40 when the temperature is 26 degrees, and -4 when the temperature is 31 degrees.

[0052] It should be noted that printing can be stopped and a warning reminder issued when the current battery level is below a preset threshold, prompting the user to charge. For example, when the battery level is below 5%, the user can be prompted to charge. Additionally, printing can also be stopped when the current temperature is below a first temperature threshold or above a second temperature threshold. For example, a temperature below 1 degree Celsius is a low-temperature protection threshold, and printing will not proceed; a temperature above 75 degrees Celsius is a high-temperature alarm threshold, and printing will also not proceed.

[0053] Correspondingly, based on the current parameter values ​​of the target equipment, the adjustment correction table is looked up to obtain the target heating time correction value, including:

[0054] S21, find the first heating duration correction value corresponding to the current parameter value of the power parameter in the power adjustment correction table;

[0055] S22, find the second heating time correction value corresponding to the current parameter value of the temperature parameter in the temperature adjustment correction table;

[0056] S23, the sum of the first heating duration correction value and the second heating duration correction value is determined as the target heating duration correction value.

[0057] Based on the current value of the power parameter (i.e., the current power value), the power adjustment correction table can be consulted, and the heating time correction value found can be determined as the first heating time correction value. Similarly, based on the current value of the temperature parameter (i.e., the current temperature value), the temperature adjustment correction table can be consulted, and the heating time correction value found can be determined as the second heating time correction value. The first and second heating time correction values ​​are then fused to obtain the target heating time correction value. This fusion can be a direct summation of the two values ​​or a weighted summation.

[0058] In this embodiment, a relationship table is established using an array table to represent factors such as grayscale level changes, changes in the number of print dots, changes in the temperature of the printable parts, and changes in battery power. Based on each relationship table, the heating time required for the current print is determined, which ensures the quality of the current grayscale print.

[0059] In an exemplary embodiment, the debugging baseline table and debugging correction table can be set based on the printing results obtained by printing test print content. Here, the test print content includes multiple sets of print points, and the number of print points in each set of print points is different. Optionally, the test print content can be a test image, which can include multiple test sections, each with a different number of print points. For example, the test image can be a triangle (e.g., a right triangle), with different sections corresponding to different numbers of heating points. Taking a thermal sheet with 864 dots (pixels) of heating points and a 300 dpi as an example, since a single-stage heating can reach a maximum of 864 points, to reduce the size of the baseline table and the workload during debugging, the 864 points can be divided into 6 groups, each group containing 144 heating points. The test image is as follows: Figure 6 As shown, group 1 has 1-144 printing points, group 2 has 145-288 printing points, group 3 has 289-432 printing points, group 4 has 433-576 printing points, group 5 has 577-720 printing points, and group 6 has 721-864 printing points. This can be understood as the total number of printing points for each stage being divided into 6 groups. The heating time is also different depending on the number of printing points.

[0060] Correspondingly, before determining the target heating time corresponding to each grayscale level based on the current parameter values ​​of the target equipment parameters of the printing device, the number of print dots corresponding to each grayscale level, and the preset debugging table, the above method further includes:

[0061] S31, while keeping the parameter value of the target device parameter unchanged, the printing device is controlled to heat the printing component for different durations based on each gray level to complete the printing of the test content;

[0062] S32, determine the standard heating time for each group of print points under each gray level, based on the heating time corresponding to the print result that matches the color of the standard color scale card for each gray level, and generate an adjustment benchmark table based on the standard heating time for each group of print points under each gray level.

[0063] S33, adjust the parameter values ​​of the target device parameters from the specified parameter values ​​to a set of target parameter values, and control the heating duration of the printing component based on each target parameter value and each grayscale level in the set of target parameter values ​​to complete the printing of each set of printing points;

[0064] S34, determine the heating time corresponding to the printing result that matches the color of the standard color chart for each gray level in each group of printing points corresponding to each target parameter value at each gray level, and determine the reference heating time for each group of printing points corresponding to each target parameter value at each gray level. Based on the standard heating time for each group of printing points at each gray level and the reference heating time for each group of printing points corresponding to each target parameter value at each gray level, generate an adjustment correction table.

[0065] To generate a debugging benchmark table, the target device parameters can be kept constant at specified values ​​(i.e., the aforementioned standard parameter values). The heating duration of the printing component is controlled for different durations based on each grayscale level to complete the printing of the test content. There can be multiple heating durations corresponding to each group of print points at each grayscale level. These multiple heating durations can be set empirically, and the heating durations corresponding to different grayscale levels and different groups of print points can be at least partially different. Correspondingly, there can be multiple printing results for each group of print points at each grayscale level.

[0066] For each group of print points at each grayscale level, the print result can be compared with the color of the standard color chart for each grayscale level. The print result matching the standard color chart for each grayscale level is selected, and the heating time corresponding to the selected print result is determined as the standard heating time for each group of print points at each grayscale level. Based on the standard heating time for each group of print points at each grayscale level, a calibration benchmark table can be generated. Here, the number of print points in each group can be used as the dividing point for the number of print points in the calibration benchmark table.

[0067] Comparing the print result of each group of print points at each gray level with the color of the standard color chart for each gray level can be performed and instructed manually. That is, the processing device can receive the print result selection instruction and determine the print result indicated by the print result selection instruction as the print result that is consistent with the color of the standard color chart for each gray level. Optionally, comparing the printing result of each group of print points at each grayscale level with the color of the standard color chart for each grayscale level can also be achieved by acquiring images of the printing result using an image acquisition component and comparing them with the images of the standard color chart for each grayscale level. This comparison can be performed using a neural network model. This model can first preprocess the acquired images of the printing result to account for the influence of regional environmental factors on imaging, and then compare the preprocessed acquired images with the images of the standard color chart for each grayscale level. For example, it can compare based on image features and output the comparison results. The comparison results can indicate: the printing result of each group of print points at each grayscale level that matches the color of the standard color chart for each grayscale level, or the probability that the printing result of each group of print points at each grayscale level matches the color of the standard color chart for each grayscale level, or other information, as long as the comparison results can determine the printing result of each group of print points at each grayscale level that matches the color of the standard color chart for each grayscale level.

[0068] To generate a debugging correction table, the parameter values ​​of the target device can be adjusted from specified parameter values ​​to a set of target parameter values. Based on each target parameter value and each grayscale level within this set, the heating duration of the printing component can be controlled to complete the printing of each group of print points. Here, the adjustment from specified parameter values ​​to a set of target parameter values ​​can be based on the specified parameter values, adjusting the target device parameter values ​​in steps. Alternatively, the heating duration of the printing component can be controlled based on each target parameter value and each grayscale level to complete the printing of at least some groups of print points.

[0069] For each set of print results corresponding to each target parameter value at each gray level, the heating time corresponding to the print result that matches the color of the standard color chart at each gray level can be determined as the reference heating time for each set of print results corresponding to each target parameter value at each gray level. The method for determining the print result that matches the color of the standard color chart at each gray level is similar to that in the previous embodiment and will not be repeated here.

[0070] Based on the standard heating time of each group of print points at each gray level and the reference heating time of each group of print points corresponding to each target parameter value at each gray level, an adjustment correction table can be generated. In the adjustment correction table, the corresponding heating time correction values ​​can be recorded for the number of points corresponding to different gray levels and different groups of print points. Alternatively, all heating time correction values ​​corresponding to each target parameter value (including the heating time correction values ​​corresponding to each group of print points at each gray level) can be merged to obtain a heating time correction value corresponding to each target parameter value.

[0071] For example, taking the portion corresponding to the first group (1-144) dots in a test image with a 2-level grayscale as an example, the printer can be placed in a 30-degree Celsius constant temperature chamber, and a regulated power supply adjusted to 8.4V to simulate a fully charged battery for powering the test image. During the printing process, when printing the first group (1-144) in the test image according to the 2-level grayscale, controlling the print head heating for different durations can yield the printing results of the first group (1-144) dots under the 2-level grayscale at different heating durations, resulting in a set of printing results. This set of printing results is compared with the color of the 2-level grayscale in the standard color chart. The printing result that best matches the color of the standard color chart is found, and its corresponding heating duration is determined as the standard heating duration corresponding to the first group (1-144) dots under the 2-level grayscale, and recorded in the debugging benchmark table.

[0072] Based on the baseline calibration table, the parameter values ​​of the target device are changed, and printing is performed again. The values ​​in the calibration correction table are then determined based on the printing results. The process of determining the values ​​in the calibration correction table is similar to that of the baseline calibration table. For example, taking the baseline calibration table as an example where a regulated power supply is set to 8.4V to simulate a fully charged battery, a voltage of 8.4V indicates 100% charge. As the voltage gradually decreases from 100% to 5%, the previously used test images can be printed at levels 1 to 16. Based on the values ​​in the baseline calibration table, the heating time is gradually increased until the printed grayscale effect is compared with the standard 16-level color chart. When the effect is consistent, the amount of correction time required is recorded. The corresponding correction time is saved in the "Grayscale Charge Correction Table," resulting in a two-dimensional array table consisting of 16 grayscale levels and charge values ​​from 5% to 100% (i.e., the charge calibration correction table).

[0073] Taking the calibration benchmark table as an example, which is tested in a constant temperature chamber at 30 degrees Celsius, the grayscale temperature correction table uses 30 degrees Celsius as the dividing line. Below 30 degrees Celsius, the correction amount is increased; above 30 degrees Celsius, the correction amount is decreased. Temperatures exceeding 75 degrees Celsius are considered a high-temperature alarm value and printing is not performed; temperatures below 1 degree Celsius are considered a low-temperature protection value and printing is also not performed. By adjusting the constant temperature chamber, test images are printed at levels 1 to 16, adjusting the heating time by increasing or decreasing until the printed grayscale effect matches the standard 16-level color chart. When the effect is consistent, the amount of time to be increased or decreased is recorded. This correction amount is saved in the "Grayscale Power Correction Table," resulting in a two-dimensional array table (i.e., the temperature calibration correction table) consisting of 16 grayscale levels and temperatures ranging from 1°C to 75°C.

[0074] This embodiment generates a debugging benchmark table by keeping the parameter values ​​of the target device constant, and generates a debugging correction table by adjusting the parameter values ​​of the target device, which can improve the accuracy of information acquisition. At the same time, it eliminates the need to build mathematical models for printing effect prediction and to perform complex formulas and relational calculations for printing effect correction, thereby saving a lot of MCU resources and improving printing efficiency.

[0075] In one exemplary embodiment, while controlling the printing device to maintain the parameter value of the target device parameter unchanged, the printing component is heated for different durations based on each grayscale level to complete the printing of the test content, including:

[0076] S41, while keeping the target device parameter value unchanged, perform the following first printing operation for each grayscale level as the current grayscale level to obtain the printing result of each group of print points at each grayscale level:

[0077] Based on the current grayscale level, the heating time of the printing component is controlled to print each group of printing points separately, resulting in multiple printing results for each group of printing points under the current grayscale level. Each printing result of each group of printing points under the current grayscale level corresponds to a different heating time of the printing component.

[0078] In this embodiment, each group of print dots corresponds to a different range of print dots for the test print content. To obtain the print result of each group of print dots at each grayscale level, each grayscale level can be used as the current grayscale level, and each group of print dots at the current grayscale level can be used as the current group of print dots to perform the first print operation. That is, the heating duration of the printing component is controlled based on the current grayscale level to print the current print dot, resulting in multiple print results for the current print dot at the current grayscale level. Each print result of the current group of print dots at the current grayscale level corresponds to a different heating duration of the printing component. Correspondingly, the print result of each group of print dots at each grayscale level includes multiple print results of each group of print dots at each grayscale level.

[0079] This embodiment improves the reliability and convenience of generating the debugging benchmark table by performing multiple printings for different heating durations for each group of printing points under each gray level.

[0080] In one exemplary embodiment, the parameter values ​​of the target device parameters are adjusted from specified parameter values ​​to a set of target parameter values, and the heating duration of the printing component is controlled based on each target parameter value and each grayscale level in the set of target parameter values ​​to complete the printing of each set of print points, including:

[0081] S51, according to the specified step size, adjust the parameter values ​​of the target device parameters from the specified parameter values ​​to a target parameter value respectively, to obtain a set of target parameter values;

[0082] S52, based on each target parameter value and each gray level, controls the heating time of the printing component to complete the printing of each group of printing points, and obtains multiple printing results of each group of printing points corresponding to each target parameter value under each gray level. Among them, the different printing results of each group of printing points corresponding to each target parameter value under each gray level correspond to different heating times of the printing component.

[0083] In this embodiment, the parameter values ​​of the target device can be adjusted from specified parameter values ​​to individual target parameter values ​​according to a specified step size, resulting in a set of target parameter values. For example, the power level of the printing device can be gradually reduced from 100% to 5% in 5% steps, thus obtaining a set of target power values. As another example, using a constant temperature chamber, the device temperature of the printing device can be gradually increased from 30℃ to 75℃ and then gradually decreased to 1℃ in 1℃ steps, thus obtaining a set of target temperature values.

[0084] Based on each target parameter value and each grayscale level, the heating time of the printing component can be controlled to complete the printing of each group of printing points, resulting in multiple printing results for each group of printing points corresponding to each target parameter value at each grayscale level. The different printing results for each group of printing points corresponding to each target parameter value at each grayscale level correspond to different heating times of the printing component.

[0085] This embodiment demonstrates how adjusting the parameter values ​​of the target device according to a specified step size can improve the rationality and convenience of parameter value adjustment.

[0086] The generation process of the debugging baseline table and the debugging correction table is explained below with reference to optional examples. Among them, the debugging correction table includes a grayscale voltage calibration table (i.e., the power debugging correction table) and a grayscale temperature calibration table (i.e., the temperature debugging correction table).

[0087] like Figure 7 As shown, the process of generating the grayscale voltage calibration table, including the debugging correction table, may include the following steps:

[0088] Step S701, Start debugging;

[0089] Step S702: Set the constant temperature of the constant temperature chamber to 30℃ and the constant power supply voltage to 8.4V.

[0090] Step S703: Print right triangle images (i.e., test images) according to order 1 to 16.

[0091] Step S704: Compare the printing effect with the standard color chart to determine the debugging benchmark table;

[0092] Step S705: Adjust the constant power supply voltage range to 5% to 100%;

[0093] Step S706: Print right triangle images according to order 1 to 16;

[0094] Step S707: Compare the printing effect with the standard color chart and determine the grayscale voltage calibration table;

[0095] Step S708: Adjust the constant temperature to 1℃~75℃;

[0096] Step S709: Print right triangle images according to order 1 to 16;

[0097] Step S710: Compare the printing effect with the standard color chart and determine the grayscale temperature calibration table;

[0098] Step S711, debugging complete.

[0099] In one exemplary embodiment, the printing component of the printing device is controlled to heat the printable dots corresponding to each grayscale level according to a target heating duration corresponding to each grayscale level, in order to complete the printing of the content to be printed, including:

[0100] S61, following the order of grayscale levels from low to high, sequentially use each grayscale level as the current grayscale level and perform the following second printing operation to complete the printing of the content to be printed:

[0101] The printing unit controls the heating of each point in the content to be printed, corresponding to the current grayscale level, according to the target heating time corresponding to the current grayscale level, until all points corresponding to the current grayscale level are printed.

[0102] In this embodiment, printable dots of the same grayscale level can be printed continuously. That is, during each line of printing, after all printable dots of one grayscale level are heated, all printable dots of another grayscale level are heated, and so on, until all printable dots are printed. To achieve this, each grayscale level can be used as the current grayscale level for the second printing operation. Specifically, the printing unit is controlled to heat each printable dot corresponding to the current grayscale level in the content to be printed according to the target heating time corresponding to the current grayscale level, thereby completing the printing of all printable dots corresponding to the current grayscale level, until all printable dots corresponding to the current grayscale level are printed.

[0103] Optionally, the points to be printed at each gray level can be printed sequentially in order of gray level from low to high, or in order of gray level from high to low, or in any other order.

[0104] For example, when printing each line, the first-order points are heated first, then the second-order points are heated, and so on until all 16 orders are heated. The number of points in each order will result in different heating times.

[0105] In this embodiment, each grayscale level is printed sequentially to the corresponding printable point, which can improve the thermal printing effect and avoid affecting the lifespan of the printing equipment due to frequent switching of printing parameters (e.g., heating time).

[0106] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0107] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware servers. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0108] According to another aspect of the embodiments of this application, a thermal printing apparatus for implementing the above-described thermal printing method is also provided, which can be applied to smart devices. Figure 8 This is a structural block diagram of an optional thermal printing apparatus according to an embodiment of this application, such as... Figure 8 As shown, the device may include:

[0109] The first determining unit is used to determine the gray level corresponding to each printable point in the content to be printed in a preset set of gray level levels, and to determine the number of printable points corresponding to each gray level in the set of gray level levels, wherein the number of printable points corresponding to each gray level is the number of printable points in the content to be printed, where the corresponding gray level is the number of printable points for each gray level.

[0110] The second determining unit is used to determine the target heating time corresponding to each gray level based on the current parameter value of the target device parameter of the printing device, the number of print dots corresponding to each gray level, and the preset debugging table. The target device parameter is used to represent the operating status of the printing device, and the preset debugging table is used to record the heating time corresponding to different gray levels, different print dots, and different parameter values ​​of the target device parameter.

[0111] The control unit is used to control the printing component of the printing device to heat the printable point corresponding to each grayscale level according to the target heating time corresponding to each grayscale level, so as to complete the printing of the content to be printed.

[0112] This application embodiment determines the grayscale level corresponding to each printable point in the content to be printed from a preset set of grayscale levels, and determines the number of printable points corresponding to each grayscale level in the set of grayscale levels. The number of printable points corresponding to each grayscale level is the number of printable points in the content to be printed corresponding to each grayscale level. Based on the current parameter values ​​of the target device parameters of the printing device, the number of printable points corresponding to each grayscale level, and a preset debugging table, a target heating time corresponding to each grayscale level is determined. The target device parameters represent the operating status of the printing device, and the preset debugging table records the heating time corresponding to different grayscale levels, different numbers of printable points, and different parameter values ​​of the target device parameters. The printing component of the printing device is controlled to heat the printable points corresponding to each grayscale level according to the target heating time, thereby completing the printing of the content to be printed. This solves the problem of poor printing effect in related thermal printing methods and improves printing quality.

[0113] In an exemplary embodiment, the preset debugging table includes a debugging baseline table and a debugging correction table. The debugging baseline table is used to record the standard heating time corresponding to different grayscale levels and different print dots, and the debugging correction table is used to record the heating time correction value corresponding to different parameter values ​​of the target device parameters.

[0114] Correspondingly, the second determining unit includes:

[0115] The first lookup module is used to look up the debugging benchmark table based on the number of print dots corresponding to each gray level, and obtain the standard heating time corresponding to each gray level.

[0116] The second lookup module is used to look up the debugging correction table based on the current parameter values ​​of the target device parameters to obtain the target heating time correction value;

[0117] The correction module is used to correct the standard heating time corresponding to each gray level using the target heating time correction value, so as to obtain the target heating time corresponding to each gray level.

[0118] In one exemplary embodiment, the target device parameters include power parameters and temperature parameters, and the adjustment correction table includes a power adjustment correction table and a temperature adjustment correction table.

[0119] Correspondingly, the second search module includes:

[0120] The first lookup submodule is used to look up the first heating duration correction value corresponding to the current parameter value of the power parameter in the power adjustment correction table;

[0121] The second lookup submodule is used to look up the second heating duration correction value corresponding to the current parameter value of the power parameter in the temperature adjustment correction table;

[0122] The determination submodule is used to determine the target heating time correction value by summing the first heating time correction value and the second heating time correction value.

[0123] In one exemplary embodiment, the above-described apparatus further includes:

[0124] The first execution unit is used to control the printing device to keep the parameter value of the target device parameter unchanged before determining the target heating time corresponding to each gray level according to the current parameter value of the target device parameter of the printing device, the number of printing dots corresponding to each gray level and the preset debugging table, and to control the printing component to heat for different durations based on each gray level to complete the printing of test printing content. The test printing content includes multiple sets of printing dots, and the number of printing dots in each set of printing dots is different from each other.

[0125] The second execution unit is used to determine the standard heating time for each group of print points under each gray level, based on the heating time corresponding to the print result that matches the color of the standard color scale card for each gray level, and to generate a debugging benchmark table based on the standard heating time for each group of print points under each gray level.

[0126] The third execution unit is used to adjust the parameter values ​​of the target device parameters from the specified parameter values ​​to a set of target parameter values, and control the heating duration of the printing component based on each target parameter value and each grayscale level in the set of target parameter values ​​to complete the printing of each set of printing points;

[0127] The fourth execution unit is used to determine the heating time corresponding to the printing result that matches the color of the standard color chart for each gray level in each group of printing points corresponding to each target parameter value at each gray level, and to generate an adjustment correction table based on the standard heating time of each group of printing points at each gray level and the reference heating time of each group of printing points corresponding to each target parameter value at each gray level.

[0128] In one exemplary embodiment, the first execution unit includes:

[0129] The first execution module is used to perform the following first printing operation on each grayscale level as the current grayscale level, while keeping the target device parameters unchanged at the specified parameter values, to obtain the printing result of each group of print points at each grayscale level:

[0130] The printing module is used to control the heating time of the printing component based on the current grayscale level, so as to print each group of printing points separately and obtain multiple printing results for each group of printing points under the current grayscale level. Each printing result of each group of printing points under the current grayscale level corresponds to a different heating time of the printing component, and each group of printing points corresponds to a different printing point range of the test printing content.

[0131] In one exemplary embodiment, the third execution unit includes:

[0132] The adjustment module is used to adjust the parameter values ​​of the target device parameters from specified parameter values ​​to a target parameter value according to a specified step size, thereby obtaining a set of target parameter values;

[0133] The second execution module is used to control the heating duration of the printing component based on each target parameter value and each gray level to complete the printing of each group of printing points, and to obtain multiple printing results of each group of printing points corresponding to each target parameter value under each gray level. The different printing results of each group of printing points corresponding to each target parameter value under each gray level correspond to different heating durations of the printing component.

[0134] In one exemplary embodiment, the control unit includes:

[0135] The third execution module is used to sequentially execute the second printing operation, treating each grayscale level as the current grayscale level in ascending order, to complete the printing of the content to be printed:

[0136] The printing unit controls the heating of each point in the content to be printed, corresponding to the current grayscale level, according to the target heating time corresponding to the current grayscale level, until all points corresponding to the current grayscale level are printed.

[0137] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should also be noted that the above modules, as part of a device, can operate in environments such as... Figure 1 The hardware environment shown can be implemented through software or hardware, and the hardware environment includes the network environment.

[0138] According to another aspect of the embodiments of this application, a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to execute program code for any of the thermal printing methods described in the embodiments of this application.

[0139] Optionally, in this embodiment, the storage medium may be located on at least one of the network devices in the network shown in the above embodiment.

[0140] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:

[0141] S1, determine the target grayscale level of the content to be printed at the current moment, and determine the target number of printable dots in the content to be printed corresponding to the target grayscale level;

[0142] S2, obtain the target physical parameters of the printer at the current moment, where the target physical parameters represent the printer's operating status;

[0143] S3 determines the target heating time corresponding to the content to be printed based on the target grayscale, target number of print dots, target physical parameters, and preset debugging table, and controls the heating state of the printer head according to the target heating time to complete the printing of the content to be printed. The preset debugging table includes the heating time corresponding to different grayscale, different number of print dots, and different physical parameters.

[0144] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated in this embodiment.

[0145] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, ROMs, RAMs, portable hard drives, magnetic disks, or optical disks.

[0146] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described thermal printing method is also provided. The electronic device may be a smart device, a server, a terminal, or a combination thereof.

[0147] Figure 9 This is a structural block diagram of an optional electronic device according to an embodiment of this application, such as... Figure 9 As shown, it includes a processor 902, a communication interface 904, a memory 906, and a communication bus 908. The processor 902, communication interface 904, and memory 906 communicate with each other via the communication bus 908.

[0148] Memory 906 is used to store computer programs;

[0149] When processor 902 executes a computer program stored in memory 906, it performs the following steps:

[0150] S1, determine the target grayscale level of the content to be printed at the current moment, and determine the target number of printable dots in the content to be printed corresponding to the target grayscale level;

[0151] S2, obtain the target physical parameters of the printer at the current moment, where the target physical parameters represent the printer's operating status;

[0152] S3 determines the target heating time corresponding to the content to be printed based on the target grayscale, target number of print dots, target physical parameters, and preset debugging table, and controls the heating state of the printer head according to the target heating time to complete the printing of the content to be printed. The preset debugging table includes the heating time corresponding to different grayscale, different number of print dots, and different physical parameters.

[0153] Optionally, the communication bus can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 9 The symbol is represented by a single thick line, but this does not indicate that there is only one bus or one type of bus. The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0154] The memory may include RAM, or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0155] As an example, the memory 906 described above may include, but is not limited to, the first determining unit 802, the acquiring unit 804, and the second determining unit 806 in the thermal printing device described above. Furthermore, it may include, but is not limited to, other module units in the thermal printing device described above, which will not be elaborated upon in this example.

[0156] The processors mentioned above can be general-purpose processors, including but not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; they can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0157] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.

[0158] Those skilled in the art will understand that Figure 9 The structure shown is for illustrative purposes only. The device that implements the above thermal printing method can be a terminal device, such as a smartphone (e.g., Android phone, iOS phone), tablet computer, PDA, mobile Internet Devices (MID), PAD, etc. Figure 9 This does not limit the structure of the aforementioned electronic devices. For example, the electronic device may also include components that are more... Figure 9 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 9 The different configurations shown.

[0159] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, ROM, RAM, disk or optical disk, etc.

[0160] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0161] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0162] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0163] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.

[0164] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the solution provided in this embodiment, depending on actual needs.

[0165] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or at least two units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0166] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A thermal printing method, characterized in that, include: Determine the grayscale level corresponding to each printable point in the content to be printed from a preset set of grayscale levels, and determine the number of printable points corresponding to each grayscale level in the set of grayscale levels, wherein the number of printable points corresponding to each grayscale level is the number of printable points in the content to be printed with the corresponding grayscale level being the grayscale level of each grayscale level. Based on the current parameter values ​​of the target device parameters of the printing device, the number of print dots corresponding to each gray level, and the preset debugging table, the target heating time corresponding to each gray level is determined. The target device parameters are used to represent the operating status of the printing device, and the preset debugging table is used to record the heating time corresponding to different gray levels, different print dots, and different parameter values ​​of the target device parameters. The printing component of the printing device is controlled to heat the printable point corresponding to each grayscale level according to the target heating time, so as to complete the printing of the content to be printed.

2. The method according to claim 1, characterized in that, The preset debugging table includes a debugging benchmark table and a debugging correction table. The debugging benchmark table is used to record the standard heating time corresponding to different gray levels and different printing dots. The debugging correction table is used to record the heating time correction value corresponding to different parameter values ​​of the target device. The step of determining the target heating time corresponding to each grayscale level based on the current parameter values ​​of the target equipment parameters of the printing device, the number of print dots corresponding to each grayscale level, and a preset debugging table includes: The standard heating time corresponding to each gray level is obtained by looking up the debugging benchmark table based on the number of print dots corresponding to each gray level. The target heating time correction value is obtained by looking up the debugging correction table based on the current parameter value of the target device parameter; The standard heating time corresponding to each gray level is corrected using the target heating time correction value to obtain the target heating time corresponding to each gray level.

3. The method according to claim 2, characterized in that, The target device parameters include power parameters and temperature parameters, and the adjustment correction table includes a power adjustment correction table and a temperature adjustment correction table; The step of looking up the adjustment correction table based on the current parameter value of the target device parameters to obtain the target heating time correction value includes: Find the first heating duration correction value corresponding to the current parameter value of the power parameter in the power adjustment correction table; Find the second heating time correction value corresponding to the current parameter value of the temperature parameter in the temperature adjustment correction table; The sum of the first heating time correction value and the second heating time correction value is determined as the target heating time correction value.

4. The method according to claim 2, characterized in that, Before determining the target heating time corresponding to each grayscale level based on the current parameter values ​​of the target device parameters of the printing device, the number of print dots corresponding to each grayscale level, and a preset debugging table, the method further includes: While controlling the printing device to keep the parameter value of the target device parameter unchanged, the printing component is heated for different durations based on each gray level to complete the printing of test printing content. The test printing content includes multiple sets of printing points, and the number of printing points in each set of printing points is different. The heating time corresponding to the printing result that matches the color of the standard color chart for each gray level is determined as the standard heating time for each group of printing points at each gray level, and the debugging benchmark table is generated based on the standard heating time for each group of printing points at each gray level. The parameter values ​​of the target device parameters are adjusted from the specified parameter values ​​to a set of target parameter values, and the heating duration of the printing component is controlled based on each target parameter value in the set of target parameter values ​​and each gray level to complete the printing of each set of printing points; The heating time corresponding to the printing result that matches the color of the standard color chart for each grayscale level is determined as the reference heating time for each group of printing points corresponding to each target parameter value at each grayscale level. The debugging correction table is generated based on the standard heating time for each group of printing points at each grayscale level and the reference heating time for each group of printing points corresponding to each target parameter value at each grayscale level.

5. The method according to claim 4, characterized in that, The step of controlling the printing device to maintain the parameter value of the target device at a specified parameter value, and controlling the heating duration of the printing component for different durations based on each grayscale level to complete the printing of the test content, includes: While keeping the target device parameter value unchanged, the printing device performs the following first printing operation with each grayscale level as the current grayscale level to obtain the printing result of each group of print points at each grayscale level: Based on the current grayscale level, the heating duration of the printing component is controlled to print each group of printing points separately, resulting in multiple printing results for each group of printing points under the current grayscale level. Each printing result of each group of printing points under the current grayscale level corresponds to a different heating duration of the printing component, and each group of printing points corresponds to a different range of printing points for the test printing content.

6. The method according to claim 5, characterized in that, The step of adjusting the parameter values ​​of the target device parameters from the specified parameter values ​​to a set of target parameter values, and controlling the heating duration of the printing component for different durations based on each target parameter value in the set of target parameter values ​​and each grayscale level to complete the printing of each set of print points, includes: According to a specified step size, the parameter values ​​of the target device parameters are adjusted from the specified parameter values ​​to a target parameter value, respectively, to obtain the set of target parameter values; Based on each target parameter value and each grayscale level, the printing component is heated for different durations to complete the printing of each group of printing points, resulting in multiple printing results for each group of printing points corresponding to each target parameter value at each grayscale level. The different printing results for each group of printing points corresponding to each target parameter value at each grayscale level correspond to different heating durations of the printing component.

7. The method according to any one of claims 1 to 6, characterized in that, The step of controlling the printing component of the printing device to heat the printable point corresponding to each grayscale level according to the target heating time corresponding to each grayscale level, so as to complete the printing of the content to be printed, includes: The following second printing operation is performed sequentially, using each grayscale level as the current grayscale level, in order of increasing grayscale level, to complete the printing of the content to be printed: The printing component is controlled to heat each printable point in the content to be printed, corresponding to the current grayscale level, according to the target heating duration corresponding to the current grayscale level, until the printing of all printable points corresponding to the current grayscale level is completed.

8. A thermal printing device, characterized in that, include: The first determining unit is used to determine the gray level corresponding to each printable point in the content to be printed in a preset set of gray level levels, and to determine the number of printable points corresponding to each gray level in the set of gray level levels, wherein the number of printable points corresponding to each gray level is the number of printable points in the content to be printed with the corresponding gray level being each gray level. The second determining unit is used to determine the target heating time corresponding to each gray level based on the current parameter value of the target device parameter of the printing device, the number of print dots corresponding to each gray level, and a preset debugging table. The target device parameter is used to represent the operating status of the printing device, and the preset debugging table is used to record the heating time corresponding to different gray levels, different print dots, and different parameter values ​​of the target device parameter. The control unit is used to control the printing component of the printing device to heat the printable point corresponding to each grayscale level according to the target heating time corresponding to each grayscale level, so as to complete the printing of the content to be printed.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.