Mixed-platform, multi-task and multi-printer batch printing algorithm

By designing a batch printing algorithm with mixed platforms, multi-tasks, and multi-printers in the logistics and warehousing industry, the problem that traditional printing solutions are difficult to meet complex business scenarios is solved, efficient and flexible batch printing processing is achieved, and printing efficiency and equipment are improved. Utilization.

CN119473182APending Publication Date: 2025-02-18SHANGHAI YUANQING INFORMATION TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411531858.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

Traditional printing solutions are difficult to meet the needs of complex business scenarios in the logistics and warehousing industry, and cannot effectively handle batch printing tasks of multi-platform, multi-task and multi-printers, resulting in inefficiency in printing and error-prone.

Method used

A batch printing algorithm with mixed platform, multi-task, and multi-printers was designed. By building a document printing model, including WMS warehouse management system module, printing assistant module, printing plug-in module and printing terminal module, the priority queue and task of tasks are realized. The dispatcher works together to dynamically adjust the load status of the printing equipment.

Benefits of technology

It improves the speed of printing task processing, ensures priority processing of high-priority tasks, reduces task waiting time, improves overall printing efficiency, supports the needs of complex business scenarios, avoids equipment overload or idleness, and improves equipment utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473182A_ABST
    Figure CN119473182A_ABST
Patent Text Reader

Abstract

The invention discloses a mixed-platform, multi-task and multi-printer batch printing algorithm, and relates to the technical field of software systems, and the algorithm comprises the steps: building a receipt printing model which comprises a WMS warehouse management system module, a printing assistant module, a printing plug-in module and a printing terminal module; the WMS warehouse management system module receives a printing demand to trigger a printing task, and sends the printing task containing task information to the printing assistant module. According to the algorithm, by constructing a receipt printing model, cooperative work among a WMS warehouse management system, a printing assistant module, a printing plug-in module and a printing terminal module is achieved, the processing speed of a printing task is effectively increased, the design of a priority queue and a task dispatcher ensures that a high-priority task can be preferentially processed, and the printing efficiency is improved. The task waiting time is shortened, the overall printing efficiency is further improved, and the algorithm supports platform mixing and multi-task processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software systems, and in particular to a mixed-platform, multi-task, multi-printer batch printing algorithm. Background Art

[0002] In the logistics and warehousing industry, printing various express delivery orders, delivery orders, inbound orders, labels, and packing lists is an important task. As the business develops, the printing tasks become more complicated, and it is necessary to handle multiple platform tasks, multiple printing device allocations, and a large amount of printing data at the same time. Traditional printing solutions are limited to a single platform or a specific model of printing device, which is difficult to meet the needs of complex business scenarios. The printing efficiency is low, prone to errors, and cannot meet the growing business needs;

[0003] With the booming development of e-commerce and cross-border e-commerce, logistics warehousing centers need to process a large number of orders every day, involving different platforms and systems, and need to print many documents. Traditional printing methods have limitations. Either only one document can be printed at a time, or the express delivery bill cannot be mixed with the platform, and can only be printed in the order of submitted tasks, which greatly slows down the efficiency of warehouse operations;

[0004] With the progress of the logistics and warehousing industry, enterprises pay attention to the flexibility and scalability of printing solutions. Many batch printing management systems and solutions have emerged in the market. However, there are few product solutions based on printing solutions that support mixed platforms and multiple tasks. For example, for a batch of orders that include multiple platforms, the mainstream printing mode in the market is based on a single platform Huibo to issue the order, and it cannot support multiple platforms Huibo to issue the order at one time. Summary of the invention

[0005] The purpose of the present invention is to provide a mixed-platform, multi-task, multi-printer batch printing algorithm to solve the problems raised in the above background technology.

[0006] A mixed-platform, multi-task, multi-printer batch printing algorithm, including:

[0007] Constructing a document printing model, the model includes: a WMS warehouse management system module, a printing assistant module, a printing plug-in module and a printing terminal module;

