Printing task scheduling method, system and terminal based on main control chip

Through the task classification, dynamic priority adjustment and resource allocation mechanism of the main control chip, the problem of scheduling delay in high-concurrency printing tasks is solved, rapid response and efficient scheduling of high-priority tasks are achieved, and the overall efficiency of the printing system is improved.

CN120508269BActive Publication Date: 2025-09-16ZHEJIANG CANGTIAN INTELLIGENT INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511008877.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-09-16
Estimated Expiration
2045-07-22

AI Technical Summary

Technical Problem

In the existing printing system, the task scheduling delay problem is not effectively solved in the scenario of high-concurrency printing tasks, which affects the overall printing efficiency.

Method used

The main control chip performs task classification, dynamic priority adjustment, task queue reorganization and resource allocation, including initial task classification, dynamic priority adjustment, task queue reorganization and resource allocation, to ensure fast response and efficient scheduling of high-priority tasks.

Benefits of technology

In high-concurrency scenarios, it reduces the risk of delays in critical tasks, improves task scheduling efficiency and resource utilization, and ensures rapid response to high-priority tasks and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508269B_ABST
    Figure CN120508269B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of print task scheduling, and in particular to a print task scheduling method, system and terminal based on a main control chip, the method including the steps of initial task classification, dynamic priority adjustment, task queue reorganization, resource allocation execution and termination mechanism triggering. The response speed of high-priority tasks is optimized through system load monitoring and waiting time coefficient, and the real-time task pool and elastic buffer pool are divided to improve scheduling efficiency. The present application divides the real-time task pool and elastic buffer pool through the "dynamic memory pool partitioning + task life cycle binding" algorithm, and pre-allocates memory blocks according to task type, thereby improving the real-time performance and scheduling efficiency of high-concurrency printing tasks, achieving rapid response of high-priority tasks, reducing delays in critical tasks, improving resource utilization and scheduling fairness, and is suitable for high-concurrency printing scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of printer technology, and specifically relates to a printing task scheduling method, system, and terminal based on a main control chip. Background Art

[0002] In modern printing devices, the performance and scheduling capabilities of the main control chip directly affect the execution efficiency of printing tasks, especially in high-concurrency printing task scenarios. When handling multi-task scheduling, existing printing systems often affect overall printing efficiency due to scheduling delays.

[0003] A search revealed Chinese patent publication number CN110968274A, which discloses a system-on-chip (SOC)-based printer control method and system. By combining the SOC chip with an independent security control chip, this method improves security during printing control and optimizes the detection and execution of task instructions. However, this technical solution may experience a decrease in real-time performance when multiple tasks are running concurrently. Furthermore, while its security parameter detection mechanism improves security, it may increase the overhead of task scheduling, further exacerbating the risk of scheduling delays.

[0004] A search revealed Chinese patent publication number CN105500703A, which discloses a dual-chip 3D printer system based on Bezier curves. This system utilizes a dual-chip architecture to rationally allocate system resources and simulates the print path using Bezier curves, improving printing accuracy and surface smoothness. However, this technical solution primarily focuses on print path consistency and resource allocation, potentially leading to scheduling delays in highly concurrent printing scenarios.

[0005] The above problems indicate that the existing printing system still has deficiencies in the task scheduling mechanism of the main control chip. In particular, in high-concurrency printing tasks, the task scheduling problem has not been effectively solved. Summary of the Invention

[0006] The first purpose of this application is to provide a printing task scheduling method based on a main control chip, which has the characteristics of rapid response to high-priority tasks and high scheduling efficiency.

