A thermal printing control method and micro processing chip
By employing a random sorting algorithm to process the heating array in thermal printing technology and generating a random array, the problems of excessive current and localized overheating caused by simultaneous heating of pixels are solved, thereby improving print quality and equipment lifespan.
Patent Information
- Application Number
- CN202411786973.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-12-05
AI Technical Summary
In existing thermal printing technology, simultaneous heating of pixels leads to excessive instantaneous current and localized overheating, affecting printing quality and equipment lifespan.
A random sorting algorithm is used to process the heating array, generate a random array, and control the execution order of heating pulses and non-heating pulses, so that the heating timing of pixels is randomly allocated, avoiding local heat concentration and excessive instantaneous current.
It improves the uniformity and smoothness of printed images, reduces equipment heat load and wear, and extends the service life of printing equipment.
Smart Images

Figure CN119795757B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of heating control, and more particularly to a thermal printing control method and a microprocessor chip. Background Technology
[0002] Thermal printing technology is widely used in receipt printing, label printing, and portable printing devices. Its basic principle is to heat specific areas by controlling the heating element of the printhead, thereby forming an image on thermal paper. In traditional thermal printing methods, the printhead achieves grayscale printing through pulse heating. The grayscale level of each pixel is controlled by the duration of heating: the longer the heating time, the darker the printed color, and vice versa.
[0003] Printing typically employs a continuous sequence of heating pulses. At the beginning of each line of printing, all points requiring heating begin heating almost simultaneously, resulting in excessive instantaneous current and placing a significant burden on the power supply and circuitry. If printing large or dark areas, the continuous heating pulses can easily cause the thermal printhead to overheat. Insufficient heat dissipation can lead to excessively high printhead temperatures, affecting print quality and extending the lifespan of the equipment. Summary of the Invention
[0004] To address the shortcomings of existing technologies, the purpose of this invention is to provide a thermal printing control method and a microprocessor chip to solve the problems of excessive instantaneous current and localized overheating caused by the simultaneous heating of multiple pixels during thermal printing.
[0005] According to a first aspect of the present invention, a thermal printing control method is provided, the thermal printing control method comprising:
[0006] In response to a print request, a heating array is generated, which stores the default heating sequence of the rows to be printed; the heating array is processed by a random sorting algorithm to obtain a random array; the pixels are generated according to the actual heating sequence of the random array.
[0007] In some implementations, the actual heating sequence of the pixel includes the execution order of control heating pulses and control non-heating pulses.
[0008] In some implementations, one or more pixels in the row to be printed correspond to a random array, and the random arrays obtained after processing the heated arrays by a random sorting algorithm are different.
[0009] In some implementations, at least two different random arrays exist;
[0010] One or more pixels correspond to a random array including:
[0011] Pixels with the same spacing correspond to the same random array.
[0012] In some implementations, the interval is determined based on the number of random sorting algorithms.
[0013] In some embodiments, the heating array is processed by a random sorting algorithm to obtain a random array, including:
[0014] The random array includes multiple subarrays, and the control heating pulses and control non-heating pulses of the pixel are evenly distributed in the multiple subarrays;
[0015] The actual heating sequence is obtained by processing the subarray and its elements using a random sorting algorithm.
[0016] In some embodiments, the heating array stores the default heating sequence of the rows to be printed, including:
[0017] The control heating pulse and control non-heating pulse for each pixel in the row to be printed are represented by binary numbers. The bits of the binary numbers are encoded sequentially to obtain the default heating sequence for the row to be printed. A random array is obtained by processing the heating array using a random sorting algorithm, including:
[0018] The encoding of the default heating sequence stored in the heating array is processed by a random sorting algorithm.
[0019] In some implementations, the number of elements in the heating array is greater than the total number of control heating pulses and control non-heating pulses in the pixel, and the elements in the heating array that are greater than the total number of control heating pulses and control non-heating pulses are by default indicated as control non-heating pulses.
[0020] In some implementations, the random sorting algorithm includes shuffling, grouping, and / or alternating sorting.
[0021] In some embodiments, the control heating pulse and the control non-heating pulse are both pulses of equal width or pulses of equal proportion.
[0022] According to a second aspect of the present invention, a microprocessor chip is provided for performing the thermal printing control method described above.
[0023] Compared with the prior art, the thermal printing control method and microprocessor chip of the present invention generate the actual heating sequence of the rows to be printed based on a random array, so that the control heating pulses of the pixels are randomly distributed within the total heating time, thereby effectively avoiding the problems of local heat concentration and excessive instantaneous current, improving the uniformity and smoothness of the printed image, reducing the heat load and wear of the equipment, and extending the service life of the printing equipment. Attached Figure Description
[0024] Figure 1 This is a flowchart of a thermal printing control method according to an embodiment of the present invention;
[0025] Figure 2 This is a flowchart of another thermal printing control method according to an embodiment of the present invention;
[0026] Figure 3 This is a schematic diagram of a heating pulse according to an embodiment of the present invention;
[0027] Figure 4 This is a schematic diagram of a random array according to an embodiment of the present invention;
[0028] Figure 5 This is a flowchart illustrating another thermal printing control method according to an embodiment of the present invention;
[0029] Figure 6 This is a schematic diagram of a grouping disorder method according to an embodiment of the present invention;
[0030] Figure 7 This is a schematic diagram of the printing control device according to an embodiment of the present invention;
[0031] Figure 8 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0032] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure.
[0033] A thermal printer has a heating element installed on the thermal printhead. This heating element heats the printhead and, upon contact with the thermal printing medium, prints the desired image or text, similar in principle to a thermal fax machine. When the heating element is activated, it rapidly heats and contacts the thermal printing medium, causing a localized temperature rise and chemical reaction in the thermal coating, resulting in a color change and the printed image or text. To achieve different grayscale levels, variations in grayscale values are achieved by controlling the heating duration or the number of pulses.
[0034] In existing thermal printing, pixels simultaneously receive heating pulses, causing a sudden increase in current load and easily leading to overcurrent problems. Furthermore, when printing large, dark areas, continuous high current causes a rapid rise in temperature, resulting in localized overheating, affecting print quality, and shortening the printhead's lifespan.
[0035] The thermal printing control method, microprocessor chip, system, and device provided in this application aim to solve the above-mentioned technical problems of the prior art.
[0036] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0037] Figure 1 This is a schematic flowchart illustrating a thermal printing control method provided in an embodiment of this application. Figure 1 As shown, this method includes:
[0038] Step S11: In response to the print request, a heating array is generated, which stores the default heating sequence of the rows to be printed; the heating array is processed by a random sorting algorithm to obtain a random array; the pixels are generated according to the actual heating sequence of the random array.
[0039] For example, the executing entity of this embodiment can be a thermal printing device, a terminal device, a thermal printing apparatus or device, or other devices or apparatus that can execute this embodiment, and there is no limitation thereto.
[0040] Upon receiving a print request, the system responds to the print request. The print request is used to print the raw image data. The raw image data includes pixel data, which includes the pixel position and the grayscale value corresponding to each pixel.
[0041] During the printing process, the original image data is divided into multiple rows of data to be printed, each row being the print row. The print row is read line by line, and each row is heated and printed sequentially. Different grayscale values are achieved by heating the pixels according to the heating sequence, and the default heating sequence of the pixels can be represented by binary numbers.
[0042] The raw image data includes the grayscale value of each pixel, ranging from 0 to 255, where 0 represents pure white, 255 represents pure black, and intermediate values represent different shades of gray.
[0043] During normal printing, the heating sequence represented by the aforementioned binary number is used to heat the pixels. This includes heating the pixels according to the number of control heating pulses represented by the binary number. The more control heating pulses or the longer the pulse width, the higher the heating temperature and the deeper the grayscale, thus achieving thermal grayscale printing. Taking a grayscale range of 0-255 as an example, when using pulses of equal width, each pixel receives a maximum of 255 control heating pulses, achieving grayscale levels from 0 to 255 based on the number of control heating pulses. When using pulses with different pulse widths, such as proportional pulses, each pixel receives a maximum of 8 control heating pulses, achieving grayscale levels from 0 to 255 based on combinations of control heating pulses with different widths.
[0044] A heating array is generated, which stores the default heating sequence of the rows to be printed. The heating array is then processed using a random sorting algorithm to obtain a random array. The pixels are then assigned their actual heating sequence according to this random array. Within the total heating time of the rows to be printed, the heating sequence of the pixels is randomly distributed, rather than concentrated within a short period, thereby avoiding simultaneous heating of all pixels or prolonged heating of a single pixel, and reducing instantaneous current requirements.
[0045] In one implementation, such as Figure 2 As shown, the actual heating sequence of the pixels to be printed is generated based on a random array, including:
[0046] Step S111: Generate the heating array.
[0047] like Figure 3As shown, the grayscale values of pixels in the row to be printed and the default heating sequence are represented by black squares indicating heating control pulses and white squares indicating no heating control pulses. The grayscale values 8, 6, 7, 5, 4, 3, and 0 are achieved by controlling the number of heating pulses sequentially. The heating control pulses and no heating control pulses of the pixels are represented by binary numbers. The binary representations of the heating control pulses and no heating control pulses of each pixel in the figure are 1111 1111, 1111 1100, 11111110, 1111 1000, 1111 0000, 1110 0000, and 0000 0000. The default heating sequence involves encoding the bits of the binary number sequentially. The heating array includes several elements, and the encodings are stored separately. In some implementations, the number of elements in the heating array is the same as the total number of control heating pulses and control non-heating pulses for each pixel. For example, the total number of control heating pulses and control non-heating pulses is 255, represented by 255-bit binary numbers. The heating array contains 255 elements, each storing the bit encoding of a 255-bit binary number. For example, the heating array is: a[0] = 1, a[1] = 2, ..., a
[254] = 255.
[0048] The control heating pulse and control non-heating pulse for each pixel are determined by the pixel's grayscale value; the higher the grayscale value, the more control heating pulses are required. In some implementations, the heating time for the row to be printed is divided into 255 pulse durations, and the heating sequence of these 255 pulse durations is sequentially numbered and stored in a heating array.
[0049] Step S112: Perform random sorting algorithm on the heating array to obtain a random array.
[0050] A random sorting algorithm is used to randomly rearrange the order of the codes stored in each element of the heating array, such as the Knuth shuffle algorithm or other similar random sorting algorithms. The random array is used to store the default order after shuffling. Randomly shuffling the codes stored in each element of the heating array enables the random distribution of heating pulses throughout the printing time, which helps reduce heat dissipation problems caused by continuous heating, reduces instantaneous current demand, improves equipment heat dissipation, enhances printing stability and quality, and ensures that the printhead can more effectively control the temperature during printing.
[0051] For example, the heating array is:
[0052] a[0]=1; a[1]=2; a[2]=3; a[3]=4; a[4]=5...a
[254] =255.
[0053] The elements are randomly arranged according to a random sorting algorithm, resulting in the following random array:
[0054] a[0]=9; a[1]=29; a[2]=57; a[3]=205; a[4]=131...a
[254] =189.
[0055] By randomly sorting the codes stored in each element of the heating array using a random sorting algorithm, the distribution of the control heating pulses is no longer continuous but randomly distributed throughout the printing time. This more evenly handles grayscale printing requirements, resulting in smoother and more natural grayscale representation of the printed image and solving the problems of heat concentration and excessive instantaneous current during thermal printing.
[0056] Step S113: Generate the actual heating sequence of the row to be printed based on the random array.
[0057] The elements in the random array are converted into the actual heating sequence. The actual heating sequence of the row to be printed includes the execution order of the control heating pulses and the control non-heating pulses.
[0058] like Figure 4 As shown, obtaining the actual heating sequence through a random array allows for the uniform distribution and control of the heating pulses, thus solving the problems of heat concentration and excessive instantaneous current during thermal printing. When the original image data contains large areas of dark color, the dispersed pulse distribution reduces the stripe effect in printing, resulting in better image printing quality.
[0059] In some implementations, one or more pixels in the row to be printed correspond to a random array, and the random arrays obtained after processing the heated arrays by a random sorting algorithm are different.
[0060] Multiple random arrays can be obtained by processing the heating array through multiple random sorting algorithms. A corresponding random array is determined for each pixel in the row to be printed. The actual heating sequence of different pixels corresponding to different random arrays is also different, which avoids repetitive or regular pulse patterns, makes the grayscale performance of the printed image smoother and the heat distribution more random, and reduces the risk of local overheating. The fact that some pixels correspond to one random array can reduce the generation of random arrays and avoid generating a large number of arrays, which would cause a storage burden.
[0061] Furthermore, each pixel in the line to be printed corresponds to one or more random arrays, and also includes:
[0062] Pixels with the same spacing correspond to the same random array.
[0063] Pixels with the same spacing are selected using the same random array, meaning they are sorted using the same random sorting algorithm. The spacing is determined by the number of random sorting algorithms used. Specifically, the spacing is the number of random sorting algorithms minus 1.
[0064] For example, with two different random sorting algorithms, the heating array can be divided into odd-numbered and even-numbered positions, with an interval of 1. Different random sorting algorithms are applied to the odd-numbered and even-numbered heating arrays, ensuring that the control heating pulse sequences within both groups are randomly distributed. Finally, the processed odd-numbered and even-numbered heating arrays are combined into an interleaved complete sequence, resulting in a random array. This creates an alternating pulse distribution on the time axis, making it less likely for consecutive control heating pulses to occur in adjacent time periods, further reducing the possibility of continuous heating.
[0065] When three different random sorting algorithms exist with an interval of 2, the heating array corresponding to the first pixel uses the first random sorting algorithm, the heating array corresponding to the second pixel uses the second random sorting algorithm, the heating array corresponding to the third pixel uses the third random sorting algorithm, the heating array corresponding to the fourth pixel uses the first random sorting algorithm, and so on. A fixed random sorting algorithm is selected for each heating array with the same interval. By using the same random sorting algorithm for pixels with the same interval, the control heating pulses of different areas are naturally staggered in time, allowing the heat to be more evenly distributed throughout the print line and preventing local overheating. Randomizing the interval makes the heating process more structured, requires less space to store the random sorting algorithms, and avoids the effect of concentrating heating of all pixels, which would lead to excessive current, thus ensuring high-quality and efficient operation of thermal printing.
[0066] The random sorting algorithm includes at least the shuffling method, the grouping disorder method, and the alternating disorder method. The shuffling method typically uses the Fisher-Yates shuffling algorithm, which can completely randomize all elements in the heating array. By randomly swapping their positions, 1s and 0s are evenly and randomly distributed throughout the array, reducing the probability of localized concentrated heating. The shuffling method ensures that the heating pulses are evenly distributed throughout the time series, reducing the probability of localized concentrated heating.
[0067] The alternating randomization method involves dividing the heating array into two groups: one with odd-numbered elements and the other with even-numbered elements. The elements in each group are then independently shuffled, resulting in a random distribution of control heating pulse sequences within both groups. Finally, the processed odd and even elements are combined into an alternating complete sequence, yielding a random array. This creates an alternating pulse distribution on the time axis, making it less likely for consecutive control heating pulses to occur in adjacent time periods, further reducing the possibility of continuous heating.
[0068] The grouping and shuffling method divides the heating array into multiple smaller subarrays, each containing a certain number of 1s and 0s. Each subarray is then randomly shuffled using a random sorting algorithm, such as shuffling, to ensure a uniform distribution of control heating pulses within each group. Finally, these subarrays are recombine to obtain a random array. This method guarantees a uniform heating sequence distribution within local time periods, preventing excessively dense control heating pulses in certain local areas.
[0069] The random sorting algorithm includes at least the shuffling method, the grouping disorder method, and the alternating disorder method. The shuffling method typically uses the Fisher-Yates shuffling algorithm, which can completely randomize all elements in the heating array. By randomly swapping the positions of each element, the actual heating sequence of the pixels is uniformly and randomly distributed throughout the array, reducing the probability of localized concentrated heating. The shuffling method ensures that the controlled heating pulses are uniformly distributed throughout the time series, reducing the probability of localized concentrated heating.
[0070] The alternating randomization method involves dividing the heating array into two groups: one with odd-numbered elements and the other with even-numbered elements. The elements in each group are then independently shuffled, resulting in a random distribution of control heating pulse sequences within both groups. Finally, the processed odd and even elements are combined into an alternating complete sequence, yielding a random array. This creates an alternating pulse distribution on the time axis, making it less likely for consecutive control heating pulses to occur in adjacent time periods, further reducing the possibility of continuous heating.
[0071] The grouping and randomization method divides the heating array into multiple smaller subarrays, each containing a certain number of elements. Each subarray is randomly shuffled using a random sorting algorithm such as shuffling to ensure a uniform distribution of control heating pulses within each group. Finally, these subarrays are recombine to obtain a random array. This method guarantees a uniform heating sequence distribution within local time periods, preventing excessively dense control heating pulses in certain local areas.
[0072] In some implementations, such as Figure 5 The diagram shown is a flowchart illustrating the process of obtaining the actual heating sequence using a grouping and randomization method.
[0073] Step S511: The random array includes multiple subarrays, and the control heating pulse and control non-heating pulse of the pixel are evenly distributed in the multiple subarrays;
[0074] Step S512: The subarray and its elements are processed by a random sorting algorithm to obtain the actual heating sequence.
[0075] After obtaining the heating array, for example, a heating array of length 1024, where 255 elements need to be heated (representing control pulses) and 769 elements do not need to be heated (representing control pulses to stop heating), the entire heating array is divided into several smaller subarrays, such as 4 or 8 groups. Each group contains an equal number of elements that need to be heated and those that do not. Dividing it into multiple subarrays facilitates subsequent segmented randomized control.
[0076] When grouping, the 255 elements that require heating and the 769 elements that do not require heating are distributed as evenly as possible among the groups. For example... Figure 6 As shown, if the array is divided into 4 groups, each group has 64 control heating pulses and 192 control non-heating pulses. The elements requiring heating and those not requiring heating within each subarray are shuffled using a random sorting algorithm. A shuffling algorithm or other suitable random sorting method can be used to randomize the distribution of heating elements within each subgroup, avoiding excessive concentration of control heating pulses.
[0077] After randomizing within each subarray, the subarrays themselves are then randomized again to further ensure a globally uniform distribution of the heating pulses. The shuffled subarrays are then merged in a new order to obtain a random array. This double shuffling within and between groups ensures a uniform distribution of the heating pulses along the time axis, avoiding excessive continuous heating and reducing localized heat concentration. The uniform distribution of the heating pulses after grouping reduces instantaneous current peaks, decreases pressure on the power supply, improves current load stability, reduces stripes and other unevenness issues in printing, and results in smoother grayscale transitions in the image.
[0078] In some implementations, at least two different random sorting algorithms exist. The number of random sorting algorithms can be three, four, or more, and can be adjusted according to the hardware conditions of the thermal printer or the complexity of the original image data, and is not limited in this application.
[0079] In one implementation, the number of elements in the heating array is greater than the total number of control heating pulses and control non-heating pulses for each pixel, and the default state of each element in the heating array is control non-heating pulse. By expanding the number of elements in the heating array, the control heating pulses are evenly distributed across more elements, thereby optimizing heat management and current load.
[0080] For example, since the pulse duration is 255, and the heating array contains more than 255 elements, the remaining 769 elements, excluding the normally stored control heating pulses, are filled with 0s, indicating that no heating occurs during the pulse durations corresponding to these elements. The heating array is then randomly sorted, with the 255 1s and 769 0s randomly distributed across the 1024 elements. This ensures that the control heating pulses are distributed throughout the entire heating duration, rather than concentrated in a short period, thus reducing the load on each pulse and preventing the simultaneous heating of too many pixels.
[0081] Step S12: Print the line to be printed according to the actual heating sequence.
[0082] The pixels are heated according to the actual heating sequence. Since the positions of all pulses in the actual heating sequence are randomly distributed, when the pixels are printed in the order of the actual heating sequence, not all pixels in the row to be printed will be heated for a long time. This avoids the problem of excessive current and overheating due to insufficient heat dissipation caused by heating a large number of pixels at the same time.
[0083] In some implementations, the heating pulses corresponding to each actual heating sequence can be equal-width pulses or proportional pulses. When the heating pulses are equal-width pulses, heating is performed with equal-width pulses according to the actual heating information. Each pixel receives a corresponding number of equal-width pulses based on its grayscale value; pixels with higher grayscale values receive more control heating pulses and have a darker color.
[0084] When the heating pulses are proportional, the thermal printer controller receives combinations of heating pulses of varying widths for each pixel according to the actual heating information. A pixel may receive multiple combinations of heating pulses, such as T+2T+4T. The control heating pulses, after being processed by a random array, ensure that each pixel is heated in a random order according to the control heating pulses, thereby achieving staggered heating and reducing instantaneous current. By using combinations of heating pulses of different widths, each pixel can generate grayscale images or text on the thermal printing medium.
[0085] This method generates the actual heating sequence of the rows to be printed based on a random array, which randomly distributes the heating sequence of pixels within the printed row. This effectively avoids the problems of local heat concentration and excessive instantaneous current, improves the uniformity and smoothness of the printed image, reduces the thermal load and wear of the equipment, and extends the service life of the printing equipment.
[0086] Figure 7 This is a schematic diagram of a thermal printing device provided in this application. The device includes:
[0087] The heating timing determination module 710, in response to a printing request, generates multiple heating arrays and processes the multiple heating arrays using a random sorting algorithm to obtain a random array; the random array allows the heating timing of pixels in the row to be printed to be randomly assigned to obtain the actual heating timing.
[0088] The printing module 720 prints the line to be printed according to the actual heating sequence.
[0089] The apparatus in this embodiment can execute the technical solutions in the above method. Its specific implementation process and technical principles are the same, and will not be repeated here.
[0090] An embodiment of the present invention provides an image forming apparatus, which includes the thermal printing apparatus described above.
[0091] For example, this application provides a microprocessor chip for executing the thermal printing control method described in the above embodiments. For instance, the microprocessor chip may be a microcontroller unit (MCU), digital signal processor (DSP), MPU (including a microprocessor unit and a memory protection unit), or a micro central processing unit (CPU), or any other micro central control chip or system-on-a-chip capable of processing digital signals, analog signals, or performing signal control, instruction processing, and computation functions.
[0092] This invention provides an electronic device, such as... Figure 8 As shown, Figure 8 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0093] like Figure 8 As shown, the electronic device is represented in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: one or more processors 810, memory 830, and communication bus 840 connecting different system components (including memory 830 and processor 810).
[0094] The communication bus 840 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0095] Electronic devices typically include a variety of computer-readable media. These media can be any available media that can be accessed by the electronic device, including volatile and non-volatile media, and removable and non-removable media.
[0096] Memory 830 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The electronic device may further include other removable / non-removable, volatile / non-volatile computer system storage media. Although Figure 8 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a compact disc read-only memory (CD-ROM), a digital video disc read-only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to the communication bus 840 via one or more data media interfaces. The memory 830 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0097] A program / utility having a set (at least one) of program modules can be stored in memory 830. Such program modules include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. The program modules typically perform the functions and / or methods described in the embodiments of the present invention.
[0098] The electronic device can also communicate with one or more external devices, one or more devices that enable a user to interact with the electronic device, or any device that enables the electronic device to communicate with one or more other computing devices (e.g., network interface card, modem, etc.). This communication can be performed through the communication interface 820. Furthermore, the electronic device can also communicate through a network adapter (…). Figure 8 (Not shown) communicates with one or more networks (e.g., Local Area Network (LAN), Wide Area Network (WAN), and / or public networks, such as the Internet). The aforementioned network adapter can communicate with other modules of the electronic device via the communication bus 840. It should be understood that, although... Figure 8 Not shown, other hardware and / or software modules can be used in conjunction with electronic devices, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk arrays (Redundant Arrays of Independent Drives; hereinafter referred to as RAID) systems, tape drives, and data backup storage systems.
[0099] The processor 810 executes various functional applications and data processing by running programs stored in the memory 830, such as implementing a thermal printing control method provided in an embodiment of the present invention.
[0100] The present invention also provides a computer-readable storage medium storing computer instructions that cause the computer to execute a thermal printing control method provided in the embodiments of the present invention.
[0101] The aforementioned computer-readable storage medium may be any combination of one or more computer-readable media. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof, but is not limited thereto. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that may be used by or in connection with an instruction execution system, apparatus, or device.
[0102] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0103] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, radio frequency (RF), or any suitable combination thereof.
[0104] The above descriptions are merely some embodiments of the present invention. Those skilled in the art can make various modifications and improvements without departing from the inventive concept of the present invention, and these all fall within the scope of protection of the present invention.
Claims
1. A thermal printing control method, characterized in that, The thermal printing control method includes: In response to a print request, a heating array is generated, which stores the default heating sequence of the rows to be printed; the heating array is processed by a random sorting algorithm to obtain a random array; the pixels are generated according to the random array to form an actual heating sequence; the actual heating sequence of the pixels includes the execution order of the control heating pulse and the control non-heating pulse. The heating array stores the default heating sequence for the rows to be printed, including: The control heating pulse and control non-heating pulse of each pixel in the row to be printed are represented by binary numbers. The bits of the binary numbers are encoded sequentially to obtain the default heating sequence of the row to be printed. The heated array is processed by a random sorting algorithm to obtain a random array, including: The codes stored in the heating array are processed by a random sorting algorithm.
2. The thermal printing control method according to claim 1, characterized in that, One or more pixels in the line to be printed correspond to a random array, and the random arrays obtained after processing the heated arrays by a random sorting algorithm are different.
3. The thermal printing control method according to claim 1, characterized in that, There are at least two different random arrays; One or more pixels correspond to a random array including: Pixels with the same spacing correspond to the same random array.
4. The thermal printing control method according to claim 1, characterized in that, The heating array is processed by a random sorting algorithm to obtain a random array, including: The random array includes multiple subarrays, and the control heating pulses and control non-heating pulses of the pixel are evenly distributed in the multiple subarrays; The actual heating sequence is obtained by processing the subarray and its elements using a random sorting algorithm.
5. The thermal printing control method according to claim 1, characterized in that, The number of elements in the heating array is greater than the total number of control heating pulses and control non-heating pulses in the pixel. Elements in the heating array that are greater than the total number of control heating pulses and control non-heating pulses are defaulted to indicating control non-heating pulses.
6. The thermal printing control method according to claim 1, characterized in that, The random sorting algorithm includes shuffling, grouping and / or alternating sorting.
7. The thermal printing control method according to claim 1, characterized in that, Both the control heating pulse and the control non-heating pulse are pulses of equal width or pulses of equal proportion.
8. A microprocessor chip, characterized in that, The microprocessor chip is used to execute the thermal printing control method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Printing method and device, printer and storage medium
CN111923605A
Segmented heating method of thermal printer
CN117944384A