[0008] The WMS warehouse management system module receives the printing demand to trigger the printing task, and the WMS warehouse management system module sends the printing task containing the task information to the printing assistant module, wherein the task information includes: timestamp, name, platform identifier and printing priority;

[0009] The printing assistant module puts the printing task into the priority queue, arranges the printing task in the priority queue according to the preset rules according to the task information contained in the printing task, and dispatches the task to the corresponding printing plug-in module according to the platform identifier in the printing task;

[0010] The printing plug-in controls the printing device in the printing terminal module to execute the printing task;

[0011] After the printing terminal module enters the printing state, the printing assistant module monitors the printing device status, task quantity and printing progress in real time.

[0012] Preferably, the printing assistant module specifically includes: a task manager unit, a task dispatcher unit, a priority queue unit, a printing configuration unit and a printing monitoring unit;

[0013] The task manager unit is responsible for the enqueue and dequeue of printing tasks. After the WMS warehouse management system submits the task to the printing assistant module, the task manager unit encapsulates the task and submits it to the priority queue unit. When an idle printing device is detected, the task is extracted from the queue and handed over to the task dispatcher unit.

[0014] The task dispatcher unit is responsible for dispatching the tasks submitted by the task manager unit to the printing plug-in module through the platform identifier;

[0015] The priority queue unit is used to store tasks and sort the tasks submitted by the task manager unit according to their priorities. Tasks with higher priorities will be removed from the queue first, and tasks with the same priority will be first in, first out.

[0016] The print configuration unit is used for users to set specific print parameters for different tasks, and the print parameters include: paper size, number of copies and print quality;

[0017] The print monitoring unit is used to monitor the execution progress of tasks in real time and display the execution status of each task.

[0018] Preferably, the printing priority division specifically includes:

[0019] The printing priority is divided into three levels: high, medium, and low. The calculation formula for the printing priority is:

[0020] P=αE+βT+γB

[0021] Where P represents the printing priority, E represents the urgency, ranging from 1 to 3, with 1 representing low urgency and 3 representing high urgency, T represents the time requirement, which is the difference between the task deadline and the current time, B represents the business importance, ranging from 1 to 3, with 1 representing low importance and 3 representing high importance, and α, β, and γ represent the weight coefficients of urgency, time requirement, and business importance, respectively.

[0022] Preferably, the print task processing flow includes a data structure definition:

[0023] Printer is a printing device object, which contains attributes such as ID, platform type, current number of tasks, maximum number of tasks and whether it is available. Job is a printing task object, which contains task ID, content, required platform type and priority. Queue is a priority queue. There are several priority nodes in the queue. Priority nodes are arranged in order of priority, with the highest priority node at the first place. Each priority node contains a linked list, which contains several task nodes in series. Each task node is given a priority separately. The node contains a linked list. Task nodes in the same linked list have the same priority. When taking a task, first take out the priority node from the queue head, and then get the print task from the linked list head.

[0024] Preferably, the print task processing flow includes initialization:

[0025] Load all printing device information into memory, including its platform type and maximum number of tasks, and collect all tasks to be printed, including task content, priority, and required platform type.

[0026] Preferably, the printing task processing flow includes task sorting:

[0027] All printing tasks are sorted according to task priority, with tasks with higher priority at the front and tasks with the same priority arranged in first-in, first-out order.

[0028] Preferably, the printing task processing flow includes task extraction and allocation:

[0029] The task manager unit extracts the node from the priority queue head, and then takes out the printing task from the linked list head in the node and gives it to the task dispatcher. The dispatcher will call the corresponding printing plug-in API for printing according to the platform type in the task.

[0030] Preferably, the print task processing flow includes dynamic adjustment:

[0031] Real-time monitoring of the status of printing equipment, including: equipment connection status, working status, and consumables usage status;

[0032] Based on the printing device status information, evaluate the current printing terminal module workload status;

