Industrial Internet of Things heterogeneous computing task scheduling method, device and equipment and storage medium
By decomposing heterogeneous computing tasks into subtasks and building a deep reinforcement learning scheduling model, the scheduling complexity brought about by asynchronous generation of tasks and resource heterogeneity in the industrial Internet of Things is solved, and efficient and real-time task scheduling is achieved to meet time-sensitive constraints.
Patent Information
- Application Number
- CN202510594601.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-08-08
AI Technical Summary
The existing industrial IoT heterogeneous computing task scheduling methods are difficult to effectively deal with task asynchronous generation, resource heterogeneity and time sensitivity constraints, resulting in increased scheduling complexity and difficult to meet real-time requirements.
Decompose heterogeneous computing tasks into subtasks, represent dependencies through directed acyclic graphs, build a scheduling model based on deep reinforcement learning, combine historical task data and simulation environment for training, dynamically adjust task allocation strategies, and use the resources of heterogeneous computing nodes to meet time-sensitive constraints.
It significantly improves task scheduling efficiency, reduces task completion time, is highly adaptable, and can make optimal scheduling decisions under different conditions, ensures that tasks are completed within the specified time, and improves resource utilization and real-timeness.
Smart Images

Figure CN120448070A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of industrial Internet of Things and intelligent scheduling technology, and in particular to an industrial Internet of Things heterogeneous computing task scheduling method, device, equipment and storage medium. Background Art
[0002] With the rapid development of the Industrial Internet of Things (IIoT), an increasing number of devices and sensors are being deployed in industrial production environments, generating a large number of heterogeneous computing tasks (HCTs). These tasks often have different computational requirements, input data, and execution dependencies, and are generated asynchronously. Traditional task scheduling methods, such as rule-based scheduling and heuristic algorithms, while effective in scheduling large-scale computing tasks, often struggle to cope with the diversity and dynamic nature of heterogeneous computing tasks.
[0003] Existing scheduling methods are mainly divided into three categories: rule-based methods, metaheuristic-based methods, and learning-based methods. Although rule-based methods (such as the HEFT algorithm) are simple and easy to implement, they lack flexibility when faced with dynamically changing IIoT environments. Although metaheuristic-based methods (such as genetic algorithms and particle swarm optimization) can handle complex scheduling problems, they often require a large amount of computing resources and have difficulty ensuring real-time scheduling. Although learning-based methods (such as deep reinforcement learning) show strong adaptability in dynamic environments, their training process is complex and time-consuming, making them difficult to be widely used in IIoT environments with high real-time requirements.
[0004] Furthermore, most existing scheduling methods assume that all tasks are available simultaneously at the time of scheduling, ignoring the case of asynchronous task generation. In the IIoT environment, task generation is often asynchronous and subject to strict time-sensitivity constraints, further increasing the complexity of scheduling. Therefore, a scheduling method that can effectively handle the asynchronous generation of heterogeneous computing tasks, resource heterogeneity, and time-sensitivity constraints is urgently needed. Summary of the Invention
[0005] The present application provides a method, apparatus, device and storage medium for scheduling heterogeneous computing tasks in the Industrial Internet of Things, aiming to solve the scheduling problem of heterogeneous computing tasks in the Industrial Internet of Things, especially the efficient scheduling problem under the constraints of asynchronous task generation, resource heterogeneity and time sensitivity.
[0006] In a first aspect, the present application provides a method for scheduling heterogeneous computing tasks in an industrial Internet of Things, comprising:
[0007] Heterogeneous computing tasks are decomposed into multiple subtasks, and the dependencies between subtasks are represented by a directed acyclic graph. The computational requirements of each subtask are represented by the number of CPU clock cycles, and the size of the input data is represented by the number of bytes. The generation time of each subtask is asynchronous and has different time sensitivity constraints.
[0008] The computing nodes in the Industrial Internet of Things are modeled as heterogeneous resources. Each computing node has different computing capabilities and data transmission rates. The computing nodes are connected through high-speed networks to form a fully connected graph structure.
[0009] A scheduling model based on deep reinforcement learning is constructed. The scheduling model learns to schedule subtasks on heterogeneous computing nodes by interacting with the environment, with the goal of minimizing the completion time of subtasks and satisfying time-sensitivity constraints. The scheduling model includes a state space, an action space, and a reward function. The state space includes the execution status of the current subtask, the load of the computing node, and the generation time of the subtask; the action space includes subtask allocation information; and the reward function is determined based on the completion time of the subtask and the time-sensitivity constraint.
[0010] Use historical task data and simulation environment to train the scheduling model to obtain a trained scheduling model;
[0011] Based on the trained scheduling model, newly generated subtasks are received in real time in the industrial IoT environment and scheduled.
[0012] A heterogeneous computing task scheduling system is established, which includes a task management module, a resource management module, a scheduling decision module and a monitoring module; wherein the task management module is responsible for receiving and managing newly generated subtasks; the resource management module is responsible for monitoring the status of computing nodes; the scheduling decision module uses the trained scheduling model to allocate subtasks; and the monitoring module is responsible for real-time monitoring of the execution of subtasks.
[0013] In one possible design, computing nodes in the Industrial Internet of Things are modeled as heterogeneous resources, including:
[0014] Divide the computational requirements of the subtask by the processing capacity of the computing node to obtain the processing time of the subtask on the current computing node;
[0015] Divide the subtask result data size by the average data transmission rate to obtain the transmission time of the subtask result data between computing nodes;
[0016] Based on the configuration of each computing node and the industrial applications installed, the set of subtasks that the computing node can process is determined.
[0017] In one possible design, the scheduling model learns to schedule subtasks on heterogeneous computing nodes by interacting with the environment with the goal of minimizing the completion time of subtasks and satisfying time sensitivity constraints, including:
[0018] Use binary variables to determine the distribution relationship between subtasks and computing nodes, and set non-negative continuous variables s ij and f ij , record subtask t separately ij Start and finish time;
[0019] With the goal of minimizing the completion time of subtasks and satisfying time-sensitivity constraints, constraint rules are set to achieve this goal. The constraint rules include: each subtask can only be processed on one computing node; the difference between the completion time and the start time of a subtask is consistent with the processing time on its corresponding computing node; the entry subtask start time of a task is later than the task generation time plus the data transmission time; and all tasks are completed before the set deadline.
[0020] Introduce a new variable z ij To clarify subtask t ij The compute node to be scheduled;
[0021] Calculate the earliest and latest completion times for each subtask on different computing nodes. When calculating the earliest completion time, consider the earliest completion times of all direct predecessor subtasks of the subtask, add the data transmission time, find the minimum value, and take the maximum value of the minimum values to determine the earliest start and earliest completion times of the current subtask. When calculating the latest completion time, subtract the data transmission time and the subtask's own processing time from the latest start time of the subtask's direct successor subtasks, find the maximum value, and then take the minimum value of the maximum value to determine the latest completion time. Determine the boundary conditions for the earliest and latest completion times of the entry and exit subtasks.
[0022] Two key propositions are set to simplify the constraints of the model; the first key proposition is: if for two subtasks t ij and t pq , if there exists a computing node where the latest start time minus the processing time of one subtask is greater than the earliest completion time of the other subtask, then the execution times of the two subtasks on the current computing node will not overlap. The second key proposition is: if two subtasks on a computing node have a difference between the earliest completion time of one subtask and the latest start time minus the processing time of the other subtask, which is less than the sum of the processing times of the two subtasks, then the two subtasks cannot be processed simultaneously on this computing node.
[0023] The scheduling model is solved using a solver. If a feasible solution exists for the scheduling model, the solver gives the specific allocation of each subtask, including which computing node it is assigned to and the start and completion times of the subtask, to obtain a scheduling plan that meets the task requirements and constraints.
[0024] In one possible design, the scheduling model is trained as follows:
[0025] New variables are introduced to determine the subtask computing nodes, the constraint condition expression form is transformed, and the constraints to prevent subtask time conflicts are simplified to obtain a scheduling model based on constraint programming.
[0026] Calculate time boundaries and narrow the variable range; wherein the time boundaries include the earliest and latest completion time limits of the subtasks on each computing node;
[0027] Simplify the constraints based on two key propositions;
[0028] Using constraint programming-based models, time boundaries, and simplified constraints, and with the help of constraint programming solvers, determine whether the task scheduling problem has a solution and solve it. First, preprocess the model, then find variable assignments that meet the constraints. If there are assignments, output subtask allocation and time information. If not, indicate that the problem has no solution.
[0029] Definition Key Proposition 3: If there is a key task T in the set of heterogeneous computing tasks u , which is generated at And all in the key task T u The previously generated tasks {T1, T2, ..., T u-1 The completion time of} shall not exceed The optimal total completion time of all tasks is the same as that of only The optimal total completion time is the same. According to key proposition 3, the task set is arranged in ascending order of generation time. The constraint programming model is used to verify whether there is a task that satisfies If there is a feasible solution that satisfies the above constraints, the task is determined to be a critical task T u , based on the key tasks, the original scheduling model is divided into two parts. The first part is to schedule {T1, T2, …, T u-1}, using constraint programming model to generate feasible solutions; the second part is scheduling A mathematical programming model is constructed to minimize the total completion time. The two parts of the model are solved separately to obtain the two parts of the scheduling plan and merge them to obtain the global optimal scheduling plan.
[0030] In one possible design, in the heterogeneous computing task scheduling system, the task management module continuously monitors new subtasks. When a new subtask is generated, the generation time, computing requirements, and input data size of the subtask are quickly obtained, and the subtasks are sorted according to a set format and stored in a task queue. The task queue sorts the subtasks according to generation time or priority.
[0031] In one possible design, in the heterogeneous computing task scheduling system, the resource management module periodically sends query instructions to the computing nodes, collects computing power, load conditions and data transmission rate, and stores them in the resource status database after sorting, classifies and manages them, and provides resource data for the scheduling decision module; the scheduling decision module obtains task details from the task management module, obtains computing node status data from the resource management module, inputs the task details and computing node status data into the deep reinforcement learning model, calculates the adaptability score of each computing node, selects the node with the highest score after sorting, assigns the task, and sends the assignment instruction.
[0032] In one possible design, in the heterogeneous computing task scheduling system, the monitoring module monitors task execution in real time, communicates with the computing nodes to obtain execution data such as execution progress and completion time, compares the execution data with time-sensitivity constraints, and issues an early warning to the scheduling decision module when the execution progress is lower than a set threshold. At the same time, the execution status is fed back to the task management module and the resource management module to update the task and resource status.
[0033] In a second aspect, the present application provides an industrial Internet of Things heterogeneous computing task scheduling device, the device comprising:
[0034] The task generation module is configured to decompose heterogeneous computing tasks into multiple subtasks and represent the dependencies between subtasks through a directed acyclic graph. The computational requirements of each subtask are represented by the number of CPU clock cycles, and the size of the input data is represented by the number of bytes. The generation time of each subtask is asynchronous and has different time sensitivity constraints.
[0035] a node modeling module configured to model computing nodes in the industrial Internet of Things as heterogeneous resources, wherein each computing node has different computing capabilities and data transmission rates, and the computing nodes are connected through a high-speed network to form a fully connected graph structure;
[0036] A scheduling model construction module is configured to construct a scheduling model based on deep reinforcement learning. The scheduling model learns to schedule subtasks on heterogeneous computing nodes by interacting with the environment with the goal of minimizing the completion time of subtasks and satisfying time sensitivity constraints. The scheduling model includes a state space, an action space, and a reward function, wherein the state space includes the execution state of the current subtask, the load of the computing node, and the generation time of the subtask; the action space includes subtask allocation information; and the reward function is determined based on the completion time and time sensitivity constraints of the subtask.
[0037] The scheduling model training module is configured to train the scheduling model using historical task data and a simulation environment to obtain a trained scheduling model;
[0038] The subtask scheduling module is configured to receive newly generated subtasks in real time in the industrial Internet of Things environment based on the trained scheduling model and schedule the received subtasks;
[0039] The scheduling system establishment module is configured to establish a heterogeneous computing task scheduling system, which includes a task management module, a resource management module, a scheduling decision module and a monitoring module; wherein the task management module is responsible for receiving and managing newly generated subtasks; the resource management module is responsible for monitoring the status of computing nodes; the scheduling decision module uses the trained scheduling model to allocate subtasks; and the monitoring module is responsible for real-time monitoring of the execution of subtasks.
[0040] In a third aspect, an embodiment of the present application provides an electronic device comprising: at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the industrial Internet of Things heterogeneous computing task scheduling method described in the first aspect and various possible designs of the first aspect.
[0041] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer-executable instructions. When a processor executes the computer-executable instructions, the industrial Internet of Things heterogeneous computing task scheduling method described in the first aspect and various possible designs of the first aspect is implemented.
[0042] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the industrial Internet of Things heterogeneous computing task scheduling method described in the first aspect and various possible designs of the first aspect.
[0043] The method, apparatus, device, and storage medium for scheduling heterogeneous computing tasks in the industrial Internet of Things provided by this application have at least the following beneficial effects:
[0044] (1) Efficient scheduling: Through the deep reinforcement learning model, the task allocation strategy can be dynamically adjusted, significantly improving the efficiency of task scheduling and reducing task completion time.
[0045] (2) Strong adaptability: The model can adapt to the asynchronous generation of tasks and the heterogeneity of resources in the IIoT environment, ensuring that optimal scheduling decisions can be made under different conditions.
[0046] (3) Time sensitivity: The model can effectively handle the time sensitivity constraints of tasks, ensuring that tasks are completed within the specified time and avoiding task timeouts.
[0047] (4) High resource utilization: Through dynamic resource management, the utilization of computing nodes is improved and resource waste is reduced.
[0048] (5) Real-time: The system can receive new tasks and schedule them in real time, which is suitable for IIoT environments with high real-time requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0050] Figure 1 A flowchart of a method for scheduling heterogeneous computing tasks in the industrial Internet of Things provided in an embodiment of the present application;
[0051] Figure 2 This is a performance comparison chart of mHEFT, mPEFT, GTA and the method of this application (N0=5 and L=3) provided in the examples of this application;
[0052] Figure 3 This is a comparison chart of HEFT, mPEFT, GTA and the method of the present application provided in the examples of the present application under different numbers of CNs (N0=5);
[0053] Figure 4 This is a graph comparing the mHEFT, mPEFT, GTA and the method of the present application provided in the examples of the present application at different numbers of HCTs (L=5);
[0054] Figure 5 This is a structural diagram of the industrial Internet of Things heterogeneous computing task scheduling device provided in an embodiment of the present application.
[0055] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0056] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0057] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0058] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned. They should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0059] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0060] The present application embodiment provides a method for scheduling heterogeneous computing tasks in the industrial Internet of Things. Figure 1 As shown, it is a flowchart of the industrial Internet of Things heterogeneous computing task scheduling method provided by an embodiment of the present application. The industrial Internet of Things heterogeneous computing task scheduling method includes the following steps S100-S600.
[0061] S100: Decompose the heterogeneous computing task into multiple subtasks, and represent the dependencies between the subtasks through a directed acyclic graph; the computing requirements of each subtask are represented by the number of CPU clock cycles, the size of the input data is represented by the number of bytes, and the generation time of each subtask is asynchronous and has different time sensitivity constraints.
[0062] In this embodiment, the purpose of step S100 is to perform task modeling. Heterogeneous computing tasks (HCTs) are modeled as directed acyclic graphs (DAGs). Each task consists of multiple subtasks, each with dependencies between them. Each subtask has different computational requirements and input data, and tasks are generated asynchronously. Task modeling allows for a clear description of the structure and dependencies of tasks, providing a foundation for subsequent scheduling.
[0063] The core of task modeling is to decompose each task into multiple subtasks and represent the dependencies between them using a directed acyclic graph (DAG). The computational requirements of each subtask are expressed in CPU clock cycles, and the input data size is expressed in bytes. Task generation is asynchronous, meaning that tasks are generated at different time points and have different time sensitivity constraints.
[0064] It should be noted that heterogeneous computing tasks refer to computing tasks that are completed collaboratively using multiple different types of processors or computing units. These processors typically have different architectures and characteristics, each excelling at handling specific types of computations. By combining their strengths, the efficiency, performance, or energy efficiency of the overall system can be improved. For example, in the Industrial Internet of Things, heterogeneous computing tasks may include:
[0065] 1. Predictive maintenance.
[0066] Task description: Use sensors to monitor equipment vibration, temperature, noise and other data in real time to predict equipment failures.
[0067] Heterogeneous division of labor:
[0068] FPGA / ASIC: Real-time processing of high-frequency sensor signals (such as vibration waveform analysis).
[0069] CPU: Runs device status evaluation logic and communication protocols (such as MQTT / OPC UA).
[0070] GPU / NPU: Execute deep learning model inference (such as predicting faults on time series data).
[0071] Example: In wind turbine bearing monitoring, the FPGA filters noise and extracts features, the NPU runs the fault prediction model, and the CPU generates alarms and uploads them to the cloud.
[0072] 2. Real-time quality control.
[0073] Task Description: The visual inspection system on the production line identifies product defects in real time.
[0074] Heterogeneous division of labor:
[0075] GPU: Parallel processing of high-resolution images from multiple cameras (such as defect detection algorithms).
[0076] CPU: Coordinates production line equipment (such as robotic arm adjustment or sorting).
[0077] FPGA: Accelerate image pre-processing (denoising, edge enhancement) to reduce latency.
[0078] NPU: Runs lightweight AI models (such as YOLO target detection).
[0079] Example: In an automotive parts production line, the GPU processes data from multiple cameras, the NPU identifies scratches in real time, and the FPGA optimizes image transmission latency.
[0080] 3. Energy optimization management.
[0081] Task Description: Optimize factory energy consumption through multi-source sensor data.
[0082] Heterogeneous division of labor:
[0083] FPGA: Real-time analysis of power sensor data (such as current waveform harmonic detection).
[0084] GPU: Runs complex optimization algorithms (such as linear programming to solve the optimal energy consumption configuration).
[0085] CPU: Scheduling equipment (such as adjusting motor speed or air conditioning power).
[0086] ASIC: Processes encrypted communications (such as secure transmission of energy consumption data).
[0087] Example: In a chemical plant, the FPGA monitors power load fluctuations, the GPU calculates the optimal energy allocation plan, and the ASIC encrypts the data before the CPU sends it to the cloud.
[0088] 4. Collaborative control of equipment.
[0089] Task description: Coordinate the collaborative operation of multiple industrial robots or AGVs (automated guided vehicles).
[0090] Heterogeneous division of labor:
[0091] FPGA: Processes real-time control signals (such as motor drive and path correction).
[0092] CPU: Runs scheduling algorithms (such as task priority assignment).
[0093] GPU: Simulate multi-device collaboration scenarios (such as obstacle avoidance path simulation).
[0094] NPU: Dynamically optimizes path planning (based on real-time environmental changes).
[0095] Example: In smart warehousing, the FPGA controls the steering of AGV wheels, the NPU dynamically plans paths based on inventory changes, and the GPU simulates collision risks.
[0096] 5. Edge computing data aggregation.
[0097] Task Description: Aggregate and pre-process data from multiple sensors at the edge node.
[0098] Heterogeneous division of labor:
[0099] FPGA: compresses and encrypts massive sensor data (such as the LZW compression algorithm).
[0100] GPU: Parallel aggregation of multi-source data (such as correlation analysis of temperature, pressure, and flow).
[0101] CPU: manages communication protocols (such as uploading to the cloud via the 5G module).
[0102] ASIC: Accelerates data encryption (such as the AES-256 algorithm).
[0103] Example: In oil pipeline monitoring, the FPGA compresses vibration sensor data, the GPU analyzes leakage risks, and the ASIC encrypts it before uploading it to the CPU.
[0104] 6. Supply chain logistics optimization.
[0105] Task Description: Track material flow in real time and optimize warehousing and transportation.
[0106] Heterogeneous division of labor:
[0107] GPU: Processes real-time location data from RFID and vision sensors.
[0108] NPU: Runs supply chain optimization models (such as inventory forecasting and route planning).
[0109] CPU: coordinates warehouse robot tasks.
[0110] FPGA: Accelerating time series analysis of sensor data.
[0111] Example: In a smart warehouse, the GPU processes cargo location information, the NPU dynamically adjusts AGV routes, and the FPGA filters sensor noise.
[0112] S200: Model the computing nodes in the Industrial Internet of Things as heterogeneous resources; each computing node has different computing capabilities and data transmission rates, and the computing nodes are connected through high-speed networks to form a fully connected graph structure.
[0113] In this embodiment, step S200 is a self-resource modeling process, which models the computing nodes (CNs) in the Industrial Internet of Things as heterogeneous resources, each with different computing capabilities and data transmission rates. Computing nodes are connected via a high-speed network, forming a fully connected graph structure. Resource modeling accurately describes the heterogeneity and network connectivity of computing nodes, providing resource information for task scheduling.
[0114] The core of resource modeling is to quantify the heterogeneity of compute nodes (CNs). The computing power of each compute node is expressed in CPU clock frequency (GHz), and the data transfer rate is expressed in MB / s. The data transfer time between compute nodes is calculated based on the input data size and the transfer rate. Resource modeling also includes the load of the compute nodes, namely the number of tasks currently being executed and the remaining computing power.
[0115] In some embodiments, the specific calculation process of step S200 is as follows:
[0116] S210: Calculate the processing time of the subtask on the computing node.
[0117] Processing time is calculated based on the computational requirements of the subtask and the processing power of the compute node. For each subtask, first determine the number of CPU clock cycles required, which represents its computational requirements. Also, determine the number of clock cycles per second that the compute node can execute, i.e., its processing power. Dividing the computational requirements of the subtask by the processing power of the compute node gives the processing time for that subtask on that compute node. For example, if a subtask requires 500 million CPU clock cycles to complete, and a particular compute node can execute 2 billion clock cycles per second, then the processing time for this subtask on that compute node is 500 million divided by 2 billion, or 0.25 seconds.
[0118] S220: Calculate the transmission time of the subtask result data between computing nodes.
[0119] To calculate the transmission time of subtask result data between compute nodes, consider the size of the result data and the average data transfer rate between compute nodes. First, determine the number of bytes of result data generated by the subtask; this is the data size. Then, determine the amount of data that can be transmitted per second between the sending and receiving nodes; this is the average data transfer rate. Dividing the result data size by the average data transfer rate gives the time required to transmit the data from one compute node to the other. For example, if the subtask generates 10MB of result data and the average data transfer rate between the two compute nodes is 5MB per second, then transmitting this data will take 10 divided by 5, or 2 seconds.
[0120] S230: Determine a set of tasks that can be processed by the computing node.
[0121] Because each compute node's configuration and installed industrial applications vary, the tasks they can handle are also limited. For each task, the type of industrial application and the computing resource requirements must be considered to determine which compute nodes are capable of handling it. These qualified compute nodes are organized into the compute node set corresponding to that task. For example, if a task involves analyzing industrial equipment operating data using a specific algorithm, and compute nodes A and C have installed software supporting the algorithm and possess the corresponding computing resources, then the set of compute nodes capable of handling this task is {A, C}.
[0122] S300: Construct a scheduling model based on deep reinforcement learning. The scheduling model interacts with the environment to minimize the completion time of subtasks and meet time sensitivity constraints. It learns to schedule subtasks on heterogeneous computing nodes. The scheduling model includes a state space, an action space, and a reward function. The state space includes the execution status of the current subtask, the load of the computing node, and the generation time of the subtask; the action space includes subtask allocation information; and the reward function is determined based on the completion time of the subtask and the time sensitivity constraint.
[0123] In some embodiments, the specific data processing flow of the scheduling model constructed in step S30 is as follows:
[0124] S310, define model decision variables. When building a model, some variables must be set to assist in decision making. Among them, binary variables are used to determine the allocation relationship between subtasks and computing nodes, such as x ij,k It is used to determine the subtask t ij Is it computing node v? k The above process, a value of 1 means that it is allocated to the node, and a value of 0 means that it is not allocated. i,jpq Used to judge the two subtasks t ij and t pq Are they scheduled on the same computing node, and t ij Start time t pq In addition, a non-negative continuous variable s is set ij and f ij , record subtask t separately ij Start time and finish time.
[0125] S320. Determine the optimization objectives and constraints. The core goal of the model is to minimize the total completion time of all asynchronously generated heterogeneous computing tasks, with the variable f representing this final completion time. To achieve this goal, many restrictive rules are established. For example, each subtask can only be processed on one computing node to avoid task confusion; the difference between the completion time and start time of a subtask must be consistent with its processing time on the corresponding computing node; the start time of the entry subtask of a task cannot be earlier than the task generation time plus the data transmission time; and all tasks must be completed before the specified deadline. Furthermore, there are regulations for the order and data transmission time between subtasks, as well as rules to prevent conflicts in subtask execution time, to ensure the rationality and feasibility of the entire model.
[0126] S330, Model Transformation and Simplification (Based on Constraint Programming Theory) The original mathematical programming model may be inefficient when solving, and it is difficult to determine whether there is a feasible solution. Therefore, it is transformed based on constraint programming theory. The new variable z is introduced. ij To clarify subtask t ij The compute nodes to be scheduled were determined. Some conditions in the original model were transformed to be more concise and understandable. The order of subtasks and data transmission relationships were re-expressed using more intuitive logical relationships. Complex non-overlapping constraints were also replaced with a simpler expression. This resulted in a new, more concise scheduling model based on constraint programming, which facilitates subsequent solutions.
[0127] S340. Calculate the earliest and latest completion times to narrow the range of variables. In order to make the solution more efficient, it is necessary to calculate the earliest completion time and the latest completion time of each subtask on different computing nodes. When calculating the earliest completion time, consider the earliest completion time of all direct predecessor subtasks of the subtask, add the data transmission time, find the minimum value, and then take the maximum value of these minimum values to determine when the current subtask can start at the earliest, and then get the earliest completion time. Calculating the latest completion time is the opposite. It is based on the latest start time of the direct successor subtask of the subtask, subtract the data transmission time and its own processing time, find the maximum value, and then take the minimum value of these maximum values, so that the latest completion time can be determined. At the same time, determine the boundary conditions of the earliest and latest completion times of the entry subtask and exit subtask. Through these calculations, the variable f representing the completion time of the subtask can be narrowed. ij The value range of , reduces unnecessary variable selection and improves solution efficiency.
[0128] S350. Simplify constraints based on key propositions. Through research, we found two key propositions that can be used to simplify the constraints of the model. The first proposition is that if for two subtasks t ijand t pq If there exists a computational node where the latest start time minus the processing time of one subtask is greater than the earliest completion time of the other subtask, then the execution times of the two subtasks on this computational node will not overlap. This eliminates unnecessary constraints that prevent time overlap. The second proposition is that if the difference between the earliest completion time of one subtask and the latest start time minus the processing time of the other subtask on a computational node is less than the sum of the processing times of the two subtasks, then the two subtasks cannot be processed simultaneously on this computational node. In this case, the original non-overlapping constraints must be replaced to make the model simpler and easier to solve.
[0129] S360, solve the model and obtain the scheduling plan. After the previous series of simplification and optimization of the model, you can use a special solver to process the model. For the newly obtained constraint programming-based model, you can choose a solver like OR-Tools. If there is a feasible solution to the model, the solver will give the specific allocation of each subtask, including which computing node it is assigned to, as well as the start time and completion time of the subtask, so that a scheduling plan that meets the task requirements and constraints can be obtained. If the model has no feasible solution, it means that under the current resource and condition constraints, this task scheduling problem cannot be solved.
[0130] S400: Train the scheduling model using historical task data and a simulation environment to obtain a trained scheduling model.
[0131] In this embodiment, step S400 is the training and optimization process. The core of training and optimization is to train the model using historical task data and a simulation environment. During the training process, the model learns through trial and error how to make optimal scheduling decisions under different task and resource conditions. The training data includes the generation time of historical tasks, computing requirements, input data size, computing power of the computing nodes, and load conditions. By continuously adjusting model parameters and optimizing the scheduling strategy, the model is able to make optimal scheduling decisions under different task and resource conditions.
[0132] In some embodiments, the specific training process of step S400 is as follows:
[0133] S410, Model Conversion and Preprocessing: The original mathematical programming model is difficult to solve, so it is transformed based on constraint programming theory. New variables are introduced to determine the subtask computation nodes, the constraint conditions are transformed, and the constraints to prevent subtask time conflicts are simplified. This results in a new constraint programming-based scheduling model that facilitates subsequent solution.
[0134] S420, Calculate Time Boundaries and Narrow Variable Ranges: To efficiently solve the model, calculate the earliest and latest completion time bounds for subtasks on each compute node. This is determined by considering the times of preceding and subsequent subtasks and data transmission time. The start and end subtask time boundary conditions are also clearly defined. This narrows the range of subtask completion time variables and reduces solution complexity.
[0135] S430. Simplify constraints based on key propositions: Simplify model constraints based on two key propositions. If, on a compute node, the latest start minus processing time of one subtask is greater than the earliest completion time of another subtask, some anti-overlapping constraints can be removed. If the difference between the two subtasks' processing times is less than the sum of their respective processing times, the relevant anti-overlapping constraints are replaced to reduce the difficulty of solving the problem.
[0136] S440, Feasibility Determination and Solution: Using the processed constraint programming-based model, time bounds, and simplified constraints, the constraint programming solver determines whether the task scheduling problem has a solution and then solves it. First, preprocess the model, then find variable assignments that meet the constraints. If there are assignments, output subtask assignments and time information; if not, indicate that the problem has no solution.
[0137] S450, define key proposition 3: If there is a key task T in the heterogeneous computing task set u , which is generated at And all in the key task T u The previously generated tasks {T1, T2, ..., T u-1 The completion time of} shall not exceed The optimal total completion time of all tasks is the same as that of only The optimal total completion time is the same. According to key proposition 3, the task set is arranged in ascending order of generation time. The constraint programming model is used to verify whether there is a task that satisfies If there is a feasible solution that satisfies the above constraints, the task is determined to be a critical task T u , based on the key tasks, the original scheduling model is divided into two parts. The first part is to schedule {T1, T2, …, T u-1}, using constraint programming model to generate feasible solutions; the second part is scheduling A mathematical programming model is constructed to minimize the total completion time. The two parts of the model are solved separately to obtain the two parts of the scheduling plan and merge them to obtain the global optimal scheduling plan.
[0138] Specifically, the process of implementing the hybrid programming model solution optimization in step S450 is as follows: the heterogeneous computing tasks are arranged in ascending order of generation time. Starting from u=N0, traverse downwards, for each candidate task T uCall the constraint programming model of claim 3 to verify the preceding task set {T1, T2, ..., T u-1 Is there a feasible solution (all tasks completed in time ). If it exists, mark T u The original problem is divided into two parts. The first part uses the constraint programming model to generate a feasible solution φ for the previous task. pre The second part is to build a mathematical programming model to optimize the total completion time of subsequent tasks. Solve the sub-problems using OR-Tools and Gurobi respectively, and merge the two parts of the scheduling solution φ pre and φ post The global optimization solution is obtained, and its total completion time is equal to φ post The optimal value of .
[0139] S500: Based on the trained scheduling model, in the industrial Internet of Things environment, newly generated subtasks are received in real time and the received subtasks are scheduled.
[0140] In this embodiment, real-time scheduling is performed based on a trained scheduling model. Newly generated tasks are received in real time, and the task allocation strategy is dynamically adjusted based on the current task status and resource availability. The model selects the optimal compute node for task allocation based on the task's generation time, computational requirements, input data size, compute node capacity, and load, ensuring that tasks are completed within the specified timeframe.
[0141] S600: Establish a heterogeneous computing task scheduling system, which includes a task management module, a resource management module, a scheduling decision module and a monitoring module; among them, the task management module is responsible for receiving and managing newly generated subtasks; the resource management module is responsible for monitoring the status of computing nodes; the scheduling decision module uses the trained scheduling model to allocate subtasks; and the monitoring module is responsible for real-time monitoring of the execution of subtasks.
[0142] In step S600, the core is to design and implement a heterogeneous computing task scheduling system based on deep reinforcement learning. The task management module is responsible for receiving and managing newly generated tasks, including information such as the task generation time, computing requirements, and input data size. The resource management module is responsible for monitoring the status of computing nodes, including information such as computing power, load, and data transmission rate. The scheduling decision module uses a deep reinforcement learning model to allocate tasks, dynamically adjusting the task allocation strategy based on the current task status and resource availability. The monitoring module is responsible for real-time monitoring of task execution and providing feedback to ensure that tasks are completed within the specified time.
[0143] Specifically, the heterogeneous computing task scheduling system constructed in step S600 involves the following specific data processing flow:
[0144] S610, task management module data processing
[0145] The task management module continuously monitors new tasks. When a new task is generated, it quickly captures information such as its creation time, computational requirements, and input data size, organizes it into a specific format, and stores it in the task queue. The queue is sorted by creation time or priority, ensuring that urgent and important tasks are prioritized.
[0146] S620, resource management module data processing
[0147] The resource management module periodically sends query commands to computing nodes to collect information such as computing power, load, and data transmission rate. This information is then stored in the resource status database for categorized management, providing real-time and accurate resource data to the scheduling decision module.
[0148] S630, scheduling decision module data processing
[0149] The scheduling decision module obtains task details from the task management module and compute node status data from the resource management module. This data is fed into the deep reinforcement learning model, which calculates the suitability score of each compute node based on a variety of factors. After sorting, the node with the highest score is assigned the task and the assignment instruction is sent.
[0150] S640, monitoring module data processing
[0151] The monitoring module monitors task execution in real time, communicating with compute nodes to obtain data such as execution progress and completion time. It compares execution data with time-sensitive constraints and issues warnings to the scheduling decision module if progress is too slow. It also provides feedback on execution status to the task management and resource management modules to facilitate updates on task and resource status.
[0152] To further demonstrate the feasibility and progress of the method proposed in this application, the method of this application is compared with other existing methods in the same implementation environment. The results are as follows: Figures 2 to 4 As shown, Figure 2 This is a performance comparison chart of mHEFT, mPEFT, GTA and the method of this application (N0=5 and L=3). Figure 3 The comparison results of HEFT, mPEFT, GTA and the method of this application under different numbers of CNs (N0=5) are shown. Figure 4 The figure shows the comparison results of mHEFT, mPEFT, GTA and the method of the present application at different numbers of HCTs (L=5). Figures 2 to 4It can be seen that under the same experimental environment, the performance comparison of the proposed method (HP-HCTS) and existing algorithms (mHEFT, mPEFT, GTA) shows that: in the scenario of 5 heterogeneous computing tasks (HCTs) and 3 computing nodes (CNs), the total completion time of HP-HCTS is 20% lower than that of the comparison algorithm on average, and it is the only one that strictly meets the maximum allowable processing delay constraint of 1500 milliseconds, avoiding task timeouts; when the number of computing nodes increases from 2 to 8, the completion time of HP-HCTS is gradually optimized with resource expansion, while the comparison algorithm is limited in performance improvement and has the risk of timeout due to insufficient utilization of heterogeneous resources; in large-scale scenarios of 5 to 30 tasks, HP-HCTS generates high-quality solutions within 15 minutes through hybrid planning optimization and constraint simplification, with a timeout task rate of 0%, while the timeout rate of the comparison algorithm exceeds 40%. Experiments have shown that the proposed method is significantly superior to existing technologies in terms of efficiency, time sensitivity, scalability and resource utilization, and is particularly suitable for scheduling heterogeneous computing tasks with asynchronous generation and strict time constraints in the Industrial Internet of Things.
[0153] The present application also provides an industrial Internet of Things heterogeneous computing task scheduling device, such as Figure 5 As shown, the industrial Internet of Things heterogeneous computing task scheduling device includes:
[0154] The task generation module 501 is configured to decompose a heterogeneous computing task into multiple subtasks and represent the dependencies between the subtasks using a directed acyclic graph. The computing requirements of each subtask are represented by the number of CPU clock cycles, the size of the input data is represented by the number of bytes, and the generation time of each subtask is asynchronous and has different time sensitivity constraints.
[0155] a node modeling module 502 configured to model computing nodes in the industrial Internet of Things as heterogeneous resources, wherein each computing node has different computing capabilities and data transmission rates, and the computing nodes are connected via a high-speed network to form a fully connected graph structure;
[0156] The scheduling model construction module 503 is configured to construct a scheduling model based on deep reinforcement learning. The scheduling model learns to schedule subtasks on heterogeneous computing nodes by interacting with the environment with the goal of minimizing the completion time of subtasks and satisfying time sensitivity constraints. The scheduling model includes a state space, an action space, and a reward function, wherein the state space includes the execution state of the current subtask, the load of the computing node, and the generation time of the subtask; the action space includes subtask allocation information; and the reward function is determined based on the completion time of the subtask and the time sensitivity constraint.
[0157] The scheduling model training module 504 is configured to train the scheduling model using historical task data and a simulation environment to obtain a trained scheduling model;
[0158] The subtask scheduling module 505 is configured to receive newly generated subtasks in real time in the industrial Internet of Things environment based on the trained scheduling model and schedule the received subtasks;
[0159] The scheduling system establishment module 506 is configured to establish a heterogeneous computing task scheduling system, which includes a task management module, a resource management module, a scheduling decision module and a monitoring module; wherein the task management module is responsible for receiving and managing newly generated subtasks; the resource management module is responsible for monitoring the status of computing nodes; the scheduling decision module uses the trained scheduling model to allocate subtasks; and the monitoring module is responsible for real-time monitoring of the execution of subtasks.
[0160] In some embodiments, the node modeling module is further configured to:
[0161] Divide the computational requirements of the subtask by the processing capacity of the computing node to obtain the processing time of the subtask on the current computing node;
[0162] Divide the subtask result data size by the average data transmission rate to obtain the transmission time of the subtask result data between computing nodes;
[0163] Based on the configuration of each computing node and the industrial applications installed, the set of subtasks that the computing node can process is determined.
[0164] In some embodiments, the scheduling model learns to schedule subtasks on heterogeneous computing nodes by interacting with the environment with the goal of minimizing the completion time of subtasks and satisfying time sensitivity constraints, including:
[0165] Use binary variables to determine the distribution relationship between subtasks and computing nodes, and set non-negative continuous variables s ij and f ij , record subtask t separately ij Start and finish time;
[0166] With the goal of minimizing the completion time of subtasks and satisfying time-sensitivity constraints, constraint rules are set to achieve this goal. The constraint rules include: each subtask can only be processed on one computing node; the difference between the completion time and the start time of a subtask is consistent with the processing time on its corresponding computing node; the entry subtask start time of a task is later than the task generation time plus the data transmission time; and all tasks are completed before the set deadline.
[0167] Introduce a new variable zij To clarify subtask t ij The compute node to be scheduled;
[0168] Calculate the earliest and latest completion times for each subtask on different computing nodes. When calculating the earliest completion time, consider the earliest completion times of all direct predecessor subtasks of the subtask, add the data transmission time, find the minimum value, and take the maximum value of the minimum values to determine the earliest start and earliest completion times of the current subtask. When calculating the latest completion time, subtract the data transmission time and the subtask's own processing time from the latest start time of the subtask's direct successor subtasks, find the maximum value, and then take the minimum value of the maximum value to determine the latest completion time. Determine the boundary conditions for the earliest and latest completion times of the entry and exit subtasks.
[0169] Two key propositions are set to simplify the constraints of the model; the first key proposition is: if for two subtasks t ij and t pq , if there exists a computing node where the latest start time minus the processing time of one subtask is greater than the earliest completion time of the other subtask, then the execution times of the two subtasks on the current computing node will not overlap. The second key proposition is: if two subtasks on a computing node have a difference between the earliest completion time of one subtask and the latest start time minus the processing time of the other subtask, which is less than the sum of the processing times of the two subtasks, then the two subtasks cannot be processed simultaneously on this computing node.
[0170] The scheduling model is solved using a solver. If a feasible solution exists for the scheduling model, the solver gives the specific allocation of each subtask, including which computing node it is assigned to and the start and completion times of the subtask, to obtain a scheduling plan that meets the task requirements and constraints.
[0171] In some embodiments, the scheduling model is trained as follows:
[0172] New variables are introduced to determine the subtask computing nodes, the constraint condition expression form is transformed, and the constraints to prevent subtask time conflicts are simplified to obtain a scheduling model based on constraint programming.
[0173] Calculate time boundaries and narrow the variable range; wherein the time boundaries include the earliest and latest completion time limits of the subtasks on each computing node;
[0174] Simplify the constraints based on two key propositions;
[0175] Using constraint programming-based models, time boundaries, and simplified constraints, and with the help of constraint programming solvers, determine whether the task scheduling problem has a solution and solve it. First, preprocess the model, then find variable assignments that meet the constraints. If there are assignments, output subtask allocation and time information. If not, indicate that the problem has no solution.
[0176] Definition Key Proposition 3: If there is a key task T in the set of heterogeneous computing tasks u , which is generated at And all in the key task T u The previously generated tasks {T1, T2, ..., T u-1 The completion time of} shall not exceed The optimal total completion time of all tasks is the same as that of only The optimal total completion time is the same. According to key proposition 3, the task set is arranged in ascending order of generation time. The constraint programming model is used to verify whether there is a task that satisfies If there is a feasible solution that satisfies the above constraints, the task is determined to be a critical task T u , based on the key tasks, the original scheduling model is divided into two parts. The first part is to schedule {T1, T2, …, T u-1}, using constraint programming model to generate feasible solutions; the second part is scheduling A mathematical programming model is constructed to minimize the total completion time. The two parts of the model are solved separately to obtain the two parts of the scheduling plan and merge them to obtain the global optimal scheduling plan.
[0177] In some embodiments, in the heterogeneous computing task scheduling system, the task management module continuously monitors new subtasks. When a new subtask is generated, it quickly obtains the generation time, computing requirements, and input data size of the subtask, organizes them according to a set format, and stores them in a task queue. The task queue sorts the subtasks according to generation time or priority.
[0178] In some embodiments, in the heterogeneous computing task scheduling system, the resource management module periodically sends query instructions to the computing nodes, collects computing power, load conditions and data transmission rates, and stores them in the resource status database after sorting, classifies and manages them, and provides resource data for the scheduling decision module; the scheduling decision module obtains task details from the task management module, obtains computing node status data from the resource management module, inputs the task details and computing node status data into the deep reinforcement learning model, calculates the adaptability score of each computing node, selects the node with the highest score after sorting to assign tasks, and sends an assignment instruction.
[0179] In some embodiments, in the heterogeneous computing task scheduling system, the monitoring module monitors task execution in real time, communicates with the computing nodes to obtain execution data of execution progress and completion time, compares the execution data with time sensitivity constraints, and issues an early warning to the scheduling decision module when the execution progress is lower than the set threshold. At the same time, the execution status is fed back to the task management module and the resource management module to update the task and resource status.
[0180] An embodiment of the present application provides an electronic device, which may include a processor and a memory, wherein the processor and the memory can communicate with each other; illustratively, the processor and the memory communicate with each other via a communication bus.
[0181] The processor executes the computer-executable instructions stored in the memory, so that the processor implements the solutions in the above embodiments. The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0182] The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. System buses can be categorized as address buses, data buses, and control buses. Transceivers enable communication between the database access device and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) or non-volatile memory.
[0183] The electronic device provided in the embodiment of the present application may be the terminal device of the above embodiment.
[0184] An embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the technical solution of the industrial Internet of Things heterogeneous computing task scheduling method of the above embodiment.
[0185] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, the technical solution of the industrial Internet of Things heterogeneous computing task scheduling method in the above embodiment can be implemented.
[0186] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or module, which can be electrical, mechanical or other forms.
[0187] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of these modules may be selected to implement the solution of this embodiment based on actual needs.
[0188] In addition, the functional modules in the various embodiments of the present application may be integrated into a single processing unit, or each module may exist physically separately, or two or more modules may be integrated into a single unit. The above-mentioned modules may be implemented in the form of hardware or hardware plus software functional units.
[0189] The above-mentioned integrated module implemented in the form of a software functional module can be stored in a computer-readable storage medium. The above-mentioned software functional module is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.
[0190] It should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), or application-specific integrated circuits (ASICs). A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly implemented by a hardware processor or implemented by a combination of hardware and software modules in the processor.
[0191] The memory may include a high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk.
[0192] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be divided into address buses, data buses, and control buses.
[0193] The storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0194] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a main control device.
[0195] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0196] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for scheduling heterogeneous computing tasks in industrial Internet of Things, characterized in that: The method comprises: Heterogeneous computing tasks are decomposed into multiple subtasks, and the dependencies between subtasks are represented by a directed acyclic graph. The computational requirements of each subtask are represented by the number of CPU clock cycles, and the size of the input data is represented by the number of bytes. The generation time of each subtask is asynchronous and has different time sensitivity constraints. The computing nodes in the Industrial Internet of Things are modeled as heterogeneous resources. Each computing node has different computing capabilities and data transmission rates. The computing nodes are connected through high-speed networks to form a fully connected graph structure. A scheduling model based on deep reinforcement learning is constructed. The scheduling model learns to schedule subtasks on heterogeneous computing nodes by interacting with the environment, with the goal of minimizing the completion time of subtasks and satisfying time-sensitivity constraints. The scheduling model includes a state space, an action space, and a reward function. The state space includes the execution status of the current subtask, the load of the computing node, and the generation time of the subtask; the action space includes subtask allocation information; and the reward function is determined based on the completion time of the subtask and the time-sensitivity constraint. Use historical task data and simulation environment to train the scheduling model to obtain a trained scheduling model; Based on the trained scheduling model, newly generated subtasks are received in real time in the industrial IoT environment and scheduled. A heterogeneous computing task scheduling system is established, which includes a task management module, a resource management module, a scheduling decision module and a monitoring module; wherein the task management module is responsible for receiving and managing newly generated subtasks; the resource management module is responsible for monitoring the status of computing nodes; the scheduling decision module uses the trained scheduling model to allocate subtasks; and the monitoring module is responsible for real-time monitoring of the execution of subtasks.
2. The method for scheduling heterogeneous computing tasks in the industrial Internet of Things according to claim 1, characterized in that: Modeling computing nodes in the Industrial Internet of Things as heterogeneous resources, including: Divide the computational requirements of the subtask by the processing capacity of the computing node to obtain the processing time of the subtask on the current computing node; Divide the subtask result data size by the average data transmission rate to obtain the transmission time of the subtask result data between computing nodes; Based on the configuration of each computing node and the industrial applications installed, the set of subtasks that the computing node can process is determined.
3. The method for scheduling heterogeneous computing tasks in the industrial Internet of Things according to claim 1, characterized in that: The scheduling model learns to schedule subtasks on heterogeneous computing nodes by interacting with the environment to minimize the completion time of subtasks and meet time sensitivity constraints. It includes: Use binary variables to determine the distribution relationship between subtasks and computing nodes, and set non-negative continuous variables s ij and f ij , record subtask t separately ij Start and finish time; With the goal of minimizing the completion time of subtasks and satisfying time-sensitivity constraints, constraint rules are set to achieve this goal. The constraint rules include: each subtask can only be processed on one computing node; the difference between the completion time and the start time of a subtask is consistent with the processing time on its corresponding computing node; the entry subtask start time of a task is later than the task generation time plus the data transmission time; and all tasks are completed before the set deadline. Introduce a new variable z ij To clarify subtask t ij The compute node to be scheduled; Calculate the earliest and latest completion times for each subtask on different computing nodes. When calculating the earliest completion time, consider the earliest completion times of all direct predecessor subtasks of the subtask, add the data transmission time, find the minimum value, and take the maximum value of the minimum values to determine the earliest start and earliest completion times of the current subtask. When calculating the latest completion time, subtract the data transmission time and the subtask's own processing time from the latest start time of the subtask's direct successor subtasks, find the maximum value, and then take the minimum value of the maximum value to determine the latest completion time. Determine the boundary conditions for the earliest and latest completion times of the entry and exit subtasks. Two key propositions are set to simplify the constraints of the model; the first key proposition is: if for two subtasks t ij and t pq , if there exists a computing node where the latest start time minus the processing time of one subtask is greater than the earliest completion time of the other subtask, then the execution times of the two subtasks on the current computing node will not overlap. The second key proposition is: if two subtasks on a computing node have a difference between the earliest completion time of one subtask and the latest start time minus the processing time of the other subtask, which is less than the sum of the processing times of the two subtasks, then the two subtasks cannot be processed simultaneously on this computing node. The scheduling model is solved using a solver. If a feasible solution exists for the scheduling model, the solver gives the specific allocation of each subtask, including which computing node it is assigned to and the start and completion times of the subtask, to obtain a scheduling plan that meets the task requirements and constraints.
4. The method for scheduling heterogeneous computing tasks in the industrial Internet of Things according to claim 3, characterized in that: The scheduling model is trained as follows: New variables are introduced to determine the subtask computing nodes, the constraint condition expression form is transformed, and the constraints to prevent subtask time conflicts are simplified to obtain a scheduling model based on constraint programming. Calculate time boundaries and narrow the variable range; wherein the time boundaries include the earliest and latest completion time limits of the subtasks on each computing node; Simplify the constraints based on two key propositions; Using constraint programming-based models, time boundaries, and simplified constraints, and with the help of constraint programming solvers, determine whether the task scheduling problem has a solution and solve it. First, preprocess the model, then find variable assignments that meet the constraints. If there are assignments, output subtask allocation and time information. If not, indicate that the problem has no solution. Definition Key Proposition 3: If there is a key task T in the set of heterogeneous computing tasks u , which is generated at And all in the key task T u The previously generated tasks {T1, T2, ..., T u-1 The completion time of} shall not exceed The optimal total completion time of all tasks is the same as that of only The optimal total completion time is the same. According to key proposition 3, the task set is arranged in ascending order of generation time. The constraint programming model is used to verify whether there is a task that satisfies If there is a feasible solution that satisfies the above constraints, the task is determined to be a critical task T u , based on the key tasks, the original scheduling model is divided into two parts. The first part is to schedule {T1, T2, …, T u-1 }, using constraint programming model to generate feasible solutions; the second part is scheduling A mathematical programming model is constructed to minimize the total completion time. The two parts of the model are solved separately to obtain the two parts of the scheduling plan and merge them to obtain the global optimal scheduling plan.
5. The method for scheduling heterogeneous computing tasks in the industrial Internet of Things according to claim 1, characterized in that: In the heterogeneous computing task scheduling system, the task management module continuously monitors new subtasks. When a new subtask is generated, it quickly obtains the subtask's generation time, computing requirements, and input data size, organizes them in a set format, and stores them in a task queue. The task queue sorts the subtasks according to generation time or priority.
6. The method for scheduling heterogeneous computing tasks in the industrial Internet of Things according to claim 1, characterized in that: In the heterogeneous computing task scheduling system, the resource management module regularly sends query instructions to the computing nodes, collects computing power, load conditions and data transmission rate, and stores them in the resource status database after sorting, classifies and manages them, and provides resource data for the scheduling decision module; the scheduling decision module obtains task details from the task management module and computing node status data from the resource management module, inputs the task details and computing node status data into the deep reinforcement learning model, calculates the adaptability score of each computing node, selects the node with the highest score after sorting, assigns the task, and sends the assignment instruction.
7. The method for scheduling heterogeneous computing tasks in the industrial Internet of Things according to claim 1, characterized in that: In the heterogeneous computing task scheduling system, the monitoring module monitors task execution in real time, communicates with computing nodes to obtain execution data such as execution progress and completion time, compares the execution data with time-sensitivity constraints, and issues an early warning to the scheduling decision module when the execution progress is lower than a set threshold. At the same time, the execution status is fed back to the task management module and the resource management module to update the task and resource status.
8. An industrial Internet of Things heterogeneous computing task scheduling device, characterized in that: The device comprises: The task generation module is configured to decompose heterogeneous computing tasks into multiple subtasks and represent the dependencies between subtasks through a directed acyclic graph. The computational requirements of each subtask are represented by the number of CPU clock cycles, and the size of the input data is represented by the number of bytes. The generation time of each subtask is asynchronous and has different time sensitivity constraints. a node modeling module configured to model computing nodes in the industrial Internet of Things as heterogeneous resources, wherein each computing node has different computing capabilities and data transmission rates, and the computing nodes are connected through a high-speed network to form a fully connected graph structure; A scheduling model construction module is configured to construct a scheduling model based on deep reinforcement learning. The scheduling model learns to schedule subtasks on heterogeneous computing nodes by interacting with the environment with the goal of minimizing the completion time of subtasks and satisfying time-sensitivity constraints. The scheduling model includes a state space, an action space, and a reward function, wherein the state space includes the execution state of the current subtask, the load of the computing node, and the generation time of the subtask; the action space includes subtask allocation information; and the reward function is determined based on the completion time of the subtask and the time-sensitivity constraint. The scheduling model training module is configured to train the scheduling model using historical task data and a simulation environment to obtain a trained scheduling model; The subtask scheduling module is configured to receive newly generated subtasks in real time in the industrial Internet of Things environment based on the trained scheduling model and schedule the received subtasks; The scheduling system establishment module is configured to establish a heterogeneous computing task scheduling system, which includes a task management module, a resource management module, a scheduling decision module and a monitoring module; wherein the task management module is responsible for receiving and managing newly generated subtasks; the resource management module is responsible for monitoring the status of computing nodes; the scheduling decision module uses the trained scheduling model to allocate subtasks; and the monitoring module is responsible for real-time monitoring of the execution of subtasks.
9. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the industrial Internet of Things heterogeneous computing task scheduling method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the industrial Internet of Things heterogeneous computing task scheduling method according to any one of claims 1 to 7.
Citation Information
Cited By
Abnormal change real-time early warning system and method based on supervision business operation monitoring
CN121258206A
Gateway processing method and device based on heterogeneous computing and dynamic energy efficiency
CN121441683A
Gateway processing method and device based on heterogeneous computing and dynamic energy efficiency
CN121441683B