Printing hub-based method and system for heterogeneous printing relay of honnong

By converting document-type print jobs from HarmonyOS terminals into standard page files through the print hub and performing partial or full-page rendering based on the output parameters of the target Windows print queue, the problem of unstable page output in heterogeneous print transitions is solved, achieving efficient page content display and improved queue efficiency.

CN123030144APending Publication Date: 2026-11-03GUANG DONG XUN WEI BAN GONG ZI DONG HUA YOU XIAN GONG SI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611236328.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-14
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

During heterogeneous printing transitions, existing technologies struggle to achieve stable page output between terminals with different operating systems and printing devices, especially for the correct display of content such as transparent layers, electronic signatures, and complex vector graphics. Furthermore, the processing of entire pages into bitmaps leads to increased data volume and slower response times.

Method used

The print hub converts document-type print jobs submitted by HarmonyOS terminals into standard page files, generates original low-resolution page images, performs target constraint processing based on the output parameters of the target Windows print queue, generates candidate solidification areas, and generates hybrid transfer documents through partial or full-page rendering, reducing unnecessary image processing.

Benefits of technology

It achieves stable page output across different operating system terminals and printing devices, reduces display anomalies caused by different methods of transparent overlay and page object clipping path expression, preserves the clarity of text and vector objects, reduces unnecessary image processing, and improves the efficiency of the print queue.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123030144A_ABST
    Figure CN123030144A_ABST
Patent Text Reader

Abstract

The application discloses a printing hub-based heterogeneous printing switching method and system, relates to the technical field of printing switching software development, and comprises the following steps: receiving a printing job package sent by a Harmony terminal, generating an original low-resolution page image, generating a target constraint low-resolution page image, generating a candidate solidification area, determining a residual difference amount before solidification, performing local temporary solidification verification, obtaining a temporary solidification target image, determining a net improvement value, determining a final solidification area or a whole-page solidification page, and generating a mixed switching document to be submitted to a target Windows printing queue. Based on the above method, the printing job can be processed without the need for the Harmony terminal to separately adapt to various types of Windows printing drivers, cross-environment page expression risks such as transparent superposition failure and page object cutting path interpretation abnormality can be reduced, and unnecessary whole-page imaging processing can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of print adapter software development technology, and more specifically, to a HarmonyOS heterogeneous print adapter method and system based on a print hub. Background Technology

[0002] With the increasing application of domestic operating systems and HarmonyOS terminals in government and enterprise office scenarios, enterprise printing systems need to provide unified and stable printing access capabilities for terminals with different operating systems while maintaining the continued use of existing printing equipment. Since the models, manufacturers, interface types, and driver systems of existing printing devices within enterprises are often quite complex, and some printing devices have long relied on Windows-based print drivers, print queues, or vendor tools to complete job processing, when domestic terminals connect to the existing printing environment, it is usually necessary to use an intermediate print service, print server, or printing management platform to receive, convert, queue, and forward print jobs from different terminals, in order to reduce the complexity of adapting different manufacturers' print drivers for each terminal.

[0003] Existing heterogeneous printing access methods typically focus on basic processes such as establishing a connection between the terminal and the printing device, obtaining the printing device list, job submission, queue management, and device output. For example, an intermediate printing service can be deployed in a runtime environment with a configured Windows printing driver, receiving print requests from HarmonyOS terminals or other domestic terminals, and handing over the print jobs to the corresponding Windows printing queue, printing component, or device driver for output. This type of approach can, to some extent, solve the access compatibility issues between terminals with different operating systems and existing printing devices, eliminating the need for the terminal side to directly install or adapt the underlying driver for each target printing device.

[0004] However, during heterogeneous printing transitions, the successful submission of a print job to the target print queue does not equate to the print page being stably interpreted and output by the target printing environment. Print jobs submitted by HarmonyOS terminals to the print hub are typically not the final data that the printing device can directly image; rather, they are document-type jobs containing document content, page structure, image resources, transparent layers, vector-drawn objects, page size, page boundaries, and printing parameters. Before entering the target Windows print queue, these document-type jobs usually undergo processing steps such as document conversion, page interpretation, intermediate page format generation, driver rendering, or device language conversion. During these processes, objects on the document page may change due to differences in the target print queue's intermediate page format, printable area, transparency blending capabilities, vector drawing capabilities, or clipping path handling methods.

[0005] For example, for documents containing transparent watermarks, electronic signatures, shadow layers, complex vector graphics, clipping paths, or object stacking relationships, if the print hub directly hands the document over to the local print component or the target Windows print driver for processing, when the document page is converted into intermediate data that the target print queue can process, the intermediate page format, rendering component, or device driver may not have sufficient support for transparent blending relationships, object hierarchy relationships, and clipping boundaries, resulting in output anomalies such as loss of transparent layers, graphic occlusion, abnormal edges of electronic signatures, or broken vector lines.

[0006] To mitigate output anomalies caused by cross-environment interpretation differences, existing processing methods could consider converting the entire document into a bitmap page at the print hub before submitting it to the target print queue. This approach can reduce the risks associated with lost transparent layers and page representation differences to some extent, but it employs the same high-cost processing method for all pages and all page areas. For ordinary page areas that could be stably output as text or vector graphics, converting the entire document to a bitmap will cause text, table lines, QR codes, barcodes, or small graphics to lose vector clarity. Simultaneously, whole-document bitmap conversion will significantly increase the amount of job data in the print queue, lengthening print-driven processing time and potentially causing queue buffer bloat, slow job response, or long waiting times for intermediate print services in scenarios involving large-page documents, high-resolution image documents, or scanned documents.

[0007] On the other hand, if processing is only done locally based on page object type—for example, directly fixing the area containing the detected non-embedded fonts, transparent objects, clipping paths, or complex vector objects—it's easy to encounter problems with either an excessively large or insufficient processing area. An excessively large processing area will unnecessarily render a large number of page areas that could have been output in a structured manner, still increasing the amount of print data and reducing output clarity. An insufficient processing area, due to the overlapping, occlusion, edge anti-aliasing, clipping, and adjacent layout relationships between page objects, processing only the area containing a single object may still cause broken boundaries of the fixed area, abnormal local occlusion, or misalignment of adjacent objects. Therefore, relying solely on object type rules or manually preset risk rules makes it difficult to achieve a good balance between output stability and print queue load. Summary of the Invention

[0008] Firstly, a HarmonyOS heterogeneous printing transition method based on the printing hub is provided, which is applied to the printing hub and includes: It receives print job packets sent by the HarmonyOS terminal, converts the document-type print jobs in the print job packets into standard page files with page coordinate systems, and determines the target Windows print queue based on the target print device identifier in the print job packets.

[0009] For pages in a standard page file, generate an original low-resolution page image, and then perform target constraint processing on the same page based on the output parameters of the target Windows print queue and the corresponding page representation information to generate a target-constrained low-resolution page image.

[0010] Candidate curing regions are generated based on the page difference map between the original low-resolution page image and the target constrained low-resolution page image, and the residual difference amount of the candidate curing regions before curing is determined based on the page difference map.

[0011] Candidate curing regions whose residual difference before curing reaches the effective difference threshold are selected as regions to be verified. Local temporary curing verification is performed on the regions to be verified at a preset analysis resolution to obtain a temporary curing target image.

[0012] Based on the comparison between the temporarily solidified target image and the original low-resolution page image, the residual difference and the newly added difference at the boundary after temporary solidification are determined. The solidification data cost is determined based on the area to be verified, and the net improvement value of the area to be verified is determined in combination with the residual difference before solidification. The final solidified area or the entire page of solidified page is determined based on the net improvement value.

[0013] Perform partial rendering at the target print resolution on the final cured area or full-page rendering at the target print resolution on the entire cured page to generate a hybrid transfer document, and submit the hybrid transfer document to the target Windows print queue.

[0014] Secondly, it provides a HarmonyOS heterogeneous printing adapter system based on a printing hub, including: The job receiving and standard page generation module is used to receive print job packages sent by the HarmonyOS terminal, convert the document-type print jobs in the print job package into standard page files with page coordinate systems, and determine the target Windows print queue based on the target printing device identifier in the print job package.

[0015] The target constraint image generation module is used to generate original low-resolution page images for pages in a standard page file, and to generate target constraint low-resolution page images after performing target constraint processing on the same page according to the output parameters of the target Windows print queue and the corresponding page expressiveness information.

[0016] The candidate curing region generation module is used to generate candidate curing regions based on the page difference map between the original low-resolution page image and the target constrained low-resolution page image, and to determine the amount of residual difference in the candidate curing regions before curing based on the page difference map.

[0017] The local temporary curing verification module is used to select candidate curing areas where the residual difference before curing reaches the effective difference threshold as the areas to be verified, and perform local temporary curing verification on the areas to be verified at a preset analysis resolution to obtain a temporary curing target image.

[0018] The solidified region decision module is used to determine the residual difference and the new boundary difference after temporary solidification based on the comparison results between the temporary solidified target image and the original low-resolution page image. It determines the solidification data cost based on the region to be verified, and determines the net improvement value of the region to be verified based on the residual difference before solidification. Based on the net improvement value, it determines the final solidified region or the entire page to be solidified.

[0019] The hybrid transfer document generation module is used to perform partial rendering at the target print resolution on the final solidified area or full-page rendering at the target print resolution on the entire solidified page, generate a hybrid transfer document, and submit the hybrid transfer document to the target Windows print queue.

