Resource dynamic adjustment method and device based on bills and readable storage medium

Through bill-based prediction models and resource monitoring, resources are dynamically adjusted, which solves the problem of poor dynamic adjustment of resources in the existing technology and achieves improvements in real-time performance and resource utilization efficiency.

CN118585330APending Publication Date: 2024-09-03CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410730431.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Existing resource dynamic adjustment methods such as load balancing and elastic scaling have algorithms that are not suitable for actual load changes and false triggers, resulting in poor dynamic resource adjustment effects.

Method used

By obtaining the historical billing data of the target object, a bill prediction model is established to predict future billing data, and dynamically adjust resources according to the preset resource monitoring duration, including resource expansion or reduction.

Benefits of technology

It realizes real-time monitoring of system status and load changes, quickly and accurately adjusts resources, improves system flexibility and overall availability, and improves resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585330A
    Figure CN118585330A
Patent Text Reader

Abstract

The invention provides a bill-based resource dynamic adjustment method and device and a readable storage medium, and the method specifically comprises the steps: obtaining historical bill data of a target object; obtaining a bill prediction model according to the historical bill data, and predicting the bill data of the target object at the next moment through the bill prediction model; predicting future bill data of the target object in the future time length according to the bill prediction model and the bill data at the next moment; and dynamically adjusting the resources according to the preset resource monitoring duration and the future bill data. According to the method, the system state, the load change and the future demand trend can be monitored in real time, so that the resources can be quickly and accurately adjusted. The real-time adjustment can better meet user requirements, and the overall availability of the system is improved. Besides, by dynamically allocating and releasing the resources, the system can ensure sufficient resource supply without wasting the resources, and the overall resource utilization efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, and in particular to a bill-based resource dynamic adjustment method, device and readable storage medium. Background Art

[0002] Dynamic resource adjustment refers to real-time adjustment of resource allocation based on factors such as system load and demand changes to improve system performance, efficiency and flexibility. For example, in the computer room scenario, the scenario includes resources such as servers, storage, network, and power.

[0003] At present, common methods for dynamic resource adjustment include load balancing and elastic scaling. The principle of load balancing is to distribute the system's workload (such as requests and tasks) to multiple servers to ensure that the load on each server is relatively even, avoiding overloading of a single node and affecting system performance. The core principle of elastic scaling is to dynamically adjust the system's resource scale according to the real-time changes in the system load to meet different workload requirements.

[0004] However, there are many algorithms in load balancing, and it may happen that the algorithm is not suitable for the actual load changes. Elastic scaling is prone to false triggering, resulting in poor actual effect of dynamic resource adjustment. Summary of the invention

[0005] The technical problem to be solved by the present application is to provide a bill-based resource dynamic adjustment method, device and readable storage medium to solve the problems existing in the prior art in view of the above-mentioned deficiencies in the prior art.

[0006] In a first aspect, the present application provides a method for dynamic resource adjustment based on bills, the method comprising:

[0007] S1. Obtain the historical billing data of the target object;

[0008] S2. Obtaining a bill prediction model according to the historical bill data, and predicting the bill data of the target object at the next moment by using the bill prediction model;

[0009] S3, predicting the future billing data of the target object in the future time length according to the bill prediction model and the billing data at the next moment;

[0010] S4. Dynamically adjust resources according to the preset resource monitoring duration and the future billing data.

[0011] In some embodiments, after S1, the method further includes:

[0012] Performing data statistics on the historical bill data according to a preset time granularity to obtain the historical bill data at the preset time granularity;

[0013] S2, including:

[0014] Model training is performed according to the historical bill data at the preset time granularity to obtain a bill prediction model based on time series, and the bill prediction model is used to predict the bill data of the target object at the first moment after the preset time granularity;

[0015] The next moment billing data is the first moment billing data of the target object at a preset time granularity.

[0016] In some embodiments, the future time length includes at least one preset time granularity;

[0017] S3, including:

[0018] Prediction is performed based on the bill prediction model and the bill data of the target object at the first moment thereafter at a preset time granularity to obtain bill data of the target object at multiple moments thereafter at a preset time granularity.