[0033] Based on the printing device status information and the printing terminal module load status, a dynamic load adjustment model is established to determine whether the load status of the printing device is in a state of workload exceeding the standard. If not, no action is taken. If so, it is determined that the workload exceeds the standard and the optimal load balancing solution is generated to re-evaluate task allocation and ensure workload balance.

[0034] The expression of the dynamic load adjustment model is:

[0035] L=W1×N1+W2×N2-W3×S+W4×R

[0036] Where L represents the workload status value, W1, W2, W3, and W4 represent the weights of the number of print tasks being executed, the length of the task queue, the device processing speed, and the remaining amount of consumables, respectively; N1 represents the number of print tasks being executed, N2 represents the length of the task queue, S represents the device processing speed, and R represents the evaluation value of the remaining amount of consumables;

[0037] If the workload status value exceeds the set threshold, it is determined that the workload exceeds the limit;

[0038] According to the workload status value, analyze the workload status of each printing device, find out the device with lighter load, reallocate some tasks on the device with excessive workload to the device with lighter load, and update the print task queue and device status information.

[0039] Preferably, the printing task processing flow includes execution and feedback:

[0040] After the allocation is completed, the printing task is actually executed through the printing device API or system command to collect printing status feedback, which includes: success, failure, and delay.

[0041] Preferably, the print task processing flow includes optimization and reporting:

[0042] Based on the execution results and system logs, regularly analyze the printing efficiency and rationality of task allocation, perform algorithm optimization, and generate reports including printing task completion rate, average waiting time, and printing equipment utilization.

[0043] By adopting the above technical solution, batch printing of mixed platforms, multiple tasks and multiple printers is realized.

[0044] Compared with the prior art, the invention has the following beneficial effects: the batch printing algorithm,

[0045] By constructing a document printing model, the algorithm realizes the collaborative work among the WMS warehouse management system, the printing assistant module, the printing plug-in module and the printing terminal module, effectively improving the processing speed of printing tasks. The design of the priority queue and the task dispatcher ensures that high-priority tasks can be processed first, reducing the task waiting time and further improving the overall printing efficiency. The algorithm supports mixed-platform and multi-task processing, and can process printing tasks from different platforms at the same time to meet the needs of complex business scenarios. By dynamically adjusting the load status of the printing device, it ensures workload balance, avoids equipment overload or idleness, and improves equipment utilization. By sorting, extracting and allocating, and dynamically adjusting the printing tasks, it realizes the optimal allocation and utilization of resources and reduces resource waste. Regular analysis of printing efficiency and the rationality of task allocation, and algorithm tuning can continuously improve the performance and efficiency of the printing system. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a flow chart of the printing task processing of the present invention;

[0047] Figure 2 This is a batch printing model of the present invention. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] See also Figure 1-2 The present invention provides a technical solution: a mixed-platform, multi-task, multi-printer batch printing algorithm, including a WMS warehouse management system module, a printing assistant module, a printing plug-in module and a printing terminal module.

[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0051] See also Figure 1-2 ,The present invention provides a technical solution: a mixed platform, multi-task, multi-printer batch printing algorithm, a WMS warehouse management system module, a printing assistant module, a printing plug-in module and a printing terminal module.

[0052] The WMS warehouse management system module is always in operation, ready to accept printing requirements from all links at any time. Once a printing requirement is received, it will quickly trigger the generation of a printing task. Subsequently, the WMS warehouse management system module will send the printing task containing the task information to the printing assistant module. The task information here is extremely critical. The timestamp accurately records the specific time when the task is generated, providing an important time reference for the subsequent task processing sequence; the name clearly identifies the specific content of the printing task, which is convenient for operators to quickly identify and manage; the platform identifier clearly indicates the platform to which the printing task belongs, providing a basis for the printing assistant module to accurately assign tasks; and the printing priority determines the importance of the task in the entire printing queue;