[0007] The above-mentioned application purpose 1 of the present application is achieved through the following technical solutions: a printing task scheduling method based on a main control chip, including: initial task classification, determining the basic priority of the task based on the task attributes of the newly added printing queue and the current system load status; wherein, the task attributes include the task source type, task size and urgency tag, and the current system load status includes the system resource utilization and task queue length collected in real time by the main control chip; dynamic priority adjustment, judging whether to enter the dynamic adjustment mode based on a preset system load threshold, and calculating the dynamic priority according to the task waiting time and the urgency tag; wherein, the dynamic adjustment mode is started when the system load exceeds the preset system load threshold, and the dynamic priority calculation formula is The formula is: dynamic priority = basic priority × waiting time coefficient", and the waiting time coefficient calculation formula is: waiting time coefficient = 1.0 + waiting seconds / 100; the task queue is reorganized, and the task queue is sorted based on the recalculated dynamic priority to ensure that high-priority tasks are put first; wherein, high-priority tasks are assigned to the real-time task pool, and low-priority tasks are assigned to the elastic buffer pool; resource allocation is executed, and printing resources are allocated and tasks are executed in sequence based on the reorganized task queue; wherein, tasks in the real-time task pool occupy printing resources first, and tasks in the elastic buffer pool are executed when resources are idle; the termination mechanism is triggered, and when the task queue is empty or the system load drops below the preset system load threshold, the dynamic adjustment mode is exited.

[0008] By adopting this technical solution, the main control chip can dynamically adjust the priority of printing tasks based on the system load, preventing high-priority tasks from being delayed due to blocking by lower-priority tasks. By introducing a waiting time factor, the priority of tasks with long waiting times can be increased, thereby reducing the risk of delays for critical tasks. Furthermore, the division of the real-time task pool into the elastic buffer pool effectively reduces cross-task memory fragmentation and improves scheduling efficiency in high-concurrency scenarios.

[0009] Optionally, the specific method of dynamic priority adjustment includes: system load monitoring, the main control chip collects system resource utilization and task queue length in real time through built-in sensors; wherein, the system resource utilization is expressed in percentage, and the task queue length is counted by the number of currently queued tasks; load assessment judgment, when the system load exceeds the preset system load threshold, enters dynamic adjustment mode; wherein, the system load is obtained by weighted calculation of the system resource utilization and the task queue length, the system resource utilization weight coefficient is 0.6, and the task queue length weight coefficient is 0.4.

[0010] By implementing this technical solution, the main control chip monitors system load in real time, promptly identifying high-load risks and initiating dynamic adjustment mode. Furthermore, queue reordering further optimizes task execution, ensuring that high-priority tasks receive resources quickly. The main control chip comprehensively considers the impact of resource utilization and task queue length on system load, enabling a more accurate determination of whether dynamic adjustment mode is necessary.

[0011] Optionally, the specific method of task queue reorganization includes: task queue partitioning, high priority tasks are assigned to the real-time task pool, and low priority tasks are assigned to the elastic buffer pool; task migration rules, when a high priority task is completed or resources are released, the highest priority task is selected from the elastic buffer pool and migrated to the real-time task pool.

[0012] By implementing these technical solutions, the task queue partitioning mechanism effectively reduces resource competition between high- and low-priority tasks, thereby improving the fairness and efficiency of task scheduling. Task migration rules ensure that tasks in the elastic buffer pool receive timely execution opportunities when resources allow, avoiding resource waste.

[0013] Optionally, the specific method for executing resource allocation includes: resource occupancy detection, the main control chip monitors the occupancy status of printing resources in real time; wherein, the printing resources include a print head, an ink cartridge and a paper transmission module; resource allocation decision, the resource allocation order is determined based on the dynamic priority and the occupancy status of the printing resources; wherein, high-priority tasks occupy idle resources first, and low-priority tasks are allocated according to the dynamic priority order when resources are idle; resource release notification, when a task is completed or interrupted, the main control chip immediately releases the corresponding resources and notifies the task queue; wherein, the resource release notification mechanism is triggered by a hardware interrupt signal.

[0014] By adopting this technical solution, the main control chip monitors the occupancy status of printing resources in real time and can quickly make resource allocation decisions, thereby reducing resource idle time. The resource release notification mechanism ensures that resources are promptly recovered and reallocated, further improving resource utilization.

[0015] Optionally, the specific method for triggering the termination mechanism includes: task queue detection, the main control chip detects the status of the task queue in real time; wherein, the status of the task queue includes the number of tasks and the distribution of task priorities; system load evaluation, when the task queue is empty or the system load drops below 50% of the preset system load threshold, the termination mechanism is triggered; static priority recovery, exiting the dynamic adjustment mode and resuming static priority scheduling; wherein, the static priority scheduling directly determines the task priority based on the task attributes.