[0019] In some embodiments, prediction is performed based on the bill prediction model and the bill data of the target object at the first moment after the preset time granularity to obtain bill data of the target object at multiple moments after the preset time granularity, including:

[0020] Predicting based on the bill prediction model and the bill data of the target object at the first moment after the preset time granularity, obtaining the bill data of the target object at the second moment after the preset time granularity;

[0021] Predicting based on the bill prediction model and the bill data of the target object at the second moment after the preset time granularity, obtaining the bill data of the target object at the third moment after the preset time granularity;

[0022] The subsequent prediction process is repeated in this way until the prediction result satisfies the future time length.

[0023] In some embodiments, S4 includes:

[0024] Get the current billing data;

[0025] Determine the billing data at different times corresponding to the preset resource monitoring time period according to the preset resource monitoring time period and the future billing data;

[0026] Dynamic resource adjustment is performed based on the correlation between the billing data at the current moment and the corresponding billing data at different moments within the preset resource monitoring duration.

[0027] In some embodiments, dynamically adjusting resources according to the correlation between the current billing data and the corresponding billing data at different times within the preset resource monitoring duration includes:

[0028] Determine the maximum billing data and the minimum billing data among the billing data at different times corresponding to the preset resource monitoring time;

[0029] Dynamically adjust resources according to the correlation between the current billing data, the maximum billing data and the minimum billing data.

[0030] In some embodiments, dynamically adjusting resources according to the correlation between the current billing data, the maximum billing data, and the minimum billing data includes at least one of the following:

[0031] If the current billing data is greater than the maximum billing data, resource capacity reduction processing is performed;

[0032] If the current billing data is greater than the minimum billing data and less than the maximum billing data, resource expansion processing is performed;

[0033] If the current billing data is less than the minimum billing data, resource expansion processing is performed.

[0034] In some embodiments, when performing dynamic resource adjustment, the resource adjustment rate is determined by the following formula:

[0035] a=(Smax-S0) / (Smax-Smin)

[0036] Among them, a represents the resource adjustment rate, Smax represents the maximum bill data, S0 represents the bill data at the current moment, and Smin represents the minimum bill data.

[0037] In a second aspect, the present application provides a bill-based resource dynamic adjustment device, the device comprising:

[0038] A data acquisition module configured to acquire historical billing data of a target object;

[0039] A bill prediction module is configured to obtain a bill prediction model based on the historical bill data, and predict the next moment bill data of the target object through the bill prediction model; and predict the future bill data of the target object in the future time length based on the bill prediction model and the next moment bill data;

[0040] The resource adjustment module is configured to dynamically adjust resources according to a preset resource monitoring duration and the future billing data.

[0041] In a third aspect, the present application provides a bill-based resource dynamic adjustment device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to implement the bill-based resource dynamic adjustment method described in the first aspect above.

[0042] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the bill-based dynamic resource adjustment method described in the first aspect above is implemented.

[0043] The bill-based resource dynamic adjustment method, device and readable storage medium provided by the present application are specifically, obtaining the historical bill data of the target object; obtaining a bill prediction model according to the historical bill data, and predicting the next moment bill data of the target object through the bill prediction model; predicting the future bill data of the target object in the future time length according to the bill prediction model and the next moment bill data; and dynamically adjusting resources according to the preset resource monitoring duration and the future bill data. The present application provides a bill-based resource dynamic adjustment method, and the beneficial effects include: ① Real-time performance is significantly improved: The dynamic resource adjustment method of the present application can monitor the system status, load changes and future demand trends in real time, so that resources can be adjusted quickly and accurately. This real-time performance and responsiveness enable the system to adapt to changing workloads more flexibly and maintain efficient performance. Compared with traditional static resource configuration, this real-time adjustment can better meet user needs and improve the overall availability of the system. ② Improved resource utilization efficiency: The present application uses the user's historical data to establish a model through the changes in the bill data on the user side, and can more intuitively and efficiently predict the user's actual situation, thereby realizing dynamic resource adjustment. By dynamically allocating and releasing resources, the system can ensure sufficient resource supply without wasting resources, thereby improving overall resource utilization efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0045] Figure 1 A flowchart of a bill-based resource dynamic adjustment method provided in an embodiment of the present application;

