A printing control system and method based on multi-interface multi-link communication
Patent Information
- Application Number
- CN202611161634.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-08-28
AI Technical Summary
现有方案通常通过外加以太网转模块实现网络扩展,增加了硬件成本和驱动开发复杂度
1、系统采用双USB通道物理隔离架构实现打印控制指令与打印数据的分离传输,彻底解决了传统单USB通道因高分辨率图像数据占用带宽,而导致控制指令响应延迟的技术难题,通过主控内置的两个独立高速USB,实现双通道高速数据传输,具有更高的通信效率和更低的响应延迟。
Smart Images

Figure CN122653554A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of printer technology, and in particular to a printing control system and method based on multi-interface multi-link communication. Background Technology
[0002] With the rapid development of new retail, smart logistics, and industrial automation, thermal printing technology, as a core means of outputting invoices, labels, and waybills, has been widely used in numerous scenarios such as supermarket checkouts, express delivery waybills, medical invoices, and restaurant kitchens. However, existing printing terminals still face many technical bottlenecks in practical applications, which urgently need to be overcome through innovative hardware architectures and communication mechanisms.
[0003] Currently, printing terminals on the market are mainly divided into two categories: label printers and receipt printers. These two types differ significantly in printhead structure, instruction sets, and paper specifications. Label printers typically use instruction sets such as TSPL, supporting printing on wider label paper and suitable for scenarios such as logistics waybills and product labels. Receipt printers, on the other hand, use POS instruction sets and are suitable for printing continuous paper such as receipts and invoices. Because the hardware structures and instruction sets of these two types of printers are incompatible, users often need to equip themselves with two independent printing devices in their business scenarios. This not only increases procurement costs and maintenance burdens but also occupies valuable desktop space, making it difficult to meet the needs of integrated, one-stop applications.
[0004] To address the aforementioned issues, some manufacturers have attempted to support label and receipt printing simultaneously with a single printer. However, existing solutions typically employ one of two technical approaches: First, they use mechanical structures to switch printhead positions, achieving physical adaptation to different printing media. However, this approach is complex, unreliable, and requires manual intervention during the switching process, making automated identification and switching impossible. Second, they transmit different types of printing commands via a single USB channel, with the main control chip handling command parsing and distribution. However, this approach suffers from significant data congestion. When transmitting a large number of high-resolution label images, the USB channel bandwidth is completely occupied by the image data, leading to delays in control command response and severely impacting the real-time performance and user experience of receipt printing.
[0005] Furthermore, existing print control systems typically use a single USB interface to connect to the host, with both control commands and print data transmitted through the same channel. In high-speed printing scenarios, large amounts of print data can clog the control channel, causing delayed command responses and even print job stalls or failures. More critically, traditional USB hubs often use multiple downstream ports sharing the same transaction converter. When multiple ports are simultaneously transmitting high-speed data, severe bandwidth contention arises between the ports, further exacerbating data congestion.
[0006] In industrial and commercial internet scenarios, printing terminals often need to have network printing capabilities as well. Existing solutions typically achieve network expansion by adding an external Ethernet converter module, which increases hardware costs and driver development complexity.
[0007] In summary, while existing print control technologies are largely mature for single-print scenarios, significant shortcomings remain in areas such as parallel control of dual printheads, multi-channel USB communication, and physical isolation of commands and data. There is an urgent need to design a print control system and method based on multi-interface, multi-link communication. Through hardware architecture innovation and communication mechanism optimization, this system should achieve dual-drive of the label and ticket printheads by a single master controller, resolving USB channel congestion issues, reducing system costs, and improving printing efficiency and reliability. Summary of the Invention
[0008] The technical problem to be solved by the present invention is to provide a printing control system and method based on multi-interface multi-link communication, in view of the above-mentioned defects of the prior art.
[0009] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: A printing control system based on multi-interface, multi-link communication includes a client, a printer motherboard, and a printing execution unit. The printer motherboard is connected to both the client and the printing execution unit. The printer motherboard includes a USB hub and a microcontroller. The printing execution unit includes a receipt printhead and a label printhead. The printer motherboard is used to receive USB data stream signals from a host computer and expand a single USB signal into two downlink signals via the USB hub; or it is used to receive network data stream signals from the client, and the microcontroller performs instruction recognition processing on the received data stream signals and distributes the printing data to the printing execution unit. The printing execution unit receives the printing data and drives the receipt printhead and label printhead to perform printing operations.
[0010] Preferably, the microcontroller includes a first USB controller and a second USB controller, the first USB controller and the second USB controller are respectively configured with a first USB channel and a second USB channel, the data received by the first USB channel is ticket printing data, using a ticket instruction set; the data received by the second USB channel is label printing data, using a label instruction set.
[0011] Preferably, the microcontroller acquires data signal streams from port A and port B respectively; the data signal stream from port A is ticket printing data, using a ticket instruction set; the data signal stream from port B is label printing data, using a label instruction set.
[0012] Preferably, the ticket printing data received by the first USB channel is stored in the ticket printing data buffer, and the microcontroller drives the ticket print head to perform printing; the label printing data received by the second USB channel is stored in the label printing data buffer, and the microcontroller drives the label print head to perform printing; when data arrives from both channels simultaneously, the microcontroller schedules the ticket print head and label print head to perform printing tasks sequentially according to a priority strategy.
[0013] Preferably, the data signal stream from port A is stored in the ticket printing data buffer, and the microcontroller drives the ticket print head to perform printing; the data signal stream from port B is stored in the label printing data buffer, and the microcontroller drives the label print head to perform printing; when data arrives simultaneously from both port data streams, the microcontroller schedules the ticket print head and label print head to perform printing tasks sequentially according to a priority strategy.
[0014] Preferably, the microcontroller monitors the status information of the ticket printhead and label printhead in real time. The status information includes printhead temperature, paper out status, and remaining printhead lifespan. The microcontroller then transmits the status information back to the host computer via the IN endpoint. When an abnormal status is detected, the microcontroller automatically outputs a pause printing signal or an alarm signal.
[0015] To address the aforementioned technical problems, this invention also provides a printing control method based on multi-interface, multi-link communication, comprising the following steps: Step 1: After system power-on, USB channel initialization configuration: The microcontroller executes the microcontroller initialization program, independently configuring the first and second USB interfaces, and configuring an independent transaction converter for each downlink port through the USB hub. Ethernet, Bluetooth, WIFI, 4G, and other module initialization configuration: Each communication module is independently configured and successfully started.
[0016] Step 2: Print command reception and processing. The printer motherboard receives USB data stream signals from the client and expands the single USB signal into two downlink signals through the USB hub, or receives network module data stream signals from the client through the printer motherboard. The microcontroller identifies the command type of the received data stream signals and distributes the print data to the print execution unit. Step 3: Dual printhead task scheduling. The printing execution unit receives the printing data and drives the ticket printhead and label printhead to perform printing operations respectively.
[0017] Preferably, in step one, the microcontroller sets the transmission mode to high-speed mode and configures the endpoint address and buffer size; the first USB interface is connected to the first downstream port of the USB hub, and the second USB interface is connected to the second downstream port of the USB hub, forming a physically isolated first USB channel and second USB channel, and the upstream port is connected to the host computer; the microcontroller monitors the data transmission status of the first USB channel and the second USB channel in real time, including channel load rate, data queue length, and transmission error rate; when the load rate of a certain channel exceeds a preset threshold, the microcontroller automatically allocates subsequent data packets to the channel with a lower load for transmission; when a transmission error or interruption is detected in a certain channel, the microcontroller automatically switches the task of that channel to another channel for continued execution.
[0018] Preferably, in step two, if the instruction set is identified as a ticket instruction set, the print data is sent to the ticket print head through the first print control port of the microcontroller to perform the ticket printing operation; if the instruction set is identified as a label instruction set, the print data is sent to the label print head through the second print control port of the microcontroller to perform the label printing operation.
[0019] Preferably, in step three, the printing execution unit automatically selects the transmission channel according to the instruction type. Network printing tasks and local USB printing tasks enter a unified printing task queue according to priority or first-come-first-served principle, and are executed by the microcontroller in a time-sharing manner. When network printing tasks and local USB printing tasks arrive at the same time, the system determines the type of task to be executed according to a preset priority strategy, and the other task enters a waiting queue. The next task is automatically executed after the current task is completed.
[0020] By adopting the above technical solution, the printing control system and method based on multi-interface multi-link communication provided by the present invention have the following beneficial effects: 1. The system adopts a dual-USB channel physical isolation architecture to separate the transmission of printing control commands and printing data, which completely solves the technical problem of control command response delay caused by the bandwidth occupation of high-resolution image data in traditional single USB channels. Through the two independent high-speed USB built into the main controller, dual-channel high-speed data transmission is achieved, which has higher communication efficiency and lower response latency.
[0021] 2. The system is based on a dual-channel USB mode, with an independent transaction converter configured for each downstream port. The first and second USB channels each obtain independent transmission resources, and the data transmission of the two channels is physically independent, allowing simultaneous reception of print data from the host computer. Through a task scheduling mechanism, the print tasks of the two channels are processed in a time-sharing manner, executed sequentially according to priority or first-come-first-served principles, effectively avoiding the data transmission congestion problem in single-channel mode and improving the overall efficiency of the system. It features lower hardware costs, smaller size, and higher system integration, ensuring the continuity of print tasks and system stability.
[0022] 3. The system adopts an integrated design based on a single main controller and dual printheads, supporting label printing and invoice printing simultaneously in the same device, replacing the traditional working mode of two independent printers; compared with existing technologies, the device size is reduced, the cost is lowered, and the maintenance complexity is significantly reduced, making it suitable for embedded printing scenarios such as supermarket cash registers, logistics waybills, and medical invoices. Attached Figure Description
[0023] Figure 1 This is a structural block diagram of a first embodiment of the printing control system in this invention; Figure 2 This is a structural block diagram of Embodiment 2 of the printing control system in this invention; Figure 3 This is a flowchart of Embodiment 1 of the printing control method in this invention; Figure 4 This is a flowchart of Embodiment 2 of the printing control method in this invention; In the diagram, 1-client, 2-printer motherboard, 3-printing execution unit, 4-receipt printhead, 5-label printhead, 6-host computer, 7-USB hub. Detailed Implementation
[0024] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings. It should be noted that these descriptions are for the purpose of aiding understanding the present invention, but do not constitute a limitation thereof. Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0025] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this invention and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0026] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0027] like Figure 1-4 As shown, the print control system based on multi-interface, multi-link communication includes a client 1, a printer motherboard 2, and a print execution unit 3. The printer motherboard 2 is connected to both the client 1 and the print execution unit 3. The printer motherboard 2 includes a USB hub and a microcontroller. The print execution unit 3 includes a receipt printhead 4 and a label printhead 5. The printer motherboard 2 receives USB data stream signals from a host computer and expands a single USB signal into two downlink signals via the USB hub; or it receives network data stream signals from the client 1, and the microcontroller performs instruction recognition processing on the received data stream signals and distributes the print data to the print execution unit 3. The print execution unit 3 receives the print data and drives the receipt printhead 4 and label printhead 5 to perform printing operations. It can be understood that this invention, based on a parallel print control system with dual USB channels, designs a single-chip, dual-printhead intelligent print control terminal, realizing dual-drive and independent control of label and receipt printing in the same device, improving the integration and resource utilization of the print terminal, while reducing hardware costs and maintenance complexity.
[0028] Understandably, the printer's motherboard 2 integrates a microcontroller and is equipped with an Ethernet PHY chip, Bluetooth module, WiFi module, or 4G module. For USB data streams, the USB hub 7 expands a single USB signal into two downlink signals. For Ethernet, Bluetooth, WiFi, or 4G cellular network data streams, the protocol stack performs data unpacking, IP address and port identification, extracts the effective print payload, and sends it to the microcontroller. The microcontroller then performs instruction parsing on the received multi-source data streams and distributes the print data to the corresponding print execution unit based on the parsing results. The print execution unit receives the print data and drives the ticket print head and label print head to perform printing operations. This invention connects to the hub through the microcontroller's USB host interface, utilizes the hub's independent transaction converters on each port to allocate dedicated transmission resources for each print channel, and introduces a "network protocol multi-link transmission" mechanism, effectively solving the printing delay problem caused by congestion of control instructions and print data on a single USB channel, achieving efficient driving of dual print heads.
[0029] Specifically, the printing control system comprises three functional modules: client 1, printer motherboard 2, and printing execution unit 3. The host computer 6 is responsible for interacting with the user, sending print jobs, configuring two independent PIDs and VIDs, and conforming to the USB printer device class specification. The printer motherboard 2 receives USB data streams from the host computer's driver setting module, expands the single USB signal into two downlink signals via a USB hub, identifies the instruction type of the received data stream, and distributes the print data to the corresponding printhead modules, while simultaneously achieving dual-channel load balancing control. The printing execution unit 3 receives print data from the main controller and drives the first and second printheads to perform printing operations. It also monitors printhead status, including temperature detection, paper out detection, and mileage monitoring, enabling real-time monitoring and alarms of the printing status to ensure print job continuity and system reliability.
[0030] Specifically, the complete workflow of this printing control system is as follows: Initialization phase: The main microcontroller initializes two independent USB controllers, configuring the first PID and first VID, the second PID and second VID respectively, following the USB printer device class specification, and configuring device descriptors, configuration descriptors, interface descriptors, endpoint descriptors and string descriptors; USB hub initialization: Configure an independent transaction converter for each downlink port; First printhead (ticket printhead) initialization: Perform self-test and warm-up; Second printhead (label printhead) initialization: Perform self-test and warm-up; Stepper motor and status monitoring initialization: Perform ready operation; Create ticket printing task queue Q_pos and label printing task queue Q_label.
[0031] Data reception phase: The first USB channel receives ticket printing data (POS instruction set) through an independent DMA channel; the second USB channel receives label printing data (Label instruction set) through an independent DMA channel; data reception of the two channels can be carried out simultaneously without interference.
[0032] Data processing stage: Automatically identify the instruction type based on the USB channel from which the data originates: the first USB channel data is a POS instruction, and the second USB channel data is a Label instruction; store the print data into the corresponding print data buffer (invoice data is stored in the invoice buffer, and label data is stored in the label buffer); generate segmented heating control parameters and heating time t based on the print data; calculate the number of stepper motor pulses N based on the print resolution and heating time.
[0033] Printing execution phase: The task scheduler selects the currently executing task from Q_pos and Q_label; drives the corresponding print head in a time-sharing manner according to the priority scheduling strategy (user-defined); executes segmented heating control and outputs the prints in the order of data segments; executes stepper motor half-step control to drive the paper to move precisely step by step.
[0034] Status feedback phase: Real-time monitoring of printhead temperature T and paper out status S; calculation of remaining printhead life R; transmission of status information back to the host computer via the IN endpoint, following the USB printer device class status return specification; automatic execution of protective measures (pause printing, alarm, etc.) when an abnormal status is detected.
[0035] Specifically, the printing control method based on multi-interface multi-link communication includes the following steps: Step 1, Channel Initialization Configuration: There are two ways to configure dual USB channels: hardware initialization configuration and dynamic channel switching.
[0036] (1.1) The hardware initialization configuration method is as follows: After the system powers on, the microcontroller executes the dual USB controller initialization program, independently configuring the first and second USB interfaces to high-speed transmission mode, and configuring the endpoint addresses and buffer sizes. The first USB controller is configured with the first PID and the first VID, and the second USB controller is configured with the second PID and the second VID, both conforming to the USB printer device class specification (Class Code 0x07). The OUT endpoint is used for data transmission, and the IN endpoint is used for status return. The USB hub performs initialization, configuring its operating mode to allocate an independent transaction converter to each downlink port, ensuring that the first and second downlink ports have independent communication resources. The microcontroller's first USB interface is connected to the first downlink port of the USB hub, and the second USB interface is connected to the second downlink port of the USB hub, forming physically isolated first and second USB channels. The uplink port is connected to the host computer.
[0037] (1.2) Independent Transaction Conversion Mode Channel Resource Allocation The USB hub configures an independent transaction converter for each downstream port, allowing the first and second downstream ports to each obtain independent transmission resources. Both channels can simultaneously receive print data sent from the host computer, avoiding the data transmission congestion problem of traditional USB hubs where multiple ports share a single transaction converter. The microcontroller processes the received dual-channel data in a time-division multiplexing manner, executing print tasks sequentially according to a task scheduling strategy.
[0038] (1.3) The dynamic channel switching method is as follows: The microcontroller monitors the data transmission status of the first and second USB channels in real time, including channel load rate, data queue length, and transmission error rate. When the load rate of a certain channel exceeds a preset threshold, the microcontroller automatically allocates subsequent data packets to the channel with a lower load for transmission, thereby achieving dynamic load balancing between channels. When a transmission error or interruption is detected in a certain channel, the microcontroller automatically switches the task of that channel to another channel to continue execution, ensuring the continuity and reliability of the printing task.
[0039] Step 2: Receiving and Processing Print Commands (2.1) Print data distribution processing The system directly determines the print job type based on the USB channel from which the data originates: the data received through the first USB channel is for ticket printing, using the ticket instruction set; the data received through the second USB channel is for label printing, using the label instruction set. The data processing rules are as follows: First USB channel data → Ticket printing data buffer → Ticket print head Second USB channel data → Tag printing data buffer → Tag print head The data processing of the two channels is independent and does not interfere with each other. The ticket printing data received by the first USB channel is stored in the ticket printing data buffer, and the microcontroller drives the ticket print head to perform printing. The label printing data received by the second USB channel is stored in the label printing data buffer, and the microcontroller drives the label print head to perform printing. When data arrives simultaneously from both channels, the system schedules the two print heads to execute the printing tasks sequentially according to a priority strategy.
[0040] (2.2) Print data driven control Print data (including print density, print speed, paper size, paper type, etc.) is acquired from the first and second USB channels respectively. The data is then distributed to the corresponding printhead drivers based on the instruction recognition results. Specifically: First channel data distribution: If the output data is identified as a ticket instruction set, the print data is sent to the ticket printhead via the microcontroller's first print control port to execute the ticket printing operation. Second channel data distribution: If the output data is identified as a label instruction set, the print data is sent to the label printhead via the microcontroller's second print control port to execute the label printing operation. Dual-channel parallel processing: The output print tasks are scheduled and queued. Utilizing the microcontroller's dual USB interface independent DMA channels, independent reception and buffering of label and ticket print data are achieved. Print tasks from both channels are queued according to priority or first-come-first-served principles, and the corresponding printheads are driven in a time-sharing manner to execute the printing operation. The two print tasks do not interfere with each other at the data reception level and are completed alternately and orderly at the execution level. Printing status feedback: Monitor the status of the executed printing tasks, including printhead temperature detection, paper out detection, and mileage detection, and feed the status information back to the host computer through the corresponding USB channel to realize real-time monitoring and alarm of the printing status.
[0041] Step 3, Dual Printhead Task Scheduling: (3.1) Print Task Queue Management The system maintains a ticket printing task queue Q_pos and a label printing task queue Q_label. Both queues employ a priority scheduling strategy, defining ticket printing priority P_pos and label printing priority P_label, with P_pos > P_label (ticket printing takes priority) or dynamically adjusted according to user settings. The task scheduler selects the currently executing task from the two queues. When both queues are not empty simultaneously, tasks are executed sequentially according to priority. After the current task is completed, the scheduler automatically retrieves the next task from the higher-priority non-empty queue for execution, achieving orderly alternation of dual printing tasks.
[0042] (3.2) Dual-channel independent reception and queuing processing The first USB channel receives ticket printing data via an independent DMA channel, and the second USB channel receives label printing data via an independent DMA channel. Data reception on both channels can occur simultaneously without interference. After reception is complete, the print job enters its corresponding print job queue and is executed by the microcontroller through time-sharing scheduling. The two queues are independent of each other; ticket printing jobs will not enter the label printing queue, and vice versa, ensuring correct data matching with the print head.
[0043] (3.3) Network Printing Extension Steps: The printing function is extended using an Ethernet interface, utilizing the microcontroller's built-in Ethernet PHY to achieve network printing. The specific steps are as follows: Network data reception: The microcontroller receives network printing data through its built-in Ethernet PHY, supporting the TCP / IP protocol stack. Dual-channel network printing: For the converted print data, the transmission channel is automatically selected based on the instruction type. Network printing tasks and local USB printing tasks are entered into a unified printing task queue according to priority or first-come-first-served principles, and are executed by the microcontroller through time-sharing scheduling. When network print jobs and local USB print jobs arrive simultaneously, the system arbitrates according to a preset priority strategy (such as local task priority or network task priority) to determine the type of task to be executed. The other task enters a waiting queue, and the next task is automatically executed after the current task is completed, achieving orderly alternation and unified management of network print jobs and local USB print jobs. This extended step also includes multi-source data stream processing. For USB data streams, a USB hub expands a single USB signal into two downlink signals. For other communication technologies such as Ethernet, Bluetooth, WiFi, or 4G cellular network data streams, the protocol stack performs data unpacking, IP address and port identification, etc., extracts the effective print payload and sends it to the microcontroller. The microcontroller then performs instruction parsing processing on the received multi-source data streams and distributes the print data to the corresponding print execution unit based on the parsing results. The print execution unit receives the print data and drives the ticket print head and label print head to perform the printing operation.
[0044] Understandably, this invention is rationally designed and uniquely constructed. It employs a dual-USB channel physical isolation architecture and a USB hub to achieve dual-channel data control for a single master controller and dual printheads, eliminating the need for complex mechanical switching structures and resulting in lower costs and higher printing efficiency. Furthermore, the invention uses dual USB master controllers and a hub to construct a dual-channel communication architecture, further improving the system's data transmission reliability and parallel processing capabilities.
[0045] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and these variations still fall within the protection scope of the present invention.
Claims
1. A print control system based on multi-interface multi-link communication, comprising a client, a printer motherboard, and a print execution unit, wherein the printer motherboard is connected to the client and the print execution unit respectively, characterized in that: The printer motherboard includes a USB hub and a microcontroller, and the printing execution unit includes a receipt printhead and a label printhead. The printer motherboard is used to receive USB data stream signals from a host computer and expand a single USB signal into two downlink signals through the USB hub; or it is used to receive network data stream signals from a client, and the microcontroller performs instruction recognition processing on the received data stream signals and distributes the printing data to the printing execution unit. The printing execution unit receives the printing data and drives the receipt printhead and label printhead to perform printing operations respectively. The USB hub is configured with an independent transaction converter for each downlink port, forming a physically isolated first USB channel and second USB channel. The microcontroller monitors the data transmission status of the first USB channel and the second USB channel in real time, and performs instruction parsing and processing on the received multi-source data streams, including USB data streams, Ethernet, Bluetooth, WIFI, and 4G multi-network data streams, which are then executed by the microcontroller in a time-sharing manner.
2. The printing control system based on multi-interface multi-link communication according to claim 1, characterized in that: The microcontroller includes a first USB controller and a second USB controller. The first USB controller and the second USB controller are respectively configured with a first USB channel and a second USB channel. The data received by the first USB channel is ticket printing data, which adopts the ticket instruction set; the data received by the second USB channel is label printing data, which adopts the label instruction set.
3. The printing control system based on multi-interface multi-link communication according to claim 2, characterized in that: The microcontroller acquires data signal streams from port A and port B respectively; the data signal stream from port A is ticket printing data, using the ticket instruction set; the data signal stream from port B is label printing data, using the label instruction set.
4. The printing control system based on multi-interface multi-link communication according to claim 3, characterized in that: The ticket printing data received by the first USB channel is stored in the ticket printing data buffer, and the microcontroller drives the ticket print head to perform printing; the label printing data received by the second USB channel is stored in the label printing data buffer, and the microcontroller drives the label print head to perform printing; when data arrives from both channels simultaneously, the microcontroller schedules the ticket print head and label print head to perform printing tasks in sequence according to a priority strategy.
5. The printing control system based on multi-interface multi-link communication according to claim 3, characterized in that: The data signal stream from port A is stored in the ticket printing data buffer, and the microcontroller drives the ticket print head to perform printing; the data signal stream from port B is stored in the label printing data buffer, and the microcontroller drives the label print head to perform printing; when data arrives from both ports simultaneously, the microcontroller schedules the ticket print head and label print head to perform printing tasks in sequence according to a priority strategy.
6. The printing control system based on multi-interface multi-link communication according to claim 3, characterized in that: The microcontroller monitors the status information of the ticket printhead and label printhead in real time. The status information includes printhead temperature, paper out status, and remaining printhead lifespan. The microcontroller transmits the status information back to the host computer via the IN endpoint. When an abnormal status is detected, it automatically outputs a pause printing signal or an alarm signal.
7. A printing control method based on multi-interface, multi-link communication, characterized in that: Includes the following steps: Step 1: After the system is powered on, the USB channel is initialized and configured: The microcontroller executes the microcontroller initialization program, configures the first USB interface and the second USB interface independently, and configures an independent transaction converter for each downstream port through the USB hub. Ethernet, Bluetooth, WIFI, 4G and other modules initialization configuration: Each communication module was configured independently and started successfully; Step 2: Print command reception and processing. The printer motherboard receives USB data stream signals from the client and expands the single USB signal into two downlink signals through the USB hub, or receives network module data stream signals from the client through the printer motherboard. The microcontroller identifies the command type of the received data stream signals and distributes the print data to the print execution unit. Step 3: Dual printhead task scheduling. The printing execution unit receives the printing data and drives the ticket printhead and label printhead to perform printing operations respectively.
8. The printing control method based on multi-interface multi-link communication according to claim 7, characterized in that: In step one, the microcontroller is set to high-speed mode for transmission and configured with endpoint address and buffer size; the first USB interface is connected to the first downstream port of the USB hub, the second USB interface is connected to the second downstream port of the USB hub, forming a physically isolated first USB channel and second USB channel, and the upstream port is connected to the host computer. The microcontroller monitors the data transmission status of the first USB channel and the second USB channel in real time, including channel load rate, data queue length, and transmission error rate. When the load rate of a certain channel exceeds a preset threshold, the microcontroller automatically allocates subsequent data packets to the channel with a lower load for transmission. When a transmission error or interruption is detected in a certain channel, the microcontroller automatically switches the task of that channel to another channel for continued execution.
9. The printing control method based on multi-interface multi-link communication according to claim 7, characterized in that: In step two, if the instruction set is identified as a ticket instruction set, the print data is sent to the ticket print head through the first print control port of the microcontroller to perform the ticket printing operation; if the instruction set is identified as a label instruction set, the print data is sent to the label print head through the second print control port of the microcontroller to perform the label printing operation.
10. The printing control method based on multi-interface multi-link communication according to claim 7, characterized in that: In step three, the printing execution unit automatically selects the transmission channel according to the instruction type. Network printing tasks and local USB printing tasks enter a unified printing task queue according to priority or first-come-first-served principle, and are executed by the microcontroller in a time-sharing manner. When network printing tasks and local USB printing tasks arrive at the same time, the system determines the type of task to be executed according to a preset priority strategy, and the other task enters a waiting queue. The next task is automatically executed after the current task is completed.