A method and device for realizing thermal printing

By optimizing the heating and motor control of the thermal printer, and by performing the heating and driving motor processes in parallel, the problems of slow printing speed and font deformation in the prior art are solved, and the printing efficiency and effect are improved.

CN118885140BActive Publication Date: 2024-12-24FEITIAN TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411365628.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2024-12-24
Estimated Expiration
2044-09-29

AI Technical Summary

Technical Problem

Due to the insync of heating and motor control in existing thermal printers, the printing speed is slow, the font is deformed, and the printing effect is poor.

Method used

By obtaining the information to be printed and the number of points to be carried out, determining the number of printing times and the number of points to be printed for each printing, calculating the heating time and motor stepping time required for each printing, performing the heating, driving the motor and stop heating processes in parallel, and optimizing the execution time of the sub-process Improve printing efficiency.

Benefits of technology

It solves the problems of font stretching and compression, improves printing efficiency and effect, and improves printing quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118885140B_ABST
    Figure CN118885140B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for realizing thermal printing, the method comprising: determining the number of prints and the heating time required for printing according to the current information to be printed, determining the sub-process to be executed for printing the current information to be printed and the sub-process execution time according to the number of prints, the motor stepping time and the heating time required for the current printing, the sub-process comprising a heating process, a heating stop process and a motor driving process, the sub-process execution time comprising a sub-process execution start time and a sub-process execution duration, executing each sub-process in parallel according to the determined sub-process execution time to complete the printing operation, the adoption of the scheme of the present invention solves the problems of low printing efficiency and font stretching and compression in the prior art, improves printing efficiency and enhances printing effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of printing technology, and in particular to a method and device for realizing thermal printing. Background Art

[0002] Thermal printers are currently the most commonly used printing equipment for bill printing. Thermal printers have no consumables and have a fast printing speed. At present, due to the limitation of printing current, portable thermal printers on the market usually use segmented heating, with a fixed number of dots heated each time. The data for printing half a dot line needs to be transmitted to the printer multiple times. Generally, multiple timers are used to control the print head to feed and heat the paper in sequence or independently. However, this method of controlling the paper feeding and heating process with multiple timers has the problems of slow printing speed, discontinuous motor rotation, and deformation of the printed font (stretched or compressed font), resulting in poor printing effect. Summary of the invention

[0003] In order to solve the above technical problems, the present invention provides a method and device for realizing thermal printing. The technical solution is as follows:

[0004] According to a first aspect of the present invention, the present invention provides a method for implementing thermal printing, the method comprising:

[0005] Step S1, obtaining the current information to be printed and the printing tolerance points;

[0006] Step S2, determining the number of prints and the number of print dots each time according to the print tolerance points and the current information to be printed;

[0007] Step S3, determining the heating time required for each printing according to the number of dots printed each time, and obtaining the motor stepping time;

[0008] Step S4, determining the sub-process to be executed for printing the current information to be printed and the sub-process execution time according to the number of prints, the motor stepping time, and the heating time required for each print, wherein the sub-process includes a heating process, a heating stop process, and a motor driving process, and the sub-process execution time includes a sub-process execution start time and a sub-process execution duration;

[0009] Step S5: executing each sub-process in parallel according to the determined sub-process execution time to complete the printing operation.

[0010] According to a second aspect of the present invention, an embodiment of the present invention provides a device for implementing thermal printing, characterized in that the device comprises:

[0011] The acquisition module is used to obtain the current information to be printed and the number of printing points;

[0012] The first determination module is used to determine the number of prints and the number of print points each time according to the number of print points and the current information to be printed;

[0013] The second determination module is used to determine the heating time required for each printing according to the number of dots printed each time, and obtain the motor step time;

[0014] A third determination module is used to determine the sub-process to be executed for printing the current information to be printed and the sub-process execution time according to the number of prints, the motor step time, and the heating time required for each print, wherein the sub-process includes a heating process, a heating stop process, and a motor driving process, and the sub-process execution time includes a sub-process execution start time and a sub-process execution duration;

[0015] The execution module is used to execute each sub-process in parallel according to the determined sub-process execution time to complete the printing operation.

[0016] According to a third aspect of the present invention, an embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement a method for thermal printing described in the first aspect above.

[0017] According to a fourth aspect of the present invention, an embodiment of the present invention provides a computer-readable storage medium having a computer program / instruction stored thereon, wherein the computer program / instruction, when executed by a processor, implements a method for implementing thermal printing as described in the first aspect above.

[0018] According to a fifth aspect of the present invention, an embodiment of the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements a method for implementing thermal printing as described in the first aspect above.

[0019] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0020] The present invention provides a method and device for realizing thermal printing. In the technical solution of the present invention, the number of printable dots and the number of prints, as well as the heating time for each print are obtained according to the information to be printed. The sub-process to be executed for printing the current information to be printed and the sub-process execution time are determined according to the motor stepping time, the number of prints, the heating time required for printing, and the accumulated statistical time. According to the determined sub-process execution time, heating, driving the motor and stopping the heating process are executed in parallel during the entire printing process to complete the printing operation, thereby solving the problems of low printing efficiency and font stretching and compression caused by asynchronous heating and motor in the prior art, thereby improving printing efficiency and enhancing printing effect. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 This is a schematic flow chart of a method for implementing thermal printing provided by Embodiment 1 of the present invention;

[0023] Figure 2 This is a schematic flow chart of a method for implementing thermal printing provided by Embodiment 2 of the present invention;

[0024] Figure 3 This is a schematic flow chart of a method for implementing thermal printing provided by Embodiment 2 of the present invention;

[0025] Figure 4 It is a schematic diagram of the implementation process of determining the sub-process to be executed for the current information to be printed and the sub-process execution time in the method for implementing thermal printing provided by the second embodiment of the present invention;

[0026] Figure 5 It is a signal diagram of the printer provided in the second embodiment of the present invention when printing dot row data in the constructed printing paper feeding heating table;

[0027] Figure 6 This is a comparison diagram of the thermal printing achieved by the technical solution of the present invention provided in Example 2 of the present invention and the thermal printing achieved by the prior art. DETAILED DESCRIPTION

[0028] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0029] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are only examples of devices and methods consistent with some aspects of the present invention as detailed in the attached claims.

