Multi-resource scheduling method, device and system and storage medium

By introducing a priority-driven expected allocation unit/allocation band allocation mechanism and adaptive strategy, the problem of stable allocation of high-priority scheduling items in cloud computing is solved, achieving efficient and interpretable multi-resource scheduling, adapting to high-pressure loads and reducing system complexity.

CN121833201APending Publication Date: 2026-04-10叶国达
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
叶国达
Filing Date
2026-01-01
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In cloud computing, microservices, and data-intensive businesses, traditional multi-resource scheduling methods struggle to guarantee the expected mapping and resource isolation of high-priority scheduling items. They also lack support for allocation with reserved quotas and overflow allocation strategies, resulting in high-priority items failing to consistently obtain the expected visible orbital positions.

Method used

A priority-driven expected allocation unit/allocation band allocation mechanism is introduced. Through an interval index structure and an adaptive strategy under multi-dimensional constraints, efficient scheduling is achieved. An interval tree is used for overlapping queries. Combined with the expected allocation band priority adaptive allocation unit selection and conflict scoring formula, the stable allocation of high-priority scheduling items is ensured.

Benefits of technology

It achieves low-complexity online incremental scheduling, avoids full recalculation, improves the hit rate of high-priority scheduling items and SLA interpretability, reduces track jitter and system oscillation, adapts to high-pressure loads, and supports online learning and edge-cloud collaborative optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121833201A_ABST
    Figure CN121833201A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-resource scheduling method, device and system and a storage medium, and relates to the technical field of computer software. Independently maintaining an allocation unit priority queue and an interval index according to a resource dimension, and adopting'priority to expected allocation unit / allocation band 'for mapping and band reservation quota; when a scheduling task is accessed online, interval overlapping query is performed, and candidate allocation units are screened in combination with conditions such as time, resources, priorities, weights, capacity and retention constraints; a self-adaptive allocation unit selection strategy with expected allocation band priority is adopted, self-adaptive preferential allocation selection is carried out in an expected allocation band, when no candidate exists in the band, the candidate overflows to an adjacent allocation band or a new allocation unit, and limited preemptible / delayed is supported in a hard constraint scene; the strategy is updated, online learning and optimization are carried out based on historical conflicts and the band utilization rate, and the method is suitable for time sequence arrangement and visualization of generalized scheduling items while data are efficiently processed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer software, and particularly relates to a multi-resource scheduling method, device and system for generalized scheduling items and supporting priority-driven expected allocation, and a storage medium. BACKGROUND

[0002] In cloud computing, microservices and data-intensive services, generalized scheduling items usually have a clear time interval and are affected by multi-resource and multi-dimensional constraints. Traditional "full sorting + minimum allocation unit allocation" and simple allocation methods based only on time overlap cannot guarantee the expected mapping of "high priority -> low number (or specific allocation band)", lack support for allocation band reservation quota and overflow allocation strategies, and thus high-priority items cannot stably obtain the expected visual track position or resource isolation guarantee. Therefore, a priority-driven expected allocation unit / allocation band allocation mechanism needs to be introduced in multi-resource scheduling, and low complexity and learnability need to be maintained in online incremental and high-concurrency scenarios. SUMMARY

[0003] The present application provides a multi-resource scheduling method, device, system and storage medium to solve the following problems:

[0004] Instantaneous allocation unit allocation when online adding and dynamically adjusting generalized scheduling items, avoiding full recalculation;

[0005] Efficient scheduling under the multi-dimensional constraints of time, resource, priority, weight and capacity;

[0006] Providing logarithmic time conflict query and visual data supply;

[0007] Adaptive strategy and online learning optimization based on historical conflict and load statistics;

[0008] Priority allocation of expected allocation units or allocation bands according to priority, with reservation quota, overflow allocation and optional pre-emptible control.

[0009] The specific scheme provided by the present application is as follows:

[0010] The multi-resource scheduling method comprises the following steps:

[0011] Receiving and verifying generalized scheduling items with at least one attribute of identification, start time, end time, resource identification, capacity, weight, priority, allocation unit number, mutual exclusion group identification, affinity tag, anti-affinity tag, postponable threshold, pre-emptible flag and hard priority threshold;

[0012] Obtain or initialize the resource context according to the resource identifier. The resource context includes an allocation unit priority queue, an interval index structure (preferably implemented as an interval tree) for time interval overlapping queries, the maximum allocation unit number, a concurrency control object, and a "priority to desired allocation unit / allocation band mapping strategy" and "allocation band configuration (including reserved quota and overflow allocation order)".

[0013] Interval overlap query: The interval index structure is used to perform an overlap query on the time interval of the generalized scheduling item to obtain the overlap set of historical generalized scheduling items and record the number of overlaps.

[0014] Determining and reserving the desired band: Based on the mapping strategy, determine the desired allocation band and desired allocation unit, and read the band's reserve and target capacity.

[0015] The candidate allocation units are selected based on the priority of the expected allocation zone. The priority queue of allocation units is traversed within the expected allocation zone to perform multi-dimensional conflict determination and check whether the capacity and reserved quota constraints are met. Qualified units are added to the candidate set. If there are no candidates within the expected allocation zone, the allocation is expanded across zones according to the overflow allocation order to form a candidate set.

[0016] The adaptive allocation unit selection strategy prioritizes the desired allocation band. When candidate allocation units exist, the selection is based on the following order: "Desired allocation band priority → most recent end time ascending order → average conflict rate ascending order → minimum capacity deviation → stability score". When the desired allocation unit is clear, idle, and meets the constraints, it is directly assigned to the desired allocation unit. When no candidate allocation unit exists, it is determined whether it is allowed to create a new allocation unit in the desired allocation band. If allowed, it is created and registered to the desired allocation band. If not allowed, the overflow allocation strategy is used to select a candidate from an adjacent allocation band or to allocate a new allocation unit to the resource. In hard constraint priority scenarios, a low-priority item of the limited preemptible or deferred strategy or a new allocation unit from an adjacent band can be selected.

[0017] The allocation unit is updated and allocated by setting the allocation unit of the generalized scheduling item as the target allocation unit and updating the statistical information of the target allocation unit and the corresponding allocation band, including updating the target allocation unit's recent end time, used capacity, number of tasks, number of conflicts, and reserved use, updating the in-band statistics (in-band utilization, reserved consumption, overflow allocation count) and pushing them into the allocation unit priority queue.

[0018] Interval index insertion and index maintenance: Insert the generalized scheduling item into the interval index structure (when it is an interval tree, update and maintain the maximum end time index of the subtree).

[0019] Conflict scoring and strategies are updated online. Based on the number of overlaps and in-band utilization, resource conflict scores are dynamically calculated and updated using a weighted fusion conflict scoring formula. Allocation units and band statistics are persisted. Sliding window feedback is implemented: when monitored indicators exceed thresholds and persist for one or more statistical windows (including resource conflict scores, band utilization / default rate, overflow allocation rate, priority hit rate, and SLA events), a versioned optimization is triggered within the cooldown period and step size limit: the priority is updated to the desired allocation unit / allocation band mapping strategy and the reserved / overflow allocation configuration, and the target capacity and allocation unit priority queue sorting weight are recalculated; otherwise, the status quo is maintained.

[0020] The output includes the allocation unit number, identifier, allocation type (in-band / overflow allocation / new / preemptible / delayed strategy), and key statistics and visualization markers.

[0021] Furthermore, the aforementioned multi-resource scheduling method,

[0022] The aforementioned interval overlap query includes:

[0023] The preferred implementation of the interval index structure for interval overlap queries is an interval tree: the interval tree consists of multiple interval nodes, and each node includes at least a generalized scheduling item reference, a time interval, a maximum end time of the subtree, and left and right child nodes;

[0024] The query starts from the root node. If the current node's interval overlaps with the target interval, it is added to the result. If the maximum end time of the left subtree is less than the target start time, the left subtree is skipped, and the right subtree is recursively queried until the query is completed.

[0025] The desired allocation priority candidate allocation unit screening includes:

[0026] Multidimensional conflict determination: Overlap is judged under the closed interval or semi-open interval model; when the resource identifiers are the same and the time overlaps, a resource conflict is identified; when there is a time and resource conflict, it is determined whether the same allocation unit is allowed or whether it needs to be forcibly allocated to different allocation units based on the priority threshold. Hard constraints prohibit the same allocation unit, while soft constraints allow the same allocation unit but are included in the conflict statistics; mutual exclusion groups prohibit the overlap of the same allocation unit, and affinity labels can be used as a bonus item for selection.

[0027] Capacity and Band Reservation Constraints: Capacity constraints control that the total capacity of a single allocation unit within the same time window does not exceed the upper limit; within the desired allocation band, a candidate allocation unit can only be selected if the reserved quota or target capacity remaining is satisfied; among the candidate allocation units, high-priority or higher-weight generalized scheduling items are preferentially allocated to their desired allocation band or lower-numbered allocation units.

[0028] The desired allocation priority adaptive allocation unit selection strategy includes:

[0029] Adaptive allocation unit selection: First, selection is made within the desired allocation zone, sorted by the most recent end time in ascending order, average conflict rate in ascending order, minimum capacity deviation, and stability score; if there are no available candidates in the desired allocation zone, selection is made across zones according to the overflow allocation order, and the best candidate is selected according to the above order; when the desired allocation unit is clear and meets the constraints, the allocation unit is selected first.

[0030] Overflow and preemption control: When the quota reserved in the expected allocation band is insufficient and there are hard priority generalized scheduling items, a limited preemption or postponement strategy is enabled to migrate low priority generalized scheduling items to adjacent allocation bands or postpone their execution; when preemption is not enabled, the items are accepted to adjacent allocation bands in the order of overflow allocation and overflow allocation statistics are recorded.

[0031] The weighted fusion conflict score formula for online policy updates is as follows:

[0032]

[0033] in,

[0034] For the updated conflict rating;

[0035] Conflict rating before the update;

[0036] The attenuation coefficient is set within the interval (0, 1);

[0037] For standard The function, the calculation formula is:

[0038]

[0039] The number of overlaps;

[0040] The time decay factor is calculated using the following formula:

[0041]

[0042] in The time decay rate coefficient, For the current time, This refers to the end time of the scheduling item;

[0043] The capacity deviation term is calculated using the following formula:

[0044]

[0045] in This represents the currently used capacity. For the target capacity, Maximum capacity;

[0046] For segmentation The function, the calculation formula is:

[0047]

[0048] in Low conflict threshold;

[0049] The segmentation threshold is used to distinguish between low and high conflict-sensitive intervals, satisfying the following conditions: ;

[0050] This is a high-conflict amplification factor, with a value greater than 1;

[0051] For the stratified weight coefficients, satisfying .

[0052] The present invention also provides a multi-resource scheduling device, characterized in that it includes:

[0053] The scheduling management and execution module is configured to perform the following operations on the client side of the multi-resource scheduling system: based on the resource context (allocation unit priority queue and interval index structure) maintained by the indexing and querying module, it executes generalized scheduling item access, interval overlap query invocation, candidate allocation unit screening and adaptive allocation according to the process of the multi-resource scheduling method, generating a first scheduling result and a first strategy / statistical parameters. The first strategy / statistical parameters include at least the priority to desired allocation unit / allocation band mapping strategy, in-band utilization, resource conflict score, reservation occupancy and target capacity, and sends the first strategy / statistical parameters to the server through the communication interface; at the same time, it receives the second strategy parameters issued by the server, and corrects the local mapping strategy, reservation / overflow allocation configuration, target capacity and allocation unit priority queue sorting weight accordingly, and continues to execute the process of the multi-resource scheduling method;

[0054] The indexing and querying module is configured to build and maintain an interval index structure (preferably an interval tree) and an allocation unit priority queue for time interval overlapping queries on the client side, perform interval overlapping queries, insertion and subtree maximum end time maintenance, and output query hit and load statistics as part of the first strategy / statistical parameters for use by the scheduling management and execution module and the strategy adaptation and online learning module.

[0055] The strategy adaptation and online learning module is configured to maintain the priority-to-expected allocation unit / allocation band mapping strategy and allocation band configuration (including reserved quota and overflow allocation order) on the client side, calculate the average conflict rate, the weighted fusion conflict scoring formula of the multi-resource scheduling method and the in-band utilization, and update the local mapping strategy, reserved / overflow allocation configuration, target capacity and allocation unit priority queue sorting weight after receiving the second strategy parameter from the server; and aggregate the first strategy / statistical parameters of multiple clients on the server side, generate and version the second strategy parameter and distribute it to each client.

[0056] The visualization output and diagnostic module is configured to output structured data for time axis / Gantt chart / conflict relationship diagram, including labels, allocation type (in-band / overflow allocation / new / preemptible / delayed strategy) and key statistics, and annotate the strategy return path (application status of local first strategy / statistical parameters and server second strategy parameters).

[0057] The modules described above work together under the control of the processor to implement at least some or all of the steps of the multi-resource scheduling method.

[0058] The present invention also provides a multi-resource scheduling system, characterized in that the system includes multiple scheduling clients and a scheduling server, each scheduling client being communicatively connected to the scheduling server; each scheduling client is respectively deployed with the multi-resource scheduling device, and the server is configured to aggregate first policy / statistical parameters of each client to generate second policy parameters and distribute them to each client; the system is configured to execute at least some or all of the steps of the multi-resource scheduling method.

[0059] The present invention also provides a computer-readable storage medium storing computer program instructions thereon, characterized in that, when the instructions are executed by a processor of an electronic device, the electronic device:

[0060] On the client side, at least some or all of the steps of the multi-resource scheduling method are executed through the scheduling management and execution module, indexing and querying module, strategy adaptation and online learning module, and visualization output and diagnosis module of the multi-resource scheduling device. The first strategy / statistical parameters of the multi-resource scheduling device are sent to the server, and the second strategy parameters generated by the server are received and applied.

[0061] On the server side, the first policy / statistical parameters of multiple clients are aggregated through the policy adaptation and online learning module, and the second policy parameters are generated and distributed, thereby supporting the client to continuously optimize and execute at least some or all of the steps of the multi-resource scheduling method.

[0062] The advantages of this invention are:

[0063] Low-complexity online incremental scheduling avoids full recalculation: Range indexes and allocation unit priority queues are maintained independently at the resource level, and overlapping queries and insertions in a single access operation have logarithmic complexity (approximately...). This significantly reduces recalculation and waiting overhead during online additions / dynamic adjustments, supporting high-concurrency real-time access;

[0064] Priority-driven expected allocation and SLA interpretability assurance: Establish a mapping from "priority to expected allocation unit / allocation band" and configure reserved quotas within the band to ensure that high-priority items stably fall into low-number or specified allocation bands; output the band identifier and allocation type to improve priority hit rate and SLA interpretability and auditability.

[0065] Multi-dimensional constraints are uniformly decided in one go, reducing rollbacks and achieving load balancing: Time / resource conflicts, priority hard / soft constraints, capacity windows, mutual exclusion / affinity and in-band retention are uniformly handled in the candidate screening stage to avoid multiple subsequent repairs; Combined with the target capacity and capacity deviation minimization strategy, the unit load is evenly distributed while meeting business priorities.

