Minimum scheduling unit capacity expansion and shrinkage method and device, equipment and storage medium
By decomposing and predicting the historical resource monitoring data of the minimum scheduling unit of the K8s container orchestration platform, determining the expected number of replicas for expansion, solving the problem of frequent expansion caused by burst traffic, and improving system stability and resource utilization efficiency .
Patent Information
- Application Number
- CN202411328312.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2024-12-31
AI Technical Summary
In the K8s container orchestration platform, the existing expansion and capacity operation is carried out based on the threshold, resulting in frequent expansion and capacity expansion during bursting traffic, making it difficult to ensure system stability.
By obtaining the historical resource monitoring data of the minimum scheduling unit, decompose it using a multi-level wavelet decomposition method, combining the autoregressive integral sliding average model for resource prediction, determine the desired minimum scheduling unit replica number, and perform scaling processing based on this number.
It effectively avoids frequent expansion and shrinkage, ensures the stability of the system to the greatest extent, and improves the stability of the business and resource utilization efficiency.
Smart Images

Figure CN119225966A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent expansion and contraction technology, and in particular to a minimum scheduling unit expansion and contraction method, device, equipment and storage medium. Background Art
[0002] In a K8s (Kubernetes, container orchestration platform) cluster, you often encounter scenarios where a service needs to be expanded (for example, testing service stress testing, e-commerce platform flash sales, promotional activities, or because of resource shortages, reduced workloads, etc., all require the number of service instances to be expanded or reduced). For pod (minimum scheduling unit) level expansion and contraction. The essence of existing expansion and contraction operations is threshold-based operations, which are triggered by real-time data. They may cause frequent expansion and contraction in response to sudden traffic, making it difficult to ensure system stability.
[0003] Technology, how to maintain the stability of the system when expanding or shrinking the capacity is a problem that technical personnel in this field need to solve. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a method, device, equipment and storage medium for scaling up and down a minimum scheduling unit, which solves the technical problem of poor system stability when scaling up and down in the prior art.
[0005] In order to solve the above technical problems, the present invention provides a method for scaling the capacity of a minimum scheduling unit, comprising:
[0006] Acquire historical resource monitoring data under the minimum scheduling unit, and decompose the historical resource monitoring data using a multi-level wavelet decomposition method to obtain decomposed components;
[0007] Based on the decomposed components, a resource prediction is performed using an autoregressive integrated moving average model to obtain a plurality of predicted resource values, and a target predicted resource value of the current historical resource monitoring data is determined based on the plurality of predicted resource values;
[0008] Determine a maximum resource value, a minimum resource value, and a resource average value based on the historical resource monitoring data, and determine an expected minimum number of scheduling unit copies based on the maximum resource value, the minimum resource value, the resource average value, and the target predicted resource value;
[0009] Based on the expected number of minimum scheduling unit replicas and the original number of minimum scheduling unit replicas, the number of minimum scheduling unit replicas is expanded or reduced using a scaling strategy; wherein the scaling strategy includes expanding the original number of minimum scheduling unit replicas to the target number of scheduling unit replicas, or gradually reducing the original number of minimum scheduling unit replicas according to a set reduction number.
[0010] In some embodiments, the obtaining of historical resource monitoring data under the minimum scheduling unit includes:
[0011] Acquire the historical resource monitoring data under a single minimum scheduling unit; wherein the historical resource monitoring data is the CPU usage or memory usage;
[0012] Or obtain the historical resource monitoring data under multiple minimum scheduling units.
[0013] In some embodiments, the decomposing the historical resource monitoring data using a multi-level wavelet decomposition method to obtain decomposed components includes:
[0014] Determining resource time series data based on the historical resource monitoring data;
[0015] Decomposing the resource time series data according to the low-frequency coefficients through reconstruction operation to obtain low-frequency components corresponding to the resource time series data;
[0016] Decomposing the resource time series data according to the high-frequency coefficients to obtain a plurality of high-frequency components corresponding to the resource time series data;
[0017] The decomposed components are determined to be the low-frequency component and the plurality of high-frequency components.
[0018] In some embodiments, resource prediction is performed based on the decomposed components using an autoregressive integrated moving average model to obtain multiple predicted resource values, including:
[0019] Based on the decomposed components, the autoregressive integrated moving average model is used to perform resource forecasting to obtain forecast values of each decomposed component;
[0020] The predicted values of the decomposed components are superimposed to obtain the predicted resource value corresponding to each historical resource monitoring data.
[0021] In some embodiments, determining a maximum resource value, a minimum resource value, and a resource average value based on the historical resource monitoring data, and determining an expected minimum number of scheduling unit copies based on the maximum resource value, the minimum resource value, the resource average value, and the target predicted resource value includes:
[0022] Determine the maximum resource value, the minimum resource value, and the average resource value corresponding to the historical resource monitoring data of each minimum scheduling unit;
[0023] Determine the resource demand based on the maximum resource value, the minimum resource value, the average resource value and the target predicted resource value, and their corresponding smoothing parameters;
[0024] The expected minimum number of scheduling unit copies is determined based on the resource demand, the original limit, and the original minimum number of scheduling unit copies.
[0025] In some embodiments, scaling the number of minimum scheduling unit replicas using a scaling strategy based on the expected number of minimum scheduling unit replicas and the original number of minimum scheduling unit replicas includes:
[0026] Determine the maximum number of copies of the minimum scheduling unit corresponding to the minimum scheduling unit;
[0027] Compare the expected minimum scheduling unit replica number, the original minimum scheduling unit replica number and the minimum scheduling unit maximum replica number to determine a comparison result;
[0028] When the comparison result is that the expected number of copies of the minimum scheduling unit is greater than the maximum number of copies of the minimum scheduling unit, it is determined to expand the original number of copies of the minimum scheduling unit, and the expanded number of copies of the minimum scheduling unit is the difference between the maximum number of copies of the minimum scheduling unit and the original number of copies of the minimum scheduling unit;
[0029] When the comparison result is that the expected number of copies of the minimum scheduling unit is less than the maximum number of copies of the minimum scheduling unit, and is greater than the original number of copies of the minimum scheduling unit, it is determined to expand the original number of copies of the minimum scheduling unit, and the expanded number of copies of the minimum scheduling unit is the difference between the expected number of copies of the minimum scheduling unit and the original number of copies of the minimum scheduling unit;
[0030] When the comparison result is that the number of copies of the minimum scheduling unit is equal to the number of copies of the original minimum scheduling unit, it is determined that no expansion or contraction processing is performed;
[0031] When the comparison result is that the expected minimum scheduling unit replica number is less than the original minimum scheduling unit replica number, it is determined to gradually shrink the original minimum scheduling unit replica number based on the set shrinkage number until the expected minimum scheduling unit replica number is reached.
[0032] In some embodiments, determining a target predicted resource value of current historical resource monitoring data based on the multiple predicted resource values includes:
[0033] determining a maximum predicted resource value among the plurality of predicted resource values;
[0034] The maximum predicted resource value is used as the target predicted resource value.
[0035] The embodiment of the present invention further provides a minimum scheduling unit expansion and contraction device, comprising:
[0036] A decomposition component determination module is used to obtain historical resource monitoring data under the minimum scheduling unit, and decompose the historical resource monitoring data using a multi-level wavelet decomposition method to obtain decomposition components;
[0037] A target predicted resource value determination module is used to perform resource prediction based on the decomposed components using an autoregressive integral moving average model to obtain multiple predicted resource values, and determine a target predicted resource value of the current historical resource monitoring data based on the multiple predicted resource values;
[0038] An expected minimum scheduling unit replica number determination module is used to determine the resource maximum value, resource minimum value and resource average value based on the historical resource monitoring data, and determine the expected minimum scheduling unit replica number based on the resource maximum value, resource minimum value, resource average value and target predicted resource value;
[0039] A capacity expansion and contraction processing module is used to expand and contract the number of minimum scheduling unit copies using a capacity expansion and contraction strategy based on the expected number of minimum scheduling unit copies and the original number of minimum scheduling unit copies; wherein the capacity expansion and contraction strategy includes expanding the original number of minimum scheduling unit copies to the target number of scheduling unit copies, or gradually contracting the original number of minimum scheduling unit copies according to a set contraction number.
[0040] The embodiment of the present invention further provides a minimum scheduling unit expansion and contraction device, including:
[0041] Memory for storing computer programs;
[0042] A processor is used to execute the computer program to implement the steps of the minimum scheduling unit expansion and contraction method as described above.
[0043] An embodiment of the present invention further provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the minimum scheduling unit expansion and contraction method as described above are implemented.
[0044] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned minimum scheduling unit expansion and contraction method when executed by a processor.
[0045] The purpose of the embodiment of the present invention is to provide a method for scaling up and down a minimum scheduling unit, which can solve the technical problem of poor system stability during scaling up and down.
[0046] To solve the above technical problems, an embodiment of the present invention provides a method for scaling up and down a minimum scheduling unit, which may include: obtaining historical resource monitoring data under the minimum scheduling unit, decomposing the resource monitoring data using a multi-level wavelet decomposition method to obtain decomposed components;
[0047] Based on the decomposed components, an autoregressive integral moving average model is used to perform resource prediction to obtain multiple predicted resource values, and a target predicted resource value of the current historical resource monitoring data is determined based on the multiple predicted resource values; the maximum resource value, the minimum resource value and the average resource value are determined based on the historical resource monitoring data, and the expected minimum number of scheduling unit replicas is determined based on the maximum resource value, the minimum resource value, the average resource value and the target predicted resource value; based on the expected minimum number of scheduling unit replicas and the original minimum number of scheduling unit replicas, the number of minimum scheduling unit replicas is expanded or reduced using a scaling strategy; wherein the scaling strategy includes expanding the original minimum number of scheduling unit replicas to the target number of scheduling unit replicas, or gradually reducing the original minimum number of scheduling unit replicas according to a set reduction number.
[0048] It can be seen from the above technical scheme that the beneficial effect of the present invention is that compared with the current threshold-based triggering, which will cause frequent expansion and contraction for burst traffic and make the system stability relatively low, the present invention predicts resource usage and uses the resource prediction value to determine the expected minimum number of scheduling unit copies. When expanding or contracting, it directly expands to the target number of scheduling unit copies, or gradually shrinks the original minimum number of scheduling unit copies according to the set number of shrinkages, thereby ensuring the stability of the business to the greatest extent.
[0049] The embodiment of the present invention also provides a minimum scheduling unit expansion and contraction device, equipment and storage medium. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. 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 work.
[0051] Figure 1 A flowchart of a method for scaling up and down a minimum scheduling unit provided by an embodiment of the present invention;
[0052] Figure 2 An example flow chart of a method for scaling up and down a minimum scheduling unit provided in an embodiment of the present invention;
[0053] Figure 3 A schematic diagram of the structure of a minimum scheduling unit expansion and contraction device provided in an embodiment of the present invention;
[0054] Figure 4 A schematic diagram of the structure of a minimum scheduling unit expansion and contraction device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0055] 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, not all of the embodiments. 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.
[0056] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.
[0057] Some of the terms that appear in the description of the embodiments of the present invention may be interpreted as follows:
[0058] HPA: Horizontal Pod Autoscaling, an automatic horizontal expansion and contraction mechanism for the number of replicas of k8s workloads
[0059] Pod: The basis of all business types and the smallest unit level managed by K8S. It is a combination of one or more containers.
[0060] Container: Container. In K8s, Pod runs on the container layer.
[0061] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0062] Next, a minimum scheduling unit expansion and contraction method provided by an embodiment of the present invention is introduced in detail. Figure 1 A flowchart of a minimum scheduling unit expansion and contraction method provided in an embodiment of the present invention, the minimum scheduling unit expansion and contraction method may include:
[0063] S101, obtaining historical resource monitoring data under the minimum scheduling unit, and decomposing the resource monitoring data using a multi-level wavelet decomposition method to obtain decomposed components.
[0064] The executor of this embodiment is an electronic device. This embodiment does not limit the specific electronic device. For example, the electronic device in this embodiment may be a computer, a mobile phone, etc. This embodiment does not limit the specific number of the minimum scheduling unit (pod). For example, the minimum scheduling unit in this embodiment may be 1; or the minimum scheduling unit in this embodiment may also be multiple. This embodiment does not limit the specific type of historical resource monitoring data. For example, the historical resource monitoring data in this embodiment may be the CPU (central processing unit) usage; or the historical resource monitoring data in this embodiment may be the memory usage. The multi-level wavelet decomposition method in this embodiment obtains subsequences of different frequencies and time resolutions by performing a step-by-step fine decomposition of the signal. This method can not only reveal the hidden features of the signal, but also optimize parameters for specific analysis tasks.
[0065] It should be further explained that the above-mentioned acquisition of historical resource monitoring data under the minimum scheduling unit may include: acquiring historical resource monitoring data under a single minimum scheduling unit; wherein the historical resource monitoring data is the CPU usage or memory usage; or acquiring historical resource monitoring data under multiple minimum scheduling units. In this embodiment, the historical resource monitoring data under a single minimum scheduling unit is acquired. For example, for a container under a single Pod under a workload, there is only one CPU / memory monitoring curve. The CPU / memory usage monitoring historical data curve is defined as , Indicates the usage corresponding to a certain moment, which can be the CPU / memory usage curve within two weeks. The ARIMA combined with multi-level wavelet decomposition algorithm is used to predict the CPU / memory usage changes within two weeks. ,use The maximum value of is used as the final value predicted by its historical data, that is The embodiment of obtaining historical resource monitoring data under multiple minimum scheduling units is that since there are multiple pods in the workload, each pod is independent of each other but has the same business, it can be considered that the containers under the pod have the same dependence on CPU / memory resources. The CPU / memory usage monitoring historical data curve of the container under a single pod is defined as , then multiple monitoring historical data curves can be formed ,in is the number of replicas of a workload. The same predictions are made for the single-replica case, and the maximum value of the historical data prediction constitutes a sequence . Then the final maximum value of historical data prediction is .
[0066] It should be further explained that the above-mentioned multi-level wavelet decomposition method is used to decompose the resource monitoring data to obtain decomposition components, which may include:
[0067] S1011, determining resource time series data according to resource monitoring data;
[0068] S1012, decomposing the resource time series data according to the low-frequency coefficients through reconstruction operation to obtain low-frequency components corresponding to the indicator time series data;
[0069] S1013, decomposing the indicator time series data according to the high-frequency coefficients to obtain a plurality of high-frequency components corresponding to the indicator time series data;
[0070] S1014, determining the decomposed components to be a low-frequency component and a plurality of high-frequency components.
[0071] This embodiment does not limit the specific process of determining resource timing data based on resource monitoring data. For example, when the resource monitoring data is time-series data, it can be directly determined as resource timing data; or when the resource monitoring data is not arranged in time sequence, it can be arranged to obtain resource timing data. This embodiment decomposes the resource timing data according to the low-frequency coefficients through reconstruction operations to obtain the process of low-frequency components corresponding to the resource timing data. For example, the low-frequency components of the resource timing data can be obtained from the low-frequency coefficients through reconstruction operations, and the high-frequency components of the resource timing data can be obtained from the high-frequency coefficients. The low-frequency coefficients can be expressed as: , where represents the low frequency coefficient, represents a low-pass analysis filter, represents the convolution operator, Represents the original data, It means after the jth low-pass decomposition. The high-frequency coefficients can be expressed as: , where represents the high frequency coefficient, represents a high-pass analysis filter, represents the convolution operator, Represents the original data, Represents the jth high-pass decomposition. After wavelet decomposition, the resource time series data obtains low-frequency and high-frequency coefficients. After reconstruction, the low-frequency component and high-frequency component of the time series are obtained. The low-pass component can be expressed as: , where represents a low-pass reconstruction filter, represents the low-pass component. The high-pass component can be expressed as: In the formula, represents a high-pass reconstruction filter, Represents the high-pass component.
[0072] S102, performing resource prediction using an autoregressive integrated moving average model based on the decomposed components to obtain a plurality of predicted resource values, and determining a target predicted resource value of the current historical resource monitoring data based on the plurality of predicted resource values.
[0073] The ARIMA algorithm (autoregressive integrated moving average model) in this embodiment is a statistical model used for time series forecasting and analysis, and for predicting time series data. This embodiment does not limit the specific method for determining the target predicted resource value of the current historical resource monitoring data based on multiple predicted resource values. For example, this embodiment can determine the maximum value among multiple predicted resource values, and determine the maximum predicted resource value as the target predicted resource value of the current historical resource monitoring data; or this embodiment can also determine the second largest predicted resource value as the target predicted resource value of the current historical resource monitoring data. It can be understood that this embodiment uses the autoregressive integrated moving average model to perform resource forecasting based on the decomposition components, obtains multiple decomposition components, combines the decomposition components, and obtains the predicted resource value. For example, the CPU usage or memory usage monitoring historical data curve is decomposed into multiple high-pass components and 1 low-pass component through multi-level wavelet decomposition, and then each component signal is predicted by the ARIMA algorithm, and finally the component signals are combined to obtain the final predicted resource value.
[0074] It should be further explained that the above-mentioned resource prediction based on the decomposition components using the autoregressive integral moving average model to obtain multiple predicted resource values may include: performing resource prediction based on the decomposition components using the autoregressive integral moving average model to obtain predicted values of each decomposition component; superimposing the predicted values of each decomposition component to obtain the predicted resource value corresponding to each historical resource monitoring data. In this embodiment, when performing resource prediction based on the decomposition components using the autoregressive integral moving average model, what is obtained is the predicted value corresponding to each component, for example, the predicted value of the low-pass component at different times, and the decomposition components corresponding to each time are superimposed to obtain the predicted resource value corresponding to the decomposition component at each time. It can be understood that the predicted resource value corresponding to the historical resource monitoring data is the sum of the decomposed low-frequency component A and high-frequency component D, and the relationship is: .
[0075] S103, determining a maximum resource value, a minimum resource value, and an average resource value based on historical resource monitoring data, and determining an expected minimum number of scheduling unit copies based on the maximum resource value, the minimum resource value, the average resource value, and a target predicted resource value.
[0076] This embodiment does not limit the relationship between the determination of the maximum resource value, the minimum resource value and the average resource value based on the historical resource monitoring data and the above steps. In this embodiment, the step of determining the maximum resource value, the minimum resource value and the average resource value based on the historical resource monitoring data can be performed together with the step of decomposing the resource monitoring data using the multi-level wavelet decomposition method to obtain the decomposed components; or before decomposing the resource monitoring data using the multi-level wavelet decomposition method to obtain the decomposed components, or after decomposing the resource monitoring data using the multi-level wavelet decomposition method to obtain the decomposed components. The historical resource monitoring data obtained in this embodiment is multiple, and the maximum resource value, the minimum resource value and the average resource value can be obtained through processing. This embodiment does not limit the specific process of determining the expected minimum scheduling unit replica number based on the maximum resource value, the minimum resource value, the average resource value and the target predicted resource value. For example, this embodiment can determine the coefficients corresponding to the maximum resource value, the minimum resource value, the average resource value and the target predicted resource value, respectively, and superimpose them to obtain the resource demand, and determine the expected minimum scheduling unit replica number according to the resource demand, the original limit and the original minimum scheduling unit. The original limit is the maximum resource that a single pod can use.
[0077] It should be further explained that the above-mentioned determination of the maximum resource value, the minimum resource value and the average resource value based on the historical resource monitoring data, and the determination of the expected minimum number of scheduling unit copies based on the maximum resource value, the minimum resource value, the average resource value and the target predicted resource value may include:
[0078] S1031, determining the maximum resource value, the minimum resource value, and the average resource value corresponding to the historical resource monitoring data of each minimum scheduling unit;
[0079] S1032, determining resource demand based on the maximum resource value, the minimum resource value, the average resource value and the target predicted resource value, and their corresponding smoothing parameters;
[0080] S10323, determine the expected minimum number of scheduling unit copies based on the resource demand, the original limit, and the original minimum number of scheduling unit copies.
[0081] In this embodiment, the maximum value function can be used to determine the maximum value of resources corresponding to historical resource monitoring data, the minimum value function can be used to determine the minimum value of resources corresponding to historical resource monitoring data, and the average value can be used to determine the average value of resources corresponding to historical resource monitoring data. After monitoring the historical resource monitoring data, this embodiment counts the maximum value, minimum value, and average value of the monitoring data in the historical time period. Similar to the historical data prediction, the statistical results can also be divided into single-copy and multi-copy situations. In the case of single-copy operation, there is only one CPU / memory monitoring curve for a container under a single Pod under the workload. Define the CPU / memory usage monitoring historical data curve as , which is the CPU / memory usage curve within two weeks, and its length is , then its maximum value , minimum ,average value In the case of multiple replicas, since there are multiple pods in the workload, and each pod is independent of each other but has the same business, it can be considered that the containers under the pod have the same dependence on CPU / memory resources. The CPU / memory usage monitoring historical data curve of the container under a single pod is defined as , then multiple monitoring historical data curves can be formed ,in is the number of replicas of a workload. Then the maximum value among all data points in the statistical data set is calculated. , minimum , the average value is , the final maximum value predicted by historical data is This embodiment determines the resource demand based on the maximum resource value, the minimum resource value, the average resource value and the target predicted resource value, and their corresponding smoothing parameters, which can be expressed as ; In the formula, is the calculated resource demand, , , , is a smoothing parameter, with a value range of [0, 1], and , and adjust it to adjust the ratio of the predicted value to the statistical value. , original limit Calculate the expected minimum number of scheduling unit copies from the original minimum scheduling unit copy number courentPod: where the expected minimum number of scheduling unit copies is In the formula, distancPod is the expected minimum scheduling unit replica number, courentPod is the original minimum scheduling unit replica number, and ceil indicates rounding up. This embodiment can adjust the ratio of resource prediction value to statistical value (maximum value, minimum value and average value) according to demand by assigning different smoothing coefficients to different parameters, thereby improving user experience.
[0082] S104, scaling the number of minimum scheduling unit replicas using a scaling strategy based on the expected number of minimum scheduling unit replicas and the original number of minimum scheduling unit replicas; wherein the scaling strategy includes expanding the original number of minimum scheduling unit replicas to the target number of scheduling unit replicas, or gradually scaling the original number of minimum scheduling unit replicas according to a set scaling number.
[0083] In this embodiment, the target scheduling unit replica number may be the expected minimum scheduling unit replica number, or the maximum number of minimum scheduling unit replicas, where the maximum number of minimum scheduling unit replicas is the maximum number of minimum scheduling units.
[0084] It should be further explained that, in order to improve the accuracy of scaling, the scaling of the number of minimum scheduling unit replicas using the scaling strategy based on the expected number of minimum scheduling unit replicas and the original number of minimum scheduling unit replicas may include:
[0085] S1041, determining the maximum number of copies of the minimum scheduling unit corresponding to the minimum scheduling unit;
[0086] S1042, comparing the expected minimum scheduling unit replica number, the original minimum scheduling unit replica number, and the minimum scheduling unit maximum replica number to determine a comparison result;
[0087] S1043, when the comparison result shows that the expected number of copies of the minimum scheduling unit is greater than the maximum number of copies of the minimum scheduling unit, it is determined to expand the original number of copies of the minimum scheduling unit, and the expanded number of copies of the minimum scheduling unit is the difference between the maximum number of copies of the minimum scheduling unit and the original number of copies of the minimum scheduling unit;
[0088] S1044, when the comparison result is that the expected number of copies of the minimum scheduling unit is less than the maximum number of copies of the minimum scheduling unit, and is greater than the original number of copies of the minimum scheduling unit, it is determined to expand the original number of copies of the minimum scheduling unit, and the expanded number of copies of the minimum scheduling unit is the difference between the expected number of copies of the minimum scheduling unit and the original number of copies of the minimum scheduling unit;
[0089] S1045, when the comparison result shows that the number of minimum scheduling unit replicas is equal to the original number of minimum scheduling unit replicas, it is determined that no expansion or contraction processing is performed;
[0090] S1046: When the comparison result shows that the expected minimum scheduling unit replica number is less than the original minimum scheduling unit replica number, determine to gradually scale down the original minimum scheduling unit replica number based on the set scale-down number until the expected minimum scheduling unit replica number is reached.
[0091] It is understandable that there is a maximum number of replicas in a workload (maximum number of replicas of the minimum scheduling unit), which is limited to the maximum number of minimum scheduling units that can be possessed. Comparing the maximum number of replicas of the minimum scheduling unit, the expected number of replicas of the minimum scheduling unit, and the original number of replicas of the minimum scheduling unit, four situations will occur. The decision is shown in Table 1, which is a schematic table of a specific expansion and contraction provided by an embodiment of the present invention.
[0092] Table 1 A schematic diagram of a specific expansion and contraction
[0093]
[0094] When the expected number of copies of the minimum scheduling unit is less than the original number of copies of the minimum scheduling unit, it indicates that the required number of copies needs to be reduced, and the scaling strategy is based on the step size, and the step size is selected as 1 (it can also be other, according to the demand setting), that is, each time the number of copies changes, it is reduced by only one until the requirements are met. The expansion and contraction strategy provided in the embodiment of the present invention can ensure that sufficient resources can be provided at one time when the expected number of copies of the minimum scheduling unit is greater than the original number of copies of the minimum scheduling unit. When the business needs to be scaled down, a gradual scaling strategy is adopted, and the number of copies reduced each time is set to 1 until it reaches the recommended resource range, thereby ensuring stable operation of the system.
[0095] It should be further explained that in order to improve the efficiency and stability of the adjustment, when the comparison result shows that the expected minimum number of scheduling unit copies is less than the original minimum number of scheduling unit copies, it is determined to gradually shrink the original minimum number of scheduling unit copies based on the set shrinkage number until the expected minimum number of scheduling unit copies is reached. This may include: determining the set shrinkage number as the minimum shrinkage number, obtaining real-time system resources, and dynamically increasing the minimum shrinkage number according to the real-time system resources until the expected minimum number of scheduling unit copies is reached. This embodiment does not limit the minimum shrinkage number. For example, the minimum shrinkage number in this embodiment is 2; or it can also be 1. This embodiment can effectively optimize resource allocation and improve the overall efficiency and stability of the system by accurately setting the minimum shrinkage number, obtaining system resource usage in real time, and dynamically adjusting the shrinkage number based on these data. This not only helps to reduce operating costs, but also ensures high availability and good performance of the system under various load conditions.
[0096] A minimum scheduling unit scaling method provided by an embodiment of the present invention may include: S101, obtaining historical resource monitoring data under the minimum scheduling unit, decomposing the resource monitoring data using a multi-level wavelet decomposition method to obtain decomposition components; S102, performing resource prediction based on the decomposition components using an autoregressive integral sliding average model to obtain multiple predicted resource values, and determining a target predicted resource value of the current historical resource monitoring data based on the multiple predicted resource values; S103, determining a maximum resource value, a minimum resource value, and an average resource value based on the historical resource monitoring data, and determining an expected number of minimum scheduling unit replicas based on the maximum resource value, the minimum resource value, the average resource value, and the target predicted resource value; S104, scaling the number of minimum scheduling unit replicas using a scaling strategy based on the expected number of minimum scheduling unit replicas and the original number of minimum scheduling unit replicas; wherein the scaling strategy includes expanding the original number of minimum scheduling unit replicas to the target number of scheduling unit replicas, or gradually scaling the original number of minimum scheduling unit replicas according to a set number of scaling reductions. Compared with the current threshold-based triggering, which causes frequent expansion and contraction for burst traffic and makes the system stability relatively low, the present invention determines the expected minimum number of scheduling unit copies, and uses the expected minimum number of scheduling unit copies and the original minimum number of scheduling unit copies for expansion and contraction. When expanding and contracting, it directly expands to the target number of scheduling unit copies (the expected minimum number of scheduling unit copies or the maximum number of minimum scheduling unit copies), or gradually shrinks the original minimum number of scheduling unit copies according to the set number of shrinkages, thereby ensuring the stability of the business to the greatest extent.
[0097] In order to make the present invention easier to understand, please refer to Figure 2 , Figure 2 An example flow chart of a method for scaling up and down a minimum scheduling unit provided in an embodiment of the present invention may specifically include:
[0098] S201, obtaining historical resource monitoring data in a minimum scheduling unit of a set time period.
[0099] This embodiment predicts the historical usage of the container CPU or memory after collecting the container CPU or memory monitoring data. The prediction condition is that there is historical resource monitoring data.
[0100] S202, determining a maximum resource value, a minimum resource value, and an average resource value based on historical resource monitoring data.
[0101] S203, decomposing the historical resource monitoring data using a multi-level wavelet decomposition method to obtain a low-pass component and three high-pass components corresponding to the historical resource monitoring data of each time period.
[0102] In this embodiment, there are three layers of decomposition, so one low-pass component and three high-pass components can be obtained. When it is a 2-layer decomposition, one low-pass component and two high-pass components can be obtained. It should be noted that the number of decomposition layers can be determined according to demand. In this embodiment, ARIMA combined with a multi-level wavelet decomposition algorithm can be used to predict two weeks of data. Since in a workload, most of them are multi-copy operations, that is, there are multiple pods under a workload, two situations are distinguished for prediction, multi-copy operation and single-copy operation.
[0103] S204, using ARIMA to predict each component, obtain a low-pass component prediction value and a high-pass component prediction value, and superimpose the low-pass component prediction value and the high-pass component prediction value to obtain a predicted resource value corresponding to each time period.
[0104] In this embodiment, the historical resource monitoring data of CPU / memory usage monitoring is decomposed into multiple high-pass components and one low-pass component through multi-level wavelet decomposition, and then each component signal is predicted through the ARIMA algorithm, and finally the component signals are combined to obtain the final predicted resource value.
[0105] S205: Taking the largest predicted resource value among all predicted resource values as the target predicted resource value.
[0106] S206, determining the resource demand based on the maximum resource value, the minimum resource value, the average resource value and the target predicted resource value, and determining the expected minimum number of scheduling unit copies based on the resource demand, the original limit and the original minimum number of scheduling unit copies.
[0107] S207 , comparing the expected minimum scheduling unit replica number with the minimum scheduling unit maximum replica number and the original minimum scheduling unit replica number.
[0108] S208: Determine whether to perform capacity expansion or contraction processing according to the comparison result.
[0109] S209, if expansion and contraction processing is performed, the number of original minimum scheduling unit replicas is directly expanded to the expected number of minimum scheduling unit replicas or the maximum number of minimum scheduling unit replicas; or the number of original minimum scheduling unit replicas is gradually contracted.
[0110] S210: If no expansion or contraction processing is performed, the process is determined to be ended.
[0111] In the embodiment of the present invention, the cloud platform is a K8s platform, and its native monitoring indicator collection solution Prometheus (monitoring software) can be selected to collect container layer historical resource monitoring data. The container monitoring information that needs to be collected is CPU usage, CPU limit, memory usage, and memory limit. Among them, CPU usage is the number of CPU cores used when the container is running, and the CPU limit is the CPU usage limit configured during the container creation process, that is, the maximum number of cores that can be used. Memory usage is the memory information used when the container is running, and the memory limit is the quota during the container creation process. The present invention designs a K8S workload intelligent expansion and contraction method, which analyzes the CPU / memory resource occupancy of the container in the workload, specifically includes predicting the container according to its CPU and memory resource occupancy, using the expected minimum scheduling unit replica number and the minimum scheduling unit maximum replica number and the original minimum scheduling unit replica number for comprehensive judgment, and then the container workload is expanded and contracted to determine the stability of the business to the greatest extent. This method can improve the utilization rate of resources by the workload and improve the work efficiency of the workload.
[0112] The following is an introduction to a minimum scheduling unit expansion and contraction device provided in an embodiment of the present invention. The minimum scheduling unit expansion and contraction device described below and the minimum scheduling unit expansion and contraction method described above can be referenced to each other.
[0113] Figure 3 A structural schematic diagram of a minimum scheduling unit expansion and contraction device provided in an embodiment of the present invention may include:
[0114] The decomposition component determination module 100 is used to obtain the historical resource monitoring data under the minimum scheduling unit, and decompose the historical resource monitoring data using a multi-level wavelet decomposition method to obtain decomposition components;
[0115] A target predicted resource value determination module 200 is used to perform resource prediction based on the decomposed components using an autoregressive integral moving average model to obtain multiple predicted resource values, and determine a target predicted resource value of the current historical resource monitoring data based on the multiple predicted resource values;
[0116] An expected minimum scheduling unit replica number determination module 300 is used to determine a resource maximum value, a resource minimum value, and a resource average value based on the historical resource monitoring data, and to determine an expected minimum scheduling unit replica number based on the resource maximum value, the resource minimum value, the resource average value, and the target predicted resource value;
[0117] The expansion and contraction processing module 400 is used to expand and contract the number of minimum scheduling unit copies using the expansion and contraction strategy based on the expected number of minimum scheduling unit copies and the original number of minimum scheduling unit copies; wherein the expansion and contraction strategy includes expanding the original number of minimum scheduling unit copies to the target number of scheduling unit copies, or gradually contracting the original number of minimum scheduling unit copies according to the set contraction number.
[0118] Further, based on the above embodiment, the above decomposition component determination module 100 may include:
[0119] A historical resource monitoring data acquisition unit under a single minimum scheduling unit, used to acquire the historical resource monitoring data under a single minimum scheduling unit; wherein the historical resource monitoring data is the CPU usage or memory usage;
[0120] The historical resource monitoring data acquisition unit under multiple minimum scheduling units is used to acquire the historical resource monitoring data under multiple minimum scheduling units.
[0121] Further, based on any of the above embodiments, the decomposition component determination module 100 may include:
[0122] A resource time series data determination unit, configured to determine resource time series data according to the historical resource monitoring data;
[0123] A low-frequency component determination unit, configured to decompose the resource time series data according to the low-frequency coefficients through a reconstruction operation to obtain a low-frequency component corresponding to the resource time series data;
[0124] A high-frequency component determination unit, configured to decompose the resource time series data according to high-frequency coefficients to obtain a plurality of high-frequency components corresponding to the resource time series data;
[0125] The decomposition component determining unit is used to determine the decomposition components as the low-frequency component and the multiple high-frequency components.
[0126] Further, based on any of the above embodiments, the above target predicted resource value determination module 200 may include:
[0127] A prediction value determination unit for decomposition components, used to perform resource prediction based on the decomposition components using the autoregressive integrated moving average model to obtain prediction values for each decomposition component;
[0128] The predicted resource value determination unit is used to superimpose the predicted values of the decomposed components to obtain the predicted resource value corresponding to each historical resource monitoring data.
[0129] Further, based on any of the above embodiments, the module 300 for determining the expected minimum scheduling unit replica number may include:
[0130] A statistical value determination unit, used to determine the resource maximum value, the resource minimum value and the resource average value corresponding to the historical resource monitoring data of each minimum scheduling unit;
[0131] A resource demand determination unit, configured to determine the resource demand based on the maximum resource value, the minimum resource value, the average resource value and the target predicted resource value, and their corresponding smoothing parameters;
[0132] The expected minimum scheduling unit replica number determining unit is used to determine the expected minimum scheduling unit replica number based on the resource demand, the original limit and the original minimum scheduling unit replica number.
[0133] Further, based on any of the above embodiments, the above expansion and contraction processing module 400 may include:
[0134] A minimum scheduling unit maximum replica number determination unit, used to determine the minimum scheduling unit maximum replica number corresponding to the minimum scheduling unit;
[0135] A comparison result determination unit, used to compare the expected minimum scheduling unit replica number, the original minimum scheduling unit replica number and the minimum scheduling unit maximum replica number to determine a comparison result;
[0136] A first expansion unit, configured to determine to expand the original number of copies of the minimum scheduling unit when the comparison result shows that the expected number of copies of the minimum scheduling unit is greater than the maximum number of copies of the minimum scheduling unit, and the expanded number of copies of the minimum scheduling unit is the difference between the maximum number of copies of the minimum scheduling unit and the original number of copies of the minimum scheduling unit;
[0137] A second expansion unit is used to determine to expand the original number of copies of the minimum scheduling unit when the comparison result shows that the expected number of copies of the minimum scheduling unit is less than the maximum number of copies of the minimum scheduling unit and is greater than the original number of copies of the minimum scheduling unit, and the number of copies of the expanded minimum scheduling unit is the difference between the expected number of copies of the minimum scheduling unit and the original number of copies of the minimum scheduling unit;
[0138] a non-processing unit, configured to determine not to perform capacity expansion or contraction processing when the comparison result shows that the number of copies of the minimum scheduling unit is equal to the number of copies of the original minimum scheduling unit;
[0139] The shrinking unit is used to determine, when the comparison result shows that the expected minimum scheduling unit replica number is less than the original minimum scheduling unit replica number, to gradually shrink the original minimum scheduling unit replica number based on the set shrinking number until the expected minimum scheduling unit replica number is reached.
[0140] Further, based on any of the above embodiments, the above target predicted resource value determination module 200 may include:
[0141] a maximum predicted resource value determining unit, configured to determine a maximum predicted resource value among the plurality of predicted resource values;
[0142] The target predicted resource value determining unit is configured to use the maximum predicted resource value as the target predicted resource value.
[0143] It should be noted that the order of the modules and units in the above-mentioned minimum scheduling unit expansion and contraction device can be changed without affecting the logic.
[0144] Figure 3 The description of the features in the corresponding embodiments can be found in Figure 3 The relevant descriptions of the corresponding embodiments will not be repeated here one by one.
[0145] The minimum scheduling unit expansion and contraction device provided in an embodiment of the present invention may include: a decomposition component determination module 100, which is used to obtain historical resource monitoring data under the minimum scheduling unit, and decompose the historical resource monitoring data using a multi-level wavelet decomposition method to obtain decomposition components; a target prediction resource value determination module 200, which is used to perform resource prediction based on the decomposition components using an autoregressive integral moving average model to obtain multiple predicted resource values, and determine the target prediction resource value of the current historical resource monitoring data based on the multiple predicted resource values; an expected minimum scheduling unit replica number determination module 300, which is used to determine the target prediction resource value of the current historical resource monitoring data based on the historical resource monitoring data. The control data determines the maximum value of resources, the minimum value of resources and the average value of resources, and determines the expected minimum number of scheduling unit copies based on the maximum value of resources, the minimum value of resources, the average value of resources and the target predicted resource value; the expansion and contraction processing module 400 is used to expand and contract the minimum scheduling unit copies based on the expected minimum scheduling unit copies and the original minimum scheduling unit copies using the expansion and contraction strategy; wherein the expansion and contraction strategy includes expanding the original minimum scheduling unit copies to the target scheduling unit copies, or gradually contracting the original minimum scheduling unit copies according to the set contraction number. Compared with the current threshold-based triggering, which causes frequent expansion and contraction for burst traffic, resulting in relatively low system stability, the present invention determines the expected minimum scheduling unit copies, and uses the expected minimum scheduling unit copies and the original minimum scheduling unit copies to expand and contract, directly expands to the target scheduling unit copies (the expected minimum scheduling unit copies or the maximum number of minimum scheduling unit copies) during expansion and contraction, or gradually contracts the original minimum scheduling unit copies according to the set contraction number, to ensure the stability of the business to the greatest extent.
[0146] A minimum scheduling unit expansion and contraction device provided in an embodiment of the present invention is introduced below. The minimum scheduling unit expansion and contraction device described below and the minimum scheduling unit expansion and contraction method described above can refer to each other.
[0147] Figure 4 A structural diagram of a minimum scheduling unit expansion and contraction device provided in an embodiment of the present invention, such as Figure 4 As shown, the minimum scheduling unit expansion and contraction device includes: a memory 60, for storing computer programs;
[0148] The processor 61 is used to implement the steps of the minimum scheduling unit expansion and contraction method in the above embodiment when executing a computer program.
[0149] The minimum scheduling unit expansion and contraction device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.
[0150] Among them, the processor 61 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 61 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 61 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 61 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 61 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0151] The memory 60 may include one or more computer-readable storage media, which may be non-transitory. The memory 60 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 60 is at least used to store the following computer program 601, wherein, after the computer program is loaded and executed by the processor 61, the relevant steps of the minimum scheduling unit expansion and contraction method disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 602 may include Windows, Unix, Linux, etc. Data 603 may include but is not limited to minimum scheduling unit expansion and contraction data, etc.
[0152] In some embodiments, the minimum scheduling unit expansion and contraction device may also include a display screen 62 , an input and output interface 63 , a communication interface 64 , a power supply 65 , and a communication bus 66 .
[0153] Those skilled in the art will understand that Figure 4 The structure shown in does not constitute a limitation on the minimum scheduling unit expansion and contraction device, and may include more or fewer components than shown in the figure.
[0154] It is understandable that if the minimum scheduling unit expansion and contraction method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the current technology or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and executes all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, magnetic disk or optical disk and other media that can store program codes.
[0155] Based on this, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the minimum scheduling unit expansion and contraction method as described above are implemented.
[0156] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned minimum scheduling unit expansion and contraction method when executed by a processor.
[0157] The above is a detailed introduction to a minimum scheduling unit expansion and contraction method, device, equipment and storage medium provided by an embodiment of the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0158] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0159] The above is a detailed introduction to a minimum scheduling unit expansion and contraction method, device, equipment and storage medium provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A method for scaling up and down a minimum scheduling unit, characterized in that: include: Acquire historical resource monitoring data under the minimum scheduling unit, and decompose the historical resource monitoring data using a multi-level wavelet decomposition method to obtain decomposed components; Based on the decomposed components, a resource prediction is performed using an autoregressive integrated moving average model to obtain a plurality of predicted resource values, and a target predicted resource value of the current historical resource monitoring data is determined based on the plurality of predicted resource values; Determine a maximum resource value, a minimum resource value, and a resource average value based on the historical resource monitoring data, and determine an expected minimum number of scheduling unit copies based on the maximum resource value, the minimum resource value, the resource average value, and the target predicted resource value; Based on the expected number of minimum scheduling unit replicas and the original number of minimum scheduling unit replicas, the number of minimum scheduling unit replicas is expanded or reduced using a scaling strategy; wherein the scaling strategy includes expanding the original number of minimum scheduling unit replicas to the target number of scheduling unit replicas, or gradually reducing the original number of minimum scheduling unit replicas according to a set reduction number.
2. The method for expanding and contracting the minimum scheduling unit according to claim 1, characterized in that: The obtaining of historical resource monitoring data under the minimum scheduling unit includes: Acquire the historical resource monitoring data under a single minimum scheduling unit; wherein the historical resource monitoring data is the CPU usage or memory usage; Or obtain the historical resource monitoring data under multiple minimum scheduling units.
3. The method for expanding and contracting the minimum scheduling unit according to claim 1, characterized in that: The method of decomposing the historical resource monitoring data using a multi-level wavelet decomposition method to obtain decomposition components includes: Determining resource time series data based on the historical resource monitoring data; Decomposing the resource time series data according to the low-frequency coefficients through reconstruction operation to obtain low-frequency components corresponding to the resource time series data; Decomposing the resource time series data according to the high-frequency coefficients to obtain a plurality of high-frequency components corresponding to the resource time series data; The decomposed components are determined to be the low-frequency component and the plurality of high-frequency components.
4. The method for scaling up and down the minimum scheduling unit according to claim 1, characterized in that: Based on the decomposed components, the resource prediction is performed using the autoregressive integrated moving average model to obtain multiple predicted resource values, including: Based on the decomposed components, the autoregressive integrated moving average model is used to perform resource forecasting to obtain forecast values of each decomposed component; The predicted values of the decomposed components are superimposed to obtain the predicted resource value corresponding to each historical resource monitoring data.
5. The method for scaling up and down the minimum scheduling unit according to any one of claims 1 to 4, characterized in that: Determining a maximum resource value, a minimum resource value, and a resource average value based on the historical resource monitoring data, and determining an expected minimum number of scheduling unit copies based on the maximum resource value, the minimum resource value, the resource average value, and the target predicted resource value, including: Determine the maximum resource value, the minimum resource value, and the average resource value corresponding to the historical resource monitoring data of each minimum scheduling unit; Determine the resource demand based on the maximum resource value, the minimum resource value, the average resource value and the target predicted resource value, and their corresponding smoothing parameters; The expected minimum number of scheduling unit copies is determined based on the resource demand, the original limit, and the original minimum number of scheduling unit copies.
6. The method for scaling up and down the minimum scheduling unit according to any one of claims 1 to 4, characterized in that: Based on the expected minimum scheduling unit replica number and the original minimum scheduling unit replica number, the minimum scheduling unit replica number is scaled up or down using a scaling strategy, including: Determine the maximum number of copies of the minimum scheduling unit corresponding to the minimum scheduling unit; Compare the expected minimum scheduling unit replica number, the original minimum scheduling unit replica number and the minimum scheduling unit maximum replica number to determine a comparison result; When the comparison result is that the expected number of copies of the minimum scheduling unit is greater than the maximum number of copies of the minimum scheduling unit, it is determined to expand the original number of copies of the minimum scheduling unit, and the expanded number of copies of the minimum scheduling unit is the difference between the maximum number of copies of the minimum scheduling unit and the original number of copies of the minimum scheduling unit; When the comparison result is that the expected number of copies of the minimum scheduling unit is less than the maximum number of copies of the minimum scheduling unit, and is greater than the original number of copies of the minimum scheduling unit, it is determined to expand the original number of copies of the minimum scheduling unit, and the expanded number of copies of the minimum scheduling unit is the difference between the expected number of copies of the minimum scheduling unit and the original number of copies of the minimum scheduling unit; When the comparison result is that the number of copies of the minimum scheduling unit is equal to the number of copies of the original minimum scheduling unit, it is determined that no expansion or contraction processing is performed; When the comparison result is that the expected minimum scheduling unit replica number is less than the original minimum scheduling unit replica number, it is determined to gradually shrink the original minimum scheduling unit replica number based on the set shrinkage number until the expected minimum scheduling unit replica number is reached.
7. The method for scaling up and down the minimum scheduling unit according to claim 1, characterized in that: Determining a target predicted resource value of current historical resource monitoring data based on the multiple predicted resource values includes: determining a maximum predicted resource value among the plurality of predicted resource values; The maximum predicted resource value is used as the target predicted resource value.
8. A minimum scheduling unit expansion and contraction device, characterized in that: include: A decomposition component determination module is used to obtain historical resource monitoring data under the minimum scheduling unit, and decompose the historical resource monitoring data using a multi-level wavelet decomposition method to obtain decomposition components; A target predicted resource value determination module is used to perform resource prediction based on the decomposed components using an autoregressive integral moving average model to obtain multiple predicted resource values, and determine a target predicted resource value of the current historical resource monitoring data based on the multiple predicted resource values; An expected minimum scheduling unit replica number determination module is used to determine the resource maximum value, resource minimum value and resource average value based on the historical resource monitoring data, and determine the expected minimum scheduling unit replica number based on the resource maximum value, resource minimum value, resource average value and target predicted resource value; A capacity expansion and contraction processing module is used to expand and contract the number of minimum scheduling unit copies using a capacity expansion and contraction strategy based on the expected number of minimum scheduling unit copies and the original number of minimum scheduling unit copies; wherein the capacity expansion and contraction strategy includes expanding the original number of minimum scheduling unit copies to the target number of scheduling unit copies, or gradually contracting the original number of minimum scheduling unit copies according to a set contraction number.
9. A minimum scheduling unit expansion and contraction device, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program to implement the steps of the minimum scheduling unit expansion and contraction method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the steps of the minimum scheduling unit expansion and contraction method as claimed in any one of claims 1 to 7.