[0053] After receiving the print task, the print assistant module will immediately put it into the priority queue. The priority queue can arrange each print task according to the task information contained in the print task and the preset rules, so as to determine the printing priority of each task. In the arrangement process, the print assistant module will comprehensively consider multiple factors such as timestamp and print priority to ensure that high-priority tasks can be processed first. At the same time, the print assistant module will accurately assign the task to the corresponding print plug-in module according to the platform identifier in the print task. These print plug-in modules are specially designed for different platforms. They can communicate and control with specific printing devices efficiently to ensure that the print task can be smoothly executed in the corresponding print terminal module;

[0054] The print plug-in controls the printing device in the print terminal module to ensure that it accurately executes the printing task. Under the scheduling of the print plug-in, the printing device converts the printing task into actual paper output;

[0055] After the printing terminal module enters the printing state, the printing assistant module will continuously monitor the status of the printing device in real time. Whether it is the operating status of the printing device, whether there is a fault, or the number of tasks currently being executed and the printing progress of each task, the printing assistant module will pay close attention. Through this real-time monitoring, the printing assistant module can promptly discover problems and take corresponding measures to ensure the smooth progress of the entire printing process. If a printing device is found to have a fault, the printing assistant module can immediately reassign the task to other normal printing devices to ensure that the printing task will not be delayed. At the same time, the printing assistant module can also reasonably adjust the printing priority according to the number of tasks and printing progress to ensure that urgent tasks are given priority.

[0056] The printing assistant module specifically includes: a task manager unit, a task dispatcher unit, a priority queue unit, a printing configuration unit and a printing monitoring unit;

[0057] The task manager unit is the hub of the entire printing process. Its main responsibility is to receive, process and schedule printing tasks. When WMS has printing requirements, it will submit the task information to the printing assistant module. After receiving these tasks, the task manager unit will first encapsulate them to ensure the integrity and accuracy of the task data. Subsequently, these encapsulated tasks will be submitted to the priority queue unit for further processing. In addition, the task manager unit also has an intelligent detection function that can monitor the status of the printing device in real time. Once an idle printing device is found, it will immediately extract the task from the priority queue according to the established rules and pass it to the task dispatcher unit for subsequent printing operations.

[0058] The task dispatcher unit is responsible for accurately dispatching the tasks submitted by the task manager unit to the corresponding print plug-in module according to the platform identifier. This process ensures that each task can be correctly sent to the printing device that can handle it, thus avoiding task mismatch or device idleness. The efficient operation of the task dispatcher unit provides a strong guarantee for the smooth completion of printing tasks.

[0059] The priority queue unit can store a large number of printing tasks and can intelligently sort them according to the priority of the tasks. Tasks with high priority will be processed first to ensure that urgent tasks can be responded to in a timely manner. For tasks with the same priority, the first-in-first-out principle is followed to ensure fairness and efficiency. This intelligent sorting mechanism enables the printing assistant module to maintain an efficient and orderly working state when facing a large number of tasks.

[0060] The print configuration unit provides great convenience for users. It allows users to flexibly set specific printing parameters according to different printing task requirements. These parameters include but are not limited to paper size, number of copies and print quality. Users can fine-tune these parameters before printing according to their actual needs to ensure that the print output effect meets their expectations. This personalized configuration method greatly improves the flexibility and satisfaction of printing tasks;

[0061] The print monitoring unit can monitor the execution progress of tasks in real time and clearly display the execution status of each task to the user. Whether it is the start, progress or completion status of the task, the print monitoring unit can accurately capture and provide real-time feedback. This transparent monitoring mechanism not only allows users to grasp the progress of printing tasks at any time, but also to take timely measures to intervene when problems arise, ensuring the smooth completion of printing tasks.

[0062] Printing priority classification includes:

[0063] The printing priority is divided into three levels: high, medium, and low. The calculation formula for the printing priority is:

[0064] P=αE+βT+γB