[0066] A tiered elastic mechanism addresses high-pressure loads and ensures critical tasks are carried out by forming an elastic sequence of "priority retention → sequential overflow → controlled new construction → limited preemption / delay". In scenarios with insufficient retention or hard priority, low-priority items are released to release critical bandwidth capacity through controlled migration / delay, and system oscillations are avoided through frequency and scope limits, balancing "priority protection" with overall utilization.

[0067] Adaptive optimization reduces track jitter: A composite sorting of "expected allocation zone priority → most recent end time → average conflict rate → capacity deviation → stability score" is used to reduce track drift and visible jitter.

[0068] Online learning and edge-cloud collaborative parameter tuning, strategy evolution and optimization with load: Online learning is carried out based on sliding window feedback of in-band utilization, weight fusion conflict scoring formula, overflow rate and priority hit rate; under the constraints of cooldown period and step size, the mapping, retention / overflow, sorting weight and target capacity are updated in a versioned manner; client-side rapid decision-making and server-aggregated distribution are combined to balance local efficiency and global consistency.

[0069] Universal Adaptability and Low-Cost Deployment: By using a unified interval model and capacity window, combined with affinity / mutual exclusion, weight and priority configuration, it adapts to a wide range of scheduling scenarios such as workflow orchestration, batch processing, cloud resource scheduling, production / maintenance scheduling, equipment and personnel scheduling, and color-coded scheduling systems, reducing the cost of cross-industry reuse and customization. Attached Figure Description

[0070] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0071] Figure 1 This is a schematic diagram of the method flow of the present invention;

[0072] Figure 2 This is a schematic diagram of one embodiment of the multi-resource scheduling device in this invention. Detailed Implementation

[0073] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0074] Before providing a detailed introduction to the multi-resource scheduling method, apparatus, system, and storage medium provided in the embodiments of the present invention, a brief introduction will be given to the basic concepts, data structures, and core mechanisms involved in the embodiments of the present invention.

[0075] Basic Concepts and Data Structures

[0076] Generalized scheduling items: refer to scene object resources with a clear start and end time interval. Typical entities include jobs, task instances, approval nodes, pipeline stages, equipment / personnel scheduling segments, maintenance work order windows, experiment reservation windows, color scheduling units, etc.

[0077] The attributes of a generalized scheduling item refer to the attributes of the resource scheduling item in this scenario, which mainly include: identifier, start time, end time, resource identifier, capacity, weight, priority, allocation unit number, mutual exclusion group identifier, affinity label, anti-affinity label, deferable threshold, preemptible mark, hard priority threshold, etc.

[0078] Key properties of generalized scheduling items:

[0079] 1. Capacity: The upper limit of resources occupied by a scheduling item within a time window. It is used to control the total amount of resources allocated by a single allocation unit in the same time period to ensure that it does not exceed physical or logical capacity constraints.

[0080] 2. Weight: A numerical attribute of a generalized scheduling item, used to quantify the relative importance, resource consumption intensity, or business value of the scheduling item. Its value is usually a positive integer or a floating-point number, and the specific range is defined by the business scenario. In the allocation decision, the weight serves as a key reference factor that affects the selection priority of candidate allocation units. Items with higher weights will have priority allocation under the same conditions, and the weight also affects the overflow allocation decision and resource conflict determination process.

[0081] 3. Priority: The core attribute driving the expected allocation mechanism, used to determine the relative order and resource acquisition priority of scheduling items in the entire scheduling system. It supports two levels: hard priority and soft priority. Hard priority has a mandatory constraint effect, triggering specific processing mechanisms (such as preemption or delay) when a threshold is reached. Soft priority is only used as a reference indicator, affecting the allocation order but not changing the basic conflict handling rules. Priority is usually represented numerically, with a larger value indicating a higher priority. It is converted into expected allocation units or allocation bands through a mapping strategy to achieve a deterministic association mapping strategy of "priority to expected allocation unit / allocation band".

[0082] 4. Mutual Exclusion Group Identifier: Identifies groups that prohibit overlapping allocation between scheduling items, and prevents items in the same group from being assigned to the same resource unit during the forced conflict determination phase, thus ensuring resource isolation;

[0083] 5. Affinity Tag: An attribute used to describe the positive association between scheduling items, which can improve the priority of candidate allocation units and support resource layout optimization by aggregating allocation by tag;

[0084] 6. Anti-affinity label: Identifies negative association attributes that should be avoided when assigning scheduling items to each other. Candidate assignment units with anti-affinity labels are directly removed during the conflict determination stage.

[0085] 7. Delayable threshold: Defines the latest start time or the longest delay duration that a scheduling item is allowed to be delayed, used for dynamic adjustment constraints in delay strategy scenarios;

[0086] 8. Preemptible flag: A boolean attribute that indicates the ability of a scheduled item to be interrupted by a higher priority item, supporting dynamic resource migration mechanisms in hard priority scenarios;

[0087] 9. Hard priority threshold: The priority threshold that triggers mandatory processing mechanisms (such as preemption and delay). When the priority of a scheduling item reaches this threshold, hard constraint logic will be activated.

[0088] Desired Allocation Unit: The number of a single target allocation unit specified by the scheduling item. It can be directly hit when the constraints are met. This unit belongs to a certain desired allocation zone to improve the determinism of allocation and the accuracy of priority mapping.

[0089] Desired allocation band: The target resource allocation band identifier specified by the scheduling item, consisting of one or more logically related allocation units, used to map high-priority items to a specific band according to priority, and combined with reserved quotas and overflow policies to ensure the stability of resource allocation and SLA interpretability;

[0090] Resource dimension: Divided by resource identifier, allowing one-to-many (one resource allocated to multiple units) and many-to-many (mutually exclusive groups / affinity groups) expansion;

[0091] Interval model: It supports both closed intervals [start, end] and half-open intervals [start, end), which are uniformly set by system parameters to avoid ambiguity;

[0092] Allocation Unit: Allocation Unit Number, Last End Time, Used Capacity, Capacity Limit, Number of Tasks, Number of Conflicts, Average Conflict Rate, Target Capacity, Window Start, Window End, Stability Score (Optional);

[0093] Interval tree nodes: contain the [start, end] of the interval, the maximum end time of the subtree, the left child node, the right child node, the generalized scheduling item reference, and the balance maintenance metadata. Red-black trees or other self-balancing binary search trees are preferred.

[0094] Resource context includes: allocation unit priority queue (a composite sorting of desired allocation band priority → most recent end time → average conflict rate → capacity deviation → stability score), interval tree, maximum allocation unit number, resource conflict score, concurrency control object (read-write lock or compare-and-swap), capacity and statistics window, priority to desired allocation unit / allocation band mapping strategy, allocation band configuration (band identifier → {allocation unit range, retention ratio / absolute value, overflow allocation order}), and in-band statistics (in-band utilization / default rate).

[0095] Multidimensional conflict determination

[0096] 1. Time conflict: Closed intervals overlap.

[0097]

[0098] The overlap of half-open intervals is

[0099]

[0100] 2. Resource conflict: Resource conflicts exist when resources have the same identifier and the time overlaps.

[0101] 3. Priority determination: When time and resource conflicts exist simultaneously, if the priority reaches the hard constraint threshold, the same allocation unit is prohibited; soft constraints allow the same allocation unit but are counted in the conflict statistics.