[0016] By adopting this technical solution, the main control chip can promptly determine whether to exit dynamic adjustment mode by monitoring the task queue and evaluating the system load. The static priority recovery mechanism ensures that the system can more simply schedule tasks in low-load conditions, thereby reducing scheduling overhead.

[0017] Optionally, the static priority scheduling logic is reinitialized by the main control chip.

[0018] Optionally, the task source type in the task attributes includes user interaction tasks, batch printing tasks and scheduled printing tasks; the task size is counted by the number of pages required to print the task; and the urgency label includes three levels: high, medium and low.

[0019] Optionally, the task queue reorganization sorting method is based on arranging the dynamic priority values ​​from large to small.

[0020] The second purpose of this application is to provide a printing task scheduling system based on a main control chip, which has the characteristics of rapid response to high-priority tasks and high scheduling efficiency.

[0021] The second application purpose of the present application is achieved through the following technical solutions: a printing task scheduling system based on a main control chip, comprising: a task classification module, for determining the basic priority of a task based on the attributes of a task newly added to the printing queue and the current system load status; wherein, the task attributes include the task source type, the task size and the urgency tag, and the current system load status includes the system resource utilization and the task queue length collected in real time by the main control chip; a priority adjustment module, for determining whether to enter a dynamic adjustment mode based on a preset system load threshold, and calculating a dynamic priority based on the task waiting time and the urgency tag; wherein, the dynamic adjustment mode is started when the system load exceeds the preset system load threshold, and the dynamic priority calculation formula is: : Dynamic priority = basic priority × waiting time coefficient", the waiting time coefficient calculation formula is: waiting time coefficient = 1.0 + waiting seconds / 100; a task queue management module is used to sort the task queue based on the recalculated dynamic priority to ensure that high-priority tasks are placed first; wherein, high-priority tasks are assigned to the real-time task pool, and low-priority tasks are assigned to the elastic buffer pool; a resource allocation module is used to allocate printing resources and execute tasks in sequence based on the reorganized task queue; wherein, tasks in the real-time task pool take up printing resources first, and tasks in the elastic buffer pool are executed when resources are idle; a termination mechanism module is used to exit the dynamic adjustment mode when the task queue is empty or the system load drops below the preset system load threshold.

[0022] The third objective of this application is to provide an intelligent terminal that has the characteristics of rapid response to high-priority tasks and high scheduling efficiency.

[0023] The third application purpose of the present application is achieved through the following technical solution: an intelligent terminal, including a memory and a processor, the memory stores a computer program that can be loaded by the processor and execute the above-mentioned printing task scheduling method based on the main control chip. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 This is a flow chart of the printing task scheduling method based on the main control chip of this application.

[0025] Figure 2 This is a block diagram of the printing task scheduling system based on the main control chip of this application. DETAILED DESCRIPTION

[0026] This embodiment provides a specific implementation of a printing task scheduling method, system and terminal based on a main control chip. Figure 1 The scheduling method flow chart shown in the figure and the attached Figure 2 The dispatch system block diagram shown in the figure provides a detailed description of the technical solution. The following description will start from the overall architecture and gradually delve into the connection, location, and coordination between each module, and then combine the operation process to fully explain the operating principles.

[0027] like Figure 1 As shown, an embodiment of the present application provides a print task scheduling method based on a main control chip, including: S01: Initial task classification, determining the basic priority of the task based on the attributes of the task newly added to the print queue and the current system load status; wherein the task attributes include the task source type, task size, and urgency tag, the urgency tag can be set by the user, and the current system load status includes the system resource utilization and task queue length collected in real time by the main control chip. In other embodiments of the present application, task attributes may also include print resolution or color mode (such as monochrome / color), which influence the basic priority calculation (for example, high-resolution tasks are given a higher weight) to support more fine-grained scheduling decisions.

[0028] In this embodiment of the present application, the task source types in the task attributes include user interaction tasks, batch printing tasks, and scheduled printing tasks; the task size is calculated by the number of pages required to print the task; and the urgency tag includes three levels: high, medium, and low. The task source type reflects the task generation scenario, the task size (number of pages) quantifies resource requirements (such as memory and time consumption), and the urgency tag captures user intent. These three factors work together to ensure that priority allocation is both system efficient (for example, avoiding blocking large tasks) and user urgent needs (for example, prioritizing high urgency tasks), eliminating the resource overhead of dynamic calculations.