[0030] At present, the working principle of thermal printers is: heating elements are installed at different positions on the print head of the thermal printer, and the control circuit can control the heating elements at different positions of the print head to be energized. When a certain current passes through the heating elements, high temperature will be generated quickly. When the coating of the thermal paper encounters the energized heating elements, the temperature will rise in a very short time, and the coating on the thermal paper will undergo a chemical reaction to show color. Then the control circuit controls the motor to rotate so that the print head contacts other parts of the thermal printing paper (that is, controls the motor to feed the paper), and then prints a complete graphic on the entire thermal paper.

[0031] For example, if a thermal printer energizes one heating element, it is equivalent to heating one dot (i.e. printing one ink dot). If a thermal printer energizes multiple heating elements at the same time, it is equivalent to heating multiple dots at the same time (i.e. printing multiple ink dots). The power and time required for heating each dot are determined by the power supply voltage, ambient temperature, and heating element (such as heating resistor). Since the actual power supply is limited, the number of dots that can be heated at the same time is limited.

[0032] In one example, under normal circumstances, due to the limitation of printing current, thermal printers usually heat in segments, heating a fixed number of dots each time, and the data for printing half a dot row needs to be transmitted to the printer multiple times. The paper feeding and heating process is performed sequentially or independently through multiple timers. However, in this control method using multiple timers, if the paper feeding and heating process is performed sequentially, there will be problems such as slow printing speed and discontinuous motor rotation. If the paper feeding and heating process is performed independently, the printed fonts will be deformed (elongated or compressed) and the printing effect will be poor.

[0033] To make the objectives, technical solutions and advantages of the present invention more clear, a method for implementing thermal printing provided by an embodiment of the present invention will be described in detail below with reference to the accompanying drawings.

[0034] Embodiment 1

[0035] Embodiment 1 of the present invention provides a method for implementing thermal printing, such as Figure 1 As shown, the method includes:

[0036] Step 101, obtaining the current information to be printed and the printing tolerance points;

[0037] Step 102, determining the number of prints and the number of print points each time according to the print tolerance points and the current information to be printed;

[0038] Step 103, determine the heating time required for each printing according to the number of dots printed each time, and obtain the motor stepping time;

[0039] Step 104, determining the sub-process to be executed for printing the current information to be printed and the sub-process execution time according to the number of prints, the motor step time, and the heating time required for each print, wherein the sub-process includes the heating process, the heating stop process, and the motor driving process, and the sub-process execution time includes the sub-process execution start time and the sub-process execution duration;

[0040] Step 105: Execute each sub-process in parallel according to the determined sub-process execution time to complete the printing operation.

[0041] An implementable method, before step 103, also includes: determining whether the current information to be printed is an empty data row, if so, obtaining the motor stepping time, determining that the sub-process to be executed for printing the current information to be printed is a driving motor process, the execution time of the driving motor process is the motor stepping time, executing the driving motor process according to the motor stepping time to complete the printing operation, otherwise executing step 103.

[0042] An implementable method is to determine the sub-process to be executed for printing the current information to be printed and the sub-process execution time according to the number of prints, the motor step time, and the heating time required for each print, specifically including:

[0043] Step 1041, setting the current cumulative heating time and the current cumulative statistical printing times to be first preset values, determining that the executed sub-process includes a motor driving process, determining the execution start time of the motor driving process to be the first preset value, and determining the execution duration of the motor driving process to be the motor step time;

[0044] Step 1042, determining whether the current cumulative statistical printing times is the printing times determined by the current information to be printed, if yes, executing step 1044, otherwise executing step 1043;

[0045] Step 1043: determine whether the current printing meets the first condition according to the current cumulative heating time and the motor stepping time, and determine the subprocess to be executed for the current printing and the execution time of the subprocess according to the determination result, update the current cumulative heating time and the current cumulative statistical printing times, and return to step 1042;

[0046] Step 1044, determine whether the current printing meets the second condition based on the current cumulative heating time and the motor stepping time, and determine the sub-process to be executed for the current printing and the execution time of the sub-process based on the determination result, and end.

[0047] Specifically, the motor step time includes the first step time of the motor and the second step time of the motor. Determining whether the current printing meets the first condition according to the current heating cumulative time and the motor step time is specifically as follows: judging whether the current heating cumulative time is less than the first step time of the motor and whether the sum of the current heating cumulative time and the heating time required for the current printing is greater than the first step time of the motor. If so, the first condition is met, otherwise, the first condition is not met;

[0048] The determination result is specifically that the first condition is met, and the sub-process to be executed for the current printing and the execution time of the sub-process are determined according to the determination result, specifically including: determining that the sub-process to be executed for the current printing includes a heating process and a driving motor process, the execution start time of the heating process is the current heating cumulative time point, determining the execution duration of the heating process is the heating time required for the current printing, determining the execution start time of the driving motor process is the end time point of the first step time of the motor, determining the execution duration of the driving motor process is the second step time of the motor, updating the current heating cumulative time to the heating time required for the current printing, and updating the current cumulative statistical printing times;

[0049] Among them, the determination result is specifically that the first condition is not met, and the sub-process to be executed for the current printing and the execution time of the sub-process are determined based on the determination result, specifically including: determining that the sub-process to be executed for the current printing includes a heating process, determining that the execution start time of the heating process is the current heating cumulative time point, the execution duration is the heating time required for the current printing, updating the current heating cumulative time to the heating time required for the current printing, and updating the current cumulative statistical print times.

[0050] Specifically, the motor step time includes the first step time of the motor and the second step time of the motor. Determining whether the current printing meets the second condition according to the current cumulative heating time and the motor step time is specifically as follows: determining whether the current cumulative heating time is less than the first step time of the motor, if so, the second condition is met, otherwise, the second condition is not met;

[0051] The determination result is specifically that the second condition is met, and determining the sub-process to be executed for the current printing and the execution time of the sub-process according to the determination result specifically includes: determining that the sub-process to be executed for the current printing includes a stop heating process and a drive motor process, determining the execution start time of the stop heating process to be the current heating cumulative time point, and the execution duration is the difference between the first step time of the motor and the current heating cumulative time, determining the execution start time of the drive motor process to be the end time point of the first step time of the motor, and determining the execution duration of the drive motor process to be the second step time of the motor;