[0102] 4. Mutual Exclusion / Affinity: Mutual exclusion groups take effect during the screening phase, prohibiting overlap of the same allocation unit that violates mutual exclusion; the affinity label can be used as a bonus for selection.

[0103] Capacity and Statistics Window

[0104] 1. Capacity statistics window: Fixed window (e.g., hour / day) or sliding window [window start, window end], used to count and evaluate the online learning and scoring updates of generalized scheduling items in order to trigger dynamic adjustments to the strategy; tasks outside the window are not included in the used capacity;

[0105] 2. Step size: There must be at least one step's time interval between two strategy adjustments;

[0106] 3. Capacity constraints:

[0107]

[0108] 4. Target capacity: Can be dynamically set based on resource conflict scores and historical load, used to balance the load between distribution units;

[0109] 5. Capacity deviation:

[0110]

[0111] 6. Reserved Quota: Perform reservation checks within the desired allocation band. Within the band:

[0112]

[0113] Online learning and scoring updates

[0114] Weighted fusion conflict scoring formula:

[0115] The weighted fusion conflict score formula for online policy updates is as follows:

[0116]

[0117] in,

[0118] The conflict score of the generalized scheduling item resources after this overlapping event update is used for subsequent optimization of the scheduling decision threshold strategy.

[0119] The conflict score of the generalized scheduling item resource before the update of this overlapping event represents the historical conflict score and historical conflict accumulation of the generalized scheduling item resource, which is smoothly transitioned to the current state through the attenuation coefficient.

[0120] The attenuation coefficient controls the weighting of historical scores and the current event. ;

[0121] For standard The function, the calculation formula is:

[0122]

[0123] This represents the actual number of overlaps between the current scheduling item and historical items, directly reflecting the intensity of resource scheduling conflicts.

[0124] The time decay factor prioritizes reflecting the impact of recent conflicts on the score, and its calculation formula is as follows:

[0125]

[0126] in The time decay rate coefficient controls the intensity of the impact of recent events. For the current time, The time of the scheduling item's end is the time; the closer the time is to the current time, the greater the impact of the conflict.

[0127] This is the capacity deviation term, reflecting the degree of deviation between resource utilization and the target capacity. The calculation formula is:

[0128]

[0129] in The currently used capacity of the allocation unit, The target capacity is set dynamically (generated based on historical load or conflict score). The upper limit of the physical / logical capacity of the allocation unit;

[0130] For segmentation The function, the calculation formula is:

[0131]

[0132] in Low conflict threshold;

[0133] The segmentation threshold is used to distinguish between low and high conflict-sensitive intervals, satisfying the following conditions: ;

[0134] This is a high-conflict amplification factor, used to amplify the scoring gradient of high-conflict portions. ;

[0135] The weighting coefficients for each layer are dynamically adjusted to adapt to business needs and meet requirements. ;

[0136] Allocation unit stability score: Based on the allocation unit replacement frequency and jitter update, it is applied to the adaptive allocation unit selection strategy process that prioritizes the desired allocation band;

[0137] Visualization and diagnostic output

[0138] 1. Output: Resource identifier, allocation unit number, start / end, weight, priority, capacity, conflict flag, window statistics, affinity / mutual exclusion information;

[0139] 2. Supported functions: Supports rendering tracks by allocation unit number, scaling, brushing, and conflict highlighting; provides load heatmap and resource conflict scoring trends.

[0140] Example 1

[0141] This invention provides a multi-resource scheduling method, with reference to Figure 1 In a single-machine real-time scheduling scenario, online incremental scheduling can be achieved on local nodes / edge sides.

[0142] Background: Suitable for local job orchestration on monolithic applications or edge nodes, such as factory field data acquisition and processing, laboratory equipment reservation, local time-sequential execution of government approval workflows, local color-coded scheduling, etc.

[0143] Environment: Java (version 21), a mainstream object-oriented language;

[0144] Data structure: The interval index structure is selected as an interval tree (implemented as a red-black tree), and the "priority to expected allocation unit / allocation band mapping strategy" and "allocation band configuration (including reserved quota and overflow allocation order)" are retained; the allocation unit priority queue is sorted by the composite order of expected allocation band priority → most recent end time → average conflict rate → capacity deviation → stability score.

[0145] Configuration: Attenuation coefficient = 0.85; Window = 60 minutes, Step size = 5 minutes; Capacity limit is 16 / 32 for resource A / B respectively; Interval model is uniformly set to half-open interval [start, end);

[0146] The multi-resource scheduling method includes the following steps:

[0147] Step 1: Receiving and Basic Verification

[0148] Step 11: Receive generalized scheduling items and parse attributes [identifier, start time, end time, resource identifier, weight, capacity, priority, priority category, desired allocation unit (optional), desired allocation band (optional), mutual exclusion / affinity label, deferable threshold, hard priority threshold, preemptible flag];

[0149] Step 12: Verify time and parameters;

[0150] Step 13: Unify time zone and units: Unify time to the resource time zone or UTC; unify capacity and weight units;

[0151] Step 14: Exception Handling

[0152] Step 141: If any verification fails, return allocation type = failure (parameter error), record the audit and end;

[0153] Step 142: If all checks pass, proceed to step 2;

[0154] Step 2: Obtain or initialize the resource context

[0155] Step 21: Locate the fragment by resource identifier and load or create the resource context;

[0156] Step 22: Determine if the resource context exists:

[0157] Step 221: If it does not exist, initialize the allocation unit priority queue, the interval tree for time interval overlapping queries, the maximum allocation unit number = 0, the resource conflict score (initial value), the policy snapshot (priority to expected allocation unit / allocation band mapping), the allocation band configuration (reserved quota and overflow allocation order), the in-band statistics (utilization / default rate / reserved occupancy), the concurrency control object and version number;

[0158] Step 222: If it exists, generate a read-only policy and structure snapshot for this allocation;

[0159] Step 3: Range Index and Overlapping Query Process

[0160] Step 31: Perform an overlap query on the interval [start time, end time] to obtain the overlap set and the number of overlaps;

[0161] Step 32: Construct a forbidden set based on the overlapping set (mutual exclusion groups and hard-constrained prohibited allocation unit references);

[0162] Step 33: Record the query time and scale for score updates and diagnosis;

[0163] Step 4: Determining and retaining the desired allocation band

[0164] Step 41: Calculate the expected allocation band based on the mapping strategy (input is priority, priority category, resource identifier and band statistics); if there is an expected allocation unit and the strategy allows direct matching to the expected allocation unit, record it as a preferred allocation unit;

[0165] Step 42: Read the allocation band configuration: reserved quota, overflow allocation order, target capacity;

[0166] Step 43: Calculation :

[0167] Step 431: If it is a hard reservation and the reservation margin is insufficient, mark it as "requires overflow allocation or preemptive / delayed strategy";

[0168] Step 432: If it is a soft reservation and the reservation margin is insufficient, allow the candidate to be selected and record the reservation default;

[0169] Step 5: Filtering candidate allocation units with priority for desired allocation

[0170] Step 51: Traverse the allocation units within the desired allocation band according to the priority queue order, and perform time / resource / priority conflict determination and capacity / reservation verification;

[0171] Step 52: Add the allocation units that satisfy the constraints and are not in the forbidden set to the candidate set;

[0172] Step 53: Determine if the candidate set is empty:

[0173] Step 531: If not empty, proceed to step 6;

[0174] Step 532: If empty, expand the candidate set across bands according to the overflow allocation order and repeat steps 51 and 52;

[0175] Step 6: Expected Allocation of Adaptive Allocation Units with Priority Selection Strategy

[0176] Step 61: If the candidate set is empty, proceed to step 7;

