File printing system and method, computer equipment and readable storage medium

By grouping and merging the file list in parallel on the server side, the problems of disordered file printing and low efficiency are solved, realizing efficient and flexible file printing, adapting to various printer types, and improving printing efficiency.

CN121704790APending Publication Date: 2026-03-20LONGYING ZHIDA (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511496223.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-20
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing document printing solutions are prone to causing document order errors and have low printing efficiency, especially in batch document printing in the financial or accounting fields.

Method used

The system employs a server-side approach to group and merge file lists in parallel, generating a task list. The file groups are then merged using asynchronous, parallel merging tasks, and the merged file groups are sent to a printer or front-end browser for printing. It supports adaptation to various printer types.

Benefits of technology

It effectively avoids file order disorder, improves printing efficiency, reduces processing time, and enables parallel printing when a printer cluster exists, adapting to different types of printers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121704790A_ABST
    Figure CN121704790A_ABST
Patent Text Reader

Abstract

The invention provides a file printing system and method, computer equipment and a readable storage medium, and relates to the field of file printing. The system comprises a server, a front-end browser and a printer, wherein the server side is used for obtaining a to-be-printed file list in response to a file printing request; grouping the file list according to target information to obtain a plurality of file groups, generating a task list, and setting task states corresponding to the file groups in the task list to be to-be-merged; creating an asynchronous parallel merging task, and performing file merging on each file group according to a file sequence in the group based on the task list; in the task list, modifying the task state corresponding to the merged file group into merging completion; and sending the combined file groups to the printer or the front-end browser so as to realize file printing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of document printing, and in particular to a document printing system, method, computer device, and readable storage medium. Background Technology

[0002] In the financial or accounting industry, there is often a need to process a large number of receipts and statements, especially in business scenarios such as monthly statements, which are usually concentrated on specific dates, generating a large demand for printing. Therefore, a method is needed to efficiently organize and print these documents, reducing manual operations, ensuring correct document order, while also supporting categorized printing and quick reprinting of misprinted pages.

[0003] Most printing solutions in related technologies involve submitting documents to the printer in batches for printing one copy at a time. This approach can lead to document order issues if the printer has other jobs running, and if the printer does not support batch printing, each document needs to be opened and printed separately, reducing printing efficiency. Summary of the Invention

[0004] In view of this, this application provides a document printing system, method, computer device, and readable storage medium, which solves the problems of disordered document order and low printing efficiency in related printing solutions.

[0005] In a first aspect, embodiments of this application provide a document printing system, which includes: a server, a front-end browser, and a printer; The server is used for: In response to a file printing request, obtain a list of files to be printed; group the file list according to the target information to obtain multiple file groups, and generate a task list, setting the task status of each file group in the task list to pending merging; create an asynchronous parallel merging task, and based on the task list, merge each file group according to the file order within the group; in the task list, change the task status of the merged file group to merge completed. The merged files are grouped and sent to the printer or front-end browser to print the files.

[0006] The system described in the embodiments of this application may also have the following additional technical features: In the above technical solution, optionally, the server is specifically used for: If the printer supports server access, the merged files will be sent to the printer in groups so that the printer can print the files according to the different groups. If the printer does not support server-side access, the merged file groups are sent to the front-end browser, which then sends the merged file groups to the printer so that the printer can print the files according to the different file groups.

[0007] In any of the above technical solutions, optionally, the server is also used for: During the process of merging files in file groups, a separator page is added to the files in the file group.

[0008] In any of the above technical solutions, the target information may optionally include at least one of the following: business parameters and file parameters.

[0009] In any of the above technical solutions, optionally, the front-end browser is used for: Retrieve the task list from the server and create download tasks based on the task list; Use a background thread to poll and obtain the task status of each file group in the task list; When the task status is determined to be merged, the download task is started to download the merged file groups in segments, and the downloaded file segments are cached in the group ID of the file group; After the file segments of a file group have been downloaded, the file segments in the cached group ID are merged. A notification message indicating that the download is complete is sent, allowing business personnel to trigger a printer connection and print command based on the notification message.

[0010] In any of the above technical solutions, optionally, the server is also used for: Retrieve the print order settings information set by business personnel, including whether to print according to the download order or the file priority order; Set the corresponding print order identifier based on the print order setting information, and mark the print order identifier in the task list; A front-end browser, specifically used for: After obtaining the task list, control the printer to print the documents in the order indicated by the print order identifier.

[0011] In any of the above technical solutions, optionally, the printer includes a single printer or a cluster of printers.

[0012] Secondly, embodiments of this application provide a document printing method, applied to the document printing system as described in the second aspect, the method comprising: In response to a file printing request, obtain a list of files to be printed; group the file list according to the target information to obtain multiple file groups, and generate a task list, setting the task status of each file group in the task list to pending merging; create an asynchronous parallel merging task, and based on the task list, merge each file group according to the file order within the group; in the task list, change the task status of the merged file group to merge completed. The merged files are grouped and sent to the printer or front-end browser to print the files.

[0013] Thirdly, embodiments of this application provide a computer device including a processor and a memory, the memory storing programs or instructions that can run on the processor, the programs or instructions implementing the steps of the method as described in the first aspect when executed by the processor.

[0014] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method as described in the first aspect.

[0015] The document printing system, method, computer device, and readable storage medium of this application embodiment, for return receipt documents, trigger batch merging and downloading for printing, generating a document printing request. After receiving the document printing request, the server obtains a list of documents to be printed and groups the obtained file list according to at least one of the business parameters and file parameters, resulting in multiple file groups. The server generates a task list based on the grouping results and sets the initial task status of the task list to "pending merging." Asynchronous parallel merging tasks are created to merge the files, and the asynchronous parallel tasks merge the files according to the file order within the group. After the merging is completed, the task status corresponding to the merged file group in the task list is changed to "merged complete." Further, the grouped and merged file groups are sent to the printer or front-end browser to realize document printing.

[0016] This application employs a flexible grouping and merging strategy to avoid batch printing all files, reducing the risk of file order corruption. Even if the printer does not support batch printing, it eliminates the need to open and print each file individually, saving considerable time. Furthermore, in the presence of a printer cluster, parallel printing is possible, improving printing efficiency. In addition, this application uses a parallel file merging method, reducing processing time and further enhancing printing efficiency.

[0017] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A schematic diagram illustrating the workflow of the document printing system according to an embodiment of this application is shown; Figure 2 A flowchart illustrating a document printing method according to an embodiment of this application is shown; Figure 3 A structural block diagram of a computer device according to an embodiment of this application is shown. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0020] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0021] The document printing system, method, computer equipment, and readable storage medium provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0022] This application provides a document printing system, which includes a server, a front-end browser, and a printer.