[0052] Among them, the determination result is specifically that the second condition is not met, and the sub-process to be executed for the current printing and the execution time of the sub-process are determined based on the determination result, specifically including: determining that the sub-process to be executed for the current printing includes stopping the heating process, determining the execution start time of the stopping heating process to be the current heating accumulated time point, and the execution duration is the difference between the sum of the motor's first step time and the motor's second step time and the current heating accumulated time.

[0053] In one practicable manner, step 105 specifically includes:

[0054] Step 1051: Obtain the sub-process that is executed for the first time as the current sub-process according to the sub-process start execution time, and send a corresponding execution signal according to the current sub-process;

[0055] Step 1052, determining a sub-process to be executed when the execution duration of the sub-process corresponding to the current sub-process is completed;

[0056] Step 1053, taking the subprocess to be executed as the current subprocess, and determining whether the current subprocess includes a heating process, if yes, the heating process does not send an execution signal, and other subprocesses send corresponding execution signals, and executing step 1054, otherwise, the corresponding execution signal is sent according to the current subprocess, and executing step 1054;

[0057] Step 1054: when the execution duration of the current sub-process is completed, determine whether there is a sub-process to be executed. If yes, determine the sub-process to be executed and execute step 1053; otherwise, the printing of the current information to be printed is completed.

[0058] Specifically, the execution signal corresponding to the motor driving process is the first signal, the execution signal corresponding to the heating process is the second signal, and the execution signal corresponding to the heating process stopping is the third signal;

[0059] Sending the corresponding execution signal according to the current sub-process is specifically: if the current sub-process is a motor driving process, sending a first signal; if the current sub-process is a heating process, sending a second signal; if the current sub-process is a heating stop process, sending a third signal.

[0060] Furthermore, the first signal is specifically: a signal for driving the motor to change phase and feed paper;

[0061] The second signal is specifically: a signal for controlling the print head to start heating;

[0062] The third signal is specifically a signal for controlling the print head to stop heating.

[0063] In this embodiment, the execution time of each sub-process may overlap during the execution process, and each sub-process is performed synchronously in the overlapping time portion.

[0064] Embodiment 2

[0065] Embodiment 2 of the present invention provides a method for implementing thermal printing, such as Figure 2 and Figure 3 As shown,

[0066] Step 201, receiving a printing instruction, obtaining data to be printed and the number of printing points;

[0067] In this embodiment, the execution subject is a printer, specifically a thermal printer device, or a terminal device with a thermal printing function;

[0068] In this embodiment, the number of dots that the printer can withstand is determined by the stable electric power provided by the hardware to the thermal print head. Due to the limitations of the printer performance and paper, the number of dots that the printer can withstand will be different. For example, the number of dots that the printer can withstand for each dot line of data is 384 dots or 600+ dots. In the present invention, the number of dots that the printer can withstand is preset in advance, specifically a second preset value, which is less than 384. For example, the second preset value is 192.

[0069] Step 202: converting the data to be printed into a two-dimensional dot matrix pattern, and taking the first line of information in the two-dimensional dot matrix pattern as the current information to be printed;

[0070] In this embodiment, step 202 further includes: determining whether the current information to be printed is an empty data row, if yes, obtaining the motor stepping time, determining that the sub-process to be executed for printing the current information to be printed is a driving motor process, the execution time of the driving motor process is the motor stepping time, executing the driving motor process to complete the printing operation of the current information to be printed, otherwise executing step 203;

[0071] The embodiment of the present invention mainly describes the case where the information to be printed contains black dot row data. Heating is involved only when black dot row data exists. If it is an empty data row, heating is not involved, and only the motor drives the turntable to feed the paper.

[0072] In this embodiment, the first line of information may be full-dot line data or half-dot line data.

[0073] Step 203, determining the number of prints and the number of print points each time according to the print tolerance points and the current information to be printed;

[0074] For example, if the number of print dots corresponding to the current information to be printed is 384, and the printed dot row is a full black dot row, one dot row needs to print an upper half dot row and a lower half dot row, the upper half dot row is printed twice, and 192 dots are printed at a time.

[0075] Step 204, determine the heating time required for each printing according to the number of dots printed each time, and obtain the motor stepping time;

[0076] In this embodiment, the time required for heating each point is calculated by the power supply voltage, the ambient temperature, the heating element (such as a heating resistor), and the heat energy required for the heating point;

[0077] For example, the time S for heating 192 black spots each time is calculated to be 387 us.

[0078] Step 205, determining the sub-process to be executed for printing the current information to be printed and the sub-process execution time according to the number of prints, the motor step time, and the heating time required for each print, wherein the sub-process includes the heating process, the heating stop process, and the motor driving process, and the sub-process execution time includes the sub-process execution start time and the sub-process execution duration;

[0079] In this embodiment, the motor stepper motor can be 1-1 phase or 1-2 phase;

[0080] Specifically, the stepping time of the motor is related to the motor driving pulse rate, and the cumulative statistical time is related to the heating time of the point line data.

[0081] One possible way is to Figure 3 As shown, step 205 is specifically as follows:

[0082] Step 301, setting the current cumulative heating time and the current cumulative statistical printing times to be first preset values, determining that the executed sub-process includes a driving motor process, determining the execution start time of the driving motor process to be the first preset value, and determining the execution duration of the driving motor process to be the motor step time;

[0083] Step 302, determine whether the current cumulative statistical printing times is the printing times corresponding to the current information to be printed, if yes, execute step 304, otherwise execute step 303;

[0084] Step 303: determine whether the current printing meets the first condition according to the current cumulative heating time and the motor stepping time, determine the subprocess to be executed for the current printing and the execution time of the subprocess according to the determination result, update the current cumulative heating time and the current cumulative statistical printing times, and return to step 302;

[0085] In this embodiment, the stepping time of the motor includes the first stepping time of the motor and the second stepping time of the motor;

[0086] In one practicable manner, determining whether the current printing meets the first condition according to the current heating cumulative time and the motor step time is specifically as follows: determining whether the current heating cumulative time is less than the first step time of the motor and whether the sum of the current heating cumulative time and the heating time required for the current printing is greater than the first step time of the motor, if so, the first condition is met, otherwise, the first condition is not met;

