A YMCK full-color AI large model enabled on-demand printing method and on-demand pen
By leveraging the YMCK full-color AI big model-enabled printing method, the problems of multi-color inkjet misalignment and inconsistent data organization in voice interaction in portable full-color printing devices have been solved. Stable multi-channel dot matrix data transmission and time-division inkjet have been achieved, ensuring pattern continuity and alignment consistency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-04
- Publication Date
- 2026-04-07
AI Technical Summary
Existing portable full-color printing equipment is prone to channel misalignment, ghosting, or discontinuity in multi-color inkjet printing under manual sliding conditions. Furthermore, the lack of unified data organization in the voice interaction link leads to the accumulation of color alignment deviations, affecting the continuity and alignment consistency of the pattern.
The printing method, powered by a YMCK full-color AI model, acquires the image to be printed, performs rasterization processing to generate four-color channel dot matrix data, and forms a printing buffer on the main control MCU side; combined with the microphone to collect voice data, the content to be printed is generated through the cloud-based large model, color space conversion and CMYK channel separation are performed to generate four-color channel dot matrix data; the print head is driven to eject according to the encoder displacement information, and time-division ejection and displacement compensation are performed.
Stable transmission of multi-channel dot matrix data and time-division spraying triggered by displacement are achieved, keeping the spraying trigger consistent with the dot matrix row sequence, reducing color alignment deviation, and ensuring pattern continuity and alignment consistency.
Smart Images