[0020] The beneficial effects achieved by the technical solutions provided in the embodiments of the present invention include at least the following: 1. By using the print hub, document-type print jobs submitted by HarmonyOS terminals are converted into standard page files with a unified page coordinate system. Combined with the paper size, printable area, page orientation, color mode, and page representation constraints of the target Windows print queue, the system analyzes potential page representation differences before the page content enters the target Windows print queue. Based on the identified areas of page difference, partial or full-page solidification is selected. This reduces the probability of page display anomalies caused by differences in transparent overlay and page object clipping paths, without requiring HarmonyOS terminals to adapt to different Windows print drivers. Simultaneously, only page areas that truly require area-level solidification are image-processed, preserving the text and vector object structures in other areas that have not undergone object-level pre-compositing. This balances page output stability, the clarity of small text and lines, and the relative scale of solidified image resources, reducing unnecessary full-page image processing.

[0021] 2. By generating the original low-resolution page image and the target constrained low-resolution page image after applying the target Windows print queue output constraint to the same page, and combining grayscale differences and edge differences to form a page difference map, the candidate solidification area is determined based on the grayscale, outline, position, or object composition changes formed by the page content under the target print queue output constraint, rather than inferring solely based on preset object types such as transparent objects or complex vector objects. Furthermore, by utilizing the residual difference before solidification of the candidate solidification area and its boundary extension area, low-impact areas and areas that do not need solidification are filtered out. This reduces the misjudgment of page content with normal rendering fluctuations, slight pixel rounding, or stable structured output as solidification objects, while also reducing the possibility of missing potential abnormal areas formed by the stacking, cropping, or adjacent layout of multiple page objects. This ensures that the local solidification range corresponds to the page difference area reflected by the target print queue output constraint.

[0022] 3. By performing local temporary hardening on the area to be verified, and based on the improvement between the residual difference before hardening and the residual difference after temporary hardening, the net improvement value is calculated by introducing the hardening data cost at the target printing resolution and the new difference at the hardening boundary. This ensures that the final hardened area depends not only on whether the page difference is reduced after hardening, but also on the constraints of the relative amount of hardened image resources and the hardening boundary seams. For areas with insufficient net improvement but close to adjacent candidate areas or with large new differences at the boundary, further verification is performed by expanding the area. When the cumulative area of ​​local hardening is too large or the cumulative amount of unresolved differences is too high, the system switches to full-page hardening. This reduces boundary breaks, misalignment of adjacent objects, and local occlusion anomalies caused by too small a hardened area. It also avoids excessive local hardening image and page object processing overhead caused by repeated expansion of multiple local areas. This allows local hardening and full-page hardening to switch based on the degree of improvement in page difference and the relative cost of hardened image resources. Attached Figure Description

[0023] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a flowchart of the HarmonyOS heterogeneous printing transition method based on the printing hub; Figure 2 A comparison of the differences before and after target constraint processing, and a distribution chart of the incremental differences in target constraint processing. Figure 3 A graph showing the relationship between the area ratio of candidate cured regions and the residual amount before curing; Figure 4Paired plot of residual differences before and after local temporary curing of the area to be verified; Figure 5 This is a framework diagram of the HarmonyOS heterogeneous printing adapter system based on the printing hub. Detailed Implementation

[0025] The technical solution of the present invention will now be described with reference to the accompanying drawings.

[0026] Example 1:

[0027] This embodiment provides a HarmonyOS heterogeneous printing transition method based on a printing hub, executed by a printing hub deployed in a Windows runtime environment. The printing hub has document conversion components, page rendering components, and Windows print drivers corresponding to each target printing device installed, and pre-establishes a mapping between target printing device identifiers and Windows print queues. This mapping records at least the target printing device identifier, Windows print queue name, print driver identifier, Windows print queue activation status, and queue priority, used to determine the target Windows print queue corresponding to the current print job based on the target printing device specified by the HarmonyOS terminal.

[0028] In this embodiment, "solidification" refers to rendering text objects, vector objects, ordinary image objects, and page objects with transparency attributes into pixel images according to the page coordinates, object attributes, and stacking relationships of the page objects, and replacing the structured page content within the corresponding page area with the pixel images. Partial solidification means performing the above transformation only on a portion of the page, while full-page solidification means performing the above transformation on the entire page. After solidification, the Windows print driver processes the page content within the solidified area as ordinary image objects, no longer interpreting the text encoding, vector paths, and transparency stacking relationships before solidification.

[0029] like Figure 1 The flowchart shown is a process for the HarmonyOS heterogeneous printing transfer method based on the printing hub. The printing hub performs the following steps sequentially for the current print job.

[0030] S1. Receive the print job package and generate a standard page file.

[0031] Receive print job packets sent by the HarmonyOS terminal. The print job packet includes a document-type print job, print parameters, and a target printing device identifier. The print parameters include at least paper size, page orientation, page number range, number of copies, single / double-sided printing mode, and color mode, and may include scaling ratio, scaling method, page positioning method, and cropping permission status. The scaling method indicates whether to maintain the page's aspect ratio or scale along both the horizontal and vertical axes. The page positioning method determines the placement of the page content within the printable area. The cropping permission status indicates whether page content exceeding the printable area boundaries can be cropped.

[0032] The system parses the print job packet, reads the target print device identifier, and searches for a matching record in the pre-established mapping between target print device identifiers and Windows print queues. When a unique and enabled matching record is found, the corresponding Windows print queue is designated as the target Windows print queue. If no matching record is found, or if none of the corresponding Windows print queues are enabled, the current print job is stopped, and a message indicating that the target print device is not configured or the corresponding print queue is unavailable is output. If multiple enabled matching records are found, the Windows print queue with the highest priority is selected. If multiple enabled Windows print queues have the same highest priority, the target Windows print queue cannot be uniquely determined, the current print job is stopped, and a print queue configuration conflict message is output.

[0033] The file format is determined based on the header characteristics of the document-type print job. When the document-type print job is a PDF file, the page size, page orientation, page cropping range, and page object coordinates recorded in the PDF file are read. If the page size and page objects in the PDF file can be parsed by the page rendering component, the page order and page object content of the PDF file are kept unchanged, and the PDF file is used as a standard page file. If the PDF file contains page rotation information, the coordinates of the page objects are transformed according to the page rotation angle so that the transformed page object coordinates directly correspond to the normal display orientation of the page. If the PDF file is in an undecryptable encrypted state, the page size cannot be read, or the page objects cannot be parsed by the page rendering component, the current print job is stopped and a PDF file parsing failure message is output.

[0034] When a document print job is an image file, a standard page is created according to the paper size and page orientation specified in the print parameters. The image is then converted to its normal display orientation. The ratios of the standard page width to the image pixel width and the standard page height to the image pixel height are calculated, and the smaller of these two values ​​is used as the image write ratio. The page display size of the image is determined based on the image write ratio, and the image is centered and written into the standard page, forming a standard page file containing ordinary image objects. The image write ratio is only used to establish the correspondence between the image pixel coordinates and the standard page coordinates; the user-specified scaling ratio and page positioning method are uniformly applied when generating the target page mapping parameters.

[0035] When a print job is an Office document, web page document, or other convertible document, the document conversion component deployed on the print hub is invoked, and the print job, paper size, and page orientation are passed to the document conversion component. The document conversion component performs fixed page layout according to the paragraphs, tables, images, page breaks, web page print styles, and page settings recorded in the document, converting the print job into a PDF or XPS file, and using the converted PDF or XPS file as the standard page file. If the document conversion component cannot read the document content or fails to generate a PDF or XPS file, it stops processing the current print job and outputs a document conversion failure message.

[0036] For standard page files generated from different file formats, a unified page coordinate system is established. The page coordinate system uses the top-left corner (when viewed in the normal display orientation) as the origin, the direction from the left side of the page to the right side as the positive x-axis, and the direction from the top of the page to the bottom side as the positive y-axis. Page object coordinates are recorded using a standardized physical unit of page length. Each page in a standard page file records the page width, page height, page order, and the page coordinate range for text objects, vector objects, and ordinary image objects within the page.

[0037] As a result, document-type print jobs of different file formats are all converted into standard page files with a unified page coordinate reference, and the subsequently generated page images, candidate solidified areas and partially solidified images can all be associated according to the same page coordinates.

[0038] S2. Generate the original low-resolution page image and the target constraint low-resolution page image page by page.

[0039] The low resolution is pre-determined during the print hub deployment phase. A calibration page with known page object boundaries is prepared in advance, and the calibration page is rendered at multiple candidate resolutions arranged from low to high. For each candidate resolution, the pixel range of text strokes, vector boundaries, and ordinary image object boundaries in the repeated rendering results is detected. If all known page objects can form continuous edges, the edge position deviation obtained from repeated rendering does not exceed one candidate resolution pixel, and the single-page pixel count, rendering time, and memory usage do not exceed the pre-configured single-page pixel count limit, single-page processing time limit, and single-page memory limit of the print hub, respectively, the first candidate resolution that meets the above conditions is determined as the low resolution.

[0040] Process each page sequentially according to the page order in the standard page file, and record the currently processed page as the current page.

[0041] For the current page, read the output parameters of the target Windows print queue. The output parameters include the target paper size, print resolution, printable area, default page orientation, and color mode. The print resolution returned by the target Windows print queue for this print job is determined as the target print resolution.

[0042] Establish a unified low-resolution comparison canvas based on the target paper size and low resolution, so that the physical extent of the low-resolution comparison canvas corresponds to the target output page.

[0043] The width and height of the target output page are determined based on the target paper size and default page orientation, and it is checked whether the current page orientation is consistent with the default page orientation. When the current page is landscape and the target output page is portrait, or vice versa, the current page content is rotated 90 degrees clockwise, and this rotation angle is recorded as the page rotation relationship; when the two orientations are consistent, the page rotation angle is recorded as zero. Subsequently, the width and height of the page content are recalculated according to the rotated page boundaries.

[0044] The page scaling ratio is determined based on the size of the rotated page content and the printable area. When maintaining the aspect ratio, the smaller of the ratio of the printable area width to the page content width and the ratio of the printable area height to the page content height is determined as the uniform page scaling ratio. When scaling along the horizontal and vertical axes respectively, the above two ratios are determined as the horizontal page scaling ratio and the vertical page scaling ratio.