[0046] Figure 2 A flowchart of another bill-based resource dynamic adjustment method provided in an embodiment of the present application;

[0047] Figure 3 A schematic diagram of the structure of a bill-based resource dynamic adjustment device provided in an embodiment of the present application;

[0048] Figure 4 A schematic diagram of the structure of another bill-based resource dynamic adjustment device provided in an embodiment of the present application.

[0049] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0050] In order to enable those skilled in the art to better understand the technical solution of the present application, the implementation mode of the present application will be further described in detail below with reference to the accompanying drawings.

[0051] It should be understood that the specific embodiments and drawings described herein are only used to explain the present application, rather than to limit the present application.

[0052] It can be understood that, in the absence of conflict, the various embodiments in the present application and the various features in the embodiments can be combined with each other.

[0053] It can be understood that, for the convenience of description, the drawings of the present application only show the parts related to the present application, while the parts unrelated to the present application are not shown in the drawings.

[0054] It can be understood that each unit and module involved in the embodiments of the present application may correspond to only one physical structure, or may be composed of multiple physical structures, or multiple units and modules may be integrated into one physical structure.

[0055] It can be understood that the terms "first", "second", etc. in the embodiments of the present application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.

[0056] It is understandable that, in the absence of conflict, the functions and steps marked in the flowcharts and block diagrams of the present application may occur in an order different from that marked in the drawings.

[0057] It is understood that the flowcharts and block diagrams of the present application illustrate the possible architectures, functions, and operations of the systems, devices, equipment, and methods according to the various embodiments of the present application. Among them, each box in the flowchart or block diagram may represent a unit, module, program segment, code, which contains executable instructions for implementing the specified functions. Moreover, each box or combination of boxes in the block diagram and flowchart may be implemented by a hardware-based system that implements the specified functions, or by a combination of hardware and computer instructions.

[0058] It can be understood that the units and modules involved in the embodiments of the present application can be implemented by software or hardware, for example, the units and modules can be located in a processor.

[0059] The following are two most common methods for dynamically adjusting computer room resources in the prior art:

[0060] 1. Load balancing:

[0061] The principle of load balancing is to distribute the system's workload (such as requests and tasks) to multiple servers to ensure that the load on each server is relatively even and to avoid overloading a single node and affecting system performance. Common load balancing algorithms include polling, minimum number of connections, and minimum response time.

[0062] a. The polling algorithm distributes each new request to different servers in sequence, achieving simple load balancing.

[0063] b. The minimum number of connections algorithm sends requests to the server with the least current connections to ensure a more even distribution.

[0064] c. The minimum response time algorithm selects the server with the shortest response time to improve the response speed of the overall system.

[0065] Load balancing can be implemented on traditional hardware devices or dedicated software, or with the help of professional load balancer hardware. Its advantages include improved system performance, scalability, and availability. However, the selection and configuration of load balancing algorithms have a significant impact on system performance and need to be optimized according to specific scenarios.

[0066] 2. Elastic scaling:

[0067] The core principle of elastic scaling is to dynamically adjust the system's resource scale according to the real-time changes in the system load to meet different workload requirements. Elastic scaling is divided into two forms: vertical scaling and horizontal scaling.

[0068] a. Vertical scaling improves system performance by increasing the resources (such as CPU, memory) of a single node. This means upgrading the hardware specifications of the server so that it can handle a larger load.

[0069] b. Horizontal expansion is to increase the number of nodes by adding more server instances to handle the load.

[0070] Autoscaling can be configured manually or automatically through the autoscaling service of a cloud service provider. The conditions and rules that trigger scaling are usually based on system monitoring indicators, such as CPU utilization, memory usage, etc. The advantage of autoscaling is that it responds to demand changes in real time, improving the flexibility and cost-effectiveness of the system.