[0087] Specifically, the determination result is specifically that the first condition is met, and the sub-process to be executed for the current printing and the execution time of the sub-process are determined according to the determination result, specifically including: determining that the sub-process to be executed for the current printing includes a heating process and a driving motor process, determining the execution start time of the heating process to be the current heating cumulative time point, determining the execution duration of the heating process to be the heating time required for the current printing, determining the execution start time of the driving motor process to be the end time point of the first step time of the motor, determining the execution duration of the driving motor process to be the second step time of the motor, updating the current heating cumulative time to be the heating time required for the current printing, and updating the current cumulative statistical printing times;

[0088] Specifically, the determination result is that the first condition is not met, and determining the sub-process to be executed for the current printing and the execution time of the sub-process according to the determination result specifically includes: determining that the sub-process to be executed for the current printing includes a heating process, determining the execution start time of the heating process to be the current heating cumulative time point, determining the execution duration of the heating process to be the heating time required for the current printing, updating the current heating cumulative time to be the heating time required for the current printing, and updating the current cumulative statistical printing times;

[0089] Step 304, determine whether the current printing meets the second condition based on the current cumulative heating time and the motor stepping time, determine the sub-process to be executed for the current printing and the execution time of the sub-process based on the determination result, and end.

[0090] In this embodiment, the stepping time of the motor includes the first stepping time of the motor and the second stepping time of the motor;

[0091] In one practicable manner, determining whether the current printing meets the second condition according to the current heating cumulative time and the motor stepping time is specifically as follows: determining whether the current heating cumulative time is less than the motor first stepping time, if so, the second condition is met, otherwise, the second condition is not met;

[0092] Specifically, the determination result specifically meets the second condition, and determining the sub-process to be executed for the current printing and the execution time of the sub-process according to the determination result specifically includes: determining that the sub-process to be executed for the current printing includes a stop heating process and a drive motor process, determining the execution start time of the stop heating process to be the current heating cumulative time point, determining the execution duration of the stop heating process to be the difference between the first step time of the motor and the current heating cumulative time, determining the execution start time of the drive motor process to be the end time point of the first step time of the motor, and determining the execution duration of the drive motor process to be the second step time of the motor;

[0093] Specifically, the determination result is that the second condition is not met. The sub-process to be executed for the current printing and the execution time of the sub-process are determined based on the determination result, specifically including: determining that the sub-process to be executed for the current printing includes a stop heating process, determining the execution start time of the stop heating process to be the current heating accumulated time point, and determining the execution duration of the stop heating process to be the difference between the sum of the motor's first step time and the motor's second step time and the current heating accumulated time.

[0094] Step 206: Obtain the sub-process that is executed for the first time as the current sub-process according to the sub-process execution start time, and send a corresponding execution signal according to the current sub-process;

[0095] Specifically, the execution signal corresponding to the motor driving process is the first signal, the execution signal corresponding to the heating process is the second signal, and the execution signal corresponding to the heating process stopping is the third signal;

[0096] Sending the corresponding execution signal according to the current sub-process is specifically: if the current sub-process is a motor driving process, sending a first signal; if the current sub-process is a heating process, sending a second signal; if the current sub-process is a heating stop process, sending a third signal;

[0097] Furthermore, the first signal is specifically: a signal for driving the motor to change phase and feed paper;

[0098] The second signal is specifically: a signal for controlling the print head to start heating;

[0099] The third signal is specifically: a signal for controlling the print head to stop heating.

[0100] Step 207, determining a sub-process to be executed when the execution duration of the sub-process corresponding to the current sub-process is completed;

[0101] Specifically, the sub-processes to be executed include a heating process, a heating stop process, and a motor driving process;

[0102] Step 208, taking the subprocess to be executed as the current subprocess, and determining whether the current subprocess includes a heating process, if yes, the heating process does not send an execution signal, and other subprocesses send corresponding execution signals, and executing step 209, otherwise, the corresponding execution signal is sent according to the current subprocess, and executing step 209;

[0103] Step 209: when the execution duration of the current sub-process is completed, determine whether there is a sub-process to be executed. If yes, determine the sub-process to be executed and execute step 208; otherwise, the printing of the current information to be printed ends.

[0104] Furthermore, the following describes in detail a specific example in which a 1-2 phase stepper motor is used as the motor. The specific example drives the motor in an 8-step manner, where one drive phase is changed in each step time. Two drive phase motors drive the roller to feed half a dot line, and four drive phase motors drive the roller to feed one dot line. One dot line is heated during printing of the upper half dot line and the lower half dot line, respectively. Each time half a dot line is heated, the drive motor feeds the paper by two steps. Specifically, the sum of the two step times is greater than the product of the number of prints and the maximum value of the heating time required for printing.

[0105] For example, if the number of dots to be printed is 384, it is divided into upper half-dot row and lower half-dot row for printing. The upper half-dot row needs to be printed twice, with 192 upper half-dots printed each time, and the lower half-dot row needs to be printed twice, with 192 lower half-dots printed each time. Figure 4 As shown, the implementation process of determining the sub-process to be executed for the current information to be printed and the sub-process execution time includes:

[0106] Step 401, setting the current cumulative heating time and the current cumulative statistical printing times to be first preset values, determining that the executed sub-process includes a motor driving process, determining the execution start time of the motor driving process to be the first preset value, and determining the execution duration of the motor driving process to be the first step time of the motor;

[0107] For example, the first step time of the motor and the second step time of the motor are obtained. The first step time of the motor M1 is 433us, the second step time of the motor M2 is 430us, the current cumulative heating time T=0, and the current cumulative statistical printing times P=0.

[0108] Step 402, determine whether the current cumulative statistical printing times is the printing times corresponding to the current dot row data to be printed, if yes, execute step 406, otherwise execute step 403;

[0109] Step 403, determine whether the current cumulative heating time is less than the first step time of the motor and whether the sum of the current cumulative heating time and the heating time required for the current printing is greater than the first step time of the motor. If so, execute step 405, otherwise execute step 404;

[0110] Step 404: determine that the sub-process to be executed for the current printing includes a heating process, determine that the execution start time of the heating process is the current heating cumulative time point, determine that the execution duration of the heating process is the heating time required for the current printing, update the current heating cumulative time to the heating time required for the current printing, update the current cumulative statistical printing times, and execute step 402;

[0111] In this embodiment, the motor driving process is executed when the first printing starts, and the execution start time of the motor driving process is a first preset value, wherein the first preset value is 0, and the execution duration is the first step time of the motor;

