Resource dynamic adaptation scheduling system based on total site
By using the dynamic resource adaptation and scheduling system at the central site, the resources of edge execution units are monitored and scheduled in real time, which solves the shortcomings of resource management in existing technologies. It achieves task priority guarantee under high load, stable operation under medium load, and energy saving under low load, thereby improving the adaptability and ease of operation and maintenance in industrial sites.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANDA AUTOMATION TECH JIANGSU CO LTD
- Filing Date
- 2026-01-15
- Publication Date
- 2026-04-24
AI Technical Summary
The existing SCADA system's edge execution unit resource management mode fails to dynamically adjust, resulting in data acquisition delays and control logic response stuttering under high load scenarios, and high resource idle rate under low load scenarios, and inability to quickly respond to real-time field needs, affecting production safety and energy efficiency.
A resource dynamic adaptation and scheduling system based on the central site is adopted. The system monitors CPU utilization, memory usage and bandwidth in real time through the working condition perception unit module. Combined with task priority and load status, it generates differentiated resource scheduling strategies and manages them through a graphical interface.
It enables precise perception and flexible scheduling of edge execution unit resources, improves resource utilization, avoids delays and interruptions in core tasks, lowers the threshold for operation and maintenance, and improves production safety and energy efficiency.
Smart Images