[0177] Step 62: If the candidate set is not empty, perform the best allocation selection: "expected allocation band priority → most recent end time ascending order → average conflict rate ascending order → minimum capacity deviation → stability score ascending order", and consider affinity bonus;

[0178] Step 63: If the preferred allocation unit is in the candidate set and satisfies all constraints, then the direct allocation hits the desired allocation unit; otherwise, the first-ranked allocation unit is selected.

[0179] Step 7: New creation, preemption, and postponement when candidates are empty

[0180] Step 71: Determine whether creating a new allocation unit in the desired allocation zone is allowed:

[0181] Step 711: If allowed, the maximum allocation unit number is incremented, a new allocation unit is created and used as the target allocation unit;

[0182] Step 712: If not allowed, determine if it is a hard priority and allows limited preemption / delay strategies:

[0183] Step 7121: If allowed, select the migration object (low priority item) to migrate to the adjacent allocation zone or postpone it, release the candidate and return to step 6;

[0184] Step 7122: If not allowed or migration fails, create a new allocation unit in the adjacent allocation zone according to the overflow allocation strategy (if allowed); if it still fails, return the allocation type as failure (constraints cannot be met).

[0185] Step 8: Allocation Unit Update and Allocation

[0186] Step 81: Set the generalized scheduling item allocation unit number and allocation band identifier, and record the allocation type (in-band / overflow allocation / new / preemptible / delayed strategy).

[0187] Step 82: Update the target allocation unit (last end time, used, number of tasks, number of conflicts, reserved occupancy) and allocation band statistics (utilization, default, overflow allocation count);

[0188] Step 83: Push the updated allocation unit into the allocation unit priority queue;

[0189] Step 9: Range Index Insertion and Index Maintenance

[0190] Step 91: Insert the generalized scheduling item interval into the interval tree and maintain the maximum end time of the subtree;

[0191] Step 92: If the insertion fails, roll back the allocation and statistics, and record the reason for the failure;

[0192] Step 10: Resource Conflict Scoring and Strategy Online Update

[0193] Step 101: Calculate the resource conflict score based on the weighted fusion conflict scoring formula, and update the resource conflict score and in-band statistics;

[0194] Step 102: Sliding window feedback. When the resource conflict score, utilization / default rate, overflow allocation rate, priority hit rate, or SLA event exceeds the threshold and continues for at least one statistical window, and the cooldown period and step size limit are met, a versioned optimization is triggered: update the priority to the desired allocation unit / allocation mapping strategy and the reserved / overflow allocation configuration, and recalculate the target capacity and allocation unit priority queue sorting weight; otherwise, maintain the status quo.

[0195] Step 11: Result Return and Audit

[0196] Step 111: Return results: Allocation unit number, allocation band identifier, allocation type, overlap quantity, average conflict rate, capacity deviation, resource conflict score, and visual markers;

[0197] Step 112: Record audit logs: decision path, lock waits, rollback and migration objects, time consumption and complexity.

[0198] Furthermore, step 3 of the multi-resource scheduling method, the interval indexing and overlapping query process, includes the following steps:

[0199] Step 1: Structure Initialization (Maintained independently by resource)

[0200] Step 11: Establish an index structure for each resource for overlapping time interval queries, and use a half-open interval model for the unified interval model;

[0201] Step 12: The interval index structure is an interval tree, implemented as a self-balancing binary search tree (red-black tree). The node fields must include at least: the [start, end] of the interval, the maximum end time of the subtree, the left child node, the right child node, a reference to the generalized scheduling item, and balance maintenance metadata (such as color / height).

[0202] Step 2: Insertion Process

[0203] Step 21: Insert nodes in order of start time, and use balance repair (rotation / coloring or height adjustment);

[0204] Step 22: Maintain the information of each node from bottom to top. ;

[0205] Step 23: Ensure endpoint and time zone consistency;

[0206] Step 3: Overlapping Query Process

[0207] Step 31: Input the target interval and the interval model; traverse from the root node;

[0208] Step 32: Current node overlap determination:

[0209] Step 321: Closed intervals overlap as ;

[0210] Step 322: The half-open intervals overlap as ;

[0211] Step 33: If the overlap is determined to be true, add the current node to the result set;

[0212] Step 34: Left subtree pruning determination:

[0213] Step 341: If If so, then recursively query the left subtree;

[0214] Step 342: If If so, then skip the left subtree;

[0215] Step 35: Recursively search the right subtree until the traversal is complete;

[0216] Step 36: Return the result set and hit count, and record the maximum depth;

[0217] Step 4: Deletion and Update

[0218] Step 41: Deletion using the standard self-balancing tree deletion process and reconstruction of the subtree, maximum end time;

[0219] Step 42: The updated interval uses a "last insertion" method to ensure balance and consistency with the index;

[0220] Step 5: Concurrency Processing

[0221] Step 51: Queries use read locks; inserts, deletes, and updates use write locks; counting or lightweight statistics use atomic operations;

[0222] Furthermore, step 6 of the multi-resource scheduling method, which aims to allocate an adaptive allocation unit selection strategy with priority, includes the following steps:

[0223] Step 1: Input and Target

[0224] Step 11: Input candidate set, generalized scheduling item, desired allocation band and desired allocation unit, sorting weight and policy snapshot;

[0225] Step 2: Determine the candidate size

[0226] Step 21: Determine if the candidate set is empty:

[0227] Step 211: If empty, output the flag "New allocation unit needs to be created or preemptible / delayed strategy needs to be triggered", and return to step 7 in the multi-resource scheduling method;

[0228] Step 212: If not empty, proceed to step 3;

[0229] Step 3: Assign expected allocation with priority filtering and preference direct matching to the expected allocation unit.

[0230] Step 31: Filter and retain candidates within the desired allocation band as the preferred set; if the preferred set is empty, retain cross-band candidates and mark them as overflow allocation paths;

[0231] Step 32: Determine the preference allocation unit:

[0232] Step 321: If the preferred allocation unit is in the candidate set and meets the time / resource / priority, capacity and retention constraints, then the direct allocation hits the desired allocation unit, and the in-band or overflow allocation flag is output;

[0233] Step 322: If the preference allocation unit is not satisfied or does not exist, proceed to step 4;

[0234] Step 4: Stable chain sorting and parallel breaking

[0235] Step 41: Select the effective candidates by prioritizing the following stable chains:

[0236] Step 411: Prioritize the desired allocation band, with priority given to bands within the desired band over cross-bands;

[0237] Step 412: Sort by the most recent end time in ascending order, with earlier ending times having higher priority;

[0238] Step 413: Sort by average conflict rate in ascending order, prioritizing low conflict rates;

[0239] Step 414: The one with the smallest capacity deviation takes priority;

[0240] Step 415: Stability scores are sorted in ascending order, with priority given to those with less jitter;

[0241] Step 416: Prioritize affinity points; if positive affinity exists, move it forward; if negative affinity exists, move it backward.

[0242] Step 42: Break the parallel rule: Assign unit numbers in ascending order;

[0243] Step 5: Output and Consistency

[0244] Step 51: Output target allocation unit and tag (in-band / overflow allocation);

[0245] Step 52: Perform allocation using a consistent snapshot of the strategy and queue, ensuring atomic consistency with step 8 in the multi-resource scheduling method;

[0246] Results: On a dataset of 100,000 intervals, the average query time... 10 milliseconds, insertion time is approximately logarithmic, front-end Gantt chart refresh latency 50 milliseconds.