[0112] Step 405: determine that the sub-processes to be executed for the current printing include a heating process and a driving motor process, determine that the execution start time of the heating process is the current heating cumulative time point, determine that the execution duration of the heating process is the heating time required for the current printing, determine that the execution start time of the driving motor process is the end time point of the first step time of the motor, determine that the execution duration of the driving motor process is the second step time of the motor, update the current heating cumulative time to the heating time required for the current printing, update the current cumulative statistical printing times, and execute step 402;

[0113] Step 406, determine whether the current heating cumulative time is less than the first step time of the motor, if so, execute step 407, otherwise execute step 408;

[0114] Step 407, determining that the sub-processes to be executed for the current printing include a stop heating process and a drive motor process, determining that the execution start time of the stop heating process is the current heating cumulative time point, determining that the execution duration of the stop heating process is the difference between the first step time of the motor and the current heating cumulative time, determining that the execution start time of the drive motor process is the end time point of the first step time of the motor, and the execution duration is the second step time of the motor, and then ending;

[0115] Step 408, determining that the sub-process to be executed in the current printing includes stopping the heating process, determining the execution start time of the stopping heating process to be the current heating cumulative time point, determining the execution duration of the stopping heating process to be the difference between the sum of the motor first step time and the motor second step time and the current heating cumulative time, and ending;

[0116] For example, in this embodiment, the number of printed dots is 384 dots, which are divided into upper half dot row and lower half dot row for printing. The upper half dot row needs to be printed twice, with 192 upper half dots printed each time, and the lower half dot row needs to be printed twice, with 192 lower half dots printed each time. The printing conditions of the upper half dot row and the lower half dot row are the same.

[0117] The statistics of the upper half-dot line printing are as follows:

[0118] Statistics of the heating situation of the first printing: S=387us, M1= 433us, M2=430us, T=0, P=0, determine whether T < M1 and T + S>M1 are met, if not, determine that the sub-process to be executed for the current printing includes a heating process, determine that the execution start time of the heating process is 0, the execution duration is the heating time S required for the current printing, update the current heating cumulative time T to the heating time S required for the current printing, update the current cumulative statistical printing times P=1, specifically, the execution duration of the heating process is S=387us;

[0119] Statistics of the heating situation of the second printing: S=387us, M1= 433us, M2=430us, T=S=387us, P=1, determine whether T < M1 and T + S>M1 are met, if yes, determine that the sub-process to be executed for the current printing includes a heating process and a driving motor process, determine that the execution start time of the heating process is the current heating cumulative time point, that is, 388us, and the execution duration is the heating time S required for the current printing, determine that the execution start time of the driving motor process is the end time point of the first step time of the motor, that is, 434us, and the execution duration is the second step time M2 of the motor, update the current heating cumulative time to the cumulative statistical time and the heating time required for the current printing T1=T+S=774us, update the current cumulative statistical printing times P=2;

[0120] The situation after both heatings are counted: S=387us, M1= 433us, M2=430us, T1=774us, P=2, determine whether the current heating cumulative time T1 is less than the motor first step time M1, if not, determine that the sub-process to be executed in the current printing includes stopping the heating process, and determine that the execution start time of the stopping heating process is the current heating cumulative time point T1, and the execution duration is the difference between the sum of the motor first step time and the motor second step time and the current heating cumulative time, that is, M1+M2-T1=433 + 430 - 774 =89us.

[0121] In this embodiment, after determining the sub-process to be executed for printing the current information to be printed and the sub-process execution time, it may also include constructing a printing paper feeding heating table, wherein the printing paper feeding heating table includes multiple table items, each of which includes a sub-process type and a sub-process execution time;

[0122] The printing paper heating table is shown in the following table:

[0123]

[0124] Specifically, the printing operation is synchronously executed according to the determined sub-process and sub-process execution time as follows:

[0125] Step M1, obtaining the first sub-process in the printing and paper feeding heating table, taking the first sub-process as the current sub-process, and sending a corresponding execution signal according to the current sub-process;

[0126] The first sub-process is a sub-process executed for the first time, and there may be multiple first sub-processes. For example, the motor driving process and the heating process are performed synchronously; the execution signal corresponding to the motor driving process is the first signal, and the execution signal corresponding to the heating process is the second signal. The specific execution signal sent according to the current sub-process is: the motor driving process sends the first signal, and the heating process sends the second signal;

[0127] Step M2, determining a sub-process to be executed when the execution duration of the sub-process corresponding to the current sub-process ends;

[0128] For example, there are two sub-processes at present. When the sub-process execution time corresponding to these two sub-processes ends, both sub-processes to be executed are determined as the sub-processes to be executed. One sub-process is the driving motor process. When the sub-process execution time corresponding to the driving motor process ends, it is 433us. At this time, the sub-process to be executed is determined to be the next driving motor process. The other sub-process is the heating process. When the sub-process execution time corresponding to the heating process ends, it is 387us. At this time, the sub-process to be executed is determined to be the next heating process.

[0129] Step M3, taking the subprocess to be executed as the current subprocess, and determining whether the current subprocess includes a heating process, if yes, the heating process does not send an execution signal, and other subprocesses send corresponding execution signals, and executing step M4, otherwise, sending a corresponding execution signal according to the current subprocess, and executing step M4;

[0130] For example, the sub-process to be executed (driving motor process and heating process) is taken as the current sub-process, and it is determined whether the current sub-process (driving motor process and heating process) includes the heating process. If yes, the heating process does not send the second signal, that is, continues heating, and the other sub-process (driving motor process) sends the corresponding execution signal (first signal);

[0131] Step M4: when the current sub-process execution duration ends, determine whether there is a sub-process to be executed. If yes, determine the sub-process to be executed and execute step M3. Otherwise, the printing of the current information to be printed ends.

[0132] For example, at the end of the execution time of the current sub-process (heating process) (744us when the execution time of the heating process ends), it is judged that there is a sub-process to be executed (stop heating process), and the sub-process to be executed (stop heating process) is taken as the current sub-process, and it is judged that the current sub-process does not include the heating process, and a third signal is sent. At the end of the execution duration of the current sub-process (stop heating process) (863us when the execution time of the stop heating process ends), it is judged that there is no sub-process to be executed, and the process ends; at the end of the execution time of the current sub-process (driving motor process) (863us when the execution time of the driving motor process ends), it is judged that there is no sub-process to be executed, and printing of the current information to be printed ends.

