Thermal printer first line control method and system for printing paper
By collecting the position and color level of the first line in the thermal printer and dynamically adjusting the printing parameters, the problem of color difference in the position of the first line of printing is solved and color uniformity and accuracy are achieved.
Patent Information
- Application Number
- CN202411148296.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-08-21
AI Technical Summary
Existing thermal printers have color differences when printing the first line, resulting in uneven printed content.
By collecting the position of the first line of the content to be printed, determine the relative position of the print head and the first line, estimate the color level of the print head, and define the color status coefficient according to the color level, trigger the color control logic, monitor the printed content in real time, and make dynamic adjustments Print parameters for color uniformity.
It effectively avoids color differences in the first line of printing paper and ensures the color uniformity and accuracy of printed content.
Smart Images

Figure CN118660111B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of thermal printers, and in particular to a method and system for controlling the first line of printing paper by a thermal printer. Background Art
[0002] With the development of science and technology, thermal printers are a type of printer that is used in people's lives and prints on printing paper through a print head. In the prior art, thermal printers print on the first line of the printing paper and output the printed content. However, the printed content at the first line has dark and light colors, resulting in color differences in the printed content at the first line of the printing paper. Summary of the invention
[0003] The purpose of the present invention is to overcome the shortcomings of the prior art. The present invention provides a method and system for controlling the first line of printing paper by a thermal printer, which collects the content to be printed of the thermal printer and defines the position of the first line in the content to be printed; determines the relative position of the print head and the first line position according to the position comparison between the current position of the print head and the first line position in the content to be printed; if the print head is in the first line position, estimates the first printing color level of the print head relative to the printing paper according to multiple printing parameters; estimates the second printing color level of the print head relative to the printing paper according to the basic parameters of the printing paper; defines the color state coefficient of the content to be printed according to the first printing color level and the second printing color level, so as to control the color state coefficient of the content to be printed based on the first printing color level and the second printing color level, thereby realizing the estimation of the color state coefficient of the content to be printed, and triggering subsequent color control of the content to be printed according to the color state coefficient of the content to be printed.
[0004] At the same time, if the color state coefficient of the content to be printed is lower than the preset state coefficient, the color control logic is matched according to the color state coefficient; in the color control logic, a control matching table is defined according to the color state coefficient of the test content and the color control logic; self-control of multiple printing parameters of the print head and basic parameters of the printing paper is triggered; the printing content of the print head at the first line position is monitored in real time, and multiple color change areas are defined according to the traversal of the printing content, the color change trajectory is determined according to the multiple color change areas, and the dynamic color control of the printing paper by the print head is triggered according to the color change trajectory, and the multiple printing parameters of the print head and the basic parameters of the printing paper are controlled according to the dynamic balance relationship, so as to introduce dynamic control and self-control for multiple printing parameters and basic parameters of the printing paper, and control the printing effect of the print head in multiple control mechanisms, thereby ensuring that the print head controls the color of the content to be printed at the first line position in multiple dimensions, ensuring the color uniformity of the printed content at the first line position in the printing paper, and avoiding color differences in the printed content at the first line position in the printing paper.
[0005] The embodiment of the present invention provides a method for controlling the first line of printing paper by a thermal printer, which is applied to the scenario of controlling the first line of printing paper by a thermal printer;
[0006] The method for controlling the first line of printing paper by the thermal printer comprises:
[0007] Collect the content to be printed by the thermal printer and define the position of the first line in the content to be printed;
[0008] Determining the relative position of the print head and the first line position according to the position comparison of the current position of the print head and the first line position in the content to be printed;
[0009] If the print head is at the first line position, a first printing color level of the print head relative to the printing paper is estimated according to a plurality of printing parameters; a second printing color level of the print head relative to the printing paper is estimated according to the basic parameters of the printing paper;
[0010] Defining a color state coefficient of the content to be printed according to the first printing color level and the second printing color level, and if the color state coefficient of the content to be printed is lower than a preset state coefficient, matching a color control logic according to the color state coefficient;
[0011] In the color control logic, a control matching table is defined according to the color state coefficient of the test content and the color control logic; multiple printing parameters of the print head and basic parameters of the printing paper are triggered to self-regulate;
[0012] Monitor the print content of the print head at the first line position in real time, define multiple color change areas according to the traversal of the print content, determine the color change trajectory according to the multiple color change areas, and trigger the print head to dynamically control the color of the printing paper according to the color change trajectory, and adjust multiple printing parameters of the print head and the basic parameters of the printing paper according to the dynamic balance relationship.
[0013] Optionally, the collecting the content to be printed by the thermal printer and defining the position of the first line in the content to be printed includes:
[0014] Collect the content to be printed by the thermal printer;
[0015] Dividing a plurality of sub-content sets according to the content to be printed;
[0016] Constructing a distribution order of the plurality of sub-content sets based on the plurality of sub-content sets and the line division logic of the content to be printed;
[0017] Constructing optimized content to be printed according to the distribution order of the multiple sub-content sets and the multiple sub-content sets, wherein the optimized content to be printed contains line break marks of two adjacent sub-content sets;
[0018] The first line position in the content to be printed is defined according to the multiple line branch marks and the optimized content to be printed, and the first line content in the content to be printed is matched according to the first line position in the content to be printed.
[0019] Optionally, determining the relative position of the print head and the first line position according to the position comparison of the current position of the print head and the first line position in the content to be printed includes:
[0020] Freeze the current position of the print head and the position of the first line in the content to be printed;
[0021] defining a position difference amount based on a current position of the print head and a position of a first line in the content to be printed;
[0022] The relative distance between the current position of the print head and the position of the first line in the content to be printed is determined according to the position difference;
[0023] Collect the position of the first line in the content to be printed and the moving direction of the printing paper;
[0024] Define the printing direction according to the position of the first line in the content to be printed and the moving direction of the printing paper;
[0025] defining the orientation of the print head relative to the first line position in the content to be printed based on the current position of the print head and the first line position in the content to be printed;
[0026] defining a relative direction between a current position of the print head and the position of the first line in the content to be printed according to the orientation of the print head relative to the position of the first line in the content to be printed and the printing direction;
[0027] The relative position of the print head and the first line position is determined according to the relative direction and the relative distance.
[0028] Optionally, if the print head is at the first line position, estimating a first printing color level of the print head relative to the printing paper according to a plurality of printing parameters; estimating a second printing color level of the print head relative to the printing paper according to a basic parameter of the printing paper, comprises:
[0029] If the print head is at the first line position, the traversal of the print head and the traversal of the printing paper are triggered;
[0030] Associating the traversal of the print head and the traversal of the printing paper, and performing synchronous processing on the traversal of the print head and the traversal of the printing paper;
[0031] Defining a plurality of printing parameters of the print head based on the traversal of the print head, and defining basic parameters of the print paper based on the traversal of the print paper;
[0032] Freeze a plurality of printing parameters, and define a first matching coefficient between two adjacent printing parameters;
[0033] defining a first matching level according to a plurality of first matching coefficients, and estimating a first printing color level of the print head relative to the printing paper according to a plurality of printing parameters and the first matching level;
[0034] Determine the basic parameters of the printing paper, and associate the basic parameters of the printing paper with the coefficient of the effect of the print head on the printing paper;
[0035] A second printing color level of the print head relative to the printing paper is estimated according to basic parameters of the printing paper and a coefficient of action of the print head on the printing paper.
[0036] Optionally, the color state coefficient of the content to be printed is defined according to the first printing color level and the second printing color level, and if the color state coefficient of the content to be printed is lower than a preset state coefficient, matching the color control logic according to the color state coefficient includes:
[0037] Freeze the first printing color level and the second printing color level;
[0038] Associating a first printing color grade with a second printing color grade, and constructing a color grade set according to the first printing color grade and the second printing color grade;
[0039] Defining color state coefficients of the content to be printed according to the color level set and the color coefficients of the printing surface of the printing paper;
[0040] Comparing the color state coefficient of the content to be printed with the preset state coefficient;
[0041] If the color state coefficient of the content to be printed is lower than the preset state coefficient, the adjustment of the color state coefficient is triggered;
[0042] In the regulation of the color state coefficient, the corresponding color regulation logic is matched according to the color state coefficient and a plurality of sub-content sets in the content to be printed.
[0043] Optionally, in the color control logic, a control matching table is defined according to the color state coefficient of the test content and the color control logic; and self-control of multiple printing parameters of the print head and basic parameters of the printing paper is triggered, including:
[0044] In the color control logic, test printing is performed based on the print head being at the first line position, and the test content of the print head at the first line position is collected;
[0045] Traverse the test content and define the color state coefficients of the test content;
[0046] The color state coefficients and the color control logic of the test content are associated, and a control matching table is defined according to the color state coefficients and the color control logic of the test content.
[0047] Optionally, in the color control logic, the control matching table is defined according to the color state coefficient of the test content and the color control logic; triggering the self-control of multiple printing parameters of the print head and basic parameters of the printing paper also includes:
[0048] Associating and regulating a matching table, a plurality of printing parameters of a print head and basic parameters of printing paper;
[0049] A matching table is regulated based on a plurality of printing parameters of the print head and basic parameters of the printing paper, and a corresponding matching relationship is defined based on the matching table;
[0050] Building a self-regulating relationship based on the matching relationship, multiple printing parameters and basic parameters of the printing paper;
[0051] Based on the self-regulation relationship and the multiple sub-content sets in the content to be printed, self-regulation of multiple printing parameters of the print head and basic parameters of the printing paper is triggered.
[0052] Optionally, the real-time monitoring of the print content of the print head at the first line position, and defining a plurality of color change areas according to the traversal of the print content, determining a color change trajectory according to the plurality of color change areas, and triggering the print head to dynamically control the color of the printing paper according to the color change trajectory, and regulating a plurality of printing parameters of the print head and basic parameters of the printing paper according to the dynamic balance relationship, includes:
[0053] When the multiple printing parameters of the print head and the basic parameters of the printing paper are in a self-regulating state, the first line of the printing paper is printed based on the print head, and the printed content is dynamically output;
[0054] Real-time monitoring of the print content of the print head at the first line position;
[0055] Traverse the printed content and divide the printed content into multiple color areas;
[0056] A plurality of color variation regions are defined based on the plurality of color regions and the printing direction.
[0057] Optionally, the real-time monitoring of the print content of the print head at the first line position, and defining a plurality of color change areas according to the traversal of the print content, determining a color change trajectory according to the plurality of color change areas, and triggering the print head to dynamically control the color of the printing paper according to the color change trajectory, and regulating a plurality of printing parameters of the print head and basic parameters of the printing paper according to the dynamic balance relationship, further includes:
[0058] Determine a color change trajectory according to a plurality of color change regions and a plurality of sub-content sets in the content to be printed;
[0059] Define multiple color change nodes according to the color change trajectory, and trigger the print head to dynamically control the color of the printing paper based on the multiple color change nodes;
[0060] When the print head controls the dynamic color of the printing paper, a corresponding dynamic balance relationship is defined based on the dynamic color control;
[0061] Multiple printing parameters of the print head and basic parameters of the printing paper are regulated according to a dynamic balance relationship to ensure the color uniformity of the printed content at the first line position in the printing paper.
[0062] In addition, an embodiment of the present invention further provides a control system for the first line of printing paper of a thermal printer, and the control system for the first line of printing paper of the thermal printer includes:
[0063] The acquisition module is used to acquire the content to be printed by the thermal printer and define the position of the first line in the content to be printed;
[0064] A position module, used for determining the relative position of the print head and the first line position according to the position comparison of the current position of the print head and the first line position in the content to be printed;
[0065] A printing color grade module, for estimating a first printing color grade of the print head relative to the printing paper according to a plurality of printing parameters if the print head is at the first line position; and estimating a second printing color grade of the print head relative to the printing paper according to a basic parameter of the printing paper;
[0066] A matching module, used for defining a color state coefficient of the content to be printed according to the first printing color level and the second printing color level, and matching a color control logic according to the color state coefficient if the color state coefficient of the content to be printed is lower than a preset state coefficient;
[0067] A self-regulation module is used to define a regulation matching table in the color regulation logic according to the color state coefficient of the test content and the color regulation logic; trigger the self-regulation of multiple printing parameters of the print head and basic parameters of the printing paper;
[0068] The dynamic control module is used to monitor the printing content of the print head at the first line position in real time, and define multiple color change areas according to the traversal of the printed content, determine the color change trajectory according to the multiple color change areas, and trigger the print head to dynamically control the color of the printing paper according to the color change trajectory, and adjust multiple printing parameters of the print head and the basic parameters of the printing paper according to the dynamic balance relationship.
[0069] In an embodiment of the present invention, through the method in the embodiment of the present invention, the content to be printed of the thermal printer is collected, and the first line position in the content to be printed is defined; the relative position of the print head and the first line position in the content to be printed is determined based on the position comparison of the current position of the print head and the first line position in the content to be printed; if the print head is in the first line position, the first printing color level of the print head relative to the printing paper is estimated based on multiple printing parameters; the second printing color level of the print head relative to the printing paper is estimated based on the basic parameters of the printing paper; the color state coefficient of the content to be printed is defined based on the first printing color level and the second printing color level, so as to control the color state coefficient of the content to be printed based on the first printing color level and the second printing color level, thereby realizing the estimation of the color state coefficient of the content to be printed, and triggering subsequent color control of the content to be printed based on the color state coefficient of the content to be printed.
[0070] At the same time, if the color state coefficient of the content to be printed is lower than the preset state coefficient, the color control logic is matched according to the color state coefficient; in the color control logic, a control matching table is defined according to the color state coefficient of the test content and the color control logic; self-control of multiple printing parameters of the print head and basic parameters of the printing paper is triggered; the printing content of the print head at the first line position is monitored in real time, and multiple color change areas are defined according to the traversal of the printing content, the color change trajectory is determined according to the multiple color change areas, and the dynamic color control of the printing paper by the print head is triggered according to the color change trajectory, and the multiple printing parameters of the print head and the basic parameters of the printing paper are controlled according to the dynamic balance relationship, so as to introduce dynamic control and self-control for multiple printing parameters and basic parameters of the printing paper, and control the printing effect of the print head in multiple control mechanisms, thereby ensuring that the print head controls the color of the content to be printed at the first line position in multiple dimensions, ensuring the color uniformity of the printed content at the first line position in the printing paper, and avoiding color differences in the printed content at the first line position in the printing paper. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] 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.
[0072] Figure 1 It is a flow chart of a method for controlling the first line of printing paper by a thermal printer in an embodiment of the present invention;
[0073] Figure 2 is a flow chart of S11 in the method for controlling the first line of printing paper by a thermal printer in an embodiment of the present invention;
[0074] Figure 3 is a flow chart of S12 in the method for controlling the first line of printing paper by a thermal printer in an embodiment of the present invention;
[0075] Figure 4 is a flow chart of S13 in the method for controlling the first line of printing paper by a thermal printer in an embodiment of the present invention;
[0076] Figure 5 is a flow chart of S14 in the method for controlling the first line of printing paper by a thermal printer in an embodiment of the present invention;
[0077] Figure 6 is a flow chart of S15 in the method for controlling the first line of printing paper by a thermal printer in an embodiment of the present invention;
[0078] Figure 7 is a flow chart of S16 in the method for controlling the first line of printing paper by a thermal printer in an embodiment of the present invention;
[0079] Figure 8 It is a schematic diagram of the structure of the control system for the first line of printing paper of the thermal printer in the embodiment of the present invention;
[0080] Fig. 9 The figure is a hardware diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0081] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0082] See also Figures 1 to 9 A method for controlling the first line of printing paper by a thermal printer is applied to a scenario in which a thermal printer controls the first line of printing paper. The method for controlling the first line of printing paper by a thermal printer includes:
[0083] Step S11: collecting the content to be printed by the thermal printer and defining the position of the first line in the content to be printed;
[0084] Step S12: determining the relative position of the print head and the first line position according to the position comparison between the current position of the print head and the first line position in the content to be printed;
[0085] Step S13: if the print head is at the first line position, estimating the first printing color level of the print head relative to the printing paper according to a plurality of printing parameters; estimating the second printing color level of the print head relative to the printing paper according to the basic parameters of the printing paper;
[0086] Step S14: defining a color state coefficient of the content to be printed according to the first printing color level and the second printing color level, and if the color state coefficient of the content to be printed is lower than a preset state coefficient, matching a color control logic according to the color state coefficient;
[0087] Step S15: in the color control logic, a control matching table is defined according to the color state coefficient of the test content and the color control logic; and self-control of multiple printing parameters of the print head and basic parameters of the printing paper is triggered;
[0088] Step S16: Monitor the print content of the print head at the first line position in real time, and define multiple color change areas according to the traversal of the print content, determine the color change trajectory according to the multiple color change areas, and trigger the print head to dynamically control the color of the printing paper according to the color change trajectory, and adjust multiple printing parameters of the print head and the basic parameters of the printing paper according to the dynamic balance relationship.
[0089] In an embodiment of the present invention, through the method in the embodiment of the present invention, if the print head is in the first line position, the first printing color level of the print head relative to the printing paper is estimated according to multiple printing parameters; the second printing color level of the print head relative to the printing paper is estimated according to the basic parameters of the printing paper; the color state coefficient of the content to be printed is defined according to the first printing color level and the second printing color level, if the color state coefficient of the content to be printed is lower than the preset state coefficient, the color control logic is matched according to the color state coefficient, so as to perform targeted printing on dense patterns, and perform overall control in the intensive printing mode of the thermal printer.
[0090] At the same time, in the color control logic, a control matching table is defined according to the color state coefficient of the test content and the color control logic; self-control of multiple printing parameters of the print head and basic parameters of the printing paper is triggered; the printing content of the print head at the first line position is monitored in real time, and multiple color change areas are defined according to the traversal of the printing content, the color change trajectory is determined according to the multiple color change areas, and the dynamic color control of the printing paper by the print head is triggered according to the color change trajectory, and the multiple printing parameters of the print head and the basic parameters of the printing paper are regulated according to the dynamic balance relationship, which ensures the accuracy of the printed image of the dense pattern and improves the printing effect of the print head on the dense pattern from multiple dimensions.
[0091] refer to Figure 2 , in step S11, the content to be printed by the thermal printer is collected, and the position of the first line in the content to be printed is defined;
[0092] In the specific implementation process of the present invention, the specific steps may be:
[0093] S111: collecting the content to be printed by the thermal printer;
[0094] S112: Divide the content to be printed into multiple sub-content sets;
[0095] S113: constructing a distribution order of the plurality of sub-content sets based on the plurality of sub-content sets and the line division logic of the content to be printed;
[0096] S114: constructing optimized content to be printed according to the distribution order of the multiple sub-content sets and the multiple sub-content sets. At this time, the optimized content to be printed contains line break marks of two adjacent sub-content sets;
[0097] S115: defining the position of the first line in the content to be printed according to the multiple line branch marks and the optimized content to be printed, and matching the first line of content in the content to be printed according to the position of the first line in the content to be printed.
[0098] In an embodiment of the present application, the content to be printed by the thermal printer is collected, and the content to be printed by the thermal printer is controlled so as to divide the content to be printed into multiple sub-content sets, thereby corresponding the content to be printed to multiple sub-content sets, so as to facilitate management and control according to the multiple sub-content sets.
[0099] At this time, multiple sub-content sets and branch logic of the content to be printed are introduced, and the distribution order of the multiple sub-content sets is constructed based on the multiple sub-content sets and the branch logic of the content to be printed, thereby determining the distribution order of the multiple sub-content sets, so as to facilitate the construction of optimized content to be printed according to the distribution order of the multiple sub-content sets and the multiple sub-content sets, so as to manage and control the optimized content to be printed. At this time, the optimized content to be printed contains branch marks of two adjacent sub-content sets.
[0100] Therefore, the position of the first line in the content to be printed is defined according to multiple line branch marks and the optimized content to be printed, so as to facilitate multi-dimensional control based on multiple line branch marks and the optimized content to be printed, thereby controlling the position of the first line in the content to be printed based on multiple dimensions, thereby achieving targeted control of the position of the first line in the content to be printed, so as to be suitable for various content to be printed, and at the same time, matching the first line of content in the content to be printed according to the first line position in the content to be printed.
[0101] refer to Figure 3 , in step S12, the relative position of the print head and the first line position is determined based on the position comparison between the current position of the print head and the first line position in the content to be printed;
[0102] In the specific implementation process of the present invention, the specific steps may be:
[0103] S121: freeze the current position of the print head and the position of the first line in the content to be printed;
[0104] S122: defining a position difference amount based on a current position of the print head and a position of a first line in the content to be printed;
[0105] S123: determining the relative distance between the current position of the print head and the position of the first line in the content to be printed according to the position difference;
[0106] S124: collecting the position of the first line in the content to be printed and the moving direction of the printing paper;
[0107] S125: defining a printing direction according to the position of the first line in the content to be printed and the moving direction of the printing paper;
[0108] S126: defining the orientation of the print head relative to the first line position in the content to be printed based on the current position of the print head and the first line position in the content to be printed;
[0109] S127: defining a relative direction between a current position of the print head and the first line position in the content to be printed according to the orientation of the print head relative to the first line position in the content to be printed and the printing direction;
[0110] S128: Determine the relative position of the print head and the first line position according to the relative direction and the relative distance.
[0111] In an embodiment of the present application, the current position of the print head and the position of the first line in the content to be printed are fixed to facilitate associating the current position of the print head and the position of the first line in the content to be printed, thereby defining a position difference amount based on the current position of the print head and the position of the first line in the content to be printed, so as to introduce the position difference amount, thereby determining the relative distance between the current position of the print head and the position of the first line in the content to be printed according to the position difference amount.
[0112] At this time, the position of the first line in the content to be printed and the moving direction of the printing paper are collected, and the position of the first line in the content to be printed and the moving direction of the printing paper are controlled so as to define the printing direction according to the position of the first line in the content to be printed and the moving direction of the printing paper, thereby clarifying the printing direction.
[0113] Furthermore, the orientation of the print head relative to the position of the first line in the content to be printed is defined based on the current position of the print head and the position of the first line in the content to be printed, so as to clarify the orientation of the print head relative to the position of the first line in the content to be printed, thereby defining the relative direction between the current position of the print head and the position of the first line in the content to be printed according to the orientation of the print head relative to the position of the first line in the content to be printed and the printing direction.
[0114] Therefore, a relative direction and a relative distance are introduced, and an association is made with the relative direction and the relative distance, so as to determine the relative position of the print head and the first line position according to the relative direction and the relative distance.
[0115] refer to Figure 4 In step S13, if the print head is at the first line position, a first printing color level of the print head relative to the printing paper is estimated according to a plurality of printing parameters; a second printing color level of the print head relative to the printing paper is estimated according to a basic parameter of the printing paper;
[0116] In the specific implementation process of the present invention, the specific steps may be:
[0117] S131: If the print head is at the first line position, triggering the traversal of the print head and the traversal of the printing paper;
[0118] S132: Associating the traversal of the print head with the traversal of the printing paper, and performing synchronous processing on the traversal of the print head and the traversal of the printing paper;
[0119] S133: defining a plurality of printing parameters of the print head based on the traversal of the print head, and defining basic parameters of the print paper based on the traversal of the print paper;
[0120] S134: freezing a plurality of printing parameters, and defining a first matching coefficient between two adjacent printing parameters;
[0121] S135: defining a first matching level according to the plurality of first matching coefficients, and estimating a first printing color level of the print head relative to the printing paper according to the plurality of printing parameters and the first matching level;
[0122] S136: fixing basic parameters of the printing paper, and associating the basic parameters of the printing paper and the effect coefficient of the print head on the printing paper;
[0123] S137: Estimate a second printing color level of the print head relative to the printing paper according to the basic parameters of the printing paper and the effect coefficient of the print head on the printing paper.
[0124] In an embodiment of the present application, if the print head is in the first line position, the traversal of the print head and the traversal of the printing paper are triggered, and the traversal of the print head and the traversal of the printing paper are performed synchronously. At this time, the traversal of the print head and the traversal of the printing paper are associated, and the traversal of the print head and the traversal of the printing paper are processed synchronously.
[0125] Furthermore, multiple printing parameters of the print head are defined based on the traversal of the print head, and basic parameters of the printing paper are defined based on the traversal of the printing paper, so as to introduce multiple printing parameters of the print head and basic parameters of the printing paper, thereby achieving overall control over the multiple printing parameters of the print head and basic parameters of the printing paper.
[0126] Therefore, multiple printing parameters are fixed, and a first matching coefficient between two adjacent printing parameters is defined; a first matching level is defined according to the multiple first matching coefficients, and a first printing color level of the print head relative to the printing paper is estimated according to the multiple printing parameters and the first matching level, so as to define the first printing color level, thereby defining the first matching level based on the multiple first matching coefficients in a targeted manner, thereby ensuring the accuracy of the first printing color level.
[0127] In addition, the basic parameters of the printing paper are fixed, and the basic parameters of the printing paper and the coefficient of action of the print head on the printing paper are associated; the second printing color level of the print head relative to the printing paper is estimated based on the basic parameters of the printing paper and the coefficient of action of the print head on the printing paper, so as to define the second printing color level, thereby making a targeted definition based on the basic parameters of the printing paper and the coefficient of action of the print head on the printing paper, thereby ensuring the accuracy of the second printing color level.
[0128] Collect the content to be printed of the thermal printer, and define the first line position in the content to be printed; determine the relative position of the print head and the first line position based on the position comparison of the current position of the print head and the first line position in the content to be printed; if the print head is in the first line position, estimate the first printing color level of the print head relative to the printing paper based on multiple printing parameters; estimate the second printing color level of the print head relative to the printing paper based on the basic parameters of the printing paper; define the color state coefficient of the content to be printed based on the first printing color level and the second printing color level, so as to control the color state coefficient of the content to be printed based on the first printing color level and the second printing color level, thereby realizing the estimation of the color state coefficient of the content to be printed, and triggering subsequent color control of the content to be printed according to the color state coefficient of the content to be printed.
[0129] refer to Figure 5 , S14: defining a color state coefficient of the content to be printed according to the first printing color level and the second printing color level, and if the color state coefficient of the content to be printed is lower than a preset state coefficient, matching a color control logic according to the color state coefficient;
[0130] In the specific implementation process of the present invention, the specific steps may be:
[0131] S141: Freeze the first printing color level and the second printing color level;
[0132] S142: Associating the first printing color level with the second printing color level, and constructing a color level set according to the first printing color level and the second printing color level;
[0133] S143: defining a color state coefficient of the content to be printed according to the color level set and the color coefficient of the printing surface of the printing paper;
[0134] S144: comparing the color state coefficient of the content to be printed with the preset state coefficient;
[0135] S145: If the color state coefficient of the content to be printed is lower than the preset state coefficient, the adjustment of the color state coefficient is triggered;
[0136] S146: In the regulation of the color state coefficient, a corresponding color regulation logic is matched according to the color state coefficient and a plurality of sub-content sets in the content to be printed.
[0137] In an embodiment of the present application, the first print color level and the second print color level are frozen, and the first print color level and the second print color level are associated to facilitate associating the first print color level and the second print color level, and a color level set is constructed based on the first print color level and the second print color level to facilitate defining the color level set, thereby further processing the color level set.
[0138] At this time, the color state coefficient of the content to be printed is defined according to the color level set and the color coefficient of the printing surface of the printing paper; and the color state coefficient of the content to be printed is compared with the preset state coefficient.
[0139] If the color state coefficient of the content to be printed is lower than the preset state coefficient, the regulation of the color state coefficient is triggered; in the regulation of the color state coefficient, the corresponding color control logic is matched according to the color state coefficient and multiple sub-content sets in the content to be printed, so as to further process the color control logic and perform overall control on the color state coefficient and multiple sub-content sets in the content to be printed.
[0140] refer to Figure 6 , S15: in the color control logic, a control matching table is defined according to the color state coefficient of the test content and the color control logic; triggering self-control of multiple printing parameters of the print head and basic parameters of the printing paper;
[0141] In the specific implementation process of the present invention, the specific steps may be:
[0142] S151: in the color control logic, test printing is performed based on the print head being at the first line position, and test content of the print head being at the first line position is collected;
[0143] S152: traverse the test content and define the color state coefficient of the test content;
[0144] S153: Associating the color state coefficient of the test content with the color control logic, and defining a control matching table according to the color state coefficient of the test content and the color control logic;
[0145] S154: Associating and regulating the matching table, a plurality of printing parameters of the print head, and basic parameters of the printing paper;
[0146] S155: adjusting and controlling a matching table based on a plurality of printing parameters of the print head and basic parameters of the printing paper, and defining a corresponding matching relationship based on the adjusting and controlling matching table;
[0147] S156: Building a self-regulating relationship according to the matching relationship, the plurality of printing parameters and the basic parameters of the printing paper;
[0148] S157: triggering self-regulation of multiple printing parameters of the print head and basic parameters of the printing paper based on the self-regulation relationship and multiple sub-content sets in the content to be printed.
[0149] In an embodiment of the present application, in the color control logic, test printing is performed based on the print head at the first line position, and the test content of the print head at the first line position is collected to facilitate control of the test content of the print head at the first line position.
[0150] At this time, traverse the test content and define the color state coefficient of the test content to facilitate the control of the color state coefficient of the test content. At the same time, associate the color state coefficient of the test content and the color control logic, and define a control matching table based on the color state coefficient of the test content and the color control logic, so as to introduce the control matching table and further process the control matching table.
[0151] Therefore, an association control matching table, multiple printing parameters of the print head and basic parameters of the printing paper are associated; the control matching table is matched based on the multiple printing parameters of the print head and the basic parameters of the printing paper, and the corresponding matching relationship is defined based on the control matching table, so as to define the matching relationship, thereby constructing a self-control relationship according to the matching relationship, multiple printing parameters and the basic parameters of the printing paper; based on the self-control relationship and multiple sub-content sets in the content to be printed, the self-control of the multiple printing parameters of the print head and the basic parameters of the printing paper is triggered, and then the self-control of the multiple printing parameters of the print head and the basic parameters of the printing paper is introduced, and the sub-control mechanism is managed and controlled, so as to facilitate the autonomous control of the multiple printing parameters of the print head and the basic parameters of the printing paper based on the sub-control mechanism, and adapt to different printing papers and print heads.
[0152] refer to Figure 7 , S16: real-time monitoring of the print content of the print head at the first line position, and defining a plurality of color change areas according to the traversal of the print content, determining a color change trajectory according to the plurality of color change areas, and triggering the print head to dynamically control the color of the printing paper according to the color change trajectory, and regulating a plurality of printing parameters of the print head and basic parameters of the printing paper according to the dynamic balance relationship;
[0153] In the specific implementation process of the present invention, the specific steps may be:
[0154] S161: When the multiple printing parameters of the print head and the basic parameters of the printing paper are in a self-regulating state, printing is performed on the first line of the printing paper based on the print head, and the printed content is dynamically output;
[0155] S162: real-time monitoring of the print content of the print head at the first line position;
[0156] S163: traversing the printed content, and dividing the printed content into a plurality of color areas;
[0157] S164: defining a plurality of color change regions based on the plurality of color regions and the printing direction;
[0158] S165: determining a color change trajectory according to the multiple color change regions and the multiple sub-content sets in the content to be printed;
[0159] S166: defining a plurality of color change nodes according to the color change trajectory, and triggering the print head to dynamically control the color of the printing paper based on the plurality of color change nodes;
[0160] S167: When the print head controls the dynamic color of the printing paper, a corresponding dynamic balance relationship is defined based on the dynamic color control;
[0161] S168: Regulating multiple printing parameters of the print head and basic parameters of the printing paper according to the dynamic balance relationship to ensure the color uniformity of the printed content at the first line position in the printing paper.
[0162] During the specific implementation of the present invention, the print content of the print head at the first line position is monitored in real time, and a plurality of color change areas are defined according to the traversal of the print content, a color change trajectory is determined according to the plurality of color change areas, and the print head is triggered to dynamically control the color of the printing paper according to the color change trajectory, and a plurality of printing parameters of the print head and basic parameters of the printing paper are regulated according to the dynamic balance relationship, so as to introduce dynamic regulation and self-regulation for a plurality of printing parameters and basic parameters of the printing paper, and control the printing effect of the print head in a plurality of regulation mechanisms, thereby ensuring that the print head performs multi-dimensional regulation on the color of the content to be printed at the first line position, ensuring the color uniformity of the printed content at the first line position in the printing paper, and avoiding the color difference of the printed content at the first line position in the printing paper.
[0163] In an embodiment of the present application, when multiple printing parameters of the print head and basic parameters of the printing paper are in a self-regulating state, the print head prints the first line of the printing paper and dynamically outputs the printed content to facilitate dynamic processing of the printed content.
[0164] At this time, the printing content of the print head at the first line position is monitored in real time; the printing content is traversed, and multiple color areas are divided according to the printing content, so as to facilitate comparative control of multiple color areas. At the same time, multiple color change areas are defined based on multiple color areas and printing directions, thereby introducing multiple color change areas.
[0165] Furthermore, a color change trajectory is determined based on multiple color change areas and multiple sub-content sets in the content to be printed, so as to define the color change trajectory, thereby defining multiple color change nodes based on the color change trajectory, and triggering the print head to dynamically control the color of the printing paper based on the multiple color change nodes, so as to trigger dynamic color control and dynamically adjust the content to be printed on the printing paper.
[0166] Therefore, when the print head controls the dynamic color of the printing paper, a corresponding dynamic balance relationship is defined based on the dynamic color control; multiple printing parameters of the print head and basic parameters of the printing paper are regulated according to the dynamic balance relationship to ensure the color uniformity of the printed content at the first line of the printing paper. At the same time, the printing effect of the print head is controlled in multiple regulation mechanisms, thereby ensuring that the print head regulates the color of the content to be printed at the first line in multiple dimensions, ensuring the color uniformity of the printed content at the first line of the printing paper, and avoiding color differences of the printed content at the first line of the printing paper.
[0167] In an embodiment of the present invention, through the method in the embodiment of the present invention, the content to be printed of the thermal printer is collected, and the first line position in the content to be printed is defined; the relative position of the print head and the first line position in the content to be printed is determined based on the position comparison of the current position of the print head and the first line position in the content to be printed; if the print head is in the first line position, the first printing color level of the print head relative to the printing paper is estimated based on multiple printing parameters; the second printing color level of the print head relative to the printing paper is estimated based on the basic parameters of the printing paper; the color state coefficient of the content to be printed is defined based on the first printing color level and the second printing color level, so as to control the color state coefficient of the content to be printed based on the first printing color level and the second printing color level, thereby realizing the estimation of the color state coefficient of the content to be printed, and triggering subsequent color control of the content to be printed based on the color state coefficient of the content to be printed.
[0168] At the same time, if the color state coefficient of the content to be printed is lower than the preset state coefficient, the color control logic is matched according to the color state coefficient; in the color control logic, a control matching table is defined according to the color state coefficient of the test content and the color control logic; self-control of multiple printing parameters of the print head and basic parameters of the printing paper is triggered; the printing content of the print head at the first line position is monitored in real time, and multiple color change areas are defined according to the traversal of the printing content, the color change trajectory is determined according to the multiple color change areas, and the dynamic color control of the printing paper by the print head is triggered according to the color change trajectory, and the multiple printing parameters of the print head and the basic parameters of the printing paper are controlled according to the dynamic balance relationship, so as to introduce dynamic control and self-control for multiple printing parameters and basic parameters of the printing paper, and control the printing effect of the print head in multiple control mechanisms, thereby ensuring that the print head controls the color of the content to be printed at the first line position in multiple dimensions, ensuring the color uniformity of the printed content at the first line position in the printing paper, and avoiding color differences in the printed content at the first line position in the printing paper.
[0169] See also Figure 8 , Figure 8 It is a schematic diagram of the structure of the control system for the first line of printing paper of the thermal printer in the embodiment of the present invention.
[0170] like Figure 8 As shown, a thermal printer controls the first line of printing paper, and the thermal printer controls the first line of printing paper, comprising:
[0171] The acquisition module 21 is used to acquire the content to be printed by the thermal printer and define the position of the first line in the content to be printed;
[0172] A position module 22, for determining the relative position of the print head and the first line position according to the position comparison between the current position of the print head and the first line position in the content to be printed;
[0173] The printing color grade module 23 is used for estimating the first printing color grade of the printing head relative to the printing paper according to a plurality of printing parameters if the printing head is at the first line position; estimating the second printing color grade of the printing head relative to the printing paper according to the basic parameters of the printing paper;
[0174] A matching module 24, configured to define a color state coefficient of the content to be printed according to the first printing color level and the second printing color level, and if the color state coefficient of the content to be printed is lower than a preset state coefficient, match the color control logic according to the color state coefficient;
[0175] The self-regulation module 25 is used to define a regulation matching table according to the color state coefficient of the test content and the color regulation logic in the color regulation logic; trigger the self-regulation of multiple printing parameters of the print head and basic parameters of the printing paper;
[0176] The dynamic control module 26 is used to monitor the printing content of the print head at the first line position in real time, and define multiple color change areas according to the traversal of the printing content, determine the color change trajectory according to the multiple color change areas, and trigger the print head to dynamically control the color of the printing paper according to the color change trajectory, and adjust multiple printing parameters of the print head and the basic parameters of the printing paper according to the dynamic balance relationship.
[0177] See also Fig. 9 , refer to the following Fig. 9 The electronic device 40 according to this embodiment of the present invention will be described. Fig. 9 The electronic device 40 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0178] like Fig. 9 As shown, the electronic device 40 is in the form of a general computing device. The components of the electronic device 40 may include but are not limited to: at least one processing unit 41, at least one storage unit 42, and a bus 43 connecting different system components (including the storage unit 42 and the processing unit 41).
[0179] The storage unit stores program codes, which can be executed by the processing unit 41, so that the processing unit 41 executes the steps according to various exemplary embodiments of the present invention described in the above “Embodiment Method” section of this specification.
[0180] The storage unit 42 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 421 and / or a cache memory unit 422 , and may further include a read-only memory unit (ROM) 423 .
[0181] The storage unit 42 may also include a program / utility 424 having a set of (at least one) dynamic control modules 425, such dynamic control modules 425 including but not limited to: an operating system, one or more application programs, other dynamic control modules and program data, each of which or some combination may include the implementation of a network environment.
[0182] Bus 43 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0183] The electronic device 40 may also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 40, and / or any device that enables the electronic device 40 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 44. Furthermore, the electronic device 40 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 45. Fig. 9 As shown, the network adapter 45 communicates with other modules of the electronic device 40 via the bus 43. It should be understood that although Fig. 9 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup planning systems.
[0184] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0185] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. In addition, it stores computer program instructions, and when the computer program instructions are executed by a computer, the computer executes the above method.
[0186] In addition, the above is a detailed introduction to the thermal printer provided in the embodiment of the present invention. The principle and implementation mode of the present invention are explained by using specific examples. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for controlling the first line of printing paper by a thermal printer, characterized in that: Applicable to thermal printers to control the first line of printing paper; The method for controlling the first line of printing paper by the thermal printer comprises: Collect the content to be printed by the thermal printer and define the position of the first line in the content to be printed; Determining the relative position of the print head and the first line position according to the position comparison of the current position of the print head and the first line position in the content to be printed; If the print head is at the first line position, a first printing color level of the print head relative to the printing paper is estimated according to a plurality of printing parameters; a second printing color level of the print head relative to the printing paper is estimated according to the basic parameters of the printing paper; Defining a color state coefficient of the content to be printed according to the first printing color level and the second printing color level, and if the color state coefficient of the content to be printed is lower than a preset state coefficient, matching a color control logic according to the color state coefficient; In the color control logic, a control matching table is defined according to the color state coefficient of the test content and the color control logic; multiple printing parameters of the print head and basic parameters of the printing paper are triggered to self-regulate; Monitor the print content of the print head at the first line position in real time, and define multiple color change areas according to the traversal of the print content, determine the color change trajectory according to the multiple color change areas, and trigger the print head to dynamically control the color of the printing paper according to the color change trajectory, and adjust multiple printing parameters of the print head and basic parameters of the printing paper according to the dynamic balance relationship; The method of collecting the content to be printed by the thermal printer and defining the first line position in the content to be printed includes: collecting the content to be printed by the thermal printer; dividing the content to be printed into multiple sub-content sets according to the content to be printed; constructing a distribution order of the multiple sub-content sets based on the multiple sub-content sets and the line branch logic of the content to be printed; constructing optimized content to be printed according to the distribution order of the multiple sub-content sets and the multiple sub-content sets, wherein the optimized content to be printed contains line branch marks of two adjacent sub-content sets; defining the first line position in the content to be printed according to the multiple line branch marks and the optimized content to be printed, and matching the first line content in the content to be printed according to the first line position in the content to be printed; The method of defining a color state coefficient of the content to be printed according to the first printing color level and the second printing color level, and matching a color control logic according to the color state coefficient if the color state coefficient of the content to be printed is lower than a preset state coefficient, includes: freezing the first printing color level and the second printing color level; associating the first printing color level and the second printing color level, and constructing a color level set according to the first printing color level and the second printing color level; defining a color state coefficient of the content to be printed according to the color level set and a color coefficient of a printing surface of printing paper; comparing the color state coefficient of the content to be printed with the preset state coefficient; if the color state coefficient of the content to be printed is lower than the preset state coefficient, triggering control of the color state coefficient; in the control of the color state coefficient, matching a corresponding color control logic according to the color state coefficient and a plurality of sub-content sets in the content to be printed; The method monitors the print content of the print head at the first line position in real time, defines multiple color change areas according to the traversal of the print content, determines the color change trajectory according to the multiple color change areas, triggers the print head to dynamically control the color of the print paper according to the color change trajectory, and adjusts the multiple printing parameters of the print head and the basic parameters of the print paper according to the dynamic balance relationship, including: when the multiple printing parameters of the print head and the basic parameters of the print paper are in a self-regulating state, printing is performed on the first line position of the print paper based on the print head, and the print content is dynamically output; real-time monitoring of the print content of the print head at the first line position; traversing the print content, and adjusting the print content according to the print content Divide into multiple color areas; define multiple color change areas based on the multiple color areas and printing directions; determine the color change trajectory based on the multiple color change areas and multiple sub-content sets in the content to be printed; define multiple color change nodes based on the color change trajectory, and trigger the print head to dynamically control the color of the printing paper based on the multiple color change nodes; when the print head dynamically controls the color of the printing paper, define a corresponding dynamic balance relationship based on the dynamic color control; regulate multiple printing parameters of the print head and basic parameters of the printing paper according to the dynamic balance relationship to ensure the color uniformity of the printed content in the first line position in the printing paper.
2. The method for controlling the first line of printing paper by a thermal printer according to claim 1, characterized in that: The determining the relative position of the print head and the first line position according to the position comparison of the current position of the print head and the first line position in the content to be printed comprises: Freeze the current position of the print head and the position of the first line in the content to be printed; defining a position difference amount based on a current position of the print head and a position of a first line in the content to be printed; The relative distance between the current position of the print head and the position of the first line in the content to be printed is determined according to the position difference; Collect the position of the first line in the content to be printed and the moving direction of the printing paper; Define the printing direction according to the position of the first line in the content to be printed and the moving direction of the printing paper; defining the orientation of the print head relative to the first line position in the content to be printed based on the current position of the print head and the first line position in the content to be printed; defining a relative direction between a current position of the print head and the position of the first line in the content to be printed according to the orientation of the print head relative to the position of the first line in the content to be printed and the printing direction; The relative position of the print head and the first line position is determined according to the relative direction and the relative distance.
3. The method for controlling the first line of printing paper by a thermal printer according to claim 1, characterized in that: If the print head is at the first line position, estimating a first printing color level of the print head relative to the printing paper according to a plurality of printing parameters; The second printing color level of the print head relative to the printing paper is estimated according to the basic parameters of the printing paper, including: If the print head is at the first line position, the traversal of the print head and the traversal of the printing paper are triggered; Associating the traversal of the print head and the traversal of the printing paper, and performing synchronous processing on the traversal of the print head and the traversal of the printing paper; Defining a plurality of printing parameters of the print head based on the traversal of the print head, and defining basic parameters of the print paper based on the traversal of the print paper; Freeze a plurality of printing parameters, and define a first matching coefficient between two adjacent printing parameters; defining a first matching level according to a plurality of first matching coefficients, and estimating a first printing color level of the print head relative to the printing paper according to a plurality of printing parameters and the first matching level; Determine the basic parameters of the printing paper, and associate the basic parameters of the printing paper with the coefficient of the effect of the print head on the printing paper; A second printing color level of the print head relative to the printing paper is estimated according to basic parameters of the printing paper and a coefficient of action of the print head on the printing paper.
4. The method for controlling the first line of printing paper by a thermal printer according to claim 1, characterized in that: In the color control logic, a control matching table is defined according to the color state coefficient of the test content and the color control logic; Trigger the self-regulation of multiple printing parameters of the print head and basic parameters of the printing paper, including: In the color control logic, test printing is performed based on the print head being at the first line position, and the test content of the print head at the first line position is collected; Traverse the test content and define the color state coefficients of the test content; The color state coefficients and the color control logic of the test content are associated, and a control matching table is defined according to the color state coefficients and the color control logic of the test content.
5. The method for controlling the first line of printing paper by a thermal printer according to claim 4, characterized in that: In the color control logic, a control matching table is defined according to the color state coefficient of the test content and the color control logic; Triggering the self-regulation of multiple printing parameters of the print head and basic parameters of the printing paper, including: Associating and regulating a matching table, a plurality of printing parameters of a print head and basic parameters of printing paper; A matching table is regulated based on a plurality of printing parameters of the print head and basic parameters of the printing paper, and a corresponding matching relationship is defined based on the matching table; Building a self-regulating relationship based on the matching relationship, multiple printing parameters and basic parameters of the printing paper; Based on the self-regulation relationship and the multiple sub-content sets in the content to be printed, self-regulation of multiple printing parameters of the print head and basic parameters of the printing paper is triggered.
6. A thermal printer's first line control system for printing paper, characterized in that: The control system of the first line of printing paper by the thermal printer is applied to the control method of the first line of printing paper by the thermal printer as claimed in any one of claims 1 to 5, and the control system of the first line of printing paper by the thermal printer includes: The acquisition module is used to acquire the content to be printed by the thermal printer and define the position of the first line in the content to be printed; A position module, used for determining the relative position of the print head and the first line position according to the position comparison of the current position of the print head and the first line position in the content to be printed; A printing color grade module, for estimating a first printing color grade of the print head relative to the printing paper according to a plurality of printing parameters if the print head is at the first line position; and estimating a second printing color grade of the print head relative to the printing paper according to a basic parameter of the printing paper; A matching module, used for defining a color state coefficient of the content to be printed according to the first printing color level and the second printing color level, and matching a color control logic according to the color state coefficient if the color state coefficient of the content to be printed is lower than a preset state coefficient; A self-regulation module is used to define a regulation matching table in the color regulation logic according to the color state coefficient of the test content and the color regulation logic; trigger the self-regulation of multiple printing parameters of the print head and basic parameters of the printing paper; A dynamic control module is used to monitor the print content of the print head at the first line position in real time, and define multiple color change areas according to the traversal of the print content, determine the color change trajectory according to the multiple color change areas, and trigger the print head to dynamically control the color of the printing paper according to the color change trajectory, and adjust multiple printing parameters of the print head and basic parameters of the printing paper according to the dynamic balance relationship; The method of collecting the content to be printed by the thermal printer and defining the first line position in the content to be printed includes: collecting the content to be printed by the thermal printer; dividing the content to be printed into multiple sub-content sets according to the content to be printed; constructing a distribution order of the multiple sub-content sets based on the multiple sub-content sets and the line branch logic of the content to be printed; constructing optimized content to be printed according to the distribution order of the multiple sub-content sets and the multiple sub-content sets, wherein the optimized content to be printed contains line branch marks of two adjacent sub-content sets; defining the first line position in the content to be printed according to the multiple line branch marks and the optimized content to be printed, and matching the first line content in the content to be printed according to the first line position in the content to be printed; The method of defining a color state coefficient of the content to be printed according to the first printing color level and the second printing color level, and matching a color control logic according to the color state coefficient if the color state coefficient of the content to be printed is lower than a preset state coefficient, includes: freezing the first printing color level and the second printing color level; associating the first printing color level and the second printing color level, and constructing a color level set according to the first printing color level and the second printing color level; defining a color state coefficient of the content to be printed according to the color level set and a color coefficient of a printing surface of printing paper; comparing the color state coefficient of the content to be printed with the preset state coefficient; if the color state coefficient of the content to be printed is lower than the preset state coefficient, triggering control of the color state coefficient; in the control of the color state coefficient, matching a corresponding color control logic according to the color state coefficient and a plurality of sub-content sets in the content to be printed; The method monitors the print content of the print head at the first line position in real time, defines multiple color change areas according to the traversal of the print content, determines the color change trajectory according to the multiple color change areas, triggers the print head to dynamically control the color of the print paper according to the color change trajectory, and adjusts the multiple printing parameters of the print head and the basic parameters of the print paper according to the dynamic balance relationship, including: when the multiple printing parameters of the print head and the basic parameters of the print paper are in a self-regulating state, printing is performed on the first line position of the print paper based on the print head, and the print content is dynamically output; real-time monitoring of the print content of the print head at the first line position; traversing the print content, and adjusting the print content according to the print content Divide into multiple color areas; define multiple color change areas based on the multiple color areas and printing directions; determine the color change trajectory based on the multiple color change areas and multiple sub-content sets in the content to be printed; define multiple color change nodes based on the color change trajectory, and trigger the print head to dynamically control the color of the printing paper based on the multiple color change nodes; when the print head dynamically controls the color of the printing paper, define a corresponding dynamic balance relationship based on the dynamic color control; regulate multiple printing parameters of the print head and basic parameters of the printing paper according to the dynamic balance relationship to ensure the color uniformity of the printed content in the first line position in the printing paper.
