A resource configuration method and a task scheduling method of a task scheduling model
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SF TECH CO LTD
- Filing Date
- 2024-12-27
- Publication Date
- 2026-06-30
AI Technical Summary
Existing cloud computing resource allocation methods suffer from low resource utilization and inefficient scheduling, leading to resource contention, task backlog, and a conflict between maximizing resource utilization and minimizing business risks.
Through the task scheduling model, based on the service type and dependencies of data services, on-demand scheduling mechanisms, polling scheduling mechanisms, etc. are adopted to determine the orchestration strategy and calculate the resource allocation quota, and dynamically adjust the resource budget to optimize resource allocation.
This improved resource utilization, reduced resource competition and task backlog, and enabled more efficient resource allocation and more reasonable resource budget management.
Smart Images

Figure CN122309048A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of task scheduling technology, specifically to a resource allocation method for a task scheduling model and a task scheduling method. Background Technology
[0002] As enterprises deepen their digital transformation, distributed computing tasks based on big data and their workflows are becoming one of the key ways for enterprises to achieve digital intelligence capabilities. A workflow is a set of data processing tasks that provide data service capabilities to a business application system.
[0003] From the perspective of independent project management and paid operation entities, data processing and workflow services are typically deployed within a certain resource pool. Based on this, efficient deployment and orchestration of workflows are achieved first, followed by elastic scaling.
[0004] Currently, most mainstream cloud service providers offer solutions for workflow deployment and scheduling, employing a dual-check mechanism of scheduled triggering and sequential execution dependencies. However, this management mechanism based on scheduled triggering and sequential execution dependencies has some shortcomings:
[0005] (1) A distributed computing resource pool often involves multiple R&D roles. Each role independently builds and publishes workflows, which will create certain hot periods in the planned execution time, causing resource competition and mutual interference in task execution. Moreover, this is often only realized after the fact, requiring additional intervention measures, which reduces scheduling efficiency.
[0006] (2) To reduce task backlog during peak periods, which can lead to insufficient data computation parallelism, data task execution timeouts, and excessively long waiting times for planned tasks, paying operators need to reserve a significant amount of computing resources to cover unforeseen risks. This creates a conflict between maximizing resource utilization and minimizing business risks. Furthermore, certain projects often require dedicated computing resource pools to ensure the stable operation of their online tasks, but setting up such pools reduces resource utilization.
[0007] In summary, existing cloud computing resource allocation methods suffer from low resource utilization and inefficient scheduling. Summary of the Invention
[0008] In view of this, the present invention provides a resource allocation method for a task scheduling model and a task scheduling method, which solves or improves the technical problems of low resource utilization and low scheduling efficiency in the resource allocation method of cloud computing in the prior art.
[0009] According to a first aspect of the present invention, the present invention provides a resource allocation method for a task scheduling model, comprising:
[0010] Obtain multiple data services corresponding to the task scheduling model;
[0011] The service type of each data service is determined, including: first-level service type, second-level service type, and third-level service type;
[0012] Based on the preset scheduling mechanism corresponding to each service type, the orchestration strategy among multiple data services belonging to the same service type is determined according to the sequential dependency relationship and interface transit dependency relationship among multiple data services belonging to the same service type.
[0013] Based on the preset configuration resources of multiple data services belonging to the same service type and the orchestration strategy among multiple data services belonging to the same service type, the first resource configuration quota corresponding to the first-level service type, the second resource configuration quota corresponding to the second-level service type, and the third resource configuration quota corresponding to the third-level service type are calculated respectively.
[0014] In one embodiment of the present invention, the preset scheduling mechanism corresponding to the first-level service type is an on-demand scheduling mechanism;
[0015] The method of determining the orchestration strategy among multiple data services of the same service type based on the preset scheduling mechanism corresponding to each service level, according to the sequential dependency relationship and interface transit dependency relationship among multiple data services of the same service type, includes:
[0016] Based on the sequential dependency and interface transit dependency of multiple first data services belonging to the first service level, determine the first call chain corresponding to multiple first data services;
[0017] Based on the timeliness guarantee of each first data service and the time dependency relationship of multiple first data services, determine the start-up and running time point corresponding to each first data service;
[0018] Based on the startup and running time of each of the first data services and the first call chain, a first orchestration strategy is determined for multiple first data services.
[0019] In one embodiment of the present invention, the preset scheduling mechanism corresponding to the second-level service is an on-demand scheduling mechanism;
[0020] The method of determining the orchestration strategy among multiple data services of the same service type based on the preset scheduling mechanism corresponding to each service level, according to the sequential dependency relationship and interface transit dependency relationship among multiple data services of the same service type, includes:
[0021] Based on the sequential dependencies and transitive dependencies among multiple data services belonging to the same service level, determine the invocation strategy among these services, including:
[0022] Based on the sequential dependency and interface transit dependency of multiple second data services belonging to the same second service level, determine the second call chain corresponding to multiple second data services;
[0023] Based on the timeliness guarantee of each second data service and the time dependency relationship of multiple second data services, determine the start-up and running time point corresponding to each second data service;
[0024] Based on the startup and running time of each second data service and the second call chain, a second orchestration strategy is determined for multiple first data services.
[0025] In one embodiment of the present invention, the preset scheduling mechanism corresponding to the third-level service is a round-robin scheduling mechanism;
[0026] The method of determining the orchestration strategy among multiple data services of the same service type based on the preset scheduling mechanism corresponding to each service level, according to the sequential dependency relationship and interface transit dependency relationship among multiple data services of the same service type, includes:
[0027] Based on the sequential dependencies and interface transitive dependencies among the multiple third data services, a third call chain among the multiple third data services is determined;
[0028] Based on the polling scheduling mechanism, the third orchestration strategy corresponding to the multiple third data services is determined according to the third call chain.
[0029] In one embodiment of the present invention, the step of calculating the first resource allocation quota corresponding to the first-level service type, the second resource allocation quota corresponding to the second-level service type, and the third resource allocation quota corresponding to the third-level service type based on the preset configuration resources of multiple data services belonging to the same service type and the orchestration strategy among the multiple data services belonging to the same service type includes:
[0030] Based on the first orchestration strategy and the preset configuration resources corresponding to each of the first data services, calculate the first resource configuration quota corresponding to the first level service type;
[0031] Based on the second orchestration strategy and the preset configuration resources corresponding to each second data service, calculate the second resource configuration quota corresponding to the second-level service type;
[0032] Based on the third orchestration strategy and the preset configuration resources corresponding to each third data service, calculate the third resource configuration quota corresponding to the third-level service type.
[0033] In one embodiment of the present invention, the preset configuration resources for each data service are obtained in the following way:
[0034] Obtain the same historical data service as the data service, and determine the preset configuration resources of the data service based on the historical configuration resources of the historical data service.
[0035] In one embodiment of the present invention, the resource allocation method further includes:
[0036] The redundancy limit of the resource pool is calculated based on the resource pool's resource quota, the first resource allocation quota, the second resource allocation quota, and the third resource allocation quota.
[0037] When the redundancy limit is greater than 0, the fourth resource allocation limit is determined as the redundancy limit, wherein the fourth resource allocation limit corresponds to the fourth level service type.
[0038] In one embodiment of the present invention, the first-level service type is an online data service oriented to business needs, and the first resource allocation quota is a mandatory resource quota; the second-level service type is a data service oriented to temporary execution, and the second-level allocation quota is a reserved resource quota; the third-level service type is a basic data service, and the third-level allocation quota is a flexible execution resource quota; the fourth-level service type is a new data service, and the fourth-level allocation quota is a future reserved resource quota.
[0039] In one embodiment of the present invention, the resource allocation method further includes:
[0040] When the redundancy limit is greater than 0, adjust the first resource allocation limit and / or the second resource allocation limit and / or the third resource allocation limit.
[0041] As a second aspect of the present invention, the present invention also provides a task scheduling method, the task scheduling method being based on a task scheduling model, wherein the resource configuration of the task scheduling model is configured by the resource configuration method of the task scheduling model described above.
[0042] The task scheduling method includes:
[0043] Obtain the target data service input by the user, and determine the target task type corresponding to the target data service;
[0044] Obtain the current remaining resource quota limit of the running task scheduling model;
[0045] Based on the target scheduling mechanism corresponding to the target task type, the target orchestration strategy of the target data service is determined according to the execution order dependency and interface transit dependency of the target data service.
[0046] The target data service is scheduled based on the remaining resource quota limit and the target orchestration strategy.
[0047] The resource allocation method for the task scheduling model provided by this invention classifies multiple historical data services based on user input into service types, and sets corresponding preset scheduling mechanisms (e.g., on-demand scheduling or round-robin scheduling) according to service types. An orchestration strategy is determined based on the relationship between multiple data services belonging to the same service type and the preset scheduling mechanism. Then, based on the orchestration strategy and the preset resource allocation for each data service, the resource allocation quota distribution covering the resources required for scheduling at different times within a long-term period corresponding to the same service type is calculated. Finally, the total resource allocation corresponding to the service type is calculated based on the resource allocation quota distribution. This allows for the calculation of the resource allocation quota configured for each service type in the task scheduling model according to the different needs of multiple users, enabling more reasonable measurement of resource quota budgets and effectively guiding more efficient and dynamically adjustable resource budget solutions. Attached Figure Description
[0048] The above and other objects, features, and advantages of the present invention will become more apparent from the more detailed description of the embodiments of the invention in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same parts or steps.
[0049] Figure 1 The diagram shown is a flowchart illustrating a resource allocation method for a task scheduling model according to an embodiment of the present invention.
[0050] Figure 2 The diagram shown is a flowchart illustrating a resource allocation method for a task scheduling model according to another embodiment of the present invention.
[0051] Figure 3 The diagram shown is a flowchart illustrating a resource allocation method for a task scheduling model according to another embodiment of the present invention.
[0052] Figure 4 The diagram shown is a flowchart illustrating a resource allocation method for a task scheduling model according to another embodiment of the present invention.
[0053] Figure 5 The diagram shown is a flowchart of a task scheduling method provided in an embodiment of the present invention.
[0054] Figure 6 The diagram shows the predicted frequency distribution corresponding to the scheduling method described in this invention, which is based on a timed and quantitative scheduling format.
[0055] Figure 7 The diagram shown is a resource distribution diagram when scheduling tasks using the task scheduling fee method described in this invention.
[0056] Figure 8 The diagram shown is a block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0057] In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications (such as up, down, left, right, front, back, top, bottom, etc.) in the embodiments of this invention are only used to explain the relative positional relationships and movement of the components in a specific orientation (as shown in the accompanying drawings). If the specific orientation changes, the directional indication will also change accordingly. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0058] Furthermore, the reference to "embodiment" herein means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0059] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0060] Exemplary resource configuration method
[0061] As a first aspect of the present invention, the present invention provides a resource allocation method for a task scheduling model. Figure 1 The diagram shown is a flowchart illustrating a resource allocation method for a task scheduling model according to an embodiment of the present invention. Figure 1 As shown, a resource allocation method for a task scheduling model includes the following steps:
[0062] S1: Obtain multiple data services corresponding to the task scheduling model;
[0063] Specifically, the task scheduling model is a task scheduling model provided by cloud service providers for multiple users. The task scheduling model may include a data service subscription unit, a data service description unit, a scheduling mechanism determination unit, and an output unit.
[0064] When configuring resources for a task scheduling model, the first step is to collect all possible data services from multiple user inputs.
[0065] Users can input the data services they need (such as the data they want to query) on the data subscription interface of the data subscription system. The data service description unit stores information describing each data service, typically using XML (Extensible Markup Language) for semantic description. Specifically, the information description of a data service generally includes:
[0066] (1) Data (e.g., ticket volume, shipment volume, volume, weight, timeliness, etc.), adapted business processes (e.g., consolidated shipment, loose shipment, site-to-shipment, etc.), data coverage (e.g., Hangzhou North Transit Center, Air Transport Hub Transit Center, Shanghai South Key Center, etc.), subscribed time (daily, hourly, every 10 minutes, 22:00 daily), data distribution protocol (e.g., Kafka message queue, Hive Table storage, MySQL storage, etc.), interface adapted to themes, etc.
[0067] (2) Link dependencies between data services, runtime resource quotas, and timeliness guarantees during execution.
[0068] S2: Determine the service type for each data service. The service types include: Level 1 service type, Level 2 service type, and Level 3 service type.
[0069] The service types for all possible user-input data service needs are categorized, that is, the service type for each data service is determined. Specifically, service types may include:
[0070] (1) First-level service type: Online data services oriented to business needs, that is, data services that are executed normally with input from multiple users, such as test tasks required for daily R&D, or high-priority tasks delivered to the business.
[0071] (2) Second-level service type: Data services for temporary execution, such as temporary query tasks required for daily research and development.
[0072] (3) Third-level service type: basic data services, such as data services corresponding to basic data task execution, such as data dimension table updates, pre-trained model updates, data service indicator monitoring, data quality operation and maintenance, etc.
[0073] (4) Fourth-level service type: Data services that may be added in the future. Data services that may be added in the future are data services that are different from the multiple data services entered by the user in S1.
[0074] S3: Based on the preset scheduling mechanism corresponding to each service type, determine the orchestration strategy among multiple data services belonging to the same service type according to the sequential dependency relationship and interface transit dependency relationship among multiple data services belonging to the same service type;
[0075] Each service level corresponds to a pre-set scheduling mechanism. For example, the data services corresponding to the first and second level service types are for everyday user needs, and their corresponding pre-set scheduling mechanism is an on-demand scheduling mechanism (i.e., scheduling each data service according to the user's input and their needs). Another example is the third level service type, which is basic data services, capable of tolerating execution delays or having flexible execution space. Its corresponding pre-set scheduling mechanism is a round-robin scheduling mechanism, allowing for more reasonable measurement of resource quota budgets and effectively guiding more efficient and dynamically adjusted resource budget solutions. Specifically, round-robin scheduling refers to allocating tasks or requests sequentially to each available processor or server according to the order in the call chain between multiple data services. Each scheduling cycle starts from the current position and proceeds sequentially to the next processor or server until all tasks are allocated or all processors are in use.
[0076] Once the preset scheduling mechanism for each service type is determined, the orchestration strategy among multiple data services belonging to the same service type can be determined based on their sequential dependencies and interface transitive dependencies. For example, there is a first orchestration strategy for multiple data services belonging to the first-level service type, a second orchestration strategy for multiple data services belonging to the second-level service type, and a third orchestration strategy for multiple data services belonging to the third-level service type.
[0077] S4: Based on the preset configuration resources of multiple data services belonging to the same service type and the orchestration strategy among multiple data services belonging to the same service type, calculate the first resource configuration quota corresponding to the first-level service type, the second resource configuration quota corresponding to the second-level service type, and the third resource configuration quota corresponding to the third-level service type.
[0078] Once the service type of each data service is identified and the orchestration strategy for multiple data services belonging to the same service type is determined, the preset configuration resources required for the operation of each data service can be accumulated based on the preset configuration resources of multiple data services belonging to the same service type and the orchestration strategy among multiple data services. This results in a resource allocation quota distribution that covers the resources that need to be scheduled for the same service type at different computing times over a long period. Then, the corresponding resource allocation quota is calculated based on the resource allocation quota distribution.
[0079] For example, based on the orchestration strategy of multiple data services of the first-level service type and the preset configuration resources, a first resource allocation quota distribution of resources that need to be scheduled for data services that meet business needs at different computing times within a long period can be obtained. The total resource allocation corresponding to the first-level service type, i.e., the first resource allocation quota, is calculated based on the first resource allocation quota distribution.
[0080] Once the resource allocation quota for each service type is determined, a total quota distribution covering different times within a long-term period can be obtained.
[0081] The resource allocation method for the task scheduling model provided by this invention classifies multiple historical data services based on user input into service types, and sets corresponding preset scheduling mechanisms (e.g., on-demand scheduling or round-robin scheduling) according to service types. An orchestration strategy is determined based on the relationship between multiple data services belonging to the same service type and the preset scheduling mechanism. Then, based on the orchestration strategy and the preset resource allocation for each data service, the resource allocation quota distribution covering the resources required for scheduling at different times within a long-term period corresponding to the same service type is calculated. Finally, the total resource allocation corresponding to the service type is calculated based on the resource allocation quota distribution. This allows for the calculation of the resource allocation quota configured for each service type in the task scheduling model according to the different needs of multiple users, enabling more reasonable measurement of resource quota budgets and effectively guiding more efficient and dynamically adjustable resource budget solutions.
[0082] Once the resource configuration of the task scheduling model is complete, task scheduling can be performed using the model. This involves using a corresponding scheduling mechanism to schedule the target data services input by multiple users, based on the target data services and their corresponding service types. This allows for dynamic allocation of computing resources according to actual user needs, enabling on-demand computing and minimizing resource utilization. Furthermore, rational resource allocation can satisfy the business demands of multiple parties with fewer computing resources, achieving cost reduction and efficiency improvement. Dynamic allocation of currently participating data services in the polling schedule can also ensure seamless execution between tasks, avoiding resource idleness that can easily occur with conventional timed scheduling and direct scheduling, thereby maximizing stable resource utilization over a period of time.
[0083] In one embodiment of the present invention, such as Figures 2-4 As shown, the default scheduling mechanism for the first-level service type is an on-demand scheduling mechanism; that is, scheduling is performed according to user needs (including data needs and timeliness needs). At this time, S3 (based on the default scheduling mechanism corresponding to each service level, determining the orchestration strategy among multiple data services belonging to the same service type according to the sequential dependencies and interface transit dependencies between multiple data services belonging to the same service type) specifically includes the following steps:
[0084] S31: Determine the first call chain corresponding to multiple first data services based on the sequential dependency relationship and interface transit dependency relationship of multiple first data services that belong to the first service level;
[0085] The information description corresponding to data services with multiple user inputs can determine the service type of the data service. The first data service is the service type selected from multiple data services and is classified as the first service level data service.
[0086] Since the first data service is classified as a first service level, and this first service level refers to online data services oriented towards business needs—that is, data services that are executed normally based on multiple user inputs, such as test tasks required for daily R&D or high-priority tasks delivered to the business—there are certain time dependencies, execution order dependencies, and interface transitive dependencies among the multiple first data services. Execution order dependencies and interface transitive dependencies are generally rigid dependencies; therefore, the first call chain among the multiple first data services can be determined based on their sequential dependencies and interface transitive dependencies.
[0087] S32: Determine the start-up and running time point corresponding to each first data service based on the time guarantee of each first data service and the time dependency relationship of multiple first data services;
[0088] The timeliness guarantee for each primary data service can also be obtained from the information description of the primary data service. From the timeliness guarantee of each primary data service and the time dependencies between multiple primary data services, the start-up and running time of each primary data service can be determined.
[0089] S33: Determine the first orchestration strategy corresponding to multiple first data services based on the startup and running time of each first data service and the first call chain.
[0090] Once the first call chain of multiple first data services and the startup time of each first data service are determined, the first orchestration strategy among the multiple first data services can be determined based on the first call chain of multiple first data services and the startup time of each first data service.
[0091] Since the first data service is a business-oriented data service, multiple first data services are orchestrated based on user input requirements (such as timeliness guarantees).
[0092] Correspondingly, S4 (calculating the first resource allocation quota for the first-level service type, the second resource allocation quota for the second-level service type, and the third resource allocation quota for the third-level service type based on the preset configuration resources of multiple data services belonging to the same service type and the orchestration strategy among multiple data services belonging to the same service type) specifically includes the following steps:
[0093] S41: Calculate the first resource configuration quota corresponding to the first-level service type based on the first orchestration strategy and the preset configuration resources corresponding to each first data service;
[0094] In other words, the on-demand scheduling mechanism should allocate the first resource allocation quota to the first-level service type.
[0095] Similarly, the default scheduling mechanism for the second-level service is an on-demand scheduling mechanism; S3 (based on the default scheduling mechanism corresponding to each service level, and according to the sequential dependencies and interface transit dependencies between multiple data services belonging to the same service type, determining the orchestration strategy between multiple data services belonging to the same service type) specifically includes the following steps:
[0096] S34: Determine the second call chain corresponding to multiple second data services based on the sequential dependency relationship and interface transit dependency relationship of multiple second data services that belong to the same second service level;
[0097] S35: Determine the start-up and running time point for each second data service based on the time guarantee of each second data service and the time dependency relationship of multiple second data services;
[0098] S36: Determine the second orchestration strategy corresponding to multiple first data services based on the startup and running time of each second data service and the second call chain.
[0099] Correspondingly, S4 specifically includes the following steps:
[0100] S42: Calculate the second resource configuration quota corresponding to the second-level service type based on the second orchestration strategy and the preset configuration resources corresponding to each second data service.
[0101] In other words, the on-demand scheduling mechanism should allocate the second resource allocation quota to the second-level service type.
[0102] Similarly, the default scheduling mechanism for the third-level service is a round-robin scheduling mechanism. In this case, S3 (based on the default scheduling mechanism corresponding to each service level, determining the orchestration strategy among multiple data services belonging to the same service type according to their sequential dependencies and interface transitive dependencies) specifically includes the following steps:
[0103] S37: Determine the third call chain among multiple third data services based on the sequential dependency relationship and interface transit dependency relationship among multiple third data services;
[0104] The third-party data service is a foundational service. While its dependencies on execution order and interface transitivity are rigid, its time-dependent constraints are flexible, meaning offline batch processing tasks have a time tolerance. Taking pre-trained model tasks as an example, they typically tolerate a model completing stable updates over a relatively long period (one or more days), and are not sensitive to the exact start time of specific running instances. However, pre-trained model tasks often involve training datasets in the hundreds of millions, requiring significant resource allocation during runtime. If a timed and quantitative scheduling method is used, uncontrollable resource congestion can often occur during collaborative development by multiple developers due to concentrated start times.
[0105] S38: Based on the polling scheduling mechanism, determine the third orchestration strategy corresponding to multiple third data services according to the third call chain.
[0106] Correspondingly, S4 specifically includes the following steps:
[0107] S43: Calculate the third resource configuration quota corresponding to the third-level service type based on the third orchestration strategy and the preset configuration resources corresponding to each third data service.
[0108] For third-level data services whose service type is based on basic data, the third orchestration strategy among multiple third-level data services can be directly determined based on the third call chain between third-level data services and the round-robin scheduling mechanism. In other words, the third resource allocation quota that should be given to the third-level service type is determined according to the round-robin scheduling mechanism.
[0109] This invention configures different scheduling mechanisms based on the service type of different data services when configuring resources in the task scheduling model, and determines different resource allocation quotas based on the scheduling mechanisms. This not only allows for resource optimization during the production process, but also enables resource budget assessments closely aligned with actual business needs. It also clarifies the necessity of resource scheduling optimization on the platform side, thereby supporting independent project management and paid operating entities to better measure reasonable resource allocations based on business understanding, avoiding trend-based expansion. Furthermore, the rolling polling scheduling mechanism for basic data services can accommodate the impact of such occasional dynamic adjustments, maximizing overall resource utilization while minimizing dynamic redundancy.
[0110] Optionally, the specific method for determining the preset configuration resources for each data service mentioned in S41, S42, and S43 can be as follows:
[0111] (1) Obtain the historical tasks that are the same as the data service, and determine the task configuration quota of the data service based on the historical task allocation quota of the historical tasks. Specifically, the historical task allocation quota of multiple historical tasks that are the same as the data service within the historical period can be selected, and then the average value of the allocation quota of multiple historical tasks can be calculated, and the average value can be used as the task configuration quota of the data service.
[0112] Once the task configuration quota for each data service is calculated, the first resource configuration quota for the first-level service type, the second resource configuration quota for the second-level service type, and the third resource configuration quota for the third-level service type can be calculated. This represents the maximum resource requirement quota occupied by multiple data services belonging to the same service type when running in parallel.
[0113] In one embodiment of the present invention, the resource allocation method of the task scheduling model further includes the following steps:
[0114] S43: Calculate the redundancy limit of the resource pool based on the resource pool's resource limit, the first resource allocation limit, the second resource allocation limit, and the third resource allocation limit.
[0115] S44: When the redundancy quota is greater than 0, the fourth resource allocation quota is determined as the redundancy quota, where the fourth resource allocation quota corresponds to the fourth level service type.
[0116] After allocating the resource quotas for the first, second, and third service types, if there is any remaining redundancy based on the resource pool's resource quota, this redundancy can be used as the fourth service type to support future data services. This allows for a more reasonable explanation of the future resource budget increments, thereby further improving control over resource budgets and avoiding scaling up based on trends.
[0117] In one embodiment of the present invention, the resource allocation method of the task scheduling model further includes the following steps:
[0118] S45: When the redundancy limit is greater than 0, adjust the first resource allocation limit and / or the second resource allocation limit and / or the third resource allocation limit.
[0119] After allocating the resource quotas for the first, second, and third service types, if there is any remaining redundancy based on the resource pool's resource quota, this redundancy can be used as the allocation quota for the fourth service type. Additionally, the first and / or second resource allocation quotas can be adjusted to rearrange the work plan until the redundancy is close to zero. This allows for a more accurate assessment of the project's current reasonable resource allocation, and enables qualitative and quantitative evaluation of the incremental resource quotas for on-demand scheduling, the incremental resource quotas for temporary tasks required by the team's R&D, the incremental quotas for polling-based task scheduling, and the redundancy with limited fault tolerance.
[0120] Exemplary scheduling method
[0121] As a second aspect of the invention, the invention also provides a task scheduling method, such as... Figure 5 As shown, the resources of the task scheduling model on which the task scheduling method is based are configured by the resource configuration method of the task scheduling model described above; that is, once the resource configuration of the task scheduling model is completed, the task scheduling model can be used to execute the scheduling task.
[0122] like Figure 5 As shown, the task scheduling method includes the following steps:
[0123] S101: Obtain the target data service input by the user and determine the target task type corresponding to the target data service;
[0124] The target task type can be the first-level service type, second-level service type, or third-level service type mentioned above. The data services corresponding to each service type are as described above and will not be repeated here.
[0125] S102: Get the current remaining resource quota limit of the running task scheduling model;
[0126] Since each service level has a corresponding resource allocation quota (configured using the resource allocation method described above), the remaining resource quota for each service level can be calculated separately when calculating the current upper limit of remaining resource quota. For example, the first remaining resource quota for the first-level service type can be calculated based on the used resources and the corresponding first resource allocation quota of the currently running first-level service type. Similarly, the second remaining resource quota for the second-level service type and the third remaining resource quota for the third-level service type can be calculated.
[0127] S103: Based on the target scheduling mechanism corresponding to the target task type, determine the target orchestration strategy for the target data service according to the execution order dependency and interface transit dependency of the target data service;
[0128] Specifically, the corresponding target scheduling mechanism can be determined based on the target task type. For example, the target task type can be the first-level service type, the second-level service type, and the third-level service type mentioned above. The scheduling mechanism corresponding to the first-level service type and the second-level service type is an on-demand scheduling mechanism. The scheduling mechanism corresponding to the third-level service type is a round-robin scheduling mechanism.
[0129] The target orchestration strategy for the target data service can be determined based on the target scheduling mechanism, the execution order dependency of the target data service, and the interface transit dependency.
[0130] Similarly, since there may be multiple target data services for multi-user input, and the service types of these multiple target data services may also be different, different target orchestration strategies can be formulated according to the target task types of different service types.
[0131] S104: Schedule target data services based on the remaining resource quota limit and target orchestration strategy.
[0132] Specifically, if the target data service has different service types, the target orchestration strategy will also have different target orchestration strategies. When scheduling the target data service, the target data service with the first-level service type will be scheduled first (on-demand scheduling), then the target data service with the second-level service type will be scheduled (on-demand scheduling), and finally the target data service with the third-level service type will be scheduled (round-robin scheduling).
[0133] Once the resource configuration of the task scheduling model is complete, task scheduling can be performed using the model. This involves using a corresponding scheduling mechanism to schedule the target data services input by multiple users, based on the target data services and their corresponding service types. This allows for dynamic allocation of computing resources according to actual user needs, enabling on-demand computing and minimizing resource utilization. Furthermore, rational resource allocation can satisfy the business demands of multiple parties with fewer computing resources, achieving cost reduction and efficiency improvement. Dynamic allocation of currently participating data services in the polling schedule can also ensure seamless execution between tasks, avoiding resource idleness that can easily occur with conventional timed scheduling and direct scheduling, thereby maximizing stable resource utilization over a period of time.
[0134] For example: if the user inputs a service type that is both a first-level service type and a second-level service type for the target data service, then on-demand scheduling will be used.
[0135] Taking logistics operations as an example, the forecast data required for logistics site operations is generated in multiple rounds every day, and the scale of demand also changes from day to day (for example, the average number of bulk cargo batches on July 12, 2023 was 5.5 times and the average number of consolidated cargo batches was 5.0 times, while on July 13, 2023, the average number of bulk cargo batches was 5.3 times and the average number of consolidated cargo batches was 4.9 times). Moreover, given the data collection needs of numerous site operations, if a timed and quantitative scheduling method is adopted (referring to a scheduling method that executes tasks according to a certain quantity or resource usage limit within a specific time interval), it is easy to generate redundant computing costs if relevant forecast data is not needed in certain time periods or under certain circumstances.
[0136] Figure 6 The diagram shows the predicted frequency distribution for scheduling using a timed and quantitative scheduling method and the task scheduling method described in this invention; as shown... Figure 6 As shown, the blue line represents the predicted frequency distribution based on timed and quantitative scheduling, while the orange bars represent the predicted frequency distribution using the task scheduling method described in this invention (on-demand scheduling based on user needs). Figure 6 As shown, the actual production computing power cost is reduced by 20%, and the peak computing parallelism is reduced by 8.3% (144, 132).
[0137] For example, if the user inputs a third-level service type for the target data service, then round-robin scheduling will be used.
[0138] Taking pre-trained model tasks as an example, it's generally acceptable for the model to complete stable updates over a relatively long period (one day or more), and the exact start time of the specific running instance is not critical. However, pre-trained model tasks often involve training datasets in the hundreds of millions, requiring significant resource allocation during runtime. If a timed, fixed-quantity scheduling approach is used, uncontrollable resource congestion can occur during collaborative development due to concentrated start times. Therefore, a round-robin scheduling method is adopted to schedule target data services, locking the current available resource quota limit and dynamically allocating data services currently participating in the round-robin scheduling. This ensures a tightly integrated, seamless execution of tasks, avoiding resource idleness that can easily occur with conventional timed scheduling and direct scheduling, thereby maximizing resource utilization over a stable period. Furthermore, the rolling round-robin scheduling mechanism better accommodates task retries and resource allocation, enhancing the fault tolerance of offline computing tasks.
[0139] Taking logistics operations as an example, there are hundreds of pre-trained model tasks conducted daily at logistics sites across the country. Using traditional timed scheduling, the instance startup time often requires repeated manual adjustments to achieve a relatively balanced state, which also makes it difficult to efficiently utilize computing resources. For training model tasks, by using a rolling polling scheduling mechanism, for 276 training model tasks, the overall time taken for the original model training tasks can be reduced from 24 hours to 6.5 hours in actual online deployment, eliminating the need for additional redundant resource quotas (a 25% reduction).
[0140] For example, if the service type input by the user for the target data service includes first-level service type, second-level service type, and third-level service type, then a combination of on-demand scheduling and round-robin scheduling will be used for scheduling. Figure 7 The diagram shown is a resource distribution diagram when scheduling tasks using the task scheduling fee method described in this invention. Figure 7 As shown, a resource utilization diagram of hybrid orchestration scheduling (including both on-demand scheduling and round-robin scheduling) can be seen.
[0141] In one embodiment of the present invention, the task scheduling method described above is a task scheduling method based on a target service request input by a user. When multiple users simultaneously input multiple target service requests, before S101 (obtaining the target data service input by the user), the task scheduling method of the present invention further includes the following steps:
[0142] S10: Obtain multiple target data services input by users, and then classify and process the multiple target data services.
[0143] Then, the categorized target data services are scheduled according to the scheduling methods described in S101-S104 above. After scheduling the data corresponding to the same type of target data services, the data can be distributed to different users.
[0144] Exemplary electronic devices
[0145] Below, for reference Figure 8 To describe an electronic device according to an embodiment of the present invention.
[0146] Figure 8 The figure shows a structural block diagram of an electronic device according to an embodiment of the present invention.
[0147] like Figure 8 As shown, the electronic device 100 includes one or more processors 110 and memory 120.
[0148] The processor 110 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 100 to perform desired functions.
[0149] The memory 120 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 110 may execute the program instructions to implement the steps and / or other desired functions in the resource allocation method and task scheduling method of the scheduling model of the various embodiments of the present invention described above.
[0150] In one example, the electronic device 100 may also include an input device 130 and an output device 140, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).
[0151] When the electronic device is a standalone device, the input device 130 can be a communication network connector for receiving the acquired input signals from the first device and the second device.
[0152] In addition, the input device 130 may also include, for example, a keyboard, a mouse, etc.
[0153] The output device 140 can output various information to the outside, including determined distance information, direction information, etc. The output device 140 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0154] Of course, for the sake of simplicity, Figure 8 Only some of the components of the electronic device 100 relevant to the present invention are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device 100 may include any other suitable components depending on the specific application.
[0155] This invention provides a computer-readable storage medium storing a computer program. Besides executing the settlement account management method and device described above, embodiments of this invention can also be computer program products, including computer program information. When run by a processor, the computer program information causes the processor to execute steps in the resource allocation method and task scheduling method of the scheduling model according to various embodiments of this invention.
[0156] Computer program products can be written in any combination of one or more programming languages to perform the operations of the embodiments of the present invention. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0157] Furthermore, embodiments of the present invention may also be computer-readable storage media storing computer program information thereon, which, when run by a processor, causes the processor to execute the steps in the resource allocation method and task scheduling method of the scheduling model according to various embodiments of the present invention.
[0158] Computer-readable storage media may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0159] The basic principles of the present invention have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in the present invention are merely examples and not limitations, and should not be considered as essential features of each embodiment of the present invention. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the present invention to the necessity of employing the aforementioned specific details.
[0160] The block diagrams of devices, apparatuses, devices, and systems involved in this invention are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0161] It should also be noted that in the apparatus, device, and method of the present invention, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of the present invention.
Claims
1. A method for resource configuration of a task scheduling model, characterized in that, include: Obtain multiple data services corresponding to the task scheduling model; The service type of each data service is determined, including: first-level service type, second-level service type, and third-level service type; Based on the preset scheduling mechanism corresponding to each service type, the orchestration strategy among multiple data services belonging to the same service type is determined according to the sequential dependency relationship and interface transit dependency relationship among multiple data services belonging to the same service type. Based on the preset configuration resources of multiple data services belonging to the same service type and the orchestration strategy among multiple data services belonging to the same service type, the first resource configuration quota corresponding to the first-level service type, the second resource configuration quota corresponding to the second-level service type, and the third resource configuration quota corresponding to the third-level service type are calculated respectively.
2. The resource configuration method of claim 1, wherein, The default scheduling mechanism for the first-level service type is an on-demand scheduling mechanism; The method of determining the orchestration strategy among multiple data services of the same service type based on the preset scheduling mechanism corresponding to each service level, according to the sequential dependency relationship and interface transit dependency relationship among multiple data services of the same service type, includes: Based on the sequential dependency and interface transit dependency of multiple first data services belonging to the first service level, determine the first call chain corresponding to multiple first data services; Based on the timeliness guarantee of each first data service and the time dependency relationship of multiple first data services, determine the start-up and running time point corresponding to each first data service; Based on the startup and running time of each of the first data services and the first call chain, a first orchestration strategy is determined for multiple first data services.
3. The resource configuration method of claim 2, wherein, The default scheduling mechanism for the second-level service is an on-demand scheduling mechanism; The method of determining the orchestration strategy among multiple data services of the same service type based on the preset scheduling mechanism corresponding to each service level, according to the sequential dependency relationship and interface transit dependency relationship among multiple data services of the same service type, includes: Based on the sequential dependencies and transitive dependencies among multiple data services belonging to the same service level, determine the invocation strategy among these services, including: Based on the sequential dependency and interface transit dependency of multiple second data services belonging to the same second service level, determine the second call chain corresponding to multiple second data services; Based on the timeliness guarantee of each second data service and the time dependency relationship of multiple second data services, determine the start-up and running time point corresponding to each second data service; Based on the startup and running time of each second data service and the second call chain, a second orchestration strategy is determined for multiple first data services.
4. The resource configuration method of claim 3, wherein, The preset scheduling mechanism for the third-level service is a round-robin scheduling mechanism. The method of determining the orchestration strategy among multiple data services of the same service type based on the preset scheduling mechanism corresponding to each service level, according to the sequential dependency relationship and interface transit dependency relationship among multiple data services of the same service type, includes: Based on the sequential dependencies and interface transitive dependencies among the multiple third data services, a third call chain among the multiple third data services is determined; Based on the polling scheduling mechanism, the third orchestration strategy corresponding to the multiple third data services is determined according to the third call chain.
5. The resource allocation method according to claim 4, characterized in that, The step of calculating the first resource allocation quota corresponding to the first-level service type, the second resource allocation quota corresponding to the second-level service type, and the third resource allocation quota corresponding to the third-level service type based on the preset configuration resources of multiple data services belonging to the same service type and the orchestration strategy among the multiple data services belonging to the same service type includes: Based on the first orchestration strategy and the preset configuration resources corresponding to each of the first data services, calculate the first resource configuration quota corresponding to the first level service type; Based on the second orchestration strategy and the preset configuration resources corresponding to each second data service, calculate the second resource configuration quota corresponding to the second-level service type; Based on the third orchestration strategy and the preset configuration resources corresponding to each third data service, calculate the third resource configuration quota corresponding to the third-level service type.
6. The resource allocation method according to claim 5, characterized in that, The default configuration resources for each data service are obtained in the following ways: Obtain the same historical data service as the data service, and determine the preset configuration resources of the data service based on the historical configuration resources of the historical data service.
7. The resource allocation method according to claim 5, characterized in that, Also includes: The redundancy limit of the resource pool is calculated based on the resource pool's resource quota, the first resource allocation quota, the second resource allocation quota, and the third resource allocation quota. When the redundancy limit is greater than 0, the fourth resource allocation limit is determined as the redundancy limit, wherein the fourth resource allocation limit corresponds to the fourth level service type.
8. The resource allocation method according to claim 7, characterized in that, The first-level service type is online data service oriented to business needs, and the first resource allocation quota is the required resource quota; the second-level service type is data service oriented to temporary execution, and the second-level allocation quota is the reserved resource quota; the third-level service type is basic data service, and the third-level allocation quota is the flexible execution resource quota; the fourth-level service type is new data service, and the fourth-level allocation quota is the future reserved resource quota.
9. The resource allocation method according to claim 5, characterized in that, Also includes: When the redundancy limit is greater than 0, adjust the first resource allocation limit and / or the second resource allocation limit and / or the third resource allocation limit.
10. A task scheduling method, characterized in that, The task scheduling method is based on a task scheduling model, and the resource configuration of the task scheduling model is configured by the resource configuration method of the task scheduling model according to any one of claims 1 to 8. The task scheduling method includes: Obtain the target data service input by the user, and determine the target task type corresponding to the target data service; Obtain the current remaining resource quota limit of the running task scheduling model; Based on the target scheduling mechanism corresponding to the target task type, the target orchestration strategy of the target data service is determined according to the execution order dependency and interface transit dependency of the target data service. The target data service is scheduled based on the current remaining resource quota limit and the target orchestration strategy.