Figure CN121919005A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of edge computing technology for industrial automation, and specifically to a resource dynamic adaptation and scheduling system based on a central site. Background Technology
[0002] In the field of industrial automation, the SCADA system is the core infrastructure for remote monitoring and local control of industrial field equipment. In this system, the edge execution unit, as the key carrier connecting field equipment and SCADA central server, is usually deployed in the industrial field. It undertakes the core responsibilities of data acquisition, local control logic execution, and bidirectional communication with the central server of field PLCs, sensors, actuators and other equipment. It is an important link to ensure the continuous and stable operation of industrial production.
[0003] Existing technologies, such as the invention patent application with announcement number CN119945993A, disclose a method, apparatus, device, and storage medium for site resource scheduling. The method includes: real-time collection of site resource usage and historical network data; prediction of traffic using a prediction model trained on the site's feature sequences; and dynamic optimization of access point network resources and load if the traffic exceeds a preset threshold. Existing technologies, such as the invention patent application with announcement number CN120469792A, disclose a method for dynamic perception and adaptive scheduling of heterogeneous resources. The method includes: collecting and storing heterogeneous resource attributes and states through hardware and software technologies; matching task requirements with an adaptive algorithm; and real-time monitoring and adjustment to ensure efficient and stable scheduling.
[0004] As can be seen from the above solutions, the current resource management mode of the edge execution units in existing SCADA systems has significant technical defects. The edge execution units adopt fixed hardware resource allocation rules such as CPU and memory, without dynamic adjustment based on actual on-site operating conditions. In high-load scenarios where multiple devices collect data in parallel and multiple sets of control logic execute simultaneously, insufficient resource supply can easily lead to a significant increase in data acquisition latency, control logic response lag, or even interruption. In low-load scenarios, the resource idle rate is high, resulting in energy waste of the edge execution units, which does not meet the energy conservation and consumption reduction requirements of industrial sites. The edge execution units use an indiscriminate resource scheduling method for tasks of different importance, without distinguishing between core and non-core tasks. Core tasks are easily preempted by non-core tasks, resulting in execution delays or interruptions, which may seriously affect on-site production safety. Adjusting the resource parameters of existing edge execution units requires writing code, compiling, and redeploying. When on-site operating conditions change, modifying resource configurations is time-consuming and requires professional technicians, making it impossible to quickly respond to real-time on-site needs and resulting in low adaptation efficiency. This makes it difficult for existing edge execution units to adapt to the complex and ever-changing operating conditions of industrial sites. Summary of the Invention
[0005] To address the aforementioned technical shortcomings, the present invention aims to provide a resource dynamic adaptation and scheduling system based on a central site.
[0006] To solve the above technical problems, the present invention adopts the following technical solution: The present invention provides a resource dynamic adaptation and scheduling system based on the main site, including a working condition perception unit module: used to calculate the CPU utilization rate of the edge execution unit, analyze the memory utilization rate, determine the bandwidth congestion, count the number of currently running tasks and obtain their key parameters, the key parameters including the path identifier of each task, the preset priority level, the execution status and the number of task cycle loss.
[0007] Preferably, the method for calculating the CPU utilization of the edge execution unit is as follows: through the task list interface of the underlying core control class, traverse and obtain the task structure of all running tasks in the edge execution unit. The task structure stores the task start time, task end time and task cycle time of each task.
[0008] For each acquired task structure, subtract its start time from its end time to obtain the actual CPU usage time of the task corresponding to that task structure. Then, divide this actual CPU usage time by the task cycle time to obtain the CPU utilization rate of that task.
[0009] The total CPU utilization is obtained by summing the CPU utilization of all tasks. The total CPU utilization is then divided by the total number of CPU cores in the edge execution unit to obtain the CPU utilization of the edge execution unit.
[0010] Preferably, the specific method for analyzing memory usage is as follows: obtain the current used memory and total memory capacity of the edge execution unit through the memory query interface, divide the current used memory by the total memory capacity, and obtain the memory usage as a percentage.
[0011] Preferably, the method for determining bandwidth congestion is as follows: obtain the real-time bandwidth usage of the edge execution unit network interface through the network interface of the underlying core control class; if the real-time bandwidth usage is greater than the preset bandwidth congestion threshold, then bandwidth congestion is determined; otherwise, bandwidth is determined to be unobstructed.
[0012] Preferably, the specific method for counting the number of currently running tasks and obtaining their key parameters is as follows: traverse all currently running tasks in the edge execution unit through the task list interface of the underlying core control class, obtain the task structure corresponding to each task, and count the total number of task structures as the number of currently running tasks.
[0013] For each key parameter of a currently running task, the unique path identifier of the task is parsed from its task structure. Based on the path identifier, the preset priority level of the task is obtained by querying and matching through the pre-set task configuration rule base. The real-time execution status of the task is obtained by reading the status register maintained independently for the task by the underlying core control class. The periodic monitoring unit of the underlying core control class is called to accumulate the number of times the actual completion time of the task since the task started that exceeds its preset period deadline, which is taken as the task period loss count.
[0014] Resource scheduling decision module: used to determine the load status of edge execution units and generate differentiated resource scheduling strategies based on the load status of edge execution units.
[0015] Preferably, the method for determining the load status of the edge execution unit is as follows: obtain the CPU utilization rate and memory utilization rate of the edge execution unit. If the CPU utilization rate of the edge execution unit is greater than or equal to a preset CPU utilization rate warning threshold, or the memory utilization rate is greater than or equal to a preset memory utilization rate warning threshold, then the edge execution unit is determined to be in a high load state.
[0016] If the CPU utilization of the edge execution unit is between the preset low CPU utilization threshold and the CPU utilization warning threshold, and the memory utilization is between the preset low memory utilization threshold and the memory utilization warning threshold, then the edge execution unit is determined to be in a medium load state.
[0017] If the CPU utilization rate of the edge execution unit is less than or equal to the preset low CPU utilization threshold, or the memory utilization rate is less than or equal to the preset low memory utilization threshold, then the edge execution unit is determined to be in a low load state.
[0018] Preferably, the method for generating a differentiated resource scheduling strategy based on the load status of the edge execution unit is as follows: when it is determined that the edge execution unit is in a high load state, a first resource scheduling strategy is generated and executed. The first resource scheduling strategy includes pausing all low-priority tasks, extending the execution cycle of medium-priority tasks, and binding core tasks to designated CPU cores.
[0019] When it is determined that the edge execution unit is in a medium load state, a second resource scheduling strategy is generated and executed. The second resource scheduling strategy is to maintain the execution status and resource allocation of all current tasks and continuously monitor resource changes.
[0020] When it is determined that the edge execution unit is in a low-load state, a third resource scheduling strategy is generated and executed. The third resource scheduling strategy includes reducing the system clock frequency of the edge execution unit, maintaining the resource supply for core tasks, and adjusting the execution cycle of low-priority tasks.
[0021] When an edge execution unit is identified as a redundant standby station, a fourth resource scheduling strategy is generated.
[0022] Preferably, the fourth resource scheduling strategy specifically includes: obtaining redundant scheduling parameters that identify redundant system roles through the underlying core control class. The redundant scheduling parameters include the current station level, redundant task cycle, and master station instruction transmission switch. If the current station level parameter indicates a standby station identifier, the master station instruction transmission switch is in the off state, and the redundant task cycle is configured as the cycle time for executing redundant synchronization tasks, then the edge execution unit is determined to be a redundant standby station, and a fourth resource scheduling strategy is generated to reduce the proportion of non-core task resource occupancy.
[0023] Visual configuration interface module: Used for parameter configuration through a graphical interactive interface, and for status visualization and configuration management through a graphical interactive interface.
[0024] Preferably, the parameter configuration via the graphical user interface is specifically configured as follows: the graphical user interface includes a load threshold adjustment area, a task priority configuration area, and a mode control area.
[0025] The load threshold adjustment area receives user-defined values for CPU utilization warning threshold, CPU utilization low load threshold, memory utilization warning threshold, and memory utilization low load threshold, and calls the configuration node operation interface of the underlying core control class to write the set values into the configuration file.
[0026] The task priority configuration area receives the priority level set by the user for each task path identifier, and calls the counter read / write interface of the underlying core control class accordingly to update the priority level set for each task to the counter mapping table entry corresponding to the path identifier.
[0027] The mode control area receives the user's activation status for the energy-saving mode, which is associated with the system clock frequency setting interface of the edge execution unit.
[0028] Preferably, the method for visualizing and managing the status through a graphical user interface is as follows: in the resource usage display area of the visualization interface, a line graph component is used to connect to the resource monitoring interface of the core control class to periodically refresh and dynamically display the CPU usage, memory usage and bandwidth congestion, and support viewing the values by hovering the mouse and switching the display period by double-clicking.
[0029] In the task status display area of the visualization interface, the table component is connected to the task structure of the core control class to dynamically present the path identifier, priority level, execution status and task cycle loss of each task, and use different colors to distinguish the running status and paused status of the task.
[0030] In the redundancy status display area of the visualization interface, the redundancy status interface of the core control class is connected through the indicator graphic item, which displays the redundancy role of the edge execution unit as the master station or the backup station in real time, and triggers a visual flashing prompt when the role is switched.
[0031] The system provides configuration file management functionality through a graphical user interface. It updates parameter configurations based on the configuration file read / write interface of the core control class, maintains configuration modification records within a preset configuration period, and supports one-click rollback to any historical configuration version within the preset configuration period.
[0032] The beneficial effects of the present invention are as follows: (1) The first part of the present invention realizes the full-dimensional accurate perception of the hardware resources and task running status of the edge execution unit. It can not only capture the dynamic changes of CPU, memory and bandwidth in real time, but also obtain the current running tasks and their key parameters. Its standardized quantitative calculation method provides a unified and reliable benchmark for the load judgment of the edge execution unit. It can capture the resource supply and demand changes of the edge execution unit in real time, break the limitations of traditional one-sided perception, greatly improve the adaptability sensitivity to complex industrial field conditions, and lay a solid data foundation for subsequent accurate scheduling.
[0033] (2) The second part of the present invention: Based on load classification and task priority, differentiated scheduling is implemented. Under high load, core tasks are prioritized to run, under medium load, stability is maintained, and under low load, energy saving is achieved. At the same time, switching resources are reserved to adapt to redundant scenarios. This design completely solves the problem of resource waste or core task preemption caused by traditional fixed scheduling. It not only improves the utilization rate of CPU and memory resources, but also eliminates the risk of core task delay interruption, taking into account both production safety and energy efficiency.
[0034] (3) The third part of the present invention: The interface adopts a graphical interactive design, and the operation and maintenance personnel can directly adjust the load threshold and set the task priority without professional code operation. The configuration takes effect in real time, which greatly reduces the operation and maintenance threshold and the time spent on adapting to the working conditions. At the same time, through multi-dimensional status visualization and configuration history backtracking function, the operation and maintenance personnel can intuitively grasp the running status of the edge execution unit, which facilitates rapid fault diagnosis and strategy optimization, significantly improves the convenience and reliability of on-site operation and maintenance, and reduces deployment and maintenance costs. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a schematic diagram of the system modules of the present invention. Detailed Implementation
[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0038] Reference Figure 1 As shown, the present invention provides a resource dynamic adaptation and scheduling system based on a central site, including a working condition perception unit module, a resource scheduling decision module, a visual configuration interface module, and a local database.
[0039] It should be noted that the working condition perception unit module is associated with the resource scheduling decision module, the resource scheduling decision module is associated with the visual configuration interface module, and the local database is associated with the working condition perception unit module, the resource scheduling decision module, and the visual configuration interface module.
[0040] It should be noted that the central station specifically refers to the edge execution unit located in the industrial site and responsible for executing real-time tasks. This edge execution unit is the physical entity that implements resource scheduling and is responsible for the perception and dynamic allocation of local resources. The edge execution unit mentioned in this article and the central station are the same entity, both referring to the carrier of this resource scheduling system.
[0041] The working condition perception unit module is used to calculate the CPU utilization rate of the edge execution unit, analyze the memory utilization rate, determine the bandwidth congestion, count the number of currently running tasks and obtain their key parameters, including the path identifier of each task, the preset priority level, the execution status and the number of task cycle lost.
[0042] In a specific embodiment of the present invention, the method for calculating the CPU utilization of the edge execution unit is as follows: through the task list interface of the underlying core control class, traverse and obtain the task structure of all running tasks in the edge execution unit. The task structure stores the task start time, task end time and task cycle time of each task.
[0043] For each acquired task structure, subtract its start time from its end time to obtain the actual CPU usage time of the task corresponding to that task structure. Then, divide this actual CPU usage time by the task cycle time to obtain the CPU utilization rate of that task.
[0044] The total CPU utilization is obtained by summing the CPU utilization of all tasks. The total CPU utilization is then divided by the total number of CPU cores in the edge execution unit to obtain the CPU utilization of the edge execution unit.
[0045] It should be noted that the task structure is the core data structure defined and maintained by the underlying core control class for each task. It encapsulates the task's identity, status, and precise timing information. Among them, the task start time, task end time, and task cycle time are the direct basis for calculating the actual CPU time consumed by the task.
[0046] It should be noted that the calculation method of summing and dividing by the number of cores aims to normalize the CPU time consumed by parallel tasks in a multi-core CPU system into a scalar metric between 0% and 100%. This standardized total CPU utilization rate provides a unified and reliable quantitative benchmark for subsequent load status determination, thereby ensuring the accuracy and fairness of the resource scheduling policy triggering conditions.
[0047] For example, the CPU utilization rate of the edge execution unit is calculated as follows: For a safety interlock data acquisition task, the task structure records a task start time of 1699876500000000 nanoseconds, a task end time of 1699876500200000 nanoseconds, and a task cycle time of 1699876501000000 nanoseconds. By subtracting the task start time from the task end time, the actual CPU usage time of the task corresponding to the task structure is obtained as 200000 nanoseconds. Then, this actual CPU usage time is divided by the task cycle time, which calculates the CPU utilization rate of the task as 20%. Similarly, the CPU utilization rate of all tasks is calculated and summed to obtain a total CPU utilization rate of 82% for 13 tasks. The total CPU utilization rate is divided by the total number of CPU cores of the edge execution unit, which has 6 CPU cores. Finally, the normalized total CPU utilization rate of the edge execution unit is 13.67%.
[0048] In a specific embodiment of the present invention, the method for analyzing memory usage is as follows: obtain the current used memory and total memory capacity of the edge execution unit through the memory query interface, divide the current used memory by the total memory capacity, and obtain the memory usage as a percentage.
[0049] For example, to analyze memory usage, such as by obtaining current memory usage data through the memory query function of the Linux or Windows operating system, where the used memory is 6GB and the total memory capacity is 16GB, dividing the used memory of 6GB by the total memory capacity of 16GB gives the current memory usage rate of 37.5%.
[0050] In a specific embodiment of the present invention, the method for determining bandwidth congestion is as follows: obtain the real-time bandwidth usage of the edge execution unit network interface through the network interface of the underlying core control class; if the real-time bandwidth usage is greater than the preset bandwidth congestion threshold, then bandwidth congestion is determined; otherwise, bandwidth is determined to be unobstructed.
[0051] For example, to determine bandwidth congestion, for instance, the real-time bandwidth usage of the edge execution unit's gigabit Ethernet interface is obtained through the network interface of the underlying core control class and is 950Mbps. This is compared with a preset bandwidth congestion threshold of 800Mbps. Since the real-time bandwidth usage data is greater than the preset bandwidth congestion threshold, it is determined that there is bandwidth congestion.
[0052] In a specific embodiment of the present invention, the method for counting the number of currently running tasks and obtaining their key parameters is as follows: traverse all currently running tasks in the edge execution unit through the task list interface of the underlying core control class, obtain the task structure corresponding to each task, and count the total number of task structures as the number of currently running tasks.
[0053] For each key parameter of a currently running task, the unique path identifier of the task is parsed from its task structure. Based on the path identifier, the preset priority level of the task is obtained by querying and matching through the pre-set task configuration rule base. The real-time execution status of the task is obtained by reading the status register maintained independently for the task by the underlying core control class. The periodic monitoring unit of the underlying core control class is called to accumulate the number of times the actual completion time of the task since the task started that exceeds its preset period deadline, which is taken as the task period loss count.
[0054] The path identifier refers to the globally unique logical addressing identifier of a task in the system, which is used to accurately distinguish and locate different tasks during scheduling and monitoring. Its format is usually a hierarchical path string, such as: / PLC1 / AnalogInput / TempCollect.
[0055] The task configuration rule base refers to a set of task attributes that are pre-defined and persistently stored. It records information such as scheduling strategies, resource constraints, and priority configurations for each task, providing a static configuration basis for resource scheduling decisions.
[0056] The task priority level is a preset importance classification label for each task, used to guide differentiated resource scheduling. This system adopts a three-level priority label system, including core tasks: data acquisition of safety interlocking equipment and emergency control logic, with the highest priority level to ensure priority resource supply; medium priority tasks: including data acquisition of ordinary production equipment and routine control logic, with the middle priority level to balance resource consumption and execution efficiency; and low priority tasks: including auxiliary environmental parameter acquisition and status monitoring logic, with the basic priority level, which can be flexibly adjusted when resources are scarce.
[0057] For example, emergency control logic includes: emergency shutdown control to immediately cut off the power source when personnel are detected entering a dangerous area or a serious mechanical failure occurs in the equipment; safety relief valve interlock control to immediately trigger the valve to open and release pressure when the pressure in the reactor exceeds the safety threshold to prevent the risk of explosion; conventional control logic includes: flow PID regulation control to continuously regulate the flow rate of fluid in the pipeline to stabilize it at the process set value; sequential batch control to automatically control production processes such as raw material injection, stirring, heating, and discharge according to preset steps and time sequences; and status monitoring logic includes: equipment vibration status monitoring to periodically collect and analyze the vibration spectrum of motor bearings for predictive maintenance; and workshop energy consumption metering and statistics to periodically collect the readings of electricity meters on each production line and calculate the energy consumption data per unit product for energy efficiency analysis.
[0058] It should be noted that the task priority tag data is stored in the counter mapping table of the core control class, and the parameters can be adjusted at any time through the counter read and write interface to adapt to changes in on-site working conditions.
[0059] It should be noted that the number of lost tasks in the cycle is counted and updated in real time by the cycle monitoring unit of the underlying core control class, and is a key indicator for measuring task real-time performance and system stability.
[0060] It should be noted that the status register is a hardware or software register that the underlying core control class maintains in real time for each task. Its value directly reflects the real-time execution status of the task, such as: running, ready, suspended, or completed.
[0061] For example, the system counts the number of currently running tasks and obtains their key parameters. For instance, the system iterates through the task list interface and finds that there are currently 5 running tasks. It obtains 5 corresponding task structures. For a task with the path identifier / PLC2 / DI / AlertMonitor, it parses the path identifier and queries the task configuration rule base. It finds that the preset priority level is the highest level. It reads the status register of the task and obtains that its current execution status is running. The periodic monitoring unit statistics show that the task has had 2 actual completion times since its start that exceed its preset 100ms period deadline. Therefore, the number of lost task periods is 2.
[0062] The resource scheduling decision module is used to determine the load status of the edge execution unit and generate a differentiated resource scheduling strategy based on the load status of the edge execution unit.
[0063] In a specific embodiment of the present invention, the method for determining the load state of the edge execution unit is as follows: obtain the CPU utilization rate and memory utilization rate of the edge execution unit. If the CPU utilization rate of the edge execution unit is greater than or equal to a preset CPU utilization rate warning threshold, or the memory utilization rate is greater than or equal to a preset memory utilization rate warning threshold, then the edge execution unit is determined to be in a high load state.
[0064] If the CPU utilization of the edge execution unit is between the preset low CPU utilization threshold and the CPU utilization warning threshold, and the memory utilization is between the preset low memory utilization threshold and the memory utilization warning threshold, then the edge execution unit is determined to be in a medium load state.
[0065] If the CPU utilization rate of the edge execution unit is less than or equal to the preset low CPU utilization threshold, or the memory utilization rate is less than or equal to the preset low memory utilization threshold, then the edge execution unit is determined to be in a low load state.
[0066] For example, it can be determined that the edge execution unit is in a high-load state. For instance, if the preset CPU utilization warning threshold is 80%, and the current CPU utilization of the edge execution unit is 82%, since the CPU utilization of the edge execution unit is greater than or equal to the preset CPU utilization warning threshold of 80%, it can be determined that the edge execution unit is in a high-load state.
[0067] For example, to determine if an edge execution unit is in a medium load state, for instance: assuming the preset CPU utilization warning threshold is 80%, the memory utilization warning threshold is 85%, the CPU utilization low load threshold is 30%, and the memory utilization low load threshold is 30%, if at another moment the CPU utilization of the edge execution unit is collected to be 45% and the memory utilization is 50%, the CPU utilization of the edge execution unit is 45%, which is between the preset CPU utilization low load threshold and the CPU utilization warning threshold of 30%-80%, and the memory utilization is 50%, which is between the preset memory utilization low load threshold and the memory utilization warning threshold of 30%-85%, then the edge execution unit is determined to be in a medium load state.
[0068] For example, to determine if the edge execution unit is in a low-load state, assuming the preset low CPU utilization threshold is 30%, if the CPU utilization of the edge execution unit is collected at another moment as 25%, and the CPU utilization of the edge execution unit is less than or equal to the low CPU utilization threshold of 30%, it is determined that the edge execution unit is in a low-load state.
[0069] In a specific embodiment of the present invention, the method for generating a differentiated resource scheduling strategy based on the load status of the edge execution unit is as follows: when it is determined that the edge execution unit is in a high load state, a first resource scheduling strategy is generated and executed. The first resource scheduling strategy includes pausing all low-priority tasks, extending the execution cycle of medium-priority tasks, and binding core tasks to designated CPU cores.
[0070] When it is determined that the edge execution unit is in a medium load state, a second resource scheduling strategy is generated and executed. The second resource scheduling strategy is to maintain the execution status and resource allocation of all current tasks and continuously monitor resource changes.
[0071] When it is determined that the edge execution unit is in a low-load state, a third resource scheduling strategy is generated and executed. The third resource scheduling strategy includes reducing the system clock frequency of the edge execution unit, maintaining the resource supply for core tasks, and adjusting the execution cycle of low-priority tasks.
[0072] When an edge execution unit is identified as a redundant standby station, a fourth resource scheduling strategy is generated.
[0073] It should be noted that when edge execution units are under high load, their CPU or memory resources may exceed safe operating limits. Continuing with indiscriminate scheduling would cause execution delays or even interruptions for the highest priority tasks due to resource contention, threatening production safety. Therefore, the first resource scheduling strategy quickly releases resources by pausing low-priority tasks, balances resource load by extending the execution cycle of medium-priority tasks, and assigns core tasks to specific CPU cores to prevent preemption by other tasks. This strategy aims to ensure reliable execution and real-time response of the highest priority tasks under high load conditions, thereby maintaining the safety and stability of the control system.
[0074] For example, the first resource scheduling strategy may include: suspending all low-priority tasks, including environmental temperature and humidity monitoring tasks and equipment status inspection tasks; extending the execution cycle of ordinary production data collection for medium-priority tasks from 1 second to 5 seconds; and binding the interlock control of the safety relief valve for core tasks to two dedicated cores, CPU0 and CPU1.
[0075] It should be noted that when the edge execution unit is under medium load, resource usage is within a reasonable range, and all tasks are executed smoothly without obvious resource bottlenecks or idle periods. In this case, frequent task scheduling adjustments may cause unnecessary system overhead and operational fluctuations. Therefore, the second resource scheduling strategy does not actively change the task execution status and resource allocation, but only continuously monitors resource usage. This strategy reflects the principle of conservative scheduling under stable operating conditions, avoiding unnecessary intervention that could affect overall operating efficiency.
[0076] It should be noted that when the edge execution unit is under low load, there are many idle resources. If it continues to operate according to the conventional strategy, it will lead to energy and resource waste. The third resource scheduling strategy reduces power consumption by reducing the system clock frequency of the edge execution unit, thereby achieving energy-saving operation, continuously ensuring the resource supply for core tasks, and ensuring that critical control functions are not affected. At the same time, it appropriately extends the execution cycle of low-priority tasks, so that they reduce resource consumption while meeting basic monitoring requirements. This strategy effectively reduces overall energy consumption while ensuring the core functions of the system, which meets the energy efficiency management requirements of industrial sites.
[0077] For example, a third resource scheduling strategy could be: reducing the system clock frequency of the edge execution unit from 2.9GHz to 1.5GHz through the system interface, maintaining the CPU core binding and memory quota of the core task emergency shutdown control logic, reactivating the suspended low-priority tasks, and uniformly adjusting their execution cycle to once every 10 seconds.
[0078] In a specific embodiment of the present invention, the fourth resource scheduling strategy is as follows: the redundant scheduling parameters that identify the redundant system role are obtained through the underlying core control class. The redundant scheduling parameters include the current station level, the redundant task cycle, and the master station instruction transmission switch. If the current station level parameter indicates a standby station identifier, the master station instruction transmission switch is in the off state, and the redundant task cycle is configured as the cycle time for executing redundant synchronization tasks, then the edge execution unit is determined to be a redundant standby station, and a fourth resource scheduling strategy that reduces the proportion of non-core task resource occupancy is generated.
[0079] It should be noted that a redundant standby station refers to an edge execution unit in a SCADA system deployed with a redundant architecture that maintains data synchronization with the master station and is in a hot standby state. Its core responsibility is to seamlessly and quickly take over all control and acquisition tasks when the master station fails, ensuring the continuity of the production process.
[0080] The redundant task cycle parameter is configured as the cycle time for executing redundant synchronization tasks. This means that the parameter has been set to a specific time value for controlling the execution interval of tasks such as state synchronization between the master and backup stations. This configuration is a direct technical representation that the redundancy function has been activated and is in operation.
[0081] For example, the fourth resource scheduling strategy includes: obtaining the redundancy scheduling parameters that identify the redundant system role through the underlying core control class; the current station level being 0 is a preset standby station identifier; the master station command transmission switch being displayed as OFF; and the redundant task cycle being 1000ms indicating that it has been configured as a 1-second synchronization cycle. When all three conditions are met simultaneously, it is determined to be a redundant standby station. By calling the task resource limit interface, the total CPU utilization limit of all non-core tasks is set to 20%, thereby reserving 80% of the CPU resources for core tasks during normal operation of the standby station, ensuring the immediacy and high reliability of redundancy switching. When the master station fails and this standby station is switched to the master station, since 80% of the CPU resources are already in a ready state, the core tasks can immediately obtain full resources to run, thereby achieving a high-speed switch at the level of hundreds of milliseconds, completely avoiding switching delays or task interruptions caused by resource contention.
[0082] Visual configuration interface module: Used for parameter configuration through a graphical interactive interface, and for status visualization and configuration management through a graphical interactive interface.
[0083] In a specific embodiment of the present invention, the parameter configuration through the graphical interactive interface is specifically configured as follows: the graphical interactive interface includes a load threshold adjustment area, a task priority configuration area, and a mode control area.
[0084] The load threshold adjustment area receives user-defined values for CPU utilization warning threshold, CPU utilization low load threshold, memory utilization warning threshold, and memory utilization low load threshold, and calls the configuration node operation interface of the underlying core control class to write the set values into the configuration file.
[0085] The task priority configuration area receives the priority level set by the user for each task path identifier, and calls the counter read / write interface of the underlying core control class accordingly to update the priority level set for each task to the counter mapping table entry corresponding to the path identifier.
[0086] The mode control area receives the user's activation status for the energy-saving mode, which is associated with the system clock frequency setting interface of the edge execution unit.
[0087] For example, parameter configuration can be performed through a graphical user interface. The graphical user interface might include a load threshold adjustment area, a task priority configuration area, and a mode control area. In the load threshold adjustment area, the user can drag a slider control to adjust the CPU utilization warning threshold from the default 80% to 85%, and the memory utilization warning threshold from 85% to 90%. After receiving these settings, the interface automatically calls the configuration node operation interface of the underlying core control class to write the new threshold parameters into the system's XML configuration file. In the task priority configuration area, the user can select from the task path dropdown list via the graphical user interface. The path for the ambient temperature acquisition task is selected, and its priority is adjusted from low to medium in the priority selection box. After the interface receives this setting, it calls the counter read / write interface of the underlying core control class to update the value of the path identifier in the counter mapping table to 5. In the mode control area, the user checks the enable energy-saving mode checkbox through the graphical interface. The interface receives this enabled status and associates and binds this status with the system clock frequency setting interface of the edge execution unit. When the system is determined to be in a low-load state, the resource scheduling decision module will automatically reduce the system clock frequency of the edge execution unit through this interface based on this configuration.
[0088] It should be noted that the graphical user interface is built on the Qt graphical framework and implemented using a model-view architecture. The interface layout is organized using Qt's layout manager. The load threshold adjustment area, task priority configuration area, and mode control area are respectively composed of slider controls, drop-down selection boxes, check boxes, and corresponding label controls. The interface logic uses the signal and slot mechanism to associate user operations on the front-end controls with calls to the corresponding interfaces of the underlying core control class. During interface initialization, the existing parameters are loaded and the control states are updated by calling the configuration file reading interface of the core control class. When the user modifies the parameters and confirms, the interface event handler calls the configuration node operation interface or counter read / write interface to write the updated parameter values into the configuration file or core storage structure of the edge execution unit, thereby achieving no-code parameter configuration and real-time effect.
[0089] In a specific embodiment of the present invention, the method of visualizing and managing the status through a graphical interactive interface is as follows: in the resource usage display area of the visualization interface, a line graph component is connected to the resource monitoring interface of the core control class to periodically refresh and dynamically display the CPU usage, memory usage and bandwidth congestion, and support viewing the values by hovering the mouse and switching the display period by double-clicking.
[0090] In the task status display area of the visualization interface, the table component is connected to the task structure of the core control class to dynamically present the path identifier, priority level, execution status and task cycle loss of each task, and use different colors to distinguish the running status and paused status of the task.
[0091] In the redundancy status display area of the visualization interface, the redundancy status interface of the core control class is connected through the indicator graphic item, which displays the redundancy role of the edge execution unit as the master station or the backup station in real time, and triggers a visual flashing prompt when the role is switched.
[0092] The system provides configuration file management functionality through a graphical user interface. It updates parameter configurations based on the configuration file read / write interface of the core control class, maintains configuration modification records within a preset configuration period, and supports one-click rollback to any historical configuration version within the preset configuration period.
[0093] For example, display cycles such as 5 minutes, 1 hour, 2 hours, etc.
[0094] For example, periodic refresh, such as every 1 second, 2 seconds, etc.
[0095] For example, different colors can be used to distinguish between the running and paused states of a task. For instance, if the task is in a running state, the background color is light green, and if the task is in a paused state, the background color is light gray.
[0096] For example, in the redundant status display area of the visualization interface, the main station role is displayed with a solid green square indicator light, and the backup station role is displayed with a solid red triangle indicator light. When the role is switched, the indicator light flashes green rapidly 3 times per second as a visual cue.
[0097] For example, a preset configuration period can be configured, such as 30 seconds, 50 seconds, etc.
[0098] It should also be noted that after receiving a shutdown command, the edge execution unit performs an orderly shutdown and configuration saving process, which includes: calling the stop interface of the core control class, destroying each task in order of task priority from low to high, ensuring that the process data is completely archived, and saving the current load threshold, task priority, and CPU utilization core binding parameters as a running snapshot to the configuration file by exiting the save interface. This design enables the execution unit to automatically load the saved configuration parameters when it starts up again, achieving rapid state recovery without manual reconfiguration.
[0099] The examples described in this invention are not limited to the specific embodiments listed above. The examples are merely illustrative to facilitate understanding of the invention and do not constitute a limitation on the scope of protection of this invention. Any modifications, equivalent substitutions, etc., made within the spirit and principles of this invention should be included within the scope of protection.
[0100] The above description is merely an example and illustration of the concept of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described or use similar methods to replace them, as long as they do not deviate from the concept of the invention or exceed the scope defined in this specification, they should all fall within the protection scope of the present invention.
Claims
1. A resource dynamic adaptation and scheduling system based on a central site, characterized in that, Includes the following modules: Working condition perception unit module: used to calculate the CPU utilization of edge execution units, analyze memory usage, determine bandwidth congestion, count the number of currently running tasks and obtain their key parameters, including the path identifier of each task, preset priority level, execution status and number of task cycle lost. Resource scheduling decision module: used to determine the load status of edge execution units and generate differentiated resource scheduling strategies based on the load status of edge execution units; Visual configuration interface module: Used for parameter configuration through a graphical interactive interface, and for status visualization and configuration management through a graphical interactive interface.
2. The resource dynamic adaptation and scheduling system based on a central site according to claim 1, characterized in that, The specific method for calculating the CPU utilization rate of the edge execution unit is as follows: Through the task list interface of the underlying core control class, the task structure of all running tasks in the edge execution unit is traversed and obtained. The task structure stores the task start time, task end time and task cycle time of each task. For each obtained task structure, subtract its start time from its end time to obtain the actual CPU usage time of the task corresponding to that task structure, and divide this actual CPU usage time by the task cycle time to obtain the CPU utilization rate of the task. The total CPU utilization is obtained by summing the CPU utilization of all tasks. The total CPU utilization is then divided by the total number of CPU cores in the edge execution unit to obtain the CPU utilization of the edge execution unit.
3. The resource dynamic adaptation and scheduling system based on a central site according to claim 2, characterized in that, The specific method for analyzing memory usage is as follows: The current used memory and total memory capacity of the edge execution unit are obtained through the memory query interface. The current used memory is divided by the total memory capacity to obtain the memory utilization rate as a percentage.
4. The resource dynamic adaptation and scheduling system based on a central site according to claim 1, characterized in that, The specific method for determining bandwidth congestion is as follows: The real-time bandwidth usage of the edge execution unit's network interface is obtained through the network interface of the underlying core control class. If the real-time bandwidth usage is greater than the preset bandwidth congestion threshold, bandwidth congestion is determined; otherwise, bandwidth is determined to be unimpeded.
5. A resource dynamic adaptation and scheduling system based on a central site according to claim 1, characterized in that, The specific method for counting the number of currently running tasks and obtaining their key parameters is as follows: By traversing all currently running tasks in the edge execution unit through the task list interface of the underlying core control class, the task structure corresponding to each task is obtained, and the total number of task structures is counted as the number of currently running tasks. For each key parameter of a currently running task, the unique path identifier of the task is parsed from its task structure. Based on the path identifier, the preset priority level of the task is obtained by querying and matching through the pre-set task configuration rule base. The real-time execution status of the task is obtained by reading the status register maintained independently for the task by the underlying core control class. The periodic monitoring unit of the underlying core control class is called to accumulate the number of times the actual completion time of the task since the task started that exceeds its preset period deadline, which is taken as the task period loss count.
6. A resource dynamic adaptation and scheduling system based on a central site according to claim 3, characterized in that, The specific method for determining the load state of the edge execution unit is as follows: The CPU utilization and memory usage of the edge execution unit are obtained. If the CPU utilization of the edge execution unit is greater than or equal to the preset CPU utilization warning threshold, or the memory usage is greater than or equal to the preset memory usage warning threshold, then the edge execution unit is determined to be in a high load state. If the CPU utilization of the edge execution unit is between the preset low CPU utilization threshold and the CPU utilization warning threshold, and the memory utilization is between the preset low memory utilization threshold and the memory utilization warning threshold, then the edge execution unit is determined to be in a medium load state. If the CPU utilization rate of the edge execution unit is less than or equal to the preset low CPU utilization threshold, or the memory utilization rate is less than or equal to the preset low memory utilization threshold, then the edge execution unit is determined to be in a low load state.
7. A resource dynamic adaptation and scheduling system based on a central site according to claim 6, characterized in that, The specific method for generating differentiated resource scheduling strategies based on the load status of edge execution units is as follows: When it is determined that the edge execution unit is in a high load state, a first resource scheduling policy is generated and executed. The first resource scheduling policy includes pausing all low-priority tasks, extending the execution cycle of medium-priority tasks, and binding core tasks to designated CPU cores. When it is determined that the edge execution unit is in a medium load state, a second resource scheduling strategy is generated and executed. The second resource scheduling strategy is to maintain the execution state and resource allocation of all current tasks and continuously monitor resource changes. When it is determined that the edge execution unit is in a low-load state, a third resource scheduling strategy is generated and executed. The third resource scheduling strategy includes reducing the system clock frequency of the edge execution unit, maintaining the resource supply for core tasks, and adjusting the execution cycle of low-priority tasks. When an edge execution unit is identified as a redundant standby station, a fourth resource scheduling strategy is generated.
8. A resource dynamic adaptation and scheduling system based on a central site according to claim 7, characterized in that, The fourth resource scheduling strategy is as follows: The redundant scheduling parameters for identifying redundant system roles are obtained through the underlying core control class. These redundant scheduling parameters include the current station level, the redundant task cycle, and the master station instruction transmission switch. If the current station level parameter indicates a standby station, the master station instruction transmission switch is in the off state, and the redundant task cycle is configured as the cycle time for executing redundant synchronization tasks, then the edge execution unit is determined to be a redundant standby station, and a fourth resource scheduling strategy to reduce the proportion of non-core task resource occupancy is generated.
9. A resource dynamic adaptation and scheduling system based on a central site according to claim 7, characterized in that, The specific configuration method for configuring parameters through a graphical user interface is as follows: The graphical user interface includes a load threshold adjustment area, a task priority configuration area, and a mode control area. The load threshold adjustment area receives user settings for CPU utilization warning threshold, CPU utilization low load threshold, memory utilization warning threshold, and memory utilization low load threshold, and calls the configuration node operation interface of the underlying core control class to write the settings into the configuration file. The task priority configuration area receives the priority level set by the user for each task path identifier, and calls the counter read / write interface of the underlying core control class accordingly to update the priority level set for each task to the counter mapping table entry corresponding to the path identifier. The mode control area receives the user's activation status for the energy-saving mode, which is associated with the system clock frequency setting interface of the edge execution unit.
10. A resource dynamic adaptation and scheduling system based on a central site according to claim 9, characterized in that, The specific method for visualizing and managing status and configuration through a graphical user interface is as follows: In the resource usage display area of the visualization interface, a line graph component is connected to the resource monitoring interface of the core control class to periodically refresh and dynamically display CPU usage, memory usage and bandwidth congestion. It also supports viewing the values by hovering the mouse and switching the display period by double-clicking. In the task status display area of the visualization interface, the table component is connected to the task structure of the core control class to dynamically present the path identifier, priority level, execution status and task cycle loss of each task, and use different colors to distinguish the running status and paused status of the task. In the redundancy status display area of the visualization interface, the redundancy status interface of the core control class is connected through the indicator graphic item to display the redundancy role of the edge execution unit as the master station or the backup station in real time, and triggers a visual flashing prompt when the role is switched. The system provides configuration file management functionality through a graphical user interface. It updates parameter configurations based on the configuration file read / write interface of the core control class, maintains configuration modification records within a preset configuration period, and supports one-click rollback to any historical configuration version within the preset configuration period.
Citation Information
Patent Citations
Site resource scheduling method and device, equipment and storage medium
CN119945993A
Heterogeneous resource dynamic sensing and self-adaptive scheduling method
CN120469792A