Resource scheduling method and device, equipment, storage medium and computer program product
By establishing real-time warehouses and resource pools, combining staged channel scheduling and dual security threshold control, the problem that traditional scheduling strategies cannot dynamically adapt to business needs is solved, and the accuracy and efficiency of resource scheduling are improved.
Patent Information
- Application Number
- CN202510257138.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-07-01
AI Technical Summary
The traditional one-way scheduling strategy lacks closed-loop verification and cannot dynamically adapt to the real-time changes in business needs, resulting in amplification of resource allocation errors and unable to meet the dynamic demands of business resources.
Based on the business needs of the target users, a real-time warehouse and resource pool are established, the total target resources are calculated through the real-time warehouse, the mode parameters of the initial resource scheduling strategy are adjusted, and the staged channel scheduling strategy and dual security threshold control are adopted to realize dynamic scheduling of the resource pool.
It achieves accurate matching between resource scheduling strategies and business needs, avoids waste of resources or insufficient supply, improves the accuracy, pertinence and overall efficiency of resource scheduling, and meets the dynamic demands of business resources.
Smart Images

Figure CN120235384A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of resource management, and in particular, to a resource scheduling method, apparatus, device, storage medium, and computer program product. Background Art
[0002] Traditional one-way scheduling strategies lack closed-loop verification, rely on fixed thresholds and manual strategies, and the error of resource allocation will continuously amplify with business fluctuations, unable to dynamically adapt to the real-time changes in business requirements, resulting in resource waste and unable to meet the dynamic resource requirements of the business. Summary of the Invention
[0003] The main purpose of this application is to provide a resource scheduling method, apparatus, device, storage medium, and technical program product, aiming to solve the technical problem that traditional one-way scheduling strategies lack closed-loop verification and cannot meet the dynamic resource requirements of the business.
[0004] To achieve the above object, this application proposes a resource scheduling method, and the resource scheduling method includes:
[0005] Process the resource data collected by the data interface based on the business requirements of the target user, and establish a real-time data warehouse and a resource pool;
[0006] Calculate the total target resources corresponding to the business requirements through the real-time data warehouse, and adjust the mode parameters of the initial resource scheduling strategy according to the total target resources to obtain a target resource scheduling strategy;
[0007] When the resources in the resource pool start to accumulate, schedule the resource pool based on the target resource scheduling strategy.
[0008] Optionally, the step of scheduling the resource pool based on the target resource scheduling strategy when the resources in the resource pool start to accumulate includes:
[0009] When the resources in the resource pool start to accumulate, monitor the current total resources in the resource pool in real time, and control the resource pool to enter the basic allocation mode. In the basic allocation mode, the resource pool maintains the lowest allocation channel for scheduling;
[0010] Judge whether the current total resources reach the first safety threshold;
[0011] If so, gradually open the main allocation channel and calculate the occupancy rate of the allocation channel in the current resource pool;
[0012] When the occupancy rate of the allocation channel reaches the second safety threshold, schedule the resource pool based on the elastic expansion mode.
[0013] Optionally, the step of scheduling the resource pool based on the elastic expansion mode when the occupancy rate of the allocation channel reaches the second safety threshold includes:
[0014] When the occupancy rate of the allocation channel reaches the second safety threshold, control the resource pool to enter the elastic expansion mode, and continuously monitor the resource volatility of the resource pool;
[0015] If the resource volatility is less than the third safety threshold, fix the opening degree of the main allocation channel of the current resource pool;
[0016] If the resource volatility is greater than the third safety threshold, adjust the ratio of the main allocation channel to the standby channel of the resource pool, and construct a resource flow dynamic equation based on the ratio, and schedule the resource pool through the resource flow dynamic equation.
[0017] Optionally, after the step of if the resource volatility is greater than the third safety threshold, adjust the ratio of the main allocation channel to the standby channel of the resource pool, and construct a resource flow dynamic equation based on the ratio, and schedule the resource pool through the resource flow dynamic equation, further includes:
[0018] When the current total resource amount reaches the target total resource amount, calculate the first error tolerance of the current resource scheduling based on the service demand;
[0019] If the first error tolerance exceeds the preset error threshold, generate a resource reallocation instruction and return to the step of controlling the resource pool to enter the elastic expansion mode and continuously monitoring the resource volatility of the resource pool until the first error tolerance is less than the preset error threshold.
[0020] Optionally, after the step of scheduling the resource pool based on the target resource scheduling strategy when the resources in the resource pool start to accumulate, further includes:
[0021] When it is detected that the resource accumulation gradient of the resource pool is abnormal, close the main allocation channel of the resource pool through the closed-loop control node;
[0022] Calculate the second error tolerance of the resource pool according to the preset standby channel throughput compensation algorithm, and perform a balance check on the resource pool based on the second error tolerance to obtain a check result;
[0023] Judge whether to close the standby channel of the resource pool according to the check result.
[0024] Optionally, the step of calculating the target total resource amount corresponding to the service demand through the real-time data warehouse and adjusting the mode parameters of the initial resource scheduling strategy to obtain the target resource scheduling strategy includes:
[0025] Extract the resource demand feature vector related to the business requirements from the real-time data warehouse;
[0026] Based on the resource demand feature vector, calculate the total target resources through a pre-trained elastic scaling model;
[0027] Backpropagate and optimize the mode parameters of the initial resource scheduling strategy according to the total target resources to obtain the target resource scheduling strategy, where the mode parameters include the main channel efficiency coefficient and the standby channel response coefficient.
[0028] In addition, to achieve the above object, the present application also proposes a resource scheduling device, which includes:
[0029] A data processing module, configured to process the resource data collected by the data interface based on the business requirements of the target user, and establish a real-time data warehouse and a resource pool;
[0030] A strategy generation module, configured to calculate the total target resources corresponding to the business requirements through the real-time data warehouse, and adjust the mode parameters of the initial resource scheduling strategy according to the total target resources to obtain the target resource scheduling strategy;
[0031] A strategy scheduling module, configured to schedule the resource pool based on the target resource scheduling strategy when the resources in the resource pool start to accumulate.
[0032] In addition, to achieve the above object, the present application also proposes a resource scheduling device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the resource scheduling method as described above.
[0033] In addition, to achieve the above object, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, it implements the steps of the resource scheduling method as described above.
[0034] In addition, to achieve the above object, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the resource scheduling method as described above.
[0035] This application discloses a method of processing the resource data collected by a data interface based on the business requirements of a target user, establishing a real-time data warehouse and a resource pool; calculating the total target resources corresponding to the business requirements through the real-time data warehouse, and adjusting the mode parameters of an initial resource scheduling strategy according to the total target resources to obtain a target resource scheduling strategy; when the resources in the resource pool start to accumulate, scheduling the resource pool based on the target resource scheduling strategy. By adjusting the mode parameters to obtain the target resource scheduling strategy, the resource scheduling strategy can be accurately matched with the business requirements, and scheduling based on the target strategy when the resources in the resource pool accumulate can achieve the orderly allocation and utilization of resources, avoid resource waste or insufficient supply, effectively improve the accuracy, pertinence and overall efficiency of resource scheduling, and meet the dynamic requirements of the business for resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present application and, together with the specification, are used to explain the principles of the present application.
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0038] Figure 1 It is a schematic flowchart of the first embodiment of the resource scheduling method of the present application;
[0039] Figure 2 It is a schematic flowchart of the second embodiment of the resource scheduling method of the present application;
[0040] Figure 3 It is a schematic flowchart of the third embodiment of the resource scheduling method of the present application;
[0041] Figure 4 It is a schematic module structure diagram of the resource scheduling device in the embodiments of the present application;
[0042] Figure 5 It is a schematic device structure diagram of the hardware operating environment involved in the resource scheduling method in the embodiments of the present application.
[0043] The implementation, functional features and advantages of the purpose of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0044] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0045] To better understand the technical solution of this application, the following will be described in detail in conjunction with the accompanying drawings of the specification and specific implementation manners.
[0046] The main solution of the embodiment of this application is: process the resource data collected by the data interface based on the business requirements of the target user, and establish a real-time data warehouse and a resource pool; calculate the total target resources corresponding to the business requirements through the real-time data warehouse, and adjust the mode parameters of the initial resource scheduling strategy according to the total target resources to obtain a target resource scheduling strategy; when the resources in the resource pool start to accumulate, schedule the resource pool based on the target resource scheduling strategy.
[0047] In the field of cloud computing and distributed systems, resource scheduling technology is the core link to ensure business stability. Traditional methods mainly rely on two types of solutions: static threshold scheduling and manual strategy parameter tuning. Static threshold scheduling: Set fixed resource allocation thresholds (such as CPU / memory usage rate) based on historical data, and trigger expansion when the detected value exceeds the threshold. Such methods cannot adapt to the real-time fluctuations of business requirements, resulting in a high resource idle rate (30% - 50%) under low load, and service degradation caused by lagging expansion under high concurrency. Manual strategy parameter tuning: Manually configure the resource channel ratio (such as the main and standby channel allocation rules) by operation and maintenance personnel, but parameter updates rely on empirical judgment, making it difficult to handle sudden traffic (such as e-commerce big promotions, flash sale scenarios), and the manual intervention response delay often exceeds the minute level. Traditional real-time data warehouses are only used for offline analysis, not linked with the resource pool scheduling strategy, and resource prediction and execution are separated; moreover, the one-way scheduling strategy lacks closed-loop verification, and the resource allocation error continues to amplify with business fluctuations, relying on fixed thresholds and manual strategies, unable to dynamically adapt to the real-time changes of business requirements, resulting in resource waste and unable to meet the dynamic resource requirements of the business.
[0048] Therefore, this application provides a new scheduling method with dynamic coordination, elastic response, and closed-loop self-healing capabilities. Adopt a phased channel scheduling strategy, combined with dual safety threshold control, compress the response delay in high-concurrency scenarios to the millisecond level, and improve resource utilization, realizing the coordinated optimization of accuracy, real-time performance, and stability of resource scheduling in high-fluctuation and high-concurrency business scenarios.
[0049] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, resource scheduling, and program running functions, such as a computer, or an electronic device capable of implementing the above functions. The following takes the regional energy management system as an example to illustrate this embodiment and the following embodiments.
[0050] Based on this, the embodiment of this application provides a resource scheduling method, referring to Figure 1 , Figure 1This is a flowchart of the first embodiment of the resource scheduling method of the present application.
[0051] In this embodiment, the resource scheduling method includes:
[0052] Step S10: Process the resource data collected by the data interface based on the business needs of the target user and establish a real-time data warehouse and resource pool.
[0053] It should be understood that the target users may be departments or businesses in the regional digital center that are responsible for business production and operation. Business requirements may be specific goals and constraints for resource use by target users. For example, in energy management and control scenarios, the business requirements of target users may be to reduce residential electricity costs by 10% while ensuring stable industrial electricity use. Resource data represents the original data of resource status and business behavior, including real-time data (such as current and voltage), historical data (such as energy consumption in the past 24 hours), demand data (such as electricity applications submitted by users), etc. A resource pool is a logically abstract collection of physical or virtual resources for unified scheduling and allocation. In this embodiment, the resource pool may be a collection of resources such as electricity, energy storage batteries, and distributed photovoltaics.
[0054] It should be understood that the regional energy management system has built a regional digital center, which integrates the data of various business lines in multiple internal and external information systems into the real-time data warehouse through data interfaces, RPA and other technologies, and establishes a regional data management system and indicator system. Relying on this system, various departments and businesses will integrate relevant resources into a resource pool to facilitate the subsequent scheduling and use of resources.
[0055] It is understandable that the data interface collects resource data related to the target user's business from different sources, and then cleans, converts, and integrates the collected data according to the target user's business needs, removes invalid or erroneous data, and unifies the data format. Then, the processed data is stored in the real-time data warehouse so that it can be accessed and analyzed in real time. By continuously analyzing changes in business needs, the resource pool capacity allocation strategy can be dynamically adjusted to avoid resource waste in traditional static reservation solutions.
[0056] In one example, during the peak electricity consumption period in summer, the district energy management system needs to balance industrial production and residential electricity consumption in a park, with the goals of "0% industrial power rationing" and "a 15% reduction in residential electricity costs". Through data interfaces such as smart meters, industrial and residential load data are collected in real time. Combining meteorological forecasts and user exemption lists, a load forecasting model is constructed using a real-time data warehouse to accurately predict the residential electricity demand during the evening peak as 80 MW (error rate ≤ 3%); subsequently, 10 MW is allocated from the energy storage battery to the residential battery, and at the same time, 30 MW of gas turbine capacity is reserved for industrial user area A. While ensuring that the exempted enterprises operate at full load, the residential electricity cost is reduced by 18% through time-of-use electricity price strategies, and the industrial power rationing rate is 0%.
[0057] Step S20: Calculate the total target resources corresponding to the service requirements through the real-time data warehouse, and adjust the mode parameters of the initial resource scheduling strategy according to the total target resources to obtain the target resource scheduling strategy.
[0058] It should be noted that the total target resources are the total amount of resources required to meet the normal operation of the service calculated according to the service requirements, which may include data volume, computing power, storage capacity, etc. The mode parameters are the key parameters of each mode in the initial resource scheduling strategy, such as the main channel efficiency coefficient, standby channel response coefficient, etc. These parameters determine the way and efficiency of resource scheduling. Among them, the modes of the initial resource scheduling strategy and the target resource scheduling strategy include basic allocation mode, elastic expansion mode, adaptive adjustment mode, etc.
[0059] Furthermore, in order to accurately determine the total target resources by using data characteristics and model calculations, and optimize the scheduling strategy parameters to make the resource scheduling strategy more in line with the actual service requirements. The step S20 may include:
[0060] Extract the resource demand feature vector related to the service requirements from the real-time data warehouse; based on the resource demand feature vector, calculate the total target resources through a pre-trained elastic scaling model; perform backpropagation optimization on the mode parameters of the initial resource scheduling strategy according to the total target resources to obtain the target resource scheduling strategy, where the mode parameters include the main channel efficiency coefficient and the standby channel response coefficient.
[0061] It should be noted that the resource demand feature vector represents resource demand information in the form of a vector. Each dimension in the vector can represent a feature of the resource, such as quantity, type, usage frequency, etc. The elastic scaling model is a pre-trained machine learning model (such as a neural network, time series model, etc.) used to dynamically calculate the total target resource based on the feature vector. The main channel efficiency coefficient characterizes the load conversion efficiency of the main resource allocation channel (such as an industrial power supply line). The higher the value, the higher the resource utilization rate of the main channel. The backup channel response coefficient controls the elastic expansion rate of the backup resource channel (such as a storage battery). The higher the value, the more rapid the response of the backup channel.
[0062] In one example, the resource demand feature vector can be expressed as: V = [R peak , R avg , P, T]. Wherein, R peak is the historical peak load, R avg is the sliding window average load, P is the business priority weight, T is the real-time temperature, and the business priority weight of industrial electricity is greater than that of residential electricity.
[0063] The total target resource T target can be obtained by weighted calculation of R peak and R avg through the elastic scaling model. The formula is as follows:
[0064] T target = γ·R peak + (1 - γ)·R avg
[0065] Wherein, γ is the business sensitivity coefficient, which is dynamically corrected by the business priority weight P. When performing backpropagation optimization, the optimization objective can be set to minimize the resource gap, as follows:
[0066] ||Q total - T target || 2
[0067] Wherein, Q total is the actual total resource allocation, which is contributed by both the main channel and the backup channel.
[0068] When performing parameter update, the main channel efficiency coefficient α is updated as follows:
[0069] According to the real-time gap ΔT = |T target - Q current |, adjust the decay factor δ, wherein, Q current is the real-time load, and the update formula:
[0070] α t+1 = α t ·e -δ·ΔT, δ = 0.1·ΔT / T target
[0071] The spare channel response coefficient β can be iteratively optimized by the gradient descent method:
[0072]
[0073] where η is the learning rate.
[0074] Step S30: When the resources in the resource pool start to accumulate, schedule the resource pool based on the target resource scheduling policy.
[0075] It can be understood that when the resources in the resource pool start to accumulate, it means there are resources available for allocation. At this time, according to the target resource scheduling policy determined in the early stage, and in accordance with the rules and parameters set therein, such as the channel selection and allocation ratio of resource allocation, etc., allocate and schedule the resources in the resource pool, and deliver the resources to the corresponding business links.
[0076] In this embodiment, the resource data collected by the data interface is processed based on the business requirements of the target user, and a real-time data warehouse and a resource pool are established; the total amount of target resources corresponding to the business requirements is calculated through the real-time data warehouse, and the mode parameters of the initial resource scheduling policy are adjusted according to the total amount of target resources to obtain the target resource scheduling policy; when the resources in the resource pool start to accumulate, schedule the resource pool based on the target resource scheduling policy. By adjusting the mode parameters to obtain the target resource scheduling policy, the resource scheduling policy can be accurately matched with the business requirements, and the resource pool can be scheduled based on the target policy when the resources in the resource pool accumulate, so as to realize the orderly allocation and utilization of resources, avoid resource waste or insufficient supply, effectively improve the accuracy, pertinence and overall efficiency of resource scheduling, and meet the dynamic requirements of the business for resources.
[0077] Refer to Figure 2 , Figure 2 FIG.
[0078] In the second embodiment, step S30 includes:
[0079] Step S301: When the resources in the resource pool start to accumulate, monitor the current total amount of resources in the resource pool in real time, and control the resource pool to enter the basic allocation mode. In the basic allocation mode, the resource pool maintains the lowest allocation channel for scheduling.
[0080] It should be noted that the conservative scheduling strategy in the initial stage of the basic deployment mode resource pool only opens the minimum allocation channels (such as 2 power supply lines and 10% of the server cluster). The minimum allocation channels ensure the minimum resource output paths for the basic functions of the resource pool (such as the power supply lines for residential electricity and the computing nodes where core services cannot be interrupted).
[0081] Step S302, determine whether the current total resources reach the first safety threshold.
[0082] It should be understood that when the resource pool starts to accumulate resources, the regional energy management system continuously collects the current total resources through the real-time monitoring component and compares them with the preset first safety threshold. If the threshold is not reached, the resource pool is forced into the basic deployment mode.
[0083] It can be understood that when the resource pool starts to accumulate resources, it can be when the energy storage battery is charged to 10% or the cloud computing task queue receives the first batch of requests. The real-time monitoring component can include smart meters, Kubernetes monitors, etc. The first safety threshold can be the initial limit on the capacity and utilization rate of the resource pool, such as the energy storage capacity ≥ 20% and the vCPU utilization rate ≤ 30%. The basic deployment mode includes channel restrictions (only enabling the minimum allocation channels), priority control (allocating resources according to business rules, such as residential electricity > landscape lighting, core services > edge tasks, etc.), and dynamic monitoring (updating the total resources at a frequency of seconds until the expansion condition is triggered).
[0084] It can be understood that restricting the resource output volume in the basic deployment mode can prevent the resource pool from crashing due to sudden requests during the initial accumulation stage and avoid the interruption of critical services.
[0085] Step S303, if so, gradually open the main allocation channels and calculate the occupancy rate of the allocation channels of the current resource pool.
[0086] It should be noted that the main allocation channels are high-capacity resource scheduling paths in the resource pool that bear the core business load, such as industrial power supply dedicated lines, cloud computing main server clusters, etc., and their maximum capacity is significantly higher than that of the basic channels. The allocation channel occupancy rate is the percentage of the current resource allocation volume to the maximum capacity of the channel.
[0087] Specifically, when the current total amount of the resource pool reaches the first safety threshold, such as the energy storage capacity ≥ 20% and the backlog of cloud computing task queues exceeds 500 requests, the system gradually opens the main distribution channel according to a preset gradient. In the first stage, 1 main channel (such as a 50MW power supply line) is opened, and the channel load is monitored; in the second stage, if the occupancy rate η ≥ 70%, a second main channel is additionally opened; in the Nth stage, dynamic expansion is carried out according to the ladder rule, such as opening a new channel for every 20% increase in the occupancy rate. Under progressive expansion, the main channel is opened in stages to avoid the risk of instantaneous overload, reducing the system crash rate in high-concurrency scenarios from 35% in traditional full-capacity expansion to 0%.
[0088] Step S304, when the occupancy rate of the distribution channel reaches the second safety threshold, schedule the resource pool based on the elastic expansion mode.
[0089] It should be noted that the second safety threshold is used to trigger the elastic expansion mode, indicating the occupancy rate critical value of the channel where the current main channel load is close to saturation and standby resources need to be introduced. The elastic expansion mode is a dynamic resource scheduling strategy that quickly expands the resource pool capacity to meet sudden demands by automatically enabling standby channels or adjusting the ratio of main and standby channels. The resource flow dynamic equation is a mathematical model describing the resource allocation relationship between the main and standby channels.
[0090] Furthermore, in order to flexibly adjust the resource allocation method according to resource fluctuations, achieve dynamic optimal allocation of resources, and improve resource utilization efficiency. The step S304 may include:
[0091] When the occupancy rate of the distribution channel reaches the second safety threshold, control the resource pool to enter the elastic expansion mode, and continuously monitor the resource volatility of the resource pool; if the resource volatility is less than the third safety threshold, fix the opening degree of the main distribution channel of the current resource pool; if the resource volatility is greater than the third safety threshold, adjust the ratio of the main distribution channel and the standby channel of the resource pool, and construct a resource flow dynamic equation based on the ratio, and schedule the resource pool through the resource flow dynamic equation.
[0092] It should be understood that the resource volatility reflects the change range of the resource volume in the resource pool within a certain period of time, and can be measured by the ratio of the maximum change value to the average value of the resource volume within a period of time. The third safety threshold is used to judge whether the resource volatility is within an acceptable range. When the resource volatility is less than this threshold, it means that the change of resources is relatively stable; when it is greater than this threshold, it means that the change of resources is relatively drastic and more flexible resource scheduling strategies need to be adopted. The opening degree of the main distribution channel is the proportion of the currently enabled resource capacity of the main channel.
[0093] Specifically, when the occupancy rate of the allocated channel is greater than the second safety threshold, the system triggers the elastic expansion mode, activates the standby channels, such as energy storage batteries, cold standby nodes of cloud servers, etc., and simultaneously activates the resource volatility monitoring module to calculate the resource volatility σ in real time. In a low volatility scenario, i.e., σ is less than the third threshold, the opening degree of the main channel is fixed, and only the standby channel is used to fine-tune the capacity. For example, if the volatility σ = 5%, the main channel is kept open at 80 MW, and the standby channel supplements 5 MW as needed. In a high volatility scenario, i.e., σ is greater than the third threshold, the ratio of the main and standby channels is dynamically adjusted, and a dynamic equation of resource flow is constructed to calculate the optimal allocation strategy through the equation. Of course, when adjusting the ratio of the main and standby channels, the resource allocation effects under different ratios can also be simulated in a virtual environment, and the scheme with the smallest error can be selected.
[0094] In one example, during the summer peak electricity consumption period in the target area, the air-conditioning load surges, resulting in the occupancy rate of the main power supply channel reaching 85% (exceeding the second threshold of 80%). The elastic expansion mode is triggered, the standby energy storage power station is enabled, the volatility monitoring module is activated, and the load volatility σ is calculated to be 18% in the past 10 seconds, which is greater than the third threshold of 15%. Then, the ratio of the main and standby channels needs to be adjusted. The resource flow equation is constructed to adjust the ratio of the main and standby channels from 8 / 2 to 6 / 4. The dynamic equation of resource flow is as follows:
[0095]
[0096] where α and β are the efficiency coefficient of the main channel and the response coefficient of the standby channel respectively, and V main is the amount of resources currently allocated to the main channel. represents the change rate of the amount of resources in the standby channel.
[0097] Furthermore, to ensure the accuracy of resource scheduling, timely correct possible resource allocation deviations, solve the long-term resource misallocation problem caused by error accumulation in the one-way scheduling strategy, and improve the accuracy of resource scheduling. After the step of adjusting the ratio of the main allocation channel and the standby channel of the resource pool and constructing a dynamic equation of resource flow based on the ratio, and scheduling the resource pool through the dynamic equation of resource flow, the following steps are further included:
[0098] When the current total amount of resources reaches the target total amount of resources, calculate the first error tolerance of the current resource scheduling based on the service requirements; if the first error tolerance exceeds the preset error threshold, generate a resource reallocation instruction and return to the step of controlling the resource pool to enter the elastic expansion mode and continuously monitoring the resource volatility of the resource pool until the first error tolerance is less than the preset error threshold.
[0099] It should be noted that the first error tolerance is the percentage deviation between the actual resource allocation and the target amount. The preset error threshold is the maximum allowable error range. The resource reallocation instruction is a control signal that triggers the elastic expansion mode to readjust resources, including the shortage amount to be supplemented and the priority rules.
[0100] In this embodiment, when the resources in the resource pool start to accumulate, the current total amount of resources in the resource pool is monitored in real time, and the resource pool is controlled to enter the basic allocation mode. In the basic allocation mode, the resource pool maintains the lowest allocation channel for scheduling; it is determined whether the current total amount of resources reaches the first safety threshold; if so, the main allocation channel is gradually opened, and the occupancy rate of the allocation channels in the current resource pool is calculated; when the occupancy rate of the allocation channels reaches the second safety threshold, the resource pool is scheduled based on the elastic expansion mode. According to the resource accumulation situation and channel occupancy situation of the resource pool, the resource scheduling mode is gradually and reasonably adjusted to avoid over-allocation or resource idleness in the initial resource accumulation stage, and improve the orderliness and rationality of resource scheduling.
[0101] Refer to Figure 3 , Figure 3 FIG. is a flowchart of the third embodiment of the resource scheduling method of the present application. Based on the above second embodiment, the third embodiment of the resource scheduling method of the present application is proposed.
[0102] In the third embodiment, after the step S30, the following is further included:
[0103] Step S401, when it is detected that the resource accumulation gradient of the resource pool is abnormal, the main allocation channel of the resource pool is closed through the closed-loop control node.
[0104] It should be noted that the abnormal resource accumulation gradient means that the accumulation rate or distribution pattern of resources (such as electricity, computing resources) in the resource pool deviates from the normal range. For example, the load suddenly increases (exceeds the preset threshold) or fluctuates abnormally continuously in a short period of time. The closed-loop control node is an intelligent control unit with real-time feedback and decision-making capabilities, which can make decisions based on the input gradient data and output an instruction to close the main channel.
[0105] It can be understood that the system can calculate the gradient through a sliding window and compare it with the preset safety range. If the gradient continuously exceeds the threshold, it is marked as a gradient anomaly. At the same time, after the node receives the anomaly signal, it starts the rule engine and sends a closing instruction to the main channel controller.
[0106] Step S402, calculate the second error tolerance of the resource pool according to the preset spare channel throughput compensation algorithm, and perform a balance check on the resource pool based on the second error tolerance to obtain a check result.
[0107] It can be understood that the spare channel throughput compensation algorithm is a mathematical method that dynamically calculates the capacity that needs to be supplemented by the spare channel according to the resource gap after the main channel is closed. The second error tolerance is the percentage deviation between the actual resource allocation and the target demand after compensation by the spare channel. The balance check is to judge whether the resource allocation is reasonable by comparing the resource allocation situation of each part in the resource pool (such as different channels, different service modules, etc.) with the expected balanced state. For example, check whether the resource usage of each channel is uniform, and whether there is a situation where a certain channel has excessive resource usage or idleness.
[0108] It should be understood that according to the judgment result of the balance check, a clear check result can be output, such as "The resource pool is balanced, and the error is within the tolerance range" or "The resource pool is unbalanced, the error exceeds the tolerance, and adjustment is required", etc., along with specific error values and analysis suggestions.
[0109] In one example, in the spare channel throughput compensation algorithm, the capacity C that needs to be supplemented by the spare channel aux is calculated as follows:
[0110] C aux = min(spare channel maximum capacity, ΔR·b)
[0111] where ΔR is the real-time resource gap caused by the closure of the main channel, and b is the spare channel response coefficient (value range [0.3, 0.5]), which can control the compensation rate. After compensation by the spare channel, the second error tolerance ∈1 is the percentage deviation between the actual resource allocation and the target demand, and is calculated as follows:
[0112]
[0113] where Q aux is the actual compensation amount of the spare channel.
[0114] Step S403, judge whether to close the spare channel of the resource pool according to the check result.
[0115] It can be understood that when closing the spare channel of the resource pool, its output can be gradually reduced at a preset rate (such as reducing 5% of the capacity per second) to avoid resource pool oscillation; at the same time, the resources occupied by the spare channel are returned to the resource pool (such as switching the energy storage battery to the charging mode), and finally the relevant parameters of the spare channel are reset. Through the dual optimization of the efficient recycling of the spare channel and the system stability, a closed-loop solution is provided for the full life cycle management of resource scheduling.
[0116] In this embodiment, when the resource accumulation gradient of the resource pool is detected to be abnormal, the main allocation channel of the resource pool is closed through the closed-loop control node; the second error tolerance of the resource pool is calculated according to a preset spare channel throughput compensation algorithm, and the resource pool is balanced and verified based on the second error tolerance to obtain a verification result; it is determined whether to close the spare channel of the resource pool according to the verification result. When the resource accumulation gradient is detected to be abnormal, the main allocation channel is closed through the closed-loop control node, the second error tolerance is calculated and the resource pool is balanced and verified, and it is determined whether to close the spare channel according to the result, which can take timely countermeasures when resources are abnormal, ensure the stability of the resource pool, and prevent resource accumulation or other abnormal problems from affecting the service.
[0117] It should be noted that the above examples are only for understanding the present application and do not constitute a limitation on the resource scheduling method of the present application. Based on this technical concept, more forms of simple transformations are within the protection scope of the present application.
[0118] The present application also provides a resource scheduling device. Please refer to Figure 4 , the resource scheduling device includes:
[0119] A data processing module 10, configured to process the resource data collected by the data interface based on the service requirements of the target user, and establish a real-time data warehouse and a resource pool;
[0120] A policy generation module 20, configured to calculate the total target resources corresponding to the service requirements through the real-time data warehouse, and adjust the mode parameters of the initial resource scheduling policy according to the total target resources to obtain a target resource scheduling policy;
[0121] A policy scheduling module 30, configured to schedule the resource pool based on the target resource scheduling policy when the resources in the resource pool start to accumulate.
[0122] The resource scheduling device provided by the present application adopts the resource scheduling method in the above embodiment, and can solve the technical problem that the traditional one-way scheduling policy lacks closed-loop verification and cannot meet the dynamic requirements of the service for resources. Compared with the prior art, the beneficial effects of the resource scheduling device provided by the present application are the same as those of the resource scheduling method provided by the above embodiment, and other technical features in the resource scheduling device are the same as those disclosed in the method of the above embodiment, and will not be elaborated here.
[0123] The present application provides a resource scheduling device. The resource scheduling device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the resource scheduling method in the first embodiment above.
[0124] Refer to the following Figure 5 , which shows a schematic structural diagram of a resource scheduling device suitable for implementing the embodiments of the present application. The resource scheduling device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description: tablet computers), PMPs (Portable Media Player: portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The resource scheduling device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
[0125] As Figure 5 shown, the resource scheduling device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory 1002 or the program loaded from the storage device 1003 into the random access memory 1004. In the random access memory 1004, various programs and data required for the operation of the resource scheduling device are also stored. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. The input / output interface 1006 is also connected to the bus. Usually, the following systems may be connected to the input / output interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the resource scheduling device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a resource scheduling device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or had alternatively.
[0126] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product that includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by a processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are executed.
[0127] The resource scheduling device provided in the present application adopts the resource scheduling method in the above-mentioned embodiment, and can solve the technical problem that the traditional one-way scheduling strategy lacks closed-loop verification and cannot meet the dynamic requirements of services for resources. Compared with the prior art, the beneficial effects of the resource scheduling device provided in the present application are the same as those of the resource scheduling method provided in the above-mentioned embodiment, and other technical features in the resource scheduling device are the same as those disclosed in the method of the previous embodiment, and will not be elaborated here.
[0128] It should be understood that the various parts disclosed in the present application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0129] As mentioned above, the above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, and all of them should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0130] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the resource scheduling method in the above-mentioned embodiment.
[0131] The computer-readable storage medium provided by the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: electrical connections with one or more wires, portable computer 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 of the above. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, device, or component. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0132] The above computer-readable storage medium may be included in the resource scheduling device; or it may exist separately and not be assembled into the resource scheduling device.
[0133] The above computer-readable storage medium carries one or more programs. When the above one or more programs are executed by the resource scheduling device, the resource scheduling device is caused to execute the resource scheduling method described above.
[0134] Computer program code for performing the operations of the present application may be written in one or more programming languages or combinations thereof. The above programming languages include object-oriented programming languages - such as Java, Smalltalk, C++; and also include conventional procedural programming languages - such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0135] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0136] The modules described in the embodiments of the present application can be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.
[0137] The readable storage medium provided by the present application is a computer-readable storage medium that stores computer-readable program instructions (i.e., computer programs) for executing the above resource scheduling method, and can solve the technical problem that the traditional one-way scheduling strategy lacks closed-loop verification and cannot meet the dynamic resource requirements of services. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as those of the resource scheduling method provided by the above embodiments, and will not be elaborated here.
[0138] The present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the steps of the resource scheduling method as described above.
[0139] The computer program product provided by the present application can solve the technical problem that the traditional one-way scheduling strategy lacks closed-loop verification and cannot meet the dynamic resource requirements of services. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the resource scheduling method provided by the above embodiments, and will not be elaborated here.
[0140] The above are only some embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structural transformation made under the technical concept of the present application by using the content of the specification and drawings of the present application, or any direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.
Claims
1. A resource scheduling method, characterized in that: The resource scheduling method comprises: Process the resource data collected by the data interface based on the business needs of the target users and establish a real-time data warehouse and resource pool; Calculating the total target resource amount corresponding to the business demand through the real-time data warehouse, and adjusting the mode parameters of the initial resource scheduling strategy according to the total target resource amount to obtain the target resource scheduling strategy; When resources in the resource pool begin to accumulate, the resource pool is scheduled based on the target resource scheduling policy.
2. The resource scheduling method according to claim 1, characterized in that: When the resources in the resource pool begin to accumulate, the step of scheduling the resource pool based on the target resource scheduling strategy includes: When resources in the resource pool begin to accumulate, the total current amount of resources in the resource pool is monitored in real time, and the resource pool is controlled to enter a basic allocation mode, in which the resource pool maintains a minimum allocation channel for scheduling; Determining whether the current total amount of resources reaches a first safety threshold; If yes, then gradually open the main allocation channel and calculate the allocation channel occupancy rate of the current resource pool; When the allocation channel occupancy rate reaches a second safety threshold, the resource pool is scheduled based on an elastic expansion mode.
3. The resource scheduling method according to claim 2, characterized in that: The step of scheduling the resource pool based on the elastic expansion mode when the allocation channel occupancy rate reaches the second safety threshold includes: When the allocation channel occupancy rate reaches a second safety threshold, controlling the resource pool to enter an elastic expansion mode, and continuously monitoring the resource fluctuation rate of the resource pool; If the resource fluctuation rate is less than a third safety threshold, fixing the openness of the main allocation channel of the current resource pool; If the resource fluctuation rate is greater than the third safety threshold, the ratio of the main allocation channel to the backup channel of the resource pool is adjusted, and a resource flow dynamic equation is constructed based on the ratio, and the resource pool is scheduled through the resource flow dynamic equation.
4. The resource scheduling method according to claim 3, characterized in that: If the resource fluctuation rate is greater than the third safety threshold, the ratio of the main allocation channel to the backup channel of the resource pool is adjusted, and a resource flow dynamic equation is constructed based on the ratio. After the step of scheduling the resource pool through the resource flow dynamic equation, the step further includes: When the current total amount of resources reaches the target total amount of resources, calculating a first error tolerance of current resource scheduling based on the business demand; If the first error tolerance exceeds the preset error threshold, a resource reallocation instruction is generated and the step of controlling the resource pool to enter elastic expansion mode and continuously monitoring the resource fluctuation rate of the resource pool is returned until the first error tolerance is less than the preset error threshold.
5. The resource scheduling method according to any one of claims 1 to 4, characterized in that: After the step of scheduling the resource pool based on the target resource scheduling strategy when resources in the resource pool begin to accumulate, the method further includes: When it is detected that the resource accumulation gradient of the resource pool is abnormal, closing the main allocation channel of the resource pool through a closed-loop control node; Calculating a second error tolerance of the resource pool according to a preset standby channel throughput compensation algorithm, and performing a balance check on the resource pool based on the second error tolerance to obtain a check result; Determine whether to close the backup channel of the resource pool according to the verification result.
6. The resource scheduling method according to any one of claims 1 to 4, characterized in that: The step of calculating the total target resource amount corresponding to the business demand through the real-time data warehouse, and adjusting the mode parameters of the initial resource scheduling strategy according to the total target resource amount to obtain the target resource scheduling strategy includes: Extracting resource demand feature vectors related to the business demand from the real-time data warehouse; Based on the resource demand feature vector, calculating the total amount of target resources through a pre-trained elastic scaling model; The mode parameters of the initial resource scheduling strategy are back-propagated and optimized according to the target total amount of resources to obtain the target resource scheduling strategy, wherein the mode parameters include the main channel efficiency coefficient and the backup channel response coefficient.
7. A resource scheduling device, characterized in that: The device comprises: The data processing module is used to process the resource data collected by the data interface based on the business needs of the target users and establish a real-time data warehouse and resource pool; A strategy generation module, configured to calculate the total target resource amount corresponding to the business demand through the real-time data warehouse, and adjust the mode parameters of the initial resource scheduling strategy according to the total target resource amount to obtain the target resource scheduling strategy; A policy scheduling module is used to schedule the resource pool based on the target resource scheduling policy when resources in the resource pool begin to accumulate.
8. A resource scheduling device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the resource scheduling method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the resource scheduling method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the resource scheduling method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Disk resource scheduling method and device, storage medium and program product
CN120723176A
Disk resource scheduling methods, devices, storage media and program products
CN120723176B
Resource allocation method, device and equipment and computer readable storage medium
CN120892217A