[0029] For example, in an embodiment of the present application, a new task is added to the print queue, and the task attributes include task source type = "user direct submission" (coefficient weight 1.2), task size = 8MB (coefficient weight 0.9), urgency tag = "high" (set by the user, coefficient weight 1.5); the current system load status is: CPU utilization 80%, queue length 5 tasks. The basic priority is calculated by weighted average: basic priority = (1.2+0.9+1.5) / 3=1.2, normalized to the range of 1-10 (i.e. multiplied by 10), and the priority is 6. It is understandable that the coefficient weights of the task source type, task size and urgency tag can be set according to actual needs, and it is impossible to list them one by one, so they will not be repeated here.

[0030] S02: Dynamic priority adjustment, based on a preset system load threshold (for example, the system load threshold can be set to 70%-80% CPU utilization to balance performance and energy consumption), determine whether to enter the dynamic adjustment mode, and calculate the dynamic priority based on the task waiting time and urgency label; wherein, the dynamic adjustment mode is started when the system load exceeds the preset system load threshold, and the dynamic priority calculation formula is: dynamic priority = basic priority × waiting time coefficient, and the waiting time coefficient calculation formula is: waiting time coefficient = 1.0 + waiting seconds / 100. The waiting time coefficient formula can ensure that the priority increases linearly with the waiting time; in other embodiments of the present application, the waiting time coefficient can also adopt a nonlinear function, such as logarithmic growth (such as waiting time coefficient = 1.0 + log (waiting seconds) / 10), to slow down the priority growth under high waiting time and adapt to different system stability requirements.

[0031] For example, in this embodiment of the present application, the preset system load threshold is 75%. When the current system load detected is 80%, the dynamic adjustment mode is triggered because the system load threshold is exceeded. Assuming the task wait time = 60 seconds, the wait time coefficient = 1.0 + 60 / 100 = 1.6. Dynamic priority = base priority (6) × wait time coefficient (1.6) = 9.6. Urgency tags are directly involved in the calculation to ensure that high-urgency tasks are promoted.

[0032] It can be understood that the specific method of dynamic priority adjustment can also include: system load monitoring, the main control chip collects system resource utilization and task queue length in real time through built-in sensors; wherein, the system resource utilization is expressed in percentage, and the task queue length is counted by the number of currently queued tasks; load assessment judgment, when the system load exceeds the preset system load threshold, it enters the dynamic adjustment mode; wherein, the system load is obtained by weighted calculation of the system resource utilization and the task queue length, the system resource utilization weight coefficient is 0.6, and the task queue length weight coefficient is 0.4.

[0033] This embodiment calculates the system load in a weighted manner, which can balance real-time resource consumption and queue congestion and avoid deviation from a single indicator.

[0034] Specifically, in a specific embodiment of the present application, the preset system load threshold is 70%, and the dynamic priority adjustment process is as follows: the main control chip collects CPU utilization (a specific implementation method of system resource utilization, in the form of a percentage, for example, the current value = 78%) and task queue length (counting the number of currently queued tasks, for example, the value = 8) in real time through built-in sensors (such as the / proc / stat interface), and the data sampling frequency is once per second to ensure real-time performance.

[0035] Calculate the weighted system load: System load = 0.6 * CPU utilization + 0.4 * (task queue length / maximum queue capacity). The maximum queue capacity is set to 20 tasks (a configurable parameter). For example, if the current CPU utilization is 78% and the queue length is 8, the system load is 0.6 * 0.78 + 0.4 (8 / 20) = 0.468 + 0.16 = 62.8%. Because the system load of 62.8% is less than the threshold of 70%, dynamic adjustment mode is not activated. If the system load rises to 71% (for example, if the CPU utilization is 85% and the queue length is 10, the system load is 0.6 * 0.85 + 0.4 * (10 / 20) = 0.51 + 0.2 = 71%), dynamic adjustment mode is activated.

