Real-time task scheduling method, device, equipment, storage medium and program product
By decomposing tasks into mandatory and optional parts in the aviation real-time task scheduling system, using non-precise calculations to optimize task scheduling, the efficiency and accuracy problems of the existing system under strict time and fault tolerance requirements are solved, and more efficient is achieved and flexible task handling.
Patent Information
- Application Number
- CN202410686237.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-05-30
AI Technical Summary
Existing real-time task scheduling systems are difficult to meet strict time constraints and fault-tolerance requirements in the aviation field. Traditional redundant fault-tolerant algorithms are difficult to accurately reserve sufficient processor time under high task volume and high processor utilization, affecting System real-time.
A real-time task scheduling method is proposed. By decomposing real-time tasks into mandatory execution parts and optional execution parts, using non-exact calculation theory, and based on the correlation degree and response time of tasks, the target scheduling order is determined, the task scheduling is optimized, and the scheduling requirements are reduced. , improve task throughput and resource utilization.
It improves the task scheduling efficiency and accuracy of the aviation real-time task scheduling system, enhances the flexibility and fault tolerance of the system, and meets strict time and accuracy requirements.
Smart Images

Figure CN118245200B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a real-time task scheduling method, apparatus, device, storage medium and program product. Background Art
[0002] With the development of computer technology, currently, when there is a task scheduling demand, task scheduling is usually performed based on a corresponding task scheduling system. Usually, after receiving a task scheduling request, the task scheduling system will analyze the task scheduling request and process the task scheduling request in sequence.
[0003] However, the task scheduling of a real-time task scheduling system, for example, a real-time task scheduling system in the aviation field, has strong time constraints. Therefore, the real-time task scheduling system needs to have a certain fault tolerance capability, that is, the corresponding task scheduling method for the real-time task scheduling system is different from the conventional task scheduling method. Summary of the invention
[0004] Based on this, it is necessary to provide a real-time task scheduling method, device, equipment, storage medium and program product to address the above technical problems. The real-time task scheduling method is applied in an aviation scheduling system to improve the task scheduling efficiency and accuracy of the aviation scheduling system.
[0005] In a first aspect, the present application provides a real-time task scheduling method, comprising:
[0006] In response to a task scheduling indication corresponding to the event to be scheduled, obtaining at least two real-time tasks corresponding to the event to be scheduled; wherein the task scheduling indication carries a standard processing time of the corresponding event to be scheduled;
[0007] Determine the response time of the event to be scheduled according to the task information of at least two real-time tasks;
[0008] When the response time is longer than the corresponding standard processing time, obtain the subtasks corresponding to each real-time task;
[0009] According to the event to be scheduled and the task reference data of each subtask, the target scheduling order of each subtask to be scheduled is determined, and each subtask to be scheduled is scheduled based on the target scheduling order.
[0010] In one of the embodiments, the task reference data includes task attributes; accordingly, based on the event to be scheduled and the task reference data of each subtask, the target scheduling order of each subtask to be scheduled is determined, including: determining the operation purpose corresponding to the event to be scheduled; obtaining the degree of correlation between the task attributes of each subtask and the operation purpose, and determining the target scheduling order of each subtask to be scheduled according to different degrees of correlation.
[0011] In one embodiment, the target scheduling order includes each subtask to be scheduled and the scheduling order of each subtask to be scheduled; accordingly, the target scheduling order of each subtask to be scheduled is determined according to different correlation degrees, including: treating the subtasks corresponding to the correlation degree greater than the preset correlation degree threshold as a class of subtasks; if the sum of the scheduling durations of each class of subtasks is less than the standard processing duration, and the difference between the sum and the standard processing duration is less than the first preset difference threshold, then selecting at least one subtask to be scheduled from each class of subtasks according to the scheduling duration corresponding to each class of subtask and the corresponding correlation degree; and determining the scheduling order of each subtask to be scheduled according to the correlation degree of each subtask to be scheduled.
[0012] In one of the embodiments, the method also includes: if the sum of the scheduling durations of each type of subtask is less than the standard processing duration, and the difference between the sum and the standard processing duration is not less than a first preset difference threshold, then each type of subtask is treated as a subtask to be scheduled, and the scheduling order of each subtask to be scheduled is determined based on the corresponding degree of correlation.
[0013] In one embodiment, the method also includes: if the sum of the scheduling durations of each category one subtask is less than the standard processing duration, and the difference between the sum and the standard processing duration is greater than a second preset difference threshold, then obtaining the scheduling duration corresponding to each category two subtask; wherein the category two subtasks are subtasks other than the category one subtasks; the second preset difference threshold is greater than the first preset difference threshold; according to the scheduling durations corresponding to each category two subtask and the corresponding correlation degree, selecting a supplementary scheduling subtask from each category two subtask; after the scheduling of the scheduled subtask is completed, scheduling each supplementary scheduling subtask.
[0014] In one of the embodiments, for any subtask to be scheduled, if the scheduling of the subtask to be scheduled fails, each subtask to be scheduled is scheduled based on the target scheduling order, including: if the subtask to be scheduled belongs to a first category of subtasks, rescheduling the subtask to be scheduled; if the subtask to be scheduled belongs to a second category of subtasks, giving up scheduling the subtask to be scheduled.
[0015] In a second aspect, the present application also provides a real-time task scheduling device, comprising:
[0016] A task acquisition module, configured to acquire at least two real-time tasks corresponding to the event to be scheduled in response to a task scheduling indication corresponding to the event to be scheduled; wherein the task scheduling indication carries a standard processing time of the corresponding event to be scheduled;
[0017] A response time determination module, used to determine the response time of the event to be scheduled according to the task information of at least two real-time tasks;
[0018] A subtask acquisition module is used to acquire the subtasks corresponding to each real-time task when the response time is longer than the corresponding standard processing time;
[0019] The task scheduling module is used to determine the target scheduling order of each subtask to be scheduled according to the event to be scheduled and the task reference data of each subtask, and schedule each subtask to be scheduled based on the target scheduling order.
[0020] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0021] In response to a task scheduling indication corresponding to the event to be scheduled, obtaining at least two real-time tasks corresponding to the event to be scheduled; wherein the task scheduling indication carries a standard processing time of the corresponding event to be scheduled;
[0022] Determine the response time of the event to be scheduled according to the task information of at least two real-time tasks;
[0023] When the response time is longer than the corresponding standard processing time, obtain the subtasks corresponding to each real-time task;
[0024] According to the event to be scheduled and the task reference data of each subtask, the target scheduling order of each subtask to be scheduled is determined, and each subtask to be scheduled is scheduled based on the target scheduling order.
[0025] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0026] In response to a task scheduling indication corresponding to the event to be scheduled, obtaining at least two real-time tasks corresponding to the event to be scheduled; wherein the task scheduling indication carries a standard processing time of the corresponding event to be scheduled;
[0027] Determine the response time of the event to be scheduled according to the task information of at least two real-time tasks;
[0028] When the response time is longer than the corresponding standard processing time, obtain the subtasks corresponding to each real-time task;
[0029] According to the event to be scheduled and the task reference data of each subtask, the target scheduling order of each subtask to be scheduled is determined, and each subtask to be scheduled is scheduled based on the target scheduling order.
[0030] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0031] In response to a task scheduling indication corresponding to the event to be scheduled, obtaining at least two real-time tasks corresponding to the event to be scheduled; wherein the task scheduling indication carries a standard processing time of the corresponding event to be scheduled;
[0032] Determine the response time of the event to be scheduled according to the task information of at least two real-time tasks;
[0033] When the response time is longer than the corresponding standard processing time, obtain the subtasks corresponding to each real-time task;
[0034] According to the event to be scheduled and the task reference data of each subtask, the target scheduling order of each subtask to be scheduled is determined, and each subtask to be scheduled is scheduled based on the target scheduling order.
[0035] In the above-mentioned real-time task scheduling method, device, equipment, storage medium and program product, the real-time task scheduling system responds to the task scheduling indication corresponding to the event to be scheduled, obtains at least two real-time tasks corresponding to the event to be scheduled, determines the response time of the event to be scheduled according to the task information of at least two real-time tasks, and obtains the subtasks corresponding to each real-time task when the response time is longer than the corresponding standard processing time. Then, according to the event to be scheduled and the task reference data of each subtask, the target scheduling order of each subtask to be scheduled is determined, and each subtask to be scheduled is scheduled based on the target scheduling order. That is to say, if the response time of the event to be scheduled is longer than the corresponding standard processing time, the above-mentioned real-time task scheduling method will not schedule all real-time tasks, but will use some subtasks corresponding to the real-time task as the subtasks to be scheduled, reduce the task scheduling requirements, and thus ensure the completion of the scheduling of the event to be scheduled. Further, after determining the subtasks to be scheduled, scheduling is also performed based on the target scheduling order. Since the target scheduling order is determined based on the event to be scheduled and the task reference data of each subtask, the target scheduling order will be more matched with the event to be scheduled. That is to say, the above real-time task scheduling method schedules each subtask to be scheduled based on the target scheduling order, which can improve the task scheduling efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 An application environment diagram of a real-time task scheduling method provided by this embodiment;
[0038] Figure 2A flowchart of a real-time task scheduling method provided in this embodiment;
[0039] Figure 3 A schematic diagram of a process for determining a target scheduling order provided in this embodiment;
[0040] Figure 4 A schematic diagram of a process for determining a supplementary scheduling subtask provided in this embodiment;
[0041] Figure 5 A flowchart of another real-time task scheduling method provided by this embodiment;
[0042] Figure 6 A flowchart of another real-time task scheduling method provided by this embodiment;
[0043] Figure 7 A structural block diagram of a real-time task scheduling device provided in this embodiment;
[0044] Figure 8 This is a diagram of the internal structure of a computer device provided in this embodiment. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0046] Before introducing the embodiments of the present application, it should be noted that the real-time task scheduling system, for example, the real-time system environment in which the real-time system of aviation equipment is located needs to ensure the logic and time correctness of the real-time task scheduling, and the fault-tolerant scheduling algorithm becomes a key issue. Common real-time task scheduling systems are widely used in aviation equipment measurement and control systems. Commonly used typical real-time task scheduling systems require that the system has a guaranteed task execution time even in the worst case, that is, the time limit for the task event must be met. At the same time, the real-time task scheduling system requires that the system can obtain the correct operating results before the deadline arrives regardless of whether an error occurs. Therefore, the real-time task scheduling method of the real-time task scheduling system must have a certain fault tolerance capability.
[0047] In order to solve this problem, traditional redundant fault-tolerant algorithms usually reserve idle processor time to meet the normal operation and fault-tolerant operation of tasks. However, for real-time task scheduling systems, due to the large amount of real-time tasks during operation, high processor utilization, and many sudden tasks that are difficult to predict, the method of relying solely on reserving idle time often has great limitations. First, reserving too much time will affect the real-time performance of the system. Second, for different types of tasks, the reserved time is often difficult to accurately estimate.
[0048] A large amount of research data shows that in the actual operation of the real-time task scheduling system, in order to fully take into account the real-time performance of the system, in some cases, it is often sufficient to meet the minimum required output. For example, the longer the aircraft radar system detects the target signal, the more accurate the target positioning and identification will be. In some specific cases, due to some reasons, the current complete signal calculation and processing cannot be completed within the time limit. However, since the aircraft does not need the system to complete the identification and processing of all target signals when the flight visibility is good, it only needs to meet the target signal identification required for the normal flight of the aircraft, and the result is acceptable. This processing method that meets the minimum requirements is called inexact calculation. Inexact calculation can save time by appropriately reducing the calculation accuracy of the task, so that the task can obtain basically usable results within the time constraint.
[0049] The embodiment of the present application is aimed at the demand for fault-tolerant scheduling of tasks in an aviation real-time task scheduling system, and proposes a real-time task scheduling method based on the characteristics of the real-time task scheduling system. The method can combine the non-precise computing theory to decompose the real-time task into a mandatory execution part (i.e., the following type 1 subtask) and an optional execution part (i.e., the following type 2 subtask), which can improve the flexibility and fault-tolerant performance of real-time task scheduling, thereby improving the task throughput and resource utilization of the aviation real-time task scheduling system.
[0050] The real-time task scheduling method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the real-time task scheduling system 104 through the network. Specifically, the real-time task scheduling system 104 responds to the task scheduling indication corresponding to the event to be scheduled, and obtains at least two real-time tasks corresponding to the event to be scheduled; wherein the task scheduling indication carries the standard processing time of the corresponding event to be scheduled; the real-time task scheduling system 104 determines the response time of the event to be scheduled according to the task information of at least two real-time tasks; when the response time is greater than the corresponding standard processing time, the real-time task scheduling system 104 obtains the subtasks corresponding to each real-time task; the real-time task scheduling system 104 determines the target scheduling order of each subtask to be scheduled according to the event to be scheduled and the task reference data of each subtask, and schedules each subtask to be scheduled based on the target scheduling order. The real-time task scheduling system 104 displays the task scheduling progress on the terminal 102.
[0051] In one embodiment, Figure 2 As shown, a real-time task scheduling method is provided, which is applied to Figure 1 The real-time task scheduling system 104 in the example is used for explanation, and includes the following steps:
[0052] S201 , in response to a task scheduling indication corresponding to an event to be scheduled, obtaining at least two real-time tasks corresponding to the event to be scheduled.
[0053] Among them, the event to be scheduled can be a scheduling service that currently requires the cooperation of the real-time task scheduling system to execute. For example, the event to be scheduled can be an event of detecting a target signal. Usually, an event to be scheduled is composed of at least two real-time tasks. For example, taking the event to be scheduled as detecting a target signal, its corresponding real-time task can be a task of detecting the location of the target signal, detecting the type of the target signal, and detecting the signal strength of the target signal. The task scheduling instruction can be issued by the command center corresponding to the real-time task scheduling system, and is used to instruct the real-time task scheduling system to execute the scheduling task. The task scheduling instruction carries the standard processing time of the corresponding event to be scheduled, and the standard processing time can be used to represent the maximum allowed time limit for processing the event to be scheduled.
[0054] Exemplarily, in this embodiment, when the real-time task scheduling system receives a task scheduling indication corresponding to an event to be scheduled, it extracts the event to be scheduled and obtains at least two real-time tasks corresponding to the event to be scheduled. Optionally, the real-time tasks corresponding to each type of event to be scheduled can be predetermined, and when the event to be scheduled is determined, the corresponding at least two real-time tasks can be directly obtained. Optionally, after determining the event to be scheduled, the event to be scheduled can be analyzed based on a pre-trained event analysis model, thereby obtaining at least two real-time tasks corresponding to the event to be scheduled.
[0055] It should be noted that the embodiments of the present application do not impose any limitations on the construction method and training process of the event analysis model.
[0056] S202: Determine the response time of the event to be scheduled according to the task information of at least two real-time tasks.
[0057] The task information of the real-time task can represent the specific processing operation that needs to be performed by the real-time task. For example, taking the real-time task of locating the target as an example, the corresponding task information includes information such as determining the own position, determining the position of the target, and determining the movement of the target. In other words, the task information of the real-time task can represent the decomposition actions that need to be performed when scheduling the real-time task.
[0058] Exemplarily, different task information may correspond to different response duration intervals. In this embodiment, the response duration interval corresponding to each real-time task may be determined according to the task information of each real-time task, and then the response duration interval of the event to be scheduled may be determined according to the response duration interval of each real-time task. Exemplarily, the middle value of the sum of the response duration intervals of each real-time task may be used as the response duration of the event to be scheduled.
[0059] Exemplarily, the task information of each real-time task can also be input into a pre-trained response time determination model to obtain the response time of the event to be scheduled. It should be noted that the embodiment of the present application does not impose any restrictions on the construction method and training process of the response time determination model.
[0060] S203: When the response time is longer than the corresponding standard processing time, obtain the subtasks corresponding to each real-time task.
[0061] Among them, subtasks can be used to form real-time tasks. It is understandable that for a real-time task, if all subtasks in it are scheduled, the task completion rate and accuracy of the real-time task are relatively high. However, if time does not allow, if only some subtasks of the real-time task are executed, the task scheduling can also be completed, but the difference is that the accuracy may be reduced.
[0062] Specifically, in this embodiment, the response time and the standard processing time are compared, and when the response time is longer than the corresponding standard processing time, the task information of each real-time task is analyzed to obtain the subtasks corresponding to each real-time task. Exemplarily, the task information of each task can be integrated, and different task information can be used as corresponding subtasks. For example, if the task information of a real-time task is to locate the target object, the corresponding subtasks may include a preliminary positioning subtask, a positioning influencing factor determination subtask, and a target positioning subtask.
[0063] It is understandable that if the response time is not greater than the corresponding standard processing time, each real-time task can be directly processed to complete the scheduling of the event to be scheduled.
[0064] S204, determining a target scheduling order of each subtask to be scheduled according to the event to be scheduled and the task reference data of each subtask, and scheduling each subtask to be scheduled based on the target scheduling order.
[0065] The task reference data may be data used to measure the importance of the subtasks. For example, it may be the priority corresponding to each subtask that has been predetermined, or it may be the task type corresponding to each subtask. There is no limitation on this. The subtask to be scheduled may be a subtask that needs to be scheduled. The target scheduling order may be used to characterize the scheduling order of each subtask to be scheduled.
[0066] Exemplarily, in this embodiment, the task reference data of the events to be scheduled and each subtask can be input into a pre-trained target scheduling order determination model to obtain the target scheduling order of each subtask to be scheduled, and then each subtask to be scheduled can be scheduled based on the target scheduling order.
[0067] Exemplarily, in this embodiment, the task reference data of each subtask can be analyzed to determine the degree of influence of each subtask on the scheduling event, and the subtasks whose degree of influence is greater than the degree threshold are treated as subtasks to be scheduled, and the target scheduling order of each subtask to be scheduled is determined based on the degree of influence of each subtask to be scheduled, and then each subtask to be scheduled is scheduled based on the target scheduling order.
[0068] In the above-mentioned real-time task scheduling method, the real-time task scheduling system responds to the task scheduling indication corresponding to the event to be scheduled, obtains at least two real-time tasks corresponding to the event to be scheduled, determines the response time of the event to be scheduled according to the task information of the at least two real-time tasks, and obtains the subtasks corresponding to each real-time task when the response time is longer than the corresponding standard processing time. Then, according to the event to be scheduled and the task reference data of each subtask, the target scheduling order of each subtask to be scheduled is determined, and each subtask to be scheduled is scheduled based on the target scheduling order. That is to say, if the response time of the event to be scheduled is longer than the corresponding standard processing time, the above-mentioned real-time task scheduling method will not schedule all real-time tasks, but will use some subtasks corresponding to the real-time task as the subtasks to be scheduled, reduce the task scheduling requirements, and thus ensure the completion of the scheduling of the event to be scheduled. Further, after determining the subtasks to be scheduled, scheduling is also performed based on the target scheduling order. Since the target scheduling order is determined based on the event to be scheduled and the task reference data of each subtask, the target scheduling order will be more matched with the event to be scheduled. That is to say, the above real-time task scheduling method schedules each subtask to be scheduled based on the target scheduling order, which can improve the task scheduling efficiency and accuracy.
[0069] On the basis of the above embodiments, in order to further improve the accuracy of the target scheduling order and make the process of determining the target scheduling order more complete, in one embodiment, the task reference data includes task attributes, and accordingly, Figure 3 As shown, according to the event to be scheduled and the task reference data of each subtask, the target scheduling order of each subtask to be scheduled is determined, including:
[0070] S301, determining the operation purpose corresponding to the event to be scheduled.
[0071] Illustratively, in this embodiment, semantic analysis may be performed on the event to be scheduled to obtain keywords corresponding to the event to be scheduled, thereby determining the operation purpose corresponding to the event to be scheduled based on the keywords.
[0072] Exemplarily, after obtaining the event to be scheduled, the description information of the event to be scheduled is extracted to obtain description data, and the event to be scheduled is analyzed to obtain analysis data. The description data is semantically analyzed to obtain keywords of the event to be scheduled, and the analysis results of the keywords in the analysis data are obtained to determine the operation purpose corresponding to the event to be scheduled.
[0073] S302, obtaining the correlation degree between the task attribute of each subtask and the operation purpose, and determining the target scheduling order of each subtask to be scheduled according to different correlation degrees.
[0074] The degree of association may be expressed as association data, for example, in the form of a percentage; or may be expressed as a high or low degree of association, for example, in the form of a strong association, a weak association, or no association, and there is no limitation on this.
[0075] Exemplarily, in this embodiment, the task attributes and operation purpose of each subtask may be input into a pre-trained correlation degree determination model, thereby determining the correlation degree between each to-be-scheduled subtask and the operation purpose.
[0076] Exemplarily, the task attribute can be understood as the task type. In this embodiment, a comparison table of the degree of association between the task attributes of each subtask and different operation purposes can be pre-built. For each subtask, the comparison table can be queried to determine the degree of association between the task attribute of the subtask and the operation purpose. The task attribute can also be understood as the task priority. In this embodiment, it can also be determined that the subtask with a high task priority has a high degree of association with the operation purpose. Optionally, the task priority can be used as the degree of association between it and the operation purpose.
[0077] The target scheduling order includes each subtask to be scheduled and the scheduling order of each subtask to be scheduled. Accordingly, this embodiment can treat the subtasks corresponding to the degree of association greater than the preset degree of association threshold as a class of subtasks; if the sum of the scheduling durations of each class of subtasks is less than the standard processing duration, and the difference between the sum and the standard processing duration is less than the first preset difference threshold, then at least one subtask to be scheduled is selected from each class of subtasks according to the scheduling duration and the corresponding degree of association corresponding to each class of subtasks; and the scheduling order of each subtask to be scheduled is determined according to the degree of association of each subtask to be scheduled.
[0078] Among them, a class of subtasks can be understood as mandatory subtasks. The first preset difference threshold can be a predetermined fault tolerance time. Exemplarily, in this embodiment, based on the preset correlation degree threshold and the correlation degree between each subtask and the operation purpose, a class of subtasks is selected from each subtask, and based on the scheduling duration of each class of subtasks, the sum of the scheduling durations of each class of subtasks is determined. If the sum of the scheduling durations of each class of subtasks is less than the standard processing duration, and the difference between the sum and the standard processing duration is less than the first preset difference threshold, then at least one subtask with a low correlation degree, such as the lowest, is eliminated from the class of subtasks, and when the difference between the sum of the scheduling durations of the class of subtasks after elimination and the standard processing duration is not less than the first preset difference threshold, the remaining class of subtasks is used as the subtasks to be scheduled. And according to the correlation degree of each subtask to be scheduled, they are arranged in order from high to low as the scheduling order of each subtask to be scheduled.
[0079] It is understandable that in the process of scheduling each subtask to be scheduled, if there is still remaining response time after the scheduling of each subtask to be scheduled is completed, and the remaining response time is not less than the response time of a subtask, then other subtasks will continue to be scheduled. If there is remaining response time, but the remaining response time is less than the response time of any subtask, other subtasks will not be scheduled. It should be noted that in the process of continuing to schedule other subtasks, one type of subtask is preferentially selected for scheduling. For example, if the remaining response time is 5 time units, if there is a certain type of subtask with a response time of 5 time units, and there is another subtask (such as the following two types of subtasks) with a response time of 5 time units, then the subtask of this type will be scheduled. If the shortest response time of each subtask is 6 time units, other subtasks will not be scheduled.
[0080] If the sum of the scheduling durations of each type of subtask is less than the standard processing duration, and the difference between the sum and the standard processing duration is not less than a first preset difference threshold, each type of subtask will be treated as a subtask to be scheduled, and the scheduling order of each subtask to be scheduled will be determined based on the corresponding degree of correlation.
[0081] In the above embodiment, the target scheduling order of each subtask to be scheduled is determined according to the degree of association between the task attributes of each subtask and the operation purpose, so that the process of determining the target scheduling order is more reliable and the target scheduling order is more matched with the event to be scheduled.
[0082] On the basis of the above embodiments, further, if the sum of the scheduling durations of each type of subtask is less than the standard processing duration, and the difference between the sum and the standard processing duration is greater than a second preset difference threshold, wherein the second preset difference threshold may be a predetermined difference that can execute two types of subtasks. Figure 4As shown, the real-time task scheduling method provided in the embodiment of the present application can perform the following steps:
[0083] S401, obtaining the scheduling duration corresponding to each second-category subtask.
[0084] The second type of subtasks are subtasks other than the first type of subtasks. The second type of subtasks can be understood as optional subtasks.
[0085] S402 , selecting a supplementary scheduling subtask from each of the second-category subtasks according to the scheduling duration and the corresponding correlation degree corresponding to each of the second-category subtasks.
[0086] The supplementary scheduling subtask may be a second type of subtask capable of performing task scheduling.
[0087] Exemplarily, in this embodiment, the second category subtasks are sorted according to their corresponding correlation levels, and the second category subtasks with higher correlation levels, such as the highest, and whose scheduling duration does not exceed the second preset difference threshold are used as supplementary scheduling subtasks.
[0088] Exemplarily, in this embodiment, the difference between the second preset difference threshold and the first preset difference threshold may also be determined, and the second-category subtasks whose scheduling duration is less than the difference among the second-category subtasks are taken as candidate supplementary scheduling subtasks, and at least one of the candidate supplementary scheduling subtasks with a higher degree of association, such as the highest, is taken as a supplementary scheduling subtask. It is understandable that if the difference is 5 time units, the maximum sum of the scheduling durations of the supplementary scheduling subtasks is 5 time units.
[0089] It should be noted that the embodiment of the present application does not limit the number of supplementary scheduling subtasks, which may be one, multiple, or none.
[0090] S403, after the scheduling of the subtask to be scheduled is completed, scheduling each supplementary scheduling subtask.
[0091] In the above embodiment, a situation is given where all the first-class subtasks can be scheduled and completed within the standard processing time, and there is still excess scheduling time. In this case, the second-class subtasks that are highly associated with the event to be scheduled and allowed by the scheduling time can be selected from the second-class subtasks as supplementary scheduling subtasks, and after the scheduling of the subtasks to be scheduled is completed, each supplementary scheduling subtask is scheduled. This allows the real-time task scheduling method of the embodiment of the present application to complete as many task scheduling operations as possible within the limited task scheduling time.
[0092] On the basis of the above embodiments, further, if in the process of scheduling the subtask to be scheduled, there is a situation where the scheduling of the subtask to be scheduled fails, the embodiment of the present application also provides a real-time task scheduling method, such as Figure 5 As shown, it includes the following steps:
[0093] S501, determining the subtask type of the to-be-scheduled subtask that has failed in scheduling.
[0094] Illustratively, in this embodiment, each to-be-scheduled subtask carries a corresponding subtask type identifier, and the subtask type of the to-be-scheduled subtask that fails to be scheduled can be determined based on the subtask type identifier carried by the to-be-scheduled subtask that fails to be scheduled.
[0095] S502: If the subtask to be scheduled belongs to a category of subtasks, reschedule the subtask to be scheduled.
[0096] S503: If the subtask to be scheduled belongs to the second category of subtasks, then the scheduling of the subtask to be scheduled is abandoned.
[0097] In the above embodiment, for a subtask to be scheduled that fails to be scheduled, if its subtask type is a class-one subtask, it is necessary to schedule the subtask to be scheduled to ensure normal scheduling of the event to be scheduled.
[0098] In order to facilitate those skilled in the art to understand the present invention, the real-time task scheduling method provided by the present invention is described in detail. Figure 6 As shown, it includes the following steps:
[0099] S601 , in response to a task scheduling indication corresponding to an event to be scheduled, obtaining at least two real-time tasks corresponding to the event to be scheduled.
[0100] The task scheduling instruction carries the standard processing time of the corresponding event to be scheduled.
[0101] S602: Determine the response time of the event to be scheduled according to the task information of at least two real-time tasks.
[0102] S603: When the response time is longer than the corresponding standard processing time, obtain the subtasks corresponding to each real-time task.
[0103] S604: Determine the operation purpose corresponding to the event to be scheduled.
[0104] S605, obtain the degree of correlation between the task attributes of each subtask and the operation purpose, and regard the subtasks corresponding to the degree of correlation greater than the preset correlation degree threshold as a type of subtask, and when the sum of the scheduling durations of each type of subtask is less than the standard processing duration, perform S606 or S607.
[0105] S606, if the difference between the sum and the standard processing time is less than the first preset difference threshold, then at least one subtask to be scheduled is selected from each type of subtask according to the scheduling time corresponding to each type of subtask and the corresponding correlation degree, and S608 is executed.
[0106] S607, if the difference between the sum and the standard processing time is not less than the first preset difference threshold, each type of subtask is treated as a subtask to be scheduled and S608 is executed.
[0107] S608: Determine the scheduling order of each subtask to be scheduled according to the correlation degree of each subtask to be scheduled, and schedule each subtask to be scheduled based on the target scheduling order.
[0108] S609: If the difference between the sum and the standard processing duration is greater than a second preset difference threshold, the scheduling duration corresponding to each of the second-category subtasks is obtained.
[0109] The second type of subtasks are subtasks other than the first type of subtasks; and the second preset difference threshold is greater than the first preset difference threshold.
[0110] S610 , selecting a supplementary scheduling subtask from each of the second-category subtasks according to the scheduling duration and the corresponding correlation degree corresponding to each of the second-category subtasks.
[0111] S611, after the scheduling of the subtask to be scheduled is completed, each supplementary scheduling subtask is scheduled, and if there is a scheduling failure of the subtask to be scheduled, S612 or S613 is executed.
[0112] S612: If the subtask to be scheduled belongs to a category of subtasks, reschedule the subtask to be scheduled.
[0113] S613: If the subtask to be scheduled belongs to the second category of subtasks, then the scheduling of the subtask to be scheduled is abandoned.
[0114] For example, each real-time task Enforcement (a type of subtask), and an optional execution part (Second type of subtask), and They are and The running time, Only in After completion, the maximum response time After the mandatory execution part is scheduled for the task, the optional execution part is also scheduled, that is, .each The execution is determined by 0 / 1, and only two options are available: complete execution and complete abandonment. That is, for any of the two types of subtasks, the corresponding task scheduling method can only be complete scheduling or no scheduling at all, and there is no situation where part of the task is scheduled.
[0115] It should be noted that in order to ensure that the real-time task scheduling method provided in the embodiment of the present application can achieve single error tolerance while meeting the schedulable conditions, the embodiment of the present application pre-determines the first preset difference threshold and the second preset difference threshold based on manual experience or a large number of experiments to meet the following two conditions: (1) When any scheduling error (or failure) occurs in the scheduling of any subtask to be scheduled, the real-time task scheduling method provided in the embodiment of the present application must ensure that all subtasks to be scheduled are scheduled within the specified time limit; (2) The rescheduling of any subtask to be scheduled cannot cause the scheduling of other subtasks to be scheduled to exceed the time limit.
[0116] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0117] Based on the same inventive concept, the embodiment of the present application also provides a real-time task scheduling device for implementing the real-time task scheduling method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more real-time task scheduling device embodiments provided below can refer to the limitations of the real-time task scheduling method above, and will not be repeated here.
[0118] In one embodiment, Figure 7 As shown, a real-time task scheduling device is provided, including: a task acquisition module 710, a response duration determination module 720, a subtask acquisition module 730 and a task scheduling module 740, wherein:
[0119] The task acquisition module 710 is used to acquire at least two real-time tasks corresponding to the event to be scheduled in response to the task scheduling indication corresponding to the event to be scheduled.
[0120] The task scheduling instruction carries the standard processing time of the corresponding event to be scheduled.
[0121] The response duration determination module 720 is used to determine the response duration of the event to be scheduled according to the task information of at least two real-time tasks.
[0122] The subtask acquisition module 730 is used to acquire the subtask corresponding to each real-time task when the response time is longer than the corresponding standard processing time.
[0123] The task scheduling module 740 is used to determine the target scheduling order of each subtask to be scheduled according to the event to be scheduled and the task reference data of each subtask, and schedule each subtask to be scheduled based on the target scheduling order.
[0124] In one embodiment, the task reference data includes task attributes; accordingly, the task scheduling module includes a purpose determination unit for determining the operation purpose corresponding to the event to be scheduled; a scheduling order determination unit for obtaining the degree of correlation between the task attributes of each subtask and the operation purpose, and determining the target scheduling order of each subtask to be scheduled according to different degrees of correlation.
[0125] In one embodiment, the target scheduling order includes each subtask to be scheduled and the scheduling order of each subtask to be scheduled; accordingly, the scheduling order determination unit includes a subtask category determination subunit, which is used to treat the subtasks corresponding to the degree of association greater than a preset degree of association threshold as a subtask category; a subtask to be scheduled selection subunit, which is used to select at least one subtask to be scheduled from each subtask category according to the scheduling duration and the corresponding degree of association corresponding to each subtask category if the sum of the scheduling durations of each subtask category is less than the standard processing duration, and the difference between the sum and the standard processing duration is less than the first preset difference threshold; a first scheduling order determination subunit, which is used to determine the scheduling order of each subtask to be scheduled according to the degree of association of each subtask to be scheduled.
[0126] In one embodiment, the scheduling order determination unit also includes a second scheduling order determination sub-unit, which is used to treat each type of subtask as a subtask to be scheduled if the sum of the scheduling durations of each type of subtask is less than the standard processing duration, and the difference between the sum and the standard processing duration is not less than a first preset difference threshold, and determine the scheduling order of each subtask to be scheduled based on the corresponding degree of association.
[0127] In one embodiment, the task scheduling module also includes a task scheduling unit, including a scheduling duration determination subunit, which is used to obtain the scheduling duration corresponding to each second-category subtask if the sum of the scheduling durations of each first-category subtask is less than the standard processing duration, and the difference between the sum and the standard processing time is greater than a second preset difference threshold; wherein the second-category subtask is other subtasks except the first-category subtask; the second preset difference threshold is greater than the first preset difference threshold; a supplementary scheduling subtask determination subunit, which is used to select supplementary scheduling subtasks from each second-category subtask according to the scheduling duration corresponding to each second-category subtask and the corresponding correlation degree; a task scheduling subunit, which is used to schedule each supplementary scheduling subtask after the scheduling of the scheduled subtask is completed.
[0128] In one embodiment, for any subtask to be scheduled, if the scheduling of the subtask fails, the task scheduling module includes a rescheduling unit, which is used to reschedule the subtask to be scheduled if the subtask to be scheduled belongs to the first category of subtasks; and an abandoning scheduling unit, which is used to abandon scheduling the subtask to be scheduled if the subtask to be scheduled belongs to the second category of subtasks.
[0129] Each module in the above-mentioned real-time task scheduling device can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0130] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 8As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a real-time task scheduling method is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0131] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0132] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0133] In response to a task scheduling indication corresponding to the event to be scheduled, obtaining at least two real-time tasks corresponding to the event to be scheduled; wherein the task scheduling indication carries a standard processing time of the corresponding event to be scheduled;
[0134] Determine the response time of the event to be scheduled according to the task information of at least two real-time tasks;
[0135] When the response time is longer than the corresponding standard processing time, obtain the subtasks corresponding to each real-time task;
[0136] According to the event to be scheduled and the task reference data of each subtask, the target scheduling order of each subtask to be scheduled is determined, and each subtask to be scheduled is scheduled based on the target scheduling order.
[0137] In one embodiment, when the processor executes the computer program, the following steps are also implemented: determining the operation purpose corresponding to the event to be scheduled; obtaining the degree of correlation between the task attributes of each subtask and the operation purpose, and determining the target scheduling order of each subtask to be scheduled according to different degrees of correlation.
[0138] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the subtasks corresponding to the degree of association greater than the preset degree of association threshold are regarded as a class of subtasks; if the sum of the scheduling durations of each class of subtasks is less than the standard processing duration, and the difference between the sum and the standard processing duration is less than the first preset difference threshold, then at least one subtask to be scheduled is selected from each class of subtasks according to the scheduling duration and the corresponding degree of association corresponding to each class of subtasks; and the scheduling order of each subtask to be scheduled is determined according to the degree of association of each subtask to be scheduled.
[0139] In one embodiment, when the processor executes the computer program, the following steps are also implemented: if the sum of the scheduling durations of each type of subtask is less than the standard processing duration, and the difference between the sum and the standard processing duration is not less than a first preset difference threshold, then each type of subtask is treated as a subtask to be scheduled, and the scheduling order of each subtask to be scheduled is determined based on the corresponding degree of association.
[0140] In one embodiment, the processor also implements the following steps when executing the computer program: if the sum of the scheduling durations of each category one subtask is less than the standard processing duration, and the difference between the sum and the standard processing duration is greater than a second preset difference threshold, then the scheduling duration corresponding to each category two subtask is obtained; wherein the category two subtasks are subtasks other than the category one subtasks; the second preset difference threshold is greater than the first preset difference threshold; according to the scheduling duration corresponding to each category two subtask and the corresponding correlation degree, a supplementary scheduling subtask is selected from each category two subtask; after the scheduling of the scheduled subtask is completed, each supplementary scheduling subtask is scheduled.
[0141] In one embodiment, when the processor executes the computer program, the following steps are further implemented: if the subtask to be scheduled belongs to the first category of subtasks, rescheduling the subtask to be scheduled; if the subtask to be scheduled belongs to the second category of subtasks, giving up scheduling the subtask to be scheduled.
[0142] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0143] In response to a task scheduling indication corresponding to the event to be scheduled, obtaining at least two real-time tasks corresponding to the event to be scheduled; wherein the task scheduling indication carries a standard processing time of the corresponding event to be scheduled;
[0144] Determine the response time of the event to be scheduled according to the task information of at least two real-time tasks;
[0145] When the response time is longer than the corresponding standard processing time, obtain the subtasks corresponding to each real-time task;
[0146] According to the event to be scheduled and the task reference data of each subtask, the target scheduling order of each subtask to be scheduled is determined, and each subtask to be scheduled is scheduled based on the target scheduling order.
[0147] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the operation purpose corresponding to the event to be scheduled; obtaining the degree of correlation between the task attributes of each subtask and the operation purpose, and determining the target scheduling order of each subtask to be scheduled according to different degrees of correlation.
[0148] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: subtasks corresponding to a degree of association greater than a preset degree of association threshold are regarded as a class of subtasks; if the sum of the scheduling durations of each class of subtasks is less than the standard processing duration, and the difference between the sum and the standard processing duration is less than a first preset difference threshold, then at least one subtask to be scheduled is selected from each class of subtasks according to the scheduling duration and the corresponding degree of association corresponding to each class of subtasks; and the scheduling order of each subtask to be scheduled is determined according to the degree of association of each subtask to be scheduled.
[0149] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the sum of the scheduling durations of each type of subtask is less than the standard processing duration, and the difference between the sum and the standard processing duration is not less than a first preset difference threshold, then each type of subtask is treated as a subtask to be scheduled, and the scheduling order of each subtask to be scheduled is determined based on the corresponding degree of association.
[0150] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the sum of the scheduling durations of each category I subtask is less than the standard processing duration, and the difference between the sum and the standard processing duration is greater than a second preset difference threshold, then the scheduling duration corresponding to each category II subtask is obtained; wherein the category II subtasks are subtasks other than the category I subtasks; the second preset difference threshold is greater than the first preset difference threshold; according to the scheduling durations corresponding to each category II subtask and the corresponding correlation degree, a supplementary scheduling subtask is selected from each category II subtask; after the scheduling of the scheduled subtask is completed, each supplementary scheduling subtask is scheduled.
[0151] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the subtask to be scheduled belongs to the first category of subtasks, rescheduling the subtask to be scheduled; if the subtask to be scheduled belongs to the second category of subtasks, giving up scheduling the subtask to be scheduled.
[0152] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0153] In response to a task scheduling indication corresponding to the event to be scheduled, obtaining at least two real-time tasks corresponding to the event to be scheduled; wherein the task scheduling indication carries a standard processing time of the corresponding event to be scheduled;
[0154] Determine the response time of the event to be scheduled according to the task information of at least two real-time tasks;
[0155] When the response time is longer than the corresponding standard processing time, obtain the subtasks corresponding to each real-time task;
[0156] According to the event to be scheduled and the task reference data of each subtask, the target scheduling order of each subtask to be scheduled is determined, and each subtask to be scheduled is scheduled based on the target scheduling order.
[0157] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the operation purpose corresponding to the event to be scheduled; obtaining the degree of correlation between the task attributes of each subtask and the operation purpose, and determining the target scheduling order of each subtask to be scheduled according to different degrees of correlation.
[0158] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: subtasks corresponding to a degree of association greater than a preset degree of association threshold are regarded as a class of subtasks; if the sum of the scheduling durations of each class of subtasks is less than the standard processing duration, and the difference between the sum and the standard processing duration is less than a first preset difference threshold, then at least one subtask to be scheduled is selected from each class of subtasks according to the scheduling duration and the corresponding degree of association corresponding to each class of subtasks; and the scheduling order of each subtask to be scheduled is determined according to the degree of association of each subtask to be scheduled.
[0159] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the sum of the scheduling durations of each type of subtask is less than the standard processing duration, and the difference between the sum and the standard processing duration is not less than a first preset difference threshold, then each type of subtask is treated as a subtask to be scheduled, and the scheduling order of each subtask to be scheduled is determined based on the corresponding degree of association.
[0160] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the sum of the scheduling durations of each category I subtask is less than the standard processing duration, and the difference between the sum and the standard processing duration is greater than a second preset difference threshold, then the scheduling duration corresponding to each category II subtask is obtained; wherein the category II subtasks are subtasks other than the category I subtasks; the second preset difference threshold is greater than the first preset difference threshold; according to the scheduling durations corresponding to each category II subtask and the corresponding correlation degree, a supplementary scheduling subtask is selected from each category II subtask; after the scheduling of the scheduled subtask is completed, each supplementary scheduling subtask is scheduled.
[0161] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the subtask to be scheduled belongs to the first category of subtasks, rescheduling the subtask to be scheduled; if the subtask to be scheduled belongs to the second category of subtasks, giving up scheduling the subtask to be scheduled.
[0162] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0163] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0164] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A real-time task scheduling method, It is characterized in that Applied to a real-time task scheduling system, the method comprises: In response to a task scheduling indication corresponding to the event to be scheduled, obtaining at least two real-time tasks corresponding to the event to be scheduled; wherein the task scheduling indication carries a standard processing time of the corresponding event to be scheduled; Determining the response time of the event to be scheduled according to the task information of the at least two real-time tasks; When the response time is longer than the corresponding standard processing time, obtaining subtasks corresponding to each of the real-time tasks; Determine the operation purpose corresponding to the event to be scheduled; Obtaining the degree of association between the task attributes of each of the subtasks and the operation purpose; The subtasks corresponding to the correlation degree greater than the preset correlation degree threshold are regarded as a type of subtask; If the sum of the scheduling durations of the subtasks of the first category is less than the standard processing duration, and the difference between the sum and the standard processing duration is less than a first preset difference threshold, then at least one subtask to be scheduled is selected from the subtasks of the first category according to the scheduling durations corresponding to the subtasks of the first category and the corresponding correlation degrees; Determining a target scheduling order of each of the subtasks to be scheduled according to the correlation degree of each of the subtasks to be scheduled; Each of the subtasks to be scheduled is scheduled based on the target scheduling order.
2. The method according to claim 1, It is characterized in that The method further comprises: If the sum of the scheduling durations of each of the subtasks of the above category is less than the standard processing duration, and the difference between the sum and the standard processing duration is not less than the first preset difference threshold, then each of the subtasks of the above category will be treated as a subtask to be scheduled, and the scheduling order of each of the subtasks to be scheduled will be determined based on the corresponding degree of correlation.
3. The method according to claim 1 or 2, It is characterized in that The method further comprises: If the sum of the scheduling durations of the first-category subtasks is less than the standard processing duration, and the difference between the sum and the standard processing duration is greater than a second preset difference threshold, then the scheduling duration corresponding to each second-category subtask is obtained; wherein the second-category subtasks are subtasks other than the first-category subtasks; and the second preset difference threshold is greater than the first preset difference threshold; Selecting a supplementary scheduling subtask from each of the two categories of subtasks according to the scheduling duration and the corresponding correlation degree corresponding to each of the two categories of subtasks; After the scheduling of the subtasks to be scheduled is completed, each of the supplementary scheduling subtasks is scheduled.
4. The method according to claim 1 or 2, It is characterized in that For any subtask to be scheduled, when the scheduling of the subtask to be scheduled fails, scheduling each subtask to be scheduled based on the target scheduling order includes: If the subtask to be scheduled belongs to a type of subtask, rescheduling the subtask to be scheduled; If the subtask to be scheduled belongs to the second category of subtasks, the scheduling of the subtask to be scheduled is abandoned.
5. The method according to claim 1, It is characterized in that The determining the operation purpose corresponding to the event to be scheduled includes: Perform semantic analysis on the event to be scheduled to obtain keywords corresponding to the event to be scheduled; According to the keyword, an operation purpose corresponding to the event to be scheduled is determined.
6. A real-time task scheduling device, It is characterized in that Configured in a real-time task scheduling system, the device comprises: A task acquisition module, configured to acquire at least two real-time tasks corresponding to the event to be scheduled in response to a task scheduling indication corresponding to the event to be scheduled; wherein the task scheduling indication carries a standard processing time of the corresponding event to be scheduled; A response duration determination module, used to determine the response duration of the event to be scheduled according to the task information of the at least two real-time tasks; A subtask acquisition module, used for acquiring subtasks corresponding to each of the real-time tasks when the response time is longer than the corresponding standard processing time; A task scheduling module is used to determine the operation purpose corresponding to the event to be scheduled; obtain the degree of correlation between the task attributes of each subtask and the operation purpose; regard the subtasks corresponding to the degree of correlation greater than a preset correlation degree threshold as a type of subtask; if the sum of the scheduling durations of each type of subtask is less than the standard processing duration, and the difference between the sum and the standard processing duration is less than a first preset difference threshold, then select at least one subtask to be scheduled from each type of subtask according to the scheduling duration and corresponding degree of correlation corresponding to each type of subtask; determine the target scheduling order of each type of subtask to be scheduled according to the degree of correlation of each type of subtask to be scheduled; and schedule each type of subtask to be scheduled based on the target scheduling order.
7. The real-time task scheduling device according to claim 6, It is characterized in that The task scheduling module also includes a task scheduling unit, and the task scheduling unit includes: The scheduling duration determination subunit is used to obtain the scheduling duration corresponding to each of the second-category subtasks if the sum of the scheduling durations of the first-category subtasks is less than the standard processing duration, and the difference between the sum and the standard processing duration is greater than a second preset difference threshold; wherein the second-category subtasks are subtasks other than the first-category subtasks; and the second preset difference threshold is greater than the first preset difference threshold; The supplementary scheduling subtask determination subunit is used to select the supplementary scheduling subtask from each of the second-category subtasks according to the scheduling duration and the corresponding correlation degree corresponding to each of the second-category subtasks; The task scheduling subunit is used to schedule each supplementary scheduling subtask after the scheduling of the subtask to be scheduled is completed.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