[0023] The server is used for: In response to a file printing request, obtain a list of files to be printed; group the file list according to the target information to obtain multiple file groups, and generate a task list, setting the task status of each file group in the task list to pending merging; create an asynchronous parallel merging task, and based on the task list, merge each file group according to the file order within the group; in the task list, change the task status of the merged file group to merge completed. The merged files are grouped and sent to the printer or front-end browser to print the files.

[0024] In this embodiment, for the receipt file, the business personnel trigger a batch merge download and print, generating a file print request. After receiving the file print request, the server obtains a list of files to be printed and groups the obtained file list according to at least one of the business parameters and file parameters, resulting in multiple file groups. The business parameters include, for example, customer type, and the file parameters include, for example, file size and number of pages.

[0025] The server generates a task list based on the grouping results and sets the initial task status of the task list to "pending merging". It should be noted that the task list includes multiple tasks, each corresponding to a file group, and each file group is processed independently.

[0026] Create asynchronous parallel merge tasks to merge files. These tasks merge files in the order they appear within their respective groups. After the merge is complete, change the task status of the group of files in the task list to "Merge Complete".

[0027] Furthermore, the grouped and merged files are sent to a printer or a front-end browser to print the files. In one embodiment of this application, the printer includes a single printer or a cluster of printers.

[0028] This application employs a flexible grouping and merging strategy to avoid batch printing all files, reducing the risk of file order corruption. Even if the printer does not support batch printing, it eliminates the need to open and print each file individually, saving considerable time. Furthermore, in the presence of a printer cluster, parallel printing is possible, improving printing efficiency. In addition, this application uses a parallel file merging method, reducing processing time and further enhancing printing efficiency.