[0045] When the printing parameters include a user-specified scaling ratio, the corresponding page adaptation scaling ratio is multiplied by the user-specified scaling ratio to obtain a candidate target scaling ratio. If the user-specified scaling ratio is not included, the page adaptation scaling ratio is used as the candidate target scaling ratio. If the candidate target scaling ratio causes the page content to exceed the printable area and the cropping setting is set to "not allowed," the corresponding page adaptation scaling ratio is used; otherwise, the candidate target scaling ratio is used. When maintaining the page aspect ratio, the final unified target scaling ratio is determined as both the horizontal and vertical scaling ratios. When scaling separately, the final horizontal and vertical target scaling ratios are determined as the horizontal and vertical scaling ratios, respectively. The above processing applies to standard page files formed from different file formats.

[0046] After determining the horizontal and vertical scaling ratios, the remaining width and height are calculated based on the bounding boundary of the scaled page content and the printable area boundary. When the printing parameters specify a page positioning method, the target position of the bounding boundary of the page content within the printable area is determined according to the page positioning method, and the horizontal and vertical translation amounts are determined based on the coordinate difference between the target position and the bounding boundary of the scaled page content. When the printing parameters do not specify a page positioning method, half of the remaining width is used as the horizontal center offset, and half of the remaining height is used as the vertical center offset. Then, the horizontal and vertical starting coordinates of the printable area relative to the target paper boundary are superimposed to obtain the horizontal and vertical translation amounts.

[0047] The page rotation relationship, horizontal scaling ratio, vertical scaling ratio, horizontal translation amount, vertical translation amount, and printable area boundary are recorded together as target page mapping parameters.

[0048] For any page coordinate in the current page, first convert it to the target page orientation according to the page rotation relationship, then adjust the coordinate distance according to the horizontal and vertical scaling ratios, and finally superimpose the horizontal and vertical translation amounts to obtain the position of the page coordinate in the target output page.

[0049] When generating the original low-resolution page image, the orientation adjustment and coordinate mapping of the page content in the standard page file are performed according to the target page mapping parameters corresponding to the current page. Page content completely outside the printable area is excluded, and only the part of the page object within the printable area is retained for page objects that intersect with the boundary of the printable area. At the same time, the page object color and the pixel color of the ordinary image object are converted according to the color mode of the target Windows print queue.

[0050] During the above processing, the original page representation of text objects, vector objects, ordinary image objects, transparency attributes, blending modes, and cropping paths are preserved, and pre-compositing processing tailored to the page representation capabilities of the target Windows print queue is not performed. The page content, after orientation adjustment, coordinate mapping, printable area cropping, and color conversion, is rendered to a low-resolution comparison canvas according to the target output page coordinates to obtain the original low-resolution page image.

[0051] The original low-resolution page image is used to record the current page state when the target page mapping parameters and target color mode are used, but the target page representation conversion has not yet been performed.

[0052] The print hub obtains the target paper size, print resolution, printable area, default page orientation, and color mode through the Windows printing system's print capability query interface or the target device context capability interface. Based on the print driver identifier, print driver version, and fixed page input format corresponding to the target Windows print queue, the print hub reads the support status corresponding to transparency attributes, blending modes, and clipping path types from a pre-established driver adaptation record, forming a set of page expression capabilities. If no matching record exists or the record is invalid, the corresponding support status is determined as uncertain and processed as unsupported. The driver adaptation record is established based on driver technical documentation, manufacturer compatibility parameters, pre-configured data, or compatibility test results completed before the current print job is processed.

[0053] When generating a target-constrained low-resolution page image, the target page mapping parameters, printable area cropping rules, color mode conversion rules, and low-resolution rendering parameters are kept the same as when generating the original low-resolution page image. Based on the page expression capability set corresponding to the target Windows print queue, the page expression mode is determined for the page object that has completed orientation adjustment, coordinate mapping, printable area cropping, and color conversion.

[0054] It should be noted that the processing of the print job in this embodiment is a pre-compatibility optimization process before the print job is submitted to the target Windows print queue. The target constraint low-resolution page image is a target constraint processing result image generated by the print hub based on the output parameters of the target Windows print queue, the pre-configured set of page representation capabilities, and the corresponding page representation conversion rules. It is used to characterize the page state after the page content is processed according to the page representation conversion rules, and is not used to reproduce the actual output result of the target print driver or printing device.

[0055] When the support status of the transparency attribute, blending mode, or cropping path type used by a page object is unsupported or uncertain, the page object and the page objects below it that intersect with its page range are read. The page content within the intersection range is pre-composited according to the stacking order of the page objects, and the pre-composited result is converted into a normal image object. When the support status of the transparency attribute, blending mode, and cropping path type used by a page object is all supported, the original page expression of the page object is retained. The aforementioned page expression conversion is an object-level selective compatibility processing. Pre-compositing is only performed on page objects using unsupported or uncertain page expression methods and their intersecting influence ranges. Other objects in the page continue to maintain a structured page expression. Subsequent local temporary solidification uses a local verification window as the processing unit. The structured page content within the window is replaced with a pixel image containing the complete display result of the local verification window to determine whether it is necessary to expand the object-level compatibility processing to a region-level complete solidification.

[0056] The current page, after completing the page representation conversion, is rendered to a low-resolution comparison canvas using the same target page mapping parameters, printable area cropping rules, color mode conversion rules, and low-resolution rendering parameters as the original low-resolution page image, resulting in a target-constrained low-resolution page image.

[0057] The original low-resolution page image and the target-constrained low-resolution page image have the same target page mapping relationship, color mode, physical page range, pixel width, pixel height, pixel arrangement direction, and page background value. The difference between the two is that the original low-resolution page image retains the original page representation of the page object, while the page object in the target-constrained low-resolution page image has undergone page representation conversion according to the page representation capability set corresponding to the target Windows print queue.

[0058] S3. Generate a page difference map and determine candidate solidification areas.

[0059] Both the original low-resolution page image and the target-constrained low-resolution page image are converted to grayscale, and the absolute value of the difference between the pixel grayscale value and the page background grayscale value is determined as the page content intensity. The page content intensity is accumulated by column and by row respectively to obtain the horizontal projection sequence and vertical projection sequence of the two types of low-resolution page images.

[0060] Within the displacement search range determined by the positional fluctuations of repeated low-resolution rendering, integer pixel displacements are traversed. The cumulative absolute difference between the translated target projection sequence and the corresponding original projection sequence is calculated. The candidate displacements with the smallest cumulative difference and the smallest absolute value are determined as the horizontal and vertical page displacements, respectively. Projection values ​​that are translated outside the sequence range are discarded, and the resulting gaps are filled with zeros. When neither the horizontal nor vertical projection sequences of the two types of images have page content intensity, both displacements are set to zero. The displacement search is only used to determine the integer pixel positional fluctuations caused by low-resolution rendering.

[0061] The larger of the absolute values ​​of the horizontal and vertical page displacements is determined as the overall page displacement. The overall displacement threshold is pre-determined based on the upper limit of positional fluctuations caused by repeated rendering of the calibrated page under the same target page mapping parameters, page representation method, and low-resolution rendering parameters.

[0062] When the overall page displacement is greater than zero and less than or equal to the overall displacement threshold, a reverse translation is performed on the target constrained low-resolution page image copy in the opposite direction of the horizontal and vertical page displacements, and the two displacements are recorded as page alignment parameters. Pixels that exceed the comparison canvas are discarded, and the missing positions are filled with the page background value. When the overall page displacement is zero or greater than the overall displacement threshold, no reverse translation is performed, and the page alignment parameters are set to zero. Position changes exceeding the overall displacement threshold are preserved in the page difference map through the pixel differences between the two types of low-resolution page images. The page alignment parameters are only used for low-resolution image comparison and do not change the target page mapping parameters or the final output position.

[0063] After page alignment is completed, for each pixel in the low-resolution comparison canvas, the gray value of the target constraint low-resolution page image processed by the page alignment parameters is subtracted from the gray value of the original low-resolution page image, and the absolute value of the difference is taken to obtain the gray-level difference value, thus forming a gray-level difference map.

[0064] Simultaneously, the same edge extraction parameters are used to process the original low-resolution page image and the target-constrained low-resolution page image processed by the page alignment parameters, respectively, to obtain the original edge map and the target-constrained edge map. For corresponding pixel positions, the edge intensity in the original edge map is subtracted from the edge intensity in the target-constrained edge map, and the absolute value of the difference is taken to obtain the edge difference value, thus forming the edge difference map.

[0065] The grayscale difference value and the edge difference value are normalized to a numerical range of zero to one. Specifically, the grayscale difference value is divided by the maximum allowable difference in grayscale values ​​to obtain the normalized grayscale difference value; the edge difference value is divided by the maximum allowable difference in edge intensity in the edge extraction results to obtain the normalized edge difference value.

[0066] For each pixel location, the normalized grayscale difference value is multiplied by the grayscale difference weight, and the normalized edge difference value is multiplied by the edge difference weight. The two products are then added together to obtain the page difference value for that pixel. Page difference values ​​are recorded for all pixel locations to form a page difference map.

[0067] Both grayscale difference weights and edge difference weights are non-negative, and their sum is one. These weights are predetermined before being used for the first time with the corresponding print driver. Specifically, a set of calibration pages is pre-generated. These calibration pages include grayscale change areas where the page object's grayscale value is pre-modified but the page object's boundary remains unchanged, edge change areas where the page object's boundary position is pre-modified, and areas where the page content remains unchanged. The boundaries of these areas in the page coordinate system are recorded. Multiple candidate weight combinations are generated according to a pre-defined weight step size. A page difference map is generated for each candidate weight combination. Candidate weight combinations that cannot form corresponding difference connected regions for all grayscale change areas and edge change areas are excluded. Then, the candidate weight combination with the fewest difference pixels in the unchanged region is selected from the remaining candidate weight combinations. When multiple candidate weight combinations have the same number of difference pixels, the candidate weight combination with the smallest absolute difference between the grayscale difference weight and the edge difference weight is selected. The determined weights are associated with and saved with the print driver identifier of the target Windows print queue.