Figure CN121635823B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of AI-powered intelligent printing, specifically to a printing method and printing pen powered by a YMCK full-color AI large model. Background Technology
[0002] Portable inkjet printing equipment falls under the field of portable inkjet printing and human-computer interaction technology. Related solutions typically involve a handheld device carrying an inkjet printhead that slides along a predetermined direction on a substrate surface. The printhead is triggered based on displacement information, outputting lines or patterns without the need for a fixed paper feed mechanism. Existing portable inkjet printing solutions mostly use a mobile phone to complete image processing and print data preparation, which is then wirelessly transmitted to the device for print execution. The device typically includes a main control processing unit, inkjet drive circuitry, displacement detection components, and a storage unit. The main control processing unit, based on the displacement detection output, calls upon cached data at the appropriate position to drive the printhead and complete the printing process.
[0003] In full-color on-demand printing scenarios, printheads typically contain multi-color channel nozzle arrays, with structural spacing and jetting timing differences between channels. Existing solutions, under manual sliding conditions, suffer from uncertainties in displacement speed and contact state. The timing deviation caused by nozzle spacing, combined with displacement jitter, easily leads to asynchronous multi-color jetting at the same physical location, manifesting as channel misalignment, ghosting, or discontinuity in colored lines. Simultaneously, during the wireless segmented transmission and on-device buffering of multi-channel dot matrix data prepared on the mobile device, a lack of a unified row sequence association mechanism and stable trigger index relationship can easily result in inconsistencies between the jetting position and the dot matrix row sequence, affecting pattern continuity and alignment consistency.
[0004] On the other hand, the application of voice interaction and large-scale model-generated content in portable printing devices is gradually increasing. Most solutions involve collecting voice data, uploading it to the cloud for semantic understanding and content generation, and then sending the results back to the terminal for presentation. In the existing voice-to-print link, voice data encoding, network session transmission, result parsing, generation of printable content, color processing, dot matrix conversion, and then forming the end-side print buffer often lack unified data organization constraints with the in-print link. This makes it difficult to directly map the generated content to a dot matrix sequence of line numbers consistent with displacement triggering, thus increasing the complexity of end-side data reassembly and print scheduling. Furthermore, under handheld sliding conditions, displacement measurement stability is a fundamental constraint on the reliable triggering of multi-channel time-sharing print. Existing solutions lack sufficient constraints on the identification of displacement measurement anomalies and print allowable conditions, easily leading to multi-color prints still being executed during unstable sliding phases, further accumulating color alignment deviations.
[0005] Therefore, a solution for end-side jetting scheduling and data organization for YMCK full-color printing is still needed to establish a consistent data association between the mobile image processing link, the cloud-based large model interaction link, and the end-side buffer, displacement triggering, and nozzle spacing compensation link. This will enable stable transmission and buffering of multi-channel dot matrix data and time-division jetting alignment triggered by displacement while maintaining the portable printing characteristics. Summary of the Invention
[0006] Based on the shortcomings of the existing technology described above, the purpose of this invention is to provide a printing method and printing pen empowered by YMCK full-color AI large model to solve the above-mentioned technical problems.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a printing method empowered by a YMCK full-color AI large model, comprising:
[0008] In print mode, the image to be printed is acquired, the image to be printed is segmented and stitched together, and then rasterization is performed to generate a raster result;
[0009] The rasterization results are mapped to generate four-color channel dot matrix data.
[0010] The four-color channel dot matrix data is divided into blocks and sent to the main control MCU. The main control MCU writes the four-color channel dot matrix data into the memory to form a print buffer.
[0011] In AI mode, voice data is collected from the microphone and transmitted to the main control MCU via I2S.
[0012] The main control MCU compresses the voice data, uploads it to the cloud-based large model via WebSocket, receives and parses the JSON results returned by the cloud-based large model;
[0013] Based on the analysis results, the content to be printed is generated. Color space conversion, CMYK channel separation, dot calculation and dot matrix mapping are performed on the content to be printed to generate four-color channel dot matrix data, which is written to the memory to form a print cache.
[0014] According to the instructions, the encoder displacement information is collected, and when the displacement reaches the preset step threshold, the four-channel dot matrix data is read and the print head is driven to spray.
[0015] Time-division spraying and displacement compensation are performed on the four-color channel dot matrix data based on the relative spacing of the four-color nozzles.
[0016] The present invention is further configured such that the step of mapping based on the rasterization result to generate four-color channel dot matrix data includes:
[0017] The rasterized results are organized into a sequence of raster cells ordered by the printing direction, and a correspondence is established between the raster cells and the row and column numbers;
[0018] According to the preset protocol, a four-color channel dot matrix segment is generated for each grid cell, and the four-color channel dot matrix segment is associated with the corresponding row number and column number.
[0019] The four-color channel dot matrix fragments under the same row number are spliced together to form channel row dot matrix data, and the four groups of channel row dot matrix data are encapsulated according to the row number to form a four-color channel dot matrix data sequence.
[0020] The present invention is further configured such that writing the four-color channel dot matrix data into the memory to form a print buffer includes:
[0021] The four-channel dot matrix data sequence is segmented into data block sequences according to a preset block length and sent to the main control MCU.
[0022] The main control MCU receives a sequence of data blocks and writes the received data blocks sequentially into the PSRAM to form a continuous print buffer.
[0023] In the print buffer, establish a row-level index relationship for the channel row dot matrix data corresponding to each row number, and associate the row-level index relationship with the total number of rows and the row width parameter to form the buffer description information.
[0024] The present invention is further configured such that reading the four-color channel dot matrix data and driving the printhead to eject includes:
[0025] Collect the displacement information output by the encoder, and determine the current row number to be printed based on the displacement information;
[0026] A four-color pair position confidence parameter is generated based on the encoder pulse count sequence and direction information. A spray permission mark is generated based on the comparison result of the four-color pair position confidence parameter and a preset threshold.
[0027] When the jetting permission mark indicates permission, the corresponding channel row dot matrix data is read from the print buffer according to the row number, the channel row dot matrix data is converted into jetting control data and output to the printhead drive module;
[0028] When the injection permission flag indicates that injection is not allowed, stop outputting injection control data.
[0029] The present invention is further configured such that the execution of time-sharing injection and displacement compensation includes:
[0030] Pre-store nozzle arrangement sequence information and displacement compensation parameters of C, M, Y channel nozzles relative to K channel nozzle;
[0031] For the same row number, when the injection permission mark indicates permission, the injection control data corresponding to the K channel row dot matrix data of that row number is output first according to the nozzle arrangement order;
[0032] When the encoder displacement satisfies the condition that the nozzles of the Y, C, and M channels reach the same target physical position, the injection control data of the Y, C, and M channel row dot matrix data corresponding to the row number is output respectively, so as to complete the time-sharing injection and displacement compensation under the same row number.
[0033] The present invention is further configured such that, in AI mode, the process of collecting voice data from the microphone, and processing and parsing the voice data includes:
[0034] The system acquires the audio data stream output from the microphone and transmits it to the main control MCU via the I2S interface to form audio data to be processed.
[0035] The audio data to be processed is compressed and encoded to obtain compressed audio data, which is then sent to the cloud big model in the established WebSocket session;
[0036] Receive the JSON result returned by the large model in the cloud, parse the JSON result into a structured interactive result, the structured interactive result contains content payload and content type identifier, and establish a connection between the content payload and the subsequent content generation process to be printed.
[0037] The present invention is further configured such that generating the content to be printed based on the parsed structured interaction result includes:
[0038] When the structured interaction result indicates that the content payload is text data, the text data is organized into a content request to be generated and sent to the image generation model over the network. The image data returned by the image generation model is received as the content to be printed.
[0039] When the structured interaction result indicates that the content payload is image data or image data reference, the image data is acquired and decoded to obtain the content to be printed.
[0040] The content to be printed is associated with the layout parameters to form a content data object that can enter the print data processing chain.
[0041] The present invention is further configured such that performing color space conversion, CMYK channel separation, dot matrix calculation, and dot matrix mapping on the content to be printed and writing it into memory to form a print cache includes:
[0042] Perform color space conversion on the content to be printed to obtain the converted image data;
[0043] The converted image data is subjected to monochrome channel separation to obtain four sets of channel data: C, M, Y, and K.
[0044] RIP dot matrix calculation is performed on the four sets of channel data to obtain four-color channel dot matrix data, and printhead drive mapping processing is performed on the four-color channel dot matrix data to obtain mapped dot matrix data;
[0045] The mapped dot matrix data is written into RAM space to form a print cache, and the print cache is associated with the line number.
[0046] This invention also provides a YMCK full-color AI large model-enabled printing pen, the printing pen comprising:
[0047] The system includes a mobile app, a cloud-based large-scale model, a main control MCU, a microphone, an encoder, a power management module, a display screen, a printhead driver module, and a full-color printhead. Among these components:
[0048] The mobile app communicates with the main control MCU.
[0049] The cloud-based large model and the main control MCU establish a WiFi link connection via wireless communication;
[0050] The microphone is connected to the main control MCU for signal transmission.
[0051] The encoder is connected to the main control MCU for signal transmission.
[0052] The main control MCU is connected to the display screen for signal transmission.
[0053] The main control MCU is connected to the printhead drive module via signal connections.
[0054] The printhead driver module is electrically connected to the full-color printhead;
[0055] The power management circuit is connected to the main control MCU, printhead driver module, encoder, display screen, and full-color printhead for power supply.
[0056] This invention provides a printing method and pen powered by a YMCK full-color AI large model. The method involves: acquiring a printable image in print mode; segmenting and stitching the image; performing rasterization to generate a rasterized result; mapping the rasterized result to generate four-color channel dot matrix data; sending the four-color channel dot matrix data in blocks to a main control MCU; the main control MCU writing the four-color channel dot matrix data into a memory to form a print cache; acquiring voice data via microphone in AI mode and transmitting it to the main control MCU via I2S; the main control MCU compressing the voice data, uploading it to a cloud-based large model via WebSocket, receiving and parsing the JSON result returned by the cloud-based large model; generating printable content based on the parsing result; performing color space conversion, CMYK channel separation, dot matrix calculation, and dot matrix mapping on the printable content to generate four-color channel dot matrix data, which is then written into the memory to form a print cache; acquiring encoder displacement information according to instructions; reading the four-channel dot matrix data and driving the print head to eject when the displacement reaches a preset step threshold; and performing time-division ejection and displacement compensation on the four-color channel dot matrix data based on the relative spacing of the four-color nozzles. The resulting beneficial effects include:
[0057] 1. Dot matrix-displacement consistency triggering: Establish the row sequence number encapsulation relationship between the rasterization result and the four-color channel dot matrix data. After the dot matrix data is transmitted in blocks, a print buffer with row-level index is formed on the main control MCU side. When the encoder displacement reaches the step threshold, the corresponding channel row dot matrix data is read according to the row sequence number to keep the injection trigger consistent with the dot matrix row sequence.
[0058] 2. YMCK Time-sharing Alignment and Displacement Compensation: Pre-store nozzle arrangement sequence information and displacement compensation parameters of C, M, and Y channels relative to K channel; K channel injection is triggered according to the arrangement sequence under the same row number, and Y, C, and M channels are triggered respectively when the encoder displacement meets the positioning conditions of each channel, forming a time-sharing injection and displacement compensation link for the same target physical position;
[0059] 3. AI Interaction to Print Cache Closed Loop: Microphone voice is compressed after entering the main control MCU via I2S, uploaded to the cloud large model via WebSocket and the JSON parsing result is received; after the parsing result is converted into the content to be printed, color space conversion, CMYK channel separation, dot calculation and dot matrix mapping are performed to form four-color channel dot matrix data and enter the print cache, so that the AI output and the in-printing link maintain the same data organization form.
[0060] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0061] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0062] Figure 1 A flowchart illustrating a YMCK full-color AI large model-enabled printing method as an exemplary embodiment of the present invention;
[0063] Figure 2 This is a schematic diagram illustrating the structure of a YMCK full-color AI large model-enabled printing pen, as shown in an exemplary embodiment of the present invention. Detailed Implementation
[0064] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.
[0065] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0066] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.
[0067] Example 1:
[0068] A YMCK full-color AI large model-enabled printing method, such as... Figure 1 As shown, it includes:
[0069] In print mode, the image to be printed is acquired, the image to be printed is segmented and stitched together, and then rasterization is performed to generate a raster result;
[0070] The rasterization results are mapped to generate four-color channel dot matrix data.
[0071] The four-color channel dot matrix data is divided into blocks and sent to the main control MCU. The main control MCU writes the four-color channel dot matrix data into the memory to form a print buffer.
[0072] In AI mode, voice data is collected from the microphone and transmitted to the main control MCU via I2S.
[0073] The main control MCU compresses the voice data, uploads it to the cloud-based large model via WebSocket, receives and parses the JSON results returned by the cloud-based large model;
[0074] Based on the analysis results, the content to be printed is generated. Color space conversion, CMYK channel separation, dot calculation and dot matrix mapping are performed on the content to be printed to generate four-color channel dot matrix data, which is written to the memory to form a print cache.
[0075] According to the instructions, the encoder displacement information is collected, and when the displacement reaches the preset step threshold, the four-channel dot matrix data is read and the print head is driven to spray.
[0076] Time-division spraying and displacement compensation are performed on the four-color channel dot matrix data based on the relative spacing of the four-color nozzles.
[0077] The present invention is further configured such that the step of mapping based on the rasterization result to generate four-color channel dot matrix data includes:
[0078] The rasterization results are organized into a sequence of raster cells ordered by the printing direction, with each raster cell corresponding to a row and column number. Specifically, after image segmentation and stitching in printing mode, the mobile device performs rasterization on the image to be printed. The raster size adopts a spatial scale consistent with the line step size corresponding to the printing resolution, ensuring that the raster cells are consistent with the spatial sampling scale of a single line spray. The printing direction follows the pen's sliding direction, and the rasterization results are expanded into a sequential sequence according to a row-first rule. Each row in the sequence corresponds to a line in the sliding direction, and the raster cells within a row are arranged along the nozzle coverage width. The row number increases continuously from the starting row, and the column number increases continuously from the starting column within the same row. Each raster cell carries a fixed row number, column number, and color sampling value in the sequence. The color sampling value is formed by the pixels within the raster cell's coverage area according to a fixed window and fixed interpolation rules, ensuring consistent sampling across different terminal resolutions. By converting the two-dimensional rasterization result into a sequential sequence carrying row and column numbers, the subsequent generation and encapsulation of the dot matrix have a unified row-level indexing basis, which can maintain the consistency of row numbers and order when the data is retrieved by row when the displacement is triggered, thereby reducing the sources of row misalignment from the data organization layer.
[0079] According to a preset protocol, a four-color channel dot matrix segment is generated for each grid cell, and the four-color channel dot matrix segment is associated with the corresponding row number and column number. Specifically, the mobile terminal has a preset dot matrix mapping protocol, which fixes the channel order, position rules, segment length field, segment address field, and segment verification field. The protocol content is consistent with the main control of the printer pen. When traversing the grid cell sequence one by one, the device calibration mapping table is called from the grid cell color sampling value to obtain the four-color channel intensity scale. The calibration mapping table is saved as discrete entries and formed in the factory calibration. The entries cover commonly used color ranges and are output to a fixed scale set to avoid the mapping result from floating with the terminal. Then, in each channel, the corresponding dot template is selected according to the intensity scale. The dot template library is preset in the protocol. The template describes the spray position pattern in the micro-area of the grid cell with a fixed size spray position distribution. The template selection adopts a monotonic mapping from scale to template number, so that the same sampling value generates a consistent spray position pattern on different terminals. After template selection, four-color channel dot matrix fragment records are generated. Each fragment record carries a row number, column number, channel identifier, template number, or the set of spray positions after template expansion. It also carries a fragment sequence marker and a fragment verification marker. The fragment sequence marker, as specified in the protocol, is formed by combining row and column numbers to enable fragment addressability. The fragment verification marker is generated using fixed rules to support fragment integrity verification. By binding row and column positions to channel spray positions through fragment records and introducing addressable and verifiable fields, subsequent block transmission, reassembly, and row-level splicing have a stable basis, maintaining the alignment of four-color channel fragments in the same row and column without relying on complex rearrangements at the end.
[0080] The four-color channel dot matrix fragments under the same row number are spliced to form channel row dot matrix data. The four sets of channel row dot matrix data are then encapsulated according to the row number to form a four-color channel dot matrix data sequence. Specifically, after the four-color channel dot matrix fragments are generated, the mobile device merges the fragment records according to the row number to form a row set, and arranges them in ascending order of column number within the row set to obtain a stable column sequence. During the arrangement process, column number continuity is checked. The continuity check is based on the expected column width of the row. When a column gap occurs, a placeholder fragment is inserted. The placeholder fragment keeps the row number consistent with the missing column number, and the spray position set remains in a non-spray state. At the same time, the gap status is written in the verification mark to keep the subsequent splicing length of the row constant. When a column is duplicated, a conflict resolution is performed. The resolution selects a unique fragment to enter the splicing sequence based on the consistency of the fragment verification mark and the order of the fragment sequence mark. The remaining fragments are discarded and the conflict status is recorded to avoid position drift caused by repeated splicing. After column sequence purification, the four-color channels are spliced together in the row according to column number sequence to form four-channel row dot matrix data. During splicing, the four-color channels advance synchronously to the same column number sequence, ensuring that the row dot matrix of the four channels is aligned at the position boundary. Subsequently, a row encapsulation record is generated for each row. The row encapsulation record carries the row number, row width parameter, four-color channel row dot matrix data, and row-level check mark. The row-level check mark is obtained by aggregating the segment check marks within the row according to the protocol rules. All row encapsulation records are concatenated in ascending order of row number to form a four-color channel dot matrix data sequence, with the row encapsulation record as the smallest addressable unit. The row dot matrix length and column sequence are kept stable through continuous row checking and conflict resolution. The row-level addressable structure is solidified through row encapsulation records, so that when the master control reads a row by displacement trigger, it can directly locate the four-color dot matrix of the same row. Combined with the time-sharing spray scheduling of the relative nozzle spacing, the alignment benchmark of the same row and column can be locked in advance at the data layer, thereby reducing the risk of structural misalignment during time-sharing spray.
[0081] The present invention is further configured such that writing the four-color channel dot matrix data into the memory to form a print buffer includes:
[0082] The four-channel dot matrix data sequence is segmented into data block sequences according to a preset block length and sent to the main control MCU. Specifically, after the mobile terminal generates the four-color channel dot matrix data sequence, it does not send it as a whole packet, but instead performs continuous segmentation of the dot matrix data sequence according to the preset block length. The preset block length is limited by the single effective payload limit of the wireless link and the main control receiving buffer capacity. The block length remains fixed within a single printing task to avoid inconsistent reassembly boundaries on the end side due to different block lengths. During segmentation, continuous data of equal length is taken from the beginning of the dot matrix data sequence as the first data block, and then the second data block of the same length is taken from the next continuous position until the end of the sequence is covered. The part that is not long enough at the end is clearly marked with the last block length field to ensure that the boundary is restored on the end side according to the length field. Each data block carries a task identifier, block sequence number, block length, a starting line number range hint within the block, and a block verification field during encapsulation. The task identifier is generated when printing is initiated on the mobile device and remains unchanged within the task. The block sequence number increments continuously in the sending order. The starting line number range hint within the block is derived from the row encapsulation boundary of the dot matrix sequence and is used by the end side to quickly establish a "block to line interval" mapping. The block verification field is generated by the block content according to fixed rules, which facilitates the end side to identify lost blocks, duplicate blocks, or content corruption. The data block sequence is sent to the main control MCU via Bluetooth or wireless LAN link. The sending order strictly follows the increasing block sequence number. During the sending process, a block sequence number acknowledgment mechanism is retained. If the acknowledgment is not satisfied, the corresponding data block is resent according to the block sequence number. This allows the end side to obtain a set of recombinable, verifiable, and locatable data blocks. This block encapsulation introduces a triple positioning constraint of "task identifier - block sequence number - line interval hint" while maintaining the simplicity of transmission implementation, so that the subsequent cache construction has clear data landing point boundaries.
[0083] The main control MCU receives a sequence of data blocks and writes them sequentially into the PSRAM to form a continuous print buffer. Specifically, after receiving data blocks sent by the mobile terminal via wireless communication, the main control MCU first filters out data blocks that are not part of the current task based on the task identifier, and then writes the data blocks into the receive queue according to their block sequence numbers. The receive queue adopts a write rule that sorts by block sequence number. When the block sequence numbers are not consecutive, gaps are left as placeholders until the missing blocks are filled before advancing the write pointer, avoiding out-of-order overwriting caused by writing directly in the arrival order. For each data block entering the write queue, the block length field and block check field are read first, and length consistency checks and check consistency checks are performed. After the checks are passed, a continuous address segment is allocated in the PSRAM as the write target. The starting address of the continuous address segment is given by the write pointer, which initially points to the starting position of the buffer for this task. After each data block is written, the write pointer is advanced according to the block length, so that the buffer in the PSRAM presents a strictly continuous byte sequence. To avoid inconsistencies caused by the buffer crossing PSRAM page boundaries, a page alignment strategy is adopted during writing. When the write pointer approaches the end of the page, the remaining space is marked as a fill area, and writing continues from the next page. At the same time, the length of the fill area is recorded in the cache description information to ensure that the fill area can be skipped during subsequent line-by-line positioning. Through the process of writing in block sequence order, waiting for gaps, writing after verification, and advancing with page alignment, a continuous print buffer area is formed in PSRAM that is consistent with the block order on the mobile device. This ensures that the print task data is written to the disk in a certain and reproducible order on the device side, reducing cache pollution caused by out-of-order and duplicate data due to wireless fluctuations.
[0084] In the print buffer, a row-level index relationship is established for the channel row matrix data corresponding to each row number. The row-level index relationship is then associated with the total number of rows and the row width parameter to form buffer description information. Specifically, after the main control MCU completes the continuous printing buffer writing, it performs a sequential scan of the buffer to establish the row-level index relationship, based on the convention that the mobile phone's endpoint matrix sequence uses row encapsulation records as the smallest addressing unit. The sequential scan starts from the beginning of the buffer, first reading the row number field and row width parameter field of the row encapsulation record, then reading the length of the corresponding four-channel row matrix data segment, and reading the row-level verification field. The row-level verification field and the row matrix data segment are checked for consistency according to fixed rules. After the check passes, the starting address of the row encapsulation record in the buffer, the total length of the data in that row, and the row number corresponding to that row are written into the row-level index table. The row-level index table is stored in a dedicated area of PSRAM. The entries in the index table are arranged in ascending order of row number, and each entry also records the four-channel data offset for that row. This allows subsequent read triggers to directly jump to the corresponding address based on the row number and retrieve the four-color data for the same row. During sequential scanning, when a page alignment padding marker is encountered, it is skipped based on the padding length to ensure that index building is not disturbed by padding bytes. When row numbers are discontinuous, the missing row is written to a missing row marker table, which is associated with the task identifier for easy display prompts and resending of the corresponding row's data block to the mobile device. After the index table is built, the main control MCU generates cache description information, which includes the task identifier, total number of rows, row width parameter set, row-level index table start address, cache area start address, and cache area total length. This cache description information is associated with the task status record, allowing subsequent encoder displacement triggers to directly locate the row-level index table based on the row number and read the corresponding channel row dot matrix data. By organizing the data through a sequence of row encapsulation scanning, row-level index table construction, missing row marking, and cache description information association, the cache is upgraded from a simple continuous byte area to a print data space with a row-level addressable structure. This allows shift-triggered reading to rely on row index jumps instead of byte-by-byte traversal, maintaining a stable reading path and reducing the risk of misreading under the real-time constraints of handheld printing. At the same time, missing row marking and resending positioning enhance recoverability in scenarios with transmission jitter.
[0085] The present invention is further configured such that reading the four-color channel dot matrix data and driving the printhead to eject includes:
[0086] The encoder output displacement information is collected, and the current row number to be printed is determined based on this displacement information. Specifically, after the printing pen enters the printing state, the main control side reads the transition events of the encoder's two-phase signals within a fixed sampling period, obtains the forward or reverse direction mark based on the phase sequence, and accumulates each transition into the displacement count register. The displacement count register is cleared at the start of the task and is only continuously accumulated within the same task, without being reused across tasks. Displacement conversion uses a pre-stored encoder calibration ratio, which is obtained from factory calibration and reflects the number of effective pulses per unit length. The conversion process is completed by multiplying the count increment by the unit length increment, and the displacement value is maintained in the displacement register as either monotonically increasing or monotonically decreasing. The row number is determined using the same step threshold strategy as the dot matrix buffer. The step threshold is given in the task description information and represents the displacement interval between two adjacent printing lines. Each time the displacement value crosses a step threshold, the row number is incremented. The row number increment uses a latching method, and the row number remains unchanged when the threshold is not crossed. When a reverse direction marker appears, the row number update enters a frozen state. The frozen state continues until the direction marker returns to the positive direction and remains stable, thus preventing the handheld back action from triggering an incorrect row number. Through the link of phase direction determination, count accumulation, calibration conversion, threshold crossing latch, and back-back freezing, the row number is kept consistent with the actual sliding displacement, and the back-back segment is removed from the row number advancement link, providing a stable row number reference for subsequent alignment and injection gating.
[0087] Four-color position confidence parameters are generated based on the encoder pulse count sequence and direction information. A spray permission flag is generated based on the comparison between the four-color position confidence parameters and a preset threshold. Specifically, as the encoder event stream continuously arrives, the master control side maintains the pulse interval sequence and direction sequence within a sliding window. The sliding window length is given by the task description information and is calculated based on the number of pulses, balancing real-time performance and robustness. The pulse interval sequence is obtained from the timestamp difference between two adjacent transition events. The timestamps are captured by the master control timer, and the timestamp resolution matches the sampling period. When performing consistency evaluation on the pulse interval sequence, a robust evaluation method based on quantile thresholds is adopted: first, the reference interval value of the interval sequence within the window is obtained; then, the deviation of each interval from the reference interval is calculated; and the deviation is used to suppress the dominance of extreme jitter pulses through bounded influence rules, ensuring that occasional jitter does not directly trigger a global spray ban. The consistency evaluation of the direction sequence uses a reverse pulse ratio check; if the reverse pulse ratio exceeds a limit, the direction is considered unstable. The interval consistency assessment results and the direction consistency assessment results are combined into a four-color pair position reliability parameter. The value range of this parameter is limited to a closed interval from completely unreliable to completely reliable, and an initial reliable state is written at the start of the task. Subsequently, the four-color pair position reliability parameter is compared with a preset threshold, which is given by the task description information and is configured to match the print resolution, nozzle spacing, and encoder resolution. The comparison result generates a jetting allow flag, which is a binary flag, with the allowed and prohibited states mutually exclusive. The flag is refreshed once in each sliding window update cycle. Through the link of sliding window, quantile robust consistency assessment, bounded influence suppression, direction proportion verification, and threshold comparison to generate binary flags, the displacement measurement quality is explicitly transformed into a jetting gating condition. This makes the jetting control no longer rely solely on the single condition that the displacement reaches the threshold, reducing the risk of four-color alignment mismatch caused by sliding jitter or sudden changes in direction.
[0088] When the jetting enable flag indicates permission, the corresponding channel row dot matrix data is read from the print buffer according to the row number. This channel row dot matrix data is then converted into jetting control data and output to the printhead driver module. Specifically, after the jetting enable flag enters the enabled state, the main control side accesses the row-level index table in the print buffer based on the current row number. The row-level index table provides the starting address and entry width in the buffer description information, and the index table entries contain the mapping relationship from row number to buffer offset. After locating the corresponding entry based on the row number, the starting address of that row in the buffer and the channel row dot matrix length information of that row are retrieved. Then, the channel row dot matrix data of that row is continuously read from the buffer. The channel row dot matrix data is arranged in channel order, which is consistent with the channel wiring order of the printhead driver circuit. After reading, the jetting control conversion process begins. The injection control conversion does not change the spatial order of the dot matrix; it only performs electrical interface formatting, rearranging the bit and byte order into the shift register loading sequence required by the drive circuit. Simultaneously, it writes the trigger timing information corresponding to that row into the drive timing register, enabling the drive circuit to generate the nozzle drive waveform within a specified pulse width upon receiving the loading sequence. After loading is complete, the drive enable signal is set, and the injection trigger signal is latched and bound to the current row number, preventing cross-row mixing caused by row number changes during injection. Through a chain of row-level index positioning, continuous cache reading, consistent channel order, interface formatting rearrangement, and trigger timing latch binding, the data reading and drive output during injection form a single-row closed loop, ensuring that each injection strictly corresponds to the same row number of the channel dot matrix.
[0089] When the injection permission flag indicates that injection is not allowed, the output of injection control data is stopped. Specifically, after the injection permission flag enters the prohibited state, the master control side resets the drive enable signal and keeps the injection trigger signal in an invalid state. At the same time, the current row sequence number latch value is not advanced to avoid buffer read advance caused by advancing the row number in the unreliable displacement segment. To ensure that no residual injection is generated in the prohibited state, the injection control conversion process stops loading new shift register data into the drive circuit and performs a clearing operation on the waiting queue of the drive circuit, so that the residual data of the previous row will not be mistakenly triggered when the permitted state is restored next time. The prohibited state release condition adopts the same window update mechanism as the second step. When the four-color pair position confidence parameter recovers to more than the threshold and continues to meet the stable number requirement, the injection permission flag switches back to the permitted state, and then continues to perform reading and output according to the current row sequence number. By driving the enable reset, trigger invalidation hold, row number latch freeze, waiting queue clearing, and stable number unlocking links, the spray restriction segment and spray segment are strictly isolated on the control plane to avoid intermittent mis-spraying caused by boundary jitter, and to maintain the pattern row sequence continuity by starting from the correct row number when spraying resumes.
[0090] The present invention is further configured such that the execution of time-sharing injection and displacement compensation includes:
[0091] The system pre-stores nozzle arrangement sequence information and displacement compensation parameters for the C, M, and Y channel nozzles relative to the K channel nozzle. Specifically, during the factory configuration phase with the printhead, the nozzle arrangement sequence is fixed as a device parameter. The nozzle arrangement sequence is expressed as the channel order, written into the task configuration area on the main control side, and loaded into the jet scheduling register at the start of each print job. The displacement compensation parameters are expressed as the structural distance between the channel and the reference channel. The reference channel is the position of the black channel nozzle, and other channels are configured with corresponding relative distance parameters. The relative distance parameters are obtained from the printhead structure drawings and post-assembly calibration. The calibration process uses standard test strips printed at a fixed sliding speed. The structural distance compensation value is calculated by back-calculating the alignment offset of each channel's test strip. The compensation value is written into non-volatile storage and bound to the printhead serial number to avoid mismatch of compensation parameters after printhead replacement. To adapt to different print resolutions, the compensation parameters are saved simultaneously in physical distance form and grid step count form. At the start of the job, the corresponding form is selected according to the current resolution and written into the scheduling register, so that subsequent positioning determination is performed directly under a unified displacement scale. By solidifying the nozzle arrangement sequence and the relative distance compensation value between channels as device-level parameters and binding them to the printhead serial number, time-sharing jetting scheduling has a reproducible source of structural constraints, avoiding uncontrollable channel alignment caused by relying solely on experience delays;
[0092] For the same row number, when the spray allow flag indicates permission, the spray control data corresponding to the K-channel row dot matrix data of that row number is output first according to the nozzle arrangement order. Specifically, after entering the printing process, when the spray allow flag is in the allowed state, the main control side locates the corresponding four-channel row dot matrix data of that row from the row-level index table based on the current row number, and loads the four-channel row dot matrix data into the channel buffer. The channel buffer remains unchanged within one row processing cycle until all four colors of that row are sprayed. The spray scheduling register reads the nozzle arrangement order information, in which the black channel is configured as the first trigger channel. After the displacement trigger reaches the reference trigger position of that row, the main control side first retrieves the black channel row dot matrix data from the channel buffer, converts it into a spray control sequence that the drive circuit can recognize, and loads it into the drive shift register link. Then, the trigger enable signal of the black channel is set, keeping the trigger pulse width consistent with the spray energy configuration. After the black channel trigger is completed, the status of the black channel of that row is marked as completed, while keeping the same row number latch unchanged, so that subsequent color channel triggers still refer to the channel buffer data under the same row number. By using a processing method of loading row data once under the same row number, prioritizing black channel triggering, and locking and maintaining row number, the timing reference of time-sharing injection is fixed at the black channel trigger point, reducing the risk of cross-row mis-injection caused by repeated data retrieval or row number drift between channels.
[0093] When the encoder displacement satisfies the condition that the nozzles of the Y, C, and M channels reach the same target physical position, the injection control data of the row dot matrix data of the Y, C, and M channels corresponding to the row number is output respectively, completing the time-sharing injection and displacement compensation under the same row number. Specifically, after the black channel is triggered, the main control side enters the position waiting stage of the color channel under the same row number. The position waiting uses the encoder displacement information as the sole ruler. The displacement information comes from the displacement register value after encoder pulse accumulation and direction discrimination. The displacement register value is continuously updated during the color waiting stage. The main control side reads the displacement compensation parameters of the yellow, cyan, and magenta channels relative to the black channel in the scheduling register area, and writes the target position condition of each channel into the channel position threshold register area. The threshold is expressed as a comparison relationship of "the current displacement exceeds the black trigger displacement plus the compensation distance of the channel". The color channel trigger adopts a single-channel independent gating strategy. Each channel is set with an independent position flag. The position flag is obtained by comparing the displacement register value with the corresponding threshold. When the comparison result is satisfied, the position flag of the channel is set and the injection of the channel is triggered once. When triggered, data is still retrieved from the channel buffer of the same row number without re-accessing the buffer. The yellow channel is triggered first when its position marker is in place, followed by the cyan channel and then the magenta channel. After each channel is triggered, the channel completion marker is set, and completed channels are not triggered again. If the spray allow flag turns to a prohibited state during the waiting phase, the position gating of the colored channels is frozen, and the channel completion marker is maintained. After the spray allow flag is restored, the position comparison continues based on the current displacement register value, without reverting to the trigger state of the black channel, thus avoiding repeated spraying of the same row number. By converting the structural distance compensation value into a channel position threshold and using the channel buffer of the same row number as a unified data source, the colored channel spraying is aligned to the same target physical position within the displacement domain, realizing time-sharing spraying and displacement compensation under the same row number, while maintaining consistency among triggering conditions, data references, and status markers, reducing the disturbance of handheld speed fluctuations to the alignment consistency of multiple channels.
[0094] The present invention is further configured such that, in AI mode, the process of collecting voice data from the microphone, and processing and parsing the voice data includes:
[0095] The system acquires the audio data stream output from the microphone and transmits it to the main control MCU via the I2S interface to form audio data to be processed. Specifically, after the pen enters AI mode, the microphone outputs a continuous audio signal under stable power supply from the power management circuit. The audio front end performs bandwidth limiting and gain tuning on the audio signal to ensure that the audio band covers the frequency range of commonly used commands and avoids overload clipping. After the main control side starts the audio acquisition session, it configures the sampling rate, quantization accuracy, and number of channels to the audio interface. The sampling rate and quantization accuracy are saved in the device firmware using a task configuration record, which is associated with the current AI session identifier to ensure consistent acquisition conditions within the same session. After sampling, the audio signal forms a continuous audio sample stream. The sample stream is divided into frames with a fixed frame length. The frame length uses a millisecond-level time window to balance real-time performance and encoding efficiency. The frame boundary is triggered by the main control timer. Each frame is encapsulated as an audio frame with a frame number in the I2S link. The frame number is generated by an incrementing counter within the session. The I2S clock and word strobe signal are provided by the main control side to ensure that the samples within the frame are transmitted at a fixed beat. The master control side extracts the sample payload of each frame during I2S receive interruption and writes it into a circular buffer. The capacity of the circular buffer covers several frames to cope with network transmission jitter. The buffer write pointer advances with the arrival of frames, and the read pointer serves the subsequent compression encoding process. Through conversational acquisition configuration, timed framing, frame sequence number encapsulation, I2S synchronous transmission, and a circular buffer-connected link, the voice data is formed at the end side into audio data to be processed with time order and traceable boundaries, avoiding semantic truncation or frame misordering caused by timing inconsistencies between the acquisition side and the network side.
[0096] The audio data to be processed is compressed and encoded to obtain compressed audio data. This compressed audio data is then sent to the cloud-based large model within an established WebSocket session. Specifically, the main control side retrieves the audio frames to be processed from the circular buffer in sequence according to their frame numbers. It first performs silence segment recognition and frame-level energy threshold verification. The energy threshold is provided by the device's default configuration and is used to filter out long periods without speech to reduce invalid upload load. The recognition result is written to a frame attribute tag, which enters the encoding queue along with the frame. The encoding queue adopts a frame number queuing strategy. When a frame number gap is encountered, it waits until the gap is filled by a subsequent frame or the timeout threshold is exceeded. The timeout threshold is provided by the session configuration record to ensure that the encoding side does not experience out-of-order issues due to missing frames. The compressed encoding uses a preset speech encoding method, which is saved in the firmware as an encoding configuration record. The encoding configuration record includes the target bitrate, frame length matching mode, and error correction switch. The encoded output forms a compressed audio frame. Each compressed audio frame is encapsulated as a WebSocket binary message before transmission. The message header carries a session identifier, frame sequence number, timestamp, and encoding configuration version identifier. The session identifier is generated by the master controller at the start of AI mode, and the encoding configuration version identifier corresponds to the encoding parameter version in the firmware, facilitating consistent decoding strategy processing by the cloud. The WebSocket session is first established through a handshake on the master controller side, carrying the device identifier and session identifier, enabling the cloud to bind the audio stream to a unique session context. After the session is established, compressed audio frames are sent incrementally according to the frame sequence number, and frame-level acknowledgment flags returned by the cloud are received. The acknowledgment flags are associated with the frame sequence number and stored in an acknowledgment table, which is used to identify lost frames and drive retransmission. The retransmission strategy adopts selective retransmission based on frame sequence number. The number of retransmissions and the retransmission window are given by the session configuration record. Once the retransmission limit is reached, the frame is marked as an unrecoverable frame and recorded in the session state. By using a link that employs silence threshold filtering, frame sequence number queuing, encoding configuration version locking, session identifier binding, and acknowledgment table-driven selective retransmission, the uploaded voice stream is kept orderly, acknowledgable, and traceable. The cloud-based large model obtains stable voice context input, reducing the impact of network jitter on semantic understanding consistency.
[0097] The system receives JSON results returned by a large cloud-based model and parses them into structured interactive results. These structured results include content payloads and content type identifiers. The content payloads are linked to the subsequent content generation process. Specifically, after completing semantic understanding, the large cloud-based model returns JSON text via WebSocket. The main control side retrieves the JSON text according to message boundaries in the receiving thread and writes it to the result buffer. The result buffer is associated with a session identifier to prevent concurrent session interference. During the parsing phase, a JSON syntax integrity check is performed first. After successful check, the field extraction process begins. Field extraction uses pre-defined field templates, which are saved in the firmware as parsing template records. These records specify field names, field types, and mandatory field constraints. The parsing process strictly follows the template extraction to avoid arbitrary field expansions that could cause uncertainty in client-side processing. The extracted structured interactive results contain at least content type identifiers, content payloads, and layout constraint information. Content type identifiers are limited to enumerated values within a pre-defined set. Content payloads are expressed as strings, encoded image references, or encoded image data. Layout constraint information includes print width, line break rules, and font selection identifiers. To ensure a definite binding between the content payload and the subsequent content generation process, the master control side writes the structured interaction results into the session result table. The session result table uses the session identifier as the primary key and the result sequence number as the secondary key, with the result sequence number incrementing in arrival order. Simultaneously, a generation task record is generated. This record maps the content type identifier to the processing branch identifier of the content generation process, points the storage location of the content payload to the corresponding segment in the result buffer, and writes the layout constraint information into the generation parameter area. The generation task record then enters the print generation queue, which is scheduled according to the result sequence number, ensuring that multiple rounds of instructions within the same session are processed in an orderly manner. Through a chain of templated parsing, enumerated content types, persistent association with the session result table, branch mapping of generation task records, and queued scheduling, the JSON result is transformed from text into a structured interaction result and obtains an executable process assignment relationship. This provides a traceable data entry point for subsequent color processing, channel separation, and dot mapping, while constraining the uncertainty of cloud output within the scope of the client-side template and enumeration, improving the controllability and reproducibility of the interaction-to-printing chain.
[0098] The present invention is further configured such that generating the content to be printed based on the parsed structured interaction result includes:
[0099] When the structured interaction result indicates that the content payload is text data, the text data is organized into a content request to be generated and sent to the image generation model over the network. The image data returned by the image generation model is then received as the content to be printed. Specifically, after obtaining the structured interaction result, the master control side first reads the content type identifier and enters the text branch. The entry conditions for the text branch are limited by an enumeration mapping table in the firmware to avoid mixing text and non-text types. After entering the text branch, normalization processing is performed on the text data in the content payload. Normalization processing includes character encoding unification, control character removal, continuous whitespace compression, and sensitive delimiter escaping to maintain the structural stability of the text in the network request payload. At the same time, windowed pruning is performed on the text length. The pruning strategy is constrained by the maximum number of characters that can be carried in the layout parameters. When the constraint is exceeded, the first part of the main text is retained and the remaining content is written to the extended field. The extended field can be reused in subsequent rounds of generation to avoid the generation result becoming uncontrollable due to an excessively long request. The standardized text data is then organized into a content request to be generated. This request uses a fixed field structure, including a session identifier, result sequence number, text prompt, desired aspect ratio, target output resolution, and style control. The session identifier and result sequence number are derived from the preceding parsing link. The desired aspect ratio and target output resolution are derived from layout parameters, based on the effective width of the print head and the expected print length. The style control field is obtained by merging the style tags from the structured interaction results with the device's default style table. The content request is sent to the image generation model over the network. The network transmission uses a different service endpoint identifier than the cloud-based model. This endpoint identifier is pre-configured in the firmware and bound to the certificate verification policy to prevent incorrect routing. After transmission, a request waiting table is maintained on the main control side. This table records the session identifier, result sequence number, transmission time, and timeout threshold, which is provided by the network configuration. When image data is received from the image generation model before the timeout, the image data is written to the image buffer and associated with the session identifier and result sequence number. This image data is then registered as content to be printed. By normalizing text, windowing length, fixing the field request structure, deriving resolution and proportion from layout constraints, and managing timeouts through a waiting table, the text-to-image generation process has traceable parameter sources and a consistent request structure, reducing generation instability caused by text noise and network fluctuations, and ensuring that the generated image naturally meets the constraints of the subsequent printing canvas.
[0100] When the structured interaction result indicates that the content payload is image data or image data reference, the image data is acquired and decoded to obtain the content to be printed. Specifically, the main control side reads the content type identifier to enter the image branch, and the entry conditions for the image branch are also limited by the enumeration mapping table. When the content payload is image data, the payload encoding format is first identified. The identification rules are given by the decoding configuration record, which lists the supported compression format identifiers. After successful identification, the image data is written to the decoding input buffer, and the upper limit of image size, expected color channel format, and decoding timeout threshold are written to the decoding task record. When the content payload is an image reference, the reference field is first parsed to obtain the resource location information, which includes the resource address, access token identifier, and validity period identifier. The access token identifier is provided by the session configuration record. Subsequently, the image resource is retrieved from the network and written to the decoding input buffer. The retrieval process adopts a segmented reception and integrity check strategy. The integrity check is based on the consistency between the resource length field and the segment sequence number. If the check fails, the retrieval process is initiated, and the number of retrievals is limited by the network configuration record. During the decoding phase, the main control side calls the image decoding library to expand the compressed data into a pixel canvas. The version identifier of the decoding library is fixed in the firmware, and the decoding result is output in a unified pixel format, consistent with the subsequent color space conversion link. After decoding, size adjustment is performed. Size adjustment uses the canvas width, canvas height, and margin constraints in the layout parameters to scale the decoded image while maintaining proportions and crop the boundaries, so that the output image fits the effective spray width of the print head. During the adjustment process, a key area strategy is retained. The key area strategy is given by the main area field in the structured interaction result. If the main area field does not exist, a centering strategy is used. Through the link of format recognition, reference parsing and retrieval, segment integrity verification, unified pixel format decoding, and size adjustment under layout constraints, the image payload, whether from direct data or referenced resources, can converge into a unified canvas expression, avoiding format forks and canvas size inconsistencies in the subsequent dot matrix generation link.
[0101] The content to be printed is associated with layout parameters to form a content data object that can enter the print data processing chain. Specifically, regardless of whether it comes from text-to-image generation or image decoding, the master control side enters a unified encapsulation stage after obtaining the canvas. The encapsulation stage establishes a strong binding between the canvas data and layout parameters. Layout parameters include print direction identifier, target print width, target print length, travel direction boundary, resolution level identifier, and line step level identifier. The target print width comes from the effective jet width of the print head, the target print length comes from the length field in the structured interaction result or the device's default length table, and the resolution level and line step level are determined by the current print mode configuration. The master control side generates the content data object to be printed, which includes a pointer to the canvas data storage location, a canvas pixel format identifier, a set of layout parameters, a session identifier, a result sequence number, and a content type identifier. Simultaneously, a data object verification flag is generated. This flag is obtained by aggregating the canvas data and layout parameter fields according to fixed rules and is used in subsequent processing to identify whether the object has been tampered with or misused. The data object to be printed enters the print data processing queue, which is scheduled according to the result sequence number. During scheduling, layout parameters are passed to the color space conversion, channel separation, dot matrix and dot matrix mapping stages, ensuring that the line width, number of lines, and step spacing of subsequent dot matrix generation are completed under the same parameter set constraints. Through a unified canvas convergence, strong binding of layout parameters, object-oriented encapsulation, object verification marking, and queued scheduling parameter passing, the AI interactive output enters the print processing chain in the form of standardized data objects. This ensures that different content sources have consistent size, orientation, and resolution constraints before entering dot matrix mapping, improving the reproducibility and reviewability of edge processing. At the same time, layout control is elevated from temporary processing to object fields, enhancing the traceability structure of the accompanying print job.
[0102] The present invention is further configured such that performing color space conversion, CMYK channel separation, dot matrix calculation, and dot matrix mapping on the content to be printed and writing it into memory to form a print cache includes:
[0103] The process involves color space conversion of the content to be printed to obtain the converted image data. Specifically, after receiving the data object, the main control unit first reads the canvas pixel format identifier and the resolution level identifier in the layout parameters. The resolution level identifier limits the sampling density of subsequent processing, preventing uncontrollable buffer generation delays caused by directly processing all pixels at high resolution. During the color space conversion stage, the device-calibrated color conversion configuration is invoked. This configuration is stored in the firmware resource area as a lookup table, obtained by calibrating the printhead, ink, and media combination. The table entries cover commonly used brightness and saturation ranges and are output to the device's working color gamut. The conversion process traverses the canvas data pixel by pixel, mapping the original color value of each pixel to a three-channel color value in the working color gamut. The traversal order follows a row-priority order consistent with the subsequent rasterization direction, ensuring that the processing output and subsequent row number generation are in the same direction. To avoid abrupt changes in channel output caused by extremely bright or dark pixels, the conversion stage performs range cropping and transition smoothing after the lookup table output. The cropping threshold and smoothing intensity are derived from the calibration configuration record, which is bound to the device serial number to ensure output consistency across different devices. The converted image data is stored in a conversion buffer, which is associated with the session identifier and result sequence number to prevent concurrent tasks from overwriting it. Simultaneously, a conversion version identifier is generated, recording the lookup table version number and resolution level number for traceability of subsequent cached description information. Through calibration lookup table mapping, row-first traversal, range cropping and smoothing, and version identifier binding, the content to be printed is uniformly converted to a device-controllable color gamut, reducing the impact of terminal color gamut differences on subsequent channel separation and providing reproducible version constraints for color processing.
[0104] The converted image data undergoes monochrome channel separation to obtain four sets of channel data: C, M, Y, and K. Specifically, the main control side reads the converted image data from the conversion buffer and enters the channel separation stage. Channel separation invokes the device-calibrated channel separation configuration, which is stored as a combination of a discrete mapping table and a substitution strategy table. The discrete mapping table maps color values under the working color gamut to the basic ink volume scale of each channel. The substitution strategy table provides segmentation rules for the participation of the black channel, prioritizing the use of the black channel to carry density in dark areas and the color channels to carry hue. The separation process is pixel-level. For each pixel, the basic scale of the four color channels is first obtained according to the discrete mapping table. Then, the black channel scale is adjusted according to the substitution strategy table, and the corresponding color channel scale is simultaneously recycled. The recycling rule is constrained by maintaining hue stability to avoid sudden increases in a single channel. The separated four-color channel data is stored in channel plane form. Each channel plane is the same size as the canvas, and each position within the channel plane stores the ink volume scale for that position. The value range of the ink volume scale is limited to a fixed set of levels in the configuration, allowing subsequent dot template selection to use finite state mapping instead of real-time floating calculation. After the channel plane is generated, it is arranged in channel order within the channel buffer. The channel order is independent of the nozzle arrangement order and is fixed to the four-color logical order. The order adaptation is performed in the subsequent driving mapping stage. Through the processing method of discrete mapping table plus substitution strategy table, scale level set, and channel plane storage, continuous color values are transformed into stable four-color channel scale expressions, providing indexable and templateable input for subsequent dot calculations and reducing the uncertainty of edge processing.
[0105] RIP dot matrix calculations are performed on the four sets of channel data to obtain four-color channel dot matrix data. Printhead driver mapping is then performed on the four-color channel dot matrix data to obtain mapped dot matrix data. Specifically, after the main control side enters the dot matrix stage, it reads the resolution level identifier and media type identifier from the layout parameters. The media type identifier is used to select the dot matrix strategy table, which is preset in the firmware and provides different dot shape template libraries and threshold matrix libraries for different media ink absorption characteristics. Dot matrix calculations are implemented using the RIP dot matrix method. RIP dot matrix is implemented on the end side using a lookup table method from scale to dot shape template. It does not generate dot distribution through real-time random jitter, but instead reads the ink volume scale for each channel plane position, selects the corresponding dot shape template, and then expands the dot shape template to the micro-area dot matrix at that position. To prevent adjacent templates from repeatedly introducing stripes, a row-level phase offset table is maintained during the dot placement phase. This table changes with the row number, applying periodic offsets to the threshold matrix or the template's starting position. The offset rules are given by the dot placement strategy table. The offset only changes the template alignment starting point, not the template itself, thus reducing regular texture while maintaining reproducibility. After dot placement for each of the four color channels, four-color channel dot matrix data is obtained. This data is saved in bitmap format, with bits as the smallest unit, arranged in row-priority order. The printhead driver mapping process then reads the printhead driver configuration record, which includes the nozzle physical arrangement and electrical channel wiring sequence, a nozzle disable table, and a nozzle compensation table. The nozzle disable table is updated when bad pixels are detected, and the nozzle compensation table is generated during calibration. The driver mapping process rearranges the bit and byte order of the logical dot matrix to the loading sequence required by the driver shift register link, and masks corresponding bits according to the nozzle disable table. Simultaneously, it assigns alternative spray positions to adjacent nozzles according to the nozzle compensation table. The substitution rules are limited to adjacent substitutions within the same channel in the configuration to avoid color shift introduced by cross-channel substitutions. The mapped dot matrix data is output to the mapping buffer, which is organized by row encapsulation records, laying the structural foundation for subsequent cache row-level indexing. Through a combination of scale templated RIP dot placement, row-level phase offset texture suppression, drive rearrangement with bad pixel masking and proximity substitution, the dot matrix generation is made both reproducible by the device and adaptable to the actual nozzle state of the printhead, improving the consistency between the generated dot matrix and the actual spraying.
[0106] The mapped dot matrix data is written into RAM to form a print buffer, and the print buffer is associated with the row sequence number. Specifically, the master controller moves the row encapsulation records in the mapping buffer to the RAM buffer in ascending order of row sequence number. At the start of the task, the RAM buffer is divided into independent segments according to the task identifier. The segment start address and segment length are written into the cache management table, which is maintained by the master controller to avoid multi-task overwriting. During the writing process, the boundaries of the row encapsulation records are kept intact. The row encapsulation record contains a row sequence number field, a row width field, a four-color channel mapped dot matrix data segment, and a row check field. The row check field is used to quickly check whether the row data has been overwritten during subsequent readings. After the writing is completed, a row-level index table is generated in RAM. The row-level index table uses the row sequence number as the index key, and the table entries record the start address and length information of the row encapsulation record in the buffer. The row-level index table is associated with the task identifier and stored, so that the row sequence number obtained by encoder displacement can be directly looked up in the table to locate the corresponding row dot matrix. To support real-time reading during the sliding process, the row-level index table adopts a contiguous memory layout, with entries arranged in row sequence and the total number of rows and row width parameters recorded in the table header. This allows the read side to trigger a task termination state when data goes out of bounds. Through the organization of row encapsulation to maintain record boundaries, task segment isolation, contiguous layout of the row-level index table, and constraints on the total number of rows and row width in the table header, the print cache has a stable row-addressable structure. The shift triggering link can read the corresponding dot matrix data using the row sequence number as a unique index and enter the jetting schedule, reducing the risk of random memory scanning and mis-references.
[0107] Example 2:
[0108] Please see Figure 2 This exemplary YMCK full-color AI large model-enabled printing pen includes:
[0109] The system includes a mobile app, a cloud-based large-scale model, a main control MCU, a microphone, an encoder, a power management module, a display screen, a printhead driver module, and a full-color printhead. Among these components:
[0110] The mobile app communicates with the main control MCU.
[0111] The cloud-based large model and the main control MCU establish a WiFi link connection via wireless communication;
[0112] The microphone is connected to the main control MCU for signal transmission.
[0113] The encoder is connected to the main control MCU for signal transmission.
[0114] The main control MCU is connected to the display screen for signal transmission.
[0115] The main control MCU is connected to the printhead drive module via signal connections.
[0116] The printhead driver module is electrically connected to the full-color printhead;
[0117] The power management circuit is connected to the main control MCU, printhead driver module, encoder, display screen, and full-color printhead for power supply.
[0118] It should be noted that the YMCK full-color AI large model-enabled printing pen provided in the above embodiments and the YMCK full-color AI large model-enabled printing method provided in the above embodiments belong to the same concept. The specific ways in which each module and unit performs operations have been described in detail in the method embodiments, and will not be repeated here. In practical applications, the YMCK full-color AI large model-enabled printing pen provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the printing pen can be divided into different functional modules to complete all or part of the functions described above, and this is not a limitation here.
[0119] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A printing method empowered by a YMCK full-color AI large model, characterized in that, include: In print mode, the image to be printed is acquired, the image to be printed is segmented and stitched together, and then rasterization is performed to generate a raster result; Mapping the rasterization results to generate four-color channel dot matrix data; this mapping process includes: organizing the rasterization results into a sequence of raster cells ordered by printing direction, establishing a correspondence between the raster cells and row and column numbers; generating four-color channel dot matrix segments for each raster cell according to a preset protocol, associating the four-color channel dot matrix segments with their corresponding row and column numbers; splicing the four-color channel dot matrix segments under the same row number to form channel row dot matrix data; and encapsulating the four sets of channel row dot matrix data according to row numbers to form a four-color channel dot matrix data sequence. The four-color channel dot matrix data is divided into blocks and sent to the main control MCU. The main control MCU writes the four-color channel dot matrix data into the memory to form a print buffer. The system acquires encoder displacement information according to the start command, and reads four-channel dot matrix data and drives the print head to spray when the displacement reaches a preset step threshold. Reading four-channel dot matrix data and driving the print head to spray includes: acquiring encoder output displacement information; determining the current row number to be printed based on the displacement information; generating four-color pair position reliability parameters based on the encoder pulse count sequence and direction information; generating a spray permission marker based on the comparison result of the four-color pair position reliability parameters and a preset threshold; and when the spray permission marker indicates permission, reading the corresponding channel row dot matrix data from the print buffer according to the row number, converting the channel row dot matrix data into spray control data, and outputting it to the print head drive module. When the injection permission flag indicates that injection is not permitted, stop outputting injection control data. Time-division spraying and displacement compensation are performed on the four-color channel dot matrix data based on the relative spacing of the four-color nozzles.
2. The printing method for YMCK full-color AI large model empowerment according to claim 1, characterized in that, Also includes: In AI mode, voice data is collected from the microphone and transmitted to the main control MCU via I2S. The main control MCU compresses the voice data, uploads it to the cloud-based large model via WebSocket, receives and parses the JSON results returned by the cloud-based large model; Based on the analysis results, the content to be printed is generated. Color space conversion, CMYK channel separation, dot calculation and dot matrix mapping are performed on the content to be printed to generate four-color channel dot matrix data, which is written to the memory to form a print cache. The encoder displacement information is collected according to the print trigger command. When the displacement reaches the preset step threshold, the corresponding dot matrix data is read and the print head is driven to spray. Time-division spraying and displacement compensation are performed on the four-color channel dot matrix data based on the relative spacing of the four-color nozzles.
3. The printing method for YMCK full-color AI large model empowerment according to claim 1, characterized in that, Writing the four-color channel dot matrix data into memory to form the print buffer includes: The four-channel dot matrix data sequence is segmented into data block sequences according to a preset block length and sent to the main control MCU. The main control MCU receives a sequence of data blocks and writes the received data blocks sequentially into the PSRAM to form a continuous print buffer. In the print buffer, establish a row-level index relationship for the channel row dot matrix data corresponding to each row number, and associate the row-level index relationship with the total number of rows and the row width parameter to form the buffer description information.
4. The printing method for YMCK full-color AI large model empowerment according to claim 1, characterized in that, The execution of time-sharing injection and displacement compensation includes: Pre-store nozzle arrangement sequence information and displacement compensation parameters of C, M, Y channel nozzles relative to K channel nozzle; For the same row number, when the injection permission mark indicates permission, the injection control data corresponding to the K channel row dot matrix data of that row number is output first according to the nozzle arrangement order; When the encoder displacement satisfies the condition that the nozzles of the Y, C, and M channels reach the same target physical position, the injection control data of the Y, C, and M channel row dot matrix data corresponding to the row number is output respectively, so as to complete the time-sharing injection and displacement compensation under the same row number.
5. The printing method for YMCK full-color AI large model empowerment according to claim 2, characterized in that, In AI mode, voice data is collected from the microphone, and the voice data is processed and parsed, including: The system acquires the audio data stream output from the microphone and transmits it to the main control MCU via the I2S interface to form audio data to be processed. The audio data to be processed is compressed and encoded to obtain compressed audio data, which is then sent to the cloud big model in the established WebSocket session; Receive the JSON result returned by the large model in the cloud, parse the JSON result into a structured interactive result, the structured interactive result contains content payload and content type identifier, and establish a connection between the content payload and the subsequent content generation process to be printed.
6. The printing method for YMCK full-color AI large model empowerment according to claim 5, characterized in that, The content to be printed is generated based on the structured interaction results obtained from the parsing, including: When the structured interaction result indicates that the content payload is text data, the text data is organized into a content request to be generated and sent to the image generation model over the network. The image data returned by the image generation model is received as the content to be printed. When the structured interaction result indicates that the content payload is image data or image data reference, the image data is acquired and decoded to obtain the content to be printed. The content to be printed is associated with the layout parameters to form a content data object that can enter the print data processing chain.
7. The printing method for YMCK full-color AI large model empowerment according to claim 6, characterized in that, The process of performing color space conversion, CMYK channel separation, dot matrix calculation, and dot matrix mapping on the printed content, and then writing it to memory to form a print buffer, includes: Perform color space conversion on the content to be printed to obtain the converted image data; The converted image data is subjected to monochrome channel separation to obtain four sets of channel data: C, M, Y, and K. RIP dot matrix calculation is performed on the four sets of channel data to obtain four-color channel dot matrix data, and printhead drive mapping processing is performed on the four-color channel dot matrix data to obtain mapped dot matrix data; The mapped dot matrix data is written into RAM space to form a print cache, and the print cache is associated with the line number.
8. A YMCK full-color AI large model-enabled printing pen, used to implement the YMCK full-color AI large model-enabled printing method according to any one of claims 1-7, characterized in that, include: The system includes a mobile app, a cloud-based large-scale model, a main control MCU, a microphone, an encoder, a power management module, a display screen, a printhead driver module, and a full-color printhead. Among these components: The mobile app communicates with the main control MCU. The cloud-based large model and the main control MCU establish a WiFi link connection via wireless communication; The microphone is connected to the main control MCU for signal transmission. The encoder is connected to the main control MCU for signal transmission. The main control MCU is connected to the display screen for signal transmission. The main control MCU is connected to the printhead drive module via signal connections. The printhead driver module is electrically connected to the full-color printhead; The power management circuit is connected to the main control MCU, printhead driver module, encoder, display screen, and full-color printhead for power supply.
Citation Information
Patent Citations
Printer control method, printer and computer readable storage medium
CN120840086A
Printing color consistency automatic calibration and management system and method
CN121413647A