Multi-region cloud resource scheduling and cost optimization method and system
By collecting and tagging multi-region cloud resource data, predicting resource demand and cost fluctuations, generating optimization strategies and verifying compliance, the complexity of multi-region cloud resource cost management is solved, and controllability and consistency of resource allocation are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-08
- Publication Date
- 2026-03-31
AI Technical Summary
In multi-region cloud resource deployments, cost management is complex, making it difficult to accurately track, allocate, and predict cloud costs, leading to budget overruns and resource waste.
Collect cost data, resource usage data, and resource metadata of cloud resources in multiple regions, process them based on cost allocation tagging strategies, generate cost-related data, predict future resource demand and cost fluctuations, generate optimization strategies and match them with the compliance rule base, and call cloud platform interfaces to perform resource scheduling and cost optimization.
By using tagging and predictive optimization, the controllability and consistency of resource allocation for multi-regional cloud resources are improved, and the uncertainty of resource allocation and regional scheduling is reduced.
Smart Images

Figure CN121764682A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing technology, and in particular to a method and system for multi-region cloud resource scheduling and cost optimization. Background Technology
[0002] As companies accelerate their global expansion, their business deployments on global cloud platforms such as AWS are becoming increasingly complex. These companies typically need to deploy services across multiple AWS Regions to be closer to global users and meet data sovereignty requirements. However, this presents significant management challenges: Cost management becomes complex: with globalized teams and complex project structures, accurately tracking, allocating, and predicting cloud costs becomes exceptionally difficult, easily leading to budget overruns and wasted resources. Summary of the Invention
[0003] This application provides a method and system for multi-region cloud resource scheduling and cost optimization, which is used to solve the problem of difficult multi-region cloud resource scheduling in related technologies.
[0004] The first aspect of this application provides a method for multi-region cloud resource scheduling and cost optimization, the method comprising: Cost data, resource usage data, and resource metadata of cloud resources in multiple regions are collected, and the cost data, resource usage data, and resource metadata are processed based on a cost allocation tagging strategy to obtain cost-related data. Based on the cost-related data, the resource demand and cost fluctuations of each region within a preset period are predicted, and the predicted resource demand and cost fluctuation values are generated. An optimization strategy is generated based on the predicted resource demand and cost fluctuation values, and the optimization strategy is matched and verified with a preset compliance rule base to generate corresponding strategy instructions. The cloud platform control interface is invoked according to the policy instructions to perform resource scheduling and cost optimization.
[0005] Optionally, in the first implementation of the first aspect of this application, before the step of collecting cost data, resource usage data, and resource metadata of multi-regional cloud resources, and processing the cost data, resource usage data, and resource metadata based on a cost allocation tagging strategy to obtain cost-related data, the method further includes: Based on the preset business organization structure information, resource deployment hierarchy information, and regional division information, the business dimension, environment dimension, and regional dimension of cloud resources are analyzed to generate tag dimension definition data; By defining the data based on the label dimensions, a set of label rules is obtained by enumerating the combination relationships between different label dimensions. Based on the set of label rules, the range of values for label keys and label values in each label rule is limited to obtain the cost allocation label strategy.
[0006] Optionally, in the second implementation of the first aspect of this application, the step of processing the cost data, resource usage data, and resource metadata based on the cost allocation tagging strategy to obtain cost-related data includes: Based on the cost allocation tagging strategy, corresponding tag keys and tag values are added to cloud resources deployed in multiple geographical regions to generate a resource tag set. The collected cost data, resource usage data, and resource metadata are associated and mapped with the corresponding resources in the resource tag set to generate a tag mapping set. Resources with the same tag key value combination are grouped according to the tag mapping set, and the cost data within the group is accumulated and calculated according to a preset statistical period, and the group cost data is generated by combining the corresponding resource usage data. The grouped cost data is associated with the corresponding tag key value combination to obtain cost association data.
[0007] Optionally, in the third implementation of the first aspect of this application, the step of predicting resource demand and cost fluctuations in each region within a future preset period based on the cost correlation data, and generating predicted resource demand and cost fluctuation values, includes: Based on a preset time window, the grouped cost data of the cost association data is split into time series to generate multiple data subsets of consecutive historical statistical periods; By statistically analyzing the cost data and resource usage data corresponding to each data subset, we can obtain the resource usage change data and cost change data for each region in different historical statistical periods. Trend analysis was performed on the evolution characteristics of resource usage change data and cost change data over multiple historical statistical periods to generate resource usage trend data and cost trend data for each region, and the corresponding trend parameters for each region were determined. The trend parameters are combined with the grouped cost data corresponding to the latest statistical period to generate predicted resource demand data and predicted cost fluctuation data for each region within a future preset period.
[0008] Optionally, in the fourth implementation of the first aspect of this application, the optimization strategy includes a billing method strategy, a resource specification adjustment strategy, and a cross-regional scheduling strategy. The step of generating the optimization strategy based on the resource demand forecast and the cost fluctuation forecast includes: Based on the predicted resource demand, the magnitude of change in resource usage within a preset future period is determined. By comparing the magnitude of change with preset stability judgment conditions, the corresponding cloud resource usage stability parameters are determined. Based on the predicted cost range corresponding to different billing methods in the stability parameters and the predicted cost fluctuation values, determine the billing method selection parameters corresponding to each cloud resource, and generate a billing method strategy. And / or, calculate the difference between the resource usage and the current resource configuration parameters based on the predicted resource demand to obtain resource usage deviation data; By matching the resource usage deviation data with the preset resource specification range, the resource specification adjustment parameters corresponding to each cloud resource are determined, and a resource specification adjustment strategy is generated. And / or, based on the predicted resource demand and cost fluctuation values, compare and calculate the predicted resource costs for different geographical regions within a preset future period to generate regional cost comparison data; By matching the regional cost comparison data with the task attribute parameters of the corresponding cloud resources, a set of target regions is determined, and cross-regional scheduling parameters corresponding to each cloud resource are generated based on the set of target regions to obtain a cross-regional scheduling strategy.
[0009] Optionally, in the fifth implementation of the first aspect of this application, the step of matching and verifying the optimization strategy with a preset compliance rule base to generate a corresponding strategy instruction includes: Based on the optimization strategy, extract strategy parameters related to resource configuration changes and cross-regional scheduling; Based on the preset compliance rule base, the resource deployment area and data flow range corresponding to the strategy parameters are matched with rules to generate compliance verification results; Based on the compliance verification results, the optimization strategies that meet the preset compliance conditions are mapped with instructions to generate policy instructions corresponding to the cloud platform control interface.
[0010] Optionally, in a sixth implementation of the first aspect of this application, the method further includes: By obtaining the resource configuration status information and resource scheduling status information returned by the cloud platform, the execution status data corresponding to the policy instruction is determined, and associated with the policy instruction to generate policy execution record data; The resource usage data and cost data after the collection strategy is executed are aggregated and processed according to the same statistical period as the cost-related data to generate target resource data; By calculating the difference between the target resource data and the corresponding resource demand forecast and cost fluctuation forecast, strategy execution deviation data is generated. The deviation data is aggregated based on resource tags or region tags to generate feedback data for resource scheduling and cost optimization.
[0011] A second aspect of this application provides a multi-region cloud resource scheduling and cost optimization system, which is used to implement a multi-region cloud resource scheduling and cost optimization method. The multi-region cloud resource scheduling and cost optimization system includes: The processing module is used to collect cost data, resource usage data and resource metadata of cloud resources in multiple regions, and process the cost data, resource usage data and resource metadata based on the cost allocation tag strategy to obtain cost-related data. The prediction module is used to predict the resource demand and cost fluctuations of each region within a preset period based on the cost-related data, and generate predicted resource demand and cost fluctuation values. The matching module is used to generate an optimization strategy based on the predicted resource demand and cost fluctuation, and to match and verify the optimization strategy with a preset compliance rule base to generate corresponding strategy instructions. The control module is used to call the cloud platform control interface to perform resource scheduling and cost optimization according to the policy instructions.
[0012] A third aspect of this application provides an electronic device, including a memory and a processor, wherein the processor is configured to execute a computer program stored in the memory, and when the processor executes the computer program, it implements the steps of the multi-region cloud resource scheduling and cost optimization method provided in the first aspect of this application.
[0013] The fourth aspect of this application provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the steps of the multi-region cloud resource scheduling and cost optimization method provided in the first aspect of this application.
[0014] In summary, the multi-region cloud resource scheduling and cost optimization method and system provided in this application collects cost data, resource usage data, and resource metadata of multi-region cloud resources. Based on a cost allocation tagging strategy, the cost data, resource usage data, and resource metadata are processed to obtain cost-related data. Based on the cost-related data, resource demand and cost fluctuations in each region within a preset future period are predicted, generating predicted resource demand values and predicted cost fluctuation values. An optimization strategy is generated based on the predicted resource demand values and predicted cost fluctuation values, and the optimization strategy is matched and verified against a preset compliance rule base to generate corresponding strategy instructions. Based on the strategy instructions, the cloud platform control interface is invoked to perform resource scheduling and cost optimization. This application addresses the problems of dispersed costs, difficult prediction, and lack of scheduling constraints in multi-region cloud resources by tagging cost data, usage data, and metadata of multi-region cloud resources to form cost-related data, and generates compliance-verified scheduling strategy instructions based on the prediction results to control cloud platform resource scheduling. This improves the controllability and consistency of resource allocation. Attached Figure Description
[0015] Figure 1 A flowchart illustrating the multi-region cloud resource scheduling and cost optimization method provided in this application embodiment; Figure 2 A logic diagram is generated for the optimization strategy provided in the embodiments of this application; Figure 3 A schematic diagram of the program modules of the multi-region cloud resource scheduling and cost optimization system provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0016] To make the inventive objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0017] To address the difficulty of multi-region cloud resource scheduling in related technologies, embodiments of this application provide a method for multi-region cloud resource scheduling and cost optimization, such as... Figure 1 This is a flowchart illustrating the multi-region cloud resource scheduling and cost optimization method provided in this embodiment. The multi-region cloud resource scheduling and cost optimization method includes the following steps: Step 110: Collect cost data, resource usage data, and resource metadata of cloud resources in multiple regions, and process the cost data, resource usage data, and resource metadata based on the cost allocation tag strategy to obtain cost-related data.
[0018] Specifically, cloud resource cost data, resource usage data, and resource metadata distributed across multiple geographical regions are collected via interfaces. A unified cost allocation labeling rule is introduced to identify, associate, and standardize data from different sources and with different structures, enabling cost information to correspond to specific resources, regions, and business dimensions, thereby constructing cost-related data with correlation.
[0019] Step 120: Based on cost correlation data, predict the resource demand and cost fluctuations of each region within the future preset period, and generate predicted values for resource demand and cost fluctuations.
[0020] Specifically, based on cost-related data, the resource usage and cost changes of each region in the historical statistical period are divided and statistically calculated over time. By analyzing the relationship between resource usage and cost values in continuous periods, data results reflecting the trend of regional resource demand and cost fluctuations are generated, which are used to characterize the possible changes in resource demand and cost in each region in the future preset period.
[0021] Step 130: Generate an optimization strategy based on the predicted resource demand and cost fluctuations, and match and verify the optimization strategy with the preset compliance rule base to generate the corresponding strategy instructions.
[0022] Specifically, based on the predicted values of resource demand and cost fluctuations, the resource usage status of cloud resources under different configuration methods, billing methods, and regional deployment conditions is compared and calculated. Combining the resource's own attributes and task characteristics, optimization strategies are generated, including billing method selection, resource specification adjustment, and cross-regional scheduling. These optimization strategies are then organized as unified strategy data.
[0023] Step 140: Call the cloud platform control interface according to the policy instructions to perform resource scheduling and cost optimization.
[0024] Specifically, the optimization strategy is matched and verified against the preset compliance rule base. Constraints are applied to the strategy content involving resource deployment area, resource configuration changes and data flow scope. If the compliance conditions are met, the corresponding strategy instructions are generated and executed by calling the cloud platform control interface to complete the scheduling and configuration adjustment of cloud resources in multiple regions.
[0025] In one optional implementation of this embodiment, before the step of collecting cost data, resource usage data, and resource metadata of cloud resources in multiple regions, and processing the cost data, resource usage data, and resource metadata based on a cost allocation tagging strategy to obtain cost-related data, the method further includes: parsing the business dimension, environment dimension, and region dimension of cloud resources according to preset business organizational structure information, resource deployment level information, and regional division information to generate tag dimension definition data; enumerating the combination relationships between different tag dimensions through the tag dimension definition data to obtain a tag rule set; and limiting the value range of tag keys and tag values in each tag rule according to the tag rule set to obtain a cost allocation tagging strategy.
[0026] In this embodiment, in a multi-region cloud resource management scenario, the generation of tag dimension definition data relies on the systematic analysis of business organizational structure information, resource deployment hierarchy information, and regional division information. Business organizational structure information describes the management units within an enterprise and their affiliations, such as departments, project teams, or business lines. This information reflects the ownership of cloud resources at the business level. Resource deployment hierarchy information describes the hierarchical position of cloud resources within the technical architecture, such as production, testing, or development environments. This information distinguishes the usage attributes of resources in different operating environments. Regional division information describes the actual geographical area where cloud resources are deployed, distinguishing the data carrying locations in different countries or regions. When analyzing the above information, business affiliation, operating environment, and geographical region are mapped to independent dimension fields, forming business, environment, and regional dimensions. These dimensions are described using a unified data structure, ultimately generating tag dimension definition data to characterize the classification criteria of cloud resources from different management perspectives. After obtaining the tag dimension definition data, a set of tag rules is constructed by systematically enumerating the combinable relationships between different dimensions. Enumeration refers to the cross-combination of business, environmental, and regional dimensions without altering the meaning of individual dimensions, thereby forming a tag structure that can cover all resource classification scenarios. For example, in the application scenario of a cross-border e-commerce platform, the business dimension can include order systems, payment systems, and inventory systems; the environmental dimension can include production environments and testing environments; and the regional dimension can include Asian regions and European regions. By combining these dimensions, various combinations can be formed, such as order system-production environment-Asian region and payment system-testing environment-European region. Each combination corresponds to a complete tag key-value structure, which describes a class of cloud resources with the same business attributes, operational attributes, and regional attributes, thus constituting a tag rule set. Based on the construction of the tag rule set, it is necessary to limit the range of tag keys and tag values in each tag rule to form a tag strategy that can be used for cost allocation. Tag keys are used to identify dimension types, such as business identifiers, environmental identifiers, or regional identifiers, while tag values are used to identify specific dimension content. The process of limiting the range of values refers to defining constraints on tag values by combining the actual hierarchical relationship of the business organizational structure, the standardized requirements of resource deployment, and regional compliance constraints. For example, in cross-border e-commerce platform scenarios, the tag values corresponding to business identifiers can only be selected from the order system, payment system, and inventory system; the tag values corresponding to environment identifiers can only be selected from the production or testing environment; and the tag values corresponding to region identifiers can only be selected from the Asian or European regions. This approach avoids the problem of chaotic cost allocation caused by arbitrarily entered tag values.Ultimately, by uniformly defining the range of tag keys and tag values, a cost allocation tag strategy is formed, enabling each cloud resource to be assigned a combination of tags that conforms to the rules when it is created or identified.
[0027] In one optional implementation of this embodiment, the step of processing cost data, resource usage data, and resource metadata based on a cost allocation tagging strategy to obtain cost-related data includes: adding corresponding tag keys and tag values to cloud resources deployed in multiple geographical areas according to the cost allocation tagging strategy to generate a resource tag set; associating and mapping the collected cost data, resource usage data, and resource metadata with the corresponding resources in the resource tag set to generate a tag mapping set; grouping resources with the same tag key-value combination according to the tag mapping set; accumulating and calculating the cost data within the group according to a preset statistical period, and generating grouped cost data by combining it with the corresponding resource usage data; and associating the grouped cost data with the corresponding tag key-value combination to obtain cost-related data.
[0028] In this embodiment, in a multi-region cloud resource management scenario, the cost allocation tagging strategy is used to standardize the identification methods of cloud resources under different business, environmental, and regional dimensions. Its core function is to establish a unified and traceable identification system for distributed cloud resources. According to the cost allocation tagging strategy, when identifying cloud resources deployed in multiple geographical regions, predefined tag keys and tag values need to be written into the attribute information of the corresponding cloud resources. The tag key indicates the dimension type to which the resource belongs, such as a business affiliation identifier or a regional identifier, while the tag value indicates the specific business name, operating environment, or geographical region. By attaching rule-compliant tag key-value pairs to each cloud resource, a resource tag set with resources as the basic unit can be formed. This set can completely describe the attribute status of cloud resources at the business, environmental, and regional levels. After forming the resource tag set, the collected cost data, resource usage data, and resource metadata are associated and mapped with the resource identifiers in the resource tag set. Cost data describes the cost of cloud resources within a billing cycle, while resource usage data describes the usage of cloud resources within the corresponding cycle, such as the duration of computing resource usage or the capacity of storage resources. Resource metadata describes the basic attribute information of cloud resources, such as resource type or configuration specifications. The association mapping process involves matching these three types of data with corresponding resources in a resource tag set, using the unique identifier of the cloud resource as a connecting link, thus forming a tag mapping set. Each record in the tag mapping set contains a resource identifier, a tag key-value combination, and corresponding cost and usage values, allowing scattered data to be centrally expressed around a tag structure. After obtaining the tag mapping set, resources with the same tag key-value combination are grouped. Grouping refers to grouping cloud resources belonging to the same business, environment, and region into the same resource group based on the unified identifier of the tag key-value combination. Taking a cross-border e-commerce platform as an example, all computing instances identified as order systems, production environments, and the Asia region will be grouped into the same group. After grouping, the cost data within each group is accumulated according to a preset statistical period. The statistical period defines the time range for cost aggregation, such as daily or monthly. During the accumulation process, the cost values generated by each resource within the same group within the statistical period are summarized and combined with the corresponding resource usage data to uniformly record the resource usage within the group, thereby generating grouped cost data. Grouped cost data reflects the overall cost and usage status of resources under a specific tag combination within a specified time range. After generating grouped cost data, it is associated with the corresponding tag key-value combinations to form cost-related data. The cost-related data uses the tag key-value combinations as an index to centrally express the grouped cost and usage information, ensuring that cost data no longer exists in isolation but is clearly attributed to specific business units, operating environments, and geographical regions.
[0029] In one optional implementation of this embodiment, the step of predicting resource demand and cost fluctuations in each region within a preset future period based on cost-related data, and generating predicted resource demand and cost fluctuation values, includes: splitting the grouped cost data of the cost-related data into time series based on a preset time window to generate multiple data subsets for consecutive historical statistical periods; statistically analyzing the cost data and resource usage data corresponding to each data subset to obtain resource usage change data and cost change data for each region within different historical statistical periods; performing trend analysis on the evolution characteristics of resource usage change data and cost change data within multiple historical statistical periods to generate resource usage trend data and cost trend data for each region, and determining the change trend parameters for each region; and combining the change trend parameters with the grouped cost data corresponding to the latest statistical period to generate predicted resource demand data and predicted cost fluctuation data for each region within the preset future period.
[0030] In this embodiment, in a multi-region cloud resource cost analysis scenario, cost-related data has been grouped according to tag key-value combinations, forming grouped cost data corresponding to business, environment, and region. To characterize the changes in resource demand and cost over time, the grouped cost data is first split into time series based on a preset time window. The preset time window is used to limit the statistical time granularity, such as dividing by month or week, and this time window remains consistent throughout the analysis process. By dividing the grouped cost data within a continuous time range according to the time window, multiple historical statistical period data subsets that are consecutive in time can be obtained. Each data subset contains cost values and resource usage values within the corresponding period, thus forming a data sequence arranged in chronological order. After completing the time series splitting, the cost data and resource usage data contained in each historical statistical period data subset are statistically processed to summarize the resource consumption status and cost level of a certain region within a single statistical period. The resource usage data is used to characterize the occupancy of computing, storage, or network resources within that period, and the cost data is used to characterize the corresponding expense expenditure. By statistically analyzing each historical statistical period, data on resource usage and cost changes in each region over different time periods can be obtained, clearly expressing the temporal distribution characteristics of resource consumption and cost expenditure. After obtaining resource usage and cost change data over multiple historical statistical periods, trend analysis is performed on their evolution characteristics over time. Trend analysis describes the overall trend of change data over multiple consecutive periods, such as continuous growth, gradual decline, or periodic fluctuations. By comparing the change data of each region over different historical statistical periods, resource usage trend data and cost trend data can be generated. Resource usage trend data reflects the direction of change in resource demand over time, while cost trend data reflects the direction of change in expenditure over time. Based on this, the change magnitude data over multiple consecutive statistical periods are comprehensively organized to form a trend parameter characterizing the direction of change in regional resources and costs. This parameter describes the directionality and persistence of change. After determining the trend parameter corresponding to each region, the trend parameter is combined with the grouped cost data corresponding to the latest statistical period for calculation. Combined calculation refers to extrapolating resource consumption and cost changes within a future preset period based on the known resource usage and cost figures for the latest statistical period, combined with trend parameters. The extrapolation process uses historical variation as a basis, extending the calculations to the latest data to generate predicted resource demand and cost fluctuation data for each region within the future preset period.
[0031] In one optional implementation of this embodiment, the step of generating an optimization strategy based on the predicted resource demand and the predicted cost fluctuation includes: determining the magnitude of change in resource usage within a preset future period based on the predicted resource demand; determining the usage stability parameter of the corresponding cloud resource by comparing the magnitude of change with preset stability judgment conditions; determining the billing method selection parameter corresponding to each cloud resource based on the usage stability parameter and the predicted cost range corresponding to different billing methods in the predicted cost fluctuation, and generating a billing method strategy; and / or, calculating the difference between the resource usage and the current resource configuration parameter based on the predicted resource demand to obtain resource usage deviation data; determining the resource specification adjustment parameter corresponding to each cloud resource by matching the resource usage deviation data with a preset resource specification range, and generating a resource specification adjustment strategy; and / or, comparing and calculating the predicted resource cost of different geographical regions within a preset future period based on the predicted resource demand and the predicted cost fluctuation, and generating regional cost comparison data; determining a target region set by matching the regional cost comparison data with the task attribute parameters of the corresponding cloud resource, and generating cross-regional scheduling parameters corresponding to each cloud resource based on the target region set, and obtaining a cross-regional scheduling strategy.
[0032] In this embodiment, as Figure 2As shown, the optimization strategies include billing method strategies, resource specification adjustment strategies, and cross-regional scheduling strategies. In multi-region cloud resource management scenarios, the resource demand forecast is used to describe the expected changes in the usage of each cloud resource within a preset future period. This value is based on the existing resource usage status. Based on the resource demand forecast, the magnitude of the change in resource usage within the future period is first calculated. The magnitude of the change reflects the degree of difference between the predicted usage and the current usage. Preset stability judgment conditions are used to describe whether the changes in resource usage are within a controllable range. These judgment conditions can be composed of an absolute value range or a percentage range of the change magnitude. By comparing the change magnitude with the preset stability judgment conditions, it can be determined whether the resource usage exhibits a continuously stable state or a significant fluctuation state within the future period. This generates a corresponding usage stability parameter for each cloud resource to characterize the stability of the resource load. After determining the usage stability parameters, a correlation analysis is performed between the usage stability parameters and the predicted cost ranges corresponding to different billing methods in the cost fluctuation forecast. The billing method describes the cost calculation form of cloud resources under different billing rules. Different billing methods correspond to different cost range change characteristics. The predicted cost range describes the potential cost range for a specific billing method within a preset future period. By comparing the stability parameters with the predicted cost ranges of each billing method, the most suitable billing method selection parameters can be determined under stable conditions, and a billing strategy can be generated accordingly. Taking a cross-border e-commerce platform as an example, when the order system experiences relatively small long-term load changes, a billing method with a more stable predicted cost range can be selected, while resources with larger fluctuations require different billing strategy configurations. In resource specification adjustment scenarios, the difference between the predicted resource demand and the current resource configuration parameters is calculated. The resource configuration parameters describe the current computing specifications or capacity configuration of the cloud resources. The difference calculation yields resource usage deviation data, reflecting the degree of deviation between predicted demand and existing configuration. The preset resource specification range describes the usage scope corresponding to different configuration levels. By matching the resource usage deviation data with the resource specification range, the required specification adjustment direction for cloud resources within a future period can be determined, and corresponding resource specification adjustment parameters can be generated, thus forming a resource specification adjustment strategy. In cross-regional scheduling scenarios, predicted resource demand and cost fluctuations are used to compare and calculate the predicted resource costs for different geographical regions over a pre-defined period. Regional cost comparison data reflects the cost differences of the same type of resource under different regional deployment conditions. Task attribute parameters describe the characteristics of the tasks carried by the cloud resources, such as latency or regional restrictions. By matching regional cost comparison data with task attribute parameters, a set of regions that meet the task constraints and have low predicted costs can be selected. Based on this, cross-regional scheduling parameters corresponding to each cloud resource can be generated, forming a cross-regional scheduling strategy.For example, in cross-border e-commerce platforms, data analysis tasks can be scheduled to be executed in regions with lower predicted costs based on regional cost comparison results, thereby completing the overall generation of resource deployment strategies.
[0033] In one optional implementation of this embodiment, the step of matching and verifying the optimization strategy with a preset compliance rule base to generate corresponding strategy instructions includes: extracting strategy parameters related to resource configuration changes and cross-regional scheduling based on the optimization strategy; performing rule matching on the resource deployment area and data flow range corresponding to the strategy parameters according to the preset compliance rule base to generate compliance verification results; and mapping the optimization strategies that meet the preset compliance conditions to generate strategy instructions corresponding to the cloud platform control interface based on the compliance verification results. In this embodiment, in a multi-regional cloud resource scheduling scenario, the optimization strategy already includes billing method selection, resource specification adjustment, and cross-regional scheduling, but not all strategy content will directly trigger operations on the cloud platform side. Therefore, it is necessary to extract strategy parameters related to resource configuration changes and cross-regional scheduling from the optimization strategy. The strategy parameters are used to describe the specific resource adjustment intention, such as the target of resource specification change, the direction of resource deployment area change, and the data range involved in task migration. By performing structured parsing of the optimization strategy, information such as resource instances, target areas, adjustment types, and adjustment magnitudes are extracted into a standardized set of strategy parameters, enabling the subsequent rule verification process to be processed based on clear data objects. After obtaining the set of policy parameters, a pre-defined compliance rule base is introduced to validate the policy parameters. The pre-defined compliance rule base stores constraints related to resource deployment and data flow, and its content is derived from internal enterprise management standards, data compliance requirements, and regional regulatory restrictions. Compliance rules define the geographical scope of deployable resources and the boundaries of data flow between different regions. The resource deployment region refers to the target geographical location after adjustments to the cloud resource plan, and the data flow scope describes the cross-regional data transfer that may be involved due to resource migration or configuration adjustments. By matching the target deployment region and data flow description contained in the policy parameters with the constraints in the compliance rule base item by item, it can be determined whether the policy has regional conflicts or data flow violations, thereby generating a compliance validation result. The compliance validation result characterizes whether the policy parameters meet the pre-defined compliance conditions, and the result can be expressed as either a pass or a restriction status. When the resource deployment region corresponding to the policy parameters meets the regional usage constraints, and the data flow scope does not trigger the restriction conditions, the policy is marked as meeting the compliance conditions. Otherwise, it is marked as not meeting the compliance conditions and excluded from the executable scope. In cross-border e-commerce platform applications, if the order system involves user data, the compliance rule base may restrict this type of data to only specific regions. When a cross-regional scheduling strategy includes migrating related resources to a region that does not meet the requirements, the compliance verification result will indicate that the strategy does not meet the conditions. After generating the compliance verification result, the optimization strategy that meets the preset compliance conditions undergoes instruction mapping processing. Instruction mapping refers to converting abstract strategy parameters into operation instructions that can be recognized by the cloud platform control interface.The cloud platform control interface receives resource management commands and executes corresponding resource configuration adjustments or scheduling operations. Different types of policy parameters correspond to different interface call commands. By combining the resource identifier, target configuration parameters, and region information in the compliance policy according to the interface requirements, policy commands consistent with the format of the cloud platform control interface are generated, enabling resource configuration changes and cross-regional scheduling to be accurately executed under compliance constraints.
[0034] In one optional implementation of this embodiment, by obtaining resource configuration status information and resource scheduling status information returned by the cloud platform, the execution status data corresponding to the strategy instruction is determined and associated with the strategy instruction to generate strategy execution record data; resource usage data and cost data after strategy execution are collected and aggregated according to the same statistical period as the cost-related data to generate target resource data; by calculating the difference between the target resource data and the corresponding resource demand forecast value and cost fluctuation forecast value, strategy execution deviation data is generated; the deviation data is aggregated based on resource tags or region tags to generate feedback data for resource scheduling and cost optimization.
[0035] In this embodiment, after a policy instruction is issued to the cloud platform control interface and triggers resource configuration adjustments or cross-regional scheduling, the cloud platform returns status information related to the instruction execution process. Resource configuration status information describes whether resource specifications have changed and the configuration after the change, while resource scheduling status information describes whether the resource has completed regional migration or task scheduling. These two types of status information together reflect the execution result of the policy instruction on the cloud platform side. By acquiring the status information and mapping it to the resource identifier and adjustment content in the original policy instruction, the execution status data of each policy instruction can be determined, such as successful execution, partial execution, or non-execution. The execution status data is associated with the corresponding policy instruction to form structured policy execution record data, used to completely record the correspondence between policy issuance and execution results, ensuring the traceability of the resource adjustment process. After the policy execution is completed and enters a stable operation phase, resource usage data and cost data continue to be collected after policy execution. Resource usage data describes the actual resource occupancy after policy execution, and cost data describes the expenses incurred within the corresponding time frame. To ensure data comparability before and after execution, the collected data is aggregated and processed according to the same statistical period as the cost-related data, maintaining consistency in the time dimension. By aggregating resource usage and cost values within the same statistical period, target resource data is generated, reflecting the actual operational status of cloud resources after the policy directive takes effect. After obtaining the target resource data, a difference calculation is performed between it and the corresponding resource demand forecast and cost fluctuation forecast. The resource demand forecast describes the expected level of resource usage in the future period before policy execution, while the cost fluctuation forecast describes the expected cost changes within the corresponding period. By subtracting the predicted usage from the actual usage in the target resource data, the resource usage deviation is obtained; by comparing the actual cost value with the predicted cost range, the cost deviation is obtained. The difference calculation results constitute policy execution deviation data, used to quantify the degree of difference between the policy execution result and the prediction result. After generating the policy execution deviation data, the deviation data is aggregated according to resource tags or region tags. Resource tags identify the business, environment, and region attributes to which the resource belongs, while region tags identify the geographical location of the resource deployment. By centrally aggregating deviation data with the same label attributes, feedback results can be generated by business unit or region. Taking a cross-border e-commerce platform as an example, by aggregating deviation data of the order system in the Asian region, the overall feedback on resource scheduling and cost changes in that region can be clearly reflected. The resulting resource scheduling and cost optimization feedback data describes the performance of strategy execution under different resource categories and regional dimensions, providing a data foundation for the next strategy adjustment and decision-making, and effectively improving the accuracy of strategy execution.
[0036] Preferably, the strategy execution deviations in the feedback data are analyzed and processed. Resource usage deviation describes the difference between actual resource usage and predicted resource demand, while cost deviation describes the magnitude of the difference between actual and predicted costs. By judging the direction and magnitude of the deviation values, it can be determined whether there are deviations in the original optimization strategy in terms of resource allocation, billing method selection, or regional scheduling. For example, if the resource usage deviation corresponding to a certain resource tag shows a long-term positive deviation, it indicates that the original resource specification adjustment parameters are lower than the actual demand level. If the cost deviation is consistently higher than the predicted range, it indicates that there is a mismatch between the billing method strategy or regional selection parameters and the actual cost structure. After completing the deviation judgment, the key parameters in the original optimization strategy are corrected according to the different types of deviations. For resource specification adjustment strategies, resource configuration parameters can be recalculated based on resource usage deviations to make the configuration level closer to the actual usage demand. For billing method strategies, the selection parameters corresponding to different billing methods can be reordered or switched based on the cost deviation results. For cross-regional scheduling strategies, the target region set can be adjusted based on the cost deviation results at the regional level to redetermine the region range that meets the cost conditions and task attribute constraints. The above correction process is based on the original strategy parameters. By adjusting the numerical values of the deviation data, the strategy content maintains structural consistency, updating only the parameter values. After the strategy parameter correction is completed, the updated strategy is reorganized into a complete set of optimized strategies and matched again against the currently valid compliance rule base to confirm that the corrected strategy parameters still meet the established constraints in terms of resource deployment area and data flow scope. The optimized strategy that passes compliance verification is confirmed as a valid strategy update result and is used to replace the original strategy version.
[0037] This invention unifies the collection and tagging of cost data, resource usage data, and resource metadata for cloud resources across multiple regions, forming cost-related data corresponding to business, environmental, and regional dimensions. This enables clear attribution and accurate statistical analysis of cloud resource costs across multiple dimensions. By splitting and calculating changes based on historical statistical periods, it quantitatively predicts resource demand and cost fluctuations, making resource usage trends and cost changes calculable. Furthermore, by combining resource usage stability, configuration deviations, and regional cost differences, it generates resource configuration, billing methods, and scheduling-related strategies. Under compliance rules, it generates executable strategy instructions, ensuring consistency and controllability in the cloud resource scheduling process, thereby reducing uncertainty in resource configuration and regional scheduling.
[0038] Figure 3 This application provides a multi-region cloud resource scheduling and cost optimization system, which can be used to implement the multi-region cloud resource scheduling and cost optimization method described in the foregoing embodiments. For example... Figure 3 As shown, this multi-region cloud resource scheduling and cost optimization system mainly includes: The processing module 10 is used to collect cost data, resource usage data and resource metadata of cloud resources in multiple regions, and process the cost data, resource usage data and resource metadata based on the cost allocation tag strategy to obtain cost-related data. The prediction module 20 is used to predict the resource demand and cost fluctuations of each region within a preset period based on cost-related data, and generate predicted values for resource demand and cost fluctuations. Matching module 30 is used to generate optimization strategies based on resource demand forecasts and cost fluctuation forecasts, and to match and verify the optimization strategies with a preset compliance rule base to generate corresponding strategy instructions. The control module 40 is used to call the cloud platform control interface to perform resource scheduling and cost optimization according to policy instructions.
[0039] In an optional implementation of this embodiment, the processing module is further configured to: parse the business dimension, environment dimension, and region dimension of cloud resources according to preset business organizational structure information, resource deployment level information, and region division information, and generate tag dimension definition data; enumerate the combination relationships between different tag dimensions through the tag dimension definition data to obtain a tag rule set; and limit the value range of tag keys and tag values in each tag rule according to the tag rule set to obtain a cost allocation tag strategy.
[0040] In one optional implementation of this embodiment, the processing module is specifically used to: add corresponding tag keys and tag values to cloud resources deployed in multiple geographical areas according to the cost allocation tag strategy, generate a resource tag set, associate and map the collected cost data, resource usage data, and resource metadata with the corresponding resources in the resource tag set, and generate a tag mapping set; group resources with the same tag key value combination according to the tag mapping set, accumulate and calculate the cost data within the group according to a preset statistical period, and generate group cost data by combining the corresponding resource usage data; associate the group cost data with the corresponding tag key value combination to obtain cost association data.
[0041] In one optional implementation of this embodiment, the prediction module is specifically used to: split the grouped cost data of cost-related data into time series based on a preset time window to generate multiple data subsets for consecutive historical statistical periods; obtain resource usage change data and cost change data for each region in different historical statistical periods by statistically analyzing the cost data and resource usage data corresponding to each data subset; perform trend analysis on the evolution characteristics of resource usage change data and cost change data in multiple historical statistical periods to generate resource usage trend data and cost trend data for each region, and determine the change trend parameters for each region; combine the change trend parameters with the grouped cost data corresponding to the latest statistical period to generate predicted resource demand data and predicted cost fluctuation data for each region in the future preset period.
[0042] In an optional implementation of this embodiment, when the matching module performs the function of generating an optimization strategy based on the predicted resource demand and the predicted cost fluctuation, it is specifically used for: determining the change range of resource usage within a preset future period based on the predicted resource demand; determining the usage stability parameter of the corresponding cloud resource by comparing the change range with a preset stability judgment condition; determining the billing method selection parameter corresponding to each cloud resource based on the usage stability parameter and the predicted cost range corresponding to different billing methods in the predicted cost fluctuation, and generating a billing method strategy; and / or, calculating the difference between the resource usage and the current resource configuration parameter based on the predicted resource demand to obtain resource usage deviation data; determining the resource specification adjustment parameter corresponding to each cloud resource by matching the resource usage deviation data with a preset resource specification range, and generating a resource specification adjustment strategy; and / or, comparing and calculating the predicted resource cost of different geographical regions within a preset future period based on the predicted resource demand and the predicted cost fluctuation, and generating regional cost comparison data; determining the target region set by matching the regional cost comparison data with the task attribute parameters of the corresponding cloud resource, and generating cross-regional scheduling parameters corresponding to each cloud resource based on the target region set, and obtaining a cross-regional scheduling strategy.
[0043] In one optional implementation of this embodiment, the matching module is specifically used to: extract strategy parameters related to resource configuration changes and cross-regional scheduling according to the optimization strategy; perform rule matching on the resource deployment area and data flow range corresponding to the strategy parameters according to the preset compliance rule base, and generate compliance verification results; and perform instruction mapping on the optimization strategy that meets the preset compliance conditions according to the compliance verification results, and generate strategy instructions corresponding to the cloud platform control interface.
[0044] In an optional implementation of this embodiment, the control module is further configured to: determine the execution status data corresponding to the strategy instruction by obtaining the resource configuration status information and resource scheduling status information returned by the cloud platform, and associate it with the strategy instruction to generate strategy execution record data; collect resource usage data and cost data after strategy execution, and perform summary processing according to the same statistical period as the cost-related data to generate target resource data; generate strategy execution deviation data by calculating the difference between the target resource data and the corresponding resource demand forecast value and cost fluctuation forecast value; and collect the deviation data based on resource tags or region tags to generate feedback data for resource scheduling and cost optimization.
[0045] The multi-region cloud resource scheduling and cost optimization system provided in this application collects cost data, resource usage data, and resource metadata of cloud resources in multiple regions. Based on a cost allocation tagging strategy, it processes the cost data, resource usage data, and resource metadata to obtain cost-related data. Based on this cost-related data, it predicts resource demand and cost fluctuations in each region within a preset future period, generating predicted resource demand and cost fluctuation values. Based on these predicted values, it generates optimization strategies and matches and verifies them against a preset compliance rule base to generate corresponding strategy instructions. Finally, it calls the cloud platform control interface based on these strategy instructions to perform resource scheduling and cost optimization. This application addresses the problems of dispersed costs, difficult prediction, and lack of scheduling constraints in multi-region cloud resources by tagging cost data, usage data, and metadata of multi-region cloud resources to form cost-related data. Based on the prediction results, it generates compliance-verified scheduling strategy instructions to control cloud platform resource scheduling, thereby improving the controllability and consistency of resource allocation.
[0046] According to the scheme provided in this application Figure 4 An electronic device is provided as an embodiment of this application. This electronic device can be used to implement the multi-region cloud resource scheduling and cost optimization method described in the foregoing embodiments, and mainly includes: The system includes a memory 401, a processor 402, and a computer program 403 stored on the memory 401 and executable on the processor 402. The memory 401 and the processor 402 are connected via communication. When the processor 402 executes the computer program 403, it implements the multi-region cloud resource scheduling and cost optimization method described in the foregoing embodiments. The number of processors can be one or more.
[0047] The memory 401 can be a high-speed random access memory (RAM) or a non-volatile memory, such as a disk storage device. The memory 401 is used to store executable program code, and the processor 402 is coupled to the memory 401.
[0048] Furthermore, embodiments of this application also provide a computer-readable storage medium, which may be disposed in the electronic device described in the above embodiments, and the computer-readable storage medium may be as described above. Figure 4 The memory in the illustrated embodiment.
[0049] The computer-readable storage medium stores a computer program that, when executed by a processor, implements the multi-region cloud resource scheduling and cost optimization method described in the foregoing embodiments. Furthermore, the computer-readable storage medium can also be a USB flash drive, external hard drive, read-only memory (ROM), RAM, magnetic disk, or optical disk, or any other medium capable of storing program code.
[0050] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0051] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0052] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for multi-region cloud resource scheduling and cost optimization, characterized in that, The method comprises the following steps: Collecting cost data, resource usage data and resource metadata of multi-region cloud resources, and processing the cost data, resource usage data and resource metadata based on a cost allocation tag strategy to obtain cost correlation data; According to the cost correlation data, the resource demand and cost fluctuation of each region in the future preset period are predicted to generate resource demand prediction value and cost fluctuation prediction value; According to the resource demand prediction value and cost fluctuation prediction value, an optimization strategy is generated, and the optimization strategy is matched and verified with a preset compliance rule library to generate corresponding strategy instructions; According to the strategy instructions, the cloud platform control interface is called to perform resource scheduling and cost optimization.
2. The method of claim 1, wherein, Before the step of collecting cost data, resource usage data and resource metadata of multi-region cloud resources, and processing the cost data, resource usage data and resource metadata based on a cost allocation tag strategy to obtain cost correlation data, the method further comprises the following steps: According to the preset business organization structure information, resource deployment level information and region division information, the business dimension, environment dimension and region dimension of the cloud resources are analyzed to generate label dimension definition data; The combination relationship between different label dimensions is enumerated through the label dimension definition data to obtain a label rule set; According to the label rule set, the value range of the label key and the label value in each label rule is limited to obtain a cost allocation tag strategy.
3. The multi-zone cloud resource scheduling and cost optimization method of claim 2, wherein, The step of processing the cost data, resource usage data and resource metadata based on the cost allocation tag strategy to obtain the cost correlation data comprises the following steps: According to the cost allocation tag strategy, corresponding label keys and label values are added to the cloud resources deployed in multiple geographic regions to generate a resource label set The collected cost data, resource usage data and resource metadata are respectively associated and mapped with the corresponding resources of the resource label set to generate a label mapping set; According to the label mapping set, the resources with the same label key value combination are grouped, the cost data in the group is accumulated according to a preset statistical period, and the grouped cost data is combined with the corresponding resource usage data to generate grouped cost data; The grouped cost data is associated with the corresponding label key value combination to obtain cost correlation data.
4. The multi-zone cloud resource scheduling and cost optimization method of claim 3, wherein, The step of predicting the resource demand and cost fluctuation of each region in the future preset period according to the cost correlation data to generate resource demand prediction value and cost fluctuation prediction value comprises the following steps: Based on a preset time window, the grouped cost data of the cost correlation data is time series split to generate a plurality of continuous historical statistical period data subsets; Through the statistics of the corresponding cost data and resource usage data in each data subset, the resource usage change data and cost change data of each region in different historical statistical periods are obtained; The evolution characteristics of the resource usage change data and the cost change data in multiple historical statistical periods are respectively analyzed to generate the resource usage trend data and the cost trend data corresponding to each region, and the change trend parameters corresponding to each region are determined; The change trend parameter is combined with the grouping cost data corresponding to the latest statistical period to generate predicted resource demand data and predicted cost fluctuation data corresponding to each region in a future preset period.
5. The method of claim 1, wherein, The optimization strategy includes a charging mode strategy, a resource specification adjustment strategy, and a cross-region scheduling strategy. The step of generating the optimization strategy according to the resource demand prediction value and the cost fluctuation prediction value includes: According to the resource demand prediction value, the change range of the resource usage in the future preset period is determined, and the use stability parameter of the corresponding cloud resource is determined by comparing the change range with a preset stability determination condition; According to the use stability parameter and the predicted cost interval corresponding to different charging modes in the cost fluctuation prediction value, the charging mode selection parameter corresponding to each cloud resource is determined to generate the charging mode strategy; And / or, the resource usage deviation data is obtained by performing difference calculation on the resource usage and the current resource configuration parameter according to the resource demand prediction value; The resource specification adjustment parameter corresponding to each cloud resource is determined by matching the resource usage deviation data with a preset resource specification interval to generate the resource specification adjustment strategy; And / or, the predicted resource cost of different geographical regions in the future preset period is calculated by comparing the resource demand prediction value and the cost fluctuation prediction value to generate regional cost comparison data; The target region set is determined by matching the regional cost comparison data with the task attribute parameter of the corresponding cloud resource, and the cross-region scheduling parameter corresponding to each cloud resource is generated according to the target region set to obtain the cross-region scheduling strategy.
6. The method of claim 1, wherein, The step of matching and verifying the optimization strategy with a preset compliance rule library to generate corresponding strategy instructions includes: According to the optimization strategy, the strategy parameters related to resource configuration changes and cross-region scheduling are extracted; According to the preset compliance rule library, the resource deployment region and the data flow range corresponding to the strategy parameters are matched according to the rules to generate a compliance verification result; According to the compliance verification result, the optimization strategy that meets the preset compliance condition is mapped to instructions to generate strategy instructions corresponding to the cloud platform control interface.
7. The method of claim 1, wherein, The method further includes: By obtaining the resource configuration state information and the resource scheduling state information returned by the cloud platform, the execution state data corresponding to the strategy instructions is determined and associated with the strategy instructions to generate strategy execution record data; Resource usage data and cost data after strategy execution are collected, and target resource data is generated by aggregating the data according to the same statistical period as the cost association data; Strategy execution deviation data is generated by performing difference calculation on the target resource data, the corresponding resource demand prediction value, and the cost fluctuation prediction value; The deviation data is collected based on resource tags or region tags to generate feedback data for resource scheduling and cost optimization.
8. A multi-zone cloud resource scheduling and cost optimization system, characterized in that, The multi-region cloud resource scheduling and cost optimization system is used to implement the multi-region cloud resource scheduling and cost optimization method of claim 1, and the multi-region cloud resource scheduling and cost optimization system includes: The processing module is configured to collect cost data, resource usage data and resource metadata of the multi-region cloud resource, and process the cost data, the resource usage data and the resource metadata based on a cost allocation tag policy to obtain cost correlation data; The prediction module is configured to predict resource demand and cost fluctuation of each region in a future preset period according to the cost correlation data, and generate a resource demand prediction value and a cost fluctuation prediction value; The matching module is configured to generate an optimization strategy according to the resource demand prediction value and the cost fluctuation prediction value, and perform matching verification on the optimization strategy and a preset compliance rule library to generate a corresponding strategy instruction; The control module is configured to call a cloud platform control interface to perform resource scheduling and cost optimization according to the strategy instruction.
9. An electronic device, comprising: The computer program is executed by the processor to implement the steps in the multi-region cloud resource scheduling and cost optimization method of any one of claims 1 to 7. The computer program is executed by the processor to implement the steps in the multi-region cloud resource scheduling and cost optimization method of any one of claims 1 to 7. 10. A computer-readable storage medium having stored thereon a computer program, characterized in that,