[0068] like Figure 2 As shown, this is a comparison of the differences before and after the target constraint processing, and a distribution chart of the incremental differences in target constraint processing. Figure 2 (a) in the figure is a pairwise plot of normalized differences of multiple page samples before and after the target constraint processing. Figure 2 (b) in the diagram shows the distribution of incremental differences in target constraints. To illustrate the impact of target constraint processing on page differences, the original differences and target constraint differences were statistically analyzed for multiple calibrated pages or processed page samples. The original differences are the normalized sum of page differences resulting from repeated rendering, grayscale conversion, and edge extraction for the same page before target constraint processing. The target constraint differences are the normalized sum of page differences between the original low-resolution page image and the target constraint low-resolution page image corresponding to the same page. The incremental difference in target constraints is the difference between the target constraint difference and the original differences. Figure 2In (a) of the diagram, the horizontal axis represents the normalized variance, and the vertical axis arranges different page samples sequentially. Blue dots represent the original variance of each page sample, and orange dots represent the target constraint variance of the same page sample. The line segment connecting the blue and orange dots at the same vertical position represents the change in variance of the same page sample before and after the target constraint processing. When the orange dot is to the right of the corresponding blue dot, it indicates that the page variance has increased after the target constraint processing; the greater the horizontal distance between the two, the greater the increase in variance of the page sample due to the page expression method transformation based on the page expression capability set. Figure 2 In (b) of the diagram, the horizontal axis represents the incremental difference of the target constraints, and the vertical axis represents the distribution density of the corresponding incremental differences. The bar chart represents the distribution of page samples within different intervals of incremental differences of the target constraints. The black curve represents the density trend of the incremental differences of the target constraints, the blue vertical line represents the mean of the incremental differences of the target constraints for all page samples, and the light blue shaded area represents the 95% interval corresponding to the mean. Figure 2 As can be seen in (b), the incremental differences in target constraints for most page samples are concentrated in a small positive range, indicating that target constraint processing usually introduces limited incremental differences only in some page locations; a small number of page samples have large incremental differences in target constraints, which indicates that some pages containing complex transparent attributes, mixed modes or pruning path expressions have formed large page differences after performing page expression transformation.

[0069] After obtaining the page difference map, each page difference value in the map is compared with a difference threshold. When the page difference value is greater than or equal to the difference threshold, the corresponding pixel in the difference mask is set to the difference state; when the page difference value is less than the difference threshold, the corresponding pixel is set to the non-difference state, thus forming the difference mask for the current page.

[0070] The difference threshold is pre-determined based on repeatedly generated page difference maps while keeping the page content and target page mapping parameters constant. Specifically, with the page content, target page mapping parameters, low-resolution rendering parameters, grayscale conversion parameters, and edge extraction parameters remaining unchanged, page difference maps of the same page are repeatedly generated. The maximum value among all the page difference values ​​corresponding to all pixels in each page difference map is obtained, and the sum of this maximum value and a quantization step size of the page difference value is set as the difference threshold. The quantization step size is the minimum difference between two adjacent values ​​that can be represented by the page difference value storage format.

[0071] The first eight-adjacent connected component analysis is performed on the difference mask to obtain the initial difference connected components. With the page content and target page mapping parameters unchanged, the difference mask is repeatedly generated. The number of pixels in the initial difference connected components formed by normal rendering fluctuations in each generated difference mask is counted. The maximum number of pixels is taken and incremented by one pixel to obtain the noise removal pixel threshold. Initial difference connected components with fewer removed pixels than the noise removal pixel threshold are then analyzed. Subsequently, non-difference connected components completely surrounded by difference pixels are analyzed. In the calibration page containing continuous text strokes or continuous vector boundaries, the number of pixels in non-difference connected components formed within the same text stroke or vector boundary due to low-resolution sampling is counted. The maximum number of pixels is taken and incremented by one pixel to obtain the hole area threshold. When the number of pixels in a non-difference connected component is less than the hole area threshold, its pixel state is converted to a difference state. After noise removal and hole filling are completed, connected component analysis is performed on the difference pixels according to the eight-adjacent relationship, grouping horizontally adjacent, vertically adjacent, or diagonally adjacent difference pixels into the same difference connected component.

[0072] For each differentially connected region, obtain the minimum x-coordinate, maximum x-coordinate, minimum y-coordinate, and maximum y-coordinate of the differential pixels within it. Then, based on the correspondence between the low-resolution comparison canvas and page coordinate system, convert the above pixel coordinates into page coordinates to form a bounding rectangle that completely surrounds the differentially connected region.

[0073] The left boundary of the bounding rectangle is extended to the left of the page by a preset distance, the right boundary is extended to the right of the page by a preset distance, the top boundary is extended upwards of the page by a preset distance, and the bottom boundary is extended downwards of the page by a preset distance to obtain the candidate fixed area. When the extended boundary exceeds the current page boundary, the current page boundary is used as the actual boundary of the candidate fixed area.

[0074] The preset expansion distance is determined in advance based on the maximum diffusion distance of the difference pixels at the edge of the page object relative to the actual boundary of the page object during low-resolution rendering. Specifically, in the calibration page where the boundaries of the page objects are known, the outermost difference pixel corresponding to each page object is determined, and the page distance between the outermost difference pixel and the corresponding page object boundary is calculated; the maximum value among all page distances is taken, and the page distance corresponding to a low-resolution pixel in the page coordinate system is added to obtain the preset expansion distance.

[0075] For each candidate solidified region, calculate its area in the page coordinate system, and add up the page difference values ​​of the candidate solidified region in the page difference map to obtain the cumulative difference value of the candidate solidified region.

[0076] When the area of ​​a candidate solidification region is smaller than the noise area threshold, and the cumulative difference value is less than the noise difference threshold, the candidate solidification region is marked as a low-impact region. Low-impact regions do not undergo local solidification verification or region-level complete solidification, and their corresponding page content is retained in subsequent page generation processes according to the target constraint processing results.

[0077] The noise area threshold and noise difference threshold are pre-determined based on the original difference mask repeatedly generated when the page content and target page mapping parameters remain unchanged. Connectivity analysis is performed on the original difference mask before noise removal to obtain the maximum area of ​​the noisy connected regions in the page coordinate system. The sum of this maximum area and the page area corresponding to a low-resolution pixel is set as the noise area threshold. The cumulative maximum difference value of the noisy connected regions is obtained, and the sum of this cumulative maximum difference value and a quantization step size of the page difference value is set as the noise difference threshold. Both are used together to ensure that small text or lines with small areas but high degrees of difference are not marked as low-impact areas simply because of their small size.

[0078] For candidate solidified regions not marked as low-impact regions, each boundary of the candidate solidified region is extended outward by a preset boundary width, and the extended region is subtracted from the candidate solidified region to obtain the boundary extension region. When a candidate solidified region is subsequently determined as a region to be verified, the boundary extension region serves as the boundary band of that region to be verified.

[0079] The preset boundary width is predetermined based on the maximum distance that the newly added page differences extend outward from the candidate solidification area after local solidification. Specifically, local temporary solidification is performed on the calibration object with known page boundaries. The page distance between the newly added difference pixels located outside the calibration object area and the calibration object boundary is calculated. The maximum value among all the page distances corresponding to the newly added difference pixels is obtained, and the sum of this maximum value and the page distance corresponding to a low-resolution pixel in the page coordinate system is set as the preset boundary width.

[0080] Add up the page difference values ​​within the candidate solidification region in the page difference map, and then add up the page difference values ​​within the boundary extension region to obtain the residual difference amount before solidification of the candidate solidification region.

[0081] To illustrate the statistical relationship between the spatial extent of candidate curing regions and the residual difference before curing, the area ratio of candidate curing regions can also be calculated. The area ratio of candidate curing regions is the ratio of the area of ​​the candidate curing region after transformation by the target page mapping parameters to the area of ​​the printable area of ​​the current page, and then converted to a percentage. The area ratio of candidate curing regions is only used to describe the relative spatial extent of different candidate curing regions and does not replace the noise area threshold, effective difference threshold, or subsequent net improvement value judgment. Figure 3The figure shows the relationship between the proportion of the candidate cured area and the residual difference before curing. In the figure, the horizontal axis represents the proportion of the candidate cured area to the printable area of ​​the current page, and the vertical axis represents the normalized residual difference before curing. The normalized residual difference before curing is obtained by dividing the residual difference before curing in the candidate cured area and its boundary extension area by the maximum difference corresponding to the maximum page difference value obtained in all pixels within the same range. Figure 3 The hexagonal regions in the diagram represent the distribution of candidate cured regions within their corresponding area percentage ranges and pre-curing residual difference ranges. The color depth of the hexagons indicates the region density; a darker color indicates a larger number of candidate cured regions falling within their respective area percentage and pre-curing residual difference ranges. The color scale on the right indicates the number of candidate cured regions corresponding to the region density. The red line and red nodes represent the quantile trend of pre-curing residual difference obtained after grouping by candidate cured region area percentage, used to represent the overall change in pre-curing residual difference within different area percentage ranges. Figure 3 It is evident that the candidate solidification area samples are mainly concentrated within a relatively small area proportion, and even within the same area proportion, different residual differences before solidification may still correspond. As the area proportion of the candidate solidification area increases, the quantile trend of the residual differences before solidification generally rises, but the two do not constitute a unique correspondence. Therefore, this implementation does not determine whether to perform local temporary solidification verification solely based on the area of ​​the candidate solidification area. Instead, it first excludes low-impact areas that simultaneously meet the conditions of small area and small cumulative difference value, and then compares the residual differences before solidification in the candidate solidification area and its boundary extension area with the effective difference threshold.