[0247] This invention encapsulates a multi-resource scheduling method, introducing a priority-driven expected allocation unit / allocation band allocation mechanism into multi-resource scheduling. It maintains low complexity and learning capability even in online incremental and high-concurrency scenarios, and is widely applicable to generalized scheduling scenarios such as workflow orchestration, batch processing, cloud resource scheduling, production / maintenance scheduling, equipment and personnel scheduling, and color-coded scheduling systems, reducing the cost of cross-industry reuse and customization.

[0248] Example 2

[0249] This invention also provides a multi-resource scheduling device to realize multi-region / multi-tenant distributed multi-resource scheduling. The client side executes the multi-resource scheduling method described in Example 1, and the server side aggregates strategies.

[0250] Background: This involves cross-resource and cross-region scheduling for cloud computing and microservice platforms, such as multi-tenant data pipeline orchestration, joint scheduling across cluster GPUs / storage / network bandwidth, and distributed coloring scheduling. It needs to maintain online incremental growth and policy learning capabilities under complex constraints of high-concurrency access, widely distributed resources, and mutually exclusive cross-resources.

[0251] Based on Example 1, the implementation configuration of this example differs from the configuration described in Example 1 mainly in the following ways:

[0252] Sharding: Consistent hashing based on resource identifier; each shard maintains an independent resource context;

[0253] Concurrency: Employs read-write locks Idempotent request number; cross-resource exclusion groups are verified by the coordinator;

[0254] Online learning: When the score is higher than the threshold, the ranking weight of the "most recent end time" is increased and the target capacity is reduced, which promotes the discretization between allocation units;

[0255] refer to Figure 2 The modules of the multi-resource scheduling device include:

[0256] Scheduling management and execution module: On the client side, based on the resource context maintained by the indexing and querying module, the multi-resource scheduling method described in Example 1 is executed to generate a first scheduling result and a first policy / statistical parameters, and the local policy is corrected by receiving the server's second policy parameters;

[0257] Indexing and Query Module: On the client side, it builds and maintains the interval tree and allocation unit priority queue, provides overlapping query and insertion maintenance, and outputs hit and load statistics;

[0258] The strategy adaptation and online learning module: On the client side, it maintains the priority to desired allocation unit / allocation band mapping strategy and allocation band configuration, calculates the average conflict rate, resource conflict score and in-band utilization; On the server side, it aggregates the first strategy / statistical parameters of multiple clients, generates the second strategy parameters in a versioned manner and distributes them.

[0259] Visualization output and diagnostic module: Outputs data in timeline / Gantt chart / conflict relationship diagram, labeled with tags, allocation type and strategy feedback path;

[0260] Based on Example 1, the main differences between the implementation steps of this embodiment and the multi-resource scheduling method described in Example 1 are as follows:

[0261] Step 2: Obtain or initialize the resource context (distributed sharding)

[0262] Step 21: The fragmentation key is the "resource identifier". Consistent hashing with identifiers; each shard independently maintains a two-level time index (time bucket). (Interval tree) and allocation unit priority queue;

[0263] Step 22: Add a shard ID and policy version number to the context snapshot for subsequent consistency verification;

[0264] Step 3: Overlapping Range Queries (Cross-Shard Concurrency)

[0265] Step 31: After time bucket pre-filtering, only initiate lightweight concurrent queries on the shards associated with the hit bucket;

[0266] Step 32: Perform interval tree overlap query locally on each shard and return the hit summary (overlap count, no-entry warning);

[0267] Step 33: Aggregate the fragmentation results to form a global overlapping set and its quantity;

[0268] Step 4: Expected allocation band and reservation check

[0269] Step 41: When the expected allocation zone is determined, "regional affinity / cross-regional cost" and tenant policy version are superimposed;

[0270] Step 43: Simultaneously verify and determine "with reserved quota". "Tenant retention quota", soft retention exceeding authority is accumulated at the tenant level;

[0271] Step 5: Candidate Allocation Unit Screening

[0272] Step 51: Simultaneously verify tenant isolation, unauthorized access limits, and cross-region bandwidth / latency thresholds during the in-band rapid screening and fine-grained judgment phase;

[0273] Step 52: Add the tenant unauthorized access count and cross-region cost to the candidate scoring supplement;

[0274] Step 6: Adaptive Selection and Snapshot Verification

[0275] Step 61: Perform optimistic validation of the strategy snapshot version before selection; if the version changes before submission, perform "micro-reselection" sorting only in this shard.

[0276] Step 62: The sorting weights are adjusted according to the shard-level congestion signals issued by the server, increasing the global weight of "most recently available start time / stability score";

[0277] Step 7: Consistency between creation, preemptibility, and commit

[0278] Step 71: Cross-shard creation is subject to the "creation rate and total quota per shard";

[0279] Step 72: The preemptible / delayed policy is selected by the coordinator across shards based on the "minimum migration cost", and a migration log ID is generated to ensure idempotency and auditability;

[0280] Step 8: Allocation Unit Update and Allocation

[0281] Step 81: Add shard ID and tenant privilege violation count fields to the atomic batch update; perform delayed write-back in batches within the shard;

[0282] Step 9: Range Index Insertion and Maintenance (Within a Fragment)

[0283] Step 91: Lazy insertion for long intervals and direct insertion for short intervals are completed within the partition; time bucket metadata is updated synchronously.

[0284] Step 10: Online Learning and Strategy Updates (End-to-Cloud Collaboration)

[0285] Step 101: The client only reports shard-level overlap / unauthorized / overflow allocation statistics; the server aggregates and calculates the global sorting weight, bandwidth / tenant retention ratio and target capacity, and distributes them in a versioned manner.

[0286] Step 102: The client applies parameters according to the version and does not recalculate the weight locally; the target capacity of hot shards is reduced to promote overflow;

[0287] Step 11: Result Return and Audit

[0288] Step 111: Results include shard ID, coordinator decision summary, tenant privilege violation count, and cross-shard query and commit distribution;

[0289] Step 112: Audit the association information between the newly added two-phase commit results, cross-shard rollback records, and migration log IDs;

[0290] The above modules work together under the control of the processor to implement at least some or all of the steps of the multi-resource scheduling method described in Embodiment 1;

[0291] The information interaction and program execution process of the processor in the above-mentioned device are based on the same concept as those in Embodiment 1 of the present invention. For details, please refer to the description in Embodiment 1 of the present invention, and will not be repeated here.

[0292] Similarly, the device of the present invention encapsulates the multi-resource scheduling method, introduces a priority-driven expected allocation unit / allocation band allocation mechanism in multi-resource scheduling, and maintains low complexity and learning ability in online incremental and high-concurrency scenarios. It is widely applicable to general scheduling scenarios such as workflow orchestration, batch processing, cloud resource scheduling, production / maintenance scheduling, equipment and personnel scheduling, and color-coded scheduling systems, reducing the cost of cross-industry reuse and customization.

[0293] Example 3

[0294] This invention also provides a multi-resource scheduling system to realize personnel scheduling and production equipment scheduling:

[0295] Background: This project focuses on the joint scheduling of manpower and equipment in the manufacturing, operations, and service industries. It requires the sequential arrangement of shifts, work orders, and maintenance windows to personnel or equipment allocation units, taking into account legal regulations (working hour limits, rest intervals), skill matching (affinity / anti-affinity), and urgent work orders (hard priority). It also supports a color-coded scheduling system for personnel and equipment resources.

[0296] Based on Example 1, the implementation configuration of this example differs from the configuration described in Example 1 mainly in the following ways:

[0297] Joint scheduling of personnel and equipment resources; work orders / shifts are generalized scheduling items; capacity is defined as working hours / parallel workstations.