[0071] The study found that the existing technology has the following shortcomings:

[0072] 1. Load balancing:

[0073] ① Irrationality of algorithm selection: The effect of load balancing directly depends on the selected algorithm, and different load balancing algorithms are suitable for different scenarios. If the selected algorithm is unreasonable or does not adapt to the characteristics of actual load changes, it may lead to uneven load, with some servers being overloaded and some servers being lightly loaded. For example, the polling algorithm may lead to uneven load distribution in some cases, and the minimum connection number algorithm may be affected by inconsistent connection duration.

[0074] ②Deployment and management costs: Deploying and maintaining a load balancing system may involve certain costs, including the purchase, configuration, and maintenance of hardware or software load balancers. In addition, the tuning of load balancing algorithms and the setting of parameters also require certain expertise. In some cases, additional human resources may be required to monitor and adjust the load balancing system to ensure that it continues to operate effectively.

[0075] 2. Elastic scaling:

[0076] ① False triggering and oscillation: The automatic triggering mechanism of elastic scaling is usually based on monitoring system indicators (such as CPU utilization, memory usage) to determine whether the system scale needs to be adjusted. However, fluctuations or instantaneous peaks of these monitoring indicators may lead to false triggering, causing the system to frequently perform scaling operations. Such false triggering may cause the system scale to change frequently in a short period of time, resulting in unnecessary resource waste and performance fluctuations (i.e. "scaling oscillation").

[0077] ② Time delay in resource adjustment: After detecting a load change, elastic scaling requires a certain amount of time to perform resource adjustment operations, such as starting a new server instance or shutting down an unnecessary instance. This time delay may cause the system to have performance bottlenecks when the load suddenly increases, and over-allocate resources when the load suddenly decreases. For some applications that are very sensitive to latency, such as real-time data processing systems, this time delay may become a problem.

[0078] Based on this, this application proposes a new method for dynamic resource adjustment based on billing, which obtains customer historical data, establishes a bill prediction model, predicts billing data for future time lengths, and dynamically adjusts resources in combination with preset resource monitoring time.

[0079] The beneficial effects of this patent include:

[0080] ① Significantly improved real-time performance: The dynamic resource adjustment method of this application can monitor system status, load changes, and future demand trends in real time, so that resources can be adjusted quickly and accurately. This real-time performance and responsiveness enable the system to adapt to changing workloads more flexibly and maintain efficient performance. Compared with traditional static resource configuration, this real-time adjustment can better meet user needs and improve the overall availability of the system.

[0081] ② Improved resource utilization efficiency: This application uses the user's billing data changes and the user's historical data to build a model, which can more intuitively and efficiently predict the user's actual situation, thereby achieving dynamic resource adjustment. By dynamically allocating and releasing resources, the system can ensure sufficient resource supply without wasting resources, thereby improving overall resource utilization efficiency.

[0082] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0083] The present application provides a bill-based resource dynamic adjustment method, the working process of which can be implemented by electronic devices, such as computers, handheld smart terminals, etc. For ease of explanation, the present application describes the method execution subject as a computer in each embodiment.

[0084] Figure 1 A schematic diagram of a bill-based resource dynamic adjustment method provided in an embodiment of the present application, Figure 2 Another schematic diagram of the bill-based resource dynamic adjustment method provided in the embodiment of the present application is as follows: Figure 1 as well as Figure 2 As shown, the present application provides a bill-based resource dynamic adjustment method, the method includes S1-S4, which are as follows:

[0085] S1. Obtain the historical billing data of the target object;

[0086] Specifically, taking the computer room environment as an example, based on all computer rooms in the area within a certain period of time, the target object corresponds to each customer under each computer room, and the customers include but are not limited to: mobile network customers, fixed network customers, Internet of Things customers, etc.

[0087] Taking electricity as an example, the historical bill data of the customer is obtained according to the above customer. For example, the electricity bill data includes the amount of electricity generated by the machine resources rented by the customer at fixed time intervals and the corresponding electricity bill data.

[0088] It is understandable that the resources in this application may also be other types of resources, and this application does not limit this.