[0082] When the residual difference before curing is less than the effective difference threshold, the candidate curing region is marked as a region that does not need curing. Region-level complete curing is not performed on this region, and the corresponding page content is retained according to the target constraint processing result during subsequent page generation. When the residual difference before curing is greater than or equal to the effective difference threshold, the candidate curing region is determined as a region to be verified.

[0083] Under the condition that the page content and target page mapping parameters remain unchanged and there are no page expression anomalies, the page difference analysis is repeatedly performed to identify candidate solidification regions formed by normal rendering fluctuations. For each candidate solidification region, the page difference values ​​located in the candidate solidification region and its boundary extension region in the page difference map are added together to obtain the corresponding pre-solidification residual difference amount; the maximum value among all pre-solidification residual differences is taken, and a quantization step size of the page difference value is increased to obtain the effective difference threshold.

[0084] S4. Perform local temporary hardening verification on the area to be verified.

[0085] For each region to be verified on the current page, the rectangular area enclosed by the region to be verified and its boundary band is defined as the local verification window. Since the boundary band uses the same preset boundary width as the aforementioned boundary extension region, the page range covered by the local verification window is consistent with the union of the candidate solidified region and its boundary extension region used when calculating the residual difference before solidification.

[0086] Based on the page coordinates of the local validation window, read the text objects, vector objects, ordinary image objects, object attributes, and object stacking relationships that intersect with the local validation window from the standard page file. For page objects that cross the boundaries of the local validation window, render them first as complete page objects, and then crop the rendered results according to the boundaries of the local validation window.

[0087] At the preset analysis resolution, the page content corresponding to the local verification window is rendered as a temporary solidified image for verification. The temporary solidified image for verification records the pixel results of the original structured page content within the local verification window, but no longer retains the text encoding, vector paths, and transparency attributes.

[0088] The preset analysis resolution is greater than or equal to the low resolution and less than or equal to the target print resolution. A local calibration window containing known text strokes, vector edges, and region boundaries is prepared in advance, and this window is repeatedly rendered at multiple candidate analysis resolutions arranged from low to high. For each candidate analysis resolution, the object edge position in its rendering result is compared with the corresponding object edge position rendered at the target print resolution. If the maximum edge position deviation does not exceed one pixel of a candidate analysis resolution, page transitions within the boundary band can be detected in the repeated rendering results, and the local rendering data volume, memory usage, and processing time do not exceed the pre-configured upper limits for verification data volume, verification memory, and verification processing time, respectively, the first candidate analysis resolution that meets these conditions is set as the preset analysis resolution.

[0089] After obtaining the temporary solidified image for verification, the current page is copied to form a temporary page copy used only for the current verification area. For structured page objects that are completely within the local verification window, the corresponding page objects are deleted from the temporary page copy; for structured page objects that intersect with the boundary of the local verification window, the object portions outside the local verification window are retained, and the object portions within the local verification window are excluded by the clipping range corresponding to the boundary of the local verification window.

[0090] The temporary fixed image for verification is written to the same position in the temporary page copy according to the page start coordinates and page physical size of the local verification window, so that the original structured page content in the local verification window is replaced by the temporary fixed image for verification.

[0091] Keeping the target page mapping parameters, printable area cropping rules, color mode conversion rules, and page presentation conversion rules of the current page unchanged, the boundaries of the local verification window are converted to the target output page coordinates according to the target page mapping parameters to obtain the local verification target range.

[0092] The local verification target range is expanded outward by a preset context width to obtain the local verification rendering range. When the expanded local verification rendering range exceeds the target output page boundary, the target output page boundary is used as the actual boundary of the local verification rendering range. The preset context width at least covers the maximum pixel neighborhood range used for low-resolution rendering, anti-aliasing, and edge extraction, and also covers the low-resolution pixel range corresponding to the overall displacement threshold.

[0093] Read the page objects from the temporary page copy that intersect with the local verification rendering range after being mapped to the target page, and include other page objects that can affect the display result of the local verification rendering range through transparency overlay, blending, or clipping. Perform target constraint processing only on the page content within the local verification rendering range, and write the processing result to a temporary comparison canvas of the same size as the original low-resolution page image, according to the position of the local verification rendering range in the target output page.

[0094] When the page alignment parameter of the current page is non-zero, the temporary comparison canvas is translated in the same reverse direction as the target constraint low-resolution page image according to the page alignment parameter; when the page alignment parameter is zero, the position of the page content in the temporary comparison canvas remains unchanged.

[0095] Based on the low-resolution pixel range used to calculate the residual difference in the current region to be verified before solidification, the corresponding center pixel range is extracted from the temporary comparison canvas after page alignment parameter processing to obtain the temporarily solidified target image. Page content outside the center pixel range in the local verification rendering range is only used to provide the context required for edge extraction and anti-aliasing processing, and is not included in the residual difference and boundary addition difference after temporary solidification.

[0096] Extract the pixel range that is the same as the center pixel range from the original low-resolution page image to obtain the reference image. Then, compare the reference image and the temporary solidified target image pixel by pixel according to the grayscale difference calculation method and edge difference calculation method used when generating the page difference map.

[0097] For each pixel location, the grayscale value of the temporary fixed target image is subtracted from the grayscale value of the reference image, and the absolute value is taken to obtain the temporary grayscale difference value; the edge intensity of the temporary fixed target image is subtracted from the edge intensity of the reference image, and the absolute value is taken to obtain the temporary edge difference value. The temporary grayscale difference value and the temporary edge difference value are weighted and superimposed according to the aforementioned grayscale difference weight and edge difference weight to obtain the local temporary page difference value.

[0098] The residual difference after temporary solidification is obtained by summing all the local temporary page difference values ​​within the local verification window. The residual difference before solidification and the residual difference after temporary solidification use the same local verification window, the same pixel difference calculation method, and the same weight, thus allowing for direct comparison.

[0099] like Figure 4 The diagram shows a pairwise graph of residual differences before and after local temporary hardening of the regions to be verified. The horizontal axis represents the residual difference, and the vertical axis arranges different regions to be verified sequentially. Orange dots represent the residual difference before hardening of each region to be verified, and blue dots represent the residual difference after temporary hardening of the same region to be verified. The horizontal line connecting the orange and blue dots at the same vertical position represents the change in residual difference before and after local temporary hardening of the same region to be verified. When the blue dot is to the left of the corresponding orange dot, it indicates that the residual difference after temporary hardening is less than the residual difference before hardening, that is, local temporary hardening reduces the page difference in this local verification window. The larger the horizontal distance between the blue and orange dots, the greater the improvement in residual difference of the region to be verified. Most of the blue dots in the figure are to the left of the corresponding orange dots, indicating that the residual difference of the page is reduced to varying degrees after local temporary hardening of the corresponding regions to be verified. For regions to be verified with a large residual difference before hardening, the range of change in difference before and after hardening is also correspondingly larger.

[0100] S5. Calculate the net improvement value and determine the final solidified area or the entire solidified page.

[0101] The areas to be verified on the current page are processed in descending order of the residual difference before curing; if the residual difference before curing is the same, they are processed in descending order of the area of ​​the area to be verified; if the area is still the same, they are processed in descending order of the page coordinates of the top left corner of the area to be verified.

[0102] For the current area to be verified, the residual difference is subtracted from the residual difference after temporary curing to obtain the residual difference improvement.

[0103] Based on the target page mapping parameters, the page boundary of the current area to be verified is transformed to the coordinates of the target output page, and the horizontal boundary difference and vertical boundary difference of the transformed area are calculated to obtain the physical width and physical height of the current area to be verified in the target output page.

[0104] When the physical width and height are expressed in millimeters, divide each by the millimeter length corresponding to one inch to convert them to inches. Multiply the converted physical width by the horizontal printing resolution in the target printing resolution to obtain the horizontal pixel value; multiply the converted physical height by the vertical printing resolution in the target printing resolution to obtain the vertical pixel value. Round both the horizontal and vertical pixel values ​​up to obtain the number of horizontal and vertical pixels in the locally solidified image, and multiply them together to obtain the expected total number of pixels in the locally solidified image.

[0105] In the same manner, based on the physical width, physical height and target printing resolution of the target output page, calculate the horizontal and vertical pixel counts of the entire page of the solidified image, and multiply the two to obtain the expected total number of pixels of the entire page of the solidified image.

[0106] Multiply the expected total number of pixels in the locally solidified image by the number of color channels corresponding to the target color mode, and then multiply by the number of pixels in each color channel to obtain the expected number of bits in the locally solidified image; divide the expected number of bits in the locally solidified image by the number of bits contained in each byte, and round up if the result is not an integer to obtain the expected amount of data in the locally solidified image.

[0107] In the same manner, the expected data volume of the entire page of the solidified image is calculated based on the expected total number of pixels, the number of color channels corresponding to the target color mode, and the number of pixels per color channel.

[0108] The solidified data cost is obtained by dividing the expected data volume of the partially solidified image by the expected data volume of the full-page solidified image. The solidified data cost is a dimensionless ratio ranging from zero to one, representing the ratio of the expected uncompressed pixel resource size of the partially solidified image to the expected uncompressed pixel resource size of the full-page solidified image, under the same target print resolution, number of color channels, and pixel bits per channel. The solidified data cost mentioned above is only used to compare the relative image resource costs of partially solidified and full-page solidified images under a unified estimation caliber; it does not represent the actual file size in bytes of the mixed transfer document, the actual job data volume in the target Windows print queue, or the actual cache usage. When the partially solidified image and the full-page solidified image use the same target print resolution, number of color channels, and pixel bits per channel, the solidified data cost mainly increases as the proportion of the current area to be verified to the area of ​​the target output page increases.

