A printing control method, device, storage medium and electronic equipment
By automatically identifying the characteristics of the printed content and matching the heating control mode, the problem of matching print quality and speed in thermal printing equipment has been solved, improving the intelligence of the equipment and the user experience.
Patent Information
- Application Number
- CN202611517860.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-28
- Publication Date
- 2026-11-27
AI Technical Summary
Existing thermal printing equipment struggles to flexibly adapt to different print quality or speed requirements based on the actual needs of the printed content. The user configuration process is cumbersome and prone to errors, resulting in insufficient equipment intelligence and user experience.
By acquiring the printing data of the printing task, the system automatically identifies the characteristic parameters of the printed content and dynamically matches the heating control mode according to the preset mode decision parameters, including the energy application sequence and cooling interval, to achieve differentiated control of printing quality and speed.
It enables users to meet diverse needs for print quality and speed without manual configuration, improving the intelligence and printing efficiency of thermal printing equipment and lowering the operational threshold.
Smart Images

Figure CN123169569A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular to a printing control method, apparatus, storage medium, and electronic device. Background Technology
[0002] Currently, thermal printing equipment is widely used in retail, logistics, manufacturing, and office settings. Different printing tasks have varying requirements for print quality and speed. Existing thermal printing equipment typically uses fixed heating control methods, making it difficult to flexibly adapt to different print quality or speed requirements based on the actual needs of the printed content. While some devices allow users to manually select the print mode before printing, ordinary users often struggle to determine which mode is suitable for the current content, making the configuration process cumbersome and prone to errors. This results in the equipment failing to balance print quality and efficiency, thus limiting the intelligence level and user experience of thermal printing equipment. Summary of the Invention
[0003] This specification provides a printing control method, apparatus, storage medium, and electronic device, the technical solutions of which are as follows: Firstly, embodiments of this specification provide a printing control method, the method comprising: Obtain the print job and the corresponding print data; Determine at least one heating control mode corresponding to the printing task based on the printing data; According to the heating control mode, the print head is controlled to print on the printing medium; among them, different types of heating control modes correspond to different print quality and print speed.
[0004] Secondly, embodiments of this specification provide a printing control device, the device comprising: The acquisition module is used to acquire the print task and the print data corresponding to the print task; The determining module is used to determine at least one heating control mode corresponding to the printing task based on the printing data; The printing module is used to control the print head to print on the printing medium according to the heating control mode; wherein, the printing quality and printing speed are different for different types of heating control modes.
[0005] Thirdly, this specification provides a computer storage medium storing at least one instruction adapted for loading by a processor and executing method steps of one or more embodiments of this specification.
[0006] Fourthly, embodiments of this specification provide an electronic device that may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to execute the above-described method steps.
[0007] The beneficial effects of the technical solutions provided in some embodiments of this specification include at least the following: In one or more embodiments of this specification, a printing task and corresponding printing data are acquired; at least one heating control mode corresponding to the printing task is determined based on the printing data; and the print head is controlled to print on the printing medium according to the heating control mode. Different types of heating control modes correspond to different print qualities and printing speeds. By acquiring the printing data corresponding to the printing task and determining the heating control mode accordingly, the different needs for print quality or printing speed in different scenarios can be met without manual configuration by the user. This achieves automatic adaptation of the heating control mode to the printing task, lowers the user's operating threshold, and improves the intelligence level and printing efficiency of the thermal printing equipment. Attached Figure Description
[0008] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 This is a schematic flowchart of a printing control method provided in the embodiments of this specification; Figure 2 This is a flowchart illustrating another printing control method provided in the embodiments of this specification; Figure 3 This is a schematic diagram of a process for determining a heating control mode provided in an embodiment of this specification; Figure 4 This is a schematic diagram of another process for determining the heating control mode provided in the embodiments of this specification; Figure 5 This is a schematic diagram of the structure of a printing control device provided in the embodiments of this specification; Figure 6 This is a schematic diagram of the structure of an electronic device provided in the embodiments of this specification. Detailed Implementation
[0010] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0011] In the description of this specification, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. In the description of this specification, it should be noted that, unless otherwise expressly specified and limited, "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. Those skilled in the art can understand the specific meaning of the above terms in this specification based on the specific circumstances. Furthermore, in the description of this specification, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.
[0012] The present specification will now be described in detail with reference to specific embodiments.
[0013] In one embodiment, such as Figure 1 As shown, a printing control method is proposed, which can be implemented using a computer program and can run on a printing control device based on the von Neumann architecture. This computer program can be integrated into an application or run as a standalone utility application. The printing control device can be a terminal device, including but not limited to: desktop label printers, industrial label printers, portable label printers, all-in-one printers and labelers, or a printing system composed of a host computer and a printing engine. The host computer includes, but is not limited to: personal computers, tablet computers, handheld terminals, industrial control computers, etc.
[0014] Specifically, the printing control method includes: S101: Obtain the print task and the corresponding print data; A print job can be a set of print job instructions to be executed, including metadata such as page layout information, resolution settings, and target output device identifier. Print data can be a bitmap stream, a rasterized pixel matrix, or a sequence of graphic objects described in the printer's language and associated with the print job.
[0015] For example, the executing entity in this application can be a printer. The printer can receive job requests from external devices through its communication interface, parse and cache the received data stream, and extract the underlying bitmap information and task attribute information for subsequent control. For instance, when a user sends a mixed document containing text and photos to a thermal printer via a mobile terminal, the processor receives the print job package of the document, extracts the task header information and the rasterized binary bitmap stream as the input basis for subsequent processing. This acquisition method ensures that the data source upon which subsequent mode decisions are based is complete and accurate, avoiding misjudgments in heating control strategies due to data gaps, and providing reliable information support for dynamically adapting to different content areas.
[0016] S102: Determine at least one heating control mode corresponding to the printing task based on the printing data; The heating control mode can be a set of parameter configurations used to adjust the heating behavior of the printhead. Different configurations correspond to different energy application timing, cooling intervals, and thermal history compensation strategies.
[0017] For example, content analysis or feature extraction can be performed on the print data to identify the content attributes or physical state of the current area to be printed. The identification results are then compared with preset pattern mapping rules to select a heating parameter combination suitable for the current scenario. For instance, if the print rate of a certain row of pixels exceeds 0.85 and the edge density is higher than a threshold, the row is determined to be a high-density image-text mixed area, and the heating control mode for high print quality is automatically switched. When multiple consecutive rows are detected to be solid color backgrounds, a heating control mode for high print speed is adopted. Through the automatic identification and matching of multi-dimensional feature parameters, appropriate heating strategies can be dynamically allocated to print areas or tasks with different characteristics, effectively improving print speed while ensuring print quality, and overcoming the shortcomings of a single fixed heating strategy that cannot balance speed and quality.
[0018] S103: According to the heating control mode, control the print head to print on the printing medium; wherein, the printing quality and printing speed corresponding to different types of heating control modes are different.
[0019] For example, a corresponding heating pulse sequence can be generated and driven by the printhead based on the timing parameters, energy grading rules, and cooling time in the selected heating control mode. Different types of heating control modes correspond to different print quality and print speed. High-quality heating control modes typically employ finer energy distribution and longer cooling intervals to improve color uniformity and edge sharpness, while high-speed heating control modes simplify the heating process and shorten cooling time to increase paper feed rate. For instance, when executing a high-quality heating control mode, the printhead performs segmented heating on each pixel, including basic heating and three fine supplementary heatings, and waits for a 1.2-millisecond cooling time after each heating. In contrast, when executing a high-speed heating control mode, only a single basic heating is performed, coupled with a 0.6-millisecond cooling time, increasing the paper feed speed by approximately 40%. This differentiated control method can achieve a dynamic balance between quality and speed within the same printing task, satisfying users' high-fidelity requirements for critical content while avoiding unnecessary time and energy consumption caused by consistently high-quality printing.
[0020] In the embodiments of this specification, a printing task and corresponding printing data are acquired; at least one heating control mode corresponding to the printing task is determined based on the printing data; and the print head is controlled to print on the printing medium according to the heating control mode. Different types of heating control modes correspond to different print qualities and printing speeds. By adopting the above technical solution, and acquiring the printing data corresponding to the printing task to determine the heating control mode accordingly, the different needs for print quality or printing speed in different scenarios can be met without manual configuration by the user. This achieves automatic adaptation of the heating control mode to the printing task, reduces the user's operational threshold, and improves the intelligence level and printing efficiency of the thermal printing equipment.
[0021] Please see Figure 2 , Figure 2 This is a flowchart illustrating another embodiment of a printing control method proposed in this specification. Specifically: S201: Obtain the print task and the corresponding print data; For details, please refer to the method steps in other embodiments of this specification, which will not be repeated here.
[0022] S202: Determine at least one heating control mode corresponding to the printing task based on the printing data; For details, please refer to the method steps in other embodiments of this specification, which will not be repeated here.
[0023] In one feasible implementation, step S202 includes the following steps: S11: Parse the printed data to obtain the parsing result, and extract feature parameters from the parsing result; The parsing result can be an intermediate data set containing page layout, pixel matrix, or task attributes obtained after decoding and structuring the original print data. For example, it can be a matrix containing row and column pixel information obtained after converting Page Description Language (PDL) into a raster image.
[0024] Feature parameters can be quantitative indicators that reflect the physical properties or visual complexity of the printed content, such as the content feature type of different printing areas, the printing rate of pixels per line, edge density, task type identifier, or consumable color rendering level.
[0025] For example, the printer's internal parsing engine can read the cached print data stream, and a decoding algorithm can be used to reconstruct the page layout information and pixel matrix to form the parsing result. A feature extraction algorithm can then traverse each data block or pixel row in the parsing result to calculate the corresponding feature parameters. For instance, when the printer receives PDL data containing text and photos, it converts the PDL data into a bitmap matrix as the parsing result. The feature extraction algorithm scans the current row, counts the number of pixels that need to be colored, calculates the print rate of the current row to be 0.85, and uses this print rate as a feature parameter. By performing deep analysis and feature quantization on the raw data, the printer can accurately capture the local details and overall attributes of the content to be printed, providing reliable data support for subsequent pattern decisions and avoiding print quality degradation caused by relying on manual experience to set a single parameter.
[0026] S12: Match the feature parameters with preset mode decision parameters to obtain a matching result, and determine at least one heating control mode corresponding to the printing task based on the matching result.
[0027] The preset mode decision parameters can be benchmark thresholds or classification labels pre-configured in the printer's memory for determining the heating control mode, such as fine content type, coarse content type, first print rate threshold, second print rate threshold, first edge density threshold, second edge density threshold, image task identifier, text type identifier, or color rendering difficulty threshold, etc.
[0028] The matching result can be a logical judgment signal generated by comparing the feature parameters with the preset mode decision parameters, such as a Boolean value signal indicating whether the current row belongs to a high print rate area or a low print rate area.
[0029] For example, the printer's internal decision module can read the extracted feature parameters and retrieve the corresponding preset mode decision parameters from the memory. The decision module compares the feature parameters with the preset mode decision parameters numerically or performs tag matching to generate a matching result. Based on the logical state indicated by the matching result, the decision module selects the corresponding mode from a variety of pre-stored heating control modes to determine the heating control mode used for the current printing task or the current printing line. For example, if the decision module reads that the print rate feature parameter of the current line is 0.85, it retrieves the preset first print rate threshold of 0.80 and the second print rate threshold of 0.30. The decision module compares 0.85 with 0.80 to generate a matching result indicating a high print rate. Based on the matching result, the decision module determines that the current line uses a high-print-quality heating control mode. Through an automated matching and decision-making mechanism, the most suitable heating strategy can be dynamically assigned to printing content with different features in real time, effectively improving the printing speed of flat areas while ensuring the printing quality of fine areas, thus achieving global optimization of printing efficiency and output quality.
[0030] In one feasible implementation, the feature parameters include content feature types for different printing areas, and the mode decision parameters include fine content type and coarse content type. S12 includes the following steps: S1211: Match the content feature type of the printed area with the fine content type and the coarse content type to obtain the content matching result; Content feature types can be attributes that reflect the visual complexity and detail richness of images or text within the printed area, such as the density of text strokes or the sharpness of image edges.
[0031] The content refinement category can be classified based on visual features that contain rich details, fine strokes, or complex edges, such as local details in high-resolution photos, the intersections of strokes in small Chinese characters, or tiny modules in QR codes.
[0032] The "coarse content" category can be classified based on visual features such as fewer details, smooth edges, or large areas of color blocks, such as large areas of solid color backgrounds or the inner filling areas of bold text. Content matching results can be indicator signals generated by comparing content feature types with preset classification labels.
[0033] For example, the system can traverse each printed area defined in the parsed results, extract the pixel distribution features or grayscale gradient features of each area, and classify each area into its corresponding content feature type. The extracted content feature types are then compared with preset feature templates for fine and coarse content types stored in memory to generate content matching results. For instance, if the printer parses a ticket containing a portrait photo and a bold title, the image analysis module extracts the pixel grayscale gradient of the portrait photo area, identifying it as a fine content type, and extracts the pixel distribution of the filled area within the bold title, identifying it as a coarse content type. Matching the content feature type of the portrait photo area with the fine content type yields a fine-grained content matching result. Through region-level feature matching based on visual complexity, it is possible to accurately identify dense and smooth areas of detail in the printed content, providing precise region-level decision-making basis for subsequent differentiated heating and avoiding detail blurring or overheating of large areas of color blocks caused by uniform global heating.
[0034] S1212: When the content matching result indicates that the content feature type of the printing area belongs to the fine content type, determine that the printing task of the printing area corresponds to the high-quality heating control mode; For example, when a signal indicating that the content feature type belongs to the fine content type is identified, a high-quality heating control mode is retrieved from the pre-stored heating control mode library and configured as the heating strategy adopted by the current printing area during the printing task. For instance, when the mode decision module receives a content matching result indicating fine content in a portrait photo area, it automatically assigns a high-quality heating control mode to the printing area containing the portrait photo, controlling the print head to use energy-graded heating and a longer first cooling time when printing the area. Automatically matching a high-quality heating strategy for areas rich in detail can effectively compensate for edge blurring caused by heat diffusion, improve image detail and text edge sharpness, and ensure the output quality of key visual content.
[0035] S1213: When the content matching result indicates that the content feature type of the printing area belongs to the content coarse type, determine that the printing task of the printing area corresponds to the high printing speed heating control mode.
[0036] For example, when a signal indicating that the content feature type belongs to the coarse type is detected, a high-speed heating control mode is retrieved from the pre-stored heating control mode library, and the high-speed heating control mode is configured as the heating strategy adopted by the current printing area during the printing task. For instance, when the mode decision module receives the content matching result indicating coarseness from the bold title's inner fill area, it automatically assigns the high-speed heating control mode to the printing area containing the bold title fill area, controlling the print head to adopt a time-sequential segmented heating method and a shorter second cooling time when printing the printing area. Automatically matching a high-speed heating strategy to areas with less detail simplifies the heating process and shortens the cooling time, significantly reducing the printing time per line, effectively improving overall printing efficiency, and preventing thermal smudging of large areas of color due to overheating.
[0037] In one feasible implementation, the feature parameters include the printing rate per row of pixels, and the mode decision parameters include a first printing rate threshold and a second printing rate threshold, wherein the first printing rate threshold is greater than the second printing rate threshold; S12 includes the following steps: Please see Figure 3 , Figure 3 This is a flowchart illustrating a method for determining a heating control mode as presented in this specification.
[0038] S1221: Compare the printing rate of the current row with the first printing rate threshold and the second printing rate threshold respectively to obtain a second comparison result; Print rate can be defined as the proportion of pixels requiring color rendering to the total number of pixels in the current row, calculated per row. For example, if a row has 1000 pixels, and 850 of them require color rendering, the print rate is 0.85. The current row can be the row of pixels the printer is currently processing or about to process for heat printing. The first print rate threshold can be a preset upper limit for determining high print rate areas, such as 0.80. The second print rate threshold can be a preset lower limit for determining low print rate areas, such as 0.30, and the first print rate threshold is greater than the second print rate threshold. The second comparison result can be a numerical relationship indication signal generated by comparing the print rate of the current row with the first and second print rate thresholds respectively.
[0039] For example, the print rate of the current line can be read, and a first print rate threshold and a second print rate threshold pre-stored in memory can be retrieved. The print rate is then compared with each of the two thresholds to generate a second comparison result. For instance, if the printer's decision module reads that the print rate of the current line is 0.85, it compares 0.85 with the first print rate threshold of 0.80 and the second print rate threshold of 0.30 to generate a second comparison result indicating that the print rate is greater than the first print rate threshold. By quantitatively comparing the print rate with the two thresholds, the color density of the current line can be objectively assessed, providing a precise numerical basis for subsequent heating mode selection and avoiding mode misselection caused by subjective judgment.
[0040] S1222: When the second comparison result indicates that the printing rate is greater than or equal to the first printing rate threshold, determine from the heating control modes that the current line in the printing task adopts a high printing quality heating control mode. For example, a second comparison result can be read. When a signal indicating a print rate greater than or equal to a first print rate threshold is detected, a high-quality heating control mode is retrieved from a pre-stored heating control mode library and configured as the heating strategy used by the current row during the printing task. For instance, if the print rate of the current row is 0.92, the first print rate threshold is 0.80, and the second comparison result indicates that 0.92 is greater than 0.80, the printer's mode decision module determines that the current row should use a high-quality heating control mode, controlling the print head to perform energy-graded heating and a longer first cooling time for the current row. High print rate areas typically contain densely packed color pixels, resulting in a more pronounced thermal diffusion effect. Automatically matching a high-quality heating strategy can effectively compensate for thermal interference between adjacent pixels, ensuring color uniformity and edge sharpness in dense areas.
[0041] S1223: When the second comparison result indicates that the printing rate is less than or equal to the second printing rate threshold, determine that the current line in the printing task adopts a high printing speed heating control mode.
[0042] For example, when a signal indicating a print rate less than or equal to a second print rate threshold is detected, a high-speed heating control mode is retrieved from a pre-stored heating control mode library and configured as the heating strategy used for the current line during print job execution. For instance, if the print rate of the current line is 0.15, the second print rate threshold is 0.30, and a second comparison result indicates that 0.15 is less than 0.30, it is determined that the current line adopts a high-speed heating control mode, controlling the print head to perform sequential segmented heating and a shorter second cooling time for the current line. In low print rate areas, the color pixels are sparse, and the impact of heat diffusion is minimal. Automatically matching a high-speed heating strategy can effectively shorten the printing time per line while maintaining acceptable print quality, thus improving overall printing efficiency.
[0043] S1224: When the second comparison result indicates that the printing rate is greater than the second printing rate threshold and less than the first printing rate threshold, obtain the heating control mode of the previous line and determine that the current line in the printing task adopts the heating control mode of the previous line.
[0044] The previous line can be the row of pixels that has completed heating mode decisions or printing, which is immediately preceding the current line.
[0045] For example, when a signal indicating a print rate greater than a second print rate threshold and less than a first print rate threshold is detected, the heating control mode determined for the previous line is read from memory, and the heating control mode of the previous line is directly configured as the heating strategy used for the current line. For instance, if the print rate of the current line is 0.55, the first print rate threshold is 0.80, the second print rate threshold is 0.30, and the second comparison result indicates that 0.55 is between 0.30 and 0.80, and the heating control mode used in the previous line is a high-quality printing heating control mode, then it is determined that the current line will also use a high-quality printing heating control mode. Using the heating control mode of the previous line when the print rate is in the middle range effectively avoids frequent switching of heating modes between adjacent lines due to small fluctuations in print rate, reduces print quality jitter and mechanical vibration caused by repeated adjustments of the print head between different heating sequences, and ensures the continuity and stability of print output.
[0046] In one feasible implementation, the feature parameters include edge density, which measures the degree of image change of the current row relative to the previous row. The edge density is obtained by performing a bitwise XOR operation between the bitmap data of the current row and the bitmap data of the previous row, counting the number of bits with an XOR result of 1, and dividing the number of bits by the total number of bits in the current row. The mode decision parameters include a first edge density threshold and a second edge density threshold, wherein the first edge density threshold is greater than the second edge density threshold. S12 includes the following steps: Please see Figure 4 , Figure 4 This is a schematic diagram of another process for determining the heating control mode as presented in this manual.
[0047] S1231: Compare the edge density of the current row with the first edge density threshold and the second edge density threshold respectively to obtain a third comparison result; The first edge density threshold can be a preset upper limit benchmark for determining fine edge regions of the image, such as 0.60. The second edge density threshold can be a preset lower limit benchmark for determining flat regions of the image, such as 0.20. The third comparison result can be a numerical relationship indication signal generated by comparing the edge density of the current row with the first and second edge density thresholds.
[0048] For example, the edge density value of the current row can be read; a first edge density threshold and a second edge density threshold can be retrieved from the printer's memory; the edge density value can be compared with the first edge density threshold; the edge density value can be compared with the second edge density threshold; and a third comparison result can be generated based on the comparison results. For instance, if the edge density of the current row is read as 0.75, the first edge density threshold is 0.60, and the second edge density threshold is 0.20, comparing 0.75 with 0.60 and 0.20 generates a third comparison result indicating that the edge density is greater than the first edge density threshold. By quantitatively comparing the edge density with the dual thresholds, the degree of image change of the current row relative to the previous row can be objectively assessed, providing accurate numerical basis for subsequent heating mode selection.
[0049] S1232: When the third comparison result indicates that the edge density is greater than or equal to the first edge density threshold, it is determined that the current row is in the fine edge region of the image, and it is determined that the current row in the printing task adopts a high-quality heating control mode. Fine edge regions of an image can be areas where the color states of adjacent pixels frequently alternate or change drastically, such as the edges of text strokes or the outline of a photograph.
[0050] For example, the third comparison result can be read, and a signal indicating that the edge density is greater than or equal to the first edge density threshold can be identified. The current row is marked as a fine edge region of the image. A high-quality heating control mode is retrieved from a pre-stored heating control mode library and configured as the heating strategy used by the current row during the printing task. For instance, if the third comparison result indicates that the edge density of 0.75 is greater than the first edge density threshold of 0.60, the current row is marked as a fine edge region of the image, and a high-quality heating control mode is determined for the current row. The print head is then controlled to perform energy-graded heating and a longer first cooling time for the current row. Automatically matching a high-quality heating strategy for fine edge regions with drastic image changes can effectively suppress edge blurring and jaggedness caused by heat diffusion, and improve the sharpness of the image contour.
[0051] S1233: When the third comparison result indicates that the edge density is less than or equal to the second edge density threshold, it is determined that the current row is in a flat area of the image, and it is determined that the current row in the printing task adopts a high printing speed heating control mode.
[0052] Flat areas in an image can be regions where the color state of adjacent pixels remains consistent or changes only slightly, such as large areas of solid color background or the inner fill area of bold text.
[0053] For example, when a signal indicating that the edge density is less than or equal to the second edge density threshold is detected in the third comparison result, the current line is marked as a flat area of the image; a high-speed heating control mode is retrieved from the pre-stored heating control mode library; and the high-speed heating control mode is configured as the heating strategy adopted by the current line during the printing task. For instance, if the third comparison result indicates that the edge density of 0.10 is less than the second edge density threshold of 0.20, the current line is marked as a flat area of the image, and a high-speed heating control mode is determined for the current line. This controls the print head to perform time-segmented heating and a shorter second cooling time for the current line. Automatically matching a high-speed heating strategy to flat areas with gradual image changes can effectively shorten the printing time of a single line while maintaining acceptable print quality, thereby improving overall printing efficiency.
[0054] S1234: When the third comparison result indicates that the edge density is greater than the second edge density threshold and less than the first edge density threshold, the heating control mode of the previous row is obtained, and the heating control mode of the previous row is determined to be used for the current row in the printing task.
[0055] For example, when a signal indicating an edge density greater than a second edge density threshold and less than a first edge density threshold is identified in the third comparison result, the heating control mode determined for the previous row is read from the memory; and the heating control mode of the previous row is directly configured as the heating strategy used for the current row. For instance, if the third comparison result indicates an edge density of 0.45 that is greater than the second edge density threshold of 0.20 and less than the first edge density threshold of 0.60, and the heating control mode used in the previous row is read as a high-printing-speed heating control mode, it is determined that the current row will also use a high-printing-speed heating control mode. When the edge density is in the middle range, the heating control mode of the previous row is used, which can effectively avoid frequent switching of heating modes between adjacent rows due to small fluctuations in edge density, and reduce print quality jitter and mechanical vibration caused by repeated adjustments of the print head between different heating sequences.
[0056] In one feasible implementation, the method further includes: monitoring a mode switching signal; when the mode switching signal indicates a switch from the high-printing-speed heating control mode to the high-printing-quality heating control mode, acquiring a first position of the mode switching line and a second position preceding the first position; when the print head prints the printing medium to the second position, loading historical data cache of the thermal history algorithm required by the high-printing-quality heating control mode, so that when the print head prints the printing medium to the first position, printing is performed according to the high-printing-quality heating control mode.
[0057] The mode switching signal can be a trigger signal indicating that the print head is about to change the current heating control mode, such as a mode switching command issued by the host computer or a mode change flag generated after internal parsing of print data.
[0058] The mode switching line can be the starting pixel line in a print job where a new heating control mode begins to be used. The first position can be the physical vertical coordinate of the mode switching line on the print media or the corresponding line number, such as line 100. The second position can be the preload line position located before the first position to provide buffer time, such as line 95, which is the 5th line before the first position.
[0059] Thermal history algorithms can be algorithms that calculate the heat compensation required for the current pixel based on the historical heating state of the printhead, such as algorithms that calculate the thermal diffusion compensation for the current row based on the width of the heating pulses of the previous 10 rows.
[0060] Historical data cache can be a storage space for storing historical state data such as temperature changes and heating time of the print head during the previous few lines of printing, such as a dedicated data area in random access memory.
[0061] For example, the mode identifier in the control command or parsing result of the print data stream can be read in real time; it can be determined whether the current identifier indicates a switch from the high-speed printing heating control mode to the high-quality printing heating control mode; when the determination result is yes, a mode switching signal is generated; the mode switching line identifier carried in the mode switching signal is read; the physical coordinates or line number corresponding to the mode switching line identifier are determined as the first position; and the line number before the first position is determined as the second position according to the preset buffer line number of 5 lines. For example, if the print data stream contains a command to switch from high-speed mode to high-definition mode, a mode switching signal is generated, the mode switching line identifier carried in the command is read as line 100, line 100 is determined as the first position, and line 95 is determined as the second position according to the preset buffer line number of 5 lines. By monitoring the switching signal in real time and calculating the buffer position in advance, an accurate time and space reference can be provided for the subsequent preloading of thermal history data.
[0062] For example, the system can control the print head to continuously print in steps on the printing medium; obtain the current row number of the print head in real time; determine whether the current row number is equal to the second position; when the determination result is yes, retrieve the thermal history algorithm required for the high-quality printing heating control mode from the memory; load the temperature change and heating time data of the previous few rows of printing into the historical data cache; control the print head to continue printing in steps on the printing medium; determine whether the current row number is equal to the first position; when the determination result is yes, read the historical state data in the historical data cache; calculate the compensation heat of the current pixel according to the high-quality printing heating control mode and thermal history algorithm; and control the print head to perform heating printing on the current pixel according to the calculated compensation heat. For example, when controlling the printhead to continuously print in steps, if the current line number is 95, the thermal history algorithm required for the high-quality printing heating control mode is invoked. Temperature changes and heating time data from the previous 94 lines of printing are loaded into the historical data cache, and the printhead continues printing in steps. When the current line number is 100, the historical state data in the historical data cache is read, and the compensation heat for the current pixel is calculated according to the high-quality printing heating control mode, and heating printing is performed. By loading the thermal history data in advance before reaching the mode switching line, it is ensured that the printhead has a complete historical state reference when switching to high-quality mode, avoiding heating compensation calculation errors caused by data gaps, effectively eliminating horizontal image quality abrupt stripes caused by the instant mode switching, and ensuring a smooth transition and overall quality of the printed output.
[0063] In one feasible implementation, the feature parameters include a task type identifier, and the mode decision parameters include an image task identifier and a text type identifier. S12 includes the following steps: S1241: Match the task type identifier with the image task identifier and the text type identifier respectively to obtain the identifier matching result; Task type identifiers can be tags carried in the header or attribute fields of a print task data stream to indicate the overall content attributes of the current print task, such as image tags or ticket tags attached by the host computer when sending print data. Image task identifiers can be predefined classification tags used to characterize printed content as primarily continuous-tone images or complex graphics, such as Joint Photographic Experts Group (JPEG) image tags or Portable Network Graphics (PNG) image tags. Text type identifiers can be predefined classification tags used to characterize printed content as primarily characters, lines, or simple tables, such as plain text tags or Point of Sale (POS) ticket tags. Identifier matching results can be logically consistent or inconsistent judgment signals generated after comparing task type identifiers with preset classification tags.
[0064] For example, the task type identifier in the header of the print job data stream can be read; pre-stored image task identifiers and text type identifiers can be retrieved from memory; the task type identifier and image task identifier can be compared character-wise; the task type identifier and text type identifier can be compared character-wise; and an identifier matching result can be generated based on the comparison result. For instance, if the task type identifier is read as an image label, it can be compared with the image task identifier to generate an identifier matching result indicating a match. Through rapid global task type matching, the overall heating strategy can be directly determined during the print job initialization phase, reducing the computational overhead of parsing feature parameters line by line and improving the job startup response speed.
[0065] S1242: When the identifier matching result indicates that the task type identifier matches the image task identifier, the printing task is determined to be an image type printing task, and the high-quality heating control mode corresponding to the printing task is determined. Image-related printing jobs can be those where the content is mainly photographs, complex illustrations, or high grayscale gradient graphics.
[0066] For example, the identifier matching result is read. When the identifier matching result indicates that the task type identifier matches the image task identifier, the current print task is marked as an image-type print task. A high-quality heating control mode is retrieved from the pre-stored heating control mode library. The high-quality heating control mode is configured as the heating strategy used by the entire print task during print execution. For example, if the identifier matching result indicates that the task type identifier matches the image task identifier, the current print task is marked as an image-type print task. The high-quality heating control mode corresponding to the entire print task is determined, and the print head is controlled to use energy-graded heating and a longer first cooling time during the entire task execution. Automatically matching a high-quality heating strategy for image-based print tasks can globally ensure the color saturation and color transition smoothness of complex images and continuous-tone graphics, avoiding image whitening or banding caused by insufficient local heating.
[0067] S1243: When the identifier matching result indicates that the task type identifier matches the text type identifier, the printing task is determined to be a text type printing task, and the heating control mode corresponding to the printing task is determined to be a high printing speed.
[0068] For example, text-based print jobs can be those where the print content mainly consists of text, barcodes, invoices, QR codes, or simple line drawings. When the identification matching result indicates that the task type identifier matches the text type identifier, the current print job is marked as a text-based print job. A high-speed heating control mode is retrieved from the pre-stored heating control mode library and configured as the heating strategy used for the entire print job during execution. For instance, if the identification matching result indicates that the task type identifier matches the text type identifier, the current print job is marked as a text-based print job, the corresponding high-speed heating control mode for the entire print job is determined, and the print head is controlled to use time-sequential segmented heating and a shorter second cooling time during the entire job execution. Automatically matching a high-speed heating strategy for text-based print jobs can maximize single-page printing efficiency while meeting the requirements for text and barcode clarity, thus meeting the throughput requirements of high-concurrency invoice printing scenarios.
[0069] In one feasible implementation, the characteristic parameters include the color rendering level of the printing medium, the mode decision parameters include a color rendering difficulty threshold, and S12 includes the following steps: S1251: Compare the color development level of the consumables with the color development difficulty threshold to obtain a fourth comparison result; The consumable color rendering rating can be a physical property indicator reflecting the amount of energy required for the printing medium to produce a color change when heated, such as the sensitivity rating of thermal paper or the melting temperature rating of a ribbon read by a Radio Frequency Identification (RFID) chip. The color rendering difficulty threshold can be a pre-set critical value used to distinguish the ease or difficulty of color rendering of printing media, such as a sensitivity rating threshold of 3. The fourth comparison result can be a numerical relationship indication signal generated after comparing the consumable color rendering rating with the color rendering difficulty threshold.
[0070] For example, the process reads the consumable color rendering level stored in the RFID chip attached to the printing medium; retrieves the pre-stored color rendering difficulty threshold in the memory; compares the consumable color rendering level with the color rendering difficulty threshold; and generates a fourth comparison result based on the comparison. For instance, if the consumable color rendering level of the thermal paper is read as 4 and the color rendering difficulty threshold is 3, comparing 4 with 3 generates a fourth comparison result indicating that the consumable color rendering level is greater than the color rendering difficulty threshold. Through the quantitative comparison of the consumable color rendering level and the color rendering difficulty threshold, the thermal characteristics of the current printing medium can be objectively assessed, providing accurate material property basis for subsequent heating mode selection.
[0071] S1252: When the fourth comparison result indicates that the color rendering level of the consumable is greater than or equal to the color rendering difficulty threshold, it is determined that the printing medium belongs to the first color rendering difficulty medium, the printing task corresponds to the high printing quality heating control mode, and the reference heating time in the high printing quality heating control mode is increased. The first color development difficulty medium can be a printing material that requires high energy for color development and is not sensitive to heat, such as a high-melting-point ribbon or low-sensitivity thermal paper. The baseline heating time can be the default duration required for the printhead to perform the basic heating phase on a single pixel under the standard color development difficulty, for example, 2 milliseconds.
[0072] For example, the fourth comparison result is read. When a signal in the fourth comparison result indicating that the consumable's color rendering level is greater than or equal to the color rendering difficulty threshold is identified, the current printing medium is marked as a medium with the first color rendering difficulty. A high-quality heating control mode is retrieved from the pre-stored heating control mode library. The high-quality heating control mode is configured as the heating strategy used for the current printing task. The baseline heating time corresponding to the high-quality heating control mode is read. The time compensation amount is calculated based on the degree to which the consumable's color rendering level exceeds the color rendering difficulty threshold. The time compensation amount is added to the baseline heating time to obtain the updated baseline heating time. For example, if the fourth comparison result indicates that the consumable's color rendering level 4 is greater than the color rendering difficulty threshold 3, the current printing medium is marked as a medium with the first color rendering difficulty. The high-quality heating control mode corresponding to the printing task is determined. The baseline heating time is read as 2 milliseconds. Based on the degree of exceedance, a time compensation amount of 0.5 milliseconds is calculated, and the baseline heating time is increased to 2.5 milliseconds. For media with high color development difficulty, a high-quality heating strategy is automatically matched and a reference heating time is increased. This can fully compensate for the color development defects caused by insufficient thermal sensitivity of the material, and ensure the image clarity and color saturation on high melting point or low sensitivity media.
[0073] S1253: When the fourth comparison result indicates that the color rendering level of the consumable is less than the color rendering difficulty threshold, it is determined that the printing medium belongs to the second color rendering difficulty medium, and the heating control mode corresponding to the high printing speed of the printing task is determined.
[0074] For example, the second color development difficulty medium can be a heat-sensitive printing material that requires less energy for color development, such as conventional high-sensitivity thermal paper. When a signal in the fourth comparison result indicating that the consumable's color development level is less than the color development difficulty threshold is identified, the current printing medium is marked as a second color development difficulty medium. A high-speed heating control mode is retrieved from the pre-stored heating control mode library and configured as the heating strategy for the current printing task. For example, if the fourth comparison result indicates that the consumable's color development level 2 is less than the color development difficulty threshold 3, the current printing medium is marked as a second color development difficulty medium, the high-speed heating control mode corresponding to the printing task is determined, and the printhead is controlled to use a shorter second cooling time and a simplified time-sequential segmented heating method. Automatically matching a high-speed heating strategy for media with low color development difficulty can maximize printing efficiency while meeting the color development requirements of conventional high-sensitivity media, and avoid media blackening or thermal bleeding caused by overheating.
[0075] In one feasible implementation, S12 includes the following steps: S1261: Match the various different feature parameters with the corresponding preset mode decision parameters to obtain parameter matching results; The parameter matching result can be a set of multiple logical judgment signals generated by comparing various feature parameters with their corresponding preset mode decision parameters.
[0076] For example, multiple different feature parameters corresponding to the current print job or the current print line can be read; preset mode decision parameters corresponding one-to-one with the multiple different feature parameters can be retrieved from the memory; each feature parameter is compared with its corresponding preset mode decision parameter; all comparison results are summarized to generate parameter matching results. For example, if the print rate of the current line is read to be 0.85, the edge density is 0.15, and the task type identifier is a text type identifier, the print rate of 0.85 is compared with the first print rate threshold of 0.80 to obtain a matching result indicating high print quality; the edge density of 0.15 is compared with the second edge density threshold of 0.20 to obtain a matching result indicating high print speed; the task type identifier is compared with the text type identifier to obtain a matching result indicating high print speed; summarizing the above results yields a parameter matching result containing one high print quality and two high print speeds. Through parallel matching of multi-dimensional feature parameters, the physical attributes and visual characteristics of the print job in different dimensions can be comprehensively evaluated, providing rich data support for mode decision-making and avoiding the one-sidedness caused by single-dimensional evaluation.
[0077] S1262: When the parameter matching result indicates that different feature parameters are matched to obtain multiple different heating control modes, the priority of the heating control mode is determined, and the heating control mode corresponding to the printing task is determined according to the priority.
[0078] Priority can be a pre-defined rule or weight value used to sort multiple candidate heating control modes when they conflict. For example, the mode selection command issued by the external device can be set to have the highest priority, followed by the matching result of the task type identifier, and then the matching result of the printing rate and edge density.
[0079] For example, the parameter matching results can be read to determine if they contain multiple different heating control modes. If the result indicates multiple different heating control modes, a pre-set priority rule is retrieved. These modes are then sorted according to the priority rule, and the highest-ranked heating control mode is determined as the final heating control mode for the printing task. For instance, if the parameter matching results include both a high-quality printing heating control mode and a high-speed printing heating control mode, the priority rule is retrieved, setting the matching result of the task type identifier to have a higher priority than the matching results of print rate and edge density. Since the task type identifier matches the high-speed printing heating control mode, and the task type identifier has the highest priority, the high-speed printing heating control mode is determined as the final heating control mode. By introducing a priority mechanism to resolve conflicts in multi-feature parameter matching results, the final heating control mode can be determined based on the most critical or user-expected feature parameters in complex printing scenarios. This improves the accuracy and reliability of mode decisions and avoids printing control chaos caused by mode conflicts.
[0080] In one feasible implementation, S202 includes the following steps: S21: Read the first mode selection instruction from the printed data; the first mode selection instruction is a mode selection instruction corresponding to a mode identifier preset by an external device or user; The first mode selection command can be a control command explicitly issued by an external device or user through a host computer software or printer control panel to force the current print job to use a specific heating control mode. For example, the command generated after the user selects the forced high-definition mode in the print driver.
[0081] The mode identifier can be a code or string used to uniquely identify a certain heating control mode, such as code 01 representing high print quality or code 02 representing high print speed.
[0082] For example, the header or control command area of the print data can be parsed; the mode configuration field contained in the control command area can be extracted; the mode identifier in the mode configuration field can be read; and the mode identifier can be mapped to a first mode selection instruction. For instance, if the print data stream header contains a mode configuration field, the mode identifier is extracted as 01, and the mode identifier 01 is mapped to a first mode selection instruction indicating the use of a high print quality mode. By directly reading external explicit instructions, it can be ensured that print control fully complies with the actual business intent of the user or host computer, avoiding misjudgments caused by automatic recognition algorithms in extremely complex layouts.
[0083] S22: Determine the heating control mode corresponding to the printing task according to the first mode selection instruction.
[0084] For example, the process can involve reading a first mode selection instruction; parsing the target mode information carried in the first mode selection instruction; retrieving the corresponding heating control mode from a pre-stored heating control mode library based on the target mode information; and configuring the retrieved heating control mode as the heating strategy adopted by the current printing task. For instance, if the first mode selection instruction indicates that the target mode is high printing speed, the heating control mode for high printing speed is retrieved from the mode library, and the high printing speed heating control mode is configured as the heating strategy for the current printing task. By directly responding to explicit instructions to determine the heating mode, the calculation process for internal feature parsing and matching is simplified, improving the response speed and control determinism during the printing task initialization phase.
[0085] In one feasible implementation, the first mode selection instruction has a higher priority than any other reference mode selection instruction.
[0086] The reference mode selection instruction can be an internal instruction that is automatically calculated and matched based on print data feature parameters, and is used to suggest or default to a certain heating control mode, such as a mode instruction that is automatically matched based on the print rate.
[0087] For example, both a first mode selection command and a reference mode selection command can be acquired simultaneously; pre-configured priority rules can be read; the priority of the first mode selection command can be determined to be higher than that of the reference mode selection command according to the priority rules; the matching result of the reference mode selection command can be ignored; and the heating control mode specified by the first mode selection command can be determined as the final heating control mode to be executed. For instance, if the user-issued first mode selection command indicating high printing speed and the internally automatically matched reference mode selection command indicating high printing quality are acquired simultaneously, the priority rule determines that the first mode selection command has a higher priority, the reference mode selection command is ignored, and the high printing speed heating control mode is finally determined to be used. By establishing the highest priority of external explicit commands, the problem of conflict between automatic matching results and user subjective intentions can be effectively solved, ensuring that the printed output meets the user's highest expectations and improving the reliability of human-computer interaction.
[0088] S203: According to the heating control mode, control the print head to print on the printing medium; wherein, the printing quality and printing speed corresponding to different types of heating control modes are different.
[0089] For details, please refer to the method steps in other embodiments of this specification, which will not be repeated here.
[0090] In one feasible implementation, S203 includes the following steps: S31: When the heating control mode is a high-printing-quality heating control mode, the print head is controlled to perform a single first heating process and a single first cooling process for each pixel; the first heating process adopts a thermal history algorithm of first complexity and an energy-graded heating method; the energy-graded heating method divides the current pixel into multiple energy levels based on the color rendering state of the current pixel and the adjacent pixels at preset positions around the current pixel, and divides the first heating process into multiple heating stages including a basic heating stage and at least two fine heating stages, with pixels of different energy levels participating in heating methods with different numbers of heating stages; the duration of the first cooling process is the first cooling duration; The first heating cycle can be a complete sequence of heating actions performed by the printhead on a single pixel in high print quality mode. The first cooling cycle can be the process after the first heating cycle ends, where the printhead stops heating and waits for the temperature to drop naturally or is forced to dissipate heat. The thermal history algorithm with the highest complexity can be an advanced temperature control algorithm that includes temperature compensation calculations for numerous historical rows and thermal diffusion predictions. The energy-graded heating method can be a strategy that dynamically allocates heating energy based on the color rendering state of the pixel and its surrounding pixels. The basic heating phase can be a basic pulse heating phase that all pixels requiring color rendering must participate in. The fine-tuning heating phase can be an additional compensatory heating phase added for pixels with specific energy levels. The first cooling duration can be the length of time the first cooling cycle lasts, for example, 3 milliseconds.
[0091] For example, it can be determined whether the current heating control mode is a high-quality heating control mode. When it is determined that the current heating control mode is a high-quality heating control mode, the print head is controlled to perform a single first heating process for each pixel that needs to be colored. In the first heating process, a thermal history algorithm of first complexity is called to calculate the basic heating energy of the current pixel; the color rendering state of adjacent pixels at preset positions around the current pixel is obtained; the current pixel is divided into corresponding energy levels according to the color rendering state of adjacent pixels; the number of heating stages that the current pixel needs to participate in is determined according to the energy level; the print head is controlled to execute the basic heating stage and the corresponding number of fine heating stages in sequence; after the first heating process is completed, the print head is controlled to execute a single first cooling process and maintain the first cooling duration. For example, if the current pixel needs to be colored, the thermal history algorithm of first complexity calculates the basic heating energy to be 2 milliseconds. The adjacent pixels directly above and below the current pixel are obtained, and it is found that the pixel directly above is in a colored state and the pixel directly below is in a non-colored state. According to preset rules, the current pixel is divided into a third energy level. The third energy level corresponds to participating in the basic heating stage and the first fine heating stage. The printhead is controlled to perform a 2-millisecond basic heating phase, followed by a 1-millisecond first fine heating phase. After heating, the printhead stops heating and maintains a 3-millisecond first cooling duration. By introducing an energy-graded heating method and a longer first cooling duration, the heating energy of the current pixel can be accurately compensated according to the thermal diffusion of surrounding pixels, effectively eliminating edge blurring and jaggedness in high-density printing areas, and significantly improving image detail and color saturation.
[0092] S32: When the heating control mode is the high-printing-speed heating control mode, the print head is controlled to perform a single second heating process and a single second cooling process for each pixel to print on the printing medium; the second heating process adopts a thermal history algorithm with second complexity and a time-sequential segmented heating method; the time-sequential segmented heating method is a heating method in which the motor triggers a heating action once every preset number of steps during the continuous stepping printing process of a single pixel; the duration of the second cooling process is the second cooling duration; the first cooling duration is longer than the second cooling duration; the printing quality of the high-printing-quality heating control mode is higher than that of the high-printing-speed heating control mode; the printing speed of the high-printing-speed heating control mode is higher than that of the high-printing-quality heating control mode.
[0093] The second heating process can be a simplified sequence of heating actions performed by the printhead on a single pixel in high-printing-speed mode. The second cooling process can be the process after the second heating process ends, where the printhead stops heating and waits for the temperature to drop. The thermal history algorithm with the second level of complexity can be a simplified temperature control algorithm with low computational cost and only includes basic temperature compensation. The time-sequential segmented heating method can be a heating strategy that binds the heating action with the motor stepping action on the time axis. The preset number of steps can be the number of stepping pulses required for the stepper motor (SM) to trigger a heating action during continuous stepping, such as 2 steps. The second cooling duration can be the duration of the second cooling process, such as 1 millisecond.
[0094] For example, it can be determined whether the current heating control mode is a high-printing-speed heating control mode. When the current heating control mode is determined to be a high-printing-speed heating control mode, the print head is controlled to perform a single second heating process for each pixel that needs to be colored. In the second heating process, a thermal history algorithm with second complexity is called to calculate the basic heating energy of the current pixel; the continuous stepping state of the stepper motor is monitored; whenever the stepper motor reaches a preset number of steps, a heating action is triggered; the print head is controlled to perform a single second cooling process and maintain a second cooling duration; the first cooling duration and the second cooling duration are compared to ensure that the first cooling duration is greater than the second cooling duration. For example, if the current pixel needs to be colored, the thermal history algorithm with second complexity calculates the basic heating energy to be 1.5 milliseconds. The continuous stepping state of the stepper motor is monitored, and the preset number of steps is set to 2 steps. Whenever the stepper motor reaches 2 steps, a 1.5-millisecond heating action is triggered. After heating is completed, the print head is controlled to stop heating and maintain a second cooling duration of 1 millisecond. Since 1 millisecond is less than 3 milliseconds in high print quality mode, the single-line printing time in high print speed mode is significantly reduced. By adopting a time-sequential segmented heating method and a shorter second cooling time, the heating action is deeply integrated with the mechanical stepping action, effectively reducing heating waiting time and algorithm computation overhead. While meeting basic color development requirements, it effectively improves single-line printing speed and meets the throughput requirements of high-concurrency document printing scenarios.
[0095] In one feasible implementation, the adjacent pixels at preset positions around the current pixel include: a first pixel directly above the current pixel, a second pixel directly above the first pixel, a third pixel to the left of the second pixel, a fourth pixel to the right of the second pixel, and a fifth pixel directly below the current pixel. The multiple energy levels of the current pixel are obtained by setting the initial energy level of the current pixel to the highest level, reducing the energy level of the current pixel by one level when the first pixel is in a colored state, reducing the energy level of the current pixel by another level when at least one of the second, third, and fourth pixels is in a colored state, and reducing the energy level of the current pixel by another level when the fifth pixel is in a non-colored state.
[0096] The first pixel can be the pixel directly above the current pixel, for example, the pixel at coordinates (x, y-1). The second pixel can be the pixel directly above the first pixel, i.e., the pixel one row above the current pixel, for example, the pixel at coordinates (x, y-2). The third pixel can be the pixel to the left of the second pixel, for example, the pixel at coordinates (x-1, y-2). The fourth pixel can be the pixel to the right of the second pixel, for example, the pixel at coordinates (x+1, y-2). The fifth pixel can be the pixel directly below the current pixel, for example, the pixel at coordinates (x, y+1).
[0097] The color-developing state refers to the state in which a pixel changes color after being heated on the printing medium, such as when thermal paper turns black. The non-color-developing state refers to the state in which a pixel does not change color after being heated on the printing medium, such as when thermal paper remains white. The initial energy level can be the default maximum heating energy level set for the current pixel before evaluating the state of surrounding pixels, such as the fourth energy level.
[0098] For example, the coordinates of the current pixel can be obtained; the coordinates of the first, second, third, fourth, and fifth pixels can be determined based on the coordinates; the bitmap data of the first, second, third, fourth, and fifth pixels can be read; the initial energy level of the current pixel can be set to the highest level; it can be determined whether the first pixel is in a colored state; if the first pixel is in a colored state, the energy level of the current pixel can be reduced by one level; it can be determined whether at least one of the second, third, and fourth pixels is in a colored state; if at least one of the second, third, and fourth pixels is in a colored state, the energy level of the current pixel can be reduced by another level; it can be determined whether the fifth pixel is in a non-colored state; if the fifth pixel is in a non-colored state, the energy level of the current pixel can be reduced by another level, thus obtaining the final energy level of the current pixel.
[0099] For example, the current pixel coordinates are (10, 10), and the initial energy level is the fourth energy level. The first pixel coordinates are (10, 9) and it is in a colored state, so its energy level is reduced by one level to the third energy level. The second pixel coordinates are (10, 8) and it is not colored, the third pixel coordinates are (9, 8) and it is in a colored state, and the fourth pixel coordinates are (11, 8) and it is not colored. Since the third pixel is in a colored state, at least one condition for being in a colored state is met, so its energy level is reduced by one level to the second energy level. The fifth pixel coordinates are (10, 11) and it is not colored, meeting the condition for being in a non-colored state, so its energy level is reduced by one level to the first energy level, resulting in the current pixel having the first energy level. By constructing a specific five-pixel neighborhood model including the area directly above, the left and right sides of the row above, and the area directly below, and using a progressively decreasing energy assessment mechanism, the thermal diffusion risk around the current pixel can be accurately quantified. High color rendering of pixels directly above and above the line increases heat accumulation; reducing the energy level prevents overheating. Pixels directly below that are not colored indicate a lack of thermal support and heat conduction buffer; reducing the energy level prevents excessive heat penetration downwards, which can lead to bleed-through or edge blurring. This dynamic degradation strategy, based on the color rendering status of specific spatial locations, effectively suppresses common thermal diffusion and edge blurring issues in thermal printing while ensuring the color rendering effect of the target pixels, thus improving the overall clarity and sharpness of the image.
[0100] In one feasible implementation, the plurality of energy levels includes: a first energy level, a second energy level, a third energy level, and a fourth energy level; the fourth energy level has the highest energy value among the plurality of energy levels; the plurality of heating stages includes a basic heating stage, a first fine heating stage, a second fine heating stage, and a third fine heating stage; the heating sequence of the basic heating stage, the first fine heating stage, the second fine heating stage, and the third fine heating stage is arranged sequentially; when the energy level of the current pixel is the fourth energy level, the current pixel is heated through the basic heating stage, the first fine heating stage, the second fine heating stage, and the third fine heating stage; when the energy level of the current pixel is the third energy level, the current pixel is heated through the basic heating stage, the first fine heating stage, and the second fine heating stage; when the energy level of the current pixel is the second energy level, the current pixel is heated through the basic heating stage and the first fine heating stage; when the energy level of the current pixel is the first energy level, the current pixel is heated through the basic heating stage.
[0101] For example, the first energy level can be the lowest heating energy level obtained after downgrading when the risk of heat diffusion around the current pixel is highest or the heat accumulation is greatest. The second energy level can be the second lowest heating energy level obtained after the current pixel undergoes two downgradings. The third energy level can be the second highest heating energy level obtained after the current pixel undergoes one downgrading. The fourth energy level can be the highest heating energy level maintained by the current pixel without undergoing downgrading, corresponding to the largest energy value. The first fine-tuning heating stage can be the first compensating heating process executed after the basic heating stage, used to provide basic heat replenishment. The second fine-tuning heating stage can be the second compensating heating process executed after the first fine-tuning heating stage, used to provide advanced heat replenishment. The third fine-tuning heating stage can be the third compensating heating process executed after the second fine-tuning heating stage, used to provide the maximum amount of heat replenishment.
[0102] For example, the energy level of the current pixel can be divided into a first energy level, a second energy level, a third energy level, and a fourth energy level, with the fourth energy level having the highest energy value; the first heating process can be divided into multiple heating stages: a basic heating stage, a first fine supplementary heating stage, a second fine supplementary heating stage, and a third fine supplementary heating stage, with the heating order of the four stages arranged sequentially; the energy level of the current pixel can be read; it can be determined whether the energy level of the current pixel is the fourth energy level; when the energy level of the current pixel is determined to be the fourth energy level, the print head can be controlled to sequentially execute the basic heating stage, the first fine supplementary heating stage, the second fine supplementary heating stage, and the third fine supplementary heating stage; when the energy level of the current pixel is determined to be the third energy level, the print head can be controlled to sequentially execute the basic heating stage, the first fine supplementary heating stage, and the second fine supplementary heating stage; when the energy level of the current pixel is determined to be the second energy level, the print head can be controlled to sequentially execute the basic heating stage and the first fine supplementary heating stage; when the energy level of the current pixel is determined to be the first energy level, the print head can be controlled to execute only the basic heating stage.
[0103] For example, if the initial energy level of the current pixel is level four, and it remains at level four after evaluation of the surrounding pixel states without degrading, the print head is controlled to sequentially execute a 1-millisecond basic heating phase, a 0.5-millisecond first fine heating phase, a 0.5-millisecond second fine heating phase, and a 0.5-millisecond third fine heating phase, for a total heating time of 2.5 milliseconds. Now, suppose another current pixel degrades to level two after evaluation. The print head is controlled to sequentially execute only the 1-millisecond basic heating phase and the 0.5-millisecond first fine heating phase, for a total heating time of 1.5 milliseconds.
[0104] By mapping energy levels to the number of heating stages in a stepped manner, and employing multiple heating stages arranged sequentially, the total heating energy can be dynamically adjusted according to the thermal environment surrounding each pixel. Pixels with complex surrounding thermal environments and high heat accumulation are allocated more fine-tuning heating stages to ensure sufficient color development; pixels with simple surrounding thermal environments and low heat accumulation are allocated fewer heating stages to avoid overheating. This stepped energy allocation mechanism effectively balances the color saturation of high-density areas with the anti-smudging requirements of low-density areas, further improving the image quality of thermal printing.
[0105] S204: Monitor the current temperature of the printhead; reduce the heating time when the current temperature rises, and increase the heating time corresponding to the heating control mode when the current temperature falls. The current temperature can be the temperature value collected in real time by the heating resistor element in the printhead during the printing process, such as the Celsius temperature value read by a thermistor (Negative Temperature Coefficient, NTC) sensor. The heating time can be the duration of the heating pulse applied by the printhead to the pixel, such as the pulse width of the basic heating phase.
[0106] For example, the current temperature of the printhead can be collected in real time by a temperature sensor; the current temperature is compared with a preset standard operating temperature; when the current temperature is higher than the standard operating temperature, the temperature deviation is calculated; the reduction in heating time is calculated based on the temperature deviation; the reduction is subtracted from the heating time corresponding to the heating control mode to obtain the compensated heating time; when the current temperature is lower than the standard operating temperature, the temperature deviation is calculated; the increase in heating time is calculated based on the temperature deviation; the increase is added to the heating time corresponding to the heating control mode to obtain the compensated heating time. For example, if the preset standard operating temperature is 40 degrees Celsius, and the temperature sensor collects a current printhead temperature of 55 degrees Celsius, the current temperature is 15 degrees Celsius higher than the standard operating temperature. Based on the preset temperature compensation coefficient, the reduction in heating time is calculated to be 0.3 milliseconds, reducing the heating time of the basic heating stage in the high print quality heating control mode from 2 milliseconds to 1.7 milliseconds. By monitoring the printhead temperature in real time and dynamically adjusting the heating time, it can effectively compensate for the heat accumulation caused by continuous operation of the printhead or the temperature drop caused by long-term standby. It avoids the blackening of the media caused by overheating at high temperatures and the pale color caused by insufficient heating at low temperatures, ensuring the consistency and stability of print output under different working conditions.
[0107] S205: Monitor the current value of the power supply voltage; when the current value increases, reduce the heating time; when the current value decreases, increase the heating time corresponding to the heating control mode. The power supply voltage can be the output voltage value that provides heating energy to the print head, such as the DC voltage output by the printer's internal power management circuit. The current value can be the voltage value collected in real time during the printing process.
[0108] For example, the current value of the power supply voltage can be acquired in real time by a voltage acquisition circuit; the current value is compared with a preset standard power supply voltage; when the current value is higher than the standard power supply voltage, the voltage deviation is calculated; the reduction in heating time is calculated based on the voltage deviation; the reduction is subtracted from the heating time corresponding to the heating control mode to obtain the compensated heating time; when the current value is lower than the standard power supply voltage, the voltage deviation is calculated; the increase in heating time is calculated based on the voltage deviation; the increase is added to the heating time corresponding to the heating control mode to obtain the compensated heating time. For example, if the preset standard power supply voltage is 24 volts, and the voltage acquisition circuit acquires a current value of 22 volts, which is 2 volts lower than the standard power supply voltage, the increase in heating time is calculated to be 0.2 milliseconds based on the preset voltage compensation coefficient, increasing the heating time of the basic heating stage in the high-printing-speed heating control mode from 1.5 milliseconds to 1.7 milliseconds. By monitoring the power supply voltage in real time and dynamically adjusting the heating time, it can effectively compensate for changes in power supply voltage caused by power grid fluctuations or battery power drops, ensuring that the heating energy output by the printhead remains constant under different power supply conditions, and avoiding insufficient color development due to low voltage or media burning due to high voltage.
[0109] S206: Monitor the printing rate of the current row, increase the heating time when the printing rate increases, and decrease the heating time corresponding to the heating control mode when the printing rate decreases.
[0110] For example, the printing rate of the current row can be calculated in real time as the proportion of pixels that need to be colored to the total number of pixels in the current row. This yields the printing rate of the current row. The printing rate of the current row is then compared with a preset standard printing rate. When the printing rate is higher than the standard printing rate, the printing rate deviation is calculated. The increase in heating time is calculated based on the printing rate deviation. This increase is then added to the heating time corresponding to the heating control mode to obtain the compensated heating time. When the printing rate is lower than the standard printing rate, the printing rate deviation is calculated. The decrease in heating time is calculated based on the printing rate deviation. This decrease is then subtracted from the heating time corresponding to the heating control mode to obtain the compensated heating time. For instance, if the preset standard printing rate is 0.50 and the printing rate of the current row is 0.90, which is higher than the standard printing rate by 0.40, the increase in heating time is calculated to be 0.4 milliseconds based on the preset printing rate compensation coefficient. This increases the heating time of the basic heating stage in the current heating control mode from 2 milliseconds to 2.4 milliseconds. When the print rate of the next row is 0.20, which is lower than the standard print rate of 0.30, the calculated reduction in heating time is 0.3 milliseconds, reducing the heating time of the basic heating stage from 2 milliseconds to 1.7 milliseconds. By monitoring the print rate of the current row in real time and dynamically adjusting the heating time, it is possible to effectively compensate for the power supply diversion and heat diffusion effects caused by the simultaneous heating of a large number of pixels in high print rate rows, while avoiding thermal smudging caused by excessive heating energy in low print rate rows, thus ensuring color uniformity in areas of different densities.
[0111] In the embodiments of this specification, a printing task and corresponding printing data are acquired; at least one heating control mode corresponding to the printing task is determined based on the printing data; and the print head is controlled to print on the printing medium according to the heating control mode. Different types of heating control modes correspond to different print qualities and printing speeds. By adopting the above technical solution, and acquiring the printing data corresponding to the printing task to determine the heating control mode accordingly, the different needs for print quality or printing speed in different scenarios can be met without manual configuration by the user. This achieves automatic adaptation of the heating control mode to the printing task, reduces the user's operational threshold, and improves the intelligence level and printing efficiency of the thermal printing equipment.
[0112] The following will combine Figure 5 This specification provides a detailed description of the printing control device provided in the embodiments. It should be noted that... Figure 5 The printing control device shown is used to execute this instruction manual. Figures 1-4 The methods shown in the embodiments are illustrated for ease of explanation, showing only the parts related to the embodiments of this specification. For specific technical details not disclosed, please refer to this specification. Figures 1-4 The example shown.
[0113] Please see Figure 5This diagram illustrates the structure of a printing control device according to an embodiment of this specification. The printing control device 1 can be implemented as all or part of a user terminal through software, hardware, or a combination of both. According to some embodiments, the printing control device 1 includes an acquisition module 11, a determination module 12, and a printing module 13, specifically used for: The acquisition module 11 is used to acquire the print task and the print data corresponding to the print task; The determining module 12 is used to determine at least one heating control mode corresponding to the printing task based on the printing data; The printing module 13 is used to control the print head to print on the printing medium according to the heating control mode; wherein, the printing quality and printing speed are different for different types of heating control modes.
[0114] In one feasible implementation, determining at least one heating control mode corresponding to the printing task based on the printing data includes: The printed data is parsed to obtain the parsing result, and feature parameters are extracted from the parsing result; The feature parameters are matched with preset mode decision parameters to obtain a matching result, and at least one heating control mode corresponding to the printing task is determined based on the matching result.
[0115] In one feasible implementation, the feature parameters include content feature types for different printing areas, the mode decision parameters include fine content type and coarse content type, and the step of matching the feature parameters with preset mode decision parameters to obtain a matching result, and determining at least one heating control mode corresponding to the printing task based on the matching result, includes: The content feature type of the printed area is matched with the fine content type and the coarse content type to obtain the content matching result; When the content matching result indicates that the content feature type of the printing area belongs to the fine content type, the printing task of the printing area is determined to correspond to the high-quality heating control mode. When the content matching result indicates that the content feature type of the printing area belongs to the coarse content type, the printing task of the printing area is determined to correspond to the high printing speed heating control mode.
[0116] In one feasible implementation, the feature parameters include the printing rate per row of pixels, and the mode decision parameters include a first printing rate threshold and a second printing rate threshold, wherein the first printing rate threshold is greater than the second printing rate threshold; the step of matching the feature parameters with preset mode decision parameters to obtain a matching result, and determining at least one heating control mode corresponding to the printing task based on the matching result, includes: The printing rate of the current row is compared with the first printing rate threshold and the second printing rate threshold respectively to obtain the second comparison result; When the second comparison result indicates that the printing rate is greater than or equal to the first printing rate threshold, the current line in the printing task is determined to use a high-quality printing heating control mode from the heating control modes. When the second comparison result indicates that the print rate is less than or equal to the second print rate threshold, it is determined that the current line in the printing task adopts a high-printing-speed heating control mode.
[0117] In one feasible implementation, determining at least one heating control mode corresponding to the printing task based on the matching result further includes: When the second comparison result indicates that the printing rate is greater than the second printing rate threshold and less than the first printing rate threshold, the heating control mode of the previous line is obtained, and it is determined that the current line in the printing task adopts the heating control mode of the previous line.
[0118] In one feasible implementation, the feature parameters include edge density, which measures the degree of image change of the current row relative to the previous row. The edge density is obtained by performing a bitwise XOR operation between the bitmap data of the current row and the bitmap data of the previous row, counting the number of bits with a 1 in the XOR result, and dividing the number of bits by the total number of bits in the current row. The mode decision parameters include a first edge density threshold and a second edge density threshold, where the first edge density threshold is greater than the second edge density threshold. The step of matching the feature parameters with preset mode decision parameters to obtain a matching result, and determining at least one heating control mode corresponding to the printing task based on the matching result, includes: The edge density of the current row is compared with the first edge density threshold and the second edge density threshold respectively to obtain a third comparison result; When the third comparison result indicates that the edge density is greater than or equal to the first edge density threshold, it is determined that the current row is in the fine edge region of the image, and it is determined that the current row in the printing task adopts a high-quality heating control mode. When the third comparison result indicates that the edge density is less than or equal to the second edge density threshold, it is determined that the current row is in a flat area of the image, and it is determined that the current row in the printing task adopts a high-printing-speed heating control mode.
[0119] In one feasible implementation, determining at least one heating control mode corresponding to the printing task based on the matching result further includes: When the third comparison result indicates that the edge density is greater than the second edge density threshold and less than the first edge density threshold, the heating control mode of the previous row is obtained, and it is determined that the current row in the printing task adopts the heating control mode of the previous row.
[0120] In one feasible implementation, the feature parameters include a task type identifier, and the mode decision parameters include an image task identifier and a text type identifier. The step of matching the feature parameters with preset mode decision parameters to obtain a matching result, and determining at least one heating control mode corresponding to the printing task based on the matching result, includes: The task type identifier is matched with the image task identifier and the text type identifier respectively to obtain the identifier matching result; When the identifier matching result indicates that the task type identifier matches the image task identifier, the printing task is determined to be an image type printing task, and the high-quality heating control mode corresponding to the printing task is determined. When the identifier matching result indicates that the task type identifier matches the text type identifier, the printing task is determined to be a text-type printing task, and the high-speed heating control mode corresponding to the printing task is determined.
[0121] In one feasible implementation, the feature parameters include the color rendering level of the printing medium, the mode decision parameters include a color rendering difficulty threshold, and the step of matching the feature parameters with preset mode decision parameters to obtain a matching result, and determining at least one heating control mode corresponding to the printing task based on the matching result, includes: The color rendering level of the consumables is compared with the color rendering difficulty threshold to obtain the fourth comparison result; When the fourth comparison result indicates that the color rendering level of the consumable is greater than or equal to the color rendering difficulty threshold, it is determined that the printing medium belongs to the first color rendering difficulty medium, the printing task corresponds to the high printing quality heating control mode, and the reference heating time in the high printing quality heating control mode is increased. When the fourth comparison result indicates that the color rendering level of the consumable is less than the color rendering difficulty threshold, it is determined that the printing medium belongs to the second color rendering difficulty medium, and the heating control mode corresponding to the high printing speed of the printing task is determined.
[0122] In one feasible implementation, the step of matching the feature parameters with preset mode decision parameters to obtain a matching result, and determining at least one heating control mode corresponding to the printing task based on the matching result, includes: The various feature parameters are matched with their corresponding preset mode decision parameters to obtain parameter matching results; When the parameter matching results indicate that different feature parameters match to obtain multiple different heating control modes, the priority of the heating control mode is determined, and the heating control mode corresponding to the printing task is determined according to the priority.
[0123] In one feasible implementation, determining at least one heating control mode corresponding to the printing task based on the printing data includes: Read the first mode selection instruction from the printed data; the first mode selection instruction is a mode selection instruction corresponding to a mode identifier preset by an external device or user; The heating control mode corresponding to the printing task is determined according to the first mode selection instruction.
[0124] In one feasible implementation, the first mode selection instruction has a higher priority than any other reference mode selection instruction.
[0125] In one feasible implementation, the device is further used for: Monitor the current temperature of the printhead; reduce the heating time when the current temperature rises, and increase the heating time corresponding to the heating control mode when the current temperature falls. Monitor the current value of the power supply voltage; when the current value increases, reduce the heating time; when the current value decreases, increase the heating time corresponding to the heating control mode. Monitor the printing rate of the current row. When the printing rate increases, increase the heating time. When the printing rate decreases, decrease the heating time corresponding to the heating control mode.
[0126] In one feasible implementation, controlling the print head to print on the printing medium according to the heating control mode includes: When the heating control mode is a high-print-quality heating control mode, the print head is controlled to perform a single first heating process and a single first cooling process for each pixel. The first heating process uses a thermal history algorithm of first complexity and an energy-graded heating method. The energy-graded heating method divides the current pixel into multiple energy levels based on the color rendering state of the current pixel and the adjacent pixels at preset positions around the current pixel, and divides the first heating process into multiple heating stages including a basic heating stage and at least two fine-tuning heating stages. Pixels of different energy levels participate in heating methods with different numbers of heating stages. The duration of the first cooling process is the first cooling duration. When the heating control mode is a high-printing-speed heating control mode, the print head is controlled to perform a single second heating process and a single second cooling process for each pixel to print on the printing medium; the second heating process adopts a thermal history algorithm with a second complexity and a time-sequential segmented heating method; the time-sequential segmented heating method is a heating method in which the motor triggers a heating action once every preset number of steps during the continuous stepping printing process of a single pixel; the duration of the second cooling process is the second cooling duration; The first cooling duration is longer than the second cooling duration; the printing quality of the high-printing-quality heating control mode is higher than that of the high-printing-speed heating control mode; the printing speed of the high-printing-speed heating control mode is higher than that of the high-printing-quality heating control mode.
[0127] In one feasible implementation, the adjacent pixels at a preset position around the current pixel include: a first pixel directly above the current pixel, a second pixel directly above the first pixel, a third pixel to the left of the second pixel, a fourth pixel to the right of the second pixel, and a fifth pixel directly below the current pixel. The multiple energy levels of the current pixel are obtained by setting the initial energy level of the current pixel to the highest level, reducing the energy level of the current pixel by one level when the first pixel is in a colored state, reducing the energy level of the current pixel by another level when at least one of the second, third, and fourth pixels is in a colored state, and reducing the energy level of the current pixel by another level when the fifth pixel is in a non-colored state.
[0128] In one feasible implementation, the plurality of energy levels includes: a first energy level, a second energy level, a third energy level, and a fourth energy level; the fourth energy level has the largest energy value among the plurality of energy levels. The multiple heating stages include a basic heating stage, a first fine heating stage, a second fine heating stage, and a third fine heating stage; the heating sequence of the basic heating stage, the first fine heating stage, the second fine heating stage, and the third fine heating stage is arranged sequentially. When the energy level of the current pixel is the fourth energy level, the current pixel is heated through the basic heating stage, the first fine heating stage, the second fine heating stage, and the third fine heating stage; When the energy level of the current pixel is the third energy level, the current pixel is heated through the basic heating stage, the first fine heating stage, and the second fine heating stage; When the energy level of the current pixel is the second energy level, the current pixel is heated through the basic heating stage and the first fine heating stage; When the energy level of the current pixel is the first energy level, the current pixel is heated through the basic heating stage.
[0129] In one feasible implementation, the device is further used for: Monitor the mode switching signal, and when the mode switching signal indicates a switch from the high printing speed heating control mode to the high printing quality heating control mode, obtain the first position of the mode switching line and the second position before the first position; When the printhead prints the printing medium to the second position, the historical data cache of the thermal history algorithm required by the high-quality printing heating control mode is loaded, so that when the printhead prints the printing medium to the first position, printing is performed according to the high-quality printing heating control mode.
[0130] It should be noted that the printing control device provided in the above embodiments is only illustrated by the division of the above functional modules when executing the printing control method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the printing control device and the printing control method embodiments provided in the above embodiments belong to the same concept, and the implementation process can be found in the method embodiments, which will not be repeated here.
[0131] The example numbers in this specification are for descriptive purposes only and do not represent the superiority or inferiority of the examples.
[0132] In the embodiments of this specification, a printing task and corresponding printing data are acquired; at least one heating control mode corresponding to the printing task is determined based on the printing data; and the print head is controlled to print on the printing medium according to the heating control mode. Different types of heating control modes correspond to different print qualities and printing speeds. By adopting the above technical solution, and acquiring the printing data corresponding to the printing task to determine the heating control mode accordingly, the different needs for print quality or printing speed in different scenarios can be met without manual configuration by the user. This achieves automatic adaptation of the heating control mode to the printing task, reduces the user's operational threshold, and improves the intelligence level and printing efficiency of the thermal printing equipment.
[0133] This specification also provides a computer storage medium that can store multiple instructions adapted to be loaded and executed by a processor as described above. Figures 1-4 The printing control method of the illustrated embodiment can be found in the following document for its specific execution process. Figures 1-4 The specific details of the illustrated embodiments will not be elaborated here.
[0134] This specification also provides a computer program product storing at least one instruction, which is loaded and executed by the processor as described above. Figures 1-4 The printing control method of the illustrated embodiment can be found in the following document for its specific execution process. Figures 1-4 The specific details of the illustrated embodiments will not be elaborated here.
[0135] Please refer to Figure 6 This is a structural block diagram of an electronic device provided in an embodiment of this specification. The electronic device in this specification may include one or more of the following components: a processor 1010, a memory 1020, an input device 1030, an output device 1040, and a bus 1050. The processor 1010, memory 1020, input device 1030, and output device 1040 may be connected to each other via the bus 1050.
[0136] Processor 1010 may include one or more processing cores. Processor 1010 connects to various parts of the electronic device using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 1020, and by calling data stored in memory 1020. Optionally, processor 1010 may be implemented using at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). Processor 1010 may integrate one or more of a central processing unit (CPU), graphics processing unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 1010 and may be implemented separately through a communication chip.
[0137] The memory 1020 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 1020 may include non-transitory computer-readable storage medium. The memory 1020 may be used to store instructions, programs, code, code sets, or instruction sets.
[0138] The input device 1030 is used to receive input instructions or data, and includes, but is not limited to, a keyboard, mouse, camera, microphone, or touch device. The output device 1040 is used to output instructions or data, and includes, but is not limited to, a display device and a speaker. In this embodiment, the input device 1030 can be a temperature sensor for acquiring the operating temperature of the electronic device. The output device 1040 can be a speaker for outputting audio signals.
[0139] In addition, those skilled in the art will understand that the structure of the electronic device shown in the above figures does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements. For example, the electronic device may also include radio frequency circuits, input units, sensors, audio circuits, wireless fidelity (WIFI) modules, power supplies, Bluetooth modules, etc., which will not be described in detail here.
[0140] In the embodiments of this specification, the executing entity for each step can be the electronic device described above. Optionally, the executing entity for each step can be the operating system of the electronic device. The operating system can be Android, iOS, or other operating systems; this specification does not limit this.
[0141] exist Figure 6 In the electronic device, the processor 1010 can be used to call a program stored in the memory 1020 and execute it to implement the printing control method as described in the various method embodiments of this specification.
[0142] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory, or random access memory, etc.
[0143] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in the embodiments of this specification are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the object characteristics, interactive behavior characteristics, and user information involved in this specification were all obtained under full authorization.
[0144] The above-disclosed embodiments are merely preferred embodiments of this specification and should not be construed as limiting the scope of this specification. Therefore, any equivalent variations made in accordance with the claims of this specification shall still fall within the scope of this specification.
Claims
1. A printing control method, characterized in that, The method includes: Obtain the print job and the corresponding print data; Determine at least one heating control mode corresponding to the printing task based on the printing data; According to the heating control mode, the print head is controlled to print on the printing medium; among them, different types of heating control modes correspond to different print quality and print speed.
2. The method according to claim 1, characterized in that, Determining at least one heating control mode corresponding to the printing task based on the printing data includes: The printed data is parsed to obtain the parsing result, and feature parameters are extracted from the parsing result; The feature parameters are matched with preset mode decision parameters to obtain a matching result, and at least one heating control mode corresponding to the printing task is determined based on the matching result.
3. The method according to claim 2, characterized in that, The feature parameters include content feature types for different printing areas, and the mode decision parameters include fine content type and coarse content type. The process of matching the feature parameters with preset mode decision parameters to obtain a matching result, and determining at least one heating control mode corresponding to the printing task based on the matching result, includes: The content feature type of the printed area is matched with the fine content type and the coarse content type to obtain the content matching result; When the content matching result indicates that the content feature type of the printing area belongs to the fine content type, the printing task of the printing area is determined to correspond to the high-quality heating control mode. When the content matching result indicates that the content feature type of the printing area belongs to the coarse content type, the printing task of the printing area is determined to correspond to the high printing speed heating control mode.
4. The method according to claim 2, characterized in that, The feature parameters include the printing rate per row of pixels, and the mode decision parameters include a first printing rate threshold and a second printing rate threshold, wherein the first printing rate threshold is greater than the second printing rate threshold; the step of matching the feature parameters with preset mode decision parameters to obtain a matching result, and determining at least one heating control mode corresponding to the printing task based on the matching result, includes: The printing rate of the current row is compared with the first printing rate threshold and the second printing rate threshold respectively to obtain the second comparison result; When the second comparison result indicates that the printing rate is greater than or equal to the first printing rate threshold, the current line in the printing task is determined to use a high-quality printing heating control mode from the heating control modes. When the second comparison result indicates that the print rate is less than or equal to the second print rate threshold, it is determined that the current line in the printing task adopts a high-printing-speed heating control mode.
5. The method according to claim 4, characterized in that, The step of determining at least one heating control mode corresponding to the printing task based on the matching result further includes: When the second comparison result indicates that the printing rate is greater than the second printing rate threshold and less than the first printing rate threshold, the heating control mode of the previous line is obtained, and it is determined that the current line in the printing task adopts the heating control mode of the previous line.
6. The method according to claim 2, characterized in that, The feature parameters include edge density, which measures the degree of image change in the current row relative to the previous row. Edge density is obtained by performing a bitwise XOR operation between the bitmap data of the current row and the bitmap data of the previous row, counting the number of bits with a 1 in the XOR result, and dividing the number of bits by the total number of bits in the current row. The mode decision parameters include a first edge density threshold and a second edge density threshold, where the first edge density threshold is greater than the second edge density threshold. The process of matching the feature parameters with preset mode decision parameters to obtain a matching result, and determining at least one heating control mode corresponding to the printing task based on the matching result, includes: The edge density of the current row is compared with the first edge density threshold and the second edge density threshold respectively to obtain a third comparison result; When the third comparison result indicates that the edge density is greater than or equal to the first edge density threshold, it is determined that the current row is in the fine edge region of the image, and it is determined that the current row in the printing task adopts a high-quality heating control mode. When the third comparison result indicates that the edge density is less than or equal to the second edge density threshold, it is determined that the current row is in a flat area of the image, and it is determined that the current row in the printing task adopts a high-printing-speed heating control mode.
7. The method according to claim 6, characterized in that, The step of determining at least one heating control mode corresponding to the printing task based on the matching result further includes: When the third comparison result indicates that the edge density is greater than the second edge density threshold and less than the first edge density threshold, the heating control mode of the previous row is obtained, and it is determined that the current row in the printing task adopts the heating control mode of the previous row.
8. The method according to claim 2, characterized in that, The feature parameters include a task type identifier, and the mode decision parameters include an image task identifier and a text type identifier. The step of matching the feature parameters with preset mode decision parameters to obtain a matching result, and determining at least one heating control mode corresponding to the printing task based on the matching result, includes: The task type identifier is matched with the image task identifier and the text type identifier respectively to obtain the identifier matching result; When the identifier matching result indicates that the task type identifier matches the image task identifier, the printing task is determined to be an image type printing task, and the high-quality heating control mode corresponding to the printing task is determined. When the identifier matching result indicates that the task type identifier matches the text type identifier, the printing task is determined to be a text-type printing task, and the high-speed heating control mode corresponding to the printing task is determined.
9. The method according to claim 2, characterized in that, The feature parameters include the color rendering level of the printing media, and the mode decision parameters include a color rendering difficulty threshold. The process of matching the feature parameters with preset mode decision parameters to obtain a matching result, and determining at least one heating control mode corresponding to the printing task based on the matching result, includes: The color rendering level of the consumables is compared with the color rendering difficulty threshold to obtain the fourth comparison result; When the fourth comparison result indicates that the color rendering level of the consumable is greater than or equal to the color rendering difficulty threshold, it is determined that the printing medium belongs to the first color rendering difficulty medium, the printing task corresponds to the high printing quality heating control mode, and the reference heating time in the high printing quality heating control mode is increased. When the fourth comparison result indicates that the color rendering level of the consumable is less than the color rendering difficulty threshold, it is determined that the printing medium belongs to the second color rendering difficulty medium, and the heating control mode corresponding to the high printing speed of the printing task is determined.
10. The method according to claim 2, characterized in that, The step of matching the feature parameters with preset mode decision parameters to obtain a matching result, and determining at least one heating control mode corresponding to the printing task based on the matching result, includes: The various feature parameters are matched with their corresponding preset mode decision parameters to obtain parameter matching results; When the parameter matching results indicate that different feature parameters match to obtain multiple different heating control modes, the priority of the heating control mode is determined, and the heating control mode corresponding to the printing task is determined according to the priority.
11. The method according to claim 1, characterized in that, Determining at least one heating control mode corresponding to the printing task based on the printing data includes: Read the first mode selection instruction from the printed data; the first mode selection instruction is a mode selection instruction corresponding to a mode identifier preset by an external device or user; The heating control mode corresponding to the printing task is determined according to the first mode selection instruction.
12. The method according to claim 11, characterized in that, The first mode selection instruction has a higher priority than any other reference mode selection instruction.
13. The method according to claim 1, characterized in that, The method further includes: Monitor the current temperature of the printhead; reduce the heating time when the current temperature rises, and increase the heating time corresponding to the heating control mode when the current temperature falls. Monitor the current value of the power supply voltage; when the current value increases, reduce the heating time; when the current value decreases, increase the heating time corresponding to the heating control mode. Monitor the printing rate of the current row. When the printing rate increases, increase the heating time. When the printing rate decreases, decrease the heating time corresponding to the heating control mode.
14. The method according to claim 1, characterized in that, The step of controlling the print head to print on the printing medium according to the heating control mode includes: When the heating control mode is a high-print-quality heating control mode, the print head is controlled to perform a single first heating process and a single first cooling process for each pixel. The first heating process uses a thermal history algorithm of first complexity and an energy-graded heating method. The energy-graded heating method divides the current pixel into multiple energy levels based on the color rendering state of the current pixel and the adjacent pixels at preset positions around the current pixel, and divides the first heating process into multiple heating stages including a basic heating stage and at least two fine-tuning heating stages. Pixels of different energy levels participate in heating methods with different numbers of heating stages. The duration of the first cooling process is the first cooling duration. When the heating control mode is a high-printing-speed heating control mode, the print head is controlled to perform a single second heating process and a single second cooling process for each pixel to print on the printing medium; the second heating process adopts a thermal history algorithm with a second complexity and a time-sequential segmented heating method; the time-sequential segmented heating method is a heating method in which the motor triggers a heating action once every preset number of steps during the continuous stepping printing process of a single pixel; the duration of the second cooling process is the second cooling duration; The first cooling duration is longer than the second cooling duration; the printing quality of the high-printing-quality heating control mode is higher than that of the high-printing-speed heating control mode; the printing speed of the high-printing-speed heating control mode is higher than that of the high-printing-quality heating control mode.
15. The method according to claim 14, characterized in that, The adjacent pixels at preset positions around the current pixel include: a first pixel directly above the current pixel, a second pixel directly above the first pixel, a third pixel to the left of the second pixel, a fourth pixel to the right of the second pixel, and a fifth pixel directly below the current pixel. The multiple energy levels of the current pixel are obtained by setting the initial energy level of the current pixel to the highest level, reducing the energy level of the current pixel by one level when the first pixel is in a colored state, reducing the energy level of the current pixel by another level when at least one of the second, third, and fourth pixels is in a colored state, and reducing the energy level of the current pixel by another level when the fifth pixel is in a non-colored state.
16. The method according to claim 14, characterized in that, The multiple energy levels include: a first energy level, a second energy level, a third energy level, and a fourth energy level; the fourth energy level has the highest energy value among the multiple energy levels. The multiple heating stages include a basic heating stage, a first fine heating stage, a second fine heating stage, and a third fine heating stage; the heating sequence of the basic heating stage, the first fine heating stage, the second fine heating stage, and the third fine heating stage is arranged sequentially. When the energy level of the current pixel is the fourth energy level, the current pixel is heated through the basic heating stage, the first fine heating stage, the second fine heating stage, and the third fine heating stage; When the energy level of the current pixel is the third energy level, the current pixel is heated through the basic heating stage, the first fine heating stage, and the second fine heating stage; When the energy level of the current pixel is the second energy level, the current pixel is heated through the basic heating stage and the first fine heating stage; When the energy level of the current pixel is the first energy level, the current pixel is heated through the basic heating stage.
17. The method according to any one of claims 3 to 7, characterized in that, The method further includes: Monitor the mode switching signal, and when the mode switching signal indicates a switch from the high printing speed heating control mode to the high printing quality heating control mode, obtain the first position of the mode switching line and the second position before the first position; When the printhead prints the printing medium to the second position, the historical data cache of the thermal history algorithm required by the high-quality printing heating control mode is loaded, so that when the printhead prints the printing medium to the first position, printing is performed according to the high-quality printing heating control mode.
18. A printing control device, the device comprising: The acquisition module is used to acquire the print task and the print data corresponding to the print task; The determining module is used to determine at least one heating control mode corresponding to the printing task based on the printing data; The printing module is used to control the print head to print on the printing medium according to the heating control mode; wherein, the printing quality and printing speed are different for different types of heating control modes.
19. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, which are adapted to be loaded by a processor and executed as method steps as claimed in any one of claims 1 to 17.
20. An electronic device, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed the method steps as claimed in any one of claims 1 to 17.