[0089] Exemplarily, the bill data can be used for training subsequent bill prediction models, and the data can directly reflect the actual business volume of the customer. For example, the electricity bill is positively correlated with the business volume, and the greater the business volume, the greater the power consumption.

[0090] S2. Obtaining a bill prediction model according to the historical bill data, and predicting the bill data of the target object at the next moment by using the bill prediction model;

[0091] In some embodiments, after S1, the method further includes: performing data statistics on the historical bill data according to a preset time granularity to obtain the historical bill data at the preset time granularity;

[0092] S2, including: performing model training according to the historical billing data at the preset time granularity to obtain a time series-based bill prediction model, and predicting the billing data of the target object at the first moment after the preset time granularity through the bill prediction model; the next moment billing data is the billing data of the target object at the first moment after the preset time granularity.

[0093] Specifically, based on the historical billing data of the above-mentioned customer, taking the electricity charges in the billing data as an example, the data is aggregated and merged with 5 minutes (or other time lengths) as the preset time granularity.

[0094] For example: Generally speaking, the granularity of customer's electricity bill data is relatively small, for example, there will be a record every 5 seconds, and there will be 60 records in 5 minutes. Correspondingly, the data needs to be summarized and merged, and the total electricity bill (or electricity consumption) in the 60 data points is counted as the total electricity bill (or electricity consumption) of the customer within 5 minutes.

[0095] The total electricity bill (or electricity usage) of the customer every 5 minutes is used as a training sample, and the total electricity bill (or electricity usage) 5 minutes after the training sample is used as a training sample label, and an electricity bill (or electricity usage) prediction model based on a time series (i.e., the model) is established. The time series model is a supervised algorithm that is currently commonly used in the field of machine learning.

[0096] Furthermore, based on the customer's current total electricity charge (or electricity usage) data at a 5-minute granularity, the prediction model is used to predict the customer's electricity charge at the next moment.

[0097] Exemplarily, the time series model may select an LSTM (Long Short-Term Memory) model, and input the customer's total electricity bill (or power usage) every 5 minutes into the model's units according to the time series characteristics. By extracting the time series data features and fusing the memory information in each unit, the total electricity bill (or power usage) data for each customer in the next time period (5 minutes) is finally obtained.

[0098] S3, predicting the future billing data of the target object in the future time length according to the bill prediction model and the billing data at the next moment;

[0099] In some embodiments, the future time length includes at least one preset time granularity;

[0100] S3, including: predicting according to the bill prediction model and the bill data of the target object at the first moment after the preset time granularity, to obtain the bill data of the target object at multiple moments after the preset time granularity.

[0101] In some embodiments, prediction is performed based on the bill prediction model and the bill data of the target object at the first moment after the preset time granularity to obtain bill data of the target object at multiple moments after the preset time granularity, including:

[0102] Predicting based on the bill prediction model and the bill data of the target object at the first moment after the preset time granularity, obtaining the bill data of the target object at the second moment after the preset time granularity;

[0103] Predicting based on the bill prediction model and the bill data of the target object at the second moment after the preset time granularity, obtaining the bill data of the target object at the third moment after the preset time granularity;

[0104] The subsequent prediction process is repeated in this way until the prediction result satisfies the future time length.

[0105] Specifically, the future time length is the preset prediction time length, and the corresponding prediction times of the model can be determined. For example, if the preset prediction time length (i.e., the predicted future time length) is 20 minutes, the corresponding prediction times is 4 times, i.e., the prediction data within 0-5 minutes, the prediction data within 5-10 minutes, the prediction data within 10-15 minutes, and the prediction data within 15-20 minutes in the future.

[0106] The above predicted bill data for the next moment (0-5 minutes in the future, i.e. the first moment thereafter) is used as a training sample, and the customer's electricity charge for the next moment (i.e. within the next 5-10 minutes) is predicted based on the bill prediction model.

[0107] The bill data of the next moment (5-10 minutes in the future, i.e. the second moment thereafter) predicted above is used as a training sample, and the electricity charge of the customer at the next moment (i.e. within the next 10-15 minutes) is predicted according to the bill prediction model.