[0036] S03: Task queues are reorganized. Task queues are sorted based on the recalculated dynamic priority to ensure that high-priority tasks are placed first. High-priority tasks are assigned to the real-time task pool, and low-priority tasks are assigned to the elastic buffer pool.

[0037] For example, in this embodiment of the present application, based on dynamic priority sorting, high-priority tasks (e.g., priority ≥ 8) are assigned to the real-time task pool (memory reserved area), while low-priority tasks (e.g., priority < 8) are assigned to the elastic buffer pool (disk cache area). For example, the task with a priority of 9.6 enters the real-time pool to ensure pre-processing.

[0038] It is understood that the specific method of task queue reorganization may also include: task queue partitioning, which assigns high-priority tasks to the real-time task pool and low-priority tasks to the elastic buffer pool; and task migration rules, which select the highest-priority task from the elastic buffer pool and migrate it to the real-time task pool when a high-priority task completes or resources are released. Specifically, the elastic buffer pool can be subdivided into multiple sub-pools (for example, divided by priority ranges), and tasks are selected from the highest-priority sub-pool during migration to improve migration efficiency and fairness. The sorting method for task queue reorganization is based on dynamic priority values, arranged from highest to lowest.

[0039] This embodiment uses a partitioning mechanism to isolate high- and low-priority tasks, ensuring that the real-time task pool has exclusive resources and reducing preemption delays. The migration rules are triggered based on resource release events, giving priority to promoting the highest-priority tasks in the buffer pool, balancing the load and maximizing system throughput, preventing low-priority tasks from waiting indefinitely.

[0040] Specifically, in a specific embodiment of the present application, the task queue reorganization process is as follows: Task queue partitioning: based on dynamic priority (range 1-10), tasks with dynamic priority ≥ 8 are assigned to the real-time task pool (memory reserved area, fixed allocation of 512MB RAM), and tasks with dynamic priority < 8 are assigned to the elastic buffer pool (hard disk cache area, using SSD storage).

[0041] For example, the current task queue contains Task A (priority 9.6, size 5MB), Task B (priority 7.2, size 15MB), and Task C (priority 5.0, size 20MB). Task A enters the real-time task pool (priority 9.6 ≥ 8), while Tasks B and C enter the elastic buffer pool (priority < 8).

[0042] Task migration rule triggering and execution: When a task in the real-time task pool is completed or resources are released (for example, task A is printed, releasing the print head and memory resources), the system detects resource idleness (for example, CPU utilization < 50% and free memory > 200MB).

[0043] Select the highest-priority task from the elastic buffer pool for migration: Scan the buffer pool task list (for example, Task B has a priority of 7.2, and Task C has a priority of 5.0) and select Task B (the highest priority) for migration to the real-time task pool.

[0044] The migration process includes: loading task data from SSD to RAM (latency < 50ms), updating the queue index, and allocating resources (such as reserving 200MB of RAM).

[0045] S04: Resource allocation execution, allocating printing resources and executing tasks in sequence based on the reorganized task queue; wherein, tasks in the real-time task pool take priority in occupying printing resources, and tasks in the elastic buffer pool are executed when resources are idle.

[0046] For example, in an embodiment of the present application, printing resources are preferentially allocated to real-time pool tasks, which are executed immediately (100% occupancy), and elastic buffer pool tasks are only executed when the CPU utilization is <50% (such as during idle periods) to avoid resource conflicts.

[0047] It is understood that the specific method for executing resource allocation may also include: resource occupancy detection, where the main control chip monitors the occupancy status of printing resources in real time; printing resources include print heads, ink cartridges, and paper transport modules; resource allocation decision-making, where the resource allocation order is determined based on dynamic priorities and the occupancy status of printing resources; where high-priority tasks take priority over idle resources, while low-priority tasks are allocated according to dynamic priority when resources are idle; and resource release notification, where when a task is completed or interrupted, the main control chip immediately releases the corresponding resources and notifies the task queue; where the resource release notification mechanism is triggered by a hardware interrupt signal. Resource allocation can support the concept of "resource groups" (e.g., print head + ink cartridge binding allocation), avoiding overall blockage caused by a single idle resource, making it suitable for multi-tasking parallel scenarios (such as dual-printhead industrial equipment).