[0298] Multiple scheduling clients communicate with the scheduling server, and each client deploys the multi-resource scheduling device described in Example 2;

[0299] The server aggregates the first policy / statistical parameters from each client, generates and distributes the second policy parameters; the system executes at least some or all of the steps of the multi-resource scheduling method described in Example 1;

[0300] Affinity / anti-affinity is used for skill and equipment compatibility; hard constraint priority is used for emergency work orders.

[0301] The target capacity is dynamically set based on historical peak quantiles to achieve peak-valley smoothing;

[0302] Based on Example 1, the main differences between the implementation steps of this embodiment and the multi-resource scheduling method described in Example 1 are as follows:

[0303] Step 2: Obtain or initialize the resource context (human / device dual resources)

[0304] Step 21: The resource context simultaneously maintains the "Employee Calendar Index (Rest / Shift / Disabled Period)" and the "Equipment Maintenance Calendar Index," and establishes a person-job / person-machine affinity mapping cache;

[0305] Step 22: Add "Available Working Hours Window, Accumulated Working Hours, Continuous Working Hours, Rest Count, Skill Tag Set" to the allocation unit;

[0306] Step 3: Range Overlap Query (Merge Person / Device Calendars)

[0307] Step 31: Perform overlapping queries on the target interval in the employee calendar and device calendar interval trees respectively, and merge them into a joint conflict set;

[0308] Step 33: Use the results of the "Laws and Regulations Window (Working Hour Limits, Minimum Rest Intervals, Night Shift Restrictions)" as a no-entry warning;

[0309] Step 4: Expected allocation band and reservation check

[0310] Step 41: Calculate the expected allocation band by combining skill affinity, job priority, and equipment compatibility;

[0311] Step 43: Change "Retained Verification" to "With Retained Verification" Skill retention "Statutory rest constraints" are jointly converted; when hard constraints are violated, they are directly marked as "rearrangement or postponement strategy required";

[0312] Step 5: Candidate Allocation Unit Screening

[0313] Step 51: Quickly screen out candidates with mismatched skills, incompatible equipment, excessive working hours / insufficient rest, or shift conflicts;

[0314] Step 52: In the detailed assessment stage, "skill matching score, compliance risk score (the lower the better) and shift continuity score" are added as selection criteria and ranking items.

[0315] Step 6: Adaptive Allocation Unit Selection

[0316] Step 62: The selection chain for the best allocation is adjusted to "expected allocation priority → skill matching score descending order → compliance risk ascending order → shift continuity ascending order → most recent end time ascending order → average conflict rate ascending order → minimum capacity deviation → stability score ascending order";

[0317] Step 7: Rearranging and Substitution when Candidates are Empty

[0318] Step 71: Prioritize using "same skill substitutes" and "equipment cross-shift adjustments", subject to the hard constraint of "maximum consecutive shift threshold / minimum rest interval";

[0319] Step 7121: The preemptive / delay strategy can be adjusted to "delay or change shifts for low-priority non-urgent work orders", and the hard constraints must not be broken.

[0320] Step 7122: New allocation units are limited to adding temporary shifts or outsourced substitutes and are subject to the "temporary shift quota / weekly working hour limit";

[0321] Step 8: Allocation Unit Update and Allocation

[0322] Step 82: Atomic batch update simultaneously writes "cumulative working hours, continuous working hours, rest count, number of skill tasks, and compliance flags (overtime, night shift, cross-job)";

[0323] Step 9: Index Insertion and Maintenance (Human / Equipment Dual Index)

[0324] Step 91: Insert the task intervals into the employee calendar tree and the device calendar tree respectively; synchronously maintain the "work hour window count and rest window count";

[0325] Step 10: Online Learning and Strategy Updates

[0326] Step 101: The learning signal now includes "compliance event rate, rotation fairness, skill hit rate, and peak-hour off-peak success rate";

[0327] Step 102: The strategy update includes "dynamic shift quotas, skill retention ratios, rotation weights, and target working hours," which are adjusted version-wise during the cooldown period;

[0328] Step 11: Result Return and Audit

[0329] Step 111: The results now include "Skill Matching Score, Compliance Mark, Cumulative Working Hours / Rest Count, and Rotation Fairness Score".

[0330] Step 112: Audit record "Compliance verification assertion hit, delay strategy / shift change reason, staggered / substitute decision chain and manual review hook";

[0331] The information interaction and program execution process of the processor in the above system are based on the same concept as those in Embodiment 1 of the present invention, and the specific details can be found in the description in Embodiment 1 of the present invention, and will not be repeated here.

[0332] Similarly, the system of this invention encapsulates the multi-resource scheduling method, introduces a priority-driven expected allocation unit / allocation band allocation mechanism in multi-resource scheduling, and maintains low complexity and learning ability in online incremental and high-concurrency scenarios. It is widely applicable to general scheduling scenarios such as workflow orchestration, batch and stream hybrid scheduling, cloud resource scheduling, production / operation and maintenance scheduling, equipment and personnel scheduling, and color scheduling systems, reducing the cost of cross-industry reuse and customization.

[0333] It should be noted that not all steps and modules in the above processes and device structures are mandatory; some steps or modules can be omitted as needed. The execution order of each step is not fixed and can be adjusted as required. The system structure described in the above embodiments can be a physical structure or a logical structure. That is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or they may be jointly implemented by certain components in multiple independent devices.

[0334] The above-described embodiments are merely preferred embodiments provided to fully illustrate the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are all within the scope of protection of the present invention. The scope of protection of the present invention is defined by the claims.

Claims

1. A multi-resource scheduling method, characterized in that, Includes the following steps: Receive and verify a generalized scheduling item that has at least one attribute: identifier, start time, end time, resource identifier, capacity, weight, priority, allocation unit number, mutual exclusion group identifier, affinity label, anti-affinity label, deferable threshold, preemptible flag, and hard priority threshold. Obtain or initialize the resource context according to the resource identifier. The resource context includes an allocation unit priority queue, an interval index structure (preferably implemented as an interval tree) for time interval overlapping queries, a maximum allocation unit number, a concurrency control object, and a "priority to desired allocation unit / allocation band mapping strategy" and "allocation band configuration (including reserved quota and overflow allocation order)". Interval overlap query: The interval index structure is used to perform an overlap query on the time interval of the generalized scheduling item to obtain the overlap set of historical generalized scheduling items and record the number of overlaps. Determining and reserving the desired band: Based on the mapping strategy, determine the desired allocation band and desired allocation unit, and read the band's reserve and target capacity. The candidate allocation units are selected based on the priority of the expected allocation zone. The priority queue of allocation units is traversed within the expected allocation zone to perform multi-dimensional conflict determination and check whether the capacity and reserved quota constraints are met. Qualified units are added to the candidate set. If there are no candidates within the expected allocation zone, the allocation is expanded across zones according to the overflow allocation order to form a candidate set. The adaptive allocation unit selection strategy prioritizes the desired allocation band. When candidate allocation units exist, the selection is based on the following order: "Desired allocation band priority → most recent end time ascending order → average conflict rate ascending order → minimum capacity deviation → stability score". When the desired allocation unit is clear, idle, and meets the constraints, it is directly assigned to the desired allocation unit. When no candidate allocation unit exists, it is determined whether it is allowed to create a new allocation unit in the desired allocation band. If allowed, it is created and registered to the desired allocation band. If not allowed, the overflow allocation strategy is used to select a candidate from an adjacent allocation band or to allocate a new allocation unit to the resource. In hard constraint priority scenarios, a low-priority item of the limited preemptible or deferred strategy or a new allocation unit from an adjacent band can be selected. The allocation unit is updated and allocated by setting the allocation unit of the generalized scheduling item as the target allocation unit and updating the statistical information of the target allocation unit and the corresponding allocation band, including updating the target allocation unit's recent end time, used capacity, number of tasks, number of conflicts, and reserved use, updating the in-band statistics (in-band utilization, reserved consumption, overflow allocation count) and pushing them into the allocation unit priority queue. Interval index insertion and index maintenance: Insert the generalized scheduling item into the interval index structure (when it is an interval tree, update and maintain the maximum end time index of the subtree). The conflict score and strategy are updated online. Based on the number of overlaps and in-band utilization, the resource conflict score is dynamically calculated and updated using a weighted fusion conflict score formula. Persistent allocation units with statistics; The sliding window feedback triggers a versioned optimization within the cooldown period and step size limit when the monitored indicators exceed the threshold and continue for one or more statistical windows (including resource conflict score, utilization / default rate, overflow allocation rate, priority hit rate and SLA event). This optimization updates the priority to the expected allocation unit / allocation mapping strategy and the reserved / overflow allocation configuration, and recalculates the target capacity and allocation unit priority queue sorting weight. Otherwise, maintain the status quo; The output includes the allocation unit number, identifier, allocation type (in-band / overflow allocation / new / preemptible / delayed strategy), and key statistics and visualization markers.