[0108] Taking the bill data of the next next moment (the next 10-15 minutes, that is, the third moment after) predicted above as training samples, the customer's electricity bill of the next next next moment (the next 15-20 minutes, that is, the fourth moment after) is predicted according to the bill prediction model.

[0109] If the preset prediction time length is greater than 4 times, continue to execute the above prediction steps until the preset prediction times are reached.

[0110] It should be explained that due to the unpredictability of the model for unknown events, the preset number of predictions is not recommended to be greater than 5, and the corresponding preset prediction time length is not recommended to be greater than 5*model sample time granularity.

[0111] S4. Dynamically adjust resources according to the preset resource monitoring duration and the future billing data.

[0112] In some embodiments, S4 includes: obtaining billing data at the current moment; determining billing data at different moments corresponding to the preset resource monitoring time period based on the preset resource monitoring time period and the future billing data; and dynamically adjusting resources based on the correlation between the billing data at the current moment and the billing data at different moments corresponding to the preset resource monitoring time period.

[0113] In some embodiments, dynamically adjusting resources according to the correlation between the current billing data and the corresponding billing data at different times within the preset resource monitoring duration includes:

[0114] Determine the maximum billing data and the minimum billing data among the billing data at different times corresponding to the preset resource monitoring time;

[0115] Dynamically adjust resources according to the correlation between the current billing data, the maximum billing data and the minimum billing data.

[0116] In some embodiments, dynamically adjusting resources according to the correlation between the current billing data, the maximum billing data, and the minimum billing data includes at least one of the following:

[0117] If the current billing data is greater than the maximum billing data, resource capacity reduction processing is performed;

[0118] If the current billing data is greater than the minimum billing data and less than the maximum billing data, resource expansion processing is performed;

[0119] If the current billing data is less than the minimum billing data, resource expansion processing is performed.

[0120] Specifically, taking the preset resource monitoring duration as the goal, the prediction data of each time is integrated according to the sample time granularity of the model, and the upper and lower limits of resource adjustment are set.

[0121] For example, if the preset resource monitoring duration is 15 minutes and the model's sample time granularity is 5 minutes, then the first three forecast data in the above forecast bill data (sorted in chronological order, the first three are the three time periods closest to the current time, namely: the next 0-5 minutes, the next 5-10 minutes, and the next 10-15 minutes) need to be merged. The merging steps are as follows:

[0122] Comparing the maximum and minimum values ​​of the electricity fee data in the three time periods with the current electricity fee data, the following results are obtained:

[0123] ①S0>Smax>Smin

[0124] ②Smax>S0>Smin

[0125] ③Smax>Smin>S0

[0126] Among them, Smax represents the maximum bill data, S0 represents the bill data at the current moment, and Smin represents the minimum bill data.

[0127] Corresponding to situation ①, it means that the electricity charges in the three predicted time periods in the future are in a decreasing state compared with the current moment, and will not be higher than the current electricity charges. The corresponding dynamic adjustment of resources is: capacity reduction;

[0128] Corresponding to situation ②, it means that the electricity charges in the three predicted time periods in the future are partially rising and partially falling compared to the current moment, some are higher than the current electricity charges, and some are lower than the current electricity charges. The corresponding dynamic adjustment of resources is: capacity expansion;

[0129] Corresponding to situation ③, it means that the electricity charges in the three predicted time periods in the future are in an upward state compared with the current moment, and will not be lower than the current electricity charges. The corresponding dynamic adjustment of resources is: capacity expansion;

[0130] In some embodiments, when performing dynamic resource adjustment, the resource adjustment rate is determined by the following formula:

[0131] a=(Smax-S0) / (Smax-Smin)

[0132] Among them, a represents the resource adjustment rate, Smax represents the maximum bill data, S0 represents the bill data at the current moment, and Smin represents the minimum bill data.

[0133] Specifically, at a preset time granularity in the future, according to the upper and lower limits determined above, the resources of the customer are dynamically adjusted within a specified time period, and the resource adjustment rate is determined by the above formula.

