An industrial control computer task scheduling and response system
By using multi-dimensional hardware conflict quantification and two-level serial coupling calculation, combined with inter-core migration and resource avoidance, the timing uncertainty problem caused by hardware resource competition in industrial control computers is solved, and adaptive optimization and stability improvement of the scheduling system are achieved.
Patent Information
- Application Number
- CN202611321938.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-28
- Publication Date
- 2026-11-17
AI Technical Summary
Existing industrial control computer scheduling systems cannot effectively quantify hardware resource competition, leading to task timing uncertainty, excessive latency, and production accidents. Furthermore, the scheduling model lacks adaptive capabilities and is unable to cope with hardware aging and environmental changes.
By employing multi-dimensional hardware conflict quantification and two-level serial coupling calculation, a default pre-awareness decision metric is generated. Through inter-core migration and low-priority task resource avoidance, combined with a closed-loop calibration module, the prediction deviation is dynamically adjusted to achieve online adaptive optimization of the scheduling model.
It improves the determinism of task timing, reduces the risk of task timeout, adapts to hardware competition in complex industrial control sites, ensures the long-term reliability and stability of the system, and reduces the need for manual parameter adjustment.
Smart Images

Figure CN123113532A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial control system technology, specifically to an industrial control computer task scheduling and response system. Background Technology
[0002] Industrial control computers, as the core computing platform of industrial automation control systems, undertake parallel processing of various tasks such as motion control, sensor data acquisition, and equipment status monitoring. In actual industrial settings, different tasks simultaneously initiate hardware operations such as DMA transfers, interrupt requests, cache accesses, and industrial bus read / write operations. This concurrent operation generates significant hardware resource contention. Industrial scenarios have stringent requirements for task timing determinism; any delays or deadline breaches can directly lead to production process disruptions and equipment malfunctions. Currently, most industrial control platforms' scheduling mechanisms primarily focus on software-level timing conditions such as task cycles and deadlines. The additional latency caused by hardware resource contention is a difficult-to-control disturbance factor. The latency fluctuations caused by hardware contention are superimposed on the actual task execution process. Even with well-planned software timing, actual task response times may exceed design expectations. Furthermore, dynamic changes in on-site conditions can further amplify the timing uncertainty caused by hardware contention.
[0003] Traditional real-time scheduling solutions mostly focus on the allocation and control of task software timing, lacking a quantitative identification link for conflicts of various hardware resources. This makes it impossible to assess the damage to task timing caused by hardware contention before tasks enter the running state. Some scheduling solutions only initiate post-event handling after detecting task timeouts, a passive response mode that fails to anticipate timing breach risks. When operational anomalies are detected, global preemption and overall task queue reordering are commonly triggered, significantly altering the runtime sequence of all tasks within the system. This approach can cause unnecessary interruptions to low-priority business tasks. Furthermore, the model parameters of existing scheduling logic are mostly pre-configured offline, remaining fixed after system deployment, without establishing a closed-loop path for correcting the scheduling model using actual operational data. Faced with the hardware aging and changes in the electromagnetic environment resulting from long-term operation of industrial equipment, the predictive bias of fixed-parameter models gradually accumulates, leading to a continuous decline in the accuracy of scheduling risk identification over long periods, making it difficult to maintain stable scheduling output. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and provide an industrial control computer task scheduling and response system. The system generates a default pre-perception decision metric through multi-dimensional hardware conflict quantification and two-level serial coupling calculation, and performs differentiated scheduling interventions based on risk levels, including inter-core migration and low-priority task resource avoidance. A closed-loop calibration module dynamically adjusts the prediction deviation correction coefficient and disturbance margin threshold based on actual runtime latency data, achieving online adaptive optimization of the scheduling model. This invention improves the timing determinism of highly critical tasks without triggering global preemption, effectively copes with hardware resource competition and field environment drift, and ensures the long-term reliability and stability of the industrial control system.
[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: an industrial control computer task scheduling and response system, the system comprising: Task management module: Inputs and stores timing parameters, hardware resource masks and disturbance tolerance parameters of various industrial control tasks, maintains task running status in real time, and outputs basic attribute data; Resource simulation module: Before a task enters the ready queue, it compares the hardware resource usage relationship between the task to be scheduled and the currently running task, quantifies the degree of hardware conflict in multiple dimensions, and generates a comprehensive conflict metric. Risk Decision Module: Receives basic attribute data and comprehensive conflict measurement value, combines historical prediction deviation correction coefficient to complete two-level serial coupling calculation to obtain default pre-perception decision measurement value, classifies risk level according to default pre-perception decision measurement value, and issues corresponding scheduling instructions according to risk level. The avoidance execution module receives scheduling instructions and performs inter-core migration or low-priority task resource avoidance operations according to the risk level, without triggering uncontrollable global preemption, and collects actual runtime latency data of tasks throughout the process. Closed-loop calibration module: Receives actual runtime delay data of the task, calculates the historical prediction deviation correction coefficient by statistically analyzing the prediction-actual delay deviation, completes incremental adjustment of the disturbance margin threshold, and writes the correction coefficient and the adjusted disturbance margin threshold back to the aforementioned task element management module.
[0006] Furthermore, the task management module supports two task access methods: static batch entry and dynamic real-time mounting. During the industrial control computer startup phase, all attributes of resident production tasks are entered in batches through configuration files. During the operation phase, it supports real-time entry of attributes for temporary maintenance and diagnostic tasks. Each task is bound to three types of attribute data. The first type is timing parameters, including the task execution cycle, absolute deadline, worst-case execution time, and remaining timing slack margin. The remaining timing slack margin is calculated by subtracting the remaining execution time of the task from the remaining deadline. The second type is hardware resource masks, which are encoded according to four types of hardware resources: DMA channels, interrupt vectors, cache line groups, and IO bus ports, marking the exclusive or shared attributes of each type of resource. The third type is disturbance tolerance parameters, which set corresponding disturbance margin thresholds for the four types of hardware resources, representing the maximum additional hardware contention latency that the task can withstand. At the same time, the task's critical level weight is configured, with high-level tasks having a weight value greater than 1, medium-level tasks having a weight value equal to 1, and low-level tasks having a weight value less than 1.
[0007] Furthermore, the task management module updates the four operational states of a task in real time: ready, running, blocked, and completed. It pushes differentiated data to related parts for each state and updates status markers and corresponding timing parameters synchronously with the task scheduling process. When a task is in the registered and awaiting scheduling state, it pushes complete hardware resource mask data to the resource inference module to support conflict inference calculations. When a task is in the ready queue state, it pushes timing parameters, disturbance margin thresholds, and critical level weight data to the risk decision module to support risk assessment calculations. When a task is in the running state, it synchronously updates the resource occupancy status to the resource inference module to ensure that the inference results are consistent with the actual operating state. After the task is completed, it receives calibration parameters from the closed-loop calibration module and updates the disturbance margin threshold and deviation correction coefficient for the corresponding task. All parameter updates retain historical version records, supporting scheduling effect retrospection and parameter optimization reference.
[0008] Furthermore, the resource deduction module is automatically triggered when a new task requests to enter the ready queue or when a running task requests new hardware access permissions, calculating the conflict degree of four types of hardware resources dimension by dimension. The deduction process covers four core hardware resources dimension by dimension. For DMA channels, it counts the number of channels overlapping between the task to be scheduled and the currently running task, and determines the conflict intensity based on the channel's exclusive or shared attributes. The conflict intensity is highest when exclusive channels overlap, and increases progressively according to the number of tasks simultaneously occupying shared channels when they overlap. For interrupt vectors, it compares the vector number with the priority level, counts the trigger density of interrupts of the same priority, and identifies the conflict intensity of interrupts in progress. The conflict intensification effect caused by interrupt storms is addressed by: for cache line groups, mapping the memory access address range of tasks to the corresponding cache line groups, and calculating the proportion of overlapping line groups to the total memory access line groups as the conflict intensity; for industrial buses, superimposing the bandwidth requirements of running tasks and tasks to be scheduled, and comparing them with the bus's rated bandwidth to obtain the load rate as the conflict intensity; weighted normalization and fusion processing is performed on the single-dimensional conflict intensity of each hardware resource to generate a comprehensive conflict metric value between 0 and 1. The weight coefficients of various resources can be configured according to the business characteristics of industrial control sites. For motion control scenarios, the weight ratio of DMA channels is increased, and for multi-sensor acquisition scenarios, the weight ratio of interrupt vectors is increased.
[0009] Furthermore, the resource simulation module performs weighted normalization fusion processing on the single-dimensional conflict intensity of the four types of hardware resources. The weight coefficients of each type of resource are preset according to the business characteristics of the industrial control site. For motion control scenarios, the weight ratio of DMA channels is increased, and for multi-sensor acquisition scenarios, the weight ratio of interrupt vectors is increased. After fusion, a comprehensive conflict metric is generated, with a fixed range between 0 and 1. The larger the value, the stronger the overall competitive stress of hardware resources. The resource simulation transmits the generated comprehensive conflict metric to the risk decision module in real time as the hardware dimension input for calculating the time-series-resource coupling damage degree. Whenever the task status changes, the resource simulation automatically refreshes the global resource occupancy status and recalculates the comprehensive conflict metric of all ready tasks to ensure the real-time performance and accuracy of the simulation results.
[0010] Furthermore, the risk decision-making module incorporates a two-level serial coupled calculation model. The first level calculates the time-resource coupling impairment degree, and the calculation expression is: In the formula The time-resource coupling impairment degree characterizes the overall impairment degree caused by hardware resource contention to task timing constraints. This is a comprehensive conflict metric, ranging from 0 to 1. The criticality level of the task is weighted as follows: high criticality tasks have a value greater than 1, medium criticality tasks have a value equal to 1, and low criticality tasks have a value less than 1. This is the disturbance margin threshold for the hardware resources corresponding to the task, representing the maximum additional latency that the task can withstand due to hardware disturbances. This is the historical prediction deviation correction coefficient, output from the closed-loop calibration process, with a value range of 0 < ≤1, the larger the actual deviation, the smaller the coefficient value; The remaining time slack margin for the task is the difference between the remaining time until the deadline and the remaining execution time of the task. This calculation fits the impact of the change in time slack margin on the degree of damage through a dynamic decay mechanism of the denominator. When the margin is sufficient, the degree of damage is automatically suppressed, and when the margin is narrowed, the degree of damage increases rapidly.
[0011] Furthermore, after obtaining the time-resource coupling damage degree, the risk decision module performs the calculation of the second-level default pre-perception decision metric, the calculation expression of which is: In the formula, It serves as a measure for predicting defaults and as the final basis for risk level classification. This represents the temporal-resource coupling impairment degree calculated at the first level. An adjustable steepness coefficient is provided for industrial control scenarios to control the degree of abrupt changes in risk boundaries. The larger the value, the faster the decision metric increases when the margin approaches the disturbance threshold. The engineering value range is 3 to 5, which can be adjusted according to the business scenario. This represents the remaining timing slack margin for the task. This represents the perturbation margin threshold for the hardware resources corresponding to the task; this calculation uses a nonlinear sigmoid mapping mechanism to characterize the risk mutation effect when the margin approaches the threshold. Much larger When the decision metric is suppressed, it corresponds to a low-risk state; when near At that time, the decision metric rises rapidly, accurately identifying the critical default state; when Less than When the decision metric is maximized, it corresponds to a high-risk default state. Two-level judgment thresholds are set based on the default pre-perception decision metric. If it is higher than the high threshold, it is judged as high risk and triggers the inter-task core migration strategy. If it is between the two thresholds, it is judged as medium risk and triggers the low-priority task resource avoidance and retreat strategy. If it is lower than the low threshold, it is judged as low risk and no scheduling intervention is executed.
[0012] Furthermore, when the avoidance execution module receives a high-risk scheduling instruction, it executes an inter-core task migration strategy. The strategy first identifies a set of highly critical tasks affected by resource conflicts, queries the hardware resource occupancy status of all CPU cores in the system, calculates the load level of the conflicting hardware for each core, and selects the core with the highest idle resource level as the migration target. During the migration process, the context data, timing constraint parameters, and hardware resource configuration information of the tasks are completely transferred, and the cycle, deadline, and criticality level of the tasks remain unchanged before and after the migration. After the migration is completed, the task running location information is updated synchronously, and the resource simulation module is notified to refresh the global hardware resource occupancy status. The entire migration process does not trigger a global scheduling reordering, but only adjusts the running core of the specified tasks to ensure that the subsequent simulation results are consistent with the actual running status.
[0013] Furthermore, when the avoidance execution module receives a medium-risk level scheduling instruction, it executes a low-priority task resource avoidance strategy. First, it identifies low-critical-level tasks in the conflict task set and adjusts the triggering timing of their hardware resource requests. During the hardware resource occupancy period of high-critical-level tasks, it inserts a waiting time slot to postpone the resource requests of low-critical-level tasks. The length of the waiting time slot is dynamically matched with the risk level; the higher the risk level, the longer the waiting time slot. The avoidance operation only targets the specific hardware resources that cause the conflict. The non-conflicting resource access and logical operation links of low-critical-level tasks are not affected, and the tasks themselves are not terminated or discarded. During the avoidance execution process, the resource occupancy status of high-critical-level tasks is monitored in real time. After the high-critical-level tasks release resources, the resource requests of low-critical-level tasks are immediately awakened. While ensuring the timing reliability of high-critical-level tasks, the execution efficiency and integrity of low-critical-level tasks are preserved to the greatest extent.
[0014] Furthermore, the closed-loop calibration module receives the actual response latency data of the task returned by the scheduling execution, retrieves the predicted latency data within the corresponding scheduling period to complete the deviation comparison; the calibration process adopts a fixed-length sliding window mechanism to save the deviation data of the same task and resource type in the most recent multiple rounds. When new data enters the window, it automatically replaces the oldest historical data. The data in the window is processed by smoothing filtering to filter out abnormal values caused by occasional hardware jitter, so as to obtain a stable deviation trend; the historical predicted deviation correction coefficient and disturbance margin threshold are adjusted according to the incremental deviation trend after smoothing. When the actual latency is continuously higher than the predicted value, the coefficient value is reduced to improve the sensitivity of risk prediction. When the actual latency is continuously lower than the predicted value, the coefficient value is increased to reduce unnecessary scheduling intervention; the updated correction coefficient is synchronized to the risk decision module in real time and directly participates in the next round of time-series-resource coupling damage degree calculation to realize the online adaptive adjustment of the prediction model.
[0015] Furthermore, the closed-loop calibration module simultaneously performs incremental adjustments to the disturbance margin threshold. Based on the long-term deviation trend, it fine-tunes the disturbance margin threshold of the hardware corresponding to the task, with each adjustment strictly controlled within 10% of the current threshold to avoid system scheduling fluctuations caused by parameter jumps. It also periodically calculates the global risk prediction accuracy, setting it at 95% as the criterion. When the overall accuracy falls below the set standard, it triggers a threshold fine-tuning operation for all tasks, adapting to chronic changes such as hardware performance drift, peripheral aging, and increased environmental interference in industrial settings, ensuring the prediction accuracy and scheduling reliability of the system in the long term.
[0016] Compared with existing technologies, this industrial control computer task scheduling and response system has the following advantages: I. This invention achieves joint evaluation of hardware resource competition and timing constraints through a collaborative architecture of task management, resource projection, and risk decision-making. It overcomes the limitations of traditional scheduling that relies solely on timing parameters for judgment, quantifying the degree of competitive stress from multiple hardware resource dimensions and combining this with the task's own tolerance capabilities to complete risk measurement, enabling early identification of task default risks. Based on risk level differentiation, it selects inter-core migration or resource avoidance methods to mitigate system jitter caused by uncontrollable global preemption. While ensuring the timing constraints of high-priority tasks, it does not directly terminate the execution of low-priority tasks, preserving their computational integrity. It can adapt hardware resource weights for different industrial business scenarios, aligning with actual field conditions such as motion control and multi-sensor acquisition, reducing task timeouts, improving the timing stability of industrial control computer task execution, and adapting to complex and ever-changing hardware competition scenarios in industrial control environments.
[0017] Second, this invention establishes a self-iterative link in the scheduling system through a closed-loop calibration module. It collects the actual runtime delay of tasks, compares it with the predicted delay to form deviation statistics, and uses a sliding window to filter out abnormal data caused by occasional hardware jitter. It then incrementally adjusts the model correction coefficients and disturbance margin thresholds to achieve online adaptive optimization of the scheduling prediction model. For long-term, slow changes such as hardware performance drift, peripheral aging, and increased environmental interference, it uses the global prediction effect as a reference to trigger threshold fine-tuning, avoiding scheduling disorder caused by parameter jumps. The updated parameters are written back to the front-end module to participate in subsequent scheduling calculations, continuously narrowing the gap between predictions and actual operating conditions. This eliminates the need for frequent manual parameter tuning, maintaining the accuracy of risk identification during long-term uninterrupted system operation and improving the environmental adaptability and long-term operational reliability of the entire scheduling system.
[0018] Other advantages, objectives and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination or study, or may be learned from the practice of the invention. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0020] Figure 1 This is a framework diagram of an industrial control computer task scheduling and response system. Figure 2 A flowchart of an industrial control computer task scheduling and response system; Figure 3 This is a flowchart of the risk decision-making module of the present invention. Detailed Implementation
[0021] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.
[0022] Example 1: This embodiment is deployed on a multi-core industrial control computer used in a motion control production line. The entire machine needs to run multiple resident motion control production tasks simultaneously. During the production line debugging and troubleshooting phases, temporary maintenance and diagnostic tasks will also be initiated intermittently. Resident production tasks have strict requirements on cycle execution and deadlines. During task execution, they will frequently access four types of hardware resources: DMA channels, interrupt vectors, cache line groups, and I / O bus ports. Concurrent access to hardware by multiple tasks can easily lead to resource contention, thereby introducing additional latency. Once a highly critical motion control task defaults on its timing, it will directly cause misalignment of the workstations on the production line, resulting in material loss. Figure 1 As shown.
[0023] After the system powers on and starts up, the task management module reads the local configuration file and uses a static batch input method to input and store the timing parameters, hardware resource masks, and disturbance tolerance parameters for all resident motion control production tasks. It completely saves the multiple attributes corresponding to each task. During production line operation, when maintenance personnel initiate debugging operations, the task management module receives externally submitted task attribute information and uses a dynamic real-time mounting method to access temporary maintenance diagnostic tasks. It simultaneously and continuously maintains all tasks in four operational states: ready, running, blocked, and completed. It updates status flags and associated timing parameters in real time following the task scheduling process. During the task registration and waiting-to-schedule phase, it outputs the hardware resource mask to the resource deduction module. During the ready queue phase, it pushes timing-related, threshold, and weight data to the risk decision module. When a task is running, it synchronously synchronizes resource occupancy externally. After task execution, it receives and transmits calibration parameters to complete internal data updates. All parameter changes are retained in historical versions, allowing for subsequent backtracking of scheduling effects based on historical versions, supporting on-site technicians in parameter optimization.
[0024] When a new motion control production task is ready to enter the ready queue, the system automatically triggers the resource deduction module to start the calculation process. The resource deduction module sequentially calculates the conflict level of four types of hardware resources: DMA channels, interrupt vectors, cache line groups, and I / O bus ports. For DMA channels, it counts the channel overlap between the task to be scheduled and the currently running task, and determines the conflict intensity based on the exclusive or shared attributes of the channel itself. For interrupt vectors, it compares the vector number and priority level, counts the interrupt trigger density of the same priority, and identifies the conflict aggravation phenomenon caused by interrupt storms. For cache line groups, it counts the proportion of overlapping cache line groups corresponding to the memory access addresses of the mapped tasks, and considers the bandwidth requirements of different tasks superimposed on the industrial I / O bus. By combining the load conditions obtained from the bus rated bandwidth and configuring various resource weight coefficients based on the business characteristics of motion control scenarios, the weight ratio of the DMA channel is increased. The single-dimensional conflict intensity obtained from all hardware dimensions is weighted, normalized, and fused to generate a comprehensive conflict metric. This value can objectively reflect the strength of the overall hardware competition stress at present. The resource simulation module sends the comprehensive conflict metric to the risk decision module in real time as the hardware dimension input for calculating the time-series-resource coupling damage degree. Whenever the task status changes, the resource simulation module will actively refresh the global hardware resource occupancy status and recalculate the comprehensive conflict metric corresponding to all ready tasks to ensure that the output simulation results are consistent with the actual operating status of the system.
[0025] The risk decision-making module receives basic attribute data from the task element management module and comprehensive conflict metric values output by the resource deduction module. It then calls the system's built-in two-level serial coupled calculation model. The first level performs time-series-resource coupled damage degree calculation, inputting the comprehensive conflict metric values. Task criticality level weight The perturbation margin threshold of the hardware resources corresponding to the task. Historical prediction deviation correction coefficient Remaining time slack margin for the task According to the formula: The solution involves fitting the impact of timing margin changes on the degree of impairment through a dynamic decay mechanism in the denominator of the formula. When the remaining timing slack margin of the task is sufficient, the impairment is automatically suppressed. As the remaining timing slack margin of the task continues to narrow, the impairment value will rise rapidly. This quantifies the comprehensive impairment degree caused by hardware resource contention on task timing constraints, thus obtaining the timing-resource coupling impairment degree. Then, the second stage of the two-stage serial coupling calculation model is entered to calculate the default pre-perception decision metric, and the already solved time-series-resource coupling damage degree is substituted into it. Adjustable steepness coefficient for industrial control scenarios Remaining time slack margin for the task The perturbation margin threshold of the hardware resources corresponding to the task. According to the formula: Solving for default prediction decision metrics The system leverages the inherent nonlinear S-shaped mapping mechanism of the formula to characterize the risk mutation effect when the task's remaining time slack margin approaches the disturbance margin threshold. If the remaining time slack margin is much larger than the disturbance margin threshold, the default pre-perception decision metric will be suppressed, indicating that the system is in a low-risk state. When the remaining time slack margin approaches the disturbance margin threshold, the default pre-perception decision metric rises rapidly, identifying a critical default state. When the remaining time slack margin is less than the disturbance margin threshold, the default pre-perception decision metric reaches its maximum, corresponding to a high-risk default state. The risk decision module uses the obtained default pre-perception decision metric as a basis for decision-making. By comparing the two-level decision thresholds to classify the risk level, this embodiment calculates a high-risk result and then issues a scheduling instruction matching the high-risk level to the avoidance execution module. Upon receiving the scheduling instruction, the avoidance execution module initiates the inter-core migration strategy execution process. It identifies all high-critical motion control tasks affected by the current hardware resource conflict, iterates through and queries the hardware resource occupancy status of all CPU cores within the system, and calculates the load level corresponding to the conflicting hardware within each core. It then selects the CPU core with the highest idle resource level as the migration target for this task. During the migration operation, the task context data, timing constraint parameters, and hardware resource configuration information are completely transferred to the target core. The task's own runtime, deadline, and criticality level remain unchanged before and after the migration. After the migration is complete, the actual running location information of the task is updated, and the resource deduction module is proactively notified to refresh the global hardware resource occupancy status. The entire process does not trigger uncontrollable global preemption or cause large-scale system scheduling reordering; it only changes the running core location of the specified task, ensuring that the output results of subsequent resource deduction steps accurately reflect the actual hardware operating status.
[0026] The avoidance execution module continuously collects actual runtime latency data of the task throughout the entire process of scheduling strategy execution, and completely transmits the collected measured data to the closed-loop calibration module to complete the data verification of the field conditions. In the data collected from multiple rounds of field operations, it can be seen that when the scheduling logic of this system is not enabled, high-critical motion control tasks will repeatedly experience latency exceeding the limit due to hardware contention. After enabling the scheduling logic of this system and completing the inter-core migration intervention, high-critical motion control tasks no longer experience latency exceeding the limit under similar hardware contention conditions, and latency fluctuations are constrained within the acceptable range of the task.
[0027] After receiving the actual runtime latency data of the task, the closed-loop calibration module retrieves the predicted latency data corresponding to the same scheduling cycle for deviation comparison. It then activates a fixed-length sliding window mechanism to save multiple sets of deviation data generated recently under the same task and resource type. Newly generated data automatically replaces the oldest historical data stored within the window. The dataset within the window is then smoothed and filtered to remove abnormal values caused by occasional hardware jitter, resulting in a stable and referable deviation trend. Based on this smoothed deviation trend, the historical predicted deviation correction coefficient and disturbance margin threshold are incrementally adjusted. The adjusted historical predicted deviation correction coefficient is directly supplied to the risk decision module to participate in the next round of time-series-resource coupling. In addition to calculating the damage level, the closed-loop calibration module also performs incremental adjustments to the disturbance margin threshold. At the same time, it periodically calculates the global risk prediction accuracy and compares the obtained accuracy with the preset standard. When the overall accuracy does not reach the preset standard, it initiates a threshold fine-tuning operation for all tasks to adapt to various operating conditions caused by hardware performance drift, peripheral aging, and increased environmental interference in the industrial field. After multiple rounds of iterative calibration, the deviation between the system risk prediction results and the actual operating conditions on site continues to narrow. All updated correction coefficients and adjusted disturbance margin thresholds are uniformly written back to the task element management module to complete the entire scheduling closed loop and continuously ensure the reliability of scheduling judgments during long-term continuous operation of the production line.
[0028] This embodiment targets a motion control production line scenario. It leverages the collaborative efforts of five system modules to achieve unified management of both permanent production tasks and temporary maintenance and diagnostic tasks. When a new task enters the ready queue, it performs multi-dimensional hardware conflict simulation. A two-level serially coupled computational model yields a default pre-perception decision metric. Upon determining high risk, it executes inter-core migration operations to mitigate timing risks caused by hardware contention. Operating condition verification is conducted using actual on-site latency data. Inter-core migration intervention effectively suppresses latency exceedance issues in highly critical motion control tasks. The closed-loop calibration module utilizes a sliding window to perform deviation statistics, adaptively updating various internal system parameters to adapt to hardware aging and changes in the on-site environment. This reduces the probability of timing defaults on production line tasks, decreases the workload of manual parameter debugging, and ensures continuous and stable operation of the motion control production line.
[0029] Example 2: This embodiment applies to a multi-core industrial control computer mounted on a multi-sensor centralized data acquisition device. The device needs to run multiple resident sensor acquisition tasks in parallel. Each acquisition task interfaces with different field sensor hardware and needs to periodically complete data reading and buffer forwarding. During operation, the device will also periodically initiate temporary maintenance and diagnostic tasks for status reading. These temporary tasks randomly initiate hardware access requests, which can easily compete with the resident multi-sensor acquisition tasks for four types of hardware resources: DMA channels, interrupt vectors, buffer line groups, and I / O bus ports. This can cause hardware resource conflicts, interfere with the data reception timing of the sensor acquisition tasks, and result in sampling point loss and incorrect sampling intervals, affecting the upper-layer business's judgment of the field conditions. Figure 2 As shown.
[0030] After the equipment is powered on, the task management module reads the configuration file and records and stores the timing parameters, hardware resource masks, and disturbance tolerance parameters of the multi-channel sensor acquisition tasks in a static batch input method. It completely saves all attribute information of each acquisition task. Temporary operation and maintenance diagnosis tasks triggered during equipment operation are connected by dynamic real-time mounting. The task management module continuously maintains the ready, running, blocked, and completed running status of all acquisition tasks and operation and maintenance diagnosis tasks. It updates the task status flags and corresponding timing parameters in real time as the scheduling progresses. When a task is in the registered and waiting-to-be-scheduled state, it outputs the complete hardware resource mask to the resource inference module. When a task enters the ready queue, it outputs the timing parameters, disturbance margin threshold, and critical level weight to the risk decision module. During task operation, it outputs the resource occupancy status to the outside world. After the task is completed, it receives the calibration parameters sent back by the closed-loop calibration module to update the local storage content. Each parameter update retains the corresponding historical version, which is convenient for technicians to review the scheduling performance at different stages and use it for on-site parameter optimization reference.
[0031] When a temporary maintenance diagnostic task already running within the system initiates a request for new hardware access permissions, it directly triggers the resource inference module to start the inference calculation process. The resource inference module independently performs conflict intensity calculations for four types of hardware resources: DMA channels, interrupt vectors, cache line groups, and I / O bus ports. For DMA channels, it statistically analyzes the channel overlap between tasks and determines the conflict intensity based on the channel's exclusive and shared attributes. For interrupt vectors, it compares vector numbers and priority levels, statistically analyzes the trigger density of interrupts with the same priority, and identifies the conflict aggravation caused by interrupt storms. For cache line groups, it statistically analyzes the overlap ratio of memory access address mapping to cache line groups. For I / O bus, it combines the bandwidth requirements of multiple tasks with the bus's rated bandwidth. The system considers a wide range of computing load conditions and combines the on-site characteristics of multi-sensor acquisition services to configure weight coefficients, increasing the weight ratio of interrupt vectors. It then performs weighted normalization and fusion on the single-dimensional conflict intensity obtained from various hardware dimensions to output a comprehensive conflict metric. This value reflects the strength of the overall hardware competition stress. The resource simulation module transmits the comprehensive conflict metric to the risk decision module as the hardware dimension input required for calculating the time-series-resource coupling damage degree. Whenever the task running status changes, the resource simulation module refreshes the global hardware resource occupancy status and recalculates the comprehensive conflict metric of all ready tasks to ensure that the output simulation results closely match the actual hardware occupancy of the equipment.
[0032] The risk decision module receives basic attribute data from the task management module and comprehensive conflict metric values output by the resource deduction module. It calls the built-in two-level serial coupling calculation model to first calculate the time-resource coupling damage degree, thereby reflecting the comprehensive damage caused by hardware resource competition to the task time constraints. Then, it calculates the default pre-perception decision metric value, and relies on the nonlinear S-shaped mapping mechanism to reflect the risk mutation effect when the time margin approaches the disturbance margin threshold. Based on the default pre-perception decision metric value, the risk level is divided to obtain the medium risk judgment conclusion in this scenario. Then, the corresponding medium risk level scheduling instruction is issued to the avoidance execution module. After receiving a medium-risk level scheduling instruction, the avoidance execution module initiates a low-priority task resource avoidance strategy. It identifies low-criticality temporary maintenance and diagnostic tasks within the conflicting task set and adjusts the timing of hardware resource requests for these tasks. Waiting slots are inserted during the time periods when high-critical sensor acquisition tasks occupy hardware resources, delaying the hardware resource requests of low-priority tasks. The length of the waiting slots matches the current risk level. This avoidance intervention only affects the specific hardware resources involved in the conflict; other logical operations and non-conflicting hardware access processes of low-priority tasks are not affected. The tasks themselves will not be terminated or discarded. The avoidance execution module continuously monitors the hardware resource occupancy status of high-critical sensor acquisition tasks. Once a high-critical task releases its corresponding hardware resources, it immediately wakes up the hardware resource request process for low-priority tasks, balancing the timing reliability of high-critical acquisition tasks with the overall execution efficiency of low-priority maintenance tasks. Figure 3 As shown.
[0033] The avoidance execution module continuously collects actual runtime latency data of tasks throughout the entire process of scheduling strategy execution. It submits the measured latency data to the closed-loop calibration module to complete data verification under field conditions. Multiple sets of measured data show that when the scheduling logic of this system is not enabled, some high-critical sensor acquisition tasks experience increased latency and data loss after hardware contention occurs. After enabling the low-priority task resource avoidance strategy, under the same hardware contention conditions, the latency of high-critical sensor acquisition tasks returns to the normal range, the sampling loss phenomenon is eliminated, and low-priority maintenance and diagnostic tasks only experience limited waiting and can be completed completely.
[0034] The closed-loop calibration module receives the actual runtime delay data of the task, retrieves the predicted delay data of the same scheduling cycle for deviation comparison, and uses a fixed-length sliding window mechanism to save the recent deviation data of the same task and resource type. New data enters the window to replace the earliest historical data in the window. All deviation data within the window is smoothed and filtered to remove abnormal data caused by occasional hardware jitter, resulting in a stable deviation trend. Based on the deviation trend, the historical predicted deviation correction coefficient and disturbance margin threshold are incrementally adjusted. The updated historical predicted deviation correction coefficient is sent to the risk decision module to participate in the subsequent time-series-resource coupling damage degree calculation. The closed-loop calibration module also performs incremental adjustment of the disturbance margin threshold, periodically calculates the global risk prediction accuracy, and compares the statistical results with the preset standard. When the global risk prediction accuracy does not reach the preset standard, the threshold fine-tuning of all tasks is performed to adapt to the changes in operating conditions caused by the aging of sensor peripherals and the increased interference of industrial field environment. All updated correction coefficients and disturbance margin thresholds are written back to the task element management module to complete the closed loop. The entire closed-loop process is iterated repeatedly to continuously narrow the gap between the predicted results and the actual operating conditions of the equipment, ensuring the stable performance of the scheduling response under the long-term uninterrupted operation of the multi-sensor acquisition equipment.
[0035] This embodiment targets a multi-sensor centralized data acquisition device, enabling unified management of multiple resident sensor acquisition tasks and randomly arriving temporary maintenance and diagnostic tasks. When a running task requests new hardware access permissions, resource simulation is initiated. A two-level serial coupling calculation model is used to obtain a default pre-perception decision metric. After determining medium risk, a low-priority task resource avoidance strategy is implemented, protecting the timing of high-critical acquisition tasks while preserving the integrity of low-priority tasks. The effectiveness is verified through on-site latency measurements, effectively improving sampling point loss and latency anomalies caused by hardware contention. The closed-loop calibration module uses a sliding window to process deviation data, adaptively updating various scheduling parameters to adapt to peripheral aging and environmental interference changes, reducing manual parameter tuning and ensuring long-term reliable operation of sensor data acquisition services.
[0036] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. An industrial control computer task scheduling and response system, characterized in that, The system includes: Task management module: Inputs and stores timing parameters, hardware resource masks and disturbance tolerance parameters of various industrial control tasks, maintains task running status in real time, and outputs basic attribute data; Resource simulation module: Before a task enters the ready queue, it compares the hardware resource usage relationship between the task to be scheduled and the currently running task, quantifies the degree of hardware conflict in multiple dimensions, and generates a comprehensive conflict metric. Risk Decision Module: Receives basic attribute data and comprehensive conflict measurement value, combines historical prediction deviation correction coefficient to complete two-level serial coupling calculation to obtain default pre-perception decision measurement value, classifies risk level according to default pre-perception decision measurement value, and issues corresponding scheduling instructions according to risk level. The avoidance execution module receives scheduling instructions and performs inter-core migration or low-priority task resource avoidance operations according to risk level, and collects actual runtime latency data of tasks throughout the process. Closed-loop calibration module: Receives actual runtime delay data of the task, calculates the historical prediction deviation correction coefficient by statistically analyzing the prediction-actual delay deviation, completes incremental adjustment of the disturbance margin threshold, and writes the correction coefficient and the adjusted disturbance margin threshold back to the aforementioned task element management module.
2. The industrial control computer task scheduling and response system according to claim 1, characterized in that, The task management module supports two task access methods: static batch entry and dynamic real-time mounting. During the industrial control computer startup phase, all attributes of resident production tasks are entered in batches through configuration files. During the operation phase, it supports real-time entry of attributes for temporary operation and maintenance diagnostic tasks. Each task is bound to three types of attribute data. The first type is timing parameters, including the task execution cycle, absolute deadline, worst-case execution duration, and remaining timing slack margin. The remaining timing slack margin is calculated by subtracting the remaining execution duration of the task from the remaining deadline duration. The second type is hardware resource masks, which are encoded according to four types of hardware resources: DMA channels, interrupt vectors, cache line groups, and IO bus ports, marking the exclusive or shared attributes of each type of resource. The third type is disturbance tolerance parameters, which set corresponding disturbance margin thresholds for the four types of hardware resources, representing the maximum additional hardware contention latency that the task can withstand, and configuring the task's critical level weight.
3. The industrial control computer task scheduling and response system according to claim 1, characterized in that, The task management module updates the four running states of a task in real time: ready, running, blocked, and completed. It pushes differentiated data to related parts for different states and updates the status flags and corresponding timing parameters synchronously with the task scheduling process. When a task is in the registration completed and waiting-to-be-scheduled state, it pushes complete hardware resource mask data to the resource inference module. When a task is in the ready queue state, it pushes timing parameters, disturbance margin thresholds, and critical level weight data to the risk decision module. When a task is in the running state, it synchronously updates the resource occupancy status to the resource inference module. After the task is completed, the calibration parameters returned by the closed-loop calibration module are received, and the disturbance margin threshold and deviation correction coefficient of the corresponding task are updated. All parameter updates retain historical version records.
4. The industrial control computer task scheduling and response system according to claim 1, characterized in that, The resource simulation module is automatically triggered when a new task requests to enter the ready queue or when a running task requests new hardware access permissions. It calculates the conflict degree of four types of hardware resources dimension by dimension. The simulation process covers four core hardware resources dimension by dimension. For DMA channels, it counts the number of channels overlapping between the task to be scheduled and the currently running task, and determines the conflict intensity based on the channel's exclusive or shared attributes. For interrupt vectors, it compares the vector number with the priority level, counts the trigger density of interrupts of the same priority, and identifies the conflict aggravation effect caused by interrupt storms. For cache line groups, it maps the memory access address range of the task to the corresponding cache line group, and counts the proportion of overlapping line groups to the total memory access line groups as the conflict intensity. For industrial buses, it superimposes the bandwidth requirements of the running task and the task to be scheduled, and compares them with the bus's rated bandwidth to obtain the load rate as the conflict intensity.
5. The industrial control computer task scheduling and response system according to claim 1, characterized in that, The risk decision-making module incorporates a two-level serial coupled calculation model. The first level calculates the time-resource coupling impairment degree, and the calculation expression is as follows: In the formula The time-resource coupling impairment degree; This is a comprehensive conflict metric. Assigning a weight based on the mission's criticality level; This is the disturbance margin threshold for the hardware resources corresponding to the task. This is a correction factor for historical prediction deviations; This represents the remaining timing slack margin for the task.
6. The industrial control computer task scheduling and response system according to claim 5, characterized in that, After obtaining the time-resource coupling damage degree, the risk decision module performs the calculation of the second-level default pre-perception decision metric, and the calculation expression is as follows: In the formula, As a measure for decision-making regarding the anticipation of default; This represents the temporal-resource coupling impairment degree calculated at the first level. Adjustable steepness coefficient for industrial control scenarios; This represents the remaining timing slack margin for the task. The disturbance margin threshold for the hardware resources corresponding to the task is set; two-level decision thresholds are set based on the default pre-perception decision metric. If the threshold is higher than the high threshold, it is judged as high risk; if the threshold is between the two thresholds, it is judged as medium risk; and if the threshold is lower than the low threshold, it is judged as low risk.
7. The industrial control computer task scheduling and response system according to claim 1, characterized in that, When the avoidance execution module receives a high-risk level scheduling instruction, it executes an inter-core task migration strategy. The strategy execution first identifies the set of high-critical tasks affected by resource conflicts, queries the hardware resource occupancy status of all CPU cores in the system, counts the load level of the conflicting hardware corresponding to each core, and selects the core with the highest idle degree of conflicting resources as the migration target. The migration process completely transfers the task's context data, timing constraint parameters, and hardware resource configuration information, while the task's cycle, deadline, and criticality level remain unchanged before and after the migration. After the migration is complete, the task running location information is updated synchronously, and the resource simulation module is notified to refresh the global hardware resource usage status.
8. The industrial control computer task scheduling and response system according to claim 1, characterized in that, When the avoidance execution module receives a medium-risk level scheduling instruction, it executes a low-priority task resource avoidance strategy. First, it identifies low-critical-level tasks in the conflict task set and adjusts the triggering timing of their hardware resource requests. During the hardware resource occupancy period of high-critical-level tasks, it inserts a waiting time slot to postpone the resource requests of low-critical-level tasks. The length of the waiting time slot is positively correlated with the risk level. The avoidance operation only targets the specific hardware resources that cause the conflict. The non-conflicting resource access and logical operation of low-critical-level tasks are not affected, and the tasks themselves are not terminated or discarded. During the avoidance execution process, the resource occupancy status of high-critical-level tasks is monitored in real time. After the high-critical-level tasks release resources, the resource requests of low-critical-level tasks are immediately awakened. While ensuring the timing reliability of high-critical-level tasks, the execution efficiency and integrity of low-critical-level tasks are preserved to the greatest extent.
9. The industrial control computer task scheduling and response system according to claim 1, characterized in that, The closed-loop calibration module receives the actual response latency data of the task transmitted back from the scheduling execution, retrieves the predicted latency data within the corresponding scheduling period to complete the deviation comparison; the calibration process adopts a fixed-length sliding window mechanism to save the deviation data of the same task and resource type in the most recent rounds. When new data enters the window, it automatically replaces the oldest historical data. The data in the window is processed by smoothing filtering to filter out outliers caused by occasional hardware jitter, so as to obtain a stable deviation trend; the historical predicted deviation correction coefficient and disturbance margin threshold are adjusted according to the incremental deviation trend after smoothing; the updated correction coefficient is synchronized to the risk decision module in real time and directly participates in the next round of time-series-resource coupling damage degree calculation.
10. The industrial control computer task scheduling and response system according to claim 1, characterized in that, The closed-loop calibration module simultaneously performs incremental adjustments to the disturbance margin threshold, fine-tuning the disturbance margin threshold of the hardware corresponding to the task based on the long-term deviation trend, with the single adjustment range strictly controlled within 10% of the current threshold; it also periodically calculates the global risk prediction accuracy, and triggers a threshold fine-tuning operation for all tasks when the overall accuracy is lower than the set standard.