[0109] Calculate the new boundary difference. For each pixel in the boundary band of the local verification window, read the unfixed page difference value of that pixel from the original page difference map, and read the temporarily fixed page difference value of that pixel from the local temporary page difference result corresponding to the temporarily fixed target image. Subtract the unfixed page difference value from the temporarily fixed page difference value. If the difference is greater than zero, the difference is recorded as the new difference of that pixel; if the difference is less than or equal to zero, the new difference of that pixel is recorded as zero. Add the new differences of all pixels in the boundary band to obtain the new boundary difference.

[0110] Before calculating the net improvement value, the residual difference improvement, the cost of solidified data, and the new difference at the boundary are normalized respectively.

[0111] When the number of pixels in the local verification window is greater than zero, the maximum page difference value allowed for a single pixel is multiplied by the number of pixels in the local verification window to obtain the maximum difference amount of the local verification window. The residual difference improvement amount is then divided by the maximum difference amount of the local verification window to obtain the normalized residual difference improvement amount. A negative residual difference improvement amount retains its negative sign. When the number of pixels in the local verification window is zero, the net improvement value of the current region to be verified is not calculated, and the current region to be verified is included in the unresolved difference region. The solidified data cost is expressed as the ratio of the expected uncompressed pixel resources of the locally solidified image to the expected uncompressed pixel resources of the entire page solidified image, and is directly used as the normalized solidified data cost. When the number of pixels in the boundary band is greater than zero, the maximum page difference value allowed for a single pixel is multiplied by the number of pixels in the boundary band to obtain the maximum difference amount of the boundary band. The new boundary difference amount is then divided by the maximum boundary band difference amount to obtain the normalized new boundary difference amount. When the number of pixels in the boundary band is zero, the normalized new boundary difference amount is set to zero.

[0112] The net improvement value of the current region to be validated is calculated according to the following relationship: The net improvement value equals the product of the improvement weight and the normalized residual difference improvement, minus the product of the data cost weight and the normalized solidified data cost, and then minus the product of the boundary difference weight and the normalized boundary new difference.

[0113] The improvement weight, data cost weight, and boundary difference weight are all non-negative values, and their sum is one. The upper limit of normal boundary fluctuation is determined by the calibration area where the region boundary does not cross the page object. Calibration areas where the residual difference after temporary fixation is less than the residual difference before fixation and the newly added boundary difference does not exceed the upper limit of normal boundary fluctuation are defined as effective fixation areas. Calibration areas where the residual difference after temporary fixation is greater than or equal to the residual difference before fixation, or where the residual difference after temporary fixation is less than the residual difference before fixation but the newly added boundary difference exceeds the upper limit of normal boundary fluctuation, are defined as invalid fixation areas.

[0114] When both the effective and ineffective solidified region sets are not empty, multiple candidate weight combinations are generated according to a preset weight step size. The net improvement value for each effective and ineffective solidified region is calculated, and for each candidate weight combination, the difference between the minimum net improvement value of the effective solidified region and the maximum net improvement value of the ineffective solidified region is calculated to obtain the net improvement interval. The candidate weight combination with the largest net improvement interval is selected as the improvement weight, data cost weight, and boundary difference weight. When multiple candidate weight combinations correspond to the same net improvement interval, the candidate weight combination with the largest improvement weight is selected.

[0115] When the set of effective solidified regions or the set of invalid solidified regions is empty, the current calibration result is determined as an invalid calibration result, and the improvement weight, data cost weight, boundary difference weight and net improvement threshold are not updated using the invalid calibration result; when the current print driver does not have any saved effective weights and net improvement thresholds, local solidification decision is not performed on the candidate solidified regions that have reached the effective difference threshold, and the corresponding page is marked as a full-page solidified page.

[0116] When the minimum net improvement value of the effective solidification area is greater than the maximum net improvement value of the ineffective solidification area, half of the sum of the two is set as the net improvement threshold; when there is an overlap between the two types of net improvement values, the net improvement values ​​of each effective solidification area and ineffective solidification area are arranged from smallest to largest, and the median value between adjacent net improvement values ​​is used as the candidate net improvement threshold. The candidate net improvement threshold that minimizes the sum of the number of misjudgments in the effective solidification area and the number of misjudgments in the ineffective solidification area is selected; when multiple candidate net improvement thresholds correspond to the same minimum number of misjudgments, the candidate net improvement threshold with the larger value is selected.

[0117] When the net improvement value of the current region to be verified is less than or equal to the net improvement threshold, determine whether the current region to be verified meets the region expansion condition.

[0118] Calculate the shortest page distance between the current region to be verified and the adjacent candidate solidification regions. When the two regions intersect, the shortest page distance is zero; when the two regions overlap in either the horizontal or vertical direction, the boundary spacing in the other direction is used as the shortest page distance; when the two regions do not overlap in either the horizontal or vertical direction, the page distance between the nearest boundary points of the two regions is used as the shortest page distance.

[0119] When the distance between the current region to be verified and the adjacent candidate solidified region is less than the expansion distance threshold, or when the amount of new boundary difference within the boundary band of the current region to be verified is greater than the boundary difference threshold, the current region to be verified is determined to meet the region expansion condition.

[0120] The extended distance threshold is pre-determined based on the maximum spacing between multiple differentially connected regions formed by the same text object, vector object, or ordinary image object. The shortest page distance between differentially connected regions belonging to the same page object on the calibrated page is calculated, and the maximum value among all shortest page distances is obtained. This maximum value is then summed with the page distance corresponding to a low-resolution pixel in the page coordinate system and set as the extended distance threshold.

[0121] The boundary difference threshold is pre-determined based on the maximum normal boundary increase difference formed when the region boundary does not cross any page object during local temporary fixing, and the sum of the maximum normal boundary increase difference and a quantization step of the page difference value is set as the boundary difference threshold.

[0122] When the region expansion conditions are met, adjacent candidate solidification regions are selected from those not yet marked as low-impact regions, regions requiring no solidification, ultimately solidified regions, or regions with unresolved differences, and which have not yet participated in other expansion verifications. When the distance between the current region to be verified and adjacent candidate solidification regions is less than the expansion distance threshold, the candidate solidification region with the smallest shortest page distance is selected; when multiple candidate solidification regions have the same shortest page distance, the candidate solidification region with the largest cumulative difference value is selected. When the amount of new differences at the boundary exceeds the boundary difference threshold, the amount of new differences on the upper, lower, left, and right sides of the boundary band is counted, and the boundary direction with the largest amount of new differences is selected; when the amount of new differences in multiple directions is the same, the direction with the smallest distance to the corresponding mergeable candidate solidification regions is selected, and the intersecting or closest candidate solidification region is selected in that direction. When no adjacent candidate solidification regions satisfying the above conditions are found, the current region to be verified is determined not to meet the region expansion conditions.

[0123] Obtain the minimum bounding rectangle of the current region to be verified, the selected adjacent candidate solidification regions, and the page interval between them. Define the minimum bounding rectangle as the extended verification region. Subsequently, redefine the boundary band and local verification window according to the extended verification region. Regenerate the temporary solidified image and the temporary solidified target image for verification using the same processing method as the current region to be verified. Recalculate the residual difference before solidification, the residual difference after temporary solidification, the solidification data cost, the new difference at the boundary, and the net improvement value.

[0124] When the net improvement value of the extended verification region is greater than the net improvement threshold, the extended verification region is determined as the final solidification region, and the separate processing status of the current region to be verified and the adjacent candidate solidification regions participating in the merging is cancelled.

[0125] When the net improvement value of the expanded verification region is less than or equal to the net improvement threshold, the expanded verification region is recorded as an unresolved difference region, and the current region to be verified and the adjacent candidate solidification regions participating in the merging are marked as processed, and local temporary solidification verification is no longer performed separately on them. When the current region to be verified does not meet the region expansion conditions, the current region to be verified is directly recorded as an unresolved difference region, and the current region to be verified is marked as processed.

[0126] After processing all areas to be verified on the current page in the above manner, calculate the cumulative area of ​​all finalized areas on the current page. The cumulative area is calculated based on the geometric union area of ​​each finalized area after transformation by the target page mapping parameters, and the overlapping part between the finalized areas is calculated only once.

[0127] When the cumulative area of ​​the final solidified area exceeds the threshold for the local solidified area of ​​the page, the current page will be marked as a fully solidified page.

[0128] The page local fixation area threshold is predetermined based on a comparison between the estimated total resources for local fixation and the estimated resources for the entire page's fixed image. The estimated total resources for local fixation include the estimated uncompressed pixel resources of all locally fixed images and the fixed data overhead of each local image object; the fixed data overhead is determined based on the difference in document data volume before and after adding a blank local image object to the fixed page document format. When the estimated total resources for local fixation first reach or exceed the estimated resources for the entire page's fixed image, the product of the corresponding local fixation area ratio and the printable area of ​​the current page is determined as the page local fixation area threshold.

[0129] Simultaneously, the cumulative difference value of all unresolved difference regions is calculated. The cumulative difference value is obtained by adding the page difference values ​​located within the unresolved difference regions in the page difference map; overlapping pixels between unresolved difference regions are only counted once.

[0130] When the cumulative number of unresolved differences in a region exceeds the unresolved difference threshold, the current page will also be marked as a fixed page.

[0131] The unresolved difference threshold is pre-determined based on the amount of page-level residual difference when both page content and target page mapping parameters remain unchanged. For each calibrated page, the page ranges marked as low-impact areas and areas that do not require fixing are merged, and the page difference values ​​within the merged range in the page difference map are added together to obtain the normal page-level residual difference amount for the corresponding calibrated page. The maximum value among all normal page-level residual differences for all calibrated pages is obtained, and the sum of this maximum value and a quantization step size of the page difference value is set as the unresolved difference threshold.