[0134] The value of a can be positive or negative. A positive value indicates that future resources will be insufficient and a capacity expansion strategy is needed; a negative value indicates that future resources will be sufficient and a capacity reduction strategy is needed to avoid wasting resources.

[0135] For example, if the maximum, minimum, and current electricity bill data of a user in the next three time periods (5 minutes each, a total of 15 minutes) are 80, 70, and 100 respectively, then according to the above formula, the user's electricity bill upper limit in the next 15 minutes is 80 and the lower limit is 70, and the corresponding resource adjustment rate is -2, indicating that a capacity reduction strategy is needed in the next 15 minutes.

[0136] In addition, assuming that the specified time for executing the above capacity reduction strategy within 15 minutes is 10 seconds (generally the default is the first 10 seconds from the beginning of the 15 minutes), (assuming that the electricity price and capacity are in a one-to-one correspondence, for example, an electricity price of 80 means a capacity of 80), it means that the resource capacity needs to be reduced from 100 to 80 within 10 seconds, that is, the capacity reduction adjustment is performed at a rate of 2 per second, and the duration is 10 seconds.

[0137] The present application provides a bill-based dynamic resource adjustment method, and the beneficial effects include: ① Real-time performance is significantly improved: The dynamic resource adjustment method of the present application can monitor the system status, load changes and future demand trends in real time, so that resources can be adjusted quickly and accurately. This real-time performance and responsiveness enable the system to adapt to changing workloads more flexibly and maintain efficient performance. Compared with traditional static resource configuration, this real-time adjustment can better meet user needs and improve the overall availability of the system. ② Improved resource utilization efficiency: The present application uses the user's historical data to build a model through changes in billing data on the user side, and can more intuitively and efficiently predict the user's actual situation, thereby realizing dynamic resource adjustment. By dynamically allocating and releasing resources, the system can ensure sufficient resource supply without wasting resources, thereby improving overall resource utilization efficiency.

[0138] It should be understood that, although the various steps in the flowcharts in the above-described embodiments are sequentially displayed according to the indications of the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and they can be executed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily to be carried out sequentially, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0139] Figure 3 A schematic diagram of a bill-based resource dynamic adjustment device provided in an embodiment of the present application, such as Figure 3 As shown, the present application provides a bill-based resource dynamic adjustment device, the device comprising:

[0140] A data acquisition module 11, which is configured to acquire historical bill data of a target object;

[0141] The bill prediction module 12 is configured to obtain a bill prediction model based on the historical bill data, and predict the bill data of the target object at the next moment through the bill prediction model; and predict the future bill data of the target object at a future time length based on the bill prediction model and the bill data at the next moment;

[0142] The resource adjustment module 13 is configured to dynamically adjust resources according to a preset resource monitoring duration and the future billing data.

[0143] Regarding the limitation of the bill-based resource dynamic adjustment device, please refer to the limitation of the bill-based resource dynamic adjustment method in the above embodiments of the present application, and this embodiment will not be repeated here.

[0144] Figure 4 Another schematic diagram of a bill-based resource dynamic adjustment device provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, in some embodiments, the present application provides a bill-based resource dynamic adjustment device, including a memory 22 and a processor 21, the memory stores a computer program, and the processor is configured to run the computer program to execute the bill-based resource dynamic adjustment method in the above-mentioned embodiments of the present application.

[0145] The memory is connected to the processor, the memory may be a flash memory or a read-only memory or other memory, and the processor may be a central processing unit or a single-chip microcomputer.

[0146] In some embodiments, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the bill-based dynamic resource adjustment method in the above-mentioned embodiments of the present application is implemented.

[0147] The computer-readable storage medium includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable read only memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer.

[0148] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present application, but the present application is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and substance of the present application, and these modifications and improvements are also considered to be within the scope of protection of the present application.

Claims