[0048] Specifically, in a specific embodiment of the present application, the resource allocation execution process is as follows: resource occupancy detection: the main control chip polls the sensor data in real time through the I²C bus (cycle 20ms), including: print head status: the optical sensor detects the movement position of the nozzle (such as coordinate X=120mm, Y=80mm); ink cartridge status: the Hall sensor monitors the installation of the ink cartridge and the ink level (such as cyan ink level = 35%); paper transport module: the encoder reads the roller speed (such as 200rpm); the resource occupancy flag is updated to the register: 0=idle, 1=occupied (for example, the print head flag = 1).

[0049] Resource allocation decision: When a real-time task pool task (priority ≥ 8) is ready: if the print head is idle (flag bit = 0), immediately allocate the print head + ink cartridge resource combination; if the resources are busy, wait until the hardware interrupt triggers the release (maximum waiting timeout = 100ms).

[0050] Elastic buffer pool task (priority < 8) allocation rule: Only when all high-priority tasks are completed and resources are idle, they are allocated according to dynamic priority order; for example: Task B (priority 7.2) takes precedence over Task C (priority 5.0) when the print head is idle.

[0051] Resource release notification: When a task is completed / interrupted (such as a paper jam triggering a photoelectric sensor interrupt): the hardware interrupt signal (GPIO pin 12, rising edge trigger) is transmitted to the main control chip; the interrupt service routine (ISR) responds within <1ms: the task queue immediately triggers reorganization after receiving the notification (see the previous embodiment), and migrates the new task to the real-time task pool.

[0052] S05: The termination mechanism is triggered. When the task queue is empty or the system load drops below a preset system load threshold, the dynamic adjustment mode is exited and static priority scheduling is restored.

[0053] For example, in an embodiment of the present application, when the task queue is cleared or the CPU utilization drops to 70% (below the threshold of 75%), the dynamic adjustment mode is turned off and static priority scheduling is restored (based only on the basic priority determined by the task attributes).

[0054] It can be understood that the specific method of triggering the termination mechanism may also include: task queue detection, in which the main control chip detects the status of the task queue in real time; wherein the status of the task queue includes the number of tasks and the distribution of task priorities; system load evaluation, in which the termination mechanism is triggered when the task queue is empty or the system load drops below 50% of the preset system load threshold; static priority recovery, in which the dynamic adjustment mode is exited and static priority scheduling is restored; wherein static priority scheduling directly determines the task priority based on the task attributes. In the embodiment of the present application, the logic of static priority scheduling is reinitialized by the main control chip.

[0055] This application uses a main control chip to achieve intelligent scheduling of printing tasks. The specific process includes: setting a basic priority for tasks newly added to the queue based on task attributes (including task source type, task size, and urgency tag) and real-time system load status (including system resource utilization and task queue length); activating a dynamic adjustment mode when the system load exceeds a preset threshold, and recalculating the priority based on the task waiting time and urgency; then reorganizing the queue, moving high-priority tasks into the real-time pool for priority execution, and placing low-priority tasks into the buffer pool for delayed processing; then allocating printing resources based on the new queue, with real-time pool tasks taking priority; when the queue is empty or the load is below the threshold, the dynamic mode is turned off and the default scheduling is restored. The dynamic priority adjustment mechanism uses a weighted waiting time coefficient to improve the response speed of urgent tasks under high load and avoid system bottlenecks; the basic priority ensures fairness based on task attributes, and the dynamic coefficient introduces time sensitivity, optimizing resource utilization and user experience overall.

[0056] like Figure 2 As shown, an embodiment of the present application also provides a printing task scheduling system based on a main control chip, including: a task classification module 1, which is used to determine the basic priority of the task based on the task attributes newly added to the printing queue and the current system load status; wherein, the task attributes include the task source type, task size and urgency label, and the current system load status includes the system resource utilization and task queue length collected in real time by the main control chip.