[0132] When the current page is marked as a full-page solidified page, the already determined final solidified areas in the current page will no longer generate partial solidified images separately, and the full-page solidified image will be generated directly in the future; when the current page is not marked as a full-page solidified page, the determined final solidified areas in the current page will be retained, and the generation of partial solidified images will continue.

[0133] S6. Generate a mixed transfer document and submit it to the target Windows print queue.

[0134] After processing all pages in the standard page file, generate a hybrid transition document in page order.

[0135] For pages not marked as full-page fixed pages, the page content in the standard page file is processed using the same target page mapping parameters, printable area cropping rules, color mode conversion rules, and page representation conversion rules as when generating the target-constrained low-resolution page image, forming a base page. Ordinary image objects generated through page representation conversion are retained in the base page; other page objects in low-impact areas and areas that do not require fixing continue to maintain their structured page representation.

[0136] Before generating the locally cured image, the geometric union of the adjoining or overlapping final cured regions is calculated. Each final cured region is mapped to the target output page and expanded outward by a preset overlap width to obtain the target cured writing area; the portion exceeding the printable area is truncated according to the printable area boundary. The preset overlap width is determined based on the larger of the page distance corresponding to at least one pixel at the target printing resolution and the page distance corresponding to the largest pixel neighborhood in anti-aliasing processing.

[0137] Read text objects, vector objects, and ordinary image objects that can affect the display result of the target solidified writing area, as well as their transparent, blended, or cropped associated objects. Perform local rendering at the target print resolution according to the original stacking relationship to generate an opaque locally solidified image that contains the complete display result of the target solidified writing area.

[0138] In the base page, page objects with a positional relationship to the target solidified writing area are identified. These page objects include ordinary image objects transformed through page representation and page objects that maintain the structured page representation. For page objects completely located within the target solidified writing area, the corresponding page objects are deleted from the base page. For page objects intersecting the boundary of the target solidified writing area, if the object can be independently cropped while maintaining the display result outside the target solidified writing area, the portion of the object outside the target solidified writing area is retained, and a cropping range excluding the portion of the object within the target solidified writing area is generated according to the boundary of the target solidified writing area. If independent cropping is not possible, the complete influence range of the object and its associated page objects in the page coordinate system is incorporated into the target solidified writing area, and the relevant page objects are reread based on the adjusted target solidified writing area to regenerate the opaque locally solidified image. For page objects completely located outside the target solidified writing area, their page content, page coordinates, and stacking relationships remain unchanged. When the geometric union area of ​​all target solidified writing regions after the complete influence range adjustment exceeds the local solidified area threshold of the page, the current page is converted into a full-page solidified page, the current base page copy is discarded, local solidified image writing and mixed page generation are no longer executed, and the process is switched to full-page solidified image generation.

[0139] When the geometric union area of ​​all target solidified writing areas after the complete influence range adjustment does not exceed the page local solidified area threshold, the aforementioned page object deletion or cropping process is completed. The opaque local solidified image is written into the corresponding position in the base page according to the page coordinates corresponding to the target solidified writing area, so that the page display result of the target solidified writing area is formed by the opaque local solidified image, generating a hybrid page.

[0140] It should be noted that for page objects that cross the boundary of the target solidified write area, the portion of the object outside the target solidified write area will continue to be preserved according to the original page coordinates, object attributes and stacking relationship; the portion of the object within the target solidified write area will no longer be written to the hybrid page.

[0141] For the current page marked as a full-page solidified page, a high-resolution rendering is performed on the entire current page according to the target page mapping parameters, target paper size, target print resolution, and target Windows print queue color mode, generating a full-page solidified image that covers the target output page. Subsequently, an output page with the same size as the target paper is created, and the full-page solidified image is written to the output page.

[0142] Following the original page order in the standard page file, each mixed page or output page is sequentially written to a fixed-page output document supported by the target Windows print queue, forming a mixed transfer document. The format of the fixed-page output document and the corresponding job data type correspond to the fixed-page input format recorded when the page representation capability set was established. Each page object and fixed image is written according to the coordinates of the target output page.

[0143] After generating the hybrid transfer document, the printing parameters are associated with the hybrid transfer document, and the print job submission interface of the Windows printing system is called according to the job data type to submit the hybrid transfer document and printing parameters to the target Windows print queue.

[0144] After receiving the mixed transfer document, the target Windows print queue completes the print output through the corresponding Windows print driver. Among them, the region-level fixed image and the ordinary image object formed by object-level pre-composite are processed as ordinary image objects, and other page objects retained in the base page are processed according to their corresponding structured page expression methods.

[0145] Example 2: Based on Example 1, this example provides a HarmonyOS heterogeneous printing adapter system based on a printing hub, such as... Figure 5 The diagram shown is a framework diagram of the HarmonyOS heterogeneous printing transfer system based on the printing hub, which includes: a job receiving and standard page generation module, a target constraint image generation module, a candidate solidified region generation module, a local temporary solidified verification module, a solidified region decision module, and a hybrid transfer document generation module.

[0146] The job receiving and standard page generation module is used to receive print job packages sent by the HarmonyOS terminal, convert the document-type print jobs in the print job package into standard page files with page coordinate systems, and determine the target Windows print queue based on the target printing device identifier in the print job package.

[0147] The target constraint image generation module is used to generate original low-resolution page images for pages in a standard page file, and to generate target constraint low-resolution page images after performing target constraint processing on the same page according to the output parameters of the target Windows print queue and the corresponding page expressiveness information.

[0148] The candidate curing region generation module is used to generate candidate curing regions based on the page difference map between the original low-resolution page image and the target constrained low-resolution page image, and to determine the amount of residual difference in the candidate curing regions before curing based on the page difference map.

[0149] The local temporary curing verification module is used to select candidate curing areas where the residual difference before curing reaches the effective difference threshold as the areas to be verified, and perform local temporary curing verification on the areas to be verified at a preset analysis resolution to obtain a temporary curing target image.

[0150] The solidified region decision module is used to determine the residual difference and the new boundary difference after temporary solidification based on the comparison results between the temporary solidified target image and the original low-resolution page image. It determines the solidification data cost based on the region to be verified, and determines the net improvement value of the region to be verified based on the residual difference before solidification. Based on the net improvement value, it determines the final solidified region or the entire page to be solidified.

[0151] The hybrid transfer document generation module is used to perform partial rendering at the target print resolution on the final solidified area or full-page rendering at the target print resolution on the entire solidified page, generate a hybrid transfer document, and submit the hybrid transfer document to the target Windows print queue.

[0152] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A HarmonyOS heterogeneous printing transition method based on a printing hub, characterized in that, Applied to printing hubs, including: Receive print job packets sent by the HarmonyOS terminal, convert the document-type print jobs in the print job packets into standard page files with page coordinate systems, and determine the target Windows print queue based on the target print device identifier in the print job packets; For the pages in the standard page file, an original low-resolution page image is generated, and target constraint processing is performed on the same page according to the output parameters of the target Windows print queue and the corresponding page expressiveness information to generate a target constraint low-resolution page image. Candidate curing regions are generated based on the page difference map between the original low-resolution page image and the target constrained low-resolution page image, and the amount of residual difference in the candidate curing regions before curing is determined based on the page difference map. Candidate curing regions whose residual difference before curing reaches the effective difference threshold are selected as regions to be verified. Local temporary curing verification is performed on the regions to be verified at a preset analysis resolution to obtain a temporary curing target image. Based on the comparison results between the temporarily solidified target image and the original low-resolution page image, the residual difference and the new boundary difference after temporary solidification are determined. Based on the area to be verified, the solidification data cost is determined. Combined with the residual difference before solidification, the net improvement value of the area to be verified is determined. Based on the net improvement value, the final solidified area or the entire page of solidified page is determined. Perform partial rendering at the target print resolution on the final cured area or full-page rendering at the target print resolution on the entire cured page to generate a hybrid transfer document, and submit the hybrid transfer document to the target Windows print queue.

2. The HarmonyOS heterogeneous printing transition method based on a printing hub according to claim 1, characterized in that, Converting document-type print jobs in the print job package into standard page files with a page coordinate system includes: Receive a print job package sent by the HarmonyOS terminal, wherein the print job package includes a document-type print job, print parameters, and a target printing device identifier; Determine the file format of the document-type print job; When the document-type print job is a PDF file, the PDF file is used as the standard page file; When the document-type print job is an image file, the image is written into the page coordinate system of the standard page file according to the paper size and page orientation in the print parameters; When the document-type print job is an Office document, web page document, or other convertible document, the document conversion component deployed on the print hub side is invoked to convert the document-type print job into a PDF file or XPS file, and the converted PDF file or XPS file is used as a standard page file.

3. The HarmonyOS heterogeneous printing transition method based on a printing hub according to claim 1, characterized in that, Based on the output parameters of the target Windows print queue and the corresponding page expressiveness information, target constraint processing is performed on the same page, including: Read the target paper size, print resolution, printable area, default page orientation, color mode, and fixed page input format supported by the target Windows print queue; Based on the print driver identifier, print driver version, and fixed page input format corresponding to the target Windows print queue, obtain the set of page expression capabilities corresponding to the supported states of the record transparency attribute, blending mode, and clipping path type; Based on the target paper size, printable area, and default page orientation, generate target page mapping parameters; Based on the target page mapping parameters, the page coordinates in the standard page file are mapped to the printable area coordinates corresponding to the target Windows print queue, and the page execution direction is adjusted, the printable area is clipped, and the page representation method supported by the target Windows print queue is converted.