[0133] In this embodiment, the first signal is specifically the A+, A-, B+, and B- signals of the driving motor, so that the turntable feeds paper;

[0134] The second signal includes a heating signal; specifically, the heating signal is to send the dot data that needs to be heated through SPI, control the print head LAT signal to latch the dot data, and control the print head STROBE signal to heat;

[0135] Specifically, the third signal is specifically a STROBE signal to control the print head to stop heating;

[0136] Furthermore, if Figure 5 The figure shows a signal diagram of the printer when executing printing dot line data according to the above specific example, wherein the upper four signal lines are signal lines for motor stepping operation, the fifth line is a data latch signal line, the sixth line is a print head heating time signal line, the seventh line is a data sending signal line, the first dotted line is the execution start time of the first sub-process, the first dotted line and the second dotted line are the operation signal diagrams when printing the upper half dot line, and the second dotted line and the third dotted line are the operation signal diagrams when printing the lower half dot line;

[0137] First print: When the fourth line changes from high level to low level, the motor starts to run. The duration of the motor driving process is S=433us. The motor driving process is as follows: the B-signal of the motor drives the turntable to feed paper. The heating process is as follows: the dot data to be heated is sent through SPI, the print head LAT signal is controlled to latch the dot data, and the print head STROBE signal is controlled to heat. The duration of the heating process is S=387us. In this process, the motor driving process and the heating process are carried out synchronously.

[0138] Second printing: After the signal execution time on the sixth line reaches 387us, the printer continues to execute the heating process, specifically: send the dot data that needs to be heated through SPI, control the print head LAT signal to latch the dot data, control the print head STROBE signal to heat, and the heating process execution duration is 387us. After the signal execution time on the sixth line reaches 433us, the first step rotation of the motor is completed, the second step rotation of the motor starts, and the motor driving process starts, the execution duration is S=430us, at this time, when the low level on the third line changes to a high level, the motor starts to change phase and rotate to feed paper, specifically: after the signal execution time reaches 433us, the printer drives the motor's A-signal to make the turntable feed paper and heat synchronously; after the heating process is completed, that is, when the execution time reaches 774us, the printer stops the heating process, and the execution duration of the stopping heating process is 89us. The stopping heating process is specifically: controlling the print head STROBE signal to stop heating. At this time, when the execution time reaches 774us, the stopping heating process and the driving motor process are executed synchronously, and the motor continues to feed paper;

[0139] like Figure 5 As shown, the left part of the second dotted line in the figure is the signal diagram for printing half a dot row. The motor rotates 2 steps. During the rotation of the motor, the heating signal is synchronized with the motor driving signal.

[0140] The method provided by the present invention solves the problem of font stretching and compression in the prior art. Figure 6 The figure shows the printing effect diagram of the prior art and the scheme of the present invention. Specifically, the right part of the figure shows the effect of the prior art, and the left part of the figure shows the effect diagram of the present invention.

[0141] The present invention provides a method for realizing thermal printing. The technical solution of the present invention obtains the number of printable dots and the number of prints, as well as the heating time for each print according to the information to be printed, determines the sub-process to be executed for printing the current information to be printed and the sub-process execution time according to the motor stepping time, the number of prints, the heating time required for printing, and the accumulated statistical time, and executes heating, driving the motor, and stopping the heating process in parallel according to the determined sub-process execution time, thereby solving the problem of font stretching and compression in the prior art and improving the printing effect.

[0142] The following are embodiments of the apparatus of the present invention, which can be used to implement the embodiments of the method of the present invention. For details not disclosed in the embodiments of the apparatus of the present invention, reference can be made to the embodiments of the method of the present invention.

[0143] An exemplary embodiment of the present invention provides a device for implementing thermal printing, the device comprising:

[0144] The acquisition module is used to obtain the current information to be printed and the number of printing points;

[0145] The first determination module is used to determine the number of prints and the number of print points each time according to the number of print points and the current information to be printed;

[0146] The second determination module is used to determine the heating time required for each printing according to the number of dots printed each time, and obtain the motor step time;

[0147] A third determination module is used to determine the sub-process to be executed for printing the current information to be printed and the sub-process execution time according to the number of prints, the motor step time, and the heating time required for each print. The sub-process includes a heating process, a heating stop process, and a motor driving process. The sub-process execution time includes a sub-process execution start time and a sub-process execution duration;

[0148] The execution module is used to execute each sub-process in parallel according to the determined sub-process execution time to complete the printing operation.

[0149] Optionally, the device further includes a first judgment module, which is used to judge whether the current information to be printed is an empty data row, and is also used to obtain the motor step time when judging that the current information to be printed is an empty data row, determine that the sub-process to be executed for printing the current information to be printed is a driving motor process and the execution time of the driving motor process is the motor step time, execute the driving motor process according to the motor step time to complete the printing operation, and is also used to trigger the second determination module when judging that the current information to be printed is not an empty data row;

[0150] Optionally, the third determination module specifically includes a first acquisition unit, a first judgment unit, a first determination unit, and a second determination unit;

[0151] The first acquisition unit is used to set the current cumulative heating time and the current cumulative statistical printing times to be first preset values, determine that the executed sub-process includes a driving motor process, determine the execution start time of the driving motor process to be the first preset value, and determine the execution duration of the driving motor process to be the motor step time;

[0152] The first judging unit is used to judge whether the current cumulative statistical printing times is the printing times determined by the current information to be printed, if yes, it is the second determining unit, otherwise, it is the first determining unit;

[0153] The first determination unit also includes a first judgment subunit and a first determination subunit;

[0154] The first judgment subunit is used to determine whether the current printing meets the first condition according to the current heating cumulative time and the motor step time;

[0155] The first determination subunit is used to determine the subprocess to be executed for the current printing and the execution time of the subprocess according to the determination result, and to update the current heating cumulative time and the current cumulative statistical printing times;

[0156] The second determination unit also includes a second judgment subunit and a second determination subunit;

[0157] The second judgment subunit is used to determine whether the current printing meets the second condition according to the current heating cumulative time and the motor step time;

[0158] The second determination subunit is used to determine the subprocess to be executed for the current printing and the execution time of the subprocess according to the determination result;