[0057] Priority adjustment module 2 is used to determine whether to enter dynamic adjustment mode based on a preset system load threshold, and calculate dynamic priority based on task waiting time and urgency tag; wherein, dynamic adjustment mode is activated when the system load exceeds the preset system load threshold, and the dynamic priority calculation formula is: dynamic priority = basic priority × waiting time coefficient, and the waiting time coefficient calculation formula is: waiting time coefficient = 1.0 + waiting seconds / 100.

[0058] The task queue management module 3 is used to sort the task queue based on the recalculated dynamic priority to ensure that high-priority tasks are placed first; wherein high-priority tasks are allocated to the real-time task pool and low-priority tasks are allocated to the elastic buffer pool.

[0059] The resource allocation module 4 is used to allocate printing resources and execute tasks in sequence based on the reorganized task queue; wherein, tasks in the real-time task pool take priority in occupying printing resources, and tasks in the elastic buffer pool are executed when resources are idle.

[0060] The termination mechanism module 5 is configured to exit the dynamic adjustment mode when the task queue is empty or the system load drops below a preset system load threshold.

[0061] The present application also provides an intelligent terminal, including a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and execute the above-mentioned printing task scheduling method based on the main control chip.

[0062] This application coordinates the operation of each module through the main control chip, achieving the characteristics of fast response and high scheduling efficiency for high-priority tasks. The connection relationship, position relationship and mutual coordination relationship between each module are close and efficient, ensuring the stability and reliability of the printing task scheduling process. For example, in the dynamic priority adjustment process, by introducing the waiting time coefficient, the priority of long-waiting tasks can be effectively improved, thereby avoiding the impact of critical tasks on user experience due to excessive delays; in the task queue reorganization process, by dividing the real-time task pool and the elastic buffer pool, the cross-task memory fragmentation problem is effectively reduced, and the scheduling efficiency in high-concurrency scenarios is improved; in the resource allocation execution process, by dynamically monitoring the resource occupancy status, efficient resource utilization is achieved and resource waste is avoided. These technical means work together to enable this application to significantly improve the real-time performance and scheduling efficiency of the system in high-concurrency printing task scenarios.

[0063] Those skilled in the art will clearly understand that for the sake of convenience and brevity, the division of the above-mentioned functional modules is only used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working processes of the above-mentioned systems, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0064] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0065] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0066] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0067] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk.

[0068] The above are all preferred embodiments of the present application and are not intended to limit the scope of protection of this application. Unless otherwise specified, any feature disclosed in this specification (including the abstract and drawings) may be replaced by other equivalent or similar features. In other words, unless otherwise specified, each feature is merely an example of a series of equivalent or similar features.

Claims

1. A printing task scheduling method based on a main control chip, characterized in that: include: Initial task classification: determines the basic priority of the task based on the attributes of the task newly added to the print queue and the current system load status; wherein, the task attributes include the task source type, task size and urgency tag, and the current system load status includes the system resource utilization and task queue length collected in real time by the main control chip; dynamic priority adjustment: determines whether to enter the dynamic adjustment mode based on the preset system load threshold, and calculates the dynamic priority according to the task waiting time and urgency tag; wherein, the dynamic adjustment mode is activated when the system load exceeds the preset system load threshold, and the dynamic priority calculation formula is: dynamic priority = basic priority × waiting time coefficient, The calculation formula for the waiting time coefficient is: waiting time coefficient = 1.0 + waiting seconds / 100; the task queue is reorganized, and the task queue is sorted based on the recalculated dynamic priority to ensure that high-priority tasks are placed first; wherein, high-priority tasks are assigned to the real-time task pool, and low-priority tasks are assigned to the elastic buffer pool; resource allocation is executed, and printing resources are allocated and tasks are executed in sequence based on the reorganized task queue; wherein, tasks in the real-time task pool occupy printing resources first, and tasks in the elastic buffer pool are executed when resources are idle; the termination mechanism is triggered, and when the task queue is empty or the system load drops below the preset system load threshold, the dynamic adjustment mode is exited.

2. The printing task scheduling method based on the main control chip according to claim 1 is characterized in that: The specific method of dynamic priority adjustment includes: system load monitoring, the main control chip collects system resource utilization and task queue length in real time through built-in sensors; wherein, the system resource utilization is expressed in percentage, and the task queue length is counted by the number of currently queued tasks; load evaluation judgment, when the system load exceeds the preset system load threshold, enters dynamic adjustment mode; wherein, the system load is obtained by weighted calculation of the system resource utilization and the task queue length, the system resource utilization weight coefficient is 0.6, and the task queue length weight coefficient is 0.