[0029] Merging all files into one large file requires serial processing, which consumes more time on the server side. After being sent to the printer, it also leads to prolonged printer occupancy, preventing other critical tasks from being performed. Furthermore, it hinders the parallel printing function when a printer cluster exists. This application solves these problems by dividing the files into multiple groups.

[0030] In one embodiment of this application, the server is specifically used for: Determine if the printer supports direct access from the server; If the printer supports server access, the merged files will be sent to the printer in groups so that the printer can print the files according to the different groups. If the printer does not support server-side access, the merged file groups are sent to the front-end browser, which then sends the merged file groups to the printer so that the printer can print the files according to the different file groups.

[0031] In this embodiment, for printers that support direct server access, the server directly sends file groups to the printer to achieve printing. For printers that do not support direct server access, the file groups can be forwarded by a front-end browser to achieve printing. This embodiment can flexibly adapt to various types of printers and achieve file group printing.

[0032] In one embodiment of this application, the server is further configured to: add separator pages to the files in the file group during the process of merging file groups. For multi-page files, separator pages can be optionally added after each file, which is beneficial for file differentiation.

[0033] In one embodiment of this application, the front-end browser is used for: Retrieve the task list from the server and create download tasks based on the task list; Use a background thread to poll and obtain the task status of each file group in the task list; When the task status is determined to be merged, the download task is started to download the merged file groups in segments, and the downloaded file segments are cached in the group ID of the file group; After the file segments of a file group have been downloaded, the file segments in the cached group ID are merged. A notification message indicating that the download is complete is sent, allowing business personnel to trigger a printer connection and print command based on the notification message.

[0034] In this embodiment, the front-end browser polls to obtain the task status, enabling it to promptly understand whether file groups have been downloaded completely. For already downloaded file groups, it initiates the download task. Furthermore, this application employs a segmented download method when downloading file groups, avoiding transmission timeouts due to excessively large files. Also, if a segment fails to download due to network interruption, server failure, or other issues, only that segment needs to be re-downloaded, without affecting the integrity of other downloaded segments, thus enhancing download stability.

[0035] After the download is complete, a pop-up notification will be displayed on the page to inform the business personnel that the download is complete, so that the business personnel can trigger the printer connection and print the message.

[0036] In one embodiment of this application, the server is further configured to: Retrieve the print order settings information set by business personnel, including whether to print according to the download order or the file priority order; Set the corresponding print order identifier based on the print order setting information, and mark the print order identifier in the task list; A front-end browser, specifically used for: After obtaining the task list, control the printer to print the documents in the order indicated by the print order identifier.

[0037] In this embodiment, business personnel can set the printing order of file groups, which can be based on the download order or the file priority order. The file priority can be data preset by the business personnel. For example, the printing priority of customer type A can be set to be higher than that of customer type B.

[0038] Based on the print order settings configured by business personnel, a corresponding print order identifier is set. For example, if the print order identifier is "0", the print order will be based on the download order; if the print order identifier is "1", the print order will be based on the file priority order.

[0039] This application allows for flexible settings of the printing order of document groups to meet the printing needs of business personnel for return receipt documents.

[0040] In one embodiment of this application, such as Figure 1 As shown in the embodiment of this application, the workflow of a document printing system includes: (1) Business personnel trigger the batch merge download and print function.

[0041] (2) After receiving the request, the server obtains the list of files to be printed.

[0042] (3) The server groups the file list obtained in (2) according to business parameters (e.g., customer type) and file parameters (e.g., file size, number of pages).

[0043] (4) The server generates a task list based on the grouping results of (3), and the initial state is pending merging.

[0044] (5) The server generates a group task list based on (4), creates corresponding asynchronous parallel tasks to merge files, and the asynchronous parallel tasks merge files according to the file order within the group.

[0045] (6) During the file merging process, separator pages can be added as needed for differentiation.

[0046] (7) After the merge is complete, change the status of the corresponding task in the task list to "Merge Complete".

[0047] (8) If the printer supports server access, the server can directly call the printer through the interface to print.

[0048] (9) If the printer cannot print directly, the server needs to return the task list to the front-end browser after generating the asynchronous task.

[0049] (10) The front-end browser creates a silent download task based on the group task list.

[0050] (11) The front-end browser uses a background thread to poll and obtain the merging status of each task.

[0051] (12) When the group task is completed, start the download task to download the pieces and cache the downloaded content in the group ID corresponding to IndexDb.