[0159] Further, the motor stepping time includes the first stepping time of the motor and the second stepping time of the motor. The first judging subunit is specifically used to judge whether the current heating cumulative time is less than the first stepping time of the motor and whether the sum of the current heating cumulative time and the heating time required for the current printing is greater than the first stepping time of the motor. If so, the first condition is met, otherwise, the first condition is not met;

[0160] The determination result is specifically that the first condition is met, and the first determination subunit is specifically used to determine that the sub-process to be executed for the current printing includes a heating process and a driving motor process, the execution start time of the heating process is the current heating cumulative time point, the execution duration of the heating process is the heating time required for the current printing, the execution start time of the driving motor process is determined to be the end time point of the first step time of the motor, the execution duration of the driving motor process is determined to be the second step time of the motor, the current heating cumulative time is updated to be the heating time required for the current printing, and the current cumulative statistical printing times are updated;

[0161] The determination result is specifically that the first condition is not met. The first determination subunit is specifically used to determine that the sub-process to be executed for the current printing includes a heating process, determine the execution start time of the heating process to be the current heating cumulative time point, determine the execution duration of the heating process to be the heating time required for the current printing, update the current heating cumulative time to the heating time required for the current printing, and update the current cumulative statistical print times.

[0162] The first judgment subunit is specifically used to judge whether the current heating cumulative time is less than the first step time of the motor, if so, the second condition is met, otherwise, the second condition is not met;

[0163] The determination result is specifically that the second condition is met, and the second determination subunit is specifically used to determine that the sub-process to be executed in the current printing includes a stop heating process and a drive motor process, determine the execution start time of the stop heating process to be the current heating cumulative time point, determine the execution duration of the stop heating process to be the difference between the first step time of the motor and the current heating cumulative time, determine the execution start time of the drive motor process to be the end time point of the first step time of the motor, and determine the execution duration of the drive motor process to be the second step time of the motor;

[0164] The determination result is specifically that the second condition is not met. The second determination subunit is specifically used to determine that the sub-process to be executed for the current printing includes a stop heating process, determine the start time of the stop heating process to be the current cumulative heating time point, and determine the duration of the stop heating process to be the difference between the sum of the motor's first step time and the motor's second step time and the current cumulative heating time.

[0165] Optionally, the execution module specifically includes a third determination unit, a second judgment unit, and a third judgment unit;

[0166] The third determining unit is used to obtain the sub-process executed for the first time as the current sub-process according to the sub-process start execution time, send a corresponding execution signal according to the current sub-process, and determine the sub-process to be executed when the sub-process execution time corresponding to the current sub-process ends;

[0167] The second judgment unit is used to take the sub-process to be executed as the current sub-process, and judge whether the current sub-process includes the heating process. If yes, the heating process does not send an execution signal, and other sub-processes send corresponding execution signals to trigger the third judgment unit. Otherwise, the corresponding execution signal is sent according to the current sub-process to trigger the third judgment unit;

[0168] The third judgment unit is used to judge whether there is a sub-process to be executed when the current sub-process execution time ends. If yes, the sub-process to be executed is determined and the second judgment unit is triggered. Otherwise, the printing of the current information to be printed ends.

[0169] Further, the execution signal corresponding to the motor driving process is the first signal, the execution signal corresponding to the heating process is the second signal, and the execution signal corresponding to the heating process stopping is the third signal;

[0170] The third determination unit is specifically used to send a corresponding execution signal according to the current sub-process. If the current sub-process is a driving motor process, a first signal is sent; if the current sub-process is a heating process, a second signal is sent; and if the current sub-process is a stopping heating process, a third signal is sent.

[0171] The first signal is specifically: a signal for controlling the print head to start heating;

[0172] The second signal is specifically: a signal for controlling the print head to stop heating;

[0173] The third signal is specifically: a paper feeding signal of a driving motor.

[0174] The present invention provides a method and device for realizing thermal printing. The technical solution of the present invention obtains the number of printable dots and the number of prints, as well as the heating time for each print according to the information to be printed, determines the sub-process to be executed for printing the current information to be printed and the sub-process execution time according to the motor stepping time, the number of prints, the heating time required for printing, and the accumulated statistical time, and executes the heating and driving motor paper feeding processes in parallel according to the determined sub-process execution time, thereby solving the problems of printing efficiency and font stretching and compression in the prior art, thereby improving printing efficiency and enhancing printing effects.

[0175] It should be noted that the device for implementing thermal printing provided in the above embodiment only uses the division of the above functional modules as an example when executing the method for implementing thermal printing. In actual applications, the above functions can be allocated and completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for implementing thermal printing provided in the above embodiment and the method for implementing thermal printing belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.

[0176] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0177] An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method for thermal printing disclosed in any of the aforementioned embodiments.

[0178] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program / instruction is stored, and when the program / instruction is executed by a processor, the method for realizing thermal printing disclosed in any of the above embodiments is implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.

[0179] An embodiment of the present invention provides a computer program product, including a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the method for implementing thermal printing disclosed in any of the aforementioned embodiments.

[0180] In the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or order; the term "plurality" refers to two or more, unless otherwise clearly defined. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone. The character " / " generally indicates that the objects associated with each other are in an "or" relationship. Terms such as "install", "connect", "connect", and "fix" should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; "connection" can be a direct connection or an indirect connection through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0181] In the description of the present invention, it is necessary to understand that the directions or positional relationships indicated by the terms "upper" and "lower" etc. are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or unit referred to must have a specific direction, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.

[0182] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope covered by the present invention.

Claims

1. A method for implementing thermal printing, characterized in that: The method comprises: Step S1, obtaining the current information to be printed and the printing tolerance points; Step S2, determining the number of prints and the number of print dots each time according to the print tolerance points and the current information to be printed; Step S3, determining the heating time required for each printing according to the number of dots printed each time, and obtaining the motor stepping time; Step S4, determining the sub-process to be executed for printing the current information to be printed and the sub-process execution time according to the number of prints, the motor stepping time, and the heating time required for each print, wherein the sub-process includes a heating process, a heating stop process, and a motor driving process, and the sub-process execution time includes a sub-process execution start time and a sub-process execution duration; Step S5, executing each sub-process in parallel according to the determined sub-process execution time to complete the printing operation; The determining of the sub-process to be executed for printing the current information to be printed and the sub-process execution time according to the number of prints, the motor stepping time, and the heating time required for each print specifically includes: Step S41, setting the current cumulative heating time and the current cumulative statistical printing times to be first preset values, determining that the executed sub-process includes a motor driving process, determining the execution start time of the motor driving process to be the first preset value, and determining the execution duration of the motor driving process to be the motor step time; Step S42, determining whether the current cumulative statistical printing times is the printing times determined by the current information to be printed, if yes, executing step S44, otherwise executing step S43; Step S43, determining whether the current printing meets the first condition according to the current cumulative heating time and the motor stepping time, and determining the sub-process to be executed for the current printing and the execution time of the sub-process according to the determination result, updating the current cumulative heating time and the current cumulative statistical printing times, and returning to step S42; Step S44, determining whether the current printing meets the second condition according to the current heating accumulated time and the motor stepping time, and determining the sub-process to be executed for the current printing and the execution time of the sub-process according to the determination result, and ending.

