A task scheduling method, device and storage medium based on device snapshot polling
The device snapshot polling adaptive task scheduling method addresses inefficiencies in traditional scheduling by dynamically prioritizing tasks based on real-time device status and importance, optimizing task execution and resource allocation for improved efficiency and responsiveness.
Patent Information
- Application Number
- CN202411504925.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-10-28
AI Technical Summary
Traditional task scheduling methods face challenges such as low execution efficiency, long response times, and inflexible task prioritization due to fixed and single modes, failing to account for variable task priorities and real-time device status.
A device snapshot polling adaptive task scheduling method that calculates task priority based on time dimension and importance requirements, monitors real-time device status, and optimizes scheduling strategies to ensure high-priority tasks are executed efficiently, with dynamic adjustments for device anomalies.
Improves resource utilization, reduces waiting times and execution costs, enhances system responsiveness, and provides flexible user interaction for managing task scheduling.
Smart Images

Figure CN119025287B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a task scheduling method in the field of information technology, and in particular to a task scheduling method, device and storage medium based on device snapshot polling. Background Art
[0002] In today's information society, the rapid development of computer and network technology has enabled various intelligent devices to be widely used in industrial production, logistics and transportation, medical health and other fields. However, with the continuous expansion of application scenarios and the increasing complexity of tasks, traditional task scheduling methods face a series of challenges, such as low task execution efficiency, long task response time, and fixed and single mode.
[0003] For example, the Chinese patent "Scheduling method, scheduling device and computer equipment for file transaction processing tasks" (application number: 202310685540.7, publication date: October 13, 2023) proposes a scheduling method for transaction processing tasks, polling tasks, selecting target tasks according to task priority, task time, and maximum concurrency to prioritize the execution of the task to ensure that system resources and service pressure will not be overloaded. However, the priority of the tasks in this patent is set in advance, but in fact, the priority of tasks is often variable, and different types of tasks often have different time sensitivities. For example, real-time tasks require quick response, low-latency tasks need to be completed within a specified time, and high-throughput tasks need to maximize task execution efficiency. In the task scheduling method of the Chinese patent "A method and device for scheduling cluster resources" (application number: 202010408775.8, publication date: September 1, 2020), when allocating resources to services, the different priorities of upgrade services and creation services in terms of time requirements are taken into account, and resources are timestamped to achieve resource reservation, but the impact of the real-time status of the device on task allocation is not considered. Therefore, it is necessary to improve the existing technology to improve the execution efficiency and effect of tasks. Summary of the invention
[0004] In order to overcome the deficiencies of the prior art, the present invention proposes a task scheduling method, apparatus and storage medium based on device snapshot polling.
[0005] In order to achieve the above object, the present invention proposes a device snapshot polling adaptive task scheduling method, the method comprising the following steps:
[0006] S1: acquiring real-time status information of the device by performing snapshot polling on the device, wherein the real-time status information includes the real-time load and remaining resources of the device;
[0007] S2: Establish a task queue. When a new task is added to the queue, the priority of the new task is calculated according to the time dimension requirements and importance requirements of the new task, and the new task is inserted into the task queue. The tasks with the highest priority are selected from the updated task queue and assigned to the devices that meet the resource requirements and have the lowest load. The execution status of the tasks and the real-time status information of the devices are monitored in real time.
[0008] S3: Calculate the device resource utilization rate according to the real-time status information of the device, calculate the task execution efficiency according to the task execution status, evaluate the performance indicators of the task scheduling strategy in S2 through the device resource utilization rate and task execution efficiency, and optimize the task scheduling strategy according to the performance indicators obtained by the evaluation.
[0009] Furthermore, during the execution of the device snapshot polling adaptive task scheduling method, operators are allowed to perform the following operations: view the real-time status information of the device, the task execution status and the performance indicators of the task scheduling strategy, add, modify, and delete tasks, set the time dimension requirements and importance requirements of the task to modify the priority of the task, and customize the cycle of device snapshot polling.
[0010] Furthermore, in S2, the formula for calculating the priority of the new task is as follows:
[0011] ,
[0012] Where α is the weight of the time dimension requirement, β is the weight of the importance requirement, T_deadaline is the deadline of the task, T_current is the current time, T_submit is the submission time of the task, I is the importance of the task, and the importance of the task is determined by the commercial value of the task, the impact on subsequent work, and the resource requirements. ε is a positive number that tends to zero.
[0013] Furthermore, in S3,
[0014] The calculation formula for equipment resource utilization is:
[0015] ,
[0016] In the formula, Indicates the utilization rate of device resources. Indicates The resources currently used by the device, Indicates Total resources of the device, Indicates the total number of devices;
[0017] The calculation formula for task execution efficiency is:
[0018] ,
[0019] In the formula, is the task execution efficiency score of the jth task, which is a value between 0 and 1 and is used to quantify the efficiency of task execution;
[0020] It is the theoretical maximum efficiency value, which is a preset constant and represents the highest efficiency that a task can achieve;
[0021] is the actual execution time of the jth task, and is the time elapsed from the start to the completion of the jth task;
[0022] is the theoretical minimum execution time of the jth task, estimated based on the task type and resource requirements;
[0023] is the theoretical maximum execution time of the jth task, estimated based on the task type and resource requirements;
[0024] It is the theoretical minimum efficiency value, a preset constant, indicating the lower limit of the efficiency score.
[0025] Furthermore, in S3, optimizing the task scheduling strategy includes: adjusting the weight required by the time dimension of the task and the weight required by the importance, and if the performance index of the task scheduling strategy is not as good as the performance index of the previous task scheduling strategy, then reverting to the previous task scheduling strategy or readjusting it.
[0026] Furthermore, when the real-time status information reflects a device failure or performance degradation, corresponding processing measures are triggered to ensure stable operation of the system.
[0027] The present invention also proposes a device snapshot polling adaptive task scheduling device, the device comprising:
[0028] The device snapshot polling module obtains the real-time status information of the device by performing snapshot polling on the device. The real-time status information includes the real-time load and remaining resources of the device.
[0029] The task scheduling module is used to execute the task scheduling strategy, specifically: establish a task queue, when a new task is added to the queue, calculate the priority of the new task according to the time dimension requirements and importance requirements of the new task, and insert the new task into the task queue, select the highest priority task from the updated task queue in turn and assign it to the device that meets the resource requirements and has the lowest load, and monitor the execution of the task and the real-time status information of the device in real time;
[0030] The strategy optimization module calculates the device resource utilization rate based on the real-time status information of the device, calculates the task execution efficiency based on the task execution status, evaluates the performance indicators of the task scheduling strategy in the task scheduling module through the device resource utilization rate and task execution efficiency, and optimizes the task scheduling strategy based on the performance indicators obtained from the evaluation.
[0031] Furthermore, it also includes a user interaction module, through which the operator can perform the following operations: view the real-time status information of the device, the task execution status and the performance indicators of the task scheduling strategy, add, modify, and delete tasks, set the time dimension requirements and importance requirements of the task to modify the priority of the task, and customize the device snapshot polling cycle.
[0032] The present invention also proposes an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the aforementioned device snapshot polling adaptive task scheduling method are implemented.
[0033] The present invention also proposes a computer-readable storage medium, which stores at least one instruction, at least one program, a code set or an instruction set. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the steps of the aforementioned device snapshot polling adaptive task scheduling method.
[0034] Compared with the prior art, the snapshot polling adaptive task scheduling method adopted in the present invention has the following advantages:
[0035] 1. Improve equipment resource utilization: By obtaining equipment status information in real time through snapshot polling, the system can more accurately grasp the equipment load and resource surplus, thereby performing intelligent scheduling based on task requirements and the actual status of the equipment, avoiding resource waste and improving the overall utilization of the equipment;
[0036] 2. Optimize task execution efficiency: The system calculates the dynamic priority of tasks based on the time dimension priority and importance factors of the tasks, taking into account the time urgency and importance of the tasks themselves, and intelligently sorts and allocates tasks in combination with the real-time status of the equipment to ensure that high-priority and urgent tasks can be executed first, while reducing task waiting time and execution time, and improving overall task execution efficiency;
[0037] 3. Enhance system response capability: Through device snapshot polling, the system can promptly detect device anomalies or performance degradation, and take corresponding processing and protection measures to avoid the impact of device failures on task execution. At the same time, the system also supports dynamic adjustment of task scheduling strategies to adapt to changes in device status and task requirements, ensuring rapid response and stable operation of the system;
[0038] 4. Provide flexible and convenient user interaction: The system provides a user-friendly interface and rich functional options, allowing users to view the real-time status of the device, task execution status and system performance indicators, and perform task configuration and management operations as needed. Users can also customize the device snapshot polling cycle and adjust the task scheduling strategy and parameters to meet the needs of different scenarios;
[0039] 5. Reduce operating costs: By optimizing equipment resource utilization and task execution efficiency, the system can reduce unnecessary resource consumption and waste, and reduce the company's operating costs. Timely detection and handling of equipment failures can avoid production interruptions and losses caused by equipment failures, further reducing the company's operating risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a flow chart of the device snapshot polling adaptive task scheduling method in the present invention;
[0041] Figure 2 It is a processing diagram of the device snapshot polling adaptive task scheduling method in the present invention;
[0042] Figure 3 It is a structural schematic diagram of the device snapshot polling adaptive task scheduling device in the present invention;
[0043] Figure 4 The figure is a schematic diagram of the hardware structure of an electronic device for executing the device snapshot polling adaptive task scheduling method in the present invention. DETAILED DESCRIPTION
[0044] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0045] Embodiment 1:
[0046] Reference Figure 1-2 This embodiment proposes a device snapshot polling adaptive task scheduling method. Specifically, the method includes the following main steps:
[0047] Step 1: Snapshot polling is performed on the device to obtain the real-time status information of the device, which includes the real-time load and remaining resources of the device.
[0048] In each polling cycle, the current snapshot information is automatically obtained from each device, including but not limited to operating status, load conditions, performance parameters, fault alarms, etc. The acquired device snapshot information is stored in the database for use by subsequent task scheduling modules.
[0049] Snapshot polling can conveniently process events asynchronously in parallel by temporarily storing events based on queues. This queue-based processing method enables snapshot polling to have higher performance when processing a large number of events. In contrast, ordinary polling is less efficient, has a longer waiting time, and has low CPU utilization. This efficient processing capability of snapshot polling benefits from its distributed asynchronous architecture and the high degree of decoupling between event processors, which gives snapshot polling obvious advantages in scalability and processing of complex events. The present invention allows users to customize the cycle of snapshot polling to optimize the performance indicators of subsequent task scheduling strategies.
[0050] If abnormal conditions such as device failure or performance degradation are detected when snapshot polling is performed on the device to obtain the real-time status information of the device, corresponding processing measures are triggered, such as automatic restart of the device, alarm notification, etc., to ensure the stable operation of the system.
[0051] Step 2: Execute task scheduling. The specific operations are as follows: Establish a task queue to store tasks to be executed. Each task contains time dimensions and attributes such as resource requirements. When a new task is added to the queue, the algorithm will re-evaluate the priority and execution order of all tasks in the task queue to ensure that high-priority and urgent tasks can be executed first. The priority of the new task is calculated based on the requirements in the time dimension and the importance requirements. The requirements in the time dimension are calculated based on the start time, end time, execution cycle, etc. The importance is comprehensively evaluated by the commercial value of the task, the impact on subsequent work, and resource requirements. After calculation, the execution order of the task and the assigned device are determined based on the priority and the real-time status of the device.
[0052] The core algorithm of task scheduling is task sorting and allocation based on priority and available resources. The algorithm flow is as follows:
[0053] (1) Initialization: Create a task queue that is sorted by priority. At the same time, obtain the current status and resource information of all devices.
[0054] (2) New task processing: When a new task is added, the priority of the new task is calculated based on the task's time dimension requirements (such as start time, end time, execution cycle, etc.) and resource requirements, and it is inserted into the appropriate position of the task queue.
[0055] (3) Task scheduling: Starting from the head of the task queue, select the task with the highest priority, traverse all devices, and find the device that meets the task resource requirements and has the lowest current load. Assign the new task to the device and update the device's load and the status of the task queue.
[0056] If there are still threads after the high-priority task is assigned, it will be assigned to the task at a lower level until the number of threads in the system is used up. The subsequent tasks will be queued and wait until the resources are released before continuing to execute subsequent task scheduling.
[0057] The formula for calculating the priority of a new task is as follows:
[0058] ,
[0059] In the above formula, α is the weight coefficient required by the time dimension, β is the weight coefficient required by the importance, T_deadaline is the deadline of the task, T_current is the current time, T_submit is the submission time of the task, I is the importance of the task, and the importance of the task is determined by the commercial value of the task, the impact on subsequent work, and resource requirements. ε is a positive number tending to zero. The priority P of the task is calculated by adding the weighted urgency of time and the importance of the task. α considers the weight of time-related factors, and β considers the weight of task importance. The specific values of these coefficients are adjusted according to the actual situation to reflect the priority allocation strategy for different tasks or different business scenarios.
[0060] During the task scheduling and execution process, the task execution status and device load changes are monitored in real time. If the load of a device is too high or a task execution times out, the corresponding processing mechanism is triggered, such as rescheduling, notifying the administrator, etc., to dynamically adjust the execution order of tasks and the resource allocation of the device.
[0061] Step 3: Based on the real-time status information of the device and the execution status of the task, evaluate the performance indicators of the current task scheduling strategy, and adjust and optimize the task scheduling strategy based on the performance indicators obtained from the evaluation.
[0062] The performance indicators of the task scheduling strategy include the resource utilization of the equipment and the execution efficiency of the task, among which,
[0063] The resource utilization rate is calculated as follows:
[0064]
[0065] In the formula, Indicates resource utilization, Indicates The resources currently used by the device, Indicates Total resources of the device, Indicates the total number of devices.
[0066] The device is a cluster device, with a total of n devices. By traversing the 1st to nth devices, the total resource utilization can be obtained by dividing the resources in use by the total device resources. The resource utilization reflects the system performance indicators from the perspective of the balance of device resource use. The higher the resource utilization, the better the system performance indicators. Through reasonable resource scheduling and allocation, the utilization efficiency of cluster resources can be maximized.
[0067] The calculation formula for task execution efficiency is:
[0068]
[0069] In the formula, is the task execution efficiency score of the jth task, which is a value between 0 and 1 and is used to quantify the efficiency of task execution;
[0070] It is the theoretical maximum efficiency value, which is a preset constant and represents the highest efficiency that a task can achieve;
[0071] is the actual execution time of the jth task, and is the time elapsed from the start to the completion of the jth task;
[0072] is the theoretical minimum execution time of the jth task, estimated based on the task type and resource requirements;
[0073] is the theoretical maximum execution time of the jth task, estimated based on the task type and resource requirements;
[0074] It is the theoretical minimum efficiency value, a preset constant, indicating the lower limit of the efficiency score.
[0075] The execution efficiency of a task is measured by the execution efficiency score of the task. The score is a value between 0 and 1. The closer it is to 1, the higher the execution efficiency of the task. The task execution efficiency measures the execution effect of the task from the time dimension.
[0076] Task types are divided according to the number of devices, which can be divided into three types: large, medium and small. Resource requirements are dynamically configured based on the number of current servers, number of CPU cores, memory size and other aspects.
[0077] If the performance indicators show that the current task scheduling strategy is not performing well, the task scheduling strategy can be adjusted by adjusting the time dimension requirements and the weight of the importance requirements of the task to change the priority of the task, adjusting the task scheduling cycle, changing the algorithm scheduling parameters, etc. If the performance of the new task scheduling strategy is not as good as that of the previous task scheduling strategy, then roll back to the previous task scheduling strategy or readjust the task scheduling strategy.
[0078] Step 3 is a policy optimization process. When it is found that a certain device is overloaded or the resource utilization is insufficient, the module that executes policy optimization will trigger the corresponding optimization strategy, such as transferring some tasks to other devices for execution, adjusting the priority or execution time of tasks, etc. The policy optimization module will also regularly collect task scheduling data, device resource utilization data, etc., analyze the collected data, calculate performance evaluation indicators, select appropriate optimization strategies based on the performance evaluation results, and monitor the performance evaluation indicators after scheduling in real time, and continuously optimize and adjust the strategies and parameters of task scheduling to achieve more efficient resource utilization and task execution efficiency.
[0079] The scheduling method of this embodiment also includes an interactive step, where the user can view the real-time status information of the device, the task execution status and the performance indicators of the task scheduling strategy, the user can add, modify, and delete tasks, and set the time dimension requirements and importance requirements of the task to modify the priority of the task, and the user can customize the period and frequency of the device snapshot polling. The interactive step is parallel to the above steps 1 to 3, that is, the user can participate in the interaction throughout the process, thereby providing the user with greater freedom and choice to participate in the entire process.
[0080] Through the coordination of the various steps of the above-mentioned device snapshot polling adaptive task scheduling method, this embodiment can ensure that when the cluster device executes a task, the real-time status of the device is obtained based on snapshot polling, and when the device abnormality is found, it is processed in time to ensure the rapid response and stable operation of the system; when scheduling tasks, it is arranged according to the actual needs of the task and the status of the device. The actual needs of the task take into account both the time urgency and the importance of the task itself. When arranging the task to be executed on the device, the load of the device is taken into account, thereby improving the utilization of resources and the execution efficiency of the task, avoiding resource waste, and reducing the task waiting time and execution time.
[0081] The following are the steps of a specific operation process:
[0082] S1. Initialize the system
[0083] (1) Start the database service, ensure that the database runs normally and initialize the necessary data tables.
[0084] (2) Start the device snapshot polling service and set the polling period.
[0085] (3) Start the task queue management service and initialize the task queue.
[0086] (4) Start task scheduling services and decision optimization services.
[0087] S2. Device snapshot polling
[0088] (1) The device snapshot polling service sends polling requests to each device in the system according to the set period.
[0089] (2) The device responds to the polling request and returns a snapshot of its current status.
[0090] (3) The device snapshot polling service stores the collected snapshot information in the database.
[0091] S3. Task submission and queue management
[0092] (1) Users submit tasks through the interactive layer, including task name, priority, required resources, and other information.
[0093] (2) The task queue management service receives tasks submitted by users and stores the task information in the task queue.
[0094] (3) Users can view the status of tasks in the task queue through the interactive layer, including pending, executing, completed, etc.
[0095] S4. Task Scheduling
[0096] (1) The task scheduling service periodically obtains tasks to be executed from the task queue.
[0097] (2) Based on the device snapshot information and task requirements, the most suitable device is selected to perform the task through an intelligent scheduling algorithm.
[0098] (3) Send task execution instructions to the target device and monitor the execution status of the task in real time.
[0099] (4) Update the task execution status to the database and notify the user.
[0100] S5. Decision Optimization
[0101] (1) The decision optimization service regularly obtains real-time data and historical data from the database.
[0102] (2) Analyze system performance and evaluate the effectiveness of the current task scheduling strategy.
[0103] (3) Select optimization strategies based on the evaluation results, such as adjusting task priorities, changing scheduling algorithm parameters, etc.
[0104] (4) Send the optimized parameter recommendations to the task scheduling service to improve the overall performance of the system.
[0105] S6. System monitoring and maintenance
[0106] (1) Monitor the operating status of the system, including equipment status, task execution status, etc.
[0107] (2) Handle abnormal situations, such as equipment failure, task execution failure, etc. When encountering the above situations, take appropriate measures to ensure the stable operation of the system.
[0108] (3) Back up system data regularly to ensure data security.
[0109] (4) Upgrade and maintain the system according to user needs.
[0110] Embodiment 2:
[0111] Reference Figure 3 This embodiment proposes a device snapshot polling adaptive task scheduling device, the device comprising:
[0112] The device snapshot polling module 21 performs snapshot polling on the device to obtain the real-time status information of the device, where the real-time status information includes the real-time load and remaining resources of the device;
[0113] The task scheduling module 22 is used to perform task scheduling, specifically: establish a task queue, when a new task is added to the queue, calculate the priority of the new task according to the time dimension requirements and importance requirements of the new task, and insert the new task into the task queue, select the highest priority tasks from the updated task queue in turn and assign them to the device that meets the resource requirements and has the lowest load, and monitor the execution of the tasks and the real-time status information of the equipment in real time.
[0114] The strategy optimization module 23 evaluates the performance index of the current task scheduling strategy according to the real-time status information of the device and the execution status of the task, and adjusts the parameters of the task scheduling according to the performance index obtained by the evaluation.
[0115] Furthermore, a user interaction module can be set up to provide a user-friendly interface, allowing users to view the real-time status information of the device, the task execution status and the performance indicators of the task scheduling strategy. The user interaction module provides task configuration and management functions, allowing users to add, modify, and delete tasks, and set parameters such as task priority, time dimension, and resource requirements. It allows users to customize the cycle and frequency of device snapshot polling, and adjust the task scheduling strategy and parameters, thereby providing users with greater freedom and choice.
[0116] Embodiment 3:
[0117] Figure 4 is a schematic diagram of the hardware structure of an electronic device for executing a device snapshot polling adaptive task scheduling method provided by an embodiment of the present invention, such as Figure 4 As shown, the device includes:
[0118] One or more processors 310 and memory 320, Figure 3 A processor 310 is taken as an example.
[0119] The device for executing the device snapshot polling adaptive task scheduling method may further include: an input device 330 and an output device 340 .
[0120] The processor 310, the memory 320, the input device 330 and the output device 340 may be connected via a bus or other means. Figure 3 The example of connecting through bus is taken in the following.
[0121] The memory 320 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs and non-volatile computer executable programs, such as program instructions corresponding to the device snapshot polling adaptive task scheduling method in the embodiment of the present invention. The processor 310 executes various functional applications and data processing of the server by running the non-volatile software programs and instructions stored in the memory 320, that is, implementing the above-mentioned device snapshot polling adaptive task scheduling method.
[0122] The memory 320 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the device snapshot polling adaptive task scheduling method, etc. In addition, the memory 320 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0123] The input device 330 can receive input digital or character information, and generate key signal input related to parameter setting and function control of the device snapshot polling adaptive task scheduling method. The output device 340 can include display devices such as display screens.
[0124] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0125] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A device snapshot polling adaptive task scheduling method, characterized in that: The method comprises the following steps: S1: acquiring real-time status information of the device by performing snapshot polling on the device, wherein the real-time status information includes the real-time load and remaining resources of the device; S2: Task scheduling: Establish a task queue. When a new task is added to the queue, calculate the priority of the new task according to the time dimension requirements and importance requirements of the new task, and insert the new task into the task queue. Select the tasks with the highest priority from the updated task queue and assign them to the devices that meet the resource requirements and have the lowest load. Monitor the execution of the tasks and the real-time status information of the devices in real time. S3: Calculate the device resource utilization rate according to the real-time status information of the device, calculate the task execution efficiency according to the task execution status, evaluate the performance indicators of the task scheduling strategy in S2 through the device resource utilization rate and task execution efficiency, and optimize the task scheduling strategy according to the performance indicators obtained by the evaluation; in S3, the calculation formula of the device resource utilization rate is: In the formula, Indicates the utilization rate of device resources. Indicates The resources currently used by the device, Indicates Total resources of the device, Indicates the total number of devices; The calculation formula for task execution efficiency is: In the formula, For the j The task execution efficiency score of each task is a value between 0 and 1, which is used to quantify the efficiency of task execution; It is the theoretical maximum efficiency value, which is a preset constant and represents the highest efficiency that a task can achieve; is the actual execution time of the jth task, and is the time elapsed from the start to the completion of the jth task; is the theoretical minimum execution time of the jth task, estimated based on the task type and resource requirements; is the theoretical maximum execution time of the jth task, estimated based on the task type and resource requirements; It is the theoretical minimum efficiency value, a preset constant, indicating the lower limit of the efficiency score.
2. The device snapshot polling adaptive task scheduling method according to claim 1, characterized in that: In S2, the formula for calculating the priority of the new task is as follows: Where α is the weight of the time dimension requirement, β is the weight of the importance requirement, T_deadaline is the deadline of the task, T_current is the current time, T_submit is the submission time of the task, I is the importance of the task, and the importance of the task is determined by the commercial value of the task, the impact on subsequent work, and the resource requirements. ε is a positive number that tends to zero.
3. The device snapshot polling adaptive task scheduling method according to claim 1, characterized in that: In S3, optimizing the task scheduling strategy includes: adjusting the weight required by the time dimension of the task and the weight required by the importance. If the performance index of the task scheduling strategy is not as good as the performance index of the previous task scheduling strategy, then revert to the previous task scheduling strategy or readjust the task scheduling strategy.
4. The device snapshot polling adaptive task scheduling method according to claim 1, characterized in that: During the execution of the device snapshot polling adaptive task scheduling method, operators are allowed to perform the following operations: view the real-time status information of the device, the task execution status and the performance indicators of the task scheduling strategy, add, modify, and delete tasks, set the time dimension requirements and importance requirements of the task to modify the priority of the task, and customize the cycle of device snapshot polling.
5. The device snapshot polling adaptive task scheduling method according to any one of claims 1 to 4, characterized in that: When real-time status information reflects equipment failure or performance degradation, corresponding processing measures are triggered to ensure stable operation of the system.
6. A device snapshot polling adaptive task scheduling device, characterized in that: The device comprises: The device snapshot polling module obtains the real-time status information of the device by performing snapshot polling on the device. The real-time status information includes the real-time load and remaining resources of the device. The task scheduling module is used to execute the task scheduling strategy, specifically: establish a task queue, when a new task is added to the queue, calculate the priority of the new task according to the time dimension requirements and importance requirements of the new task, and insert the new task into the task queue, select the highest priority task from the updated task queue in turn and assign it to the device that meets the resource requirements and has the lowest load, and monitor the execution of the task and the real-time status information of the device in real time; The strategy optimization module calculates the device resource utilization rate based on the real-time status information of the device, calculates the task execution efficiency based on the execution status of the task, evaluates the performance indicators of the task scheduling strategy in the task scheduling module through the device resource utilization rate and task execution efficiency, and optimizes the task scheduling strategy based on the performance indicators obtained by the evaluation; the calculation formula of the device resource utilization rate is: In the formula, Indicates the utilization rate of device resources. Indicates The resources currently used by the device, Indicates Total resources of the device, Indicates the total number of devices; The calculation formula for task execution efficiency is: In the formula, For the j The task execution efficiency score of each task is a value between 0 and 1, which is used to quantify the efficiency of task execution; It is the theoretical maximum efficiency value, which is a preset constant and represents the highest efficiency that a task can achieve; is the actual execution time of the jth task, and is the time elapsed from the start to the completion of the jth task; is the theoretical minimum execution time of the jth task, estimated based on the task type and resource requirements; is the theoretical maximum execution time of the jth task, estimated based on the task type and resource requirements; It is the theoretical minimum efficiency value, a preset constant, indicating the lower limit of the efficiency score.
7. The device snapshot polling adaptive task scheduling device according to claim 6, characterized in that: It also includes a user interaction module, through which operators can perform the following operations: view the real-time status information of the device, the task execution status and the performance indicators of the task scheduling strategy, add, modify, and delete tasks, set the time dimension requirements and importance requirements of the task to modify the priority of the task, and customize the device snapshot polling cycle.
8. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the device snapshot polling adaptive task scheduling method according to any one of claims 1 to 4 are implemented.
9. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the steps of the device snapshot polling adaptive task scheduling method as described in any one of claims 1 to 4.