4. The HarmonyOS heterogeneous printing transition method based on a printing hub according to claim 1, characterized in that, Candidate solidification regions are generated based on the page difference map between the original low-resolution page image and the target constrained low-resolution page image, including: The original low-resolution page image and the target constrained low-resolution page image are respectively grayscaled, and within the displacement search range predetermined based on the position fluctuations generated by repeated low-resolution rendering, the overall page displacement is calculated based on the horizontal projection sequence and the vertical projection sequence of the two. When the overall page displacement is greater than zero and less than or equal to the overall displacement threshold, the target constrained low-resolution page image is translated in the reverse direction so that it is in the same comparison coordinate system as the original low-resolution page image. When the overall page displacement is zero or greater than the overall displacement threshold, the target constrained low-resolution page image is not translated in reverse. The overall page displacement exceeding the overall displacement threshold is reflected in the subsequently generated page difference map through the difference between corresponding pixels of the two types of low-resolution page images. Pixel difference calculation is performed on the two types of low-resolution page images processed above to obtain grayscale difference maps, and edge extraction is performed on the two types of low-resolution page images processed above to obtain edge difference maps. The grayscale difference map and the edge difference map are weighted and superimposed to obtain the page difference map.

5. The HarmonyOS heterogeneous printing transition method based on a printing hub according to claim 4, characterized in that, Candidate solidification regions are generated based on the page difference map, including: The pixel difference values ​​in the page difference map are compared with the difference threshold to generate a difference mask; Noise removal and connectivity analysis are performed on the difference mask to obtain the difference connected regions; Calculate the bounding rectangle of the differential connected region in the page coordinate system, and expand the bounding rectangle according to a preset expansion distance to obtain the candidate solidified region; When the area of ​​a candidate solidified region is less than the noise area threshold, and the cumulative difference value within the candidate solidified region is less than the noise difference threshold, the candidate solidified region is marked as a low-impact region. In the subsequent page generation process, the low-impact region will not be fully solidified at the region level, and the page content of the low-impact region will be retained according to the target constraint processing result.

6. The HarmonyOS heterogeneous printing transition method based on a printing hub according to claim 1, characterized in that, Based on the page difference map, determine the residual difference before curing of the candidate curing region, and perform local temporary curing verification on the region to be verified, including: The boundary of the candidate curing region is extended outward by a preset boundary width, and the newly added page range is determined as the boundary extension region. The difference between the candidate curing region and its boundary extension region is calculated based on the page difference map to obtain the residual difference before curing. When the residual difference before curing is less than the effective difference threshold, the candidate curing area is marked as an area that does not need to be cured. No area-level complete curing is performed on the area that does not need to be cured, and the page content of the area that does not need to be cured is retained according to the target constraint processing result. When the residual difference before curing is greater than or equal to the effective difference threshold, the candidate curing region is taken as the region to be verified, the boundary extension region corresponding to the candidate curing region is taken as the boundary band of the region to be verified, and a local verification window is determined based on the region to be verified and its boundary band. At a preset analysis resolution, the structured page content corresponding to the local verification window is rendered from the standard page file to obtain a temporary solidified image for verification.

7. The HarmonyOS heterogeneous printing transition method based on a printing hub according to claim 6, characterized in that, Based on the comparison between the temporarily solidified target image and the original low-resolution page image, the residual difference and the newly added boundary difference after temporary solidification are determined. The solidification data cost is determined based on the region to be verified, and the net improvement value of the region to be verified is determined in conjunction with the residual difference before solidification, including: The structured page content located within the local verification window in the standard page file is replaced with the temporary solidified image used for verification, and target constraint processing and low-resolution rendering are performed only on the local verification window to obtain the temporary solidified target image; Calculate the difference between the original low-resolution page image and the temporarily solidified target image within the same local verification window to obtain the residual difference after temporary solidification; The residual difference improvement amount is obtained based on the difference between the residual difference amount before curing and the residual difference amount after temporary curing; The solidification data cost is obtained based on the amount of locally solidified image data expected to be generated in the area to be verified at the target printing resolution. The amount of difference added to the boundary is obtained based on the amount of difference added to the temporary solidified target image within the boundary band of the local verification window relative to the original low-resolution page image; The net improvement value is calculated based on the residual difference improvement amount, the cost of solidified data, and the amount of new boundary difference, wherein the net improvement value increases with the increase of the residual difference improvement amount and decreases with the increase of the cost of solidified data and the amount of new boundary difference.

8. The HarmonyOS heterogeneous printing transition method based on a printing hub according to claim 7, characterized in that, Determining the final cured area or the entire cured page based on the net improvement value includes: When the net improvement value of the area to be verified is greater than the net improvement threshold, the area to be verified is determined as the final solidified area. When the net improvement value of the region to be verified is less than or equal to the net improvement threshold, it is determined whether the region to be verified meets the region expansion condition. If the distance between the region to be verified and the adjacent candidate solidified region is less than the extended distance threshold, or the amount of new boundary difference within the boundary band of the region to be verified is greater than the boundary difference threshold, then the region to be verified and the adjacent candidate solidified region are merged into an extended verification region, and low-resolution local verification is re-executed on the extended verification region. When the net improvement value of the extended verification region is greater than the net improvement threshold, the extended verification region is determined as the final solidification region; When the net improvement value of the extended verification region is less than or equal to the net improvement threshold, the extended verification region is included in the unresolved difference region. If the region to be verified does not meet the region expansion conditions, then the region to be verified will be included in the unresolved difference region. When the cumulative area of ​​the final solidified area exceeds the threshold for the local solidified area of ​​the page, or when the cumulative difference of the unresolved difference area exceeds the threshold for the unresolved difference, the current page will be marked as a page-wide solidified page.

9. The HarmonyOS heterogeneous printing transition method based on a printing hub according to claim 3, characterized in that, Generate a hybrid transfer document, including: For pages not marked as full-page fixed pages, copy the structured page content of the page in the standard page file, and process the copied page content according to the target constraint processing used when generating the target constraint low-resolution page image to obtain the base page; The base page includes ordinary image objects transformed by page expression methods, and at least one of text objects, vector objects, or ordinary image objects that maintain the structured page expression; When multiple final cured regions are adjacent or overlap, the geometric union of the adjacent or overlapping final cured regions is calculated, and the final cured regions participating in the merging are replaced by the geometric union. For each final solidified area, the final solidified area is converted into a target solidified area in the target output page according to the target page mapping parameters, and the boundary of the target solidified area is extended outward by a preset overlap width to obtain the target solidified writing area. When the target solidified writing area exceeds the printable area, the boundary of the printable area is used as the actual boundary of the target solidified writing area. The system reads structured page objects from the standard page file that can affect the display result of the target solidified writing area, and performs local rendering at the target printing resolution according to the stacking relationship of the page objects to generate an opaque local solidified image containing the complete page display result of the target solidified writing area. Remove the page object that is completely located within the target solidified write area from the base page; For page objects that intersect with the boundary of the target solidified writing area, when the page object can be independently clipped while keeping the display result outside the target solidified writing area unchanged, the part of the object outside the target solidified writing area is retained, and the part of the object inside the target solidified writing area is excluded by the clipping range corresponding to the boundary of the target solidified writing area. When a page object cannot be cropped independently, the entire influence range of the page object and its associated page objects is incorporated into the target solidified writing area. Based on the adjusted target solidified writing area, page objects that can affect the display result are reread. The opaque local solidified image is regenerated according to the stacking relationship of the page objects. Page object deletion or cropping is performed within the adjusted target solidified writing area. When the geometric union area of ​​each target solidified writing area after the full influence range adjustment exceeds the preset page local solidified area threshold, the current page is marked as a whole page solidified page, and opaque local solidified images are no longer written to the base page; When the geometric union area of ​​each target solidified writing area after the complete influence range adjustment does not exceed the preset page local solidified area threshold, the opaque local solidified image is written into the base page that has completed the aforementioned object deletion or cropping process according to the page coordinates corresponding to the target solidified writing area, and a hybrid page is generated. For pages marked as full-page solidified pages, perform high-resolution rendering on the entire page according to the target printing resolution to generate a full-page solidified image, and use the full-page solidified image to generate the output page of the page; Following the original page order, each mixed page or output page is written into the same output document to generate a mixed transfer document, and the mixed transfer document and printing parameters are submitted to the target Windows print queue.

10. A HarmonyOS heterogeneous printing adapter system based on a printing hub, characterized in that: include: The job receiving and standard page generation module is used to receive print job packages sent by the HarmonyOS terminal, convert the document-type print jobs in the print job package into standard page files with page coordinate systems, and determine the target Windows print queue according to the target printing device identifier in the print job package. The target constraint image generation module is used to generate an original low-resolution page image for the page in the standard page file, and to generate a target constraint low-resolution page image after performing target constraint processing on the same page according to the output parameters of the target Windows print queue and the corresponding page expressive capability information. The candidate solidification region generation module is used to generate candidate solidification regions based on the page difference map between the original low-resolution page image and the target constrained low-resolution page image, and to determine the amount of residual difference in the candidate solidification region before solidification based on the page difference map. The local temporary curing verification module is used to select candidate curing areas where the residual difference before curing reaches the effective difference threshold as the areas to be verified, and to perform local temporary curing verification on the areas to be verified at a preset analysis resolution to obtain a temporary curing target image. The solidified area decision module is used to determine the residual difference and the new boundary difference after temporary solidification based on the comparison result between the temporary solidified target image and the original low-resolution page image, determine the solidification data cost based on the area to be verified, and determine the net improvement value of the area to be verified based on the residual difference before solidification, and determine the final solidified area or the entire page of solidified page based on the net improvement value. The hybrid transfer document generation module is used to perform partial rendering at the target print resolution on the final solidified area or full-page rendering at the target print resolution on the entire solidified page, generate a hybrid transfer document, and submit the hybrid transfer document to the target Windows print queue.