2. The method for thermal printing as claimed in claim 1, characterized in that: Before step S3, it also includes: judging whether the current information to be printed is an empty data row, if so, obtaining the motor stepping time, determining that the sub-process to be executed for printing the current information to be printed is the driving motor process and the execution time of the driving motor process is the motor stepping time, executing the driving motor process according to the motor stepping time to complete the printing operation, otherwise executing step S3.

3. The method for thermal printing according to claim 1, characterized in that: The motor stepping time includes the first stepping time of the motor and the second stepping time of the motor. The determining whether the current printing meets the first condition according to the current heating cumulative time and the motor stepping time is specifically: judging whether the current heating cumulative time is less than the first stepping time of the motor and whether the sum of the current heating cumulative time and the heating time required for the current printing is greater than the first stepping time of the motor. If so, the first condition is met, otherwise, the first condition is not met; The determination result specifically meets the first condition, and the determination of the sub-process to be executed for the current printing and the execution time of the sub-process based on the determination result specifically includes: determining that the sub-process to be executed for the current printing includes a heating process and a driving motor process, the execution start time of the heating process is the current heating cumulative time point, the execution duration of the heating process is the heating time required for the current printing, determining the execution start time of the driving motor process is the end time point of the first step time of the motor, determining the execution duration of the driving motor process is the second step time of the motor, updating the current heating cumulative time to the heating time required for the current printing, and updating the current cumulative statistical printing times; The determination result is specifically that the first condition is not met, and determining the sub-process to be executed for the current printing and the execution time of the sub-process based on the determination result specifically includes: determining that the sub-process to be executed for the current printing includes a heating process, determining the execution start time of the heating process to be the current heating cumulative time point, determining the execution duration of the heating process to be the heating time required for the current printing, updating the current heating cumulative time to be the heating time required for the current printing, and updating the current cumulative statistical printing times.

4. The method for implementing thermal printing as claimed in claim 1, characterized in that: The motor stepping time includes the first motor stepping time and the second motor stepping time. The determining whether the current printing meets the second condition according to the current heating cumulative time and the motor stepping time is specifically: judging whether the current heating cumulative time is less than the first motor stepping time, if so, the second condition is met, otherwise, the second condition is not met; The determination result specifically meets the second condition, and the determination of the sub-process to be executed for the current printing and the execution time of the sub-process according to the determination result specifically includes: determining that the sub-process to be executed for the current printing includes a stop heating process and a drive motor process, determining the execution start time of the stop heating process to be the current heating cumulative time point, determining the execution duration of the stop heating process to be the difference between the first step time of the motor and the current heating cumulative time, determining the execution start time of the drive motor process to be the end time point of the first step time of the motor, and determining the execution duration of the drive motor process to be the second step time of the motor; The determination result is specifically that the second condition is not met, and determining the sub-process to be executed for the current printing and the execution time of the sub-process based on the determination result specifically includes: determining that the sub-process to be executed for the current printing includes a stop heating process, determining the execution start time of the stop heating process to be the current heating accumulated time point, and determining the execution duration of the stop heating process to be the difference between the sum of the first step time of the motor and the second step time of the motor and the current heating accumulated time.

5. The method for implementing thermal printing as claimed in claim 1, characterized in that: Step S5 specifically includes: Step S51, obtaining the sub-process executed for the first time as the current sub-process according to the sub-process start execution time, and sending a corresponding execution signal according to the current sub-process; Step S52, determining a sub-process to be executed when the sub-process execution time corresponding to the current sub-process ends; Step S53, taking the sub-process to be executed as the current sub-process, and determining whether the current sub-process includes a heating process, if yes, the heating process does not send an execution signal, and other sub-processes send corresponding execution signals, and executing step S54, otherwise, sending a corresponding execution signal according to the current sub-process, and executing step S54; Step S54: When the current sub-process execution time ends, determine whether there is a sub-process to be executed. If yes, determine the sub-process to be executed and execute step S53; otherwise, end.

6. The method for implementing thermal printing as claimed in claim 5, characterized in that: The execution signal corresponding to the motor driving process is a first signal, the execution signal corresponding to the heating process is a second signal, and the execution signal corresponding to the heating stopping process is a third signal; The sending of the corresponding execution signal according to the current sub-process is specifically: if the current sub-process is a motor driving process, a first signal is sent; if the current sub-process is a heating process, a second signal is sent; if the current sub-process is a heating stop process, a third signal is sent.

7. The method for implementing thermal printing as claimed in claim 6, characterized in that: The first signal is specifically: a signal for controlling the print head to start heating; The second signal is specifically: a signal for controlling the print head to stop heating; The third signal is specifically: a paper feeding signal of a driving motor.

8. A device for implementing thermal printing, characterized in that: The device is implemented by the method for realizing thermal printing according to any one of claims 1 to 7, and the device comprises: The acquisition module is used to obtain the current information to be printed and the number of printing points; The first determination module is used to determine the number of prints and the number of print points each time according to the number of print points and the current information to be printed; The second determination module is used to determine the heating time required for each printing according to the number of dots printed each time, and obtain the motor step time; A third determination module is used to determine the sub-process to be executed for printing the current information to be printed and the sub-process execution time according to the number of prints, the motor step time, and the heating time required for each print, wherein the sub-process includes a heating process, a heating stop process, and a motor driving process, and the sub-process execution time includes a sub-process execution start time and a sub-process execution duration; The execution module is used to execute each sub-process in parallel according to the determined sub-process execution time to complete the printing operation.

9. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.