4.

3. The printing task scheduling method based on the main control chip according to claim 1 is characterized in that: The specific method of task queue reorganization includes: task queue partitioning, high-priority tasks are assigned to the real-time task pool, and low-priority tasks are assigned to the elastic buffer pool; task migration rules, when a high-priority task is completed or resources are released, the task with the highest priority is selected from the elastic buffer pool and migrated to the real-time task pool.

4. The printing task scheduling method based on the main control chip according to claim 1 is characterized in that: The specific method for executing resource allocation includes: resource occupancy detection, the main control chip monitors the occupancy status of printing resources in real time; wherein, the printing resources include a print head, an ink cartridge and a paper transmission module; resource allocation decision, the resource allocation order is determined based on the dynamic priority and the occupancy status of the printing resources; wherein, high-priority tasks occupy idle resources first, and low-priority tasks are allocated according to the dynamic priority order when resources are idle; resource release notification, when a task is completed or interrupted, the main control chip immediately releases the corresponding resources and notifies the task queue; wherein, the resource release notification mechanism is triggered by a hardware interrupt signal.

5. The printing task scheduling method based on the main control chip according to claim 1 is characterized in that: The specific method for triggering the termination mechanism includes: task queue detection, the main control chip detects the status of the task queue in real time; wherein, the status of the task queue includes the number of tasks and the distribution of task priorities; system load evaluation, when the task queue is empty or the system load drops below 50% of the preset system load threshold, the termination mechanism is triggered; static priority recovery, exiting the dynamic adjustment mode and resuming static priority scheduling; wherein, the static priority scheduling directly determines the task priority based on the task attributes.

6. The printing task scheduling method based on the main control chip according to claim 5 is characterized in that: The logic of the static priority scheduling is reinitialized by the main control chip.

7. The printing task scheduling method based on the main control chip according to claim 1 is characterized in that: The task source types in the task attributes include user interaction tasks, batch printing tasks and scheduled printing tasks; the task size is counted by the number of pages required to print the task; and the urgency label includes three levels: high, medium and low.

8. The printing task scheduling method based on the main control chip according to claim 1 is characterized in that: The task queue reorganization sorting method is based on the dynamic priority value from large to small.

9. A printing task scheduling system based on a main control chip, characterized in that: include: A task classification module (1) is used to determine the basic priority of a task based on the attributes of a task newly added to the print queue and the current system load status; wherein the task attributes include the task source type, the task size and the urgency tag, and the current system load status includes the system resource utilization rate and the task queue length collected in real time by the main control chip; a priority adjustment module (2) is used to determine whether to enter the dynamic adjustment mode based on a preset system load threshold, and calculate the dynamic priority according to the task waiting time and the urgency tag; wherein the dynamic adjustment mode is started when the system load exceeds the preset system load threshold, and the dynamic priority calculation formula is: dynamic priority = basic priority × waiting time coefficient, the waiting time coefficient The time coefficient calculation formula is: waiting time coefficient = 1.0 + waiting seconds / 100; a task queue management module (3) is used to sort the task queue based on the recalculated dynamic priority to ensure that high-priority tasks are placed first; wherein high-priority tasks are allocated to the real-time task pool and low-priority tasks are allocated to the elastic buffer pool; a resource allocation module (4) is used to allocate printing resources and execute tasks in sequence based on the reorganized task queue; wherein tasks in the real-time task pool take priority in occupying printing resources, and tasks in the elastic buffer pool are executed when resources are idle; a termination mechanism module (5) is used to exit the dynamic adjustment mode when the task queue is empty or the system load drops below the preset system load threshold.

10. An intelligent terminal, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executes the printing task scheduling method based on the main control chip according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Bezier curve based two-chip 3D printer system

    CN105500703A

  • Color printer control method and system based on SOC chip

    CN110968274A

  • Job priority control method and system based on printer

    CN117573050A

  • Batch task optimization method based on dynamic priority scheduling

    CN119621274A