Thermal printing control method and micro-processing chip
By randomly sorting the heating array of thermal printing, the random distribution of pixel dot heating timing is realized, and the problems of excessive current and local overheating caused by the simultaneous heating of pixel dots in thermal printing are solved, which improves the printing quality and equipment life.
Patent Information
- Application Number
- CN202411786973.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-05
AI Technical Summary
During the thermal printing process, the simultaneously heating of pixel dots leads to excessive instantaneous current and local overheating problems, affecting the printing effect and equipment life.
By generating a heating array and processing it with a random sorting algorithm, a random array is obtained, so that the heating timing of pixel points is randomly distributed, and a large number of pixel points are avoided at the same time.
It effectively avoids the problems of local heat concentration and instantaneous current too high, 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.
Smart Images

Figure CN119795757A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of heating control, and in particular to a thermal printing control method and a microprocessor chip. Background Art
[0002] Thermal printing technology is widely used in receipt printing, label printing and portable printing devices. The basic principle is to control the heating element of the print head to heat a specific area to form an image on thermal paper. In traditional thermal printing methods, the print head uses pulse heating to achieve grayscale printing. The grayscale of each dot is achieved by controlling the length of the heating time: the longer the heating time, the darker the printed color, and vice versa.
[0003] Usually, a continuous heating pulse sequence is used to achieve printing. At the beginning of each line of printing, all points that need to be heated start to heat up almost at the same time, and the instantaneous current is too large, which puts a heavy burden on the power supply and circuit. If you print a large or dark area, continuous heating pulses can easily cause the thermal print head to overheat. The problem of untimely heat dissipation may cause the temperature of the thermal print head to be too high, affecting the printing effect and the life of the equipment. Summary of the invention
[0004] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a thermal printing control method and a microprocessor chip to solve the problem of excessive instantaneous current and local overheating caused by 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, wherein the heating array stores a default heating timing of a line to be printed; a random array is obtained by performing a random sorting algorithm on the heating array; and an actual heating timing is generated for a pixel point according to the random array.
[0007] In some embodiments, the actual heating timing of the pixel point includes controlling the execution order of the heating pulse and controlling the non-heating pulse.
[0008] In some embodiments, one or more pixels in the to-be-printed row correspond to a random array, and the random arrays obtained after the heating arrays are processed by a random sorting algorithm are different.
[0009] In some embodiments, there are at least two different random arrays;
[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 embodiments, the interval is determined according to a number of random sorting algorithms.
[0013] In some embodiments, the random array is obtained by performing a random sorting algorithm on the heating array, comprising:
[0014] The random array includes a plurality of sub-arrays, and the control heating pulses and the control non-heating pulses of the pixel points are evenly distributed in the plurality of sub-arrays;
[0015] The sub-array and the elements in the sub-array are processed by a random sorting algorithm to obtain an actual heating timing sequence.
[0016] In some embodiments, the heating array stores a default heating sequence for a line to be printed, including:
[0017] The control heating pulse and the control non-heating pulse of each pixel point in the to-be-printed line are represented by a binary number, and the bits of the binary number are encoded in sequence to obtain a default heating timing sequence of the to-be-printed line; and the heating array is processed by a random sorting algorithm to obtain a random array, including:
[0018] The codes of the default heating sequence stored in the heating array are processed by a random sorting algorithm.
[0019] In some embodiments, 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 points, and the elements in the heating array greater than the total number of control heating pulses and control non-heating pulses are defaulted to indicating control non-heating pulses.
[0020] In some embodiments, the random sorting algorithm includes a shuffle method, a group shuffle method, and / or an alternating shuffle method.
[0021] In some embodiments, the controlled heating pulse and the controlled non-heating pulse are both equal-width pulses or equal-proportional pulses.
[0022] According to a second aspect of the present invention, a microprocessor chip is provided, wherein the microprocessor chip is used to execute the thermal printing control method as described above.
[0023] Compared with the prior art, the thermal printing control method and microprocessor chip of the present invention generate the actual heating timing of the to-be-printed line based on a random array, so that the control heating pulses of the pixel points 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 thermal load and wear of the equipment, and extending the service life of the printing equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A flow chart of a thermal printing control method according to an embodiment of the present invention;
[0025] Figure 2 A flowchart of another thermal printing control method according to an embodiment of the present invention;
[0026] Figure 3 A schematic diagram of a heating pulse according to an embodiment of the present invention;
[0027] Figure 4 A schematic diagram of a random array according to an embodiment of the present invention;
[0028] Figure 5 A flowchart of another thermal printing control method according to an embodiment of the present invention;
[0029] Figure 6 A schematic diagram of a grouping disorder method according to an embodiment of the present invention;
[0030] Figure 7 It is a schematic structural diagram of a printing control device according to an embodiment of the present invention;
[0031] Figure 8 It is a schematic structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.
[0033] A thermal printer is a printer that has a heating element installed on the thermal print head. When the heating element is heated and contacts the thermal print medium, the required pattern or text can be printed. Its principle is similar to that of a thermal fax machine. When the heating element is activated, it quickly heats up and contacts the thermal print medium, causing the thermal coating on the thermal print medium to heat up locally and undergo a chemical reaction, thereby changing color to form the printed pattern or text. To meet different grayscale requirements, the grayscale value of the image or text can be changed by controlling the heating time or the number of pulses.
[0034] In existing thermal printing, pixels receive heating pulses at the same time, causing the current load to increase instantly, which can easily lead to overcurrent problems. In addition, when printing a large dark area, continuous high current will cause the temperature to rise rapidly, causing local overheating problems, affecting the printing effect and shortening the service life of the print head.
[0035] The present application provides a thermal printing control method, microprocessor chip, system and device, which are intended to solve the above technical problems in the prior art.
[0036] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0037] Figure 1 A schematic diagram of a thermal printing control method provided in an embodiment of the present application. Figure 1 As shown, the method includes:
[0038] Step S11, in response to a print request, generating a heating array, wherein the heating array stores a default heating sequence of a line to be printed; performing a random sorting algorithm on the heating array to obtain a random array; and generating an actual heating sequence for the pixel points according to the random array.
[0039] Exemplarily, the execution subject of this embodiment may be a thermal printing device, a terminal device, a thermal printing apparatus or device, or other devices or equipment that can execute this embodiment, and there is no limitation to this.
[0040] When a print request is received, respond to the print request. The print request is used to print the original image data. The original image data includes pixel data, and the pixel data includes the pixel point position and the gray value corresponding to each pixel point.
[0041] During the printing process, the original image data is specifically divided into multiple lines of data to be printed, and each line of data to be printed is a line to be printed. By reading the data to be printed line by line, the heating printing of each line is completed in sequence. Different grayscale values are achieved by heating the pixel points through the heating timing, and the default heating timing of the pixel can be represented by a binary number.
[0042] The original image data includes the grayscale value of each pixel, ranging from 0 to 255, for example, where 0 represents complete white, 255 represents complete black, and intermediate values represent different degrees of gray.
[0043] During normal printing, the pixel points are realized according to the heating timing represented by the above binary number, including heating the pixel points according to the number of control heating pulses represented by the binary number. The more the number of control heating pulses or the longer the pulse width of the control heating pulse, the higher the corresponding heating temperature and the darker the corresponding grayscale, thereby realizing thermal grayscale printing. Taking the grayscale range of 0 to 255 as an example, when equal-width pulses are used, the number of control heating pulses corresponding to each pixel point is at most 255 times, and 0 to 255 grayscales are realized in sequence according to the number of control heating pulses; when pulses with different pulse widths are used, such as proportional pulses, the number of control heating pulses corresponding to each pixel point is at most 8 times, and 0 to 255 grayscales are realized according to the combination of control heating pulses with different widths.
[0044] Generate a heating array, the heating array stores the default heating timing of the line to be printed; perform random sorting algorithm processing on the heating array to obtain a random array; the pixel points generate actual heating timing according to the random array. Within the total heating time of the line to be printed, the heating timing of the pixel points is randomly distributed instead of being concentrated in a period of time, so as to avoid heating all the pixel points at the same time or heating a certain pixel point for a long time, and reduce the instantaneous current demand.
[0045] In one implementation, Figure 2 As shown, the pixel points generate the actual heating timing of the line to be printed based on the random array, including:
[0046] Step S111, generating a heating array.
[0047] like Figure 3As shown, the grayscale value of the pixel point in the to-be-printed row and the default heating timing, the black square represents the control heating pulse, the white square represents the control non-heating pulse, the grayscale values 8, 6, 7, 5, 4, 3, 0 are realized in sequence by controlling the number of heating pulses, the control heating pulse and the control non-heating pulse of the pixel point are represented by binary numbers, and the binary representation of the control heating pulse and the control non-heating pulse of each pixel point in the figure are 1111 1111, 1111 1100, 111111110, 1111 1000, 1111 0000, 1110 0000, 0000 0000, and the default heating timing includes encoding the bits of the binary number in sequence, and the heating array includes a plurality of elements, and the encodings are stored respectively. In some embodiments, the number of elements in the heating array is the same as the total number of control heating pulses and control non-heating pulses of the pixel point, for example, the total number of control heating pulses and control non-heating pulses is 255, and the control heating pulses and control non-heating pulses are represented by 255-bit binary numbers, and the number of elements in the heating array includes 255 elements, which respectively store the bit encoding of the 255-bit binary number. Exemplarily, the heating array is: a[0]=1, a[1]=2, ... a
[254] =255.
[0048] The control heating pulse and the control non-heating pulse of each pixel are determined by the gray value of the pixel. The higher the gray value, the more control heating pulses are required. In some embodiments, the heating time of the line to be printed is divided into 255 pulse times, and the heating sequence of the 255 pulse times is numbered in sequence, and the numbers are stored in the heating array.
[0049] Step S112, performing random sorting algorithm processing on the heating arrays to obtain random arrays.
[0050] The 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. The codes stored in each element of the heating array are randomly shuffled to achieve the random distribution of the heating pulses during the entire printing time, which helps to reduce the heat dissipation problem caused by continuous heating, can reduce the instantaneous current demand and improve the heat dissipation of the device, improve the printing stability and quality, and ensure that the print head can more effectively control the temperature during the printing process.
[0051] Exemplarily, 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 the random sorting algorithm, and the generated random array is:
[0054] a[0]=9; a[1]=29; a[2]=57; a[3]=205; a[4]=131...a
[254] =189.
[0055] By using a random sorting algorithm to disrupt the codes stored in each element of the heating array, the distribution of the controlled heating pulses is no longer continuous, but is randomly distributed throughout the printing time, so that the grayscale printing requirements are handled more evenly, the grayscale performance of the printed image is smoother, and the problems of heat concentration and excessive instantaneous current in the thermal printing process are naturally solved.
[0056] Step S113, generating an actual heating timing sequence for the line to be printed according to the random array.
[0057] The elements in the random array are converted into an actual heating timing sequence. The actual heating timing sequence of the line to be printed includes the execution order of controlling the heating pulse and controlling the non-heating pulse.
[0058] like Figure 4 As shown in the figure, the actual heating timing sequence obtained by the random array can evenly disperse the heating pulses, thereby solving the problems of heat concentration and instantaneous excessive current during thermal printing. When the original image data contains a large area of dark areas, the scattered pulse distribution reduces the stripe effect of the print, making the image printing effect better.
[0059] In some embodiments, one or more pixels in the to-be-printed row correspond to a random array, and the random arrays obtained after the heating arrays are processed by a random sorting algorithm are different.
[0060] By performing multiple random sorting algorithm processing on the heating array, multiple random arrays can be obtained, and a corresponding random array is determined for each pixel in the line to be printed. The actual heating timings of different pixels corresponding to the random arrays are also different, avoiding repetitive or regular pulse modes, making the grayscale performance of the printed image smoother and the heat distribution more random, reducing the risk of local overheating; some pixels correspond to one random array, which can reduce the generation of random arrays and avoid generating a large number of arrays, resulting in a storage burden.
[0061] Furthermore, each pixel in the line to be printed corresponds to one or more random arrays, including:
[0062] Pixels with the same spacing correspond to the same random array.
[0063] The same random array is selected for pixels with the same spacing, that is, the same random sorting algorithm is used. The spacing is determined by the number of random sorting algorithms. The spacing is the number of random sorting algorithms minus 1.
[0064] Exemplarily, there are two different random sorting algorithms, and the heating array can be divided into odd and even positions with an interval of 1. The heating arrays of odd and even positions are processed by different random sorting algorithms, so that the control heating pulse sequences in the two groups are randomly distributed. Finally, the processed odd and even heating arrays are combined into an interleaved complete sequence to obtain a random array. An alternating pulse distribution is formed on the time axis, so that continuous control heating pulses are not likely to appear in adjacent time periods, further reducing the possibility of continuous heating.
[0065] When there are three different random sorting algorithms with an interval of 2, the heating array corresponding to the first pixel adopts the first random sorting algorithm, the heating array corresponding to the second pixel adopts the second random sorting algorithm, the heating array corresponding to the third pixel adopts the third random sorting algorithm, the heating array corresponding to the fourth pixel adopts the first random sorting algorithm, and so on. A fixed random sorting algorithm is selected for each heating array with the same interval. By allowing pixels with the same interval to use the same random sorting algorithm, the controlled heating pulses in different areas are naturally staggered in time, so that the heat is more evenly dispersed throughout the print line to prevent local overheating. The randomization of the interval makes the heating process more structured, and the random sorting algorithm that needs to be stored takes up less space. At the same time, it avoids the concentrated heating of all pixels, which leads to the effect of excessive current, ensuring the high quality and efficient operation of thermal printing.
[0066] The random sorting algorithm includes at least shuffling, grouping and shuffling, and interleaving. The shuffling method usually uses the Fisher-Yates shuffling algorithm, which can completely randomize all elements in the heating array. By randomly exchanging each position, 1 and 0 are evenly and randomly distributed throughout the array, reducing the probability of local concentrated heating. The shuffling method ensures that the controlled heating pulses are evenly distributed throughout the time series, reducing the probability of local concentrated heating.
[0067] The interleaved random order method can be to divide the heating array into two groups of odd and even digits, and perform independent shuffling operations on the elements of odd and even digits, so that the control heating pulse sequences in the two groups are randomly distributed. Finally, the processed odd and even elements are combined into an interleaved complete sequence to obtain a random array. The alternating pulse distribution is formed on the time axis, so that it is not easy to have continuous control heating pulses in adjacent time periods, further reducing the possibility of continuous heating.
[0068] The group shuffle method is used to divide the heating array into multiple smaller sub-arrays, each of which has a certain number of 1s and 0s. Each sub-array is randomly shuffled by a random sorting algorithm such as the shuffle method to ensure that the control heating pulse distribution in each group is uniform. Finally, these sub-arrays are recombined to obtain a random array. The group shuffle method ensures that the heating timing is evenly distributed in a local time period and prevents the control heating pulses in some local areas from being too dense.
[0069] The random sorting algorithm includes at least shuffling, grouping and shuffling, and interleaving. The shuffling method usually uses the Fisher-Yates shuffling algorithm, which can completely randomize all elements in the heating array. By randomly exchanging each position, the actual heating timing of the pixel points is uniformly and randomly distributed throughout the array, reducing the probability of local concentrated heating. The shuffling method ensures that the controlled heating pulses are evenly distributed throughout the time series, reducing the probability of local concentrated heating.
[0070] The interleaved random order method can be to divide the heating array into two groups of odd and even digits, and perform independent shuffling operations on the elements of odd and even digits, so that the control heating pulse sequences in the two groups are randomly distributed. Finally, the processed odd and even elements are combined into an interleaved complete sequence to obtain a random array. The alternating pulse distribution is formed on the time axis, so that it is not easy to have continuous control heating pulses in adjacent time periods, further reducing the possibility of continuous heating.
[0071] The group shuffle method is used to divide the heating array into multiple smaller sub-arrays. Each sub-array has a certain number of elements. Each sub-array is randomly shuffled by a random sorting algorithm such as the shuffle method to ensure that the control heating pulse distribution in each group is uniform. Finally, these sub-arrays are recombined to obtain a random array. The group shuffle method ensures that the heating timing is evenly distributed in a local time period and prevents the control heating pulses in some local areas from being too dense.
[0072] In some embodiments, Figure 5 As shown, it is a flow chart of obtaining the actual heating sequence by the grouping shuffle method.
[0073] Step S511, the random array includes a plurality of sub-arrays, and the heating control pulses and the non-heating control pulses of the pixel points are evenly distributed in the plurality of sub-arrays;
[0074] Step S512: Process the sub-array and the elements in the sub-array by a random sorting algorithm to obtain an actual heating sequence.
[0075] After obtaining a heating array, for example, a heating array of length 1024, in which 255 elements that need to be heated represent control heating pulses and 769 elements that do not need to be heated represent control non-heating pulses, the entire heating array is divided into several smaller sub-arrays, such as 4 groups or 8 groups, each group containing an equal number of elements that need to be heated and do not need to be heated. By dividing into multiple sub-arrays, it is convenient for subsequent randomization control of segments.
[0076] When grouping, the 255 elements that need to be heated and the 769 elements that do not need to be heated are distributed as evenly as possible to each group. Figure 6 As shown, if the array is divided into 4 groups, each group has 64 controlled heating pulses and 192 controlled non-heating pulses. A random sorting algorithm is applied to shuffle the elements that need to be heated and the elements that do not need to be heated within each sub-array. A shuffling algorithm or other appropriate random sorting method can be used to randomize the distribution of heating elements within each sub-group to avoid excessive concentration of controlled heating pulses.
[0077] After completing the random sorting within the sub-array, the sub-arrays themselves are randomly sorted again to further ensure that the distribution of the control heating pulses is globally uniform. The shuffled sub-arrays are merged in a new order to obtain a random array. Through double shuffling within and between groups, the control heating pulses are ensured to be evenly distributed on the time axis, avoiding excessive continuous heating and reducing local heat concentration. The uniform distribution of the control heating pulses after grouping reduces the instantaneous current peak, reduces the pressure on the power supply, improves the stability of the current load, reduces stripes and other uneven problems in printing, and makes the grayscale transition of the image smoother.
[0078] In some embodiments, there are at least two different random sorting algorithms. The number of random sorting algorithms can be three, four or more, which 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 the control heating pulses and the control non-heating pulses of the pixel points, and the element state in the heating array defaults to the control non-heating pulse. By expanding the number of elements in the heating group, the control heating pulses are evenly distributed to more elements, thereby optimizing heat management and current load.
[0080] Exemplarily, since the pulse time is 255, and the number of elements in the heating array is more than 255, except for the normally stored control heating pulse, the remaining 769 elements are filled with 0, indicating that no heating is performed at the pulse time corresponding to these elements. The heating array is randomly sorted, and 255 1s and 769 0s are randomly distributed to the 1024 elements of the heating array to ensure that the control heating pulses are distributed throughout the total heating time and are not concentrated in a short period of time, so that the load of each pulse is reduced and the concentrated heating of too many pixels at the same time is avoided.
[0081] Step S12: printing the line to be printed according to the actual heating sequence.
[0082] Heat the pixels according to the actual heating sequence. Since all pulse positions of the actual heating sequence are randomly distributed, when the pixels are printed according to the actual heating sequence, all pixels in the line to be printed will not be heated for a long time, avoiding the problem of excessive current and overheating caused by heating a large number of pixels at the same time.
[0083] In some embodiments, the heating pulses corresponding to the actual heating timings may be equal-width pulses or equal-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 according to the grayscale value, and the pixel with a high grayscale value receives more control heating pulses and has a darker color.
[0084] When the heating pulse is an equal-proportional pulse, the thermal printer controller receives a combination of heating pulses of different 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 controlled heating pulses processed by the random array ensure that each pixel is heated according to the controlled heating pulses in a random order to achieve staggered heating and reduce instantaneous current. Through the combination of heating pulses of different widths, each pixel can generate a grayscale image or text on the thermal printing medium.
[0085] This method generates the actual heating timing of the line to be printed based on a random array, so that the heating timing of the pixels in the printed line is randomly distributed, thereby effectively avoiding the problems of local heat concentration and excessive instantaneous current, improving the uniformity and smoothness of the printed image, reducing the thermal load and wear of the equipment, and extending the service life of the printing equipment.
[0086] Figure 7 This is a schematic diagram of the structure of a thermal printing device provided in this application. The device includes:
[0087] The heating timing determination module 710 generates a plurality of heating arrays in response to a printing request, and performs random sorting algorithm processing on the plurality of heating arrays to obtain random arrays; the random arrays randomly allocate the heating timing of the pixels in the line to be printed 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 device of this embodiment can execute the technical solution 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 device, which includes the thermal printing device mentioned above.
[0091] Exemplarily, the present application provides a microprocessor chip, which is used to execute the thermal printing control method indicated in the above embodiment. For example, the microprocessor chip can be a microcontroller unit (MCU), a digital signal processor (DSP), an MPU (including a microprocessor unit and a memory protection unit), a micro central processing unit (CPU), etc., which can process digital signals, analog signals, or perform signal control functions, instruction processing and calculation functions, etc., or a micro central control chip or system-on-chip chip.
[0092] An embodiment of the present invention provides an electronic device, such as Figure 8 As shown, Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0093] like Figure 8 As shown, the electronic device is 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, a memory 830, and a communication bus 840 connecting different system components (including the memory 830 and the processor 810).
[0094] The communication bus 840 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a variety of bus structures. For example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnection (PCI) bus.
[0095] Electronic devices typically include a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device, including volatile and non-volatile media, removable and non-removable media.
[0096] The 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. Figure 8 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disc read only memory (CD-ROM), a digital versatile 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 medium 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 may be stored in memory 830, such program modules including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules generally perform the functions and / or methods of the embodiments described herein.
[0098] The electronic device may also communicate with one or more external devices, and may also communicate with one or more devices that enable a user to interact with the electronic device, or communicate with any device that enables the electronic device to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed through the communication interface 820. In addition, the electronic device may also communicate with the network adapter ( Figure 8 The network adapter can communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the communication bus 840. It should be understood that although Figure 8 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device, 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 the programs stored in the memory 830, for example, implementing a thermal printing control method provided in an embodiment of the present invention.
[0100] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute a thermal printing control method provided by an embodiment of the present invention.
[0101] The above-mentioned computer-readable storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above, but is not limited to this. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.
[0102] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0103] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
[0104] The above are only some embodiments of the present invention. For those skilled in the art, several modifications and improvements can be made without departing from the creative concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A thermal printing control method, characterized in that: The thermal printing control method comprises: In response to a printing request, a heating array is generated, wherein the heating array stores a default heating timing of a line to be printed; a random array is obtained by performing a random sorting algorithm on the heating array; and an actual heating timing is generated for a pixel point according to the random array.
2. A thermal printing control method according to claim 1, characterized in that: The actual heating timing of the pixel point includes the execution order of controlling the heating pulse and controlling the non-heating pulse.
3. A thermal printing control method according to claim 2, characterized in that: One or more pixels in the line to be printed correspond to a random array, and the random arrays obtained after the heating array is processed by the random sorting algorithm are different.
4. A thermal printing control method according to claim 1, characterized in that: There are at least two different kinds of random arrays; One or more pixels correspond to a random array including: Pixels with the same interval correspond to the same random array.
5. A thermal printing control method according to claim 2, characterized in that: The random array is processed by a random sorting algorithm on the heating array to obtain a random array, including: The random array includes a plurality of sub-arrays, and the control heating pulses and the control non-heating pulses of the pixel points are evenly distributed in the plurality of sub-arrays; The sub-array and the elements in the sub-array are processed by a random sorting algorithm to obtain an actual heating timing sequence.
6. A thermal printing control method according to claim 2, characterized in that: The heating array stores the default heating timing of the lines to be printed, including: The control heating pulse and the control non-heating pulse of each pixel point of the to-be-printed row are represented by a binary number, and the bits of the binary number are encoded in sequence to obtain a default heating timing sequence of the to-be-printed row; The random array is obtained by performing a random sorting algorithm on the heating array, comprising: The codes stored in the heating array are processed by a random sorting algorithm.
7. A thermal printing control method according to claim 2, 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 points, and the 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.
8. A thermal printing control method according to claim 2, characterized in that: The random sorting algorithm includes a shuffling method, a grouping shuffling method and / or an alternating shuffling method.
9. A thermal printing control method according to claim 2, characterized in that: The controlled heating pulses and the controlled non-heating pulses are both equal-width pulses or equal-proportional pulses.
10. A microprocessor chip, characterized in that: The microprocessor chip is used to execute the thermal printing control method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Printing method and device, printer and storage medium
CN111923605A
Thermal printer and optimization method of segmented printing strategy thereof
CN116604947A
Segmented heating method of thermal printer
CN117944384A