2. The multi-resource scheduling method according to claim 1, characterized in that, The aforementioned interval overlap query includes: The preferred implementation of the interval index structure for interval overlap queries is an interval tree: the interval tree consists of multiple interval nodes, and each node includes at least a generalized scheduling item reference, a time interval, a maximum end time of the subtree, and left and right child nodes; The query starts from the root node. If the current node's interval overlaps with the target interval, it is added to the result. If the maximum end time of the left subtree is less than the target start time, the left subtree is skipped, and the right subtree is recursively queried until the query is completed. The desired allocation priority candidate allocation unit screening includes: Multidimensional conflict determination: Overlap is judged under the closed interval or semi-open interval model; when the resource identifiers are the same and the time overlaps, a resource conflict is identified; when there is a time and resource conflict, it is determined whether the same allocation unit is allowed or whether it needs to be forcibly allocated to different allocation units based on the priority threshold. Hard constraints prohibit the same allocation unit, while soft constraints allow the same allocation unit but are included in the conflict statistics; mutual exclusion groups prohibit the overlap of the same allocation unit, and affinity labels can be used as a bonus item for selection. Capacity and Band Reservation Constraints: Capacity constraints control that the total capacity of a single allocation unit within the same time window does not exceed the upper limit; within the desired allocation band, a candidate allocation unit can only be selected if the reserved quota or target capacity remaining is satisfied; among the candidate allocation units, high-priority or higher-weight generalized scheduling items are preferentially allocated to their desired allocation band or lower-numbered allocation units. The desired allocation priority adaptive allocation unit selection strategy includes: Adaptive allocation unit selection: First, selection is made within the desired allocation zone, sorted by the most recent end time in ascending order, average conflict rate in ascending order, minimum capacity deviation, and stability score; if there are no available candidates in the desired allocation zone, selection is made across zones according to the overflow allocation order, and the best candidate is selected according to the above order; when the desired allocation unit is clear and meets the constraints, the allocation unit is selected first. Overflow and preemption control: When the quota reserved in the expected allocation band is insufficient and there are hard priority generalized scheduling items, a limited preemption or postponement strategy is enabled to migrate low priority generalized scheduling items to adjacent allocation bands or postpone their execution; when preemption is not enabled, the items are accepted to adjacent allocation bands in the order of overflow allocation and overflow allocation statistics are recorded. The weighted fusion conflict score formula for online policy updates is as follows: in, For the updated conflict rating; Conflict rating before the update; The attenuation coefficient is set within the interval (0, 1); For standard The function, the calculation formula is: The number of overlaps; The time decay factor is calculated using the following formula: in The time decay rate coefficient, For the current time, This refers to the end time of the scheduling item; The capacity deviation term is calculated using the following formula: in This represents the currently used capacity. For the target capacity, Maximum capacity; For segmentation The function, the calculation formula is: in Low conflict threshold; The segmentation threshold is used to distinguish between low and high conflict-sensitive intervals, satisfying the following conditions: ; This is a high-conflict amplification factor, with a value greater than 1; For the stratified weight coefficients, satisfying .

3. A multi-resource scheduling device, characterized in that it comprises: The scheduling management and execution module is configured to perform the following operations on the client side of the multi-resource scheduling system: based on the resource context (allocation unit priority queue and interval index structure) maintained by the index and query module, it performs generalized scheduling item access, interval overlap query call, candidate allocation unit screening and adaptive allocation according to the process described in claim 1, generates a first scheduling result and a first strategy / statistical parameters, wherein the first strategy / statistical parameters include at least the priority to desired allocation unit / allocation band mapping strategy, in-band utilization, resource conflict score, reservation occupancy and target capacity, and sends the first strategy / statistical parameters to the server through the communication interface; at the same time, it receives the second strategy parameters issued by the server, and corrects the local mapping strategy, reservation / overflow allocation configuration, target capacity and allocation unit priority queue sorting weight accordingly, and continues to execute the scheduling method process described in claim 1; The indexing and querying module is configured to build and maintain an interval index structure (preferably an interval tree) and an allocation unit priority queue for time interval overlapping queries on the client side, perform interval overlapping queries, insertion and subtree maximum end time maintenance, and output query hit and load statistics as part of the first strategy / statistical parameters for use by the scheduling management and execution module and the strategy adaptation and online learning module. The strategy adaptation and online learning module is configured to maintain the priority to desired allocation unit / allocation band mapping strategy and allocation band configuration (including reserved quota and overflow allocation order) on the client side, calculate the average conflict rate, the weight fusion conflict scoring formula as described in claim 2 and the in-band utilization, and update the local mapping strategy, reserved / overflow allocation configuration, target capacity and allocation unit priority queue sorting weight after receiving the second strategy parameter from the server. On the server side, aggregate the first policy / statistical parameters from multiple clients, generate and version the second policy parameters, and distribute them to each client. The visualization output and diagnostic module is configured to output structured data for time axis / Gantt chart / conflict relationship diagram, including labels, allocation type (in-band / overflow allocation / new / preemptible / delayed strategy) and key statistics, and annotate the strategy return path (application status of local first strategy / statistical parameters and server second strategy parameters). The modules described above work together under the control of the processor to achieve at least some or all of the steps described in claims 1-2.

4. A multi-resource scheduling system, characterized in that, The system includes multiple scheduling clients and a scheduling server, with each scheduling client communicating with the scheduling server; each scheduling client is equipped with the multi-resource scheduling device as described in claim 3, and the server is configured to aggregate the first policy / statistical parameters of each client to generate second policy parameters and distribute them to each client; the system is configured to perform at least some or all of the steps as described in claims 1-2.

5. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the instruction is executed by the processor of the electronic device, the electronic device causes the electronic device to: On the client side, at least some or all of the steps described in claims 1-2 are executed through the scheduling management and execution module, indexing and querying module, strategy adaptation and online learning module and visualization output and diagnosis module as described in claim 3, and the first strategy / statistical parameter as described in claim 3 is sent to the server, and the second strategy parameter generated by the server is received and applied. On the server side, the first policy / statistical parameters of multiple clients are aggregated through the policy adaptation and online learning module, and the second policy parameters are generated and distributed, thereby supporting the client to continuously optimize and execute at least some or all of the steps described in claims 1-2.