Printing control method, printer and computer storage medium
By introducing the central processor and control module into the printer, and using the DMA transmission mechanism and the preset database matching method, the printer paper abnormality problem is solved, the printing process is accurately monitored and abnormally interrupted, and the printing efficiency and quality are improved.
Patent Information
- Application Number
- CN202411232309.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-10-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The image quality printed by existing printers on paper is incorrect, making it impossible to accurately clarify paper abnormalities.
By introducing a central processor and a control module into the printer, the DMA transmission mechanism is used to transmit printing data and control instructions, and match the verification data in the preset database to determine and interrupt abnormal printing, and generate a test report to troubleshoot paper abnormalities.
It achieves timely detection and interruption of paper abnormalities during the printing process, improves printing efficiency and quality, and ensures the accuracy of printing results.
Smart Images

Figure CN118732969A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of printers, and in particular to a printing control method, a printer and a computer storage medium. Background Art
[0002] With the advancement of technology, printing equipment, as an important tool for information transmission, has been widely used in various fields, and printers have become important equipment in the fields of office and study. For printers, whether the quality of printed images is qualified is a very important performance. However, the current printers have problems with the quality of printed images, and the information on the paper is incorrect, which makes it impossible to clarify the abnormality of the paper.
[0003] Therefore, it is urgent to propose a new printing control method to solve the above problems. Summary of the invention
[0004] In view of this, the main purpose of the present invention is to provide a printing control method, a printer and a computer storage medium, which aims to control the processes of paper picking, paper feeding, paper output, etc. during the printing process through control instructions, and to troubleshoot abnormal paper problems during the printing process.
[0005] To achieve the above object, the technical solution of the present invention is achieved as follows: An embodiment of the present invention provides a printing control method, which is applied to a printer based on a field programmable gate array. The printer includes a central processing unit and a control module. The method includes: After receiving the print task sent by the external device, the central processor processes the first print data carried in the print task to generate second print data and obtains a control instruction from the control module, wherein the control instruction at least includes paper control data; The central processor transmits the second printing data and the control instruction to the printing device based on the DMA transmission mechanism, so that the printing device prints according to the second printing data and the control instruction to obtain a printing result; The central processor matches the printing result with preset verification data stored in a preset database to obtain a verification result, which at least includes whether there is any abnormality in the paper information.
[0006] In a specific embodiment, the paper control data includes at least one of paper picking, paper feeding, and paper output data.
[0007] In a specific embodiment, obtaining a control instruction from the control module includes: The central processing unit sends the printing task to the control module; The control module generates corresponding control instructions in response to the real-time configuration of the printing task and sends them to the central processing unit.
[0008] In a specific embodiment, before matching the printing result with the preset verification data stored in the preset database to obtain the verification result, the method further includes: Preset verification data corresponding to the printing task is matched in the preset database.
[0009] In a specific embodiment, the printer further includes an interrupt manager, and after the central processor matches the print result with preset verification data stored in a preset database and obtains the verification result, the method further includes: It is determined whether there is a printing abnormality according to the verification result. If there is, a printing interruption instruction is sent to the central processing unit through the interrupt manager to interrupt subsequent printing.
[0010] In a specific embodiment, sending the interrupt printing instruction to the central processor through the interrupt manager includes: Receiving interrupt configuration information configured in real time using the interrupt manager; The interrupt manager generates an interrupt instruction according to the interrupt configuration information and sends it to the central processing unit.
[0011] In a specific embodiment, the first printing data includes a printing image stream, and the matching the printing result with the preset verification data stored in the preset database to obtain the verification result includes: Extracting a first picture and a second picture from the printing result and the preset verification data respectively; Compare the first image with the second image to obtain a verification result.
[0012] In a specific embodiment, comparing the first image with the second image to obtain a verification result includes: Traversing a first pixel of the first image and a second pixel of the second image, comparing an RGB value of the first pixel with an RGB value of the second pixel, the first pixel corresponding to the second pixel; Determine whether the RGB value of the first pixel is different from the RGB value of the second pixel; If the RGB value of the first pixel is different from the RGB value of the second pixel, marking the first pixel on the first picture and / or marking the second pixel on the second picture; The verification result is generated according to the marking result.
[0013] In a specific embodiment, after the central processor matches the printing result with the preset verification data stored in the preset database and obtains the verification result, the method further includes: The central processor generates a test report according to the verification result for the user to view.
[0014] To achieve the above object, an embodiment of the present invention further provides a printer, the printer comprising a field programmable gate array, the field programmable gate array comprising: A central processing unit, configured to, after receiving a print task sent by an external device, process the first print data carried in the print task to generate second print data and obtain a control instruction from a control module, wherein the control instruction at least includes paper control data; and, based on a DMA transmission mechanism, transmit the second print data and the control instruction to a printing device, so that the printing device prints according to the second print data and the control instruction to obtain a print result; and, match the print result with preset verification data stored in a preset database to obtain a verification result, wherein the verification result at least includes whether there is an abnormality in paper information; A control module is used to send control instructions to the central processing unit.
[0015] To achieve the above objectives, an embodiment of the present invention further provides a computer storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to enable the one or more processors to execute the printing control method as described above.
[0016] A printing control method, a printer and a computer storage medium provided by an embodiment of the present invention receive a printing task sent by an external device through a central processor based on a field programmable gate array, process the first printing data carried in the printing task to generate second printing data and obtain a control instruction from a control module, the control instruction at least includes paper control data, and then transmit the second printing data and the control instruction to the printing device based on the DMA transmission mechanism, so that the printing device prints according to the second printing data and the control instruction to obtain a printing result, and finally matches the printing result with the preset verification data stored in the preset database to obtain a verification result, and the verification result at least includes whether there is an abnormality in the paper information. The present application scheme can control the processes of picking up paper, feeding paper, and discharging paper during the printing process through control instructions, and troubleshoot abnormal paper problems during the printing process.
[0017] Furthermore, an interrupt manager is added and used to send an interrupt printing instruction to the central processor, so as to interrupt subsequent printing when an abnormality occurs during the printing process. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 An architectural diagram of a printing system provided for some embodiments of the present invention; Figure 2 A flow chart of a printing control method provided for some embodiments of the present invention; Figure 3 A schematic diagram of the structure of a printer provided in some embodiments of the present invention; Figure 4 A schematic diagram of the integration process of the relevant modules of the FPGA in the printer provided by some embodiments of the present invention; Figure 5 A schematic diagram of the working principles of key modules of a printer provided in some embodiments of the present invention. DETAILED DESCRIPTION
[0020] In order to make the objectives, technical solutions and advantages of the present disclosure more clear, the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings.
[0021] Embodiment 1 Figure 1 The architecture diagram of the printing system provided by some embodiments of the present invention is shown in FIG. Figure 1 As shown, the printing system generally includes an external device 101, a field programmable gate array and a printing device 105, wherein the field programmable gate array includes at least a central processing unit 102, a control module 103 and an interrupt manager 104. Optionally, the field programmable gate array is integrated on the printing device 105. In specific implementation, the external device 101 can be a mobile phone, a computer, a USB device, etc. The external device 101 communicates with the central processing unit 102 through a wired or wireless network or a USB interface. The central processing unit 102, the control module 103 and the interrupt manager 104 are arranged on the printing device 105 and can communicate with the printing device 105. As an exemplary and non-limiting description, the external device 101 is a computer, and the computer sends a print task to the central processing unit 102. The central processing unit 102 processes the print data carried in the print task and obtains a control instruction from the control module 103, and then transmits the processed print data and control instruction to the printing device 105, so that the printing device 105 completes printing and outputs, and obtains a print product.
[0022] Figure 2For a flow chart of a printing control method provided by some embodiments of the present invention, please refer to Figure 2 The embodiment of the present invention provides a printing control method, which is applied to a printer based on a field programmable gate array, wherein the field programmable gate array (FPGA) includes a central processing unit and a control module, and the method includes the following steps: S100: After receiving a print task sent by an external device, the central processor processes the first print data carried in the print task to generate second print data and obtains a control instruction from the control module, where the control instruction at least includes paper control data.
[0023] In addition to the first print data, a print task usually also includes but is not limited to the following information: print settings and parameters, such as the number of copies, paper size, print quality, double-sided printing or single-sided printing, etc.; document format, such as PDF, Word, JPEG, etc.; print target, such as specifying the target device for the print task; priority identification, such as identifying the urgency or importance of the print task.
[0024] In some embodiments, the print task can be evenly divided based on the size of the data. For example, the task is split once a certain amount of data (a certain number of pages or a certain number of MB) is reached, and each split subtask contains an independent data block that can be processed separately. In this way, since the data volume of each subtask is roughly equal, the system can evenly allocate processing resources to each subtask, which not only makes the load balanced, but also makes task management simpler and more unified.
[0025] In other embodiments, the data volume is divided into blocks of different sizes according to the characteristics or requirements of the printing task. The early subtasks may have a smaller data volume, while the later subtasks may have a larger data volume, forming a stepped distribution. In this way, the subtasks with smaller data volumes can be processed first so as to quickly obtain partial printing results. For the subtasks with larger data volumes, more processing resources and time can be given to ensure printing quality and efficiency.
[0026] It should be noted that the printing control method provided in the embodiment of the present application is applicable to a printer based on a field programmable gate array, for example, a laser printer based on a field programmable gate array. The following is an explanation of the present application scheme using a laser printer as an example. A laser printer refers to a process in which a laser beam is irradiated onto a photosensitive drum during printing, thereby gradually printing an image or text. Laser printing mainly includes the following steps: laser scanning, which refers to the laser scanning system generating a laser beam carrying character information through a laser head according to a processed laser drive signal; exposure and imaging, which refers to the laser beam irradiating a pre-charged photosensitive drum (toner) to obtain a potential under the coordinated action of components such as an optical deflection modulator, a glyph generator, a high-frequency oscillator, a frequency synthesizer, and an acousto-optic modulator, to form an electrostatic latent image; development, which refers to the electrostatic latent image on the photosensitive drum attracting toner to form a visible toner image; transfer, which refers to the toner image being transferred to ordinary paper under the action of the electric field of the transfer electrode. At this time, the paper will carry an opposite charge to the photosensitive drum, so that the toner is firmly adsorbed on the paper. Fixing means that the paper passes through the fuser, and the toner is heated and fixed to the paper to form the final printed image or text.
[0027] It should be noted that the main control parameters of laser printers are DPI (Dot Per Inch, print resolution) and print speed. DIP refers to the number of dots that can be printed per inch, and is the most important reference standard for judging the output effect and quality of laser printers. The higher the DPI value, the better the print effect; print speed is an important indicator to measure the output speed of laser printers, usually expressed in the number of pages per minute (PPM, Pages Per Minute) or the number of images per minute (IPM, Images Per Minute) that the printer can output. In addition, paper handling capabilities, such as paper input capacity or paper type support, and other functions, such as whether to support color printing, double-sided printing, network printing, automatic binding, etc. are also important control parameters of laser printers.
[0028] It should be noted that Field-Programmable Gate Array (FPGA) is a product further developed on the basis of programmable devices such as PAL, GAL, CPLD, etc. It appears as a semi-custom circuit in the field of Application Specific Integrated Circuit (ASIC), which not only solves the shortcomings of custom circuits, but also overcomes the shortcomings of the limited number of gate circuits of the original programmable devices.
[0029] It should be noted that a print task usually exists in the form of a data packet, which includes the content to be printed, the format and other related parameters. For example, it includes but is not limited to the printing of documents, the printing of images, the printing output in specific formats such as PDF, JPG, etc., black and white printing, color printing, or printing on paper of various sizes and materials. It is understandable that the printing task mainly depends on the specific needs of the user.
[0030] Here, the second print data refers to a series of instructions and data for guiding the printer to perform the printing operation, which are parsed and obtained by the central processor of the print task (including the first print data). The contents contained in the second print data are mainly determined by the print task, and specifically include but are not limited to the following contents: page layout and format information, such as the page size, margins, paper orientation (horizontal or vertical) and other settings of the printed document. These information guide the printer how to arrange the position of the printed content on the paper; text and image data, such as the data of the text, image or other graphic elements to be printed. These data are transmitted to the printer in a specific format and encoding method so that the printer can accurately restore the content of the original document; color and print quality settings, including the selection of print colors (such as black and white or color), print quality (such as resolution, print speed, etc.) settings. These information ensure that the printer can output high-quality print results according to user requirements; number of print copies and sorting. The control information also includes the number of print copies and the printing order specified by the user (such as single-sided or double-sided printing, sorting method of multi-page documents, etc.); other special instructions. Some complex print tasks may contain special printing instructions, such as printing watermarks, headers and footers, background patterns, etc. In short, the print control information is generated by the print task, parsing the print task required by the user into language information that the printer can use to perform the print operation.
[0031] In some specific embodiments, the second print data is transmitted to the corresponding printing components of the laser printer, for example, the second print data includes text including parameters such as font, size, and the number of copies to be printed, etc. The second print data is calculated by the central processor to arrange the layout of the text on the photosensitive drum, determine the starting and ending positions of each character, and the required amount of toner. In this way, after the second print data is transmitted to the photosensitive drum, the photosensitive drum starts to preheat and reaches a temperature suitable for printing. At the same time, the rotation speed and position are adjusted according to the control instruction to prepare for receiving the scanning of the laser beam; the second print data is transmitted to the laser head, and the laser beam scans the photosensitive drum according to the specified path and speed to form an electrostatic latent image corresponding to the text content; the second print data is transmitted to the toner cartridge, and the toner cartridge confirms the state and supply of the toner according to the font size and the print content; the second print data is transmitted to the paper conveying mechanism, confirms the number of sheets of paper in the paper input tray, the paper size, etc., and feeds the paper from the input tray into the printer to prepare for receiving the print content, and at the same time, ensures that after the first copy is printed, a new sheet of paper can be automatically fed in for printing the second copy. If the second printing data contains double-sided printing content, it is simultaneously confirmed whether the flipping function of the paper conveying mechanism is normal.
[0032] In some specific embodiments, the printer includes not only a central processing unit (CPU), but also a memory storage unit (DDR, Double Data Rate), an interface circuit, a control logic circuit, etc. The central processing unit receives a print task from an external device through the interface circuit, and analyzes and processes the first print data carried in the print task according to a preset program and logic, and stores the second print data in the memory storage unit after forming the second print data; the control logic circuit is responsible for coordinating and controlling the various components of the printer to implement the execution of the print operation.
[0033] It is understandable that when a conventional printer is printing, it usually executes the print data of the current print task before requesting the memory storage unit to read and write the print data of the new print task, which results in frequent read and write requests to the memory storage unit, thereby occupying the bus for a long time, resulting in low bus read and write efficiency. In view of the above problem, in the embodiment of the present application, an interface module can be added to the printer, and the interface module can read the second print data from the memory storage unit through the bus according to the first preset bit width, and the read second print data is stored in the cache, and then the second print data is sequentially transmitted from the cache to the printing device according to the printing demand.
[0034] It should be noted that the first preset bit width in the embodiment of the present application is greater than the bit width of data transmitted to the printing device. In this way, the interface module can meet the timing of printing during the printing process and minimize the number of read and write times for the memory storage unit (DDR).
[0035] It should be noted that the bus refers to the channel connecting various functional modules inside the printer. It runs through the entire printer system, and various components including the central processing unit and interface modules transmit and exchange data through the bus.
[0036] S200: The central processor transmits the second printing data and the control instruction to the printing device based on the DMA transmission mechanism, so that the printing device prints according to the second printing data and the control instruction to obtain a printing result.
[0037] It should be noted that the DMA transmission mechanism refers to the interface technology that allows external devices to exchange data directly with the system memory without going through the CPU. In this way, the data transmission speed depends on the working speed of the memory and peripherals. Usually the system bus is managed by the CPU. In the DMA mode, the lines connected to these buses by the CPU are in the third state (high impedance state), and the DMA controller takes over to control the number of bytes transferred, determine whether DMA is ended, and send a DMA end signal. Therefore, the DMA controller must have the following functions:
[0038] 1. It can send a system hold signal to the CPU and make a bus takeover request; 2. When the CPU sends a signal to allow takeover, it is responsible for controlling the bus and entering DMA mode; 3. Able to address the memory and modify the address pointer to realize reading and writing of the memory; 4. It can determine the number of bytes transferred by this DMA and judge whether the DMA transfer is completed; 5. Send a DMA end signal to restore the CPU to normal working state, etc.
[0039] It should be noted that the DMA transmission process is usually divided into three stages: preprocessing, data transmission and post-processing. In the preprocessing stage, the CPU completes some necessary preparations, including but not limited to executing several I / O instructions to test the status of the I / O device, setting the initial values of the relevant registers of the DMA controller, setting the transmission direction, starting the relevant devices, etc. Then the CPU continues to execute the original program until the I / O device is ready to send data (input situation) or receive data (output situation). The I / O device sends a DMA request to the DMA controller, and the DMA controller sends a bus request (collectively referred to as DMA request) to the CPU to transmit data. Data transmission can be based on a single byte (or word) as the basic unit. For transmission in data blocks, the data input and output operations after DMA occupies the bus are implemented through loops. It should be pointed out that this loop is also implemented by the DMA controller (rather than by the CPU executing the program), that is, the data transmission stage is completely controlled by DMA (hardware). Post-processing refers to the DMA controller sending an interrupt request to the CPU, and the CPU executing the interrupt service program to perform DMA termination processing, including checking whether the data sent to the main memory is correct, testing whether there is an error during the transmission process (if an error occurs, it will be transferred to the diagnostic program) and deciding whether to continue using DMA to transfer other data blocks.
[0040] It is understandable that in order to increase the number of read and write requests to the memory storage unit, reduce the bus occupancy time, and improve the bus read and write efficiency, the bus read and write efficiency is low. In the embodiment of the present application, the interface module can also be used to transmit the second print data in the cache to the printing device according to the second preset bit width based on the DMA transmission mechanism, wherein the first preset bit width is greater than the second preset bit width.
[0041] It should be noted that the second preset bit width refers to the bit width for transmitting data to the printing device. In the embodiment of the present application, the first preset bit width and the second preset bit width are not specifically limited. Under the premise that the second preset bit width is less than the first preset bit width, the user can set it according to the actual printing needs. Taking the printing of A4 (4960*7016) 600*600dpi at 40ppm as an example, assuming that the first preset bit width is 128bit and the second preset bit width is 32bit, the interface module transmits 4 128bits each time, and needs to access the memory storage unit 4960*7016 / 128 / 4=67967.5 times. If it is transmitted in the traditional way, it needs to access 4960*7016 / 128 / 4=271870 times. From the perspective of the entire system, the bus read and write efficiency is greatly improved.
[0042] S300: The central processor matches the printing result with preset verification data stored in a preset database to obtain a verification result, which at least includes whether there is any abnormality in the paper information.
[0043] It should be noted that the current printers have incorrect information on the paper for the quality of the printed image, which makes it impossible to clarify the paper abnormality. The printing control method provided in the embodiment of the present application can control the paper picking, paper feeding, paper output and other processes during the printing process through control instructions, and check the paper abnormality during the printing process to find the paper abnormality in time.
[0044] In some specific embodiments, the paper control data includes at least one of paper picking, paper feeding, and paper output data.
[0045] It can be understood that by configuring the paper control data to include at least one of the paper picking, paper feeding, and paper output data, the paper picking, paper feeding, and paper output processes can be controlled by control instructions during the printing process, thereby troubleshooting abnormal paper problems during the printing process and discovering abnormal paper problems in a timely manner.
[0046] In some specific embodiments, obtaining a control instruction from the control module includes: The central processing unit sends the printing task to the control module; The control module generates corresponding control instructions in response to the real-time configuration of the printing task and sends them to the central processing unit.
[0047] It should be noted that the control instructions in the embodiment of the present application support real-time configuration according to the printing task so as to adapt to the printing requirements of various printing tasks. In specific implementation, the above control module can be implemented through an axi interconnector.
[0048] In some specific embodiments, before matching the printing result with preset verification data stored in a preset database to obtain the verification result, the method further includes: Preset verification data corresponding to the printing task is matched in the preset database.
[0049] It should be noted that the preset inspection data may include pre-set data for testing the correctness of data transmission and the connectivity of the cascade interface of the printing system, etc., and may also include standard printing result data corresponding to the printing task, etc. There is no specific limitation on this here. Without violating the inventive concept of the present application, the user can set it according to actual needs.
[0050] In some specific embodiments, the printer further includes an interrupt manager, and after the central processor matches the print result with preset verification data stored in a preset database and obtains the verification result, the method further includes: It is determined whether there is a printing abnormality according to the verification result. If there is, a printing interruption instruction is sent to the central processing unit through the interrupt manager to interrupt subsequent printing.
[0051] It should be noted that by adding an interrupt manager, when a printing abnormality is determined based on the verification results, an interrupt printing instruction is sent to the central processor through the interrupt manager to interrupt subsequent printing. On the one hand, it reduces the losses caused by printing abnormalities and avoids invalid printing. On the other hand, it facilitates timely detection of abnormalities and improves printing efficiency.
[0052] In some specific embodiments, sending the interrupt printing instruction to the central processor through the interrupt manager includes: Receiving interrupt configuration information configured in real time using the interrupt manager; The interrupt manager generates an interrupt instruction according to the interrupt configuration information and sends it to the central processing unit.
[0053] It should be noted that in the embodiment of the present application, it is supported to send an interrupt instruction to the central processing unit in real time. Specifically, the interrupt manager can be used to receive interrupt configuration information configured in real time (including but not limited to interrupt configuration information input to the interrupt manager in real time through an input device), and the interrupt manager generates an interrupt instruction after receiving the above interrupt configuration information and sends the interrupt instruction to the central processing unit, so that the central processing unit controls the printing device to stop printing according to the interrupt instruction.
[0054] In some specific embodiments, the first printing data includes a printing image stream, and matching the printing result with preset verification data stored in a preset database to obtain the verification result includes: Extracting a first picture and a second picture from the printing result and the preset verification data respectively; Compare the first image with the second image to obtain a verification result.
[0055] It can be understood that the first image is an image extracted from the printing results, that is, the first image is an image printed according to the current printing task, and the second image is an image extracted from the preset verification data, and the preset verification data corresponds to the printing task, that is, the second image is a standard image corresponding to the current printing task.
[0056] In some specific embodiments, comparing the first image with the second image to obtain a verification result includes: Traversing a first pixel of the first image and a second pixel of the second image, comparing an RGB value of the first pixel with an RGB value of the second pixel, the first pixel corresponding to the second pixel; Determine whether the RGB value of the first pixel is different from the RGB value of the second pixel; If the RGB value of the first pixel is different from the RGB value of the second pixel, marking the first pixel on the first picture and / or marking the second pixel on the second picture; The verification result is generated according to the marking result.
[0057] Preferably, traversing the first pixel point of the first picture and the second pixel point of the second picture includes: The test range of the second image is determined according to the test range of the first image. After the test range of the second image is successfully determined, the first pixel point of the first image and the second pixel point of the second image within the test range are traversed. The test range is not specifically limited in the embodiment of the present application and can be set according to actual printing requirements without violating the inventive concept of the present application.
[0058] Preferably, all pixel points within the test range of the first image are first pixel points, and all pixel points within the test range of the second image are second pixel points.
[0059] Further preferably, determining the test range of the second image according to the test range of the first image includes: obtaining first boundary pixel points of the test range of the first image, the first boundary pixel points at least including all vertex pixel points of the first boundary, and the first boundary is the boundary of the test range of the print result image; Mapping the first boundary to the second picture to obtain a second boundary of the test range of the second picture; Acquire second boundary pixel points, where the second boundary pixel points at least include all vertex pixel points of the second boundary. It can be understood that the second boundary pixel points correspond to the first boundary pixel points, and the number of the second boundary pixel points is equal to the number of the first boundary pixel points; Comparing the RGB value of the first boundary pixel point with the RGB value of the second boundary pixel point; If the RGB values of the first boundary pixel points and the RGB values of the second boundary pixel points are all the same, the test range of the second image is successfully determined, and the range within the second boundary is the test range of the second image; otherwise, the test range of the second image is determined to have failed.
[0060] In some specific embodiments, after the central processor matches the printing result with preset verification data stored in a preset database and obtains the verification result, the method further includes: The central processor generates a test report according to the verification result for the user to view.
[0061] It is understandable that generating a test report can further facilitate operations such as storing, viewing, and analyzing the verification results.
[0062] In some specific embodiments, the method further comprises: The interface module is used to monitor the amount of data in the cache in real time. When it is detected that the amount of data in the cache is less than a preset threshold, the second print data is read from the memory storage unit through the bus according to the first preset bit width and stored in the cache.
[0063] It should be noted that in the embodiment of the present application, the preset threshold is not specifically limited. Without violating the inventive concept of the present application, the user can set it according to the actual printing needs. For example, the preset threshold can be any value between 0 and the storage capacity of the cache (i.e., the size of the cache). In the embodiment of the present application, the interface module is also configured to monitor the amount of data in the cache in real time, and perform real-time monitoring through the amount of data in the cache. When it is detected that the amount of data in the cache is less than the preset threshold, the second print data is read from the memory storage unit through the bus according to the first preset bit width and stored in the cache. In this way, the print data in the memory storage unit (which may include data corresponding to multiple print tasks) can be stored in batches in the cache in advance, and then transmitted to the printing device in sequence for printing jobs, without having to request the print data of the next print task from the memory storage unit after the current print task is completed, thereby reducing the number of read and write requests to the memory storage unit and reducing the bus occupancy time.
[0064] In some specific embodiments, before the interface module transmits the second print data in the buffer to the printing device according to the second preset bit width based on the DMA transmission mechanism, the method further includes: The interface module converts the second print data of the first preset bit width into the second print data of the second preset bit width.
[0065] It should be noted that, in the embodiment of the present application, since the bit width of the data requested by the interface module to the memory storage unit is different from the bit width of the data transmitted to the printing device, before the second print data in the cache is transmitted to the printing device according to the second preset bit width based on the DMA transmission mechanism, the second print data needs to be converted in bit width first, that is, the second print data needs to be converted from the first preset bit width to the second preset bit width first to facilitate the execution of subsequent steps.
[0066] In some specific embodiments, after the interface module reads the second print data from the memory storage unit through the bus according to the first preset bit width, the method further includes: Each verification channel in the interface module verifies the received second printing data using self-generated sequence data, and outputs an error signal of the corresponding channel if the verification fails.
[0067] It should be noted that some specific data sequences need to be verified. In specific implementation, the self-generated sequence data and the received data (ie, the second printing data) can be used to perform a full verification, and if error data occurs, an error signal of the corresponding channel is output.
[0068] In some specific embodiments, the interface module includes an internal register, and the method further includes: The internal register is used to record the transmission status of the second printing data in the interface module.
[0069] It should be noted that, in the process of executing the printing task, the interface module will record the transmission status of the second printing data of each printing task, so as to monitor the printing data transmission process, which greatly improves the execution efficiency of the printing task. The recording location can be the internal register of the interface module or the external memory, such as RAM, Flash memory or hard disk. The storage method can be in the form of a database or a file, depending on the system architecture and performance requirements.
[0070] In some specific embodiments, the interface module transmits the second print data in the buffer to the printing device according to the second preset bit width based on the DMA transmission mechanism, including: The interface module determines a category of the second print data in the buffer, and transmits the second print data from a corresponding channel to a printing device according to a second preset bit width based on the category.
[0071] It is understandable that the categories of print data include but are not limited to characters, pictures, tables, etc., and the processing speed and resource requirements of different data types may be different; for example, the parsing speed of pictures is faster than that of text. By splitting the print task by data category and transmitting it to the printing device through the corresponding channel, more processing resources and time can be given to the subtasks with slower parsing speed to ensure printing quality and efficiency. At the same time, if there is a problem with the printing of a certain type of content, it can also be more easily located and solved. In addition, different data categories also require different processing methods and parameter settings when printing. By splitting the print task by data category, personalized print settings can be made according to the characteristics of each data category, thereby optimizing the print quality and effect. For example, for images, the color, resolution and print mode can be adjusted to obtain a clearer print effect; for text, the font, font size and layout can be adjusted to meet reading needs.
[0072] In some specific embodiments, the method further comprises: When it is detected that the next printing task is not obtained within the first preset time after the central processing unit is started or within the first preset time after the previous printing task is completed, the central processing unit is shut down and controlled to enter a standby state.
[0073] In some specific embodiments, the method further comprises: When it is detected that the next printing task is not obtained within the second preset time after the central processing unit is started, the central processing unit is powered off, the current system data of the central processing unit is stored in the memory storage unit, and the memory storage unit is controlled to enter a self-refresh mode to prevent the system data from being lost.
[0074] It should be noted that the CPU generally includes three working modes: working state, standby state and sleep state.
[0075] 1. Working status After the SOC module is powered on, the central processor is in the startup state. At this time, if a print task is received, the central processor enters the working state. When the central processor is in the working state, after obtaining the print task sent by the external device, the first print data carried in the print task is processed to generate the second print data and then stored in the memory storage unit.
[0076] 2. Standby mode After the last printing task is completed or within the first preset time after the CPU is started, if the next printing task is not detected, the CPU enters the standby state. Specifically, when the above conditions are met, the CPU is shut down, that is, the CPU is turned off, so that the CPU stops running and enters the standby state, that is, the entire printing device is in standby mode, thereby effectively reducing the overall power consumption.
[0077] In the standby state, if a task instruction is received, a reset instruction is sent to the central processor to restart the central processor, switch from the standby state to the working state, and make the printing device re-enter the working mode.
[0078] If the next printing task is obtained after the previous printing task is completed or within the first preset time after the CPU is started, the CPU is not shut down. At this time, the printing device is still in the working mode, and the CPU can be in the working state.
[0079] 3. Sleep state After the central processing unit enters the standby state, if the next printing task is not received within the second preset time period, the central processing unit is powered off, the data of the central processing unit is stored in the memory storage unit, and the memory storage unit is controlled to enter the self-refresh mode.
[0080] It should be noted that, in the embodiment of the present application, the first preset time length and the second preset time length are not specifically limited. Without violating the inventive concept of the present application, the user can set them according to the actual printing needs. Exemplarily, the first preset time length is set to twenty minutes, and the second preset time length is set to ten minutes. Specifically, after the central processing unit is started or after receiving the print task, the controller sends a first timing command to the controller of the preset clock unit. When the controller receives the first timing command, the timer starts timing, and the timing cycle is twenty minutes. After the previous print task is completed twenty minutes or the central processing unit is started twenty minutes after the next print task is not obtained, the central processing unit is shut down and controlled to enter the standby state. At the same time, when the central processing unit is shut down and the central processing unit enters the standby state, a second timing command is sent to the controller of the clock unit. When the controller receives the second timing command, the timer starts timing, and the timing cycle is ten minutes. When the central processing unit enters the standby state and does not obtain the next print task ten minutes later, the central processing unit is powered off and enters the dormant state.
[0081] It should be noted that in the embodiment of the present application, the method further includes: The printing device is pre-processed according to the second printing data to generate printing status information.
[0082] It should be noted that the pre-processing of the printing device may refer to the normal hardware status detection of the printing device, such as the print head, ink cartridge, paper conveying mechanism, etc., to ensure their working status.
[0083] It should be noted that the printing status information includes but is not limited to consumables information, such as paper status, ink / toner status, etc.; printing progress; print quality; working status information of each module of the printer, such as printer ambient temperature, fuser preheating temperature, laser control unit, printer main motor and other information.
[0084] In some embodiments, the printing status information is usually displayed to the user through the display screen of the printer, the printer software interface on the computer, or the dedicated printer management software. For example, the following printing status information is included:
[0085] 1. Paper status information: If "Paper is sufficient", it means that the amount of paper in the paper input tray is sufficient to complete the current printing task; if "Paper is insufficient", it means that the amount of paper in the paper input tray is insufficient to complete the current printing task and paper needs to be added; if "Paper is jammed", it means that the printer encounters an obstruction during the paper feeding process and the paper cannot pass normally, and the paper jam needs to be cleared.
[0086] 2. Toner / carbon powder information: If "Toner is sufficient", it means that the amount of toner in the toner cartridge is sufficient to complete the current printing task; if "Toner is insufficient", it means that the amount of toner in the toner cartridge is low and you need to prepare to replace the toner cartridge; if "Toner is exhausted", it means that the toner in the toner cartridge has been used up and you need to replace the toner cartridge immediately to continue printing.
[0087] 3. Print quality information: If the print quality is normal, it means that the printed document is clear and colorful, meeting the expected effect; if the print quality is poor, it means that the printed document is blurred or has uneven colors, and you may need to adjust the print settings or replace the consumables.
[0088] 4. Fault prompt, showing the fault code of the specific hardware, indicating that a hardware component inside the printer (such as power supply, sensor, motor, etc.) has failed and needs to be repaired or replaced.
[0089] It should be noted that possible failures of laser printers include but are not limited to: printer hardware failure, such as laser failure, scanning mirror failure, charging electrode failure, photosensitive drum failure, scraper failure, laser beam detector contamination or damage, magnetic roller abnormality, print head clogged, paper jam, ink cartridge / toner cartridge problem, sensor failure, etc.; software or driver problems, such as print driver errors, errors or conflicts in the print queue, incompatibility between the operating system and the printer, etc.; network connection problems. In a network printing environment, network delays, disconnections, or configuration errors may cause printing failures; incorrect print settings, such as selecting the wrong paper size, improper print quality settings, incorrect duplex printing settings, etc.; consumables problems, such as exhausted ink cartridges / toner cartridges, use of incompatible consumables, etc.
[0090] For example, if a component failure is detected, the CPU can also respond immediately. For example, the CPU analyzes the specific situation of the abnormality and makes decisions based on preset rules and strategies. For example, if the ink cartridge is detected to be low on ink, the CPU may issue a warning signal and prompt the user to replace the ink cartridge. If the print head is detected to be clogged or faulty, automatic cleaning or calibration operations are attempted to restore it to normal working state. If the abnormality cannot be resolved through automatic processing, the CPU will promptly feedback the abnormality information to the user. In this way, the processing speed of the printer CPU can be improved, and the various performance of the CPU can be improved.
[0091] Here, the processing performed on the first print data carried in the print task may also be pre-print processing, where the pre-print processing generally refers to a series of preparations and settings performed before formal printing, including but not limited to document typesetting, format adjustment, font and size selection, and printing parameter settings, etc. Through pre-print processing, users can ensure that the printed document meets the expected effect, avoid wasting paper and ink, and improve printing efficiency.
[0092] It should be noted that the main difference between pre-printing and printing is that pre-printing is a series of preparations and settings before formal printing, and mainly focuses on document processing and parameter settings before printing. Printing, on the other hand, refers to the process of using a printer to convert electronic files or data content into paper output, and mainly focuses on the actual output, that is, converting the processed documents into physical paper form through the printer.
[0093] In this embodiment, the pre-printing process is performed to evaluate the execution performance of the printing task (eg, printing speed, consumables usage), including etc. According to the evaluation result, the second printing data can be optimized to improve the printing efficiency or save the cost.
[0094] In some specific embodiments, the central processing unit may be divided into two functional modules, namely, a first processing module and a second processing module, and the cache of the printer may be divided into a first cache space and a second cache space. The method includes: Using the first processing module in the first state to monitor the printing task; After the first processing module monitors the printing task, the second processing module in the second state is awakened and the printing task is stored in the first cache space; the power consumption of the second processor in the second state is lower than that in the first state; the power consumption of the first processing module in the first state is lower than that of the second processing module in the first state; the second processor enters the first state after being awakened; the first cache space is a shared cache space of the first processing module and the second processing module; The second processor entering the first state reads the print task from the first cache space, processes the first print data carried in the print task to generate second print data, and obtains a control instruction from the control module, wherein the control instruction at least includes paper control data; After waking up the second processor, the first processing module starts monitoring the status of the second processing module and / or the printer module; When an abnormality is detected in the second processing module or the printer module, a printing abnormality processing operation is performed.
[0095] In some specific embodiments, the second processor entering the first state reads the print task from the first cache space, processes the first print data carried in the print task to generate second print data, including: The second processor entering the first state parses the first printing data (i.e. the file to be printed) corresponding to the printing task to obtain the second printing data; The second print data is written into a second cache space, where the first cache space is a shared cache space of the first processing module and the second processing module.
[0096] It should be noted that through the collaborative work of the first processing module and the second processing module, the printing tasks are split, analyzed, pre-processed and abnormal feedback is provided, thereby improving the printing efficiency of the printer and enabling users to quickly complete printing jobs. At the same time, the abnormal status of the printer can be detected in advance to avoid printer printing failures.
[0097] Embodiment 2 Corresponding to the above-mentioned embodiment 1, the embodiment of the invention further provides a printer, referring to Figure 3 As shown, the field programmable gate array includes: The central processing unit 10 is used to, after receiving a print task sent by an external device, process the first print data carried in the print task to generate second print data and obtain a control instruction from a control module, wherein the control instruction at least includes paper control data; and, based on a DMA transmission mechanism, transmit the second print data and the control instruction to a printing device, so that the printing device prints according to the second print data and the control instruction to obtain a print result; and, match the print result with preset verification data stored in a preset database to obtain a verification result, wherein the verification result at least includes whether there is an abnormality in paper information; The control module 20 is used to send control instructions to the central processing unit.
[0098] In some specific embodiments, the paper control data includes at least one of paper picking, paper feeding, and paper output data.
[0099] In some specific embodiments, the central processor 10 is further used to send the printing task to the control module; The control module 20 is further configured to generate corresponding control instructions in response to the real-time configuration of the printing task and send them to the central processor.
[0100] In some specific embodiments, the central processor 10 is further configured to match preset verification data corresponding to the printing task in the preset database.
[0101] In some specific embodiments, the printer further includes an interrupt manager 30, which is used to: When it is determined according to the verification result that there is a printing abnormality, an interrupt printing instruction is sent to the central processor to interrupt subsequent printing.
[0102] In some specific embodiments, the central processor is further configured to: Traversing a first pixel of the first image and a second pixel of the second image, comparing an RGB value of the first pixel with an RGB value of the second pixel, the first pixel corresponding to the second pixel; Determine whether the RGB value of the first pixel is different from the RGB value of the second pixel; If the RGB value of the first pixel is different from the RGB value of the second pixel, marking the first pixel on the first picture and / or marking the second pixel on the second picture; The verification result is generated according to the marking result.
[0103] In some specific embodiments, the central processor is further configured to generate a test report based on the verification result for user viewing.
[0104] It should be noted that the description of the above printer item is similar to the description of the above print control method item, and the description of the beneficial effects of the same method is not repeated. For technical details not disclosed in the printer embodiment of the present invention, please refer to the description of the print control method embodiment of the present invention, which will not be repeated here.
[0105] The printer provided in the embodiment of the present application is described below from the perspective of hardware implementation.
[0106] It should be noted that the FPGA part of the printer provided in the embodiment of the present application is composed of pc_setup, src_rtl, work, note.txt, xators.tcl, etc. The specific implementation is as follows:
[0107] Among them, pc_setup: includes the configuration of HAPS platform, HT3 printing interface, ht3-DDR4 board configuration, IP netlist, etc.; it is composed of fdc, idc, option, par, pcf, haps_s26.tss and other files; src_rtl: contains Loongson's IP, self-designed IP module, tw printing IP, verilog module, and vivadoIP module.
[0108] The folders pc_setup and src_rtl are referenced in the entire HAPS integration process Figure 4 As shown in the figure, in the whole HAPS integration process, gui_dtd.tcl in the work directory is the main driver to generate the HAPS bit file. The HAPS Runtime is used to convert the bit file into a bin file. The above hardware components are some existing technologies, which will not be described here one by one.
[0109] Figure 5 This is a working principle diagram of the key modules of the printer provided in the embodiment of the present application, refer to Figure 5 As shown, in some specific embodiments, the printing IP of the printer is implemented by vivado IP, and the base_wrapper module in vivado IP includes Microblaze, axi interconnector, peripherals, memory manager, serial port controller, pin controller, timer, interrupt manager, etc., which contains control flow and image flow. The control flow is controlled by Microblaze through the axi interconnector according to the application of APP; the image flow includes the printing image flow and the image flow written by the CPU. The printing image flow is started by the printing IP, and the configuration of the printing IP is mounted on the peripheral interface.
[0110] In some specific embodiments, the control system of the printer can be developed using the Xilinx tool SDK, and the generated application elf can be loaded through the Xilinx jtag, and the application has an interactive interface to facilitate function expansion. It should be noted that the bare metal running program developed based on the Xilinx MicroBlaze soft core does not need to be transplanted RTOS, which simplifies programming.
[0111] In some specific embodiments, the printer may also implement an interrupt driven framework based on a MicroBlaze interrupt controller.
[0112] In some specific embodiments, the printer can also implement a simple Shell interactive command interface developed based on the UART driver, so as to facilitate the debugging personnel to call test related functions.
[0113] Function Embodiment 3 Corresponding to the above-mentioned embodiment one, the present invention also provides a computer storage medium, which is a computer-readable storage medium storing one or more of the one or more programs that can be executed by one or more processors, so that the one or more processors execute the printing control method as described in any one of the embodiments one.
[0114] In some embodiments, the computer storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0115] It should be noted that the technical solutions described in the embodiments of the present invention can be combined arbitrarily without conflict.
[0116] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention.
Claims
1. A printing control method, characterized in that: Applied to a printer based on a field programmable gate array, the field programmable gate array includes a central processing unit and a control module, the method includes: After receiving the print task sent by the external device, the central processor processes the first print data carried in the print task to generate second print data and obtains a control instruction from the control module, wherein the control instruction at least includes paper control data; The central processor transmits the second printing data and the control instruction to the printing device based on the DMA transmission mechanism, so that the printing device prints according to the second printing data and the control instruction to obtain a printing result; The central processor matches the printing result with preset verification data stored in a preset database to obtain a verification result, which at least includes whether there is any abnormality in the paper information.
2. The printing control method according to claim 1, characterized in that: The paper control data includes at least one of paper picking, paper feeding and paper output data.
3. The printing control method according to claim 1, characterized in that: The acquiring of the control instruction from the control module comprises: The central processing unit sends the printing task to the control module; The control module generates corresponding control instructions in response to the real-time configuration of the printing task and sends them to the central processing unit.
4. The printing control method according to any one of claims 1 to 3, characterized in that: Before matching the printing result with the preset verification data stored in the preset database to obtain the verification result, the method further includes: Preset verification data corresponding to the printing task is matched in the preset database.
5. The printing control method according to any one of claims 1 to 3, characterized in that: The printer further includes an interrupt manager, and after the central processor matches the printing result with preset verification data stored in a preset database and obtains the verification result, the method further includes: It is determined whether there is a printing abnormality according to the verification result. If there is, a printing interruption instruction is sent to the central processing unit through the interrupt manager to interrupt subsequent printing.
6. The printing control method according to claim 5, characterized in that: The sending of the interrupt printing instruction to the central processor through the interrupt manager comprises: Receiving interrupt configuration information configured in real time using the interrupt manager; The interrupt manager generates an interrupt instruction according to the interrupt configuration information and sends it to the central processing unit.
7. The printing control method according to any one of claims 1 to 3, characterized in that: The first printing data includes a printing image stream, and the matching the printing result with the preset verification data stored in the preset database to obtain the verification result includes: Extracting a first picture and a second picture from the printing result and the preset verification data respectively; Compare the first image with the second image to obtain a verification result.
8. The printing control method according to claim 7, characterized in that: The comparing the first picture with the second picture to obtain a verification result includes: Traversing a first pixel of the first image and a second pixel of the second image, comparing an RGB value of the first pixel with an RGB value of the second pixel, the first pixel corresponding to the second pixel; Determine whether the RGB value of the first pixel is different from the RGB value of the second pixel; If the RGB value of the first pixel is different from the RGB value of the second pixel, marking the first pixel on the first picture and / or marking the second pixel on the second picture; The verification result is generated according to the marking result.
9. A printer, characterized in that: The printer includes a field programmable gate array, the field programmable gate array including: A central processing unit, configured to, after receiving a print task sent by an external device, process the first print data carried in the print task to generate second print data and obtain a control instruction from a control module, wherein the control instruction at least includes paper control data; and, based on a DMA transmission mechanism, transmit the second print data and the control instruction to a printing device, so that the printing device prints according to the second print data and the control instruction to obtain a print result; and, match the print result with preset verification data stored in a preset database to obtain a verification result, wherein the verification result at least includes whether there is an abnormality in paper information; A control module is used to send control instructions to the central processing unit.
10. A computer storage medium, characterized in that: The computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to enable the one or more processors to execute the printing control method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Image printing method and device based on data transmission verification, equipment and medium
CN115686386A
Printer calibration method and device, storage medium and computer equipment
CN117992000A
Print data transmission method and printer integrated with SOC module
CN118519932A
Printing anomaly detection method, laser printer and storage medium
CN118567589A
Printing apparatus and information processing apparatus, control method thereof, program, and storage medium
US20040085583A1