[0052] (13) After each group is downloaded, retrieve the cached objects in indexDb and merge them.

[0053] (14) Use a message notification on the page to pop up a window to remind business personnel that the download has been completed.

[0054] (15) Business personnel enter the list of tasks to be printed, click the print link, and print.

[0055] (16) The printer prints according to different groups.

[0056] This application also provides a document printing method, applied to the document printing system as described in the above embodiments, such as... Figure 2 As shown, the method includes: Step 201: In response to a file printing request, obtain a list of files to be printed; group the file list according to the target information to obtain multiple file groups, and generate a task list; set the task status of each file group in the task list to "pending merging"; create an asynchronous parallel merging task; based on the task list, merge each file group according to the file order within the group; in the task list, modify the task status of the merged file group to "merging complete"; Step 202: After merging, each file group is sent to the printer or the front-end browser to print the files.

[0057] This application also provides a computer device, such as... Figure 3 As shown, the computer device 300 includes a processor 301 and a memory 302. The memory 302 stores a program or instruction that can run on the processor 301. When the program or instruction is executed by the processor 301, it implements the various steps of the above-described document printing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0058] The memory 302 can be used to store software programs and various data. The memory 302 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 302 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 302 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0059] Processor 301 may include one or more processing units; optionally, processor 301 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 301.

[0060] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described document printing method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0061] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0062] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A document printing system, characterized in that, The document printing system includes: a server, a front-end browser, and a printer; The server is used for: In response to a file printing request, a list of files to be printed is obtained; the file list is grouped according to the target information to obtain multiple file groups, and a task list is generated, setting the task status of each file group in the task list to pending merging; an asynchronous parallel merging task is created, and based on the task list, each file group is merged according to the file order within the group; in the task list, the task status of the merged file group is changed to merge completed. The merged files are grouped and sent to the printer or the front-end browser to print the files.

2. The document printing system according to claim 1, characterized in that, The server is specifically used for: If the printer supports access from the server, the merged file groups are sent to the printer so that the printer can print the files according to the different file groups. If the printer does not support access to the server, the merged file groups are sent to the front-end browser, which then sends the merged file groups to the printer so that the printer can print the files according to the different file groups.

3. The document printing system according to claim 1, characterized in that, The server is also used for: During the process of merging the file groups, separator pages are added to the files in the file groups.

4. The document printing system according to claim 1, characterized in that, The target information includes at least one of the following: business parameters and file parameters.

5. The document printing system according to any one of claims 1 to 4, characterized in that, The front-end browser is used for: Obtain the task list from the server, and create a download task based on the task list; Use a background thread to poll and obtain the task status of each file group in the task list; When the task status is determined to be merged and completed, the download task is started to download the merged file group in segments, and the downloaded file segments are cached in the group ID of the file group; After the file segments of the file group are downloaded, the file segments in the cached group ID are merged. A message indicating download completion is sent, allowing business personnel to trigger a printer connection and print command based on the message.

6. The document printing system according to claim 5, characterized in that, The server is also used for: Obtain the print order settings information set by the business personnel, including printing according to the download order or printing according to the file priority order; Based on the print order setting information, a corresponding print order identifier is set, and the print order identifier is marked in the task list; The front-end browser is specifically used for: After obtaining the task list, the printer is controlled to print the documents in the order indicated by the print order identifier.

7. The document printing system according to claim 1, characterized in that, The printer may be a single printer or a cluster of printers.

8. A document printing method, characterized in that, The method, applied to a document printing system as described in any one of claims 1 to 7, comprises: In response to a file printing request, a list of files to be printed is obtained; the file list is grouped according to the target information to obtain multiple file groups, and a task list is generated, setting the task status of each file group in the task list to pending merging; an asynchronous parallel merging task is created, and based on the task list, each file group is merged according to the file order within the group; in the task list, the task status of the merged file group is changed to merge completed. The merged files are grouped and sent to the printer or the front-end browser to print the files.

9. A computer device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that run on the processor, the program or instructions being executed by the processor to implement the steps of the document printing method as described in claim 8.

10. A readable storage medium having a program or instructions stored thereon, characterized in that, When the program or instructions are executed by the processor, they implement the steps of the file printing method as described in claim 8.