Capacity expansion method, device, system and storage medium
By predicting the preemption time indicator data and resource increment in the edge computing scenario and determining the capacity expansion, the problems of limited edge computing resources and inefficient expansion efficiency are solved, and business resource guarantee and resource utilization efficiency are improved during resource shortage periods.
Patent Information
- Application Number
- CN202210680103.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-16
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-06-16
AI Technical Summary
In the edge computing scenario, the container resource expansion mechanism has problems such as limited resources and low efficiency, which leads to the inability to meet business needs during resource shortage periods, and low resource utilization efficiency during non-hot time periods.
By obtaining current and historical indicator data, predicting future preemption time indicator data, determining the total capacity expansion, and expanding capacity based on the predicted preemption time, resource increment and capacity expansion probability, using deep learning network to process index data to improve prediction accuracy.
During the resource shortage period, business resource requirements are guaranteed through resource seizure, improving the effectiveness of expansion and resource utilization efficiency.
Smart Images

Figure CN114866563B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud computing, and in particular to a capacity expansion method, device, system and storage medium. Background Art
[0002] In order to improve resource utilization and ensure the service quality of the business, the container cluster provides two dynamic resource expansion and contraction methods: HPA (horizontal pod autoscaling) and VPA (vertical pod autoscaler), which adjust the number of containers and resource size in real time according to resource usage. The relevant technology provides a specific solution as follows: 1) The user declares the expansion object, trigger mechanism (indicator threshold) and resource limit; 2) The HPA / VPA Controller receives the user's declaration; 3) The declared expansion indicator is queried from the indicator database (metric server) at regular intervals; 4) If the indicator meets the threshold range declared by the user, the number of pods or the amount of resources that the replication controller (Replication Controller, abbreviated as: RC) needs to expand is calculated according to the rules (corresponding to HPA and VPA respectively); 5) The expansion of resources is realized. Summary of the invention
[0003] After analysis, the inventors found that edge computing nodes have the characteristics of limited resources and small scale. The container resource expansion mechanism of the related technology has certain limitations in this scenario due to resource constraints. The use of edge resources usually has periodic characteristics such as "tidal effect". Considering the resource construction and maintenance costs of edge scenarios and the limited characteristics of edge resources, resources will not be constructed in edge scenarios according to the peak conditions at the time of resource hot spots. Therefore, there are situations where the resource load is high during hot time periods and cannot meet business needs. Furthermore, the expansion and contraction solutions provided by the related technology also have the following problems:
[0004] 1) For services with high service quality requirements, the capacity expansion mechanism may be triggered late, resulting in insufficient resources to achieve effective capacity expansion through the HPA and VPA mechanisms when resources are scarce;
[0005] 2) For the above services, if resources are allocated according to the maximum peak resource demand, it will lead to low resource utilization efficiency during non-hotspot time periods.
[0006] A technical problem to be solved by the embodiments of the present invention is: how to improve the effectiveness of capacity expansion while improving the efficiency of resource utilization.
[0007] According to a first aspect of some embodiments of the present invention, there is provided a capacity expansion method, comprising: obtaining current indicator data and historical indicator data; using the current indicator data and historical indicator data to predict indicator data of future preemption time; determining a total expansion capacity based on the predicted indicator data of preemption time; and expanding capacity based on the total expansion capacity.
[0008] In some embodiments, determining the total expansion capacity based on the indicator data of the predicted preemption time includes: determining the resource increment corresponding to the preemption time based on the indicator data of the predicted preemption time; determining the expansion coefficient based on the resource increment; predicting the expansion probability of the preemption time by using the current indicator data, historical indicator data and historical expansion events; determining the total expansion capacity based on the resource increment corresponding to the preemption time, the expansion coefficient and the predicted expansion probability of the preemption time.
[0009] In some embodiments, the indicator data includes at least one of user access volume, service resource usage, or cluster resource surplus.
[0010] In some embodiments, determining the resource increment corresponding to the preemption time includes: determining a predicted user growth coefficient based on historical user access volume and user access volume at the preemption time; determining a predicted business growth coefficient based on historical business resource usage and business resource usage at the preemption time; determining the resource increment corresponding to the preemption time based on the maximum value of the user growth coefficient and the business growth coefficient and the business resource usage at the preemption time.
[0011] In some embodiments, determining the expansion factor according to the resource increment includes: determining the expansion factor according to a ratio of the resource increment to a predicted remaining amount of cluster resources.
[0012] In some embodiments, determining the expansion coefficient based on the ratio of the resource increment and the predicted remaining amount of cluster resources includes: when the ratio of the resource increment and the predicted remaining amount of cluster resources is less than a preset lower limit, determining the expansion coefficient as 0; or, when the ratio of the resource increment and the predicted remaining amount of cluster resources is between a preset lower limit and a preset upper limit, determining the expansion coefficient as a ratio; or, when the ratio of the resource increment and the predicted remaining amount of cluster resources is greater than a preset upper limit, determining the expansion coefficient as 1.
[0013] In some embodiments, using current indicator data, historical indicator data and historical expansion events to predict the expansion probability of future preemption time includes: using a deep learning network to process the current indicator data, historical indicator data and historical expansion events to obtain the expansion probability of future preemption time.
[0014] In some embodiments, determining the total expansion capacity based on the resource increment corresponding to the preemption time, the expansion coefficient and the predicted expansion probability of the preemption time includes: determining the total expansion capacity as the product of the resource increment corresponding to the preemption time, the expansion coefficient and the predicted expansion probability of the preemption time.
[0015] In some embodiments, using current indicator data and historical indicator data to predict indicator data of future preemption time includes: using a deep learning network to process the current indicator data and historical indicator data to obtain indicator data of future preemption time.
[0016] In some embodiments, when the time interval between the current moment and the last time the indicator data was obtained meets a preset time interval, the current indicator data and the historical indicator data are obtained.
[0017] In some embodiments, the preemption time and time interval are user-configured in a YAML file.
[0018] In some embodiments, the container of the edge computing node is expanded according to the total expansion capacity.
[0019] According to a second aspect of some embodiments of the present invention, there is provided a capacity expansion device, comprising: an acquisition module, configured to acquire current indicator data and historical indicator data; a prediction module, configured to predict indicator data of future preemption time using current indicator data and historical indicator data; a determination module, configured to determine a total expansion capacity based on the predicted indicator data of preemption time; and a capacity expansion module, configured to expand capacity based on the total expansion capacity.
[0020] According to a third aspect of some embodiments of the present invention, there is provided a capacity expansion system, comprising: the aforementioned capacity expansion device; a metrics server, configured to query current indicator data; and a indicator database, configured to query historical indicator data.
[0021] In some embodiments, the capacity expansion system further includes: an event server configured to query historical capacity expansion events.
[0022] In some embodiments, the capacity expansion system further includes: an edge computing node, wherein the capacity expansion device expands the edge computing node.
[0023] According to a fourth aspect of some embodiments of the present invention, there is provided a capacity expansion device, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute any one of the aforementioned capacity expansion methods based on instructions stored in the memory.
[0024] According to a fifth aspect of some embodiments of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein the program implements any of the aforementioned capacity expansion methods when executed by a processor.
[0025] Some embodiments of the above invention have the following advantages or beneficial effects: The embodiments of the present invention predict the expansion capacity of the future preemption time and expand the capacity accordingly, so as to ensure the resource requirements of important services by resource preemption in resource-scarce scenarios, thereby improving the resource utilization efficiency and the effectiveness of capacity expansion.
[0026] Further features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0028] Figure 1 A schematic flow chart of a capacity expansion method according to some embodiments of the present invention is shown.
[0029] Figure 2 A schematic flow chart of a method for determining a total capacity expansion amount according to some embodiments of the present invention is shown.
[0030] Figure 3 A schematic flow chart of a capacity expansion method according to some other embodiments of the present invention is shown.
[0031] Figure 4 A schematic structural diagram of a capacity expansion device according to some embodiments of the present invention is shown.
[0032] Figure 5 A schematic structural diagram of a capacity expansion system according to some embodiments of the present invention is shown.
[0033] Figure 6 A schematic structural diagram of a capacity expansion device according to some other embodiments of the present invention is shown.
[0034] Figure 7 A schematic structural diagram of a capacity expansion device according to some further embodiments of the present invention is shown. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present invention and its application or use. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] The relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
[0037] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0038] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.
[0039] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0040] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0041] Figure 1 FIG. 2 shows a flow chart of a capacity expansion method according to some embodiments of the present invention. Figure 1 As shown, the capacity expansion method of this embodiment includes steps S102 to S108.
[0042] In step S102, current indicator data and historical indicator data are obtained. The current indicator data and historical indicator data have the same meaning of indicators, but the corresponding time is different.
[0043] In some embodiments, the indicator data includes at least one of user access volume, service resource usage, or cluster resource remaining volume. User access volume is represented by the number of user requests, for example. Service resource usage reflects the service resource usage, and cluster resource remaining volume reflects the overall resource usage.
[0044] In some embodiments, current metric data is read from a metric server, and historical metric data is read from a metric database.
[0045] In some embodiments, the indicator data may be acquired periodically. For example, by presetting a time interval, the acquisition process is triggered every preset time, and the method of this embodiment is executed. The preset time interval may be configured by the user, for example, in a YAML (a markup language) file.
[0046] In step S104, the current indicator data and historical indicator data are used to predict the indicator data of the future preemption time. The preemption time is the time served by the resource preemption behavior. Through the expansion operation of the embodiment of the present invention, sufficient resources can be provided to meet the resource requirements when the preemption time arrives.
[0047] In some embodiments, a deep learning network is used to process current indicator data, historical indicator data, and historical expansion events to obtain the expansion probability of the preemption time. The deep learning network is, for example, a long short-term memory (LSTM) network, a transformer, and the like. A historical expansion event refers to an event corresponding to an expansion operation that has occurred. The historical expansion event may include information such as the time of occurrence, the object of operation, and the type of operation. The current indicator data and the historical indicator data have time series characteristics, and LSTM and Transformer are also good at processing such data, so they can more accurately predict the indicator data of the future preemption time.
[0048] In some embodiments, the preemption time may be configured in a YAML file.
[0049] In step S106, the total expansion capacity is determined according to the predicted preemption time index data. The preemption time index data can be used to evaluate the resource demand corresponding to the preemption time, and then by comparing the resource consumption at that time, it can be estimated whether expansion is needed and the size of the total expansion capacity.
[0050] In step S108, capacity expansion is performed according to the total expansion capacity.
[0051] The above embodiment predicts the expansion capacity of the future preemption time and expands the capacity accordingly, so that the resource requirements of important services can be guaranteed by resource preemption in resource-scarce scenarios, thereby improving the effectiveness of capacity expansion while improving resource utilization efficiency.
[0052] Reference below Figure 2 An embodiment of determining the total amount of capacity expansion according to indicator data of the predicted preemption time is described.
[0053] Figure 2 FIG. 2 is a flow chart showing a method for determining the total capacity expansion amount according to some embodiments of the present invention. Figure 2 As shown, the method of this embodiment includes steps S202 to S208.
[0054] In step S202, the resource increment corresponding to the preemption time is determined according to the indicator data of the predicted preemption time.
[0055] In some embodiments, a predicted user growth coefficient is determined based on historical user access volume and user access volume at the preemption time; a predicted business growth coefficient is determined based on historical business resource usage and business resource usage at the preemption time; and a resource increment corresponding to the preemption time is determined based on the maximum value of the user growth coefficient and the business growth coefficient and the business resource usage at the preemption time.
[0056] Assume the current user visit volume is u t , the current business resource usage resS t , the current remaining amount of cluster resources is resT t ; Assume that the future preemption time is t0, and the number of user visits at this time is Business resource usage Current remaining cluster resources
[0057] For example, the user growth factor is Indicates that the business growth coefficient is, for example, The resource increment can be determined by, for example, formula (1).
[0058]
[0059] This determination method takes into account both changes in users and changes in business, and uses the one with greater growth as a reference to determine resource increments, which can better meet actual resource needs.
[0060] In step S204, the expansion coefficient is determined according to the resource increment.
[0061] In some embodiments, the expansion coefficient is determined based on the ratio of the resource increment to the predicted remaining amount of cluster resources. The ratio of the resource increment to the remaining amount of cluster resources reflects the degree of necessity of expansion.
[0062] In some embodiments, when the ratio of the resource increment and the predicted remaining amount of cluster resources is less than a preset lower limit, the expansion factor is determined to be 0; or, when the ratio of the resource increment and the predicted remaining amount of cluster resources is between a preset lower limit and a preset upper limit, the expansion factor is determined to be a ratio; or, when the ratio of the resource increment and the predicted remaining amount of cluster resources is greater than a preset upper limit, the expansion factor is determined to be 1.
[0063] For example, the expansion willingness coefficient δ is first calculated by formula (2), which represents the difference between the predicted resource increment and the current cluster resource surplus, thereby reflecting the degree of necessity for expansion.
[0064]
[0065] Then, the expansion coefficient is determined according to the piecewise function relationship (3) between the expansion willingness coefficient δ and the expansion coefficient, where α represents the preset lower limit and β represents the preset upper limit. The values of the two can be determined through multiple tests or manually.
[0066]
[0067] When δ<α, it means that the remaining resources are sufficient to meet the demand for resource increments, and no capacity expansion is performed; when α≤δ≤β, it means that there is a certain risk in the remaining resources meeting the demand for resource increments, so capacity expansion is performed appropriately according to δ; when δ>β, it means that the remaining resources are very limited, and capacity expansion is performed according to the resource increment.
[0068] In step S206, the current indicator data, historical indicator data and historical expansion events are used to predict the expansion probability of the preemption time.
[0069] In some embodiments, a deep learning network is used to process current indicator data, historical indicator data, and historical expansion events to obtain the expansion probability of future preemption time. For example, current indicator data, historical indicator data, and historical expansion events are input into a deep learning network for prediction.
[0070] In step S208, the total expansion capacity is determined according to the resource increment corresponding to the preemption time, the expansion coefficient, and the predicted expansion probability of the preemption time.
[0071] In some embodiments, the total expansion capacity is positively correlated with each of the resource increment corresponding to the preemption time, the expansion coefficient, and the predicted expansion probability of the preemption time.
[0072] In some embodiments, the total expansion capacity is determined by multiplying the resource increment corresponding to the preemption time, the expansion coefficient, and the predicted expansion probability of the preemption time. For example, the total expansion capacity C is calculated using formula (4).
[0073] C=incre×γ×p (4)
[0074] If C=0, no capacity expansion is required; if C>0, capacity expansion is performed according to the value of C.
[0075] When making capacity expansion predictions, related technologies generally only perform pre-capacity expansion based on the predicted business volume (such as user visits) and resources (such as CPU, memory) undertaken by the container itself, compared with the actual values, without considering the overall resource load of the cluster, nor predicting the capacity expansion event itself. The above embodiment predicts whether there will be insufficient resources after a set time, and the number of resources that need to be preempted in advance, based on the predicted user visits, business resource usage, and overall cluster load, so as to ensure key businesses and achieve effective capacity expansion during hot times or when resources are scarce.
[0076] In some embodiments, prediction and expansion may be performed periodically. When the time interval between the current moment and the last time the indicator data was obtained meets a preset time interval, the current indicator data and the historical indicator data are obtained.
[0077] Figure 3 FIG. 2 shows a flow chart of a capacity expansion method according to some other embodiments of the present invention. Figure 3 As shown, the capacity expansion method of this embodiment includes steps S302 to S310.
[0078] In step S302, the capacity expansion configuration is read, and the capacity expansion configuration includes a preset time interval and preemption time.
[0079] In step S304, it is determined whether the current time meets the preset time interval requirement, that is, whether the time interval from the last acquisition of indicator data is the preset time interval. If yes, step S306 is executed; otherwise, waiting is performed.
[0080] In addition, the process of reading indicators and predictions can also be triggered at preset time intervals.
[0081] In step S306, current indicator data and historical indicator data are read from the indicator database, and historical expansion events are read from the event database.
[0082] In step S308, the total expansion capacity is determined according to the data read in step S306. If the expansion capacity is greater than 0, step S310 is executed; otherwise, waiting is performed.
[0083] In step S310, capacity expansion is performed according to the total expansion capacity.
[0084] The above embodiment acquires and predicts at regular intervals according to the user's configuration, and expands capacity when necessary. Compared with the real-time expansion method in the HPA and VPA mechanisms of the related art, there is no need to frequently perform judgments and other processing, thus saving computing resources.
[0085] Figure 4FIG. 2 shows a schematic diagram of a structure of a capacity expansion device according to some embodiments of the present invention. Figure 4 As shown, the capacity expansion device 400 of this embodiment includes: an acquisition module 4100, configured to acquire current indicator data and historical indicator data; a prediction module 4200, configured to use current indicator data and historical indicator data to predict indicator data of future preemption time; a determination module 4300, configured to determine the total expansion capacity based on the predicted indicator data of preemption time; and a capacity expansion module 4400, configured to expand capacity based on the total expansion capacity.
[0086] In some embodiments, the determination module 4300 is further configured to determine the resource increment corresponding to the preemption time based on the indicator data of the predicted preemption time; determine the capacity expansion coefficient based on the resource increment; predict the capacity expansion probability of the preemption time using the current indicator data, historical indicator data and historical capacity expansion events; determine the total expansion capacity based on the resource increment corresponding to the preemption time, the capacity expansion coefficient and the predicted capacity expansion probability of the preemption time.
[0087] In some embodiments, the indicator data includes at least one of user access volume, service resource usage, or cluster resource surplus.
[0088] In some embodiments, the determination module 4300 is further configured to determine a predicted user growth coefficient based on historical user access volume and user access volume at the preemption time; determine a predicted business growth coefficient based on historical business resource usage and business resource usage at the preemption time; and determine a resource increment corresponding to the preemption time based on the maximum value of the user growth coefficient and the business growth coefficient and the business resource usage at the preemption time.
[0089] In some embodiments, the determination module 4300 is further configured to determine the expansion coefficient according to the ratio of the resource increment to the predicted remaining amount of cluster resources.
[0090] In some embodiments, the determination module 4300 is further configured to determine the expansion factor as 0 when the ratio of the resource increment to the predicted remaining amount of cluster resources is less than a preset lower limit; or, when the ratio of the resource increment to the predicted remaining amount of cluster resources is between a preset lower limit and a preset upper limit, determine the expansion factor as a ratio; or, when the ratio of the resource increment to the predicted remaining amount of cluster resources is greater than a preset upper limit, determine the expansion factor as 1.
[0091] In some embodiments, the determination module 4300 is further configured to use a deep learning network to process current indicator data, historical indicator data, and historical expansion events to obtain the expansion probability of future preemption time.
[0092] In some embodiments, the determination module 4300 is further configured to determine the total expansion capacity by multiplying the resource increment corresponding to the preemption time, the expansion coefficient, and the predicted expansion probability of the preemption time.
[0093] In some embodiments, the prediction module 4200 is further configured to use a deep learning network to process current indicator data and historical indicator data to obtain indicator data of future preemption time.
[0094] In some embodiments, the acquisition module 4100 is further configured to acquire current indicator data and historical indicator data when the time interval between the current moment and the last time the indicator data was acquired meets a preset time interval.
[0095] In some embodiments, the preemption time and time interval are user-configured in a YAML file.
[0096] In some embodiments, the expansion module 4400 is further configured to expand the container of the edge computing node according to the total expansion capacity.
[0097] Figure 5 FIG. 2 shows a schematic diagram of a capacity expansion system according to some embodiments of the present invention. Figure 5 As shown, the capacity expansion system 50 of this embodiment includes a capacity expansion device 510, and its specific implementation method can refer to the capacity expansion device 400; a metrics server 520, which is configured to query current indicator data; and a indicator database 530, which is configured to query historical indicator data.
[0098] In some embodiments, the capacity expansion system 50 further includes: an event server 540 configured to query historical capacity expansion events.
[0099] In some embodiments, the capacity expansion system 50 further includes: an edge computing node 550, wherein the capacity expansion device expands the above edge computing node.
[0100] Figure 6 FIG. 2 shows a schematic diagram of a structure of a capacity expansion device according to some other embodiments of the present invention. Figure 6 As shown, the capacity expansion device 60 of this embodiment includes: a memory 610 and a processor 620 coupled to the memory 610 , and the processor 620 is configured to execute the capacity expansion method in any one of the aforementioned embodiments based on instructions stored in the memory 610 .
[0101] The memory 610 may include, for example, a system memory, a fixed non-volatile storage medium, etc. The system memory may store, for example, an operating system, an application program, a boot loader, and other programs.
[0102] Figure 7 FIG. 2 shows a schematic diagram of a structure of a capacity expansion device according to some other embodiments of the present invention. Figure 7 As shown, the expansion device 70 of this embodiment includes: a memory 710 and a processor 720, and may also include an input / output interface 730, a network interface 740, a storage interface 750, etc. These interfaces 730, 740, 750 and the memory 710 and the processor 720 may be connected, for example, via a bus 760. Among them, the input / output interface 730 provides a connection interface for input / output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 740 provides a connection interface for various networked devices. The storage interface 750 provides a connection interface for external storage devices such as SD cards and USB flash drives.
[0103] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the program implements any of the aforementioned capacity expansion methods when executed by a processor.
[0104] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable non-transient storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0105] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0106] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0107] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0108] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for expanding container resources, comprising: Get current indicator data and historical indicator data; Using the current indicator data and the historical indicator data, predicting indicator data of future preemption time; Determining the total expansion capacity according to the predicted indicator data of the preemption time includes: determining the resource increment corresponding to the preemption time according to the predicted indicator data of the preemption time; determining the expansion coefficient according to the resource increment; predicting the expansion probability of the preemption time by using the current indicator data, the historical indicator data and the historical expansion events; determining the total expansion capacity according to the resource increment corresponding to the preemption time, the expansion coefficient and the predicted expansion probability of the preemption time; The capacity is expanded according to the total expansion capacity.
2. The capacity expansion method according to claim 1, wherein: The indicator data includes at least one of user access volume, service resource usage, or cluster resource surplus.
3. The capacity expansion method according to claim 2, wherein: Determining the resource increment corresponding to the preemption time includes: Determine a predicted user growth coefficient based on historical user visits and user visits during the preemption period; Determining a predicted business growth coefficient based on historical business resource usage and business resource usage during the preemption period; The resource increment corresponding to the preemption time is determined according to the maximum value of the user growth coefficient and the service growth coefficient and the service resource usage at the preemption time.
4. The capacity expansion method according to claim 2, wherein: Determining the expansion coefficient according to the resource increment includes: The expansion coefficient is determined according to the ratio of the resource increment to the predicted remaining amount of cluster resources.
5. The capacity expansion method according to claim 4, wherein: Determining the expansion coefficient according to the ratio of the resource increment to the predicted remaining amount of cluster resources includes: When the ratio of the resource increment to the predicted remaining amount of cluster resources is less than a preset lower limit, the expansion coefficient is determined to be 0; or, When the ratio of the resource increment to the predicted remaining amount of cluster resources is between the preset lower limit and the preset upper limit, the expansion coefficient is determined to be the ratio; or When the ratio of the resource increment to the predicted remaining amount of cluster resources is greater than a preset upper limit, the expansion coefficient is determined to be 1.
6. The capacity expansion method according to any one of claims 1 to 5, wherein: The predicting of the expansion probability of the future preemption time by using the current indicator data, the historical indicator data and the historical expansion events includes: The current indicator data, the historical indicator data and the historical expansion events are processed by using a deep learning network to obtain the expansion probability of the future preemption time.
7. The capacity expansion method according to any one of claims 1 to 5, wherein: The determining of the total expansion capacity according to the resource increment corresponding to the preemption time, the expansion coefficient, and the predicted expansion probability of the preemption time includes: The product of the resource increment corresponding to the preemption time, the capacity expansion coefficient and the predicted capacity expansion probability of the preemption time is determined as the total expansion capacity.
8. The capacity expansion method according to claim 1, wherein: The indicator data for predicting the future preemption time by using the current indicator data and the historical indicator data includes: The current indicator data and the historical indicator data are processed using a deep learning network to obtain indicator data of future preemption time.
9. The capacity expansion method according to claim 1, wherein: When the time interval between the current moment and the last time the indicator data was obtained meets the preset time interval, the current indicator data and the historical indicator data are obtained.
10. The capacity expansion method according to claim 9, wherein: The preemption time and the time interval are configured by the user in a markup language YAML file.
11. The capacity expansion method according to claim 1, wherein: The container of the edge computing node is expanded according to the total expansion capacity.
12. A device for expanding container resources, comprising: An acquisition module, configured to acquire current indicator data and historical indicator data; A prediction module, configured to use the current indicator data and the historical indicator data to predict the indicator data of the future preemption time; The determination module is configured to determine the total expansion capacity according to the predicted indicator data of the preemption time, including: determining the resource increment corresponding to the preemption time according to the predicted indicator data of the preemption time; determining the expansion coefficient according to the resource increment; predicting the expansion probability of the preemption time by using the current indicator data, the historical indicator data and the historical expansion events; determining the total expansion capacity according to the resource increment corresponding to the preemption time, the expansion coefficient and the predicted expansion probability of the preemption time; The capacity expansion module is configured to expand the capacity according to the total expansion capacity.
13. A system for expanding container resources, comprising: The container resource expansion device according to claim 12; The metrics server is configured to query the current metrics data; as well as The indicator database is configured to query historical indicator data.
14. The capacity expansion system according to claim 13, further comprising: The event server is configured to query historical expansion events.
15. The capacity expansion system according to claim 13, further comprising: An edge computing node, wherein the capacity expansion device expands the capacity of the edge computing node.
16. A device for expanding container resources, comprising: Memory; as well as A processor coupled to the memory, wherein the processor is configured to execute the method for expanding the capacity of container resources according to any one of claims 1 to 11 based on instructions stored in the memory.
17. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for expanding the capacity of container resources according to any one of claims 1 to 11 is implemented.