[0065] Where P represents the printing priority, E represents the urgency, ranging from 1 to 3, with 1 representing low urgency and 3 representing high urgency, T represents the time requirement, which is the difference between the task deadline and the current time, B represents the business importance, ranging from 1 to 3, with 1 representing low importance and 3 representing high importance, and α, β, and γ represent the weight coefficients of urgency, time requirement, and business importance, respectively.

[0066] Real-time monitoring of the status of printing equipment, including: equipment connection status, working status, and consumables usage status;

[0067] Based on the printing device status information, evaluate the current printing terminal module workload status;

[0068] Based on the printing device status information and the printing terminal module load status, a dynamic load adjustment model is established to determine whether the load status of the printing device is in a state of workload exceeding the standard. If not, no action is taken. If so, it is determined that the workload exceeds the standard and the optimal load balancing solution is generated to re-evaluate task allocation and ensure workload balance.

[0069] The expression of the dynamic load adjustment model is:

[0070] L=W1×N1+W2×N2-W3×S+W4×R

[0071] Where L represents the workload status value, W1, W2, W3, and W4 represent the weights of the number of print tasks being executed, the length of the task queue, the device processing speed, and the remaining amount of consumables, respectively; N1 represents the number of print tasks being executed, N2 represents the length of the task queue, S represents the device processing speed, and R represents the evaluation value of the remaining amount of consumables;

[0072] If the workload status value exceeds the set threshold, it is determined that the workload exceeds the limit;

[0073] According to the workload status value, analyze the workload status of each printing device, find out the device with lighter load, reallocate some tasks on the device with excessive workload to the device with lighter load, and update the print task queue and device status information.

Claims

1. A mixed-platform, multi-task, multi-printer batch printing algorithm, characterized in that: include: Constructing a document printing model, the model includes: a WMS warehouse management system module, a printing assistant module, a printing plug-in module and a printing terminal module; The WMS warehouse management system module receives the printing demand to trigger the printing task, and the WMS warehouse management system module sends the printing task containing the task information to the printing assistant module, wherein the task information includes: timestamp, name, platform identifier and printing priority; The printing assistant module puts the printing task into the priority queue, arranges the printing task in the priority queue according to the preset rules according to the task information contained in the printing task, and dispatches the task to the corresponding printing plug-in module according to the platform identifier in the printing task; The printing plug-in controls the printing device in the printing terminal module to execute the printing task; After the printing terminal module enters the printing state, the printing assistant module monitors the printing device status, task quantity and printing progress in real time.

2. A mixed-platform, multi-task, multi-printer batch printing algorithm according to claim 1, characterized in that: The printing assistant module specifically includes: a task manager unit, a task dispatcher unit, a priority queue unit, a printing configuration unit and a printing monitoring unit; The task manager unit is responsible for the enqueue and dequeue of printing tasks. After the WMS warehouse management system submits the task to the printing assistant module, the task manager unit encapsulates the task and submits it to the priority queue unit. When an idle printing device is detected, the task is extracted from the queue and handed over to the task dispatcher unit. The task dispatcher unit is responsible for dispatching the tasks submitted by the task manager unit to the printing plug-in module through the platform identifier; The priority queue unit is used to store tasks and sort the tasks submitted by the task manager unit according to their priorities. Tasks with higher priorities will be removed from the queue first, and tasks with the same priority will be first in, first out. The print configuration unit is used for users to set specific print parameters for different tasks, and the print parameters include: paper size, number of copies and print quality; The print monitoring unit is used to monitor the execution progress of tasks in real time and display the execution status of each task.

3. A mixed-platform, multi-task, multi-printer batch printing algorithm according to claim 2, characterized in that: Printing priority classification includes: The printing priority is divided into three levels: high, medium, and low. The calculation formula for the printing priority is: P=αE+βT+γB Where P represents the printing priority, E represents the urgency, ranging from 1 to 3, with 1 representing low urgency and 3 representing high urgency, T represents the time requirement, which is the difference between the task deadline and the current time, B represents the business importance, ranging from 1 to 3, with 1 representing low importance and 3 representing high importance, and α, β, and γ represent the weight coefficients of urgency, time requirement, and business importance, respectively.