1. A bill-based resource dynamic adjustment method. It is characterized in that The method comprises: S1. Obtain the historical billing data of the target object; S2. Obtaining a bill prediction model according to the historical bill data, and predicting the bill data of the target object at the next moment by using the bill prediction model; S3, predicting the future billing data of the target object in the future time length according to the bill prediction model and the billing data at the next moment; S4. Dynamically adjust resources according to the preset resource monitoring duration and the future billing data.

2. The method for dynamic resource adjustment based on bills according to claim 1, It is characterized in that After S1, it also includes: Performing data statistics on the historical bill data according to a preset time granularity to obtain the historical bill data at the preset time granularity; S2, including: Model training is performed according to the historical bill data at the preset time granularity to obtain a bill prediction model based on time series, and the bill prediction model is used to predict the bill data of the target object at the first moment after the preset time granularity; The next moment billing data is the first moment billing data of the target object at a preset time granularity.

3. The method for dynamic resource adjustment based on bill according to claim 2, It is characterized in that The future time length includes at least one preset time granularity; S3, including: Prediction is performed based on the bill prediction model and the bill data of the target object at the first moment thereafter at a preset time granularity to obtain bill data of the target object at multiple moments thereafter at a preset time granularity.

4. The method for dynamic resource adjustment based on bills according to claim 3, It is characterized in that Predicting according to the bill prediction model and the first bill data of the target object at a preset time granularity to obtain bill data of the target object at multiple subsequent moments at a preset time granularity includes: Predicting based on the bill prediction model and the bill data of the target object at the first moment after the preset time granularity, obtaining the bill data of the target object at the second moment after the preset time granularity; Predicting based on the bill prediction model and the bill data of the target object at the second moment after the preset time granularity, obtaining the bill data of the target object at the third moment after the preset time granularity; The subsequent prediction process is repeated in this way until the prediction result satisfies the future time length.

5. The method for dynamic resource adjustment based on bill according to claim 1, It is characterized in that S4, including: Get the current billing data; Determine the billing data at different times corresponding to the preset resource monitoring time period according to the preset resource monitoring time period and the future billing data; Dynamic resource adjustment is performed based on the correlation between the billing data at the current moment and the corresponding billing data at different moments within the preset resource monitoring duration.

6. The method for dynamic resource adjustment based on bills according to claim 5, It is characterized in that Dynamically adjusting resources according to the correlation between the current billing data and the corresponding billing data at different times within the preset resource monitoring duration includes: Determine the maximum billing data and the minimum billing data among the billing data at different times corresponding to the preset resource monitoring time; Dynamically adjust resources according to the correlation between the current billing data, the maximum billing data and the minimum billing data.

7. The method for dynamic resource adjustment based on bills according to claim 6, It is characterized in that Dynamically adjusting resources according to the correlation between the current billing data, the maximum billing data, and the minimum billing data includes at least one of the following: If the current billing data is greater than the maximum billing data, resource capacity reduction processing is performed; If the current billing data is greater than the minimum billing data and less than the maximum billing data, resource expansion processing is performed; If the current billing data is less than the minimum billing data, resource expansion processing is performed.

8. The method for dynamic resource adjustment based on bills according to claim 7, It is characterized in that When resources are dynamically adjusted, the resource adjustment rate is determined by the following formula: a=(Smax-S0) / (Smax-Smin) Among them, a represents the resource adjustment rate, Smax represents the maximum bill data, S0 represents the bill data at the current moment, and Smin represents the minimum bill data.

9. A bill-based resource dynamic adjustment device, It is characterized in that The device comprises: A data acquisition module configured to acquire historical billing data of a target object; A bill prediction module is configured to obtain a bill prediction model based on the historical bill data, and predict the next moment bill data of the target object through the bill prediction model; and predict the future bill data of the target object in the future time length based on the bill prediction model and the next moment bill data; The resource adjustment module is configured to dynamically adjust resources according to a preset resource monitoring duration and the future billing data.

10. A resource dynamic adjustment device based on bills, It is characterized in that The method comprises a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to implement the bill-based dynamic resource adjustment method according to any one of claims 1 to 8.

11. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the bill-based dynamic resource adjustment method according to any one of claims 1 to 8 is implemented.