4. The mixed-platform, multi-task, multi-printer batch printing algorithm according to claim 1, characterized in that: The print task processing flow includes data structure definition: Printer is a printing device object, which contains attributes such as ID, platform type, current number of tasks, maximum number of tasks and whether it is available. Job is a printing task object, which contains task ID, content, required platform type and priority. Queue is a priority queue. There are several priority nodes in the queue. Priority nodes are arranged in order of priority, with the highest priority node at the first place. Each priority node contains a linked list, which contains several task nodes in series. Each task node is given a priority separately. The node contains a linked list. Task nodes in the same linked list have the same priority. When taking a task, first take out the priority node from the queue head, and then get the print task from the linked list head.

5. The mixed-platform, multi-task, multi-printer batch printing algorithm according to claim 1, characterized in that: The printing task processing flow includes initialization: Load all printing device information into memory, including its platform type and maximum number of tasks, and collect all tasks to be printed, including task content, priority, and required platform type.

6. The mixed-platform, multi-task, multi-printer batch printing algorithm according to claim 1, characterized in that: The printing task processing flow includes task sorting: All printing tasks are sorted according to task priority, with tasks with higher priority at the front and tasks with the same priority arranged in first-in, first-out order.

7. The mixed-platform, multi-task, multi-printer batch printing algorithm according to claim 1, characterized in that: The printing task processing flow includes task extraction and allocation: The task manager unit extracts the node from the priority queue head, and then takes out the printing task from the linked list head in the node and gives it to the task dispatcher. The dispatcher will call the corresponding printing plug-in API for printing according to the platform type in the task.

8. The mixed-platform, multi-task, multi-printer batch printing algorithm according to claim 1, characterized in that: The printing task processing flow includes dynamic adjustment: Real-time monitoring of the status of printing equipment, including: equipment connection status, working status, and consumables usage status; Based on the printing device status information, evaluate the current printing terminal module workload status; Based on the printing device status information and the printing terminal module load status, a dynamic load adjustment model is established to determine whether the load status of the printing device is in a state of workload exceeding the standard. If not, no action is taken. If so, it is determined that the workload exceeds the standard and the optimal load balancing solution is generated to re-evaluate task allocation and ensure workload balance. The expression of the dynamic load adjustment model is: L=W1×N1+W2×N2-W3×S+W4×R Where L represents the workload status value, W1, W2, W3, and W4 represent the weights of the number of print tasks being executed, the length of the task queue, the device processing speed, and the remaining amount of consumables, respectively; N1 represents the number of print tasks being executed, N2 represents the length of the task queue, S represents the device processing speed, and R represents the evaluation value of the remaining amount of consumables; If the workload status value exceeds the set threshold, it is determined that the workload exceeds the limit; According to the workload status value, analyze the workload status of each printing device, find out the device with lighter load, reallocate some tasks on the device with excessive workload to the device with lighter load, and update the print task queue and device status information.

9. The mixed-platform, multi-task, multi-printer batch printing algorithm according to claim 1, characterized in that: The printing task processing flow includes execution and feedback: After the allocation is completed, the printing task is actually executed through the printing device API or system command to collect printing status feedback, which includes: success, failure, and delay.

10. The mixed-platform, multi-task, multi-printer batch printing algorithm according to claim 1, characterized in that: The print task processing flow includes optimization and reporting: Based on the execution results and system logs, regularly analyze the printing efficiency and rationality of task allocation, perform algorithm optimization, and generate reports including printing task completion rate, average waiting time, and printing equipment utilization.

Citation Information

Cited By

  • GPU dynamic task efficient scheduling method for resisting quantum cryptographic operation

    CN121277652A

  • A GPU dynamic task efficient scheduling method for anti-quantum cryptographic operation

